~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to jk/native/common/jk_uri_worker_map.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  Copyright 1999-2004 The Apache Software Foundation
3
 
 *
4
 
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
 
 *  you may not use this file except in compliance with the License.
6
 
 *  You may obtain a copy of the License at
7
 
 *
8
 
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 
 *
10
 
 *  Unless required by applicable law or agreed to in writing, software
11
 
 *  distributed under the License is distributed on an "AS IS" BASIS,
12
 
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 
 *  See the License for the specific language governing permissions and
14
 
 *  limitations under the License.
15
 
 */
16
 
 
17
 
/***************************************************************************
18
 
 * Description: URI to worker map object.                                  *
19
 
 *                                                                         *
20
 
 * Author:      Gal Shachor <shachor@il.ibm.com>                           *
21
 
 * Author:      Mladen Turk <mturk@apache.org>                             *
22
 
 * Version:     $Revision: 1.56 $                                          *
23
 
 ***************************************************************************/
24
 
 
25
 
#include "jk_pool.h"
26
 
#include "jk_util.h"
27
 
#include "jk_map.h"
28
 
#include "jk_mt.h"
29
 
#include "jk_uri_worker_map.h"
30
 
 
31
 
#ifdef WIN32
32
 
#define JK_STRCMP   strcasecmp
33
 
#define JK_STRNCMP  strnicmp
34
 
#else
35
 
#define JK_STRCMP   strcmp
36
 
#define JK_STRNCMP  strncmp
37
 
#endif
38
 
 
39
 
static int worker_compare(const void *elem1, const void *elem2)
40
 
{
41
 
    uri_worker_record_t *e1 = *(uri_worker_record_t **)elem1;
42
 
    uri_worker_record_t *e2 = *(uri_worker_record_t **)elem2;
43
 
    return ((int)e2->context_len - (int)e1->context_len);
44
 
}
45
 
 
46
 
static void worker_qsort(jk_uri_worker_map_t *uw_map)
47
 
{
48
 
 
49
 
   /* Sort remaining args using Quicksort algorithm: */
50
 
   qsort((void *)uw_map->maps, uw_map->size,
51
 
         sizeof(uri_worker_record_t *), worker_compare );
52
 
 
53
 
}
54
 
 
55
 
/* Match = 0, NoMatch = 1, Abort = -1
56
 
 * Based loosely on sections of wildmat.c by Rich Salz
57
 
 */
58
 
static int wildchar_match(const char *str, const char *exp, int icase)
59
 
{
60
 
    int x, y;
61
 
 
62
 
    for (x = 0, y = 0; exp[y]; ++y, ++x) {
63
 
        if (!str[x] && exp[y] != '*')
64
 
            return -1;
65
 
        if (exp[y] == '*') {
66
 
            while (exp[++y] == '*');
67
 
            if (!exp[y])
68
 
                return 0;
69
 
            while (str[x]) {
70
 
                int ret;
71
 
                if ((ret = wildchar_match(&str[x++], &exp[y], icase)) != 1)
72
 
                    return ret;
73
 
            }
74
 
            return -1;
75
 
        }
76
 
        else if (exp[y] != '?') {
77
 
            if (icase && (tolower(str[x]) != tolower(exp[y])))
78
 
                return 1;
79
 
            else if (!icase && str[x] != exp[y])
80
 
                return 1;
81
 
        }
82
 
    }
83
 
    return (str[x] != '\0');
84
 
}
85
 
 
86
 
int uri_worker_map_alloc(jk_uri_worker_map_t **uw_map,
87
 
                         jk_map_t *init_data, jk_logger_t *l)
88
 
{
89
 
    JK_TRACE_ENTER(l);
90
 
 
91
 
    if (uw_map) {
92
 
        int rc;
93
 
        *uw_map = (jk_uri_worker_map_t *)calloc(1, sizeof(jk_uri_worker_map_t));
94
 
 
95
 
        JK_INIT_CS(&((*uw_map)->cs), rc);
96
 
        if (rc == JK_FALSE) {
97
 
            jk_log(l, JK_LOG_ERROR,
98
 
                   "creating thread lock errno=%d",
99
 
                   errno);
100
 
            JK_TRACE_EXIT(l);
101
 
            return JK_FALSE;
102
 
        }
103
 
        if (init_data)
104
 
            rc = uri_worker_map_open(*uw_map, init_data, l);
105
 
        JK_TRACE_EXIT(l);
106
 
        return rc;
107
 
    }
108
 
 
109
 
    JK_LOG_NULL_PARAMS(l);
110
 
    JK_TRACE_EXIT(l);
111
 
 
112
 
    return JK_FALSE;
113
 
}
114
 
 
115
 
