aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon/gsm_data.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-01-17 15:17:36 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-03-06 23:20:30 +0100
commita4540b2c3bd9875d311d065f1f912e21758b7ae4 (patch)
tree751c84842666919b5dcc790d0b488d0d1aa24347 /openbsc/src/libcommon/gsm_data.c
parentec6e4f8b3d1f304ee1c6ca73ee47290642ac380a (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.
Diffstat (limited to 'openbsc/src/libcommon/gsm_data.c')
0 files changed, 0 insertions, 0 deletions