From e818a6772b830255f1bd21845197413b00646f99 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 22 Dec 2013 23:16:19 +0000 Subject: [PATCH] Bind capabilities functions in main.c --- src/main.c | 1 + src/xmpp/capabilities.c | 9 +++++++-- src/xmpp/xmpp.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 3ee3c428..2fea7ba0 100644 --- a/src/main.c +++ b/src/main.c @@ -41,6 +41,7 @@ _init_modules(void) { jabber_init_module(); bookmark_init_module(); + capabilities_init_module(); } int diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index dd3feeae..fc71ae54 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -112,7 +112,6 @@ _caps_get(const char * const caps_str) { return g_hash_table_lookup(capabilities, caps_str); } -Capabilities * (*caps_get)(const char * const) = _caps_get; char * caps_create_sha1_str(xmpp_stanza_t * const query) @@ -309,7 +308,6 @@ _caps_close(void) { g_hash_table_destroy(capabilities); } -void (*caps_close)(void) = _caps_close; static void _caps_destroy(Capabilities *caps) @@ -328,3 +326,10 @@ _caps_destroy(Capabilities *caps) free(caps); } } + +void +capabilities_init_module(void) +{ + caps_get = _caps_get; + caps_close = _caps_close; +} diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 124ed7a7..c8c33c12 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -76,6 +76,7 @@ typedef struct disco_identity_t { void jabber_init_module(void); void bookmark_init_module(void); +void capabilities_init_module(void); // connection functions void (*jabber_init)(const int disable_tls);