From: darkcoven Date: Wed, 2 Apr 2014 22:05:05 +0000 (+0200) Subject: Lib: fix scan issue with switches that send an empty name attribute X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;ds=inline;h=05636aa40f0c29aa167b11efdfd487b4897bed7d;p=ngadmin Lib: fix scan issue with switches that send an empty name attribute --- diff --git a/lib/src/network.c b/lib/src/network.c index 3f3126b..609d4b5 100644 --- a/lib/src/network.c +++ b/lib/src/network.c @@ -325,8 +325,12 @@ int extractSwitchAttributes (struct swi_attr *sa, const List *l) for (ln = l->first; ln != NULL; ln = ln->next) { at = ln->data; - if (at->size == 0) - return -EMSGSIZE; + if (at->size == 0) { + if (at->attr == ATTR_NAME) + continue; + else + return -EMSGSIZE; + } switch (at->attr) {