From 9d6ac635379521753572f0641718f58f154b2aa3 Mon Sep 17 00:00:00 2001 From: Dave West Date: Fri, 23 Oct 2009 16:22:11 +0000 Subject: [PATCH] Fix the Makefile.in to properly clean the user_modules tree. marked aide_message as deprecated. Use CtdlAideMessage instead --- citadel/Makefile.in | 10 ++++++++++ citadel/control.c | 2 +- citadel/database.c | 2 +- citadel/include/ctdl_module.h | 6 +----- citadel/modules/expire/serv_expire.c | 8 ++++---- citadel/modules/extnotify/funambol65.c | 4 ++-- citadel/modules/imap/serv_imap.c | 4 ++-- citadel/modules/network/serv_network.c | 6 +++--- citadel/modules/openid/serv_openid_rp.c | 2 +- citadel/msgbase.c | 4 ++++ citadel/msgbase.h | 10 +++++++++- citadel/room_ops.c | 10 +++++----- citadel/sysdep.c | 2 +- citadel/user_ops.c | 6 +++--- 14 files changed, 47 insertions(+), 29 deletions(-) diff --git a/citadel/Makefile.in b/citadel/Makefile.in index a680e24d6..0d7c57fb8 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -354,6 +354,11 @@ clean: for i in $(srcdir)/modules/* ; do \ rm -f $$i/*.o ;\ done + if test -d $(srcdir)/user_modules ; then \ + for i in $(srcdir)/user_modules/* ; do \ + rm -f $$i/*.o ;\ + done \ + fi rm -f $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS) $(NOINST_TARGETS) @@ -367,6 +372,11 @@ distclean: cleaner for i in $(srcdir)/modules/* ; do \ rm -f $$i/*.d ;\ done + if test -d $(srcdir)/user_modules ; then \ + for i in $(srcdir)/user_modules/* ; do \ + rm -f $$i/*.o ;\ + done \ + fi .c.d: @echo Checking dependencies for $< diff --git a/citadel/control.c b/citadel/control.c index 65a6d0fd6..2599815dc 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -666,7 +666,7 @@ void cmd_conf(char *argbuf) snprintf(buf, sizeof buf, "The global system configuration has been edited by %s.\n", CC->curr_user); - aide_message(buf,"Citadel Configuration Manager Message"); + CtdlAideMessage(buf,"Citadel Configuration Manager Message"); if (!IsEmptyStr(config.c_logpages)) CtdlCreateRoom(config.c_logpages, 3, "", 0, 1, 1, VIEW_BBS); diff --git a/citadel/database.c b/citadel/database.c index 325fda94e..7c157e4c2 100644 --- a/citadel/database.c +++ b/citadel/database.c @@ -216,7 +216,7 @@ static void cdb_cull_logs(void) " This log file is no longer in use " "and may be safely deleted.\n", *file, strerror(errno)); - aide_message(errmsg, "Database Warning Message"); + CtdlAideMessage(errmsg, "Database Warning Message"); } } free(list); diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index cba691714..9019a5d1c 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -27,11 +27,7 @@ void CtdlLogPrintf(enum LogLevel loglevel, const char *format, ...); -/* - * Fix the interface to aide_message so that it complies with the Coding style - */ - -#define CtdlAideMessage(TEXT, SUBJECT) aide_message(TEXT, SUBJECT) +#define CtdlAideMessage(TEXT, SUBJECT) quickie_message("Citadel",NULL,NULL,AIDEROOM,TEXT,FMT_CITADEL,SUBJECT) /* * Hook functions available to modules. diff --git a/citadel/modules/expire/serv_expire.c b/citadel/modules/expire/serv_expire.c index 00869827d..555a6b3c0 100644 --- a/citadel/modules/expire/serv_expire.c +++ b/citadel/modules/expire/serv_expire.c @@ -378,7 +378,7 @@ int PurgeRooms(void) { ++num_rooms_purged; } - if (num_rooms_purged > 0) aide_message(transcript, "Room Autopurger Message"); + if (num_rooms_purged > 0) CtdlAideMessage(transcript, "Room Autopurger Message"); free(transcript); CtdlLogPrintf(CTDL_DEBUG, "Purged %d rooms.\n", num_rooms_purged); @@ -578,19 +578,19 @@ int PurgeUsers(void) { } } - if (num_users_purged > 0) aide_message(transcript, "User Purge Message"); + if (num_users_purged > 0) CtdlAideMessage(transcript, "User Purge Message"); free(transcript); if(users_corrupt_msg) { - aide_message(users_corrupt_msg, "User Corruption Message"); + CtdlAideMessage(users_corrupt_msg, "User Corruption Message"); free (users_corrupt_msg); users_corrupt_msg = NULL; } if(users_zero_msg) { - aide_message(users_zero_msg, "User Zero Message"); + CtdlAideMessage(users_zero_msg, "User Zero Message"); free (users_zero_msg); users_zero_msg = NULL; } diff --git a/citadel/modules/extnotify/funambol65.c b/citadel/modules/extnotify/funambol65.c index 328dc9e7c..4964d9ca9 100644 --- a/citadel/modules/extnotify/funambol65.c +++ b/citadel/modules/extnotify/funambol65.c @@ -125,7 +125,7 @@ int notify_http_server(char *remoteurl, file_funambol_msg, strerror(errno)); CtdlLogPrintf(CTDL_ERR, buf); - aide_message(buf, "External notifier unable to find message template!"); + CtdlAideMessage(buf, "External notifier unable to find message template!"); goto free; } mimetype = GuessMimeByFilename(template, tlen); @@ -150,7 +150,7 @@ int notify_http_server(char *remoteurl, file_funambol_msg); CtdlLogPrintf(CTDL_ERR, buf); - aide_message(buf, "External notifier unable to load message template!"); + CtdlAideMessage(buf, "External notifier unable to load message template!"); goto free; } // Do substitutions diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index e06dd5623..1322bc453 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -969,7 +969,7 @@ void imap_create(int num_parms, char *parms[]) ((ret & QR_PRIVATE) ? " [private]" : ""), ((ret & QR_GUESSNAME) ? " [hidden]" : "") ); - aide_message(notification_message, "Room Creation Message"); + CtdlAideMessage(notification_message, "Room Creation Message"); free(notification_message); } CtdlLogPrintf(CTDL_DEBUG, "imap_create() completed\n"); @@ -1362,7 +1362,7 @@ void imap_rename(int num_parms, char *parms[]) parms[3], CC->curr_user ); - aide_message(buf, "IMAP folder rename"); + CtdlAideMessage(buf, "IMAP folder rename"); cprintf("%s OK RENAME completed\r\n", parms[0]); } diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index bb1947354..dddf90b47 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -2027,7 +2027,7 @@ void network_poll_node(char *node, char *secret, char *host, char *port) { if (strcmp(connected_to, node)) { snprintf (err_buf, sizeof(err_buf), "Connected to node \"%s\" but I was expecting to connect to node \"%s\".", connected_to, node); - aide_message(err_buf, "IGNet Networking error."); + CtdlAideMessage(err_buf, "IGNet Networking error."); } /* Identify ourselves */ @@ -2266,7 +2266,7 @@ void cmd_netp(char *cmdbuf) ); CtdlLogPrintf(CTDL_WARNING, err_buf); cprintf("%d authentication failed\n", ERROR + PASSWORD_REQUIRED); - aide_message(err_buf, "IGNet Networking."); + CtdlAideMessage(err_buf, "IGNet Networking."); return; } @@ -2277,7 +2277,7 @@ void cmd_netp(char *cmdbuf) ); CtdlLogPrintf(CTDL_WARNING, err_buf); cprintf("%d authentication failed\n", ERROR + PASSWORD_REQUIRED); - aide_message(err_buf, "IGNet Networking."); + CtdlAideMessage(err_buf, "IGNet Networking."); return; } diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 2e65c1acc..a1996fb20 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -129,7 +129,7 @@ int attach_openid(struct ctdluser *who, char *claimed_id) snprintf(buf, sizeof buf, "User <%s> (#%ld) has claimed the OpenID URL %s\n", who->fullname, who->usernum, claimed_id); - aide_message(buf, "OpenID claim"); + CtdlAideMessage(buf, "OpenID claim"); CtdlLogPrintf(CTDL_INFO, "%s", buf); return(0); } diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 1e1b3a198..e83a6d36b 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -3113,6 +3113,10 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ +void aide_message (char *text, char *subject) +{ + quickie_message("Citadel",NULL,NULL,AIDEROOM,text,FMT_CITADEL,subject); +} /* diff --git a/citadel/msgbase.h b/citadel/msgbase.h index f43ee6003..39e274630 100644 --- a/citadel/msgbase.h +++ b/citadel/msgbase.h @@ -3,7 +3,6 @@ #ifndef MSGBASE_H #define MSGBASE_H -#define aide_message(text, subject) quickie_message("Citadel",NULL,NULL,AIDEROOM,text,FMT_CITADEL,subject) enum { MSGS_ALL, @@ -212,4 +211,13 @@ struct CtdlMessage *CtdlMakeMessage( int CtdlCheckInternetMailPermission(struct ctdluser *who); int CtdlIsMe(char *addr, int addr_buf_len); +/* + * Use of aide_message is deprecated. + * It has been replaced with CtdlAideMessage. + * All parameters remain the same. +*/ +void aide_message(char *text, char *subject) __attribute__ ((deprecated)); + + + #endif /* MSGBASE_H */ diff --git a/citadel/room_ops.c b/citadel/room_ops.c index 290190762..1ef9f0a94 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1176,7 +1176,7 @@ void cmd_rdir(char *cmdbuf) "\"%s\" appears in the file directory for room \"%s\" but is not a regular file. Directories, named pipes, sockets, etc. are not usable in Citadel room directories.\n", buf, CC->room.QRname ); - aide_message(buf2, "Unusable data found in room directory"); + CtdlAideMessage(buf2, "Unusable data found in room directory"); continue; /* not a useable file type so don't show it */ } safestrncpy(comment, "", sizeof comment); @@ -1497,7 +1497,7 @@ void cmd_setr(char *args) } snprintf(buf, sizeof buf, "The room \"%s\" has been edited by %s.\n", CC->room.QRname, CC->curr_user); - aide_message(buf, "Room modification Message"); + CtdlAideMessage(buf, "Room modification Message"); cprintf("%d Ok\n", CIT_OK); } @@ -1559,7 +1559,7 @@ void cmd_seta(char *new_ra) snprintf(buf, sizeof buf, "There is now no room aide for \"%s\".\n", CC->room.QRname); - aide_message(buf, "Aide Room Modification"); + CtdlAideMessage(buf, "Aide Room Modification"); } cprintf("%d Ok\n", CIT_OK); } @@ -1742,7 +1742,7 @@ void cmd_kill(char *argbuf) /* tell the world what we did */ snprintf(msg, sizeof msg, "The room \"%s\" has been deleted by %s.\n", deleted_room_name, CC->curr_user); - aide_message(msg, "Room Purger Message"); + CtdlAideMessage(msg, "Room Purger Message"); cprintf("%d '%s' deleted.\n", CIT_OK, deleted_room_name); } else { cprintf("%d ok to delete.\n", CIT_OK); @@ -1958,7 +1958,7 @@ void cmd_cre8(char *args) ((newflags & QR_PASSWORDED) ? " Password: " : ""), ((newflags & QR_PASSWORDED) ? new_room_pass : "") ); - aide_message(notification_message, "Room Creation Message"); + CtdlAideMessage(notification_message, "Room Creation Message"); free(notification_message); cprintf("%d '%s' has been created.\n", CIT_OK, new_room_name); diff --git a/citadel/sysdep.c b/citadel/sysdep.c index c06575888..7cc7fd0c4 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -1015,7 +1015,7 @@ void checkcrash(void) " If you have already done this, the core dump is likely to be found at %score.%d\n" , ctdl_run_dir, ForkedPid); - aide_message(ChrPtr(CrashMail), "Citadel server process terminated unexpectedly"); + CtdlAideMessage(ChrPtr(CrashMail), "Citadel server process terminated unexpectedly"); FreeStrBuf(&CrashMail); } } diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 9f867f971..580699fbe 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -1169,7 +1169,7 @@ int create_user(char *newusername, int become_user) CC->cs_host, CC->cs_addr ); - aide_message(buf, "User Creation Notice"); + CtdlAideMessage(buf, "User Creation Notice"); CtdlLogPrintf(CTDL_NOTICE, "New user <%s> created\n", username); return (0); } @@ -1487,7 +1487,7 @@ int CtdlInvtKick(char *iuser, int op) { ((op == 1) ? "invited to" : "kicked out of"), CC->room.QRname, CC->user.fullname); - aide_message(bbb,"User Admin Message"); + CtdlAideMessage(bbb,"User Admin Message"); return(0); } @@ -1863,7 +1863,7 @@ void cmd_asup(char *cmdbuf) snprintf(notify, SIZ, "User \"%s\" has been deleted by %s.\n", usbuf.fullname, CC->user.fullname); - aide_message(notify, "User Deletion Message"); + CtdlAideMessage(notify, "User Deletion Message"); } cprintf("%d Ok", CIT_OK); -- 2.30.2