[master] 2d0843e Rename SLT_F_BINARY to the more precise SLT_F_UNSAFE

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 5 10:09:08 UTC 2018


commit 2d0843eac8d77cfb3369591a61234d9c3ed6881e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 5 08:45:43 2018 +0000

    Rename SLT_F_BINARY to the more precise SLT_F_UNSAFE

diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 4b75923..c80c135 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -47,7 +47,7 @@
 #define NODEF_NOTICE \
     "NB: This log record is masked by default.\n\n"
 
-SLTM(Debug, SLT_F_BINARY, "Debug messages",
+SLTM(Debug, SLT_F_UNSAFE, "Debug messages",
 	"Debug messages can normally be ignored, but are sometimes"
 	" helpful during trouble-shooting.  Most debug messages must"
 	" be explicitly enabled with parameters.\n\n"
@@ -126,7 +126,7 @@ SLTM(BackendClose, 0, "Backend connection closed",
 	"\n"
 )
 
-SLTM(HttpGarbage, SLT_F_BINARY, "Unparseable HTTP request",
+SLTM(HttpGarbage, SLT_F_UNSAFE, "Unparseable HTTP request",
 	"Logs the content of unparseable HTTP requests.\n\n"
 )
 
@@ -363,7 +363,7 @@ SLTM(ESI_xmlerror, 0, "ESI parser error or warning message",
 	" The log record describes the problem encountered."
 )
 
-SLTM(Hash, SLT_F_BINARY, "Value added to hash",
+SLTM(Hash, SLT_F_UNSAFE, "Value added to hash",
 	"This value was added to the object lookup hash.\n\n"
 	NODEF_NOTICE
 )
diff --git a/include/vapi/vsl.h b/include/vapi/vsl.h
index 2209ac3..b2d7f1c 100644
--- a/include/vapi/vsl.h
+++ b/include/vapi/vsl.h
@@ -163,7 +163,7 @@ extern const unsigned VSL_tagflags[SLT__MAX];
 	 * Tag flags array.
 	 * Use these macros with VSL_tagflags (included from vsl_int.h):
 	 *
-	 * VSL_tagflags[tag] & SLT_F_BINARY
+	 * VSL_tagflags[tag] & SLT_F_UNSAFE
 	 *   Non-zero if the payload with this tag may include
 	 *   non-printable characters
 	 *
diff --git a/include/vapi/vsl_int.h b/include/vapi/vsl_int.h
index bfc24e5..57986cd 100644
--- a/include/vapi/vsl_int.h
+++ b/include/vapi/vsl_int.h
@@ -97,6 +97,6 @@ enum VSL_tag_e {
 
 /* VSL tag flags */
 #define SLT_F_UNUSED		(1 << 0)
-#define SLT_F_BINARY		(1 << 1)
+#define SLT_F_UNSAFE		(1 << 1)
 
 #endif /* VAPI_VSL_INT_H_INCLUDED */
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index b4b7752..af23e92 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -244,7 +244,7 @@ VSL_Print(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
 	    'b' : '-';
 	data = VSL_CDATA(c->rec.ptr);
 
-	if (VSL_tagflags[tag] & SLT_F_BINARY) {
+	if (VSL_tagflags[tag] & SLT_F_UNSAFE) {
 		VSL_PRINT(fo, "%10u %-14s %c \"", vxid, VSL_tags[tag], type);
 		while (len-- > 0) {
 			if (len == 0 && tag == SLT_Debug && *data == '\0')
@@ -279,7 +279,7 @@ VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
 	len = VSL_LEN(c->rec.ptr);
 	data = VSL_CDATA(c->rec.ptr);
 
-	if (VSL_tagflags[tag] & SLT_F_BINARY) {
+	if (VSL_tagflags[tag] & SLT_F_UNSAFE) {
 		VSL_PRINT(fo, "%-14s \"", VSL_tags[tag]);
 		while (len-- > 0) {
 			if (len == 0 && tag == SLT_Debug && *data == '\0')


More information about the varnish-commit mailing list