Lines Matching refs:topic_msg

1218                                     iotx_mqtt_topic_info_pt topic_msg)  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()
1274 msg.msg = (void *)topic_msg; in iotx_mc_deliver_message()
1294 msg.msg = (void *)topic_msg; in iotx_mc_deliver_message()
1311 msg.msg = topic_msg; in iotx_mc_deliver_message()
1383 iotx_mqtt_topic_info_t topic_msg; in iotx_mc_handle_recv_PUBLISH() local
1394 memset(&topic_msg, 0x0, sizeof(iotx_mqtt_topic_info_t)); in iotx_mc_handle_recv_PUBLISH()
1398 (unsigned char *)&topic_msg.dup, (int *)&qos, in iotx_mc_handle_recv_PUBLISH()
1399 (unsigned char *)&topic_msg.retain, in iotx_mc_handle_recv_PUBLISH()
1400 (unsigned short *)&topic_msg.packet_id, &topicName, in iotx_mc_handle_recv_PUBLISH()
1401 (unsigned char **)&topic_msg.payload, (int *)&payload_len, in iotx_mc_handle_recv_PUBLISH()
1405 topic_msg.qos = (unsigned char)qos; in iotx_mc_handle_recv_PUBLISH()
1406 topic_msg.payload_len = payload_len; in iotx_mc_handle_recv_PUBLISH()
1415 json_payload = (const char *)topic_msg.payload; in iotx_mc_handle_recv_PUBLISH()
1423 mqtt_debug("%20s : %08d", "Packet Ident", topic_msg.packet_id); in iotx_mc_handle_recv_PUBLISH()
1428 (unsigned int)topic_msg.payload_len, in iotx_mc_handle_recv_PUBLISH()
1429 (int)(c->buf_read + c->buf_size_read - topic_msg.payload)); in iotx_mc_handle_recv_PUBLISH()
1433 mqtt_debug("%20s : %p", "Payload Buffer", topic_msg.payload); in iotx_mc_handle_recv_PUBLISH()
1436 HEXDUMP_DEBUG(topic_msg.payload, topic_msg.payload_len); in iotx_mc_handle_recv_PUBLISH()
1443 topic_msg.ptopic = NULL; in iotx_mc_handle_recv_PUBLISH()
1444 topic_msg.topic_len = 0; in iotx_mc_handle_recv_PUBLISH()
1455 if (0 == memcmp(topic_msg.payload, filterStr, filterLen)) { in iotx_mc_handle_recv_PUBLISH()
1469 iotx_mc_deliver_message(c, &topicName, &topic_msg); in iotx_mc_handle_recv_PUBLISH()
1471 if (topic_msg.qos == IOTX_MQTT_QOS0) { in iotx_mc_handle_recv_PUBLISH()
1473 } else if (topic_msg.qos == IOTX_MQTT_QOS1) { in iotx_mc_handle_recv_PUBLISH()
1474 result = MQTTPuback(c, topic_msg.packet_id, PUBACK); in iotx_mc_handle_recv_PUBLISH()
1475 } else if (topic_msg.qos == IOTX_MQTT_QOS2) { in iotx_mc_handle_recv_PUBLISH()
1476 result = MQTTPuback(c, topic_msg.packet_id, PUBREC); in iotx_mc_handle_recv_PUBLISH()
1478 mqtt_err("Invalid QOS, QOSvalue = %d", topic_msg.qos); in iotx_mc_handle_recv_PUBLISH()
2557 iotx_mqtt_topic_info_pt topic_msg) in MQTTPublish() argument
2570 if (!c || !topicName || !topic_msg) { in MQTTPublish()
2581 if (_alloc_send_buffer(c, strlen(topicName) + topic_msg->payload_len) < 0) { in MQTTPublish()
2588 (unsigned char *)c->buf_send, c->buf_size_send, 0, topic_msg->qos, in MQTTPublish()
2589 topic_msg->retain, topic_msg->packet_id, topic, in MQTTPublish()
2590 (unsigned char *)topic_msg->payload, topic_msg->payload_len); in MQTTPublish()
2595 len, c->buf_size_send, topic_msg->payload_len); in MQTTPublish()
2605 if (topic_msg->qos > IOTX_MQTT_QOS0) { in MQTTPublish()
2608 iotx_mc_push_pubInfo_to(c, len, topic_msg->packet_id, &node)) { in MQTTPublish()
2620 if (topic_msg->qos > IOTX_MQTT_QOS0) { in MQTTPublish()
2638 json_payload = (const char *)topic_msg->payload; in MQTTPublish()
3165 iotx_mqtt_topic_info_pt topic_msg) in wrapper_mqtt_publish() argument
3170 if (c == NULL || topicName == NULL || topic_msg == NULL || in wrapper_mqtt_publish()
3171 topic_msg->payload == NULL) { in wrapper_mqtt_publish()
3187 if (topic_msg->qos == IOTX_MQTT_QOS1 || topic_msg->qos == IOTX_MQTT_QOS2) { in wrapper_mqtt_publish()
3189 topic_msg->packet_id = msg_id; in wrapper_mqtt_publish()
3191 if (topic_msg->qos == IOTX_MQTT_QOS2) { in wrapper_mqtt_publish()
3196 topic_msg->qos = IOTX_MQTT_QOS0; in wrapper_mqtt_publish()
3201 HEXDUMP_DEBUG(topic_msg->payload, topic_msg->payload_len); in wrapper_mqtt_publish()
3204 rc = MQTTPublish(c, topicName, topic_msg); in wrapper_mqtt_publish()