static int uri_worker_map_close(jk_uri_worker_map_t *uw_map, jk_logger_t *l)
116
 
{
117
 
    JK_TRACE_ENTER(l);
118
 
 
119
 
    if (uw_map) {
120
 
        int i;
121
 
        JK_DELETE_CS(&(uw_map->cs), i);
122
 
        jk_close_pool(&uw_map->p);
123
 
        JK_TRACE_EXIT(l);
124
 
        return JK_TRUE;
125
 
    }
126
 
 
127
 
    JK_LOG_NULL_PARAMS(l);
128
 
    JK_TRACE_EXIT(l);
129
 
    return JK_FALSE;
130
 
}
131
 
 
132
 
int uri_worker_map_free(jk_uri_worker_map_t **uw_map, jk_logger_t *l)
133
 
{
134
 
    JK_TRACE_ENTER(l);
135
 
 
136
 
    if (uw_map && *uw_map) {
137
 
        uri_worker_map_close(*uw_map, l);
138
 
        free(*uw_map);
139
 
        *uw_map = NULL;
140
 
        JK_TRACE_EXIT(l);
141
 
        return JK_TRUE;
142
 
    }
143
 
    else
144
 
        JK_LOG_NULL_PARAMS(l);
145
 
 
146
 
    JK_TRACE_EXIT(l);
147
 
    return JK_FALSE;
148
 
}
149
 
 
150
 
/*
151
 
 * Ensure there will be memory in context info to store Context Bases
152
 
 */
153
 
 
154
 
#define UW_INC_SIZE 4           /* 4 URI->WORKER STEP */
155
 
 
156
 
static int uri_worker_map_realloc(jk_uri_worker_map_t *uw_map)
157
 
{
158
 
    if (uw_map->size == uw_map->capacity) {
159
 
        uri_worker_record_t **uwr;
160
 
        int capacity = uw_map->capacity + UW_INC_SIZE;
161
 
 
162
 
        uwr =
163
 
            (uri_worker_record_t **) jk_pool_alloc(&uw_map->p,
164
 
                                                   sizeof(uri_worker_record_t
165
 
                                                          *) * capacity);
166
 
 
167
 
        if (!uwr)
168
 
            return JK_FALSE;
169
 
 
170
 
        if (uw_map->capacity && uw_map->maps)
171
 
            memcpy(uwr, uw_map->maps,
172
 
                   sizeof(uri_worker_record_t *) * uw_map->capacity);
173
 
 
174
 
        uw_map->maps = uwr;
175
 
        uw_map->capacity = capacity;
176
 
    }
177
 
 
178
 
    return JK_TRUE;
179
 
}
180
 
 
181
 
 
182
 
int uri_worker_map_add(jk_uri_worker_map_t *uw_map,
183
 
                       const char *puri, const char *worker, jk_logger_t *l)
184
 
