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:
Joris Vink 2019-06-09 23:24:53 +02:00
parent 78ff364c8d
commit 6c18856a3e
2 changed files with 0 additions and 7 deletions

View File

@ -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;

View File

@ -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) {