From ae6ffb8a539ec2954ef1ebe19bd379abf3055662 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 16 Jun 2008 07:10:47 +0000 Subject: [PATCH] Enforce server and client name initials as 's' and 'c' respectively. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2700 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishtest/vtc_client.c | 5 +++++ varnish-cache/bin/varnishtest/vtc_server.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/varnish-cache/bin/varnishtest/vtc_client.c b/varnish-cache/bin/varnishtest/vtc_client.c index efcaba8e..94b213a9 100644 --- a/varnish-cache/bin/varnishtest/vtc_client.c +++ b/varnish-cache/bin/varnishtest/vtc_client.c @@ -102,6 +102,11 @@ client_new(char *name) { struct client *c; + if (*name != 'c') { + fprintf(stderr, "---- %-4s Client name must start with 'c'\n", + name); + exit (1); + } ALLOC_OBJ(c, CLIENT_MAGIC); AN(c); c->name = name; diff --git a/varnish-cache/bin/varnishtest/vtc_server.c b/varnish-cache/bin/varnishtest/vtc_server.c index dec6cab0..c9384739 100644 --- a/varnish-cache/bin/varnishtest/vtc_server.c +++ b/varnish-cache/bin/varnishtest/vtc_server.c @@ -107,6 +107,11 @@ server_new(char *name) { struct server *s; + if (*name != 's') { + fprintf(stderr, "---- %-4s Server name must start with 's'\n", + name); + exit (1); + } ALLOC_OBJ(s, SERVER_MAGIC); AN(s); s->name = name; -- 2.39.5