[master] cbd2874 Handle errors in varnishncsa formats slightly better

Tollef Fog Heen tfheen at varnish-cache.org
Fri Jul 15 10:57:21 CEST 2011


commit cbd2874256f2ce749e1cf8cbda989bb424bb6c39
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Fri Jul 15 09:03:46 2011 +0200

    Handle errors in varnishncsa formats slightly better
    
    Print out the rest of the format, changing the error from
    
      "Unknown format character: {"
    
    to:
    
      "Unknown format starting at: %{asdf}x"

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 934fdf3..9178168 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -665,7 +665,7 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
 			/* Fall through if we haven't handled something */
 			/* FALLTHROUGH*/
 		default:
-			fprintf(stderr, "Unknown format character: %c\n", *p);
+			fprintf(stderr, "Unknown format starting at: %s\n", --p);
 			exit(1);
 		}
 	}



More information about the varnish-commit mailing list