commit b496b6e1017b6de3266ea27eb26b0140bdb722d9
Author: Marcin Krol <[email protected]>
Date:   Thu Jul 26 09:26:25 2012 +0000

    - don't exit on packet count mismatch, allows to use apinger as monitor
      for multi WAN gateway handling

 apinger-no_exit.patch | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
---
diff --git a/apinger-no_exit.patch b/apinger-no_exit.patch
new file mode 100644
index 0000000..966feb9
--- /dev/null
+++ b/apinger-no_exit.patch
@@ -0,0 +1,35 @@
+diff -ur apinger-0.6.1.orig//src/apinger.c apinger-0.6.1/src/apinger.c
+--- apinger-0.6.1.orig//src/apinger.c  2012-07-25 17:39:38.612064460 +0000
++++ apinger-0.6.1/src/apinger.c        2012-07-25 17:39:57.837251164 +0000
+@@ -787,7 +787,6 @@
+ time_t tm;
+ int i,qp,really_lost;
+ char *buf1,*buf2;
+-int err=0;
+ 
+       if (config->status_file==NULL) return;
+       
+@@ -850,12 +849,10 @@
+                       }
+               }
+               buf2[i]=0;
+-              fprintf(f,"Received packets buffer: %s %s\n",buf2,buf1);
+               if (t->recently_lost!=really_lost){
+-                      fprintf(f,"   lost packet count mismatch 
(%i!=%i)!\n",t->recently_lost,really_lost);
+-                      logit("%s: Lost packet count mismatch 
(%i!=%i)!",t->name,t->recently_lost,really_lost);
+-                      logit("%s: Received packets buffer: %s 
%s\n",t->name,buf2,buf1);
+-                      err=1;
++                      logit("Target \"%s\": Lost packet count mismatch 
(%i(recently_lost) != %i(really_lost))!",t->name,t->recently_lost,really_lost);
++                      logit("Target \"%s\": Received packets buffer: %s 
%s\n",t->name,buf2,buf1);
++                      t->recently_lost = really_lost = 0;
+               }
+               free(buf1);
+               free(buf2);
+@@ -863,7 +860,6 @@
+               fprintf(f,"\n");
+       }
+       fclose(f);
+-      if (err) abort();
+ }
+ 
+ #ifdef FORKED_RECEIVER
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to