{
185
 
    uri_worker_record_t *uwr = NULL;
186
 
    char *uri;
187
 
    unsigned int match_type = 0;
188
 
    unsigned int i;
189
 
 
190
 
    JK_TRACE_ENTER(l);
191
 
 
192
 
    if (*puri == '-') {
193
 
        /* Disable urimap.
194
 
         * This way you can disable already mounted
195
 
         * context.
196
 
         */
197
 
        match_type = MATCH_TYPE_DISABLED;
198
 
        puri++;
199
 
    }
200
 
    if (*puri == '!') {
201
 
        match_type |= MATCH_TYPE_NO_MATCH;
202
 
        puri++;
203
 
    }
204
 
 
205
 
    /* Find if duplicate entry */
206
 
    for (i = 0; i < uw_map->size; i++) {
207
 
        uwr = uw_map->maps[i];
208
 
        if (strcmp(uwr->uri, puri) == 0) {
209
 
            /* Update disabled flag */
210
 
            if (match_type & MATCH_TYPE_DISABLED)
211
 
                uwr->match_type |= MATCH_TYPE_DISABLED;
212
 
            else
213
 
                uwr->match_type &= ~MATCH_TYPE_DISABLED;
214
 
            if (strcmp(uwr->worker_name, worker) == 0) {
215
 
                jk_log(l, JK_LOG_DEBUG,
216
 
                       "map rule %s=%s already exists",
217
 
                       puri, worker);
218
 
                JK_TRACE_EXIT(l);
219
 
                return JK_TRUE;
220
 
            }
221
 
            else {
222
 
                jk_log(l, JK_LOG_DEBUG,
223
 
                       "changing map rule %s=%s ",
224
 
                       puri, worker);
225
 
                uwr->worker_name = jk_pool_strdup(&uw_map->p, worker);
226
 
                JK_TRACE_EXIT(l);
227
 
                return JK_TRUE;
228
 
            }
229
 
        }
230
 
    }
231
 
    if (uri_worker_map_realloc(uw_map) == JK_FALSE) {
232
 
        JK_TRACE_EXIT(l);
233
 
        return JK_FALSE;
234
 
    }
235
 
    uwr = (uri_worker_record_t *)jk_pool_alloc(&uw_map->p,
236
 
                                    sizeof(uri_worker_record_t));
237
 
    if (!uwr) {
238
 
        jk_log(l, JK_LOG_ERROR,
239
 
               "can't alloc map entry");
240
 
        JK_TRACE_EXIT(l);
241
 
        return JK_FALSE;
242
 
    }
243
 
 
244
 
    uri = jk_pool_strdup(&uw_map->p, puri);
245
 
    if (!uri || !worker) {
246
 
        jk_log(l, JK_LOG_ERROR,
247
 
               "can't alloc uri/worker strings");
248
 
        JK_TRACE_EXIT(l);
249
 
        return JK_FALSE;
250
 
    }
251
 
 
252
 
    if (*uri == '/') {
253
 
        if (strchr(uri, '*') ||
254
 
            strchr(uri, '?')) {
255
 
            /* Something like
256
 
             * /context/ * /user/ *
257
 
             * /context/ *.suffix
258
 
             */
259
 
            match_type |= MATCH_TYPE_WILDCHAR_PATH;
260
 
            jk_log(l, JK_LOG_DEBUG,
261
 
                    "wildchar rule %s=%s was added",
262
 
                    uri, worker);
263
 
 
264
 
        }
265
 
        else {
266
 
            /* Something like:  JkMount /login/j_security_check ajp13 */
267
 
            match_type |= MATCH_TYPE_EXACT;
268
 
            jk_log(l, JK_LOG_DEBUG,
269
 
                   "exact rule %s=%s was added",
270
 
                   uri, worker);
271
 
        }
272
 
        uwr->uri = uri;
273
 
        uwr->context = uri;
274
 
        uwr->worker_name = jk_pool_strdup(&uw_map->p, worker);
275
 
        uwr->context_len = strlen(uwr->context);
276
 
    }
277
 
    else {
278
 
        /*
279
 
         * JFC: please check...
280
 
         * Not sure what to do, but I try to prevent problems.
281
 
         * I have fixed jk_mount_context() in apaches/mod_jk.c so we should
282
 
         * not arrive here when using Apache.
283
 
         */
284
 
        jk_log(l, JK_LOG_ERROR,
285
 
               "invalid context %s",
286
 
               uri);
287
 
        JK_TRACE_EXIT(l);
288
 
        return JK_FALSE;
289
 
    }
290
 
    uwr->match_type = match_type;
291
 
    uw_map->maps[uw_map->size] = uwr;
292
 
    uw_map->size++;
293
 
    if (match_type & MATCH_TYPE_NO_MATCH) {
294
 
        /* If we split the mappings this one will be calculated */
295
 
        uw_map->nosize++;
296
 
    }
297
 
    worker_qsort(uw_map);
298
 
    JK_TRACE_EXIT(l);
299
 
    return JK_TRUE;
300
 
}
301
 
 
302
 
