about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-12-22 23:16:19 +0000
committerJames Booth <boothj5@gmail.com>2013-12-22 23:16:19 +0000
commite818a6772b830255f1bd21845197413b00646f99 (patch)
treed1c1ea3ff4ed7d97b6c68fe196614d7339cde76f /src
parentc001f0e7cb844086be6e7d5be1c7aae26f9855b1 (diff)
downloadprofani-tty-e818a6772b830255f1bd21845197413b00646f99.tar.gz
Bind capabilities functions in main.c
Diffstat (limited to 'src')
-rw-r--r--src/main.c1
-rw-r--r--src/xmpp/capabilities.c9
-rw-r--r--src/xmpp/xmpp.h1
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);