1: #include "global.h"
2: #include "mqttd.h"
3: #include "mqttd_calls.h"
4:
5:
6: int
7: Publish(struct tagSession *sess)
8: {
9: struct mqtthdr *hdr;
10:
11: ioTRACE(2);
12:
13: if (!sess)
14: return -1;
15:
16: hdr = (struct mqtthdr*) sess->sess_buf->msg_base;
17: switch (hdr->mqtt_msg.qos) {
18: case MQTT_QOS_ONCE:
19: break;
20: case MQTT_QOS_ACK:
21: break;
22: case MQTT_QOS_EXACTLY:
23: break;
24: default:
25: ioDEBUG(1, "Error:: Unknown QoS %d - rejected publishing request",
26: hdr->mqtt_msg.qos);
27: return 0;
28: }
29:
30: return 0;
31: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>