Add error handling.

(cherry picked from commit 47c86542bc)
This commit is contained in:
Yoichi NAKAYAMA
2012-03-04 13:38:13 +09:00
committed by Marcelo Roberto Jimenez
parent 07489c1155
commit 4f84435528
2 changed files with 14 additions and 1 deletions

View File

@@ -46,7 +46,11 @@ int main(int argc, char *argv[])
#endif
int code;
device_main(argc, argv);
rc = device_main(argc, argv);
if (rc != UPNP_E_SUCCESS) {
return rc;
}
/* start a command loop thread */
code = ithread_create(&cmdloop_thread, NULL, TvDeviceCommandLoop, NULL);
#ifdef WIN32