pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39326?usp=email )
Change subject: server: Log unable to figure out pcap vs pcapng ......................................................................
server: Log unable to figure out pcap vs pcapng
Change-Id: I110456f142cab88ba9d51409b66d66cf093adb9f --- M src/osmo_server_network.c 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index 66d0894..a6db562 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -28,6 +28,7 @@ #include <osmocom/core/socket.h> #include <osmocom/core/talloc.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/utils.h>
#include <arpa/inet.h> #include <sys/socket.h> @@ -124,8 +125,11 @@ int rc;
rc = osmo_pcap_file_discover_fmt(data->data, data->len, &conn->file_fmt); - if (rc < 0) + if (rc < 0) { + LOGP(DSERVER, LOGL_ERROR, "Unable to figure out pcap vs pcapng file format (len=%u): %s\n", + data->len, osmo_hexdump(data->data, OSMO_MIN(data->len, 32))); return rc; + }
if (conn->file_fmt == OSMO_PCAP_FMT_PCAPNG) { rc = osmo_pcapng_file_is_swapped(data->data, data->len);