build kore as -rdynamic so we can properly load modules.

implement kore_module_handler_find().
This commit is contained in:
Joris Vink 2013-05-01 16:11:10 +02:00
parent d9bbb0b1f1
commit a39040ba9b
2 changed files with 8 additions and 1 deletions

View File

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

View File

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