I was getting the "module name" from the wrong struct, causing default
authorpacman <pacman>
Tue, 2 Jan 2001 05:44:23 +0000 (05:44 +0000)
committerpacman <pacman>
Tue, 2 Jan 2001 05:44:23 +0000 (05:44 +0000)
authtype names to be screwed up.

src/include/modcall.h
src/main/modcall.c
src/main/modules.c

index b45e064..06156ce 100644 (file)
@@ -24,7 +24,7 @@ modcallable *compile_modgroup(int component, CONF_SECTION *cs,
  * may be a CONF_SECTION containing action specifiers like "notfound = return"
  * or a simple CONF_PAIR, in which case the default actions are used. */
 modcallable *compile_modsingle(int component, CONF_ITEM *ci,
-                              const char *filename, char **modname);
+                              const char *filename, const char **modname);
 
 /* Add an entry to the end of a modgroup, creating it first if necessary */
 void add_to_modcallable(modcallable **parent, modcallable *this,
index 3a15b62..2cbdf0f 100644 (file)
@@ -636,7 +636,7 @@ static void override_actions(modcallable *c, CONF_SECTION *cs,
 
 static modcallable *do_compile_modsingle(int component, CONF_ITEM *ci,
                                         const char *filename, int grouptype,
-                                        char **modname)
+                                        const char **modname)
 {
        int lineno;
        const char *modrefname;
@@ -676,12 +676,12 @@ static modcallable *do_compile_modsingle(int component, CONF_ITEM *ci,
        sanity_check(component, this, csingle->lineno, filename);
 
        single->modinst = this;
-       *modname = this->entry->name;
+       *modname = this->entry->module->name;
        return csingle;
 }
 
 modcallable *compile_modsingle(int component, CONF_ITEM *ci,
-                              const char *filename, char **modname)
+                              const char *filename, const char **modname)
 {
        return do_compile_modsingle(component, ci, filename,
                                    GROUPTYPE_SIMPLEGROUP, modname);
@@ -734,7 +734,7 @@ static modcallable *do_compile_modgroup(int component, CONF_SECTION *cs,
                                /* ...or a module instance with some actions
                                 * specified. */
                                modcallable *single;
-                               char *junk;
+                               const char *junk;
 
                                single = do_compile_modsingle(component,
                                                cf_sectiontoitem(scs), filename,
@@ -754,7 +754,7 @@ static modcallable *do_compile_modgroup(int component, CONF_SECTION *cs,
                         * actions specified... */
                        if(value[0]==0) {
                                modcallable *single;
-                               char *junk;
+                               const char *junk;
 
                                single = do_compile_modsingle(component,
                                        cf_pairtoitem(cp), filename,
index ebfe8f0..4f17cbb 100644 (file)
@@ -494,7 +494,7 @@ static void load_component_section(CONF_SECTION *cs, int comp, const char *filen
         int            modreflineno;
        int             idx;
        indexed_modcallable *subcomp;
-       char            *modname;
+       const char      *modname;
 
        for(modref=cf_item_find_next(cs, NULL)
            ; modref ;