1.1 --- a/gmyth/src/gmyth_upnp.c Thu Jan 04 21:16:44 2007 +0000
1.2 +++ b/gmyth/src/gmyth_upnp.c Fri Jan 05 15:06:09 2007 +0000
1.3 @@ -27,6 +27,10 @@
1.4 *
1.5 */
1.6
1.7 +#ifdef HAVE_CONFIG_H
1.8 +#include "config.h"
1.9 +#endif
1.10 +
1.11 #include "gmyth_upnp.h"
1.12
1.13 #include <arpa/inet.h>
1.14 @@ -253,7 +257,8 @@
1.15 devName = cg_upnp_device_getfriendlyname(childDev);
1.16 dev_url = cg_upnp_device_getlocationfromssdppacket( childDev );
1.17 gmyth_debug( "Device's friendly name = %s, and device's URL = %s\n", devName, dev_url );
1.18 - if ( upnp_dev_found = ( g_strstr_len( devName, strlen( devName ), mythtvFriendlyName ) != NULL ) ) {
1.19 + if ( ( upnp_dev_found = ( g_strstr_len( devName, strlen( devName ), mythtvFriendlyName ) != NULL ) ) == TRUE )
1.20 + {
1.21 *udn = cg_upnp_device_getudn( childDev );
1.22 *mythtv_servers_lst = g_list_append( *mythtv_servers_lst, dev_url );
1.23 }
1.24 @@ -301,7 +306,7 @@
1.25 if ( NULL == gmyth_upnp || gmyth_upnp->port <= 0 )
1.26 {
1.27 gmyth_debug ("[%s] GMythUPnP host field not initialized\n", __FUNCTION__);
1.28 - return NULL;
1.29 + return 0;
1.30 }
1.31
1.32 return gmyth_upnp->port;