[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1995: Properly handle multiple values associated with a single con (in trunk: . src/control)
Author: edmanm
Date: 2007-10-11 12:44:53 -0400 (Thu, 11 Oct 2007)
New Revision: 1995
Modified:
trunk/
trunk/src/control/torcontrol.cpp
Log:
r2054@lysithea: edmanm | 2007-10-11 12:40:59 -0400
Properly handle multiple values associated with a single conf key when
SETCONFing. Also call string_escape() for each non-empty conf value.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2054] on dc66be73-d13e-47ba-a267-8dc7cda68c65
Modified: trunk/src/control/torcontrol.cpp
===================================================================
--- trunk/src/control/torcontrol.cpp 2007-10-11 03:00:37 UTC (rev 1994)
+++ trunk/src/control/torcontrol.cpp 2007-10-11 16:44:53 UTC (rev 1995)
@@ -584,12 +584,12 @@
/* Add each keyvalue to the argument list */
foreach (QString key, map.keys()) {
- arg = key;
- value = map.value(key);
- if (value.length() > 0) {
- arg += "=\"" + value + "\"";
+ foreach (QString value, map.values(key)) {
+ if (value.length() > 0)
+ cmd.addArgument(key + "=" + string_escape(value));
+ else
+ cmd.addArgument(key);
}
- cmd.addArgument(arg);
}
return send(cmd, errmsg);
}