diff options
author | Emmanuel Vasilakis <mrzammler@mm.st> | 2022-12-14 18:41:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 17:41:17 +0100 |
commit | 14474803db200ce3c2321c8b3de1ac04625b2d39 (patch) | |
tree | a4808697d0131e12138b3af28a37327b6912a045 | |
parent | f0b4906f67bd529567f983b75d4a2664de3fb71d (diff) |
Revert "MQTT 5 publish topic alias support" (#14145)
Revert "MQTT 5 publish topic alias support (#14067)"
This reverts commit a749ab00a63b229d99f6bc82a965206e5481db3e.
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | aclk/aclk.c | 4 | ||||
-rw-r--r-- | aclk/aclk_util.c | 18 | ||||
-rw-r--r-- | aclk/aclk_util.h | 4 | ||||
m--------- | mqtt_websockets | 33 |
5 files changed, 15 insertions, 51 deletions
diff --git a/Makefile.am b/Makefile.am index 3898d01fda..e88b1b59f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -733,12 +733,9 @@ libmqttwebsockets_a_SOURCES = \ mqtt_websockets/c-rbuf/include/ringbuffer.h \ mqtt_websockets/c-rbuf/src/ringbuffer_internal.h \ mqtt_websockets/MQTT-C/src/mqtt.c \ - mqtt_websockets/MQTT-C/include/mqtt.h \ - mqtt_websockets/c_rhash/src/c_rhash.c \ - mqtt_websockets/c_rhash/include/c_rhash.h \ - mqtt_websockets/c_rhash/src/c_rhash_internal.h + mqtt_websockets/MQTT-C/include/mqtt.h -libmqttwebsockets_a_CFLAGS = $(CFLAGS) -DMQTT_WSS_CUSTOM_ALLOC -DRBUF_CUSTOM_MALLOC -I$(srcdir)/aclk/helpers -I$(srcdir)/mqtt_websockets/c_rhash/include +libmqttwebsockets_a_CFLAGS = $(CFLAGS) -DMQTT_WSS_CUSTOM_ALLOC -DRBUF_CUSTOM_MALLOC -I$(srcdir)/aclk/helpers if MQTT_WSS_DEBUG libmqttwebsockets_a_CFLAGS += -DMQTT_WSS_DEBUG diff --git a/aclk/aclk.c b/aclk/aclk.c index 48013878b4..45f3bb4760 100644 --- a/aclk/aclk.c +++ b/aclk/aclk.c @@ -385,10 +385,6 @@ static inline void mqtt_connected_actions(mqtt_wss_client client) aclk_rcvd_cloud_msgs = 0; aclk_connection_counter++; - aclk_topic_cache_iter_t iter = ACLK_TOPIC_CACHE_ITER_T_INITIALIZER; - while ((topic = (char*)aclk_topic_cache_iterate(&iter)) != NULL) - mqtt_wss_set_topic_alias(client, topic); - aclk_send_agent_connection_update(client, 1); } diff --git a/aclk/aclk_util.c b/aclk/aclk_util.c index b6eea87c16..01eaedc8e0 100644 --- a/aclk/aclk_util.c +++ b/aclk/aclk_util.c @@ -308,24 +308,6 @@ const char *aclk_get_topic(enum aclk_topics topic) } /* - * Allows iterating all topics in topic cache without - * having to resort to callbacks. - */ - -const char *aclk_topic_cache_iterate(aclk_topic_cache_iter_t *iter) -{ - if (!aclk_topic_cache) { - error("Topic cache not initialized when %s was called.", __FUNCTION__); - return NULL; - } - - if (*iter >= aclk_topic_cache_items) - return NULL; - - return aclk_topic_cache[(*iter)++]->topic; -} - -/* * TBEB with randomness * * @param reset 1 - to reset the delay, diff --git a/aclk/aclk_util.h b/aclk/aclk_util.h index b858fe7383..ed715e0466 100644 --- a/aclk/aclk_util.h +++ b/aclk/aclk_util.h @@ -93,13 +93,9 @@ enum aclk_topics { ACLK_TOPICID_CTXS_UPDATED = 20 }; -typedef size_t aclk_topic_cache_iter_t; -#define ACLK_TOPIC_CACHE_ITER_T_INITIALIZER (0) - const char *aclk_get_topic(enum aclk_topics topic); int aclk_generate_topic_cache(struct json_object *json); void free_topic_cache(void); -const char *aclk_topic_cache_iterate(aclk_topic_cache_iter_t *iter); // TODO // aclk_topics_reload //when claim id changes diff --git a/mqtt_websockets b/mqtt_websockets -Subproject 8869ab354d10c071c1e5e33602cc6b7940b4427 +Subproject d1e30f55e2c21e3c8982c76e6a969a1e65292d9 |