int uri_worker_map_open(jk_uri_worker_map_t *uw_map,
303
 
                        jk_map_t *init_data, jk_logger_t *l)
304
 
{
305
 
    int rc = JK_TRUE;
306
 
 
307
 
    JK_TRACE_ENTER(l);
308
 
 
309
 
    uw_map->size = 0;
310
 
    uw_map->capacity = 0;
311
 
 
312
 
    if (uw_map) {
313
 
        int sz;
314
 
 
315
 
        rc = JK_TRUE;
316
 
        jk_open_pool(&uw_map->p,
317
 
                     uw_map->buf, sizeof(jk_pool_atom_t) * SMALL_POOL_SIZE);
318
 
        uw_map->size = 0;
319
 
        uw_map->maps = NULL;
320
 
 
321
 
        sz = jk_map_size(init_data);
322
 
 
323
 
        jk_log(l, JK_LOG_DEBUG,
324
 
               "rule map size is %d",
325
 
               sz);
326
 
 
327
 
        if (sz > 0) {
328
 
            int i;
329
 
            for (i = 0; i < sz; i++) {
330
 
                if (uri_worker_map_add
331
 
                    (uw_map, jk_map_name_at(init_data, i),
332
 
                     jk_map_value_at(init_data, i), l) == JK_FALSE) {
333
 
                    rc = JK_FALSE;
334
 
                    break;
335
 
                }
336
 
            }
337
 
 
338
 
            if (i == sz) {
339
 
                if (JK_IS_DEBUG_LEVEL(l))
340
 
                    jk_log(l, JK_LOG_DEBUG,
341
 
                           "there are %d rules",
342
 
                           uw_map->size);
343
 
            }
344
 
            else {
345
 
                jk_log(l, JK_LOG_ERROR,
346
 
                       "Parsing error");
347
 
                rc = JK_FALSE;
348
 
            }
349
 
        }
350
 
 
351
 
        if (rc == JK_FALSE) {
352
 
            jk_log(l, JK_LOG_ERROR,
353
 
                   "there was an error, freing buf");
354
 
            jk_close_pool(&uw_map->p);
355
 
        }
356
 
    }
357
 
 
358
 
    JK_TRACE_EXIT(l);
359
 
    return rc;
360
 
}
361
 
 
362
 
static int is_nomap_match(jk_uri_worker_map_t *uw_map,
363
 
                          const char *uri, const char* worker,
364
 
                          jk_logger_t *l)
365
 
{
366
 
    unsigned int i;
367
 
 
368
 
    JK_TRACE_ENTER(l);
369
 
 
370
 
    for (i = 0; i < uw_map->size; i++) {
371
 
        uri_worker_record_t *uwr = uw_map->maps[i];
372
 
 
373
 
        /* Check only nomatch mappings */
374
 
        if (!(uwr->match_type & MATCH_TYPE_NO_MATCH) ||
375
 
            (uwr->match_type & MATCH_TYPE_DISABLED))
376
 
            continue;
377
 
        /* Check only mathing workers */
378
 
        if (strcmp(uwr->worker_name, worker))
379
 
            continue;
380
 
        if (uwr->match_type & MATCH_TYPE_WILDCHAR_PATH) {
381
 
            /* Map is already sorted by context_len */
382
 
            if (wildchar_match(uri, uwr->context,
383
 
#ifdef WIN32
384
 
                               1
385
 
#else
386
 
                               0
387
 
#endif
388
 
                               ) == 0) {
389
 
                    jk_log(l, JK_LOG_DEBUG,
390
 
                           "Found a no match %s -> %s",
391
 
                           uwr->worker_name, uwr->context);
392
 
                    JK_TRACE_EXIT(l);
393
 
                    return JK_TRUE;
394
 
             }
395
 
        }
396
 
        else if (JK_STRNCMP(uwr->context, uri, uwr->context_len) == 0) {
397
 
            if (strlen(uri) == uwr->context_len) {
398
 
                if (JK_IS_DEBUG_LEVEL(l))
399
 
                    jk_log(l, JK_LOG_DEBUG,
400
 
                            "Found an exact no match %s -> %s",
401
 
                            uwr->worker_name, uwr->context);
402
 
                JK_TRACE_EXIT(l);
403
 
                return JK_TRUE;
404
 
            }
405
 
        }
406
 
    }
407
 
 
408
 
    JK_TRACE_EXIT(l);
409
 
    return JK_FALSE;
410
 
}
411
 
 
412
 
 
413
 
