more of that
[citadel.git] / citadel / modules / inboxrules / serv_inboxrules.c
index a381d4e17c696f32fa19c888f94bf1af3709ab52..e1cc4accfa4e7efe028f6785657aac7774ac9951 100644 (file)
@@ -218,7 +218,8 @@ struct inboxrules *deserialize_inbox_rules(char *serialized_rules) {
                        // 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) {
@@ -373,7 +374,7 @@ int inbox_do_redirect(struct irule *rule, long msgnum) {
                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
@@ -417,10 +418,10 @@ void inbox_do_reject(struct irule *rule, struct CtdlMessage *msg) {
 
        // Deliver the message
        quickie_message(
-               NULL,
+               " ",
                msg->cm_fields[eenVelopeTo],
                sender,
-               NULL,
+               MAILROOM,
                reject_text,
                FMT_RFC822,
                "Delivery status notification"
@@ -476,10 +477,10 @@ void inbox_do_vacation(struct irule *rule, struct CtdlMessage *msg) {
        
                // Deliver the auto-reply.
                quickie_message(
-                       NULL,
+                       "",
                        msg->cm_fields[eenVelopeTo],
                        sender,
-                       NULL,
+                       MAILROOM,
                        ChrPtr(reject_text),
                        FMT_RFC822,
                        "Delivery status notification"
@@ -836,11 +837,13 @@ int num_urip_alloc = 0;
  * 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]);
        }
 
@@ -856,6 +859,7 @@ void perform_inbox_processing(void) {
  * 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)) {
@@ -864,7 +868,7 @@ int serv_inboxrules_roomhook(struct ctdlroom *room) {
 
                        // 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);
                                        }