]> git.sur5r.net Git - ngadmin/commitdiff
Handle GS015E error code on login
authorAlkorin <github@alkorin.fr>
Sun, 31 Aug 2014 11:56:06 +0000 (13:56 +0200)
committerAlkorin <github@alkorin.fr>
Sun, 31 Aug 2014 11:56:06 +0000 (13:56 +0200)
lib/src/session.c

index a0357f3ba4a2d356a6639df90222ed937098c49f..aa0703d3478b3039d2f0781c901e252b2ea012ba 100644 (file)
@@ -165,7 +165,7 @@ int ngadmin_login (struct ngadmin *nga, int id)
        pushBackList(attr, newAttr(ATTR_PASSWORD, strlen(nga->password), strdup(nga->password)));
        ret = readRequest(nga, attr);
        
-       if (ret == ERR_INVOP) {
+       if (ret == ERR_INVOP || ret == ERR_BADPASS) {
                /* it seems some switches do not support login with read request
                 * fallback to write request, even if it has the drawback of
                 * the password being broadcasted back by the switch