projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5a4b2e9
)
* trim() whitespaces from inetconf values on save; they don't make sense in neither...
author
Wilfried Göesgens
<willi@citadel.org>
Mon, 6 Jul 2009 21:17:55 +0000
(21:17 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Mon, 6 Jul 2009 21:17:55 +0000
(21:17 +0000)
webcit/inetconf.c
patch
|
blob
|
history
diff --git
a/webcit/inetconf.c
b/webcit/inetconf.c
index 40966f24eb6284183f5f0c0bfe048d5c3b320123..e4f7254eddb688d1618bbf213e025427552b8d7f 100644
(file)
--- 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")) {
FlushStrBuf(Str);
}
else if (!strcasecmp(bstr("oper"), "add")) {
+ StrBuf *name;
eName = sbstr("ename");
if (eName == NULL) {
StrBufPrintf(WCC->ImportantMsg, _("Invalid Parameter"));
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);
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",
/*<domain> added status message*/ _("added."),
ChrPtr(eName));
StrBufPrintf(WCC->ImportantMsg, "%s %s",
/*<domain> added status message*/ _("added."),
ChrPtr(eName));