]>
Commit | Line | Data |
---|---|---|
7a05d009 JR |
1 | --- mod_watch-4.3/mod_watch.c.orig 2013-05-05 22:35:43.271485347 +0200 |
2 | +++ mod_watch-4.3/mod_watch.c 2013-05-05 22:36:50.621484860 +0200 | |
3 | @@ -785,8 +785,8 @@ | |
4 | struct watchConfDir *dconf; | |
5 | ||
6 | /* Do not count if the connection is excluded. */ | |
7 | - if (ntIsMember(networkExcludeList, r->connection->remote_addr) | |
8 | - && !ntIsMember(networkIncludeList, r->connection->remote_addr)) | |
9 | + if (ntIsMember(networkExcludeList, r->useragent_addr) | |
10 | + && !ntIsMember(networkIncludeList, r->useragent_addr)) | |
11 | return DECLINED; | |
12 | ||
13 | if (watch_what & (WATCH_OWNER|WATCH_OWNER_BY_PORT)) { | |
14 | @@ -820,12 +820,12 @@ | |
15 | } | |
16 | ||
17 | if (watch_what & WATCH_REMOTE_IP) { | |
18 | - key = apr_psprintf(r->pool, "ip/%s", r->connection->remote_ip); | |
19 | + key = apr_psprintf(r->pool, "ip/%s", r->connection->client_ip); | |
20 | watchPostReadRequestHash(r, "watch-remote-ip", key); | |
21 | } | |
22 | ||
23 | if (watch_what & WATCH_REMOTE_IP_BY_PORT) { | |
24 | - key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->remote_ip, ap_get_server_port(r)); | |
25 | + key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->client_ip, ap_get_server_port(r)); | |
26 | watchPostReadRequestHash(r, "watch-remote-ip-by-port", key); | |
27 | } | |
28 | ||
29 | @@ -939,8 +939,8 @@ | |
30 | } | |
31 | ||
32 | /* Do not count if the connection is excluded. */ | |
33 | - if (ntIsMember(networkExcludeList, r->connection->remote_addr) | |
34 | - && !ntIsMember(networkIncludeList, r->connection->remote_addr)) | |
35 | + if (ntIsMember(networkExcludeList, r->useragent_addr) | |
36 | + && !ntIsMember(networkIncludeList, r->useragent_addr)) | |
37 | return DECLINED; | |
38 | ||
39 | #ifdef WATCH_OUTPUT_VERSION_3 | |
40 | @@ -980,12 +980,12 @@ | |
41 | } | |
42 | ||
43 | if (watch_what & WATCH_REMOTE_IP) { | |
44 | - key = apr_psprintf(r->pool, "ip/%s", r->connection->remote_ip); | |
45 | + key = apr_psprintf(r->pool, "ip/%s", r->connection->client_ip); | |
46 | watchLogHash(r, key, data); | |
47 | } | |
48 | ||
49 | if (watch_what & WATCH_REMOTE_IP_BY_PORT) { | |
50 | - key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->remote_ip, ap_get_server_port(r)); | |
51 | + key = apr_psprintf(r->pool, "ip/%s,%u", r->connection->client_ip, ap_get_server_port(r)); | |
52 | watchLogHash(r, key, data); | |
53 | } | |
54 | ||
55 | @@ -1345,7 +1345,7 @@ | |
56 | watchPreConfig(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) | |
57 | { | |
58 | #if defined(WHEN_APACHE_EXPLAINS_WHAT_TO_DO) && defined(__unix__) | |
59 | - unixd_pre_config(ptemp); | |
60 | + ap_unixd_pre_config(ptemp); | |
61 | #endif | |
62 | watchDocumentsList = apr_array_make(pconf, 0, sizeof *watchDocumentsDef); | |
63 | networkIncludeList = apr_array_make(pconf, 0, sizeof (apr_ipsubnet_t *)); | |
64 | @@ -1401,8 +1401,8 @@ | |
65 | * child processes can R/W to it later when ever they need to flush | |
66 | * or dump shared memory hash table entries to disk. | |
67 | */ | |
68 | - (void) chown(stateDirectory, unixd_config.user_id, unixd_config.group_id); | |
69 | - (void) chown(stateDirectoryIp, unixd_config.user_id, unixd_config.group_id); | |
70 | + (void) chown(stateDirectory, ap_unixd_config.user_id, ap_unixd_config.group_id); | |
71 | + (void) chown(stateDirectoryIp, ap_unixd_config.user_id, ap_unixd_config.group_id); | |
72 | #endif | |
73 | ||
74 | /* Create shared memory hash table. */ | |
75 | @@ -1425,7 +1425,7 @@ | |
76 | watchChildInit(apr_pool_t *p, server_rec *s) | |
77 | { | |
78 | #if defined(WHEN_APACHE_EXPLAINS_WHAT_TO_DO) && defined(__unix__) | |
79 | - unixd_setup_child(); | |
80 | + ap_unixd_setup_child(); | |
81 | #endif | |
82 | shChildInit(shtable, p); | |
83 | } | |
84 | --- mod_watch-4.3/SharedHash.c~ 2013-05-05 22:38:31.131484131 +0200 | |
85 | +++ mod_watch-4.3/SharedHash.c 2013-05-05 22:38:59.641483926 +0200 | |
86 | @@ -159,7 +159,7 @@ | |
87 | (void) fprintf(fp, "\n"); | |
88 | fclose(fp); | |
89 | #if defined(__unix__) | |
90 | - (void) chown(tp->pathname, unixd_config.user_id, unixd_config.group_id); | |
91 | + (void) chown(tp->pathname, ap_unixd_config.user_id, ap_unixd_config.group_id); | |
92 | #endif | |
93 | } | |
94 | } | |
95 | @@ -485,8 +485,8 @@ | |
96 | goto error1; | |
97 | } | |
98 | ||
99 | - shmbuf.shm_perm.uid = unixd_config.user_id; | |
100 | - shmbuf.shm_perm.gid = unixd_config.group_id; | |
101 | + shmbuf.shm_perm.uid = ap_unixd_config.user_id; | |
102 | + shmbuf.shm_perm.gid = ap_unixd_config.group_id; | |
103 | shmbuf.shm_perm.mode = 0600; | |
104 | ||
105 | if (shmctl(theMem->shmid, IPC_SET, &shmbuf) != 0) { | |
106 | @@ -524,7 +524,7 @@ | |
107 | } | |
108 | ||
109 | #if defined(__unix__) | |
110 | - unixd_set_global_mutex_perms((apr_global_mutex_t *) tp->mutex); | |
111 | + ap_unixd_set_global_mutex_perms((apr_global_mutex_t *) tp->mutex); | |
112 | #endif | |
113 | ||
114 | tp->info = (struct shInfo *) MemoryAllocate(tp->memory, sizeof *tp->info); |