diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-04-05 01:07:25 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2011-04-05 01:07:25 +0000 |
commit | 375a44d5c32d7c4684d4fff4f0774554fbf3fe47 (patch) | |
tree | cb156348912601a2d38730169f9fb9f509d8da3c | |
parent | 51ba8d7b1a57078dab71c00043b9ec98fce3e440 (diff) |
Log the SessionName so that it is possible to understand which session
caused the problem.
-rw-r--r-- | usr.sbin/iscsid/connection.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/iscsid/connection.c b/usr.sbin/iscsid/connection.c index c70944903b8..5685fbcf269 100644 --- a/usr.sbin/iscsid/connection.c +++ b/usr.sbin/iscsid/connection.c @@ -1,4 +1,4 @@ -/* $OpenBSD: connection.c,v 1.7 2011/01/10 12:53:32 claudio Exp $ */ +/* $OpenBSD: connection.c,v 1.8 2011/04/05 01:07:24 claudio Exp $ */ /* * Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org> @@ -280,9 +280,9 @@ conn_fsm(struct connection *c, enum c_event event) for (i = 0; fsm[i].action != NULL; i++) { if (c->state & fsm[i].state && event == fsm[i].event) { ns = fsm[i].action(c, event); - log_debug("conn_fsm: %s ev %s -> %s", - conn_state(c->state), conn_event(event), - conn_state(ns)); + log_debug("conn_fsm[%s]: %s ev %s -> %s", + c->session->config.SessionName, conn_state(c->state), + conn_event(event), conn_state(ns)); if (ns == -1) /* XXX better please */ fatalx("conn_fsm: action failed"); @@ -290,8 +290,9 @@ conn_fsm(struct connection *c, enum c_event event) return; } } - log_warnx("conn_fsm: unhandled state transition [%s, %s]", - conn_state(c->state), conn_event(event)); + log_warnx("conn_fsm[%s]: unhandled state transition [%s, %s]", + c->session->config.SessionName, conn_state(c->state), + conn_event(event)); fatalx("bork bork bork"); } |