You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ia...@apache.org on 2001/11/10 19:14:58 UTC
cvs commit: httpd-2.0/modules/mappers mod_so.c
ianh 01/11/10 10:14:58
Modified: modules/mappers mod_so.c
Log:
display a warning message if someone attempts to load
the same module twice
Submitted by: Brian Pane <bp...@pacbell.net>
Reviewed by: Ian Holsman
Revision Changes Path
1.45 +5 -1 httpd-2.0/modules/mappers/mod_so.c
Index: mod_so.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_so.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- mod_so.c 2001/10/16 19:04:02 1.44
+++ mod_so.c 2001/11/10 18:14:58 1.45
@@ -221,8 +221,12 @@
modie = (moduleinfo *)sconf->loaded_modules->elts;
for (i = 0; i < sconf->loaded_modules->nelts; i++) {
modi = &modie[i];
- if (modi->name != NULL && strcmp(modi->name, modname) == 0)
+ if (modi->name != NULL && strcmp(modi->name, modname) == 0) {
+ ap_log_perror(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0,
+ cmd->pool, "module %s is already loaded, skipping",
+ modname);
return NULL;
+ }
}
modi = apr_array_push(sconf->loaded_modules);
modi->name = modname;