From 4a0cdfc84be21d8bd730895c4ec2016b76702ae4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Wed, 16 Jan 2008 22:04:40 +0000 Subject: [PATCH] * don't overrun our room list. --- webcit/Makefile.in | 2 +- webcit/buildpackages | 2 ++ webcit/messages.c | 7 ++++++- webcit/roomops.c | 13 ++++++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 07ebf02cc..6b2a321b9 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -28,7 +28,7 @@ all: all-progs-recursive webserver setup .SUFFIXES: .cpp .c .o clean: - rm -f *.o webcit webserver + rm -f *.o webcit webserver setup rm -fr locale/* distclean: clean diff --git a/webcit/buildpackages b/webcit/buildpackages index bdd78929c..2a1cd657b 100755 --- a/webcit/buildpackages +++ b/webcit/buildpackages @@ -9,6 +9,8 @@ PACKAGE_VERSION=`cat packageversion` DATE=`date '+%a, %d %b %Y %H:%I:00 %z'` ACTUAL_DIR=`pwd` + +rm -rf debian/citadel-webcit debian/tmp/ if echo "$ACTUAL_DIR" |grep -q "$WEBCIT_VERSION"; then echo "directory ($ACTUAL_DIR) naming scheme seems right. nothing done." else diff --git a/webcit/messages.c b/webcit/messages.c index 532005137..79d39fdf6 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1655,7 +1655,12 @@ void display_summarized(int num) { ); wprintf("", SUBJ_COL_WIDTH_PCT); - escputs(WC->summ[num].subj); + +#ifdef HAVE_ICONV + utf8ify_rfc822_string(WC->summ[num].subj); + utf8ify_rfc822_string(WC->summ[num].from); +#endif + escputs(WC->summ[num].subj);//////////////////////////////////TODO: QP DECODE wprintf(""); wprintf("", SENDER_COL_WIDTH_PCT); diff --git a/webcit/roomops.c b/webcit/roomops.c index 8a03c30bb..6c8ba2c53 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -5,7 +5,8 @@ #include "webcit.h" -char floorlist[128][SIZ]; /**< list of our floor names */ +#define MAX_FLOORS 128 +char floorlist[MAX_FLOORS][SIZ]; /**< list of our floor names */ char *viewdefs[9]; /**< the different kinds of available views */ @@ -52,7 +53,7 @@ void load_floorlist(void) int a; char buf[SIZ]; - for (a = 0; a < 128; ++a) + for (a = 0; a < MAX_FLOORS; ++a) floorlist[a][0] = 0; serv_puts("LFLR"); @@ -2864,7 +2865,13 @@ void room_to_folder(char *folder, char *room, int floor, int is_mailbox) * Otherwise, prefix the floor name as a "public folders" moniker */ else { - sprintf(folder, "%s|%s", floorlist[floor], room); + if (floor > MAX_FLOORS) { + wc_backtrace (); + sprintf(folder, "%%%%%|%s", room); + } + else { + sprintf(folder, "%s|%s", floorlist[floor], room); + } } /** -- 2.30.2