version 1.1.1.1.2.6, 2012/06/20 11:11:30
|
version 1.3, 2012/06/28 11:06:17
|
Line 61 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
Line 61 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
u_short msgID, u_char Dup, u_char QOS) |
u_short msgID, u_char Dup, u_char QOS) |
{ |
{ |
int len, siz = 0; |
int len, siz = 0; |
u_int n; | u_int n, *l; |
struct mqtthdr *hdr; |
struct mqtthdr *hdr; |
mqtthdr_var_t *topic; |
mqtthdr_var_t *topic; |
mqtt_len_t *mid; |
mqtt_len_t *mid; |
Line 103 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
Line 103 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
hdr->mqtt_msg.qos = QOS; |
hdr->mqtt_msg.qos = QOS; |
hdr->mqtt_msg.dup = Dup ? 1 : 0; |
hdr->mqtt_msg.dup = Dup ? 1 : 0; |
hdr->mqtt_msg.retain = 0; |
hdr->mqtt_msg.retain = 0; |
*(u_int*) hdr->mqtt_len = n; | l = (u_int*) hdr->mqtt_len; |
| *l = n; |
data += siz; |
data += siz; |
|
|
/* variable header */ |
/* variable header */ |
Line 121 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
Line 122 mqtt_msgSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_su
|
*qos = t->sub_ret; |
*qos = t->sub_ret; |
} |
} |
|
|
return siz; | return siz + len; |
} |
} |
|
|
/* |
/* |
Line 186 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
Line 187 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
u_short msgID, u_char Dup, u_char QOS) |
u_short msgID, u_char Dup, u_char QOS) |
{ |
{ |
int len, siz = 0; |
int len, siz = 0; |
u_int n; | u_int n, *l; |
struct mqtthdr *hdr; |
struct mqtthdr *hdr; |
mqtthdr_var_t *topic; |
mqtthdr_var_t *topic; |
mqtt_len_t *mid; |
mqtt_len_t *mid; |
Line 227 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
Line 228 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
hdr->mqtt_msg.qos = QOS; |
hdr->mqtt_msg.qos = QOS; |
hdr->mqtt_msg.dup = Dup ? 1 : 0; |
hdr->mqtt_msg.dup = Dup ? 1 : 0; |
hdr->mqtt_msg.retain = 0; |
hdr->mqtt_msg.retain = 0; |
*(u_int*) hdr->mqtt_len = n; | l = (u_int*) hdr->mqtt_len; |
| *l = n; |
data += siz; |
data += siz; |
|
|
/* variable header */ |
/* variable header */ |
Line 243 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
Line 245 mqtt_msgUNSUBSCRIBE(mqtt_msg_t * __restrict buf, mqtt_
|
data += MQTTHDR_VAR_SIZEOF(topic); |
data += MQTTHDR_VAR_SIZEOF(topic); |
} |
} |
|
|
return siz; | return siz + len; |
} |
} |
|
|
/* |
/* |