samples: fix compiler warnings.

(cherry picked from commit 2e96edcbc5d8eb7b3a3479b924de119faaecc77b)
This commit is contained in:
Marcelo Roberto Jimenez 2010-11-18 13:34:04 -02:00
parent 196a99d1c7
commit 838a8fea28
2 changed files with 24 additions and 20 deletions

View File

@ -800,9 +800,9 @@ void TvStateUpdate(char *UDN, int Service, IXML_Document *ChangedVariables,
IXML_NodeList *variables; IXML_NodeList *variables;
IXML_Element *property; IXML_Element *property;
IXML_Element *variable; IXML_Element *variable;
int length; long unsigned int length;
int length1; long unsigned int length1;
int i; long unsigned int i;
int j; int j;
char *tmpstate = NULL; char *tmpstate = NULL;
@ -1126,23 +1126,10 @@ int TvCtrlPointCallbackEventHandler(Upnp_EventType EventType, void *Event, void
Cookie = Cookie; Cookie = Cookie;
} }
/********************************************************************************
* TvCtrlPointVerifyTimeouts
*
* Description:
* Checks the advertisement each device
* in the global device list. If an advertisement expires,
* the device is removed from the list. If an advertisement is about to
* expire, a search request is sent for that device.
*
* Parameters:
* incr -- The increment to subtract from the timeouts each time the
* function is called.
*
********************************************************************************/
void TvCtrlPointVerifyTimeouts(int incr) void TvCtrlPointVerifyTimeouts(int incr)
{ {
struct TvDeviceNode *prevdevnode, *curdevnode; struct TvDeviceNode *prevdevnode;
struct TvDeviceNode *curdevnode;
int ret; int ret;
ithread_mutex_lock(&DeviceListMutex); ithread_mutex_lock(&DeviceListMutex);
@ -1196,7 +1183,7 @@ void *TvCtrlPointTimerLoop(void *args)
int incr = 30; int incr = 30;
while (TvCtrlPointTimerLoopRun) { while (TvCtrlPointTimerLoopRun) {
isleep(incr); isleep((unsigned int)incr);
TvCtrlPointVerifyTimeouts(incr); TvCtrlPointVerifyTimeouts(incr);
} }

View File

@ -32,6 +32,10 @@
#ifndef UPNP_TV_CTRLPT_H #ifndef UPNP_TV_CTRLPT_H
#define UPNP_TV_CTRLPT_H #define UPNP_TV_CTRLPT_H
/*!
* \file
*/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -163,7 +167,20 @@ void TvStateUpdate(
void TvCtrlPointHandleEvent(const char *, int, IXML_Document *); void TvCtrlPointHandleEvent(const char *, int, IXML_Document *);
void TvCtrlPointHandleSubscribeUpdate(const char *, const Upnp_SID, int); void TvCtrlPointHandleSubscribeUpdate(const char *, const Upnp_SID, int);
int TvCtrlPointCallbackEventHandler(Upnp_EventType, void *, void *); int TvCtrlPointCallbackEventHandler(Upnp_EventType, void *, void *);
void TvCtrlPointVerifyTimeouts(int);
/*!
* \brief Checks the advertisement each device in the global device list.
*
* If an advertisement expires, the device is removed from the list.
*
* If an advertisement is about to expire, a search request is sent for that
* device.
*/
void TvCtrlPointVerifyTimeouts(
/*! [in] The increment to subtract from the timeouts each time the
* function is called. */
int incr);
void TvCtrlPointPrintCommands(void); void TvCtrlPointPrintCommands(void);
void* TvCtrlPointCommandLoop(void *); void* TvCtrlPointCommandLoop(void *);
int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionPtr, int combo); int TvCtrlPointStart(print_string printFunctionPtr, state_update updateFunctionPtr, int combo);