version 1.2.2.7, 2012/05/27 10:04:05
|
version 1.2.2.9, 2012/06/20 09:23:28
|
Line 52 Publish(int sock)
|
Line 52 Publish(int sock)
|
int siz = 0; |
int siz = 0; |
u_short mid = 0; |
u_short mid = 0; |
|
|
|
#ifdef __NetBSD__ |
|
srandom(getpid() ^ time(NULL)); |
|
#else |
srandomdev(); |
srandomdev(); |
|
#endif |
mid = random() % USHRT_MAX; |
mid = random() % USHRT_MAX; |
|
|
printf(" > Execute PUBLISH request #%d ... ", mid); |
printf(" > Execute PUBLISH request #%d ... ", mid); |
Line 62 Publish(int sock)
|
Line 66 Publish(int sock)
|
printf("Error:: Publish #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
printf("Error:: Publish #%d - %s\n", mqtt_GetErrno(), mqtt_GetError()); |
return -1; |
return -1; |
} else |
} else |
printf("OK\n"); | printf("Sended %d bytes \n", siz); |
|
|
return siz; |
return siz; |
} |
} |