commit | a4540b2c3bd9875d311d065f1f912e21758b7ae4 | [log] [tgz] |
---|---|---|
author | Daniel Willmann <dwillmann@sysmocom.de> | Fri Jan 17 15:17:36 2014 +0100 |
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Thu Mar 06 23:20:30 2014 +0100 |
tree | 751c84842666919b5dcc790d0b488d0d1aa24347 | |
parent | ec6e4f8b3d1f304ee1c6ca73ee47290642ac380a [diff] |
smpp_smsc: Fix socket read() error handling Read returning -1 is an error here so make sure to print the actual reason and close the socket. Before this patch we just looped over the fd with read returning -1 every time. EINTR is handled to not cause an error and we don't need to check EAGAIN/EWOULDBLOCK since the callback is only called in case there is something to read. To avoid copy&paste issues the check is implemented as a macro and the log message moved into a separate if.