1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-07 16:23:13 +02:00

Updated module dependancies to allow a module to load the module containing the symbol

This commit is contained in:
codemastr
2001-11-01 20:57:19 +00:00
parent a5e31d042d
commit 49cf99c68a
5 changed files with 26 additions and 13 deletions
+1
View File
@@ -890,3 +890,4 @@ seen. gmtime warning still there
- Preperation for beta4
- Made some nameser.h changes to work win win32
- Fixed a typo in makenet found by 'Eternal Bliss'
- Updated module dependancies to allow a module to load the module containing the symbol
+5 -2
View File
@@ -39,9 +39,9 @@
#endif
#ifndef STATIC_LINKING
#define SymD(name, container) {#name, (vFP *) &container}
#define SymD(name, container,module) {#name, (vFP *) &container, module}
#else
#define SymD(name, container) {(void *)&name, (vFP *) &container}
#define SymD(name, container,module) {(void *)&name, (vFP *) &container}
#endif
typedef struct moduleInfo ModuleInfo;
@@ -72,6 +72,9 @@ struct msymboltable
void *realfunc;
#endif
vFP *pointer;
#ifndef STATIC_LINKING
char *module;
#endif
};
extern ModuleInfo *module_buffer;
+12 -3
View File
@@ -360,9 +360,18 @@ int module_depend_resolve(MSymbolTable *dep)
*(d->pointer) = module_sym(d->symbol);
if (!*(d->pointer))
{
config_progress("module dependancy error: cannot resolve symbol %s",
d->symbol);
return -1;
/* config_progress("module dependancy error: cannot resolve symbol %s",
d->symbol);*/
config_progress("Unable to resolve symbol %s, attempting to load %s to find it",
d->symbol, d->module);
load_module(d->module,0);
*(d->pointer) = module_sym(d->symbol);
if (!*(d->pointer)) {
config_progress("module dependancy error: cannot resolve symbol %s",
d->symbol);
return -1;
}
}
d++;
}
+4 -4
View File
@@ -89,10 +89,10 @@ MSymbolTable scan_http_depend[] = {
#else
MSymbolTable mod_depend[] = {
#endif
SymD(VS_Add, xVS_add),
SymD(HSlock, xHSlock),
SymD(VSlock, xVSlock),
SymD(blackhole_conf, blackh_conf),
SymD(VS_Add, xVS_add, "src/modules/scan.so"),
SymD(HSlock, xHSlock, "src/modules/scan.so"),
SymD(VSlock, xVSlock, "src/modules/scan.so"),
SymD(blackhole_conf, blackh_conf, "src/modules/scan.so"),
{NULL, NULL}
};
+4 -4
View File
@@ -86,10 +86,10 @@ MSymbolTable scan_socks_depend[] = {
#else
MSymbolTable mod_depend[] = {
#endif
SymD(VS_Add, xVS_add),
SymD(HSlock, xHSlock),
SymD(VSlock, xVSlock),
SymD(blackhole_conf, blackh_conf),
SymD(VS_Add, xVS_add, "src/modules/scan.so"),
SymD(HSlock, xHSlock, "src/modules/scan.so"),
SymD(VSlock, xVSlock, "src/modules/scan.so"),
SymD(blackhole_conf, blackh_conf, "src/modules/scan.so"),
{NULL, NULL}
};