httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orlikow...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 proxy_ftp.c
Date Wed, 23 May 2001 15:13:08 GMT
orlikowski    01/05/23 08:13:07

  Modified:    module-2.0 proxy_ftp.c
  Log:
  Change strtok() calls to use apr_strtok().
  
  Revision  Changes    Path
  1.59      +8 -6      httpd-proxy/module-2.0/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- proxy_ftp.c	2001/05/23 03:39:43	1.58
  +++ proxy_ftp.c	2001/05/23 15:13:02	1.59
  @@ -1015,17 +1015,18 @@
   	}
   	else if (i == 229) {
   	    char *pstr;
  +	    char *tok_cntx;
   
   	    pstr = apr_pstrdup(p, buffer);
  -	    pstr = strtok(pstr, " ");	/* separate result code */
  +	    pstr = apr_strtok(pstr, " ", &tok_cntx); /* separate result code */
   	    if (pstr != NULL) {
   		if (*(pstr + strlen(pstr) + 1) == '=') {
   		    pstr += strlen(pstr) + 2;
   		}
   		else {
  -		    pstr = strtok(NULL, "(");  /* separate address & port params */
  +		    pstr = apr_strtok(NULL, "(", &tok_cntx);  /* separate address & port params
*/
   		    if (pstr != NULL)
  -			pstr = strtok(NULL, ")");
  +			pstr = apr_strtok(NULL, ")", &tok_cntx);
   		}
   	    }
   
  @@ -1103,19 +1104,20 @@
   	else if (i == 227) {
   	    unsigned int h0, h1, h2, h3, p0, p1;
   	    char *pstr;
  +	    char *tok_cntx;
   
   /* FIXME: Check PASV against RFC1123 */
   
   	    pstr = apr_pstrdup(p, buffer);
  -	    pstr = strtok(pstr, " ");	/* separate result code */
  +	    pstr = apr_strtok(pstr, " ", &tok_cntx); /* separate result code */
   	    if (pstr != NULL) {
   		if (*(pstr + strlen(pstr) + 1) == '=') {
   		    pstr += strlen(pstr) + 2;
   		}
   		else {
  -		    pstr = strtok(NULL, "(");  /* separate address & port params */
  +		    pstr = apr_strtok(NULL, "(", &tok_cntx);  /* separate address & port params
*/
   		    if (pstr != NULL)
  -			pstr = strtok(NULL, ")");
  +			pstr = apr_strtok(NULL, ")", &tok_cntx);
   		}
   	    }
   
  
  
  

Mime
View raw message