From 3a1d147a20bb9780abf4b776066d3ef66463b337 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Wed, 15 Jan 2003 01:05:24 +0000 Subject: Backport mrl parsing fix. CVS patchset: 3924 CVS date: 2003/01/15 01:05:24 --- src/input/mms.c | 14 +++++++++++--- src/input/mmsh.c | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/input/mms.c b/src/input/mms.c index 5a9a341ca..55c02595e 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.17 2002/12/22 00:35:04 komadori Exp $ + * $Id: mms.c,v 1.18 2003/01/15 01:05:24 tmattern Exp $ * * based on work from major mms * utility functions to handle communication with an mms server @@ -714,12 +714,20 @@ char* mms_connect_common(int *s, int *port, char *url, char **host, char **path, printf ("libmms: extracting host name \n"); #endif hostend = strchr(_host, '/'); +/* if ((!hostend) || (strlen(hostend) <= 1)) { printf ("libmms: invalid url >%s<, failed to find hostend\n", url); return NULL; } - - *hostend++ = '\0'; +*/ + if (!hostend) { +#ifdef LOG + printf ("libmms: no trailing /\n"); +#endif + hostend = _host + strlen(_host); + } else { + *hostend++ = '\0'; + } /* Is port specified ? */ forport = strchr(_host, ':'); diff --git a/src/input/mmsh.c b/src/input/mmsh.c index 5ae797ec5..fc9c30bf6 100644 --- a/src/input/mmsh.c +++ b/src/input/mmsh.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mmsh.c,v 1.5 2003/01/15 00:53:40 tmattern Exp $ + * $Id: mmsh.c,v 1.6 2003/01/15 01:05:24 tmattern Exp $ * * based on mms.c and specs from avifile * (http://avifile.sourceforge.net/asf-1.0.htm) @@ -733,7 +733,9 @@ char* mmsh_connect_common(int *s, int *port, char *url, char **host, char **path } */ if (!hostend) { +#ifdef LOG printf ("libmmsh: no trailing /\n"); +#endif hostend = _host + strlen(_host); } else { *hostend++ = '\0'; -- cgit v1.2.3