From: fendo Date: Wed, 22 May 2013 20:23:56 +0000 (+0200) Subject: Fix: loop parse multi_hostanme X-Git-Tag: 2.2.1-2sames3.9~1^2 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/91fc2ec13bb4bf58770085375a91a75f2413fa71?ds=inline Fix: loop parse multi_hostanme --- diff --git a/l2tpns.c b/l2tpns.c index c6fe521..c41b502 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -5456,7 +5456,7 @@ static void update_config() while (*shost && (shost < e)) { - while ((n < e) && (*n == ' ' || *n == '\t')) n++; + while ((n < e) && (*n == ' ' || *n == ',' || *n == '\t')) n++; i = 0; while (n < e && (*n != ',') && (*n != '\t')) @@ -5464,6 +5464,7 @@ static void update_config() config->multi_n_hostname[config->nbmultihostname][i] = *n; n++;i++; } + if (i > 0) { config->multi_n_hostname[config->nbmultihostname][i] = 0;