version 1.2.2.5, 2012/06/29 08:47:28
|
version 1.2.2.6, 2012/06/29 15:43:13
|
Line 1
|
Line 1
|
#include "global.h" |
#include "global.h" |
#include "mqttd.h" |
#include "mqttd.h" |
|
#include "mqttd_calls.h" |
|
|
|
|
inline int |
inline int |
Line 40 srv_Close(int s)
|
Line 41 srv_Close(int s)
|
ioTRACE(2); |
ioTRACE(2); |
|
|
return mqtt_srv_Destroy(s); |
return mqtt_srv_Destroy(s); |
|
} |
|
|
|
inline int |
|
srv_Will(struct tagSession * __restrict sess) |
|
{ |
|
int ret = 0; |
|
|
|
ioTRACE(2); |
|
|
|
ret = mqtt_msgPUBLISH(sess->sess_buf, sess->sess_will.topic, 0xDEAD, 0, 1, 0, |
|
sess->sess_will.msg, sess->sess_will.msg ? strlen(sess->sess_will.msg) : 0); |
|
if (ret == -1) |
|
return -1; /* error */ |
|
else |
|
return cmdPUBLISH(sess->sess_srv, ret, sess); |
} |
} |