sideband.c: refactor recv_sideband()