Change in osmo-e1-recorder[master]: e1cap_dump: fix superchannel without pcap output

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Nov 27 00:17:44 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187 )

Change subject: e1cap_dump: fix superchannel without pcap output
......................................................................

e1cap_dump: fix superchannel without pcap output

We have to check if g_pcap_fd is >= 0,as we initialize it to -1.

Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977
---
M src/e1cap_dump.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  pespin: Looks good to me, approved
  laforge: Verified



diff --git a/src/e1cap_dump.c b/src/e1cap_dump.c
index 027aa82..c172b55 100644
--- a/src/e1cap_dump.c
+++ b/src/e1cap_dump.c
@@ -78,7 +78,7 @@
 static void handle_hdlc_frame_content(const uint8_t *data, unsigned int len,
 				      void *priv)
 {
-	if (g_pcap_fd && len >= 4) {
+	if (g_pcap_fd >= 0 && len >= 4) {
 		uint8_t *cur = msgb_put(g_pcap_msg, len-2);
 		memcpy(cur, data, len-2);
 		printf("==> %s\n", msgb_hexdump(g_pcap_msg));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/16187
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1-recorder
Gerrit-Branch: master
Gerrit-Change-Id: I458c02b4619b6fb2c7d30b1ce3bbac86243a6977
Gerrit-Change-Number: 16187
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191127/e4fe0aa1/attachment.htm>


More information about the gerrit-log mailing list