mirror of https://git.kore.io/kore.git
get rid of mtime in modules.
kore should always reload things when it was told to reload things. there are use cases were a module reload is because the code itself changed.
This commit is contained in:
parent
78ff364c8d
commit
6c18856a3e
|
@ -350,7 +350,6 @@ struct kore_module {
|
|||
char *path;
|
||||
char *onload;
|
||||
int type;
|
||||
time_t mtime;
|
||||
struct kore_runtime_call *ocb;
|
||||
|
||||
struct kore_module_functions *fun;
|
||||
|
|
|
@ -80,10 +80,8 @@ kore_module_load(const char *path, const char *onload, int type)
|
|||
fatal("stat(%s): %s", path, errno_s);
|
||||
|
||||
module->path = kore_strdup(path);
|
||||
module->mtime = st.st_mtime;
|
||||
} else {
|
||||
module->path = NULL;
|
||||
module->mtime = 0;
|
||||
}
|
||||
|
||||
switch (module->type) {
|
||||
|
@ -153,9 +151,6 @@ kore_module_reload(int cbs)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (module->mtime == st.st_mtime)
|
||||
continue;
|
||||
|
||||
if (module->ocb != NULL && cbs == 1) {
|
||||
ret = kore_runtime_onload(module->ocb,
|
||||
KORE_MODULE_UNLOAD);
|
||||
|
@ -166,7 +161,6 @@ kore_module_reload(int cbs)
|
|||
}
|
||||
}
|
||||
|
||||
module->mtime = st.st_mtime;
|
||||
module->fun->reload(module);
|
||||
|
||||
if (module->onload != NULL) {
|
||||
|
|
Loading…
Reference in New Issue