]> err.no Git - varnish/commitdiff
Enforce server and client name initials as 's' and 'c' respectively.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Jun 2008 07:10:47 +0000 (07:10 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 16 Jun 2008 07:10:47 +0000 (07:10 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2700 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc_client.c
varnish-cache/bin/varnishtest/vtc_server.c

index efcaba8e14474ab2139094c83a4a854167cc91fe..94b213a95fa2f87c3d7c22f1796b6b730c6aa802 100644 (file)
@@ -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;
index dec6cab0a1aa4c8471d1a82653691f9f2089bbc0..c93847397b302246fb2a17c2a8eb96cbecd7ca2c 100644 (file)
@@ -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;