[ekiga] In ekiga-debug-analyser, show also the body of packets exchanged



commit 8f3d9550d5c26eccedb3d4ca5cd7f282f4adff56
Author: Eugen Dedu <eugen dedu univ-fcomte fr>
Date:   Tue Dec 1 10:41:40 2015 +0100

    In ekiga-debug-analyser, show also the body of packets exchanged

 src/ekiga-debug-analyser |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/ekiga-debug-analyser b/src/ekiga-debug-analyser
index f0f680f..3089e86 100755
--- a/src/ekiga-debug-analyser
+++ b/src/ekiga-debug-analyser
@@ -1,25 +1,29 @@
 #!/usr/bin/awk -f
 
 # Usage: ekiga-debug-analyser <ekigaDebugOutput
-#   where the output comes from ekiga -d 4 (or 5).
-# Goal: Given a debug output file, shows only the application packets
+#   where the output comes from ekiga -d 4
+# Goal: Given a debug output file, show only the application packets
 #   exchanged on the network.
 #   This especially allows to conveniently compare two debug outputs
 #   in terms of packets exchanged.
 # Written by Eugen Dedu, 03 06 2009
 
-/Sending PDU|PDU [rR]eceived/{  # r is for ekiga v3, R for ekiga v2
-    inside=1;
+/Sending PDU|PDU received/{
+    inside = 1;
     # remove $1 (the date) and $2 (the time), and let $3 (the relative time)
     $1 = $2 = "";
     print " ========================", $0;
     next;
 }
 
-/^ *$/{
-    if (inside)
+/^ *$/{  # empty line
+    if (inside == 1) {
+        print;
+        inside = 2;  # wait for two empty lines, so that it prints the body too
+    } else if (inside == 2) {
         print;
-    inside=0;
+        inside = 0;
+    }
     next;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]