#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
+#include <time.h>
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
// We have a rule , now parse it
char rtoken[SIZ];
int nt = num_tokens(decoded_rule, '|');
- for (int t=0; t<nt; ++t) {
+ int t = 0;
+ for (t=0; t<nt; ++t) {
extract_token(rtoken, decoded_rule, t, '|', sizeof(rtoken));
striplt(rtoken);
switch(t) {
return(1); // don't delete the inbox copy if this failed
}
- CtdlSubmitMsg(msg, valid, NULL, 0); // send the message to the new recipient
+ CtdlSubmitMsg(msg, valid, NULL); // send the message to the new recipient
free_recipients(valid);
CM_Free(msg);
return(0); // delete the inbox copy
* Perform inbox processing for all rooms which require it
*/
void perform_inbox_processing(void) {
+ int i = 0;
+
if (num_urip == 0) {
return; // no action required
}
- for (int i=0; i<num_urip; ++i) {
+ for (i=0; i<num_urip; ++i) {
do_inbox_processing_for_user(users_requiring_inbox_processing[i]);
}
* If it's someone's inbox, we have to check for inbox rules
*/
int serv_inboxrules_roomhook(struct ctdlroom *room) {
+ int i = 0;
// Is this someone's inbox?
if (!strcasecmp(&room->QRname[11], MAILROOM)) {
// first check to see if this user is already on the list
if (num_urip > 0) {
- for (int i=0; i<=num_urip; ++i) {
+ for (i=0; i<=num_urip; ++i) {
if (users_requiring_inbox_processing[i] == usernum) { // already on the list!
return(0);
}