chiark / gitweb /
Fix segfault on failure to add peer specified by IP address.
authormdw <mdw>
Thu, 15 Sep 2005 15:27:55 +0000 (15:27 +0000)
committermdw <mdw>
Thu, 15 Sep 2005 15:27:55 +0000 (15:27 +0000)
admin.c

diff --git a/admin.c b/admin.c
index 24d86c6..bbfc0ed 100644 (file)
--- a/admin.c
+++ b/admin.c
@@ -613,7 +613,7 @@ static void acmd_add(admin *a, unsigned ac, char *av[])
   
   if (inet_aton(av[i], &a->peer.sin.sin_addr)) {
     if (!p_create(av[0], tops, &a->peer.sa, a->sasz))
-      a_fail(a, "peer-create-fail %s", a->pname);
+      a_fail(a, "peer-create-fail %s", av[0]);
     else
       a_ok(a);
     return;