]> SAFE projects GIT repository - jmp/mailleur/commitdiff
renaming in-logs to be receiver-logs (sender-logs)
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 27 Jun 2025 04:17:38 +0000 (00:17 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 27 Jun 2025 04:17:38 +0000 (00:17 -0400)
Makefile
Makefile.dbg
lib/devlog.c
mailleur.spec.in

index 613bbb1e37d8da0cc97fe24edf17ee3df5e3f1ba..a7b1aa49cfc546abee302b8e8ff746c51b6fdbfd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -182,7 +182,6 @@ tstspf      :  clean debug
 newtest        :  deltest
           @ mkdir -p $(TESTDIR)/var/run
           @ mkdir -p $(TESTDIR)/usr/share/$(APPNAME)
-          @ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/{in,out}-logs
           @ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/queue
           @ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/mails
           @ mkdir -p $(TESTDIR)/usr
@@ -208,10 +207,8 @@ install    :
           @ install -d $(DESTDIR)/$(ETCDIR)/sysconfig/
           @ install -d $(DESTDIR)/$(LIBDIR)/$(APPN)/
           @ install -d $(DESTDIR)/$(SBINDIR)/
-          @ install -d $(DESTDIR)/$(SPOOLDIR)/$(APPN)/in-logs
           @ install -d $(DESTDIR)/$(SPOOLDIR)/$(APPN)/mails
           @ install -d $(DESTDIR)/$(SPOOLDIR)/$(APPN)/queue
-          @ install -d $(DESTDIR)/$(SPOOLDIR)/$(APPN)/out-logs
           @ cp -a                                      \
                bin/*                                   \
                $(DESTDIR)/$(SBINDIR)/
index 6883101c2490c3ecb4f8ad9d230688daa44e19a1..2a71ccd7bf5fed92307c4d3fe0710a6d73544ce3 100644 (file)
@@ -81,9 +81,9 @@ onesortr:  debug
 #procedure to start all needed components to have
 #a full complete test
 
-restart        :  killall debug  dosortr dorcvr
+restart        :  killall dosortr dorcvr
 
-actions        :  newtest restart
+actions        :  debug newtest restart
 
 dosortr :  
           @  echo "Starting Sorter"
index 426e36f20ac3184d77232766e42da534d61e3b5b..a85378fdcae19a7ba88bd8b8abb9d4f3118a91f2 100644 (file)
@@ -17,8 +17,8 @@
 #include        "devlog.h"
 
 #define JRLDIR  "/var/spool/"APPNAME
-#define IJRLDIR  JRLDIR"/in-logs/"
-#define OJRLDIR  JRLDIR"/out-logs/"
+#define IJRLDIR  JRLDIR"/receiver-logs/"
+#define OJRLDIR  JRLDIR"/sender-logs/"
 
 
 typedef struct  {
@@ -189,13 +189,17 @@ while (proceed==true) {
       break;
     case 1      :       //generating log file name
       char *loc;
-      char cmt[200];
 
       log=(LOGTYP *)calloc(1,sizeof(LOGTYP));
       loc=rou_apppath(logdir);
-      (void) snprintf(cmt,sizeof(cmt),"%s%s-%05d.jrl",loc,logname,getpid());
+      (void) rou_asprintf(&(log->filename),"%s%s-%05d.jrl",loc,logname,getpid());
+      if (rou_do_mkpdir(loc)==false) {
+        (void) rou_alert(0,"%s Unable to create log directory <%s> (system?)",
+                            OPEP,loc);
+        log=freelog(log);
+        phase=999;
+        }
       loc=rou_freestr(loc);
-      log->filename=strdup(cmt);
       break;
     case 2      :       //opening the log file
       if ((log->file=fopen(log->filename,"w"))==(FILE *)0) {
index ddb8ee8f1f9c4a660df0b40f911e948f09d07d51..54332863dbd433d5a3da69281f1cda3ccb45e379 100644 (file)
@@ -53,7 +53,7 @@ search about email exchange within time and transaction context.
 %attr(0754,root,root) %{_libdir}/%{name}/support/starting.sh
 %attr(0750,%{name},mail) %{_libdir}/%{name}/support/mailleur-reset-db.sh
 %attr(0750,%{name},mail) %{_libdir}/%{name}/support/mailleur-settest-db.sh
-%attr(0755,%{name},mail) %dir %{spooldir}/%{name}/{in-logs,queue,out-logs}
+%attr(0755,%{name},mail) %dir %{spooldir}/%{name}/queue
 %attr(0750,%{name},mail) %dir %{spooldir}/%{name}/mails
 %attr(0640,root,root) %{_datadir}/%{name}/sql/Makefile
 %attr(0644,root,root) %{_datadir}/%{name}/sql/datatest.def