core: fix mod_register & dlflags
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Tue, 24 Aug 2010 09:43:36 +0000 (11:43 +0200)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Tue, 24 Aug 2010 09:43:36 +0000 (11:43 +0200)
dlflags changes in mod_register() functions were discarded
resulting in modules failing to load.

sr_module.c

index 421f1b7..c759a17 100644 (file)
@@ -549,7 +549,7 @@ reload:
        if (((error =(char*)dlerror())==0) && mr) {
                /* no error call it */
                new_dlflags=dlflags;
-               if (mr(path, &dlflags, 0, 0)!=0) {
+               if (mr(path, &new_dlflags, 0, 0)!=0) {
                        LOG(L_ERR, "ERROR: load_module: %s: mod_register failed\n", path);
                        goto error1;
                }