const char *map_uri_to_worker(jk_uri_worker_map_t *uw_map,
414
 
                              const char *uri, jk_logger_t *l)
415
 
{
416
 
    unsigned int i;
417
 
    char *url_rewrite;
418
 
    const char *rv = NULL;
419
 
    const char *url = uri;
420
 
    char  buf[JK_MAX_URI_LEN+1];
421
 
 
422
 
    JK_TRACE_ENTER(l);
423
 
    if (!uw_map || !uri) {
424
 
        JK_LOG_NULL_PARAMS(l);
425
 
        JK_TRACE_EXIT(l);
426
 
        return NULL;
427
 
    }
428
 
    if (*uri != '/') {
429
 
        jk_log(l, JK_LOG_WARNING,
430
 
                "Uri %s is invalid. Uri must start with /", uri);
431
 
        JK_TRACE_EXIT(l);
432
 
        return NULL;
433
 
    }
434
 
    url_rewrite = strstr(uri, JK_PATH_SESSION_IDENTIFIER);
435
 
    if (url_rewrite) {
436
 
        size_t len = url_rewrite - uri;
437
 
        if (len > JK_MAX_URI_LEN)
438
 
            len = JK_MAX_URI_LEN;
439
 
        strncpy(buf, uri, len);
440
 
        buf[len] = '\0';
441
 
        url = &buf[0];
442
 
        if (JK_IS_DEBUG_LEVEL(l))
443
 
            jk_log(l, JK_LOG_DEBUG, "Removing Session path '%s' URI '%s'",
444
 
                   url_rewrite, url);
445
 
    }
446
 
    if (uw_map->fname)
447
 
        uri_worker_map_update(uw_map, l);
448
 
    if (JK_IS_DEBUG_LEVEL(l))
449
 
        jk_log(l, JK_LOG_DEBUG, "Attempting to map URI '%s' from %d maps",
450
 
               uri, uw_map->size);
451
 
 
452
 
    for (i = 0; i < uw_map->size; i++) {
453
 
        uri_worker_record_t *uwr = uw_map->maps[i];
454
 
 
455
 
        /* Check for match types */
456
 
        if ((uwr->match_type & MATCH_TYPE_DISABLED) ||
457
 
            (uwr->match_type & MATCH_TYPE_NO_MATCH))
458
 
            continue;
459
 
 
460
 
        if (JK_IS_DEBUG_LEVEL(l))
461
 
            jk_log(l, JK_LOG_DEBUG, "Attempting to map context URI '%s'", uwr->uri);
462
 
 
463
 
        if (uwr->match_type & MATCH_TYPE_WILDCHAR_PATH) {
464
 
            const char *wname;
465
 
            /* Map is already sorted by context_len */
466
 
            if (wildchar_match(url, uwr->context,
467
 
#ifdef WIN32
468
 
                               1
469
 
#else
470
 
                               0
471
 
#endif
472
 
                               ) == 0) {
473
 
                    wname = uwr->worker_name;
474
 
                    if (JK_IS_DEBUG_LEVEL(l))
475
 
                        jk_log(l, JK_LOG_DEBUG,
476
 
                               "Found a wildchar match %s -> %s",
477
 
                               uwr->worker_name, uwr->context);
478
 
                    JK_TRACE_EXIT(l);
479
 
                    rv = wname;
480
 
                    goto cleanup;
481
 
             }
482
 
        }
483
 
        else if (JK_STRNCMP(uwr->context, url, uwr->context_len) == 0) {
484
 
            if (strlen(url) == uwr->context_len) {
485
 
                if (JK_IS_DEBUG_LEVEL(l))
486
 
                    jk_log(l, JK_LOG_DEBUG,
487
 
                           "Found an exact match %s -> %s",
488
 
                           uwr->worker_name, uwr->context);
489
 
                JK_TRACE_EXIT(l);
490
 
                rv = uwr->worker_name;
491
 
                goto cleanup;
492
 
            }
493
 
        }
494
 
    }
495
 
    /* No matches found */
496
 
    JK_TRACE_EXIT(l);
497
 
 
498
 
cleanup:
499
 
    if (rv && uw_map->nosize) {
500
 
        if (is_nomap_match(uw_map, url, rv, l)) {
501
 
            if (JK_IS_DEBUG_LEVEL(l))
502
 
                jk_log(l, JK_LOG_DEBUG,
503
 
                       "Denying matching for worker %s by nomatch rule",
504
 
                       rv);
505
 
            rv = NULL;
506
 
        }
507
 
    }
508
 
    return rv;
509
 
}
510
 
 
511
 
