Lines Matching refs:topicName

71     pClient->connect_data.will.topicName = pConnectParams->will.topicName;  in iotx_mc_set_connect_params()
1178 static char iotx_mc_is_topic_matched(char *topicFilter, MQTTString *topicName) in iotx_mc_is_topic_matched() argument
1184 if (!topicFilter || !topicName) { in iotx_mc_is_topic_matched()
1189 curn = topicName->lenstring.data; in iotx_mc_is_topic_matched()
1190 curn_end = curn + topicName->lenstring.len; in iotx_mc_is_topic_matched()
1217 static void iotx_mc_deliver_message(iotx_mc_client_t *c, MQTTString *topicName, in iotx_mc_deliver_message() argument
1235 if (!c || !topicName || !topic_msg) { in iotx_mc_deliver_message()
1239 topic_msg->ptopic = topicName->lenstring.data; in iotx_mc_deliver_message()
1240 topic_msg->topic_len = topicName->lenstring.len; in iotx_mc_deliver_message()
1243 if (topicName->cstring) { in iotx_mc_deliver_message()
1244 net_topic = topicName->cstring; in iotx_mc_deliver_message()
1245 net_topic_len = strlen(topicName->cstring); in iotx_mc_deliver_message()
1247 net_topic = topicName->lenstring.data; in iotx_mc_deliver_message()
1248 net_topic_len = topicName->lenstring.len; in iotx_mc_deliver_message()
1257 compare_topic = topicName; in iotx_mc_deliver_message()
1267 iotx_mc_is_topic_matched((char *)node->topic_filter, topicName)) { in iotx_mc_deliver_message()
1287 (char *)c->list_sub_handle[idx].topic_filter, topicName))) { in iotx_mc_deliver_message()
1382 MQTTString topicName; in iotx_mc_handle_recv_PUBLISH() local
1395 memset(&topicName, 0x0, sizeof(MQTTString)); in iotx_mc_handle_recv_PUBLISH()
1400 (unsigned short *)&topic_msg.packet_id, &topicName, in iotx_mc_handle_recv_PUBLISH()
1408 if (topicName.lenstring.len == 0 || topicName.lenstring.data == NULL) { in iotx_mc_handle_recv_PUBLISH()
1416 mqtt_info("Downstream Topic: '%.*s'", topicName.lenstring.len, in iotx_mc_handle_recv_PUBLISH()
1417 topicName.lenstring.data); in iotx_mc_handle_recv_PUBLISH()
1424 mqtt_debug("%20s : %d", "Topic Length", topicName.lenstring.len); in iotx_mc_handle_recv_PUBLISH()
1425 mqtt_debug("%20s : %.*s", "Topic Name", topicName.lenstring.len, in iotx_mc_handle_recv_PUBLISH()
1426 topicName.lenstring.data); in iotx_mc_handle_recv_PUBLISH()
1440 get_msgid(topicName.lenstring.data, 1); in iotx_mc_handle_recv_PUBLISH()
1469 iotx_mc_deliver_message(c, &topicName, &topic_msg); in iotx_mc_handle_recv_PUBLISH()
2323 static int iotx_mc_check_topic(const char *topicName, iotx_mc_topic_type_t type) in iotx_mc_check_topic() argument
2329 if (NULL == topicName || '/' != topicName[0]) { in iotx_mc_check_topic()
2333 if (strlen(topicName) > CONFIG_MQTT_TOPIC_MAXLEN) { in iotx_mc_check_topic()
2339 strncpy(topicString, topicName, CONFIG_MQTT_TOPIC_MAXLEN - 1); in iotx_mc_check_topic()
2556 int MQTTPublish(iotx_mc_client_t *c, const char *topicName, in MQTTPublish() argument
2570 if (!c || !topicName || !topic_msg) { in MQTTPublish()
2574 topic.cstring = (char *)topicName; in MQTTPublish()
2581 if (_alloc_send_buffer(c, strlen(topicName) + topic_msg->payload_len) < 0) { in MQTTPublish()
2640 mqtt_info("Upstream Topic: '%s'", topicName); in MQTTPublish()
3164 int wrapper_mqtt_publish(void *client, const char *topicName, in wrapper_mqtt_publish() argument
3170 if (c == NULL || topicName == NULL || topic_msg == NULL || in wrapper_mqtt_publish()
3175 if (0 != iotx_mc_check_topic(topicName, TOPIC_NAME_TYPE)) { in wrapper_mqtt_publish()
3176 mqtt_err("topic format is error,topicFilter = %s", topicName); in wrapper_mqtt_publish()
3200 HEXDUMP_DEBUG(topicName, strlen(topicName)); in wrapper_mqtt_publish()
3204 rc = MQTTPublish(c, topicName, topic_msg); in wrapper_mqtt_publish()