static Msg *read_from_box(Connection *conn, Boxc *boxconn) { Msg *msg; while (boxconn->alive) { switch (read_from_bearerbox_real(conn, &msg, 1.0)) { case -1: /* connection to bearerbox lost */ return NULL; break; case 0: /* all is well */ return msg; break; case 1: /* timeout */ break; } } return NULL; }
int read_from_bearerbox(Msg **msg, double seconds) { return read_from_bearerbox_real(bb_conn, msg, seconds); }