This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.orgPau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/10656 Change subject: ipa: Simplify code in ipa_client_read ...................................................................... ipa: Simplify code in ipa_client_read By doing this change we remove a duplicated error code path and thus avoid having to maintain an extra code path with function pointers. Change-Id: Ic044894980ae2b882d99eb30d9df50066671d8f3 --- M src/input/ipa.c 1 file changed, 4 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/56/10656/1 diff --git a/src/input/ipa.c b/src/input/ipa.c index 995d2c3..26bf170 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -56,17 +56,13 @@ LOGIPA(link, LOGL_DEBUG, "message received\n"); ret = ipa_msg_recv_buffered(ofd->fd, &msg, &link->pending_msg); - if (ret < 0) { + if (ret <= 0) { if (ret == -EAGAIN) return; - if (ret == -EPIPE || ret == -ECONNRESET) + else if (ret == -EPIPE || ret == -ECONNRESET) LOGIPA(link, LOGL_ERROR, "lost connection with server\n"); - ipa_client_conn_close(link); - if (link->updown_cb) - link->updown_cb(link, 0); - return; - } else if (ret == 0) { - LOGIPA(link, LOGL_ERROR, "connection closed with server\n"); + else if (ret == 0) + LOGIPA(link, LOGL_ERROR, "connection closed with server\n"); ipa_client_conn_close(link); if (link->updown_cb) link->updown_cb(link, 0); -- To view, visit https://gerrit.osmocom.org/10656 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ic044894980ae2b882d99eb30d9df50066671d8f3 Gerrit-Change-Number: 10656 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180828/4b4d5a80/attachment.htm>