while (1) {
memset(&msg,sizeof(msg),0);
- msg.expe = gras_trp_select(timeout - now + start);
+ msg.expe = gras_trp_select(timeout ? timeout - now + start : 0);
gras_msg_recv(msg.expe, &msg);
DEBUG0("Got a message from the socket");
}
}
} CATCH(e) {
+ free(msg.payl);
if (msg.type->kind == e_gras_msg_kind_rpccall) {
/* The callback raised an exception, propagate it on the network */
e.host = (char*)gras_os_myname();
default:
THROW1(unknown_error,0,
- "Cannot handle messages of kind %d yet",msg.type->kind);
+ "Cannot handle messages of kind %d yet",msg.type->kind);
}
}