diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp index a249e3b4d265075c16e872120c0ddb20566d117d..a2c4e7abc8bc2329f6363b3955ddd8a11507b3b7 100644 --- a/modules/services_discovery/upnp.cpp +++ b/modules/services_discovery/upnp.cpp @@ -658,7 +658,7 @@ MediaServerList::parseSatipServer( IXML_Element* p_device_element, const char *p vlc_UrlParse( &url, psz_base_url ); /* Part 1: a user may have provided a custom playlist url */ - if (strncmp(psz_satip_channellist, "CustomList", 10) == 0) { + if (strcmp(psz_satip_channellist, "CustomList") == 0) { char *psz_satip_playlist_url = config_GetPsz( "satip-channellist-url" ); if ( psz_satip_playlist_url ) { p_server = new(std::nothrow) SD::MediaServerDesc( psz_udn, psz_friendly_name, psz_satip_playlist_url, iconUrl ); @@ -681,8 +681,8 @@ MediaServerList::parseSatipServer( IXML_Element* p_device_element, const char *p /* Part 2: device playlist * In Automatic mode, or if requested by the user, check for a SAT>IP m3u list on the device */ - if (strncmp(psz_satip_channellist, "ServerList", 10) == 0 || - strncmp(psz_satip_channellist, "Auto", strlen ("Auto")) == 0 ) { + if (strcmp(psz_satip_channellist, "ServerList") == 0 || + strcmp(psz_satip_channellist, "Auto") == 0 ) { const char* psz_m3u_url = xml_getChildElementValue( p_device_element, "satip:X_SATIPM3U" ); if ( psz_m3u_url ) { if ( strncmp( "http", psz_m3u_url, 4) ) @@ -712,7 +712,7 @@ MediaServerList::parseSatipServer( IXML_Element* p_device_element, const char *p msg_Dbg( m_sd, "SAT>IP server '%s' did not provide a playlist", url.psz_host); } - if(strncmp(psz_satip_channellist, "ServerList", 10) == 0) { + if(strcmp(psz_satip_channellist, "ServerList") == 0) { /* to comply with the SAT>IP specifications, we don't fallback on another channel list if this path failed, * but in Automatic mode, we continue */ free(psz_satip_channellist); @@ -727,7 +727,7 @@ MediaServerList::parseSatipServer( IXML_Element* p_device_element, const char *p * MasterList is a list of usual Satellites */ /* In Auto mode, default to MasterList list from satip.info */ - if( strncmp(psz_satip_channellist, "Auto", strlen ("Auto")) == 0 ) { + if( strcmp(psz_satip_channellist, "Auto") == 0 ) { free(psz_satip_channellist); psz_satip_channellist = strdup( "MasterList" ); } @@ -909,13 +909,13 @@ namespace psz_album_artist = xml_getChildElementValue( itemElement, "upnp:albumArtist" ); psz_albumArt = xml_getChildElementValue( itemElement, "upnp:albumArtURI" ); const char *psz_media_type = xml_getChildElementValue( itemElement, "upnp:class" ); - if (strncmp(psz_media_type, "object.item.videoItem", 21) == 0) + if (strcmp(psz_media_type, "object.item.videoItem") == 0) media_type = VIDEO; - else if (strncmp(psz_media_type, "object.item.audioItem", 21) == 0) + else if (strcmp(psz_media_type, "object.item.audioItem") == 0) media_type = AUDIO; - else if (strncmp(psz_media_type, "object.item.imageItem", 21) == 0) + else if (strcmp(psz_media_type, "object.item.imageItem") == 0) media_type = IMAGE; - else if (strncmp(psz_media_type, "object.container", 16 ) == 0) + else if (strcmp(psz_media_type, "object.container") == 0) media_type = CONTAINER; else return false;