From 77854e4d8263e184be0b466d19a0e22d4fbb9bca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Mon, 6 Jul 2009 21:17:55 +0000 Subject: [PATCH] * 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. --- webcit/inetconf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); -- 2.30.2