From 243f0f47cf65910ed5558f9a4992d4d3d8ab03b6 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 23 Jan 2006 20:34:40 +0000 Subject: [PATCH] Added logging for crash during chatsessions --- ChangeLog | 1 + mbtask/taskcomm.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dca496aa..095eff8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ v0.83.8 22-Jan-2006 mbtask: Added logging of some user messages to chat.log + Added logging for crashes during chatsessions. v0.83.7 31-Dec-2005 - 22-Jan-2006 diff --git a/mbtask/taskcomm.c b/mbtask/taskcomm.c index eae77a63..83983fc8 100644 --- a/mbtask/taskcomm.c +++ b/mbtask/taskcomm.c @@ -4,7 +4,7 @@ * Purpose ...............: MBSE BBS Daemon * ***************************************************************************** - * Copyright (C) 1997-2005 + * Copyright (C) 1997-2006 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -652,7 +652,11 @@ void *cmd_thread(void) memset(&buf, 0, sizeof(buf)); fromlen = sizeof(from); rlen = recvfrom(sock, buf, sizeof(buf) -1, 0, (struct sockaddr *)&from, &fromlen); - do_cmd(buf); + if (rlen == -1) { + Syslog('?', "$recvfrom()"); + } else { + do_cmd(buf); + } } else { Syslog('-', "Return poll rc=%d, events=%04x", rc, pfd.revents); }