From a37917d69689bdfc4b4e25e9388ca731404340c6 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 19 Jan 2005 03:03:37 +0000 Subject: [PATCH] * Minor and/or cosmetic changes made during x64 troubleshooting --- citadel/ChangeLog | 4 +++- citadel/citadel_ipc.c | 4 ++-- citadel/citadel_ipc.h | 6 +++--- citadel/citserver.c | 2 +- citadel/database_sleepycat.c | 8 ++++---- citadel/imap_fetch.c | 3 +-- citadel/locate_host.c | 2 +- citadel/messages.c | 2 +- citadel/mime_parser.c | 2 +- citadel/msgbase.c | 4 ++-- citadel/serv_extensions.h | 1 + citadel/server.h | 4 ++-- citadel/sysdep_decls.h | 2 +- citadel/user_ops.c | 2 -- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 060128543..24049771e 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 629.7 2005/01/19 03:03:36 ajc + * Minor and/or cosmetic changes made during x64 troubleshooting + Revision 629.6 2005/01/18 17:58:38 ajc * Trying to fix IMAP brokenness on Linux-x64. Committing changes even though there are a lot of annoying trace messages in this tree, because @@ -6277,4 +6280,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel_ipc.c b/citadel/citadel_ipc.c index d0d68b6fb..3dff0505e 100644 --- a/citadel/citadel_ipc.c +++ b/citadel/citadel_ipc.c @@ -2826,7 +2826,7 @@ static void CtdlIPC_getline(CtdlIPC* ipc, char *buf) void CtdlIPC_chat_recv(CtdlIPC* ipc, char* buf) { - return CtdlIPC_getline(ipc, buf); + CtdlIPC_getline(ipc, buf); } /* @@ -2856,7 +2856,7 @@ static void CtdlIPC_putline(CtdlIPC *ipc, const char *buf) void CtdlIPC_chat_send(CtdlIPC* ipc, const char* buf) { - return CtdlIPC_putline(ipc, buf); + CtdlIPC_putline(ipc, buf); } diff --git a/citadel/citadel_ipc.h b/citadel/citadel_ipc.h index e077ea052..10c5d589f 100644 --- a/citadel/citadel_ipc.h +++ b/citadel/citadel_ipc.h @@ -157,7 +157,7 @@ enum RoomList { SubscribedRoomsWithNoNewMessages, UnsubscribedRooms, AllAccessibleRooms, - AllPublicRooms, + AllPublicRooms }; #define AllFloors -1 enum MessageList { @@ -167,11 +167,11 @@ enum MessageList { LastMessages, FirstMessages, MessagesGreaterThan, - MessagesLessThan, + MessagesLessThan }; enum MessageDirection { ReadReverse = -1, - ReadForward = 1, + ReadForward = 1 }; /* Shared Diffie-Hellman parameters */ diff --git a/citadel/citserver.c b/citadel/citserver.c index eda6a754e..967e863bd 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -887,7 +887,7 @@ void begin_session(struct CitContext *con) strcpy(con->fake_hostname, ""); strcpy(con->fake_roomname, ""); generate_nonce(con); - snprintf(con->temp, sizeof con->temp, tmpnam(NULL)); + safestrncpy(con->temp, tmpnam(NULL), sizeof con->temp); safestrncpy(con->cs_host, config.c_fqdn, sizeof con->cs_host); safestrncpy(con->cs_addr, "", sizeof con->cs_addr); con->cs_host[sizeof con->cs_host - 1] = 0; diff --git a/citadel/database_sleepycat.c b/citadel/database_sleepycat.c index 94fc73ee1..b2b2a691f 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -466,9 +466,9 @@ void cdb_decompress_if_necessary(struct cdbdata *cdb) { uncompressed_data = malloc(zheader.uncompressed_len); if (uncompress( (Bytef *) uncompressed_data, - &destLen, - compressed_data, - sourceLen + (uLongf *)&destLen, + (const Bytef *)compressed_data, + (uLong)sourceLen ) != Z_OK) { lprintf(CTDL_EMERG, "uncompress() error\n"); abort(); @@ -761,7 +761,7 @@ void cdb_rewind(int cdb) if (MYCURSORS[cdb] != NULL) { lprintf(CTDL_EMERG, "cdb_rewind: must close cursor on database %d before reopening.\n", cdb); abort(); - //cclose(MYCURSORS[cdb]); + /* cclose(MYCURSORS[cdb]); */ } /* diff --git a/citadel/imap_fetch.c b/citadel/imap_fetch.c index 810948244..86088b79c 100644 --- a/citadel/imap_fetch.c +++ b/citadel/imap_fetch.c @@ -936,8 +936,7 @@ void imap_fetch_bodystructure (long msgnum, char *item, * imap_do_fetch() calls imap_do_fetch_msg() to output the data of an * individual message, once it has been selected for output. */ -void imap_do_fetch_msg(int seq, - int num_items, char **itemlist) { +void imap_do_fetch_msg(int seq, int num_items, char **itemlist) { int i; struct CtdlMessage *msg = NULL; diff --git a/citadel/locate_host.c b/citadel/locate_host.c index 3bcecf5a5..c19f92316 100644 --- a/citadel/locate_host.c +++ b/citadel/locate_host.c @@ -140,7 +140,7 @@ int rbl_check(char *message_to_spammer) { struct sockaddr_in sin; int len; /* should be socklen_t but doesn't work on Macintosh */ - if (!getpeername(CC->client_socket, (struct sockaddr *) &sin, &len)) { + if (!getpeername(CC->client_socket, (struct sockaddr *) &sin, (socklen_t *)&len)) { return(rbl_check_addr(&sin.sin_addr, message_to_spammer)); } return(0); diff --git a/citadel/messages.c b/citadel/messages.c index f3e6ccc37..8e1f12884 100644 --- a/citadel/messages.c +++ b/citadel/messages.c @@ -1426,7 +1426,7 @@ void image_view(CtdlIPC *ipc, unsigned long msg) void *file = NULL; /* The downloaded file */ int r; - // view image + /* view image */ found = -found; r = CtdlIPCAttachmentDownload(ipc, msg, ptr->number, &file, progress, buf); if (r / 100 != 2) { diff --git a/citadel/mime_parser.c b/citadel/mime_parser.c index 321a2df32..fa691c370 100644 --- a/citadel/mime_parser.c +++ b/citadel/mime_parser.c @@ -71,7 +71,7 @@ int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) { char buf[SIZ]; int buf_length = 0; int soft_line_break = 0; - int ch; + unsigned int ch; int decoded_length = 0; int i; diff --git a/citadel/msgbase.c b/citadel/msgbase.c index ec06acaca..e8e51eb93 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -1580,7 +1580,7 @@ void cmd_msg3(char *cmdbuf) } cprintf("%d %ld\n", BINARY_FOLLOWS, (long)smr.len); - client_write(smr.ser, smr.len); + client_write((char *)smr.ser, (int)smr.len); free(smr.ser); } @@ -1859,7 +1859,7 @@ void serialize_message(struct ser_ret *ret, /* return values */ for (i=0; i<26; ++i) if (msg->cm_fields[(int)forder[i]] != NULL) { ret->ser[wlen++] = (char)forder[i]; - strcpy(&ret->ser[wlen], msg->cm_fields[(int)forder[i]]); + strcpy((char *)&ret->ser[wlen], msg->cm_fields[(int)forder[i]]); wlen = wlen + strlen(msg->cm_fields[(int)forder[i]]) + 1; } if (ret->len != wlen) lprintf(CTDL_ERR, "ERROR: len=%ld wlen=%ld\n", diff --git a/citadel/serv_extensions.h b/citadel/serv_extensions.h index bd0904e0d..a165bd8c5 100644 --- a/citadel/serv_extensions.h +++ b/citadel/serv_extensions.h @@ -12,6 +12,7 @@ */ char *serv_bio_init(void); char *serv_calendar_init(void); +char *serv_notes_init(void); char *serv_ldap_init(void); char *serv_chat_init(void); char *serv_expire_init(void); diff --git a/citadel/server.h b/citadel/server.h index c1761e30b..e0b5335bc 100644 --- a/citadel/server.h +++ b/citadel/server.h @@ -165,7 +165,7 @@ typedef struct CitContext t_context; enum { CON_IDLE, /* This context is doing nothing */ CON_READY, /* This context needs attention */ - CON_EXECUTING, /* This context is bound to a thread */ + CON_EXECUTING /* This context is bound to a thread */ }; @@ -454,7 +454,7 @@ struct MetaData { */ struct ser_ret { size_t len; - char *ser; + unsigned char *ser; }; diff --git a/citadel/sysdep_decls.h b/citadel/sysdep_decls.h index fa486391c..94d98d5da 100644 --- a/citadel/sysdep_decls.h +++ b/citadel/sysdep_decls.h @@ -30,7 +30,7 @@ enum LogLevel { /* Unimportant progress messages, etc. */ CTDL_INFO, /* informational */ /* Debugging messages */ - CTDL_DEBUG, /* debug-level messages */ + CTDL_DEBUG /* debug-level messages */ }; #ifdef __GNUC__ diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 211907a48..72ebc1298 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -704,8 +704,6 @@ void cmd_pass(char *buf) case pass_ok: logged_in_response(); return; - cprintf("%d Can't find user record!\n", - ERROR + INTERNAL_ERROR); } } -- 2.30.2