From: Art Cancro Date: Thu, 1 Dec 2005 04:59:57 +0000 (+0000) Subject: * Shortened some of the string lengths in struct wcsession. We really don't X-Git-Tag: v7.86~4415 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=db253f6fade2e8286be0b5c911e7635b0c3c79c5 * Shortened some of the string lengths in struct wcsession. We really don't need all those 4096 byte moby-buffers everywhere. --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index c225cc25b..4e2da7653 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,5 +1,9 @@ $Id$ +Wed Nov 30 23:59:11 EST 2005 ajc +* Shortened some of the string lengths in struct wcsession. We really don't + need all those 4096 byte moby-buffers everywhere. + Tue Nov 29 23:53:33 EST 2005 ajc * Drag-and-drop move messages is now complete. diff --git a/webcit/iconbar.c b/webcit/iconbar.c index ca37f213a..f656a5191 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -86,7 +86,10 @@ void do_iconbar(void) { _("CITADEL") ); - wprintf("
  • switch to room list\n"); + wprintf("
  • " + "switch to room list" + "
    " + ); if (ib_summary) { wprintf("
  • back to menu..."); + wprintf("
  • " + "switch to menu" + "
    " + ); wprintf("\n"); diff --git a/webcit/roomops.c b/webcit/roomops.c index d7a98a2a1..2ba648fec 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -6,16 +6,6 @@ #include "webcit.h" -struct folder { - int floor; - char room[SIZ]; - char name[SIZ]; - int hasnewmsgs; - int is_mailbox; - int selectable; - int view; -}; - char floorlist[128][SIZ]; char *viewdefs[6]; @@ -2538,17 +2528,14 @@ void do_iconbar_view(struct folder *fold, int max_folders, int num_floors) { char buf[256]; char floor_name[256]; char old_floor_name[256]; - char boxtitle[256]; + char floordivtitle[256]; int levels, oldlevels; int i, t; - int nf; int num_drop_targets = 0; strcpy(floor_name, ""); strcpy(old_floor_name, ""); - nf = num_floors; - levels = 0; oldlevels = 0; for (i=0; i" - "%s
    \n", i, boxtitle); + "%s
    \n", i, floordivtitle); wprintf("
    ", i); } diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 2bf28597c..bbcd7c5d3 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -60,6 +60,7 @@ var drop_targets_elements = new Array(); var drop_targets_roomnames = new Array(); function switch_to_room_list() { + $('iconbar').innerHTML = $('iconbar').innerHTML.substr(0, $('iconbar').innerHTML.indexOf('switch')); new Ajax.Updater('iconbar', 'iconbar_ajax_rooms', { method: 'get' } ); } diff --git a/webcit/webcit.h b/webcit/webcit.h index 996def547..ec8728051 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -260,6 +260,17 @@ struct message_summary { int is_new; }; +/* Data structure for roomlist-to-folderlist conversion */ +struct folder { + int floor; + char room[SIZ]; + char name[SIZ]; + int hasnewmsgs; + int is_mailbox; + int selectable; + int view; +}; + /* * One of these is kept for each active Citadel session. * HTTP transactions are bound to one at a time. @@ -267,9 +278,9 @@ struct message_summary { struct wcsession { struct wcsession *next; /* Linked list */ int wc_session; /* WebCit session ID */ - char wc_username[SIZ]; - char wc_password[SIZ]; - char wc_roomname[SIZ]; + char wc_username[128]; + char wc_password[128]; + char wc_roomname[256]; int connected; int logged_in; int axlevel; @@ -286,18 +297,18 @@ struct wcsession { long uglsn; int upload_length; char *upload; - char upload_filename[SIZ]; - char upload_content_type[SIZ]; + char upload_filename[PATH_MAX]; + char upload_content_type[256]; int new_mail; int remember_new_mail; int need_regi; /* This user needs to register. */ int need_vali; /* New users require validation. */ - char cs_inet_email[SIZ]; /* User's preferred Internet addr. */ + char cs_inet_email[256]; /* User's preferred Internet addr. */ pthread_mutex_t SessionMutex; /* mutex for exclusive access */ time_t lastreq; /* Timestamp of most recent HTTP */ int killthis; /* Nonzero == purge this session */ struct march *march; /* march mode room list */ - char reply_to[SIZ]; /* reply-to address */ + char reply_to[512]; /* reply-to address */ long msgarr[10000]; /* for read operations */ int num_summ; @@ -307,8 +318,8 @@ struct wcsession { struct urlcontent *urlstrings; int HaveInstantMessages; /* Nonzero if incoming msgs exist */ struct wcsubst *vars; - char this_page[SIZ]; /* address of current page */ - char http_host[SIZ]; /* HTTP Host: header */ + char this_page[512]; /* address of current page */ + char http_host[512]; /* HTTP Host: header */ char *preferences; #ifdef WEBCIT_WITH_CALENDAR_SERVICE struct disp_cal { @@ -319,10 +330,10 @@ struct wcsession { #endif struct wc_attachment *first_attachment; char ImportantMessage[SIZ]; - char last_chat_user[SIZ]; + char last_chat_user[256]; int ctdl_pid; /* Session ID on the Citadel server */ - char httpauth_user[SIZ]; /* only for GroupDAV sessions */ - char httpauth_pass[SIZ]; /* only for GroupDAV sessions */ + char httpauth_user[256]; /* only for GroupDAV sessions */ + char httpauth_pass[256]; /* only for GroupDAV sessions */ size_t burst_len; char *burst; @@ -552,6 +563,7 @@ void begin_ajax_response(void); void end_ajax_response(void); void initialize_viewdefs(void); void initialize_axdefs(void); +void list_all_rooms_by_floor(char *viewpref); #ifdef WEBCIT_WITH_CALENDAR_SERVICE void display_edit_task(void);