[master] 06012a1 no vsm, no identity
Nils Goroll
nils.goroll at uplex.de
Thu Jan 18 17:19:05 UTC 2018
commit 06012a1f44bcb88fa403466db50a13d912e53859
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Jan 18 18:18:00 2018 +0100
no vsm, no identity
Fixes #2546
diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 1fed3cb..3ba61db 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -621,7 +621,10 @@ main(int argc, char **argv)
VUT_Signal(vut_sighandler);
VUT_Setup(vut);
- ident = VSM_Dup(vut->vsm, "Arg", "-i");
+ if (vut->vsm)
+ ident = VSM_Dup(vut->vsm, "Arg", "-i");
+ else
+ ident = strdup("");
if (pthread_create(&thr, NULL, do_curses, NULL) != 0)
VUT_Error(vut, 1, "pthread_create(): %s", strerror(errno));
vut->dispatch_f = accumulate;
diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index f0fa320..f47c514 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -378,7 +378,10 @@ main(int argc, char **argv)
VUT_Signal(vut_sighandler);
VUT_Setup(vut);
- ident = VSM_Dup(vut->vsm, "Arg", "-i");
+ if (vut->vsm)
+ ident = VSM_Dup(vut->vsm, "Arg", "-i");
+ else
+ ident = strdup("");
if (!once) {
if (pthread_create(&thr, NULL, do_curses, NULL) != 0) {
fprintf(stderr, "pthread_create(): %s\n",
More information about the varnish-commit
mailing list