SF Patch Tracker [ 2854711 ] Patch for Solaris10 compilation and usage
Submitted By: zephyrus ( zephyrus00jp )
Patch for Solaris10 compilation and usage.
(cherry picked from commit 5755ac022f
)
This commit is contained in:
parent
30ee3c0cbb
commit
6604d0a974
@ -2,6 +2,12 @@
|
||||
Version 1.8.0
|
||||
*******************************************************************************
|
||||
|
||||
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.
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1317,7 +1317,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) {
|
||||
|
@ -1856,7 +1856,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 ) {
|
||||
@ -1870,8 +1871,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";
|
||||
|
@ -1341,7 +1341,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) {
|
||||
@ -1358,8 +1359,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,
|
||||
|
Loading…
Reference in New Issue
Block a user