fix C90 warnings

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
[bug fix] -multithreaded session was closed if not message wassend via thread's
connection