From: Alkorin Date: Sun, 31 Aug 2014 11:56:06 +0000 (+0200) Subject: Handle GS015E error code on login X-Git-Url: https://git.sur5r.net/?p=ngadmin;a=commitdiff_plain;h=198b1f14719df79df1a9b3e628b0a58f4e1fdb69 Handle GS015E error code on login --- diff --git a/lib/src/session.c b/lib/src/session.c index a0357f3..aa0703d 100644 --- a/lib/src/session.c +++ b/lib/src/session.c @@ -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