Lines Matching refs:policy
58 if (!h || !h->policy)
61 if (h->policy->u.mqtt.aws_iot)
66 if (!h->policy->u.mqtt.subscribe || wsi->mqtt->done_subscribe)
76 if (lws_strexp_expand(&exp, h->policy->u.mqtt.subscribe,
77 strlen(h->policy->u.mqtt.subscribe), &used_in,
98 if (lws_strexp_expand(&exp, h->policy->u.mqtt.subscribe,
99 strlen(h->policy->u.mqtt.subscribe), &used_in,
110 * The policy says to subscribe to something, and we
112 * string-substituted version of the policy string.
118 h->u.mqtt.sub_top.qos = h->policy->u.mqtt.qos;
125 h->u.mqtt.sub_info.topic[0].qos = h->policy->u.mqtt.qos;
156 if (h->policy->u.mqtt.aws_iot)
231 if (h->policy->u.mqtt.birth_message) {
234 if (lws_strexp_expand(&exp, h->policy->u.mqtt.birth_message,
235 strlen(h->policy->u.mqtt.birth_message),
242 used_out, 0, h->policy->u.mqtt.birth_topic,
243 h->policy->u.mqtt.birth_qos,
244 h->policy->u.mqtt.birth_retain, 0,
270 h->policy->u.mqtt.birth_topic,
271 h->policy->u.mqtt.birth_qos,
272 h->policy->u.mqtt.birth_retain,
277 h->policy->u.mqtt.topic,
278 h->policy->u.mqtt.qos,
279 h->policy->u.mqtt.retain, 1, f);
435 if (!h->policy->u.mqtt.topic || wsi->mqtt->inside_shadow)
450 expbuf = expand_metadata(h, h->policy->u.mqtt.topic, suffixes[i],
459 h->u.mqtt.shadow_sub.topic[i].qos = h->policy->u.mqtt.qos;
544 if (h->policy && !(h->policy->flags & LWSSSPOLF_OPPORTUNISTIC) &&
561 if (h->policy->u.mqtt.birth_topic &&
578 if (!h->policy->u.mqtt.subscribe ||
579 !h->policy->u.mqtt.subscribe[0]) {
581 * If subscribe is empty in the policy, then,
586 } else if (!h->policy->u.mqtt.clean_start &&
596 } else if (h->policy->u.mqtt.subscribe &&
607 if (h->policy->u.mqtt.birth_topic &&
627 if (h->policy->u.mqtt.topic)
655 if (lws_strexp_expand(&exp, h->policy->u.mqtt.subscribe,
656 strlen(h->policy->u.mqtt.subscribe),
730 if (!wsi->mqtt->done_subscribe && !h->policy->u.mqtt.birth_topic) {
806 if (!wsi->mqtt->done_subscribe && h->policy->u.mqtt.subscribe)
812 if (!wsi->mqtt->done_birth && h->policy->u.mqtt.birth_topic)
815 if (h->policy->u.mqtt.aws_iot) {
817 h->policy->u.mqtt.topic) == LMMTR_TOPIC_MATCH) {
856 h->policy->u.mqtt.topic,
857 h->policy->u.mqtt.qos,
858 h->policy->u.mqtt.retain, 0, f) != 0) {
952 h->policy->u.mqtt.will_topic,
953 h->policy->u.mqtt.will_message,
954 h->policy->u.mqtt.subscribe,
955 h->policy->u.mqtt.topic,
956 h->policy->u.mqtt.birth_topic,
957 h->policy->u.mqtt.birth_message
1030 ct->ccp.keep_alive = h->policy->u.mqtt.keep_alive;
1031 ct->ccp.clean_start = (h->policy->u.mqtt.clean_start & 1u);
1032 ct->ccp.will_param.qos = h->policy->u.mqtt.will_qos;
1033 ct->ccp.will_param.retain = h->policy->u.mqtt.will_retain;
1034 ct->ccp.birth_param.qos = h->policy->u.mqtt.birth_qos;
1035 ct->ccp.birth_param.retain = h->policy->u.mqtt.birth_retain;
1036 ct->ccp.aws_iot = h->policy->u.mqtt.aws_iot;
1037 h->u.mqtt.topic_qos.qos = h->policy->u.mqtt.qos;