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:
@@ -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
@@ -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
@@ -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++;
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
};
|
||||
|
||||
|
||||
@@ -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}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user