* [Patch 3/7] tabled: Stub NULL session in events
@ 2010-04-02 1:51 Pete Zaitcev
0 siblings, 0 replies; only message in thread
From: Pete Zaitcev @ 2010-04-02 1:51 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Project Hail List
Currently ncld has a bug that causes it to report a session failure
when session was not open yet. So, if a session fails to open,
application crashes while trying to print the SID. This problem
made this crash occur easily.
Unfortunately for us, there's more to it. If the library opened
session, but is pre-empted before ncld_sess_open returns, the
same situation may occur legitimately. So this check is still
needed, unless we radically change the locking strategy.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
---
server/cldu.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
commit 446e8ca93ce624797a69841f38081faa369fee4a
Author: Pete Zaitcev <zaitcev@yahoo.com>
Date: Thu Apr 1 19:09:34 2010 -0600
Stub the problem with failure to open.
diff --git a/server/cldu.c b/server/cldu.c
index aecf336..fadc3d8 100644
--- a/server/cldu.c
+++ b/server/cldu.c
@@ -176,8 +176,11 @@ static void cldu_sess_event(void *priv, uint32_t what)
struct cld_session *sp = priv;
if (what == CE_SESS_FAILED) {
- applog(LOG_ERR, "Session failed, sid " SIDFMT,
- SIDARG(sp->nsp->udp->sess->sid));
+ if (sp->nsp)
+ applog(LOG_ERR, "Session failed, sid " SIDFMT,
+ SIDARG(sp->nsp->udp->sess->sid));
+ else
+ applog(LOG_ERR, "Session open failed");
sp->is_dead = true;
} else {
if (sp->nsp)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-02 1:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 1:51 [Patch 3/7] tabled: Stub NULL session in events Pete Zaitcev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.