chore: Stop adding to unused database

main
Sean McBride 4 years ago
parent 0e521668f8
commit 6c718dfa6e

@ -17,12 +17,6 @@ extern int module_database_free_offset;
static inline int static inline int
module_database_add(struct module *module) module_database_add(struct module *module)
{ {
/*
* Assumption: Module is added to database before being listened to
* TODO: Why does this matter?
*/
assert(module->socket_descriptor == -1);
int rc; int rc;
if (module_database_free_offset >= MODULE_MAX_MODULE_COUNT) goto err_no_space; if (module_database_free_offset >= MODULE_MAX_MODULE_COUNT) goto err_no_space;

@ -217,9 +217,6 @@ module_new(char *name, char *path, int32_t argument_count, uint32_t stack_size,
module_initialize_table(module); module_initialize_table(module);
local_sandbox_context_cache.module_indirect_table = NULL; local_sandbox_context_cache.module_indirect_table = NULL;
/* Add the module to the in-memory module DB */
module_database_add(module);
/* Initialize Perf Window */ /* Initialize Perf Window */
perf_window_initialize(&module->perf_window); perf_window_initialize(&module->perf_window);

Loading…
Cancel
Save