From 05636aa40f0c29aa167b11efdfd487b4897bed7d Mon Sep 17 00:00:00 2001 From: darkcoven Date: Thu, 3 Apr 2014 00:05:05 +0200 Subject: [PATCH] Lib: fix scan issue with switches that send an empty name attribute --- lib/src/network.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) { -- 2.39.2