olsr_exit already prints the message
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
/* Extract size */
if ((cc = recv(fd, (void *)&pcklen, 2, MSG_PEEK)) != 2) { /* Win needs a cast */
if (cc <= 0) {
/* Extract size */
if ((cc = recv(fd, (void *)&pcklen, 2, MSG_PEEK)) != 2) { /* Win needs a cast */
if (cc <= 0) {
- fprintf(stderr, "Lost olsr_switch connection - exit!\n");
- olsr_exit(__func__, EXIT_FAILURE);
+ char buf[1024];
+ snprintf(buf, sizeof(buf), "%s: Lost olsr_switch connection", __func__);
+ olsr_exit(buf, EXIT_FAILURE);
}
fprintf(stderr, "[hust-emu] error extracting size(%d) %s!\n", cc, strerror(errno));
return;
}
fprintf(stderr, "[hust-emu] error extracting size(%d) %s!\n", cc, strerror(errno));
return;