From 66be187b245fcea0d6728d7c9e3c33b972a70478 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 9 Jan 2003 09:07:13 +0000 Subject: [PATCH] Fixed bug with missing thread head SVN revision: 327 --- elogd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/elogd.c b/elogd.c index 14cbee8d..9d8177cd 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 2.128 2003/01/09 09:07:13 midas + Fixed bug with missing thread head + Revision 2.127 2003/01/09 08:47:52 midas Added 'title bgcolor' and 'title fontcolor' in config file @@ -7910,10 +7913,21 @@ LOGBOOK *lbs_cur; if (msg_list[index].lbs->el_index[i].message_id == message_id) break; + /* stop if not found */ + if (i == *msg_list[index].lbs->n_el_index) + break; + in_reply_to_id = msg_list[index].lbs->el_index[i].in_reply_to; } while (in_reply_to_id); - + + /* if head not found, skip message */ + if (i == *msg_list[index].lbs->n_el_index) + { + msg_list[index].lbs = NULL; + continue; + } + /* check if message head already in list */ for (j=0 ; j