version 1.2.2.9, 2012/05/27 10:04:05
|
version 1.2.2.10, 2012/05/28 08:24:07
|
Line 56 Subscribe(int sock, FILE *lf)
|
Line 56 Subscribe(int sock, FILE *lf)
|
u_short mid; |
u_short mid; |
mqtt_subscr_t *sub; |
mqtt_subscr_t *sub; |
|
|
|
#ifdef __NetBSD__ |
|
srandom(getpid() ^ time(NULL)); |
|
#else |
srandomdev(); |
srandomdev(); |
|
#endif |
mid = random() % USHRT_MAX; |
mid = random() % USHRT_MAX; |
|
|
printf(" > Execute SUBSCRIBE request #%d ... ", mid); |
printf(" > Execute SUBSCRIBE request #%d ... ", mid); |
Line 80 Unsubscribe(int sock)
|
Line 84 Unsubscribe(int sock)
|
{ |
{ |
u_short mid; |
u_short mid; |
|
|
|
#ifdef __NetBSD__ |
|
srandom(getpid() ^ time(NULL)); |
|
#else |
srandomdev(); |
srandomdev(); |
|
#endif |
mid = random() % USHRT_MAX; |
mid = random() % USHRT_MAX; |
|
|
printf(" > Execute UNSUBSCRIBE request #%d ... ", mid); |
printf(" > Execute UNSUBSCRIBE request #%d ... ", mid); |