From 198b1f14719df79df1a9b3e628b0a58f4e1fdb69 Mon Sep 17 00:00:00 2001 From: Alkorin Date: Sun, 31 Aug 2014 13:56:06 +0200 Subject: [PATCH] Handle GS015E error code on login --- lib/src/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5