Lines Matching refs:handler
1994 iotx_mc_topic_handle_t *handler = NULL; in MQTTSubscribe() local
2013 handler = mqtt_malloc(sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2014 if (NULL == handler) { in MQTTSubscribe()
2017 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2018 INIT_LIST_HEAD(&handler->linked_list); in MQTTSubscribe()
2022 handler = &c->list_sub_handle[idx]; in MQTTSubscribe()
2023 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2029 if (handler == NULL) { in MQTTSubscribe()
2036 handler->topic_filter = mqtt_malloc(strlen(topicFilter) + 1); in MQTTSubscribe()
2037 if (NULL == handler->topic_filter) { in MQTTSubscribe()
2038 mqtt_free(handler); in MQTTSubscribe()
2041 memset((char *)handler->topic_filter, 0, strlen(topicFilter) + 1); in MQTTSubscribe()
2044 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2048 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTSubscribe()
2050 memcpy((char *)handler->topic_filter, topicFilter, strlen(topicFilter) + 1); in MQTTSubscribe()
2055 handler->topic_filter = mqtt_malloc(strlen(topicFilter) + 1); in MQTTSubscribe()
2056 if (NULL == handler->topic_filter) { in MQTTSubscribe()
2057 mqtt_free(handler); in MQTTSubscribe()
2060 memset((char *)handler->topic_filter, 0, strlen(topicFilter) + 1); in MQTTSubscribe()
2063 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2066 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTSubscribe()
2068 handler->topic_type = TOPIC_FILTER_TYPE; in MQTTSubscribe()
2069 memcpy((char *)handler->topic_filter, topicFilter, in MQTTSubscribe()
2073 handler->topic_filter = mqtt_malloc(MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTSubscribe()
2074 if (NULL == handler->topic_filter) { in MQTTSubscribe()
2075 mqtt_free(handler); in MQTTSubscribe()
2078 memset((char *)handler->topic_filter, 0, MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTSubscribe()
2081 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2084 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTSubscribe()
2086 handler->topic_type = TOPIC_NAME_TYPE; in MQTTSubscribe()
2088 (char *)handler->topic_filter, in MQTTSubscribe()
2091 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2092 mqtt_free(handler); in MQTTSubscribe()
2094 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2100 handler->handle.h_fp = messageHandler; in MQTTSubscribe()
2101 handler->handle.pcontext = pcontext; in MQTTSubscribe()
2112 HEXDUMP_DEBUG(handler->topic_filter, MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTSubscribe()
2114 mqtt_warning("handler->topic: %s", handler->topic_filter); in MQTTSubscribe()
2128 if (0 == iotx_mc_check_handle_is_identical(node, handler)) { in MQTTSubscribe()
2136 if (&c->list_sub_handle[idx] != handler && in MQTTSubscribe()
2138 handler)) { in MQTTSubscribe()
2146 list_add_tail(&handler->linked_list, &c->list_sub_handle); in MQTTSubscribe()
2150 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2151 mqtt_free(handler); in MQTTSubscribe()
2153 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2165 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2166 mqtt_free(handler); in MQTTSubscribe()
2168 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2178 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2179 mqtt_free(handler); in MQTTSubscribe()
2181 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2201 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2202 mqtt_free(handler); in MQTTSubscribe()
2204 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2222 HEXDUMP_DEBUG(handler->topic_filter, MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTSubscribe()
2224 mqtt_warning("handler->topic: %s", handler->topic_filter); in MQTTSubscribe()
2238 if (0 == iotx_mc_check_handle_is_identical(node, handler)) { in MQTTSubscribe()
2246 if (&c->list_sub_handle[idx] != handler && in MQTTSubscribe()
2248 handler)) { in MQTTSubscribe()
2256 list_add_tail(&handler->linked_list, &c->list_sub_handle); in MQTTSubscribe()
2260 mqtt_free(handler->topic_filter); in MQTTSubscribe()
2261 mqtt_free(handler); in MQTTSubscribe()
2263 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTSubscribe()
2387 iotx_mc_topic_handle_t *handler = NULL; in MQTTUnsubscribe() local
2404 handler = mqtt_malloc(sizeof(iotx_mc_topic_handle_t)); in MQTTUnsubscribe()
2405 if (NULL == handler) { in MQTTUnsubscribe()
2409 handler = &s_handler; in MQTTUnsubscribe()
2412 memset(handler, 0, sizeof(iotx_mc_topic_handle_t)); in MQTTUnsubscribe()
2416 handler->topic_filter = mqtt_malloc(strlen(topicFilter) + 1); in MQTTUnsubscribe()
2417 if (NULL == handler->topic_filter) { in MQTTUnsubscribe()
2418 mqtt_free(handler); in MQTTUnsubscribe()
2421 memset((char *)handler->topic_filter, 0, strlen(topicFilter) + 1); in MQTTUnsubscribe()
2426 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTUnsubscribe()
2428 memcpy((char *)handler->topic_filter, topicFilter, strlen(topicFilter) + 1); in MQTTUnsubscribe()
2433 handler->topic_filter = mqtt_malloc(strlen(topicFilter) + 1); in MQTTUnsubscribe()
2434 if (NULL == handler->topic_filter) { in MQTTUnsubscribe()
2435 mqtt_free(handler); in MQTTUnsubscribe()
2438 memset((char *)handler->topic_filter, 0, strlen(topicFilter) + 1); in MQTTUnsubscribe()
2443 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTUnsubscribe()
2445 handler->topic_type = TOPIC_FILTER_TYPE; in MQTTUnsubscribe()
2446 memcpy((char *)handler->topic_filter, topicFilter, in MQTTUnsubscribe()
2450 handler->topic_filter = mqtt_malloc(MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTUnsubscribe()
2451 if (NULL == handler->topic_filter) { in MQTTUnsubscribe()
2452 mqtt_free(handler); in MQTTUnsubscribe()
2455 memset((char *)handler->topic_filter, 0, MQTT_ZIP_PATH_DEFAULT_LEN); in MQTTUnsubscribe()
2460 memset((char *)handler->topic_filter, 0, CONFIG_MQTT_TOPIC_MAXLEN); in MQTTUnsubscribe()
2462 handler->topic_type = TOPIC_NAME_TYPE; in MQTTUnsubscribe()
2464 (char *)handler->topic_filter, in MQTTUnsubscribe()
2467 mqtt_free(handler->topic_filter); in MQTTUnsubscribe()
2468 mqtt_free(handler); in MQTTUnsubscribe()
2480 mqtt_free(handler->topic_filter); in MQTTUnsubscribe()
2481 mqtt_free(handler); in MQTTUnsubscribe()
2491 mqtt_free(handler->topic_filter); in MQTTUnsubscribe()
2492 mqtt_free(handler); in MQTTUnsubscribe()
2502 mqtt_free(handler->topic_filter); in MQTTUnsubscribe()
2503 mqtt_free(handler); in MQTTUnsubscribe()
2511 cur_topic.lenstring.data = (char *)handler->topic_filter; in MQTTUnsubscribe()
2514 cur_topic.lenstring.len = strlen(handler->topic_filter) + 1; in MQTTUnsubscribe()
2516 if (handler->topic_type == TOPIC_FILTER_TYPE) { in MQTTUnsubscribe()
2517 cur_topic.lenstring.len = strlen(handler->topic_filter) + 1; in MQTTUnsubscribe()
2536 mqtt_free(handler->topic_filter); in MQTTUnsubscribe()
2537 mqtt_free(handler); in MQTTUnsubscribe()