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/+/19058 ) Change subject: extend logging (log more noteworthy events) ...................................................................... extend logging (log more noteworthy events) Let's log some more events that might happen. Change-Id: I37fd290f0f0621fbf6e20e33fa709efc14df94c7 --- M src/ctl.c M src/intf_line.c 2 files changed, 16 insertions(+), 2 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 1fa5d84..b29e990 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -31,11 +31,13 @@ #include <osmocom/core/isdnhdlc.h> #include <osmocom/core/msgb.h> +#include <osmocom/core/logging.h> #include <osmocom/e1d/proto.h> #include <osmocom/e1d/proto_srv.h> #include "e1d.h" +#include "log.h" struct e1_intf * @@ -94,6 +96,8 @@ void e1_ts_stop(struct e1_ts *ts) { + LOGPTS(ts, DE1D, LOGL_INFO, "Stopping\n"); + ts->mode = E1_TS_MODE_OFF; if (ts->fd >= 0) { @@ -107,6 +111,8 @@ { int ret, sd[2]; + LOGPTS(ts, DE1D, LOGL_INFO, "Starting in mode %u\n", mode); + ret = socketpair(AF_UNIX, SOCK_SEQPACKET, 0, sd); if (ret < 0) return ret; diff --git a/src/intf_line.c b/src/intf_line.c index 305f5dd..a1fbc0f 100644 --- a/src/intf_line.c +++ b/src/intf_line.c @@ -64,6 +64,8 @@ llist_add_tail(&intf->list, &e1d->interfaces); + LOGPIF(intf, DE1D, LOGL_NOTICE, "Created\n"); + return intf; } @@ -72,6 +74,8 @@ { struct e1_line *line, *line2; + LOGPIF(intf, DE1D, LOGL_NOTICE, "Destroying\n"); + /* destroy all lines */ llist_for_each_entry_safe(line, line2, &intf->lines, list) e1_line_destroy(line); @@ -107,12 +111,16 @@ llist_add_tail(&line->list, &intf->lines); + LOGPLI(line, DE1D, LOGL_NOTICE, "Created\n"); + return line; } void e1_line_destroy(struct e1_line *line) { + LOGPLI(line, DE1D, LOGL_NOTICE, "Destroying\n"); + /* close all [peer] file descriptors */ for (int i=0; i<32; i++) e1_ts_stop(&line->ts[i]); @@ -243,7 +251,7 @@ } if (l < 0 && errno != EAGAIN) { - LOGP(DE1D, LOGL_ERROR, "dead socket during read: %s\n", + LOGPTS(ts, DE1D, LOGL_ERROR, "dead socket during read: %s\n", strerror(errno)); e1_ts_stop(ts); } @@ -300,7 +308,7 @@ continue; } if (rv < 0 && errno != EAGAIN) { - LOGP(DE1D, LOGL_ERROR, "dead socket during write: %s\n", + LOGPTS(ts, DE1D, LOGL_ERROR, "dead socket during write: %s\n", strerror(errno)); e1_ts_stop(ts); } -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/19058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I37fd290f0f0621fbf6e20e33fa709efc14df94c7 Gerrit-Change-Number: 19058 Gerrit-PatchSet: 2 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/20200630/b9f207f9/attachment.htm>