SF Patch Tracker [ 2854711 ] Patch for Solaris10 compilation and usage

Submitted By: zephyrus ( zephyrus00jp )

Patch for Solaris10 compilation and usage.
This commit is contained in:
Marcelo Roberto Jimenez 2010-09-10 19:02:31 -03:00
parent 0158f52ee2
commit 5755ac022f
5 changed files with 27 additions and 16 deletions

View File

@ -2,6 +2,12 @@
Version 1.6.7
*******************************************************************************
2010-09-10 Chandra Penke <chandrapenke(at)mcntech.com>
* SF Patch Tracker [ 2854711 ] Patch for Solaris10 compilation and usage
Submitted By: zephyrus ( zephyrus00jp )
Patch for Solaris10 compilation and usage.
2010-09-10 Chandra Penke <chandrapenke(at)mcntech.com>
Add support for conditionally enabling ipv6.

View File

@ -43,7 +43,8 @@
#endif
int initialize = 1;
static int initialize_init = 1;
static int initialize_register = 1;
/*! Function pointers to use for displaying formatted strings.
* Set on Initialization of device. */
@ -67,7 +68,7 @@ ithread_mutex_t display_mutex;
******************************************************************************/
int SampleUtil_Initialize(print_string print_function)
{
if (initialize) {
if (initialize_init) {
ithread_mutexattr_t attr;
ithread_mutexattr_init(&attr);
@ -80,7 +81,7 @@ int SampleUtil_Initialize(print_string print_function)
gPrintFun = print_function;
ithread_mutex_unlock(&display_mutex);
initialize = 0;
initialize_init = 0;
} else {
SampleUtil_Print("***** SampleUtil_Initialize was called multiple times!\n");
abort();
@ -99,12 +100,9 @@ int SampleUtil_Initialize(print_string print_function)
******************************************************************************/
int SampleUtil_RegisterUpdateFunction(state_update update_function)
{
/* Intialize only once. */
static int initialize = 1;
if (initialize) {
if (initialize_register) {
gStateUpdateFun = update_function;
initialize = 0;
initialize_register = 0;
}
return UPNP_E_SUCCESS;
@ -123,7 +121,9 @@ int SampleUtil_Finish()
{
ithread_mutex_destroy(&display_mutex);
gPrintFun = NULL;
initialize = 1;
gStateUpdateFun = NULL;
initialize_init = 1;
initialize_register = 1;
return UPNP_E_SUCCESS;
}

View File

@ -1310,7 +1310,8 @@ int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionP
SampleUtil_Print(
"Initializing UPnP Sdk with\n"
"\tipaddress = %s port = %u\n",
ip_address, port);
ip_address ? ip_address : "{NULL}",
port);
rc = UpnpInit(ip_address, port);
if (rc != UPNP_E_SUCCESS) {

View File

@ -1872,7 +1872,8 @@ TvDeviceStart( char *ip_address,
SampleUtil_Print(
"Initializing UPnP Sdk with\n"
"\tipaddress = %s port = %u\n",
ip_address, port );
ip_address ? ip_address : "{NULL}",
port);
ret = UpnpInit( ip_address, port );
if( ret != UPNP_E_SUCCESS ) {
@ -1886,8 +1887,9 @@ TvDeviceStart( char *ip_address,
SampleUtil_Print(
"UPnP Initialized\n"
"\tipaddress= %s port = %u\n",
ip_address, port );
"\tipaddress = %s port = %u\n",
ip_address ? ip_address : "{NULL}",
port);
if( desc_doc_name == NULL ) {
desc_doc_name = "tvcombodesc.xml";

View File

@ -1331,7 +1331,8 @@ int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionP
SampleUtil_Print(
"Initializing UPnP Sdk with\n"
"\tipaddress = %s port = %u\n",
ip_address, port);
ip_address ? ip_address : "{NULL}",
port);
rc = UpnpInit(ip_address, port);
if (rc != UPNP_E_SUCCESS) {
@ -1348,8 +1349,9 @@ int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionP
SampleUtil_Print(
"UPnP Initialized\n"
"\tipaddress= %s port = %u\n",
ip_address, port);
"\tipaddress = %s port = %u\n",
ip_address ? ip_address : "{NULL}",
port);
SampleUtil_Print("Registering Control Point");
rc = UpnpRegisterClient(TvCtrlPointCallbackEventHandler,