int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
512
 
                        jk_logger_t *l)
513
 
{
514
 
    int rc = JK_FALSE;
515
 
    jk_map_t *map;
516
 
 
517
 
    jk_map_alloc(&map);
518
 
    if (jk_map_read_properties(map, uw_map->fname,
519
 
                               &uw_map->modified)) {
520
 
        int i;
521
 
        for (i = 0; i < jk_map_size(map); i++) {
522
 
            const char *u = jk_map_name_at(map, i);
523
 
            const char *w = jk_map_value_at(map, i);
524
 
            /* Multiple mappings like :
525
 
             * /servlets-examples|/ *
526
 
             * will create two mappings:
527
 
             * /servlets-examples
528
 
             * and:
529
 
             * /servlets-examples/ *
530
 
             */
531
 
            if (strchr(u, '|')) {
532
 
                char *s, *r = strdup(u);
533
 
                s = strchr(r, '|');
534
 
                *(s++) = '\0';
535
 
                /* Add first mapping */
536
 
                if (!uri_worker_map_add(uw_map, r, w, l)) {
537
 
                    jk_log(l, JK_LOG_ERROR,
538
 
                    "invalid mapping rule %s->%s", r, w);
539
 
                }
540
 
                for (; *s; s++)
541
 
                   *(s - 1) = *s;
542
 
                *(s - 1) = '\0';
543
 
                /* add second mapping */
544
 
                if (!uri_worker_map_add(uw_map, r, w, l)) {
545
 
                    jk_log(l, JK_LOG_ERROR,
546
 
                    "invalid mapping rule %s->%s", r, w);
547
 
                }
548
 
                free(r);
549
 
            }
550
 
            else if (!uri_worker_map_add(uw_map, u, w, l)) {
551
 
                jk_log(l, JK_LOG_ERROR,
552
 
                       "invalid mapping rule %s->%s",
553
 
                       u, w);
554
 
            }
555
 
        }
556
 
        uw_map->checked = time(NULL);
557
 
        rc = JK_TRUE;
558
 
    }
559
 
    jk_map_free(&map);
560
 
    return rc;
561
 
}
562
 
 
563
 
int uri_worker_map_update(jk_uri_worker_map_t *uw_map,
564
 
                          jk_logger_t *l)
565
 
{
566
 
    int rc = JK_TRUE;
567
 
    time_t now = time(NULL);
568
 
 
569
 
    if ((now - uw_map->checked) > JK_URIMAP_RELOAD) {
570
 
        struct stat statbuf;
571
 
        uw_map->checked = now;
572
 
        if ((rc = stat(uw_map->fname, &statbuf)) == -1)
573
 
            return JK_FALSE;
574
 
        if (statbuf.st_mtime == uw_map->modified)
575
 
            return JK_TRUE;
576
 
        JK_ENTER_CS(&(uw_map->cs), rc);
577
 
        /* Check if some other thread updated status */
578
 
        if (statbuf.st_mtime == uw_map->modified) {
579
 
            JK_LEAVE_CS(&(uw_map->cs), rc);
580
 
            return JK_TRUE;
581
 
        }
582
 
        rc = uri_worker_map_load(uw_map, l);
583
 
        JK_LEAVE_CS(&(uw_map->cs), rc);
584
 
        jk_log(l, JK_LOG_INFO,
585
 
               "Reloaded urimaps from %s", uw_map->fname);
586
 
    }
587
 
    return rc;
588
 
}
589