Line
Link Here
|
0 |
-- a/modules/services_discovery/upnp.cpp |
0 |
++ b/modules/services_discovery/upnp.cpp |
Lines 1700-1718
UpnpInstanceWrapper *UpnpInstanceWrapper::get(vlc_object_t *p_obj, services_disc
Link Here
|
1700 |
return NULL; |
1700 |
return NULL; |
1701 |
} |
1701 |
} |
1702 |
|
1702 |
|
1703 |
#ifdef UPNP_ENABLE_IPV6 |
|
|
1704 |
char* psz_miface = var_InheritString( p_obj, "miface" ); |
1703 |
char* psz_miface = var_InheritString( p_obj, "miface" ); |
1705 |
if (psz_miface == NULL) |
1704 |
if (psz_miface == NULL) |
1706 |
psz_miface = getPreferedAdapter(); |
1705 |
psz_miface = getPreferedAdapter(); |
1707 |
msg_Info( p_obj, "Initializing libupnp on '%s' interface", psz_miface ? psz_miface : "default" ); |
1706 |
msg_Info( p_obj, "Initializing libupnp on '%s' interface", psz_miface ? psz_miface : "default" ); |
1708 |
int i_res = UpnpInit2( psz_miface, 0 ); |
1707 |
int i_res = UpnpInit2( psz_miface, 0 ); |
1709 |
free( psz_miface ); |
1708 |
free( psz_miface ); |
1710 |
#else |
|
|
1711 |
/* If UpnpInit2 isnt available, initialize on first IPv4-capable interface */ |
1712 |
char *psz_hostip = getIpv4ForMulticast(); |
1713 |
int i_res = UpnpInit( psz_hostip, 0 ); |
1714 |
free(psz_hostip); |
1715 |
#endif /* UPNP_ENABLE_IPV6 */ |
1716 |
if( i_res != UPNP_E_SUCCESS ) |
1709 |
if( i_res != UPNP_E_SUCCESS ) |
1717 |
{ |
1710 |
{ |
1718 |
msg_Err( p_obj, "Initialization failed: %s", UpnpGetErrorMessage( i_res ) ); |
1711 |
msg_Err( p_obj, "Initialization failed: %s", UpnpGetErrorMessage( i_res ) ); |