fix formating; use define for size_t arguments.
[citadel.git] / citadel / modules / network / serv_netspool.c
index b0928454c130aafb508bfe08c0141529654316a4..61ccbc992bdbd0847b4d5b0ba538c60f13377dfb 100644 (file)
@@ -106,12 +106,11 @@ void ParseLastSent(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos
 
 void ParseRoomAlias(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg)
 {
-/*
-       if (rncfg->RNCfg->sender != NULL)
-               continue; / * just one alowed... * /
-       extract_token(nptr->name, buf, 1, '|', sizeof nptr->name);
-       rncfg->RNCfg->sender = nptr;
-*/
+       if (rncfg->Sender != NULL)
+               return;
+
+       ParseGeneric(ThisOne, Line, LinePos, rncfg);
+       rncfg->Sender = NewStrBufDup(rncfg->NetConfigs[roommailalias]->Value[0]);
 }
 
 void ParseSubPendingLine(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *OneRNCFG)
@@ -234,7 +233,7 @@ void CalcListID(SpoolControl *sc)
        assoc_file_name(filename, sizeof filename, &sc->room, ctdl_info_dir);
        fd = open(filename, 0);
 
-       if (fd != 0) {
+       if (fd > 0) {
                struct stat stbuf;
 
                if ((fstat(fd, &stbuf) == 0) &&
@@ -924,6 +923,11 @@ void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netm
                        do {} while ((FileMoveChunked(&FDIO, &err) > 0) && (err == NULL));
                        if (err == NULL) {
                                unlink(filename);
+                               QN_syslog(LOG_DEBUG,
+                                         "Spoolfile %s now "SIZE_T_FMT" k\n",
+                                         spooloutfilename,
+                                         (dsize + fsize)/1024
+                                       );                              
                        }
                        else {
                                nFailed++;