[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r14158: Add in dummy method for setting up UPnP (and a couple of ite (torbrowser/trunk/src/current-patches)
Author: sjm217
Date: 2008-03-22 18:17:28 -0400 (Sat, 22 Mar 2008)
New Revision: 14158
Modified:
torbrowser/trunk/src/current-patches/vidalia-miniupnp.patch
Log:
Add in dummy method for setting up UPnP (and a couple of items to note)
Modified: torbrowser/trunk/src/current-patches/vidalia-miniupnp.patch
===================================================================
--- torbrowser/trunk/src/current-patches/vidalia-miniupnp.patch 2008-03-22 21:43:42 UTC (rev 14157)
+++ torbrowser/trunk/src/current-patches/vidalia-miniupnp.patch 2008-03-22 22:17:28 UTC (rev 14158)
@@ -19,3 +19,32 @@
torcontrol
util
)
+Index: src/vidalia/config/serversettings.cpp
+===================================================================
+--- src/vidalia/config/serversettings.cpp (revision 2423)
++++ src/vidalia/config/serversettings.cpp (working copy)
+@@ -130,6 +130,9 @@
+ bool rc;
+
+ if (isServerEnabled()) {
++ /* Configure UPnP device to forward DirPort and OrPort */
++ /* TODO: does isServerEnabled() return true when a server is just set up? */
++ configurePortForwarding();
+ rc = torControl()->setConf(confValues(), errmsg);
+ } else {
+ QStringList resetKeys;
+@@ -152,6 +155,14 @@
+ return rc;
+ }
+
++/* TODO: We should call this periodically, in case the router gets rebooted or forgets its UPnP settings */
++/** Configure UPnP device to forward DirPort and ORPort */
++void
++ServerSettings::configurePortForwarding()
++{
++ ;
++}
++
+ /** Virtual method called when we retrieve a server-related setting from Tor.
+ * Currently this just translates BandwidthFoo to RelayBandwidthFoo when
+ * appropriate. */