aboutsummaryrefslogtreecommitdiffstats
path: root/src/usb.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-06-29 21:51:36 +0200
committerHarald Welte <laforge@osmocom.org>2020-06-29 23:09:27 +0200
commit4b1f06a47f5b2e41d81fb9452fa708185970779b (patch)
treecad5c1a597507aeb9fe3fc88927baabda30a8258 /src/usb.c
parentc98dbc2ba3d850cff8d8ebb89a440fb4f385e94d (diff)
Always log context (interface/line/timeslot) when available
We always want to know as much context as possible. Which exact timeslot on which line of which interface ha logged something? Change-Id: I3d8909b396928ed3c023b8ac47fa9ec72c99e681
Diffstat (limited to 'src/usb.c')
-rw-r--r--src/usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/usb.c b/src/usb.c
index 5d38d32..578bc34 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -118,7 +118,7 @@ e1_usb_xfer_out(struct e1_usb_flow *flow, uint8_t *buf, int size)
int fts;
if (size <= 0) {
- LOGP(DXFR, LOGL_ERROR, "OUT ERROR: %d\n", size);
+ LOGPLI(line, DXFR, LOGL_ERROR, "OUT ERROR: %d\n", size);
return -1;
}
@@ -144,10 +144,10 @@ e1_usb_xfer_fb(struct e1_usb_flow *flow, uint8_t *buf, int size)
struct e1_usb_line_data *ld = (struct e1_usb_line_data *) flow->line->drv_data;
if (size < 0) {
- LOGP(DE1D, LOGL_ERROR, "Feedback transfer error\n");
+ LOGPLI(flow->line, DE1D, LOGL_ERROR, "Feedback transfer error\n");
return 0;
} else if (size != 3) {
- LOGP(DE1D, LOGL_ERROR, "Feedback packet invalid size (%d)\n", size);
+ LOGPLI(flow->line, DE1D, LOGL_ERROR, "Feedback packet invalid size (%d)\n", size);
return 0;
}
@@ -193,7 +193,7 @@ _e1uf_xfr(struct libusb_transfer *xfr)
rv = libusb_submit_transfer(xfr);
if (rv)
- LOGP(DE1D, LOGL_ERROR, "Failed to resubmit buffer for transfer\n");
+ LOGPLI(flow->line, DE1D, LOGL_ERROR, "Failed to resubmit buffer for transfer\n");
}
static struct e1_usb_flow *