Make stasis unsubscription functions return NULL
[asterisk/asterisk.git] / main / stasis_cache.c
index 160daa6..a824928 100644 (file)
@@ -42,6 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #define NUM_CACHE_BUCKETS 563
 #endif
 
+/*! \private */
 struct stasis_caching_topic {
        struct ao2_container *cache;
        struct stasis_topic *topic;
@@ -64,7 +65,7 @@ struct stasis_topic *stasis_caching_get_topic(struct stasis_caching_topic *cachi
        return caching_topic->topic;
 }
 
-void stasis_caching_unsubscribe(struct stasis_caching_topic *caching_topic)
+struct stasis_caching_topic *stasis_caching_unsubscribe(struct stasis_caching_topic *caching_topic)
 {
        if (caching_topic) {
                if (stasis_subscription_is_subscribed(caching_topic->sub)) {
@@ -73,6 +74,7 @@ void stasis_caching_unsubscribe(struct stasis_caching_topic *caching_topic)
                        ast_log(LOG_ERROR, "stasis_caching_topic unsubscribed multiple times\n");
                }
        }
+       return NULL;
 }
 
 struct cache_entry {