about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-08-13 23:45:58 +0100
committerJames Booth <boothj5@gmail.com>2016-08-13 23:45:58 +0100
commite776ef9b6864f5cb4aeec518d9336d6a46298ff9 (patch)
tree803e37c3b247a1985818bb9e17676e21b13c1d65 /src/xmpp
parent9cecef5609ee1cb05cd2eae29bc31190dd3e5d41 (diff)
downloadprofani-tty-e776ef9b6864f5cb4aeec518d9336d6a46298ff9.tar.gz
Rename caps_contains -> caps_cache_contains
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/capabilities.c2
-rw-r--r--src/xmpp/capabilities.h2
-rw-r--r--src/xmpp/iq.c4
-rw-r--r--src/xmpp/presence.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c
index 26cb3c0c..4cf97336 100644
--- a/src/xmpp/capabilities.c
+++ b/src/xmpp/capabilities.c
@@ -196,7 +196,7 @@ caps_map_jid_to_ver(const char *const jid, const char *const ver)
 }
 
 gboolean
-caps_contains(const char *const ver)
+caps_cache_contains(const char *const ver)
 {
     return (g_key_file_has_group(cache, ver));
 }
diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h
index 9556860f..675022d2 100644
--- a/src/xmpp/capabilities.h
+++ b/src/xmpp/capabilities.h
@@ -52,7 +52,7 @@ void caps_init(void);
 void caps_add_by_ver(const char *const ver, EntityCapabilities *caps);
 void caps_add_by_jid(const char *const jid, EntityCapabilities *caps);
 void caps_map_jid_to_ver(const char *const jid, const char *const ver);
-gboolean caps_contains(const char *const ver);
+gboolean caps_cache_contains(const char *const ver);
 
 GList* caps_get_features(void);
 
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 3aa0bfbf..d4dbb7b6 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -742,7 +742,7 @@ _caps_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata)
     } else {
         log_info("Valid SHA-1 hash found: %s", given_sha1);
 
-        if (caps_contains(given_sha1)) {
+        if (caps_cache_contains(given_sha1)) {
             log_info("Capabilties already cached: %s", given_sha1);
         } else {
             log_info("Capabilities not cached: %s, storing", given_sha1);
@@ -870,7 +870,7 @@ _caps_response_legacy_id_handler(xmpp_stanza_t *const stanza, void *const userda
     // nodes match
     if (g_strcmp0(expected_node, node) == 0) {
         log_info("Legacy capabilities, nodes match %s", node);
-        if (caps_contains(node)) {
+        if (caps_cache_contains(node)) {
             log_info("Capabilties already cached: %s", node);
         } else {
             log_info("Capabilities not cached: %s, storing", node);
diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c
index 6ba3573a..00d50039 100644
--- a/src/xmpp/presence.c
+++ b/src/xmpp/presence.c
@@ -553,7 +553,7 @@ _handle_caps(const char *const jid, XMPPCaps *caps)
     if (g_strcmp0(caps->hash, "sha-1") == 0) {
         log_info("Hash %s supported", caps->hash);
         if (caps->ver) {
-            if (caps_contains(caps->ver)) {
+            if (caps_cache_contains(caps->ver)) {
                 log_info("Capabilities cache hit: %s, for %s.", caps->ver, jid);
                 caps_map_jid_to_ver(jid, caps->ver);
             } else {
@@ -666,7 +666,7 @@ _send_caps_request(char *node, char *caps_key, char *id, char *from)
 
     if (node) {
         log_debug("Node string: %s.", node);
-        if (!caps_contains(caps_key)) {
+        if (!caps_cache_contains(caps_key)) {
             log_debug("Capabilities not cached for '%s', sending discovery IQ.", from);
             xmpp_stanza_t *iq = stanza_create_disco_info_iq(ctx, id, from, node);
             iq_send_stanza(iq);