summaryrefslogtreecommitdiff
blob: 3cd754674379530ef81e4b1952313baeb6c868a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Author: Niko Tyni <ntyni@iki.fi>
Description: Apache 2.2 compatibility fixes (#393017):
* APR_BRIGADE_FOREACH macro removal
* apr_filename_of_pathname() rename
--- a/src/mod_speedycgi2.c
+++ b/src/mod_speedycgi2.c
@@ -340,7 +340,10 @@
     const char *buf;
     apr_size_t len;
     apr_status_t rv;
-    APR_BRIGADE_FOREACH(e, bb) {
+    for (e = APR_BRIGADE_FIRST(bb);
+        e != APR_BRIGADE_SENTINEL(bb);
+        e  = APR_BUCKET_NEXT(e)) {
+
         if (APR_BUCKET_IS_EOS(e)) {
             break;
         }
@@ -380,7 +383,7 @@
         return DECLINED;
     }
 
-    argv0 = apr_filename_of_pathname(r->filename);
+    argv0 = apr_filepath_name_get(r->filename);
     nph = !(strncmp(argv0, "nph-", 4));
 
     if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
@@ -436,7 +439,7 @@
     if ((rv = default_build_command(&command, &argv, r, p)) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r,
                       "don't know how to spawn child process: %s", 
-                      apr_filename_of_pathname(r->filename));
+                      apr_filepath_name_get(r->filename));
         return HTTP_INTERNAL_SERVER_ERROR;
     }
 
@@ -445,7 +448,7 @@
                             command, argv, r, p)) != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rv, r,
                       "couldn't spawn child process: %s",
-		      apr_filename_of_pathname(r->filename));
+		      apr_filepath_name_get(r->filename));
         return HTTP_INTERNAL_SERVER_ERROR;
     }
 
@@ -465,7 +468,9 @@
             return rv;
         }
 
-        APR_BRIGADE_FOREACH(bucket, bb) {
+        for (bucket = APR_BRIGADE_FIRST(bb);
+            bucket != APR_BRIGADE_SENTINEL(bb);
+            bucket  = APR_BUCKET_NEXT(bucket)) {
             const char *data;
             apr_size_t len;