- get_config_int(lookup_config(config_tree, "UPnPDiscoverWait"), &upnp_discover_wait);
- get_config_int(lookup_config(config_tree, "UPnPRefreshPeriod"), &upnp_refresh_period);
+ get_config_int(lookup_config(&config_tree, "UPnPDiscoverWait"), &upnp_discover_wait);
+ get_config_int(lookup_config(&config_tree, "UPnPRefreshPeriod"), &upnp_refresh_period);
+
+#ifdef HAVE_MINGW
+ HANDLE handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)upnp_thread, NULL, 0, NULL);
+
+ if(!handle) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "Unable to start UPnP-IGD client thread");
+ }