Changeset 180 for trunk/sm/mm.c
- Timestamp:
- 28/04/07 23:56:58 (19 months ago)
- Files:
-
- 1 modified
-
trunk/sm/mm.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/sm/mm.c
r161 r180 46 46 mm_t mm; 47 47 int celem, melem, attr, *nlist = NULL; 48 char id[13], name[32], mod_fullpath[ 512], arg[1024], *modules_path;48 char id[13], name[32], mod_fullpath[PATH_MAX], arg[1024], *modules_path; 49 49 mod_chain_t chain = (mod_chain_t) NULL; 50 50 mod_instance_t **list = NULL, mi; … … 64 64 log_write(sm->log, LOG_NOTICE, "modules search path: %s", modules_path); 65 65 else 66 log_write(sm->log, LOG_ WARNING, "modules search path undefined !");66 log_write(sm->log, LOG_NOTICE, "modules search path undefined, using deafult: "LIBRARY_DIR); 67 67 68 68 celem = nad_find_elem(sm->config->nad, celem, -1, "chain", 1); … … 173 173 #ifndef WIN32 174 174 if (modules_path != NULL) 175 snprintf(mod_fullpath, 512, "%s/mod_%s.so", modules_path, name);175 snprintf(mod_fullpath, PATH_MAX, "%s/mod_%s.so", modules_path, name); 176 176 else 177 snprintf(mod_fullpath, 512, "%s/mod_%s.so", LIBRARY_DIR, name);177 snprintf(mod_fullpath, PATH_MAX, "%s/mod_%s.so", LIBRARY_DIR, name); 178 178 mod->handle = dlopen(mod_fullpath, RTLD_LAZY); 179 179 if (mod->handle != NULL) … … 181 181 #else 182 182 if (modules_path != NULL) 183 snprintf(mod_fullpath, 512, "%smod_%s.dll", modules_path, name);183 snprintf(mod_fullpath, PATH_MAX, "%s\\mod_%s.dll", modules_path, name); 184 184 else 185 snprintf(mod_fullpath, 512, "mod_%s.dll", name);185 snprintf(mod_fullpath, PATH_MAX, "mod_%s.dll", name); 186 186 mod->handle = (void*) LoadLibrary(mod_fullpath); 187 187 if (mod->handle != NULL)
