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.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/20074 ) Change subject: src/ctl.c: Log NOTICE messages whenever client send unexpected requests ...................................................................... src/ctl.c: Log NOTICE messages whenever client send unexpected requests Change-Id: Icd47de13ab84b89ce5fb21c24713bae760611d32 --- M src/ctl.c 1 file changed, 16 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/ctl.c b/src/ctl.c index fee96f8..8da21fd 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -360,16 +360,22 @@ /* Process query and find timeslot */ intf = e1d_find_intf(e1d, hdr->intf); - if (!intf) + if (!intf) { + LOGP(DE1D, LOGL_NOTICE, "Client request for non-existant Interface %u\n", hdr->intf); return 0; + } line = e1_intf_find_line(intf, hdr->line); - if (!line) + if (!line) { + LOGPIF(intf, DE1D, LOGL_NOTICE, "Client request for non-existant line %u\n", hdr->line); return 0; + } ts = _e1d_get_ts(line, hdr->ts); - if (!ts) + if (!ts) { + LOGPLI(line, DE1D, LOGL_NOTICE, "Client request for non-existant ts %u\n", hdr->ts); return 0; + } /* Select mode */ switch (cfg->mode) { @@ -380,19 +386,24 @@ mode = E1_TS_MODE_HDLCFCS; break; default: + LOGPTS(ts, DE1D, LOGL_NOTICE, "Client request for unknown mode %u\n", cfg->mode); return 0; } - if (cfg->read_bufsize == 0) + if (cfg->read_bufsize == 0) { + LOGPTS(ts, DE1D, LOGL_NOTICE, "Client request for invalid bufsize %u\n", cfg->read_bufsize); return 0; + } /* If already open, close previous */ e1_ts_stop(ts); /* Init */ ret = _e1d_ts_start(ts, mode, cfg->read_bufsize); - if (ret < 0) + if (ret < 0) { + LOGPTS(ts, DE1D, LOGL_ERROR, "Unable to start timeslot: %d\n", ret); return ret; + } *rfd = ret; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/20074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Icd47de13ab84b89ce5fb21c24713bae760611d32 Gerrit-Change-Number: 20074 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Assignee: tnt <tnt at 246tNt.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: tnt <tnt at 246tNt.com> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200912/1c7f6d07/attachment.htm>