[S] Change in libosmocore[master]: gmstap_util: Fix sending out gsmtap messages
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35055?usp=email ) Change subject: gmstap_util: Fix sending out gsmtap messages ...................................................................... gmstap_util: Fix sending out gsmtap messages Previously undetected, because the vty command 'gsmtap log ...' never used write queue mode Change-Id: I88ba8984518d2d0327cfacd0d2cdf33c7e1d091b --- M src/core/gsmtap_util.c 1 file changed, 21 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c index d817885..b64c7b0 100644 --- a/src/core/gsmtap_util.c +++ b/src/core/gsmtap_util.c @@ -491,16 +491,21 @@ if (ofd_wq_mode) { gti->out = osmo_iofd_setup(gti, gti->wq.bfd.fd, "gsmtap_inst.io_fd", OSMO_IO_FD_MODE_READ_WRITE, &gsmtap_ops, NULL); - if (gti->out == NULL) { - talloc_free(gti); - close(fd); - return NULL; - } + if (gti->out == NULL) + goto err_cleanup; + if (osmo_iofd_register(gti->out, gti->wq.bfd.fd) < 0) + goto err_cleanup; + /* osmo write queue previously used was set up with value of 64 */ osmo_iofd_set_txqueue_max_length(gti->out, 64); } return gti; + +err_cleanup: + talloc_free(gti); + close(fd); + return NULL; } /*! Open GSMTAP source socket, connect and register osmo_fd -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35055?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I88ba8984518d2d0327cfacd0d2cdf33c7e1d091b Gerrit-Change-Number: 35055 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: jolly <andreas@eversberg.eu> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (1)
-
laforge