Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:45:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith, neels, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662 )
Change subject: Add bsc_nat fsm
......................................................................
Patch Set 9:
(1 comment)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662/comment/de5b9106_5ce43c88
PS9, Line 96: talloc_free
> osmo_ss7_instance_destroy() does talloc_free(inst), so no need to free() it again.
ss7 is a lib pointer and inst is a bsc-nat app pointer. So osmo_ss7_instance_destroy() is probably not freeing inst like you suggest.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/26662
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I7d52fa649c397582b18a1a7dcc40bb407f3b2c97
Gerrit-Change-Number: 26662
Gerrit-PatchSet: 9
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:42:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27038 )
Change subject: osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
......................................................................
osmo_libusb: Use libusb_get_pollfds() to get initial file descriptors
It seems it is insufficient to register file-descriptor call-backs
with libusb_set_pollfd_notifiers(), but we also need to call
libusb_get_pollfds() once to get the initial set of file descriptors
which may have been created already during libusb_init().
As we don't have a libusb context before libusb_init() returns,
we cannot call libusb_set_pollfd_notifiers() early enough to be
active already during libusb_init().
Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
---
M src/usb/osmo_libusb.c
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/27038/1
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index a6f194a..79a8fc3 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -735,6 +735,8 @@
int osmo_libusb_init(libusb_context **pluctx)
{
libusb_context *luctx = NULL;
+ const struct libusb_pollfd **pfds;
+
int rc;
rc = libusb_init(pluctx);
@@ -750,6 +752,17 @@
libusb_set_pollfd_notifiers(luctx, osmo_usb_added_cb, osmo_usb_removed_cb, luctx);
+ /* get the initial file descriptors which were created even before during libusb_init() */
+ pfds = libusb_get_pollfds(luctx);
+ if (pfds) {
+ const struct libusb_pollfd **pfds2 = pfds;
+ const struct libusb_pollfd *pfd;
+ /* synthesize 'add' call-backs. not sure why libusb doesn't do that by itself? */
+ for (pfd = *pfds2; pfd; pfd = *++pfds2)
+ osmo_usb_added_cb(pfd->fd, pfd->events, luctx);
+ libusb_free_pollfds(pfds);
+ }
+
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27038
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf81014d689ffa738719af68120fa2dedbeec689
Gerrit-Change-Number: 27038
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030 )
Change subject: bsc_nat_fsm: initial msc <> bsc msg forwarding
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc-nat/bsc_nat_fsm.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030/comment/631ce2f9_80eca6a0
PS2, Line 139: msg = msgb_copy(oph->msg, NULL);
> Why copying & freeing the msg instead of simply passing it forward?
I've tried this at first, but it didn't work - after dumping the message needed and msg I figured that everything from l2h needs to be in l3h, see the code below. Or is there a simpler way to do this?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/27030
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I4af398bb433341a98f818822e6c3af28b6d9dacd
Gerrit-Change-Number: 27030
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:31:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27024 )
Change subject: log: socket.c: rather use the osmo_sockaddr_str _FMT
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27024
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Idbe7582b2b7f14540919e911dad08af6d491f68f
Gerrit-Change-Number: 27024
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 31 Jan 2022 17:27:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment