]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Tracing lost contact with remote in logs
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 26 Mar 2025 15:48:02 +0000 (11:48 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 26 Mar 2025 15:48:02 +0000 (11:48 -0400)
Makefile
lib/devlog.c
lib/lvleml.c
lib/subrou.c

index e85004f30c30efc40ddeb0ae55c4190be6da6555..4d4c96a4b74a52a05b2fdd7d9a764140f706fd05 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ emlrcvr       :  clean debug newtest          #starting email receiver
           @ echo "--------------"
           @ echo "starting $@"
           @ $(TESTDIR)/$(SBINDIR)/$@                   \
-               -f                                      \
+               -f                                      \
                $(EMLPAR) 
           @ echo "--------------"
 
index dd988085f76151344a2eecd8273f690c4edd6226..0735d4ea0f38f1720bdada2784f274ae605b410a 100644 (file)
@@ -96,7 +96,8 @@ while (proceed==true) {
       break;
     case 3      :       //writing a minimal data
       (void) clock_gettime(CLOCK_REALTIME,&(log->start));
-      (void) fprintf(log->file,"#%s\n",ctime(&(log->start.tv_sec)));
+      (void) fprintf(log->file,"#%s",ctime(&(log->start.tv_sec)));
+      (void) fflush(log->file);
       log->start.tv_sec=0;
       break;
     default     :       //SAFE guard
@@ -218,6 +219,10 @@ while (proceed==true) {
         phase=999;
         }
       break;
+    case 3      :       //string the formated line within logs
+      (void) fprintf(log->file,"%s %s\n",chrono,line);
+      (void) fflush(log->file);
+      break;
     default     :       //SAFE guard
       line=rou_freestr(line);
       proceed=false;
index 352ccaf7cf59e8355bdfe8c33204016efb5efcff..eea99ed6dfc59fed6af55ea1f303a430f31e983f 100644 (file)
@@ -320,7 +320,8 @@ while (proceed==true) {
   status=tcp_getline(contact->socptr,&attend,&line);
   (void) rou_alert(0,"%s, JMPDBG tcp_getline status='%d'",OPEP,status);
   if (status<=0) {       //timeout or trouble?
-    (void) rou_alert(0,"%s, lost contact",OPEP);
+    (void) log_fprintlog(contact->logptr,false,"%s","Lost contact with remote");
+    (void) rou_alert(0,"%s, JMPDBG lost contact",OPEP);
     break;              //no need to go further
     }
   (void) log_fprintlog(contact->logptr,false,"%s",line);
index 0b76f1a6cf9220f683508ee0041dae60202fd745..15d52f9b9db1d4bd2b7edf38b059a05ccf534835 100644 (file)
@@ -21,7 +21,7 @@
 
 //version definition 
 #define VERSION "0.6"
-#define RELEASE "16"
+#define RELEASE "17"
 
 //Public variables
 PUBLIC  int debug=0;            //debug level