From 4b2faf5c7839a1f3babf641879cf0193f841c564 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sat, 13 Aug 2011 10:56:28 -0400 Subject: [PATCH] Allow empty strings to mean NULL this lets us specify the default (i.e. NULL) virtual server --- src/main/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/client.c b/src/main/client.c index d140d81..b406943 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -1053,7 +1053,11 @@ RADCLIENT *client_create(RADCLIENT_LIST *clients, REQUEST *request) case PW_TYPE_STRING_PTR: p = (char **) ((char *) c + dynamic_config[i].offset); if (*p) free(*p); - *p = strdup(vp->vp_strvalue); + if (vp->vp_strvalue[0]) { + *p = strdup(vp->vp_strvalue); + } else { + *p = NULL; + } break; case PW_TYPE_BOOLEAN: -- 2.1.4