-rw-r--r-- | core/multimedia/opieplayer/libmad/libmadplugin.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/libmad/libmadplugin.cpp b/core/multimedia/opieplayer/libmad/libmadplugin.cpp index 4665408..7978805 100644 --- a/core/multimedia/opieplayer/libmad/libmadplugin.cpp +++ b/core/multimedia/opieplayer/libmad/libmadplugin.cpp | |||
@@ -239,34 +239,37 @@ int LibMadPlugin::http_read_line(int tcp_sock, char *buf, int size) { | |||
239 | int LibMadPlugin::http_open(const QString& path ) { | 239 | int LibMadPlugin::http_open(const QString& path ) { |
240 | qDebug("Open http"); | 240 | qDebug("Open http"); |
241 | char *host; | 241 | char *host; |
242 | int port; | 242 | int port; |
243 | char *request; | 243 | char *request; |
244 | int tcp_sock; | 244 | int tcp_sock; |
245 | char http_request[PATH_MAX]; | 245 | char http_request[PATH_MAX]; |
246 | char filename[PATH_MAX]; | 246 | char filename[PATH_MAX]; |
247 | char c; | 247 | // char c; |
248 | char *arg =strdup(path.latin1()); | 248 | char *arg =strdup(path.latin1()); |
249 | 249 | ||
250 | QString errorMsg; | 250 | QString errorMsg; |
251 | 251 | ||
252 | /* Check for URL syntax */ | 252 | /* Check for URL syntax */ |
253 | // if (strncmp(arg, "http://", strlen("http://"))) { | 253 | // if (strncmp(arg, "http://", strlen("http://"))) { |
254 | // qDebug("Url syntax error"); | 254 | // qDebug("Url syntax error"); |
255 | // return (0); | 255 | // return (0); |
256 | // } | 256 | // } |
257 | 257 | ||
258 | qDebug("Parse URL"); | 258 | qDebug("Parse URL"); |
259 | port = 80; | 259 | port = 80; |
260 | host = arg + strlen("http://"); | 260 | host = arg + strlen("http://"); |
261 | if ((request = strchr(host, '/')) == NULL) { | 261 | |
262 | qDebug("Url syntax 2error %s", host); | 262 | // we need to think of something better than that |
263 | return (0); | 263 | //if ((request = strchr(host, '/')) == NULL) { |
264 | } | 264 | // qDebug("Url syntax 2error %s", host); |
265 | // return (0); | ||
266 | // } | ||
267 | |||
265 | *request++ = 0; | 268 | *request++ = 0; |
266 | 269 | ||
267 | if (strchr(host, ':') != NULL) /* port is specified */ | 270 | if (strchr(host, ':') != NULL) /* port is specified */ |
268 | { | 271 | { |
269 | port = atoi(strchr(host, ':') + 1); | 272 | port = atoi(strchr(host, ':') + 1); |
270 | *strchr(host, ':') = 0; | 273 | *strchr(host, ':') = 0; |
271 | } | 274 | } |
272 | 275 | ||