X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fservice%2Fservice.cpp;h=77bfda99517d31eeddba4e35d43216ff30b5d3c8;hb=dba8122997839f5084ebb20594f28ac9ceff207a;hp=11cf95b86a4a8ecaf7d4d5f31b9d422ee150d29e;hpb=377c2adbf11ed3b293bced1a4195cefd8aa6110f;p=vuplus_dvbapp diff --git a/lib/service/service.cpp b/lib/service/service.cpp old mode 100644 new mode 100755 index 11cf95b..77bfda9 --- a/lib/service/service.cpp +++ b/lib/service/service.cpp @@ -65,11 +65,18 @@ eServiceReference::eServiceReference(const std::string &string) if ( sscanf(c, "%d:%d:%x:%x:%x:%x:%n", &type, &flags, &data[0], &data[1], &data[2], &data[3], &pathl) < 2 ) type = idInvalid; } - if (pathl) { const char *pathstr = c+pathl; - const char *namestr = strchr(pathstr, ':'); + const char *namestr = NULL; + int found = strlen(pathstr)-1; + for(;found >= 0;found--) + { + if(pathstr[found] == ':') + break; + } + if (found != -1) + namestr = pathstr + found; if (namestr) { if (!strncmp(namestr, "://", 3)) // The path is a url (e.g. "http://...")