version 1.2.2.6, 2012/06/29 15:43:13
|
version 1.2.2.7, 2012/07/02 12:52:19
|
Line 32 srv_Socket(cfg_root_t * __restrict cfg)
|
Line 32 srv_Socket(cfg_root_t * __restrict cfg)
|
return -1; |
return -1; |
} |
} |
|
|
|
ioDEBUG(7, "Created socket=%d\n", s); |
return s; |
return s; |
} |
} |
|
|
Line 40 srv_Close(int s)
|
Line 41 srv_Close(int s)
|
{ |
{ |
ioTRACE(2); |
ioTRACE(2); |
|
|
|
ioDEBUG(7, "Closing socket=%d\n", s); |
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); |
|
} |
} |