From 4c18d4cdf5384754eff3a0a125b1da26fc053710 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Fri, 27 Jun 2025 00:17:38 -0400 Subject: [PATCH] renaming in-logs to be receiver-logs (sender-logs) --- Makefile | 3 --- Makefile.dbg | 4 ++-- lib/devlog.c | 14 +++++++++----- mailleur.spec.in | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 613bbb1..a7b1aa4 100644 --- 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)/ diff --git a/Makefile.dbg b/Makefile.dbg index 6883101..2a71ccd 100644 --- a/Makefile.dbg +++ b/Makefile.dbg @@ -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" diff --git a/lib/devlog.c b/lib/devlog.c index 426e36f..a85378f 100644 --- a/lib/devlog.c +++ b/lib/devlog.c @@ -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) { diff --git a/mailleur.spec.in b/mailleur.spec.in index ddb8ee8..5433286 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -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 -- 2.47.3