Lines Matching refs:topic

37 	if (h->u.mqtt.sub_info.topic) {
39 if (h->u.mqtt.sub_info.topic[i].name) {
40 lws_free((void*)h->u.mqtt.sub_info.topic[i].name);
41 h->u.mqtt.sub_info.topic[i].name = NULL;
44 lws_free(h->u.mqtt.sub_info.topic);
45 h->u.mqtt.sub_info.topic = NULL;
81 " topic with no output\n",
90 "topic",
101 lwsl_err("%s, failed to expand MQTT subscribe topic\n",
121 h->u.mqtt.sub_info.topic = &h->u.mqtt.sub_top;
122 h->u.mqtt.sub_info.topic =
124 h->u.mqtt.sub_info.topic[0].name = lws_strdup(expbuf);
125 h->u.mqtt.sub_info.topic[0].qos = h->policy->u.mqtt.qos;
146 uint32_t payload_len, const char* topic,
166 if (lws_strexp_expand(&exp, topic, strlen(topic), &used_in,
169 " topic with no output\n", __func__);
174 lwsl_err("%s, failed to allocate MQTT publish topic",
182 if (lws_strexp_expand(&exp, topic, strlen(topic), &used_in,
188 mqpp.topic = (char *)expbuf;
190 mqpp.topic_len = (uint16_t)strlen(mqpp.topic);
277 h->policy->u.mqtt.topic,
350 secstream_mqtt_is_shadow_matched(struct lws *wsi, const char *topic)
359 if (!topic)
362 expbuf = expand_metadata(h, topic, NULL, LWS_MQTT_MAX_AWSIOT_TOPICLEN);
364 lwsl_wsi_warn(wsi, "Failed to expand Shadow topic");
387 lws_free((void *)h->u.mqtt.shadow_sub.topic[i].name);
391 if (h->u.mqtt.shadow_sub.topic) {
392 lws_free(h->u.mqtt.shadow_sub.topic);
393 h->u.mqtt.shadow_sub.topic = NULL;
435 if (!h->policy->u.mqtt.topic || wsi->mqtt->inside_shadow)
442 h->u.mqtt.shadow_sub.topic = lws_malloc(
444 if (!h->u.mqtt.shadow_sub.topic) {
450 expbuf = expand_metadata(h, h->policy->u.mqtt.topic, suffixes[i],
453 lwsl_ss_err(h, "Failed to allocate Shadow topic");
458 h->u.mqtt.shadow_sub.topic[i].name = expbuf;
459 h->u.mqtt.shadow_sub.topic[i].qos = h->policy->u.mqtt.qos;
627 if (h->policy->u.mqtt.topic)
650 * topic on the metadata
658 lwsl_err("%s, failed to expand subscribe topic",
673 (const void *)pmqpp->topic,
697 if (strncmp(h->u.mqtt.shadow_sub.topic[i].name,
698 pmqpp->topic, pmqpp->topic_len) ||
699 (strlen(pmqpp->topic) < acc_n ||
700 strlen(pmqpp->topic) < rej_n))
703 if (!strcmp(pmqpp->topic +
704 (strlen(pmqpp->topic) - acc_n),
706 !strcmp(pmqpp->topic +
707 (strlen(pmqpp->topic) - rej_n),
817 h->policy->u.mqtt.topic) == LMMTR_TOPIC_MATCH) {
839 lmsp.topic = h->u.mqtt.sub_info.topic;
856 h->policy->u.mqtt.topic,
955 h->policy->u.mqtt.topic,
1105 ct->ccp.will_param.topic = ps[SSCMM_STRSUB_WILL_TOPIC];
1110 ct->ccp.birth_param.topic = ps[SSCMM_STRSUB_BIRTH_TOPIC];