]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
updated --csv format: VERSION;TIMESTAMP;HOSTNAME;TTL;ENDPOINT
authorVaibhav Bajpai <contact@vaibhavbajpai.com>
Fri, 3 May 2013 08:01:33 +0000 (10:01 +0200)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Mon, 13 May 2013 15:22:53 +0000 (17:22 +0200)
report.c

index f3f604380e2ce409137b209b15c536a9f569eeda..af397d6ae9f110e2edf8d85361685518e8ef1377 100644 (file)
--- a/report.c
+++ b/report.c
@@ -328,6 +328,7 @@ void csv_close(void)
   int i, j, at, max;
   ip_t *addr;
   char name[81];
+  time_t now = time(NULL);
 
   for( i=0; i<MAXFLD; i++ ) {
       j = fld_index[fld_active[i]];
@@ -340,7 +341,7 @@ void csv_close(void)
     addr = net_addr(at);
     snprint_addr(name, sizeof(name), addr);
 
-    printf("MTR.%s;%s;%d;%s", MTR_VERSION, Hostname, at+1, name);
+    printf("MTR.%s;%lu;%s;%d;%s", MTR_VERSION, now, Hostname, at+1, name);
 
     for( i=0; i<MAXFLD; i++ ) {
       j = fld_index[fld_active[j]];