From: phk Date: Mon, 16 Jun 2008 07:10:47 +0000 (+0000) Subject: Enforce server and client name initials as 's' and 'c' respectively. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae6ffb8a539ec2954ef1ebe19bd379abf3055662;p=varnish 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 --- 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;