]> git.sur5r.net Git - ngadmin/commitdiff
Lib: fix scan issue with switches that send an empty name attribute
authordarkcoven <admin@darkcoven.tk>
Wed, 2 Apr 2014 22:05:05 +0000 (00:05 +0200)
committerdarkcoven <admin@darkcoven.tk>
Wed, 2 Apr 2014 22:05:05 +0000 (00:05 +0200)
lib/src/network.c

index 3f3126bc304301362c0fe2ec1aea127068e1ec0e..609d4b560bc8dd4390c4f8ad5489c1b50f54c554 100644 (file)
@@ -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) {