pespin submitted this change.
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(-)
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 change 38872. To unsubscribe, or for help writing mail filters, visit settings.