pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-netif/+/38872?usp=email )
Change subject: examples/ipa-stream-client: Fix wrong call to osmo_ipa_process_msg()
......................................................................
examples/ipa-stream-client: Fix wrong call to osmo_ipa_process_msg()
The function osmo_ipa_process_msg() is already called internally by the
segmentation callback osmo_ipa_segmentation_cb(), which calls
ipa_check_pull_headers() which in turn calls osmo_ipa_process_msg().
The program was still working because it was using msg->data which isn't
modified by osmo_ipa_process_msg(), but the l2h pointer was incorrectly
modified.
Change-Id: Idec574f59587c681dd059266c9a9cf244bf41dc3
---
M examples/ipa-stream-client.c
1 file changed, 1 insertion(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/72/38872/1
diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c
index b58370e..2604266 100644
--- a/examples/ipa-stream-client.c
+++ b/examples/ipa-stream-client.c
@@ -115,13 +115,7 @@
return 0;
}
- if (osmo_ipa_process_msg(msg) < 0) {
- LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n");
- msgb_free(msg);
- return 0;
- }
-
- num = osmo_load32be(msg->data);
+ num = osmo_load32be(msgb_l2(msg));
LOGP(DLINP, LOGL_DEBUG, "received msg number %d\n", num);
llist_for_each_entry_safe(cur, tmp, &msg_sent_list, head) {
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/38872?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Idec574f59587c681dd059266c9a9cf244bf41dc3
Gerrit-Change-Number: 38872
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>