diff --git a/Makefile b/Makefile index d1cfb5d..1be634f 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CFLAGS+=-I/usr/local/ssl/include CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes CFLAGS+=-Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual CFLAGS+=-Wsign-compare -Iincludes -g -LDFLAGS=-Llibs -lssl -lcrypto -ldl -lz +LDFLAGS=-rdynamic -Llibs -lssl -lcrypto -ldl -lz light: $(S_OBJS) $(CC) $(CFLAGS) $(S_OBJS) $(LDFLAGS) -o $(BIN) diff --git a/src/module.c b/src/module.c index 6ff329e..d94d75a 100644 --- a/src/module.c +++ b/src/module.c @@ -97,5 +97,12 @@ kore_module_handler_new(char *uri, char *func, int type) void * kore_module_handler_find(char *uri) { + struct kore_module_handle *hdlr; + + TAILQ_FOREACH(hdlr, &handlers, list) { + if (!strcmp(hdlr->uri, uri)) + return (hdlr->func); + } + return (NULL); }