]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Change strtok() calls to use apr_strtok().
authorVictor J. Orlikowski <orlikowski@apache.org>
Wed, 23 May 2001 15:13:02 +0000 (15:13 +0000)
committerVictor J. Orlikowski <orlikowski@apache.org>
Wed, 23 May 2001 15:13:02 +0000 (15:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89221 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_ftp.c

index 4ea3374583a7676788e906e9b4e8a1dbf760123a..09c27727421e0100199f255206614444bb81e1c4 100644 (file)
@@ -1015,17 +1015,18 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
        }
        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 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
        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);
                }
            }