summaryrefslogtreecommitdiff
path: root/src/input/input_net.c
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-05-05 20:20:10 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2002-05-05 20:20:10 +0000
commit259a762d997a3fc55839d291ead7858784f7931f (patch)
tree18512578d8588ea0743c3c4cbc70b564e960dcc9 /src/input/input_net.c
parent55458a1d4e415713a605c1f0e863e7b22c195422 (diff)
downloadxine-lib-259a762d997a3fc55839d291ead7858784f7931f.tar.gz
xine-lib-259a762d997a3fc55839d291ead7858784f7931f.tar.bz2
Fixed mrl checking (mrl:// wasn't respected).
CVS patchset: 1853 CVS date: 2002/05/05 20:20:10
Diffstat (limited to 'src/input/input_net.c')
-rw-r--r--src/input/input_net.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 6fa8a04f0..cd6c76262 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -60,12 +60,12 @@ extern int errno;
#ifdef __GNUC__
#define LOG_MSG(xine, message, args...) { \
- xine_log(xine, XINE_LOG_MSG, message, ##args); \
+ xine_log(xine, XINE_LOG_MSG, message, ##args); \
printf(message, ##args); \
}
#else
#define LOG_MSG(xine, ...) { \
- xine_log(xine, XINE_LOG_MSG, __VA_ARGS__); \
+ xine_log(xine, XINE_LOG_MSG, __VA_ARGS__); \
printf(__VA_ARGS__); \
}
#endif
@@ -147,18 +147,20 @@ static int net_plugin_open (input_plugin_t *this_gen, char *mrl) {
this->mrl = strdup(mrl); /* FIXME: small memory leak */
- if (!strncasecmp (mrl, "tcp:",4))
- filename = (char *) &this->mrl[4];
+ if (!strncasecmp (mrl, "tcp://", 6)) {
+ filename = (char *) &this->mrl[6];
+
+ if((!filename) || (strlen(filename) == 0))
+ return 0;
+
+ }
else
return 0;
- if(strncmp(filename, "//", 2)==0)
- filename+=2;
-
pptr=strrchr(filename, ':');
if(pptr) {
- *pptr++=0;
- sscanf(pptr,"%d", &port);
+ *pptr++ = 0;
+ sscanf(pptr,"%d", &port);
}
this->fh = host_connect(filename, port, this->xine);