vtc.vsl_replay(): Do not emit lines with non-numerical vxid

in other words: Allow comments in the replay string
parent f77b11c8
...@@ -440,7 +440,7 @@ vsl_line(VRT_CTX, char *str) ...@@ -440,7 +440,7 @@ vsl_line(VRT_CTX, char *str)
VCL_INT id; VCL_INT id;
VCL_ENUM side; VCL_ENUM side;
const char *tag, *delim = " \t\r\n"; const char *tag, *delim = " \t\r\n";
char *save; char *e, *save;
if (*str == '*') { if (*str == '*') {
// varnishtest // varnishtest
...@@ -451,7 +451,9 @@ vsl_line(VRT_CTX, char *str) ...@@ -451,7 +451,9 @@ vsl_line(VRT_CTX, char *str)
} }
if ((str = strtok_r(str, delim, &save)) == NULL) if ((str = strtok_r(str, delim, &save)) == NULL)
return; return;
id = strtoll(str, NULL, 10); id = strtoll(str, &e, 10);
if (e == str)
return;
if ((str = strtok_r(NULL, delim, &save)) == NULL) if ((str = strtok_r(NULL, delim, &save)) == NULL)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment