Enable loging in tv_device
#include "tv_device.h"
+#include "upnpdebug.h"
+
#include <assert.h>
#define DEFAULT_WEB_DIR "./web"
@@ -1364,7 +1366,9 @@ int TvDeviceStart(char *iface,
int address_family = AF_INET;
ithread_mutex_init(&TVDevMutex, NULL);
-
+ UpnpSetLogFileNames(NULL, NULL);
+ UpnpSetLogLevel(UPNP_ALL);
+ UpnpInitLog();
SampleUtil_Initialize(pfun);
SampleUtil_Print("Initializing UPnP Sdk with\n"
"\tinterface = %s port = %u\n",
@@ -1547,7 +1551,8 @@ int device_main(int argc, char *argv[])
" -m ip_mode -help (this message)\n",
argv[0]);
SampleUtil_Print(
- "\tinterface: interface address of the device"
+ "\tinterface: interface address of the "
+ "device"
" (must match desc. doc)\n"
"\t\te.g.: eth0\n"
"\tport: Port number to use for"
@@ -1567,8 +1572,13 @@ int device_main(int argc, char *argv[])
}
}
port = (unsigned short)portTemp;
- return TvDeviceStart(
- iface, port, desc_doc_name, web_dir_path, ip_mode, linux_print, 0);
+ return TvDeviceStart(iface,
+ port,
+ desc_doc_name,
+ web_dir_path,
+ ip_mode,
+ linux_print,
+ 0);
}
/*! @} Device Sample Module */
