non-blocking rpc receive

we already drop the lock between sending and receiving the rpc packets. now making it so that receive doesn't block for too long (ie 100ms) before unlocking the socket. this is needed for the callback. original rpc is sent and it triggers a callback from the server. we fork another thread to handle it, ie it needs to send a deleg_return rpc. if original rpc gets control and blocks on trying to receive its reply, it'll timeout and original rpc will return an error. instead we need to not block for long and allow the deleg_return to go thru so that the server can reply successfully to the original rpc.
This commit is contained in:
Olga Kornievskaia 2011-03-08 10:59:13 -05:00 committed by unknown
parent d7e438be5e
commit 741e8bf0bf
5 changed files with 77 additions and 62 deletions

View file

@ -913,7 +913,7 @@ void log_hexdump(bool_t on, const u_char *title, const u_char *buf,
if (!on) return;
fprintf(fd_out, "%s\n", title);
fprintf(fd_out, "%04x: %s (len=%d)\n", GetCurrentThreadId(), title, len);
for (i = 0; i < len; i += 0x10) {
fprintf(fd_out, " %04x: ", (u_int)(i + offset));
jm = len - i;