From: Wilfried Göesgens Date: Mon, 6 Jul 2009 21:17:55 +0000 (+0000) Subject: * trim() whitespaces from inetconf values on save; they don't make sense in neither... X-Git-Tag: v7.86~992 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=77854e4d8263e184be0b466d19a0e22d4fbb9bca * trim() whitespaces from inetconf values on save; they don't make sense in neither of the possible values. thanks to koos for pointing this out. --- diff --git a/webcit/inetconf.c b/webcit/inetconf.c index 40966f24e..e4f7254ed 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -128,6 +128,7 @@ void new_save_inetconf(void) { FlushStrBuf(Str); } else if (!strcasecmp(bstr("oper"), "add")) { + StrBuf *name; eName = sbstr("ename"); if (eName == NULL) { StrBufPrintf(WCC->ImportantMsg, _("Invalid Parameter")); @@ -137,8 +138,9 @@ void new_save_inetconf(void) { nUsed = GetCount(Hash); nUsed = snprintf(nnn, sizeof(nnn), "%d", nUsed+1); - - Put(Hash, nnn, nUsed, NewStrBufDup(eName), HFreeStrBuf); + name = NewStrBufDup(eName); + StrBufTrim(name); + Put(Hash, nnn, nUsed, name, HFreeStrBuf); StrBufPrintf(WCC->ImportantMsg, "%s %s", /* added status message*/ _("added."), ChrPtr(eName));