Index: src/vidalia/CMakeLists.txt
===================================================================
--- src/vidalia/CMakeLists.txt	(revision 2423)
+++ src/vidalia/CMakeLists.txt	(working copy)
@@ -238,9 +238,16 @@
 endif(APPLE)
 add_dependencies(${vidalia_BIN} translations)
 
+## Link in miniupnpc
+find_library(MINIUPNPC
+    NAMES miniupnpc
+    PATHS ${MINIUPNPC_LIBRARY_DIR}
+)
+
 ## Link to the Qt libraries and other libraries built as a part of Vidalia
 target_link_libraries(${vidalia_BIN}
   ${QT_LIBRARIES}
+  ${MINIUPNPC}
   torcontrol
   util
 )

Index: src/vidalia/CMakeLists.txt
===================================================================
--- src/vidalia/CMakeLists.txt	(revision 2423)
+++ src/vidalia/CMakeLists.txt	(working copy)
@@ -238,9 +238,16 @@
 endif(APPLE)
 add_dependencies(${vidalia_BIN} translations)
 
+## Link in miniupnpc
+find_library(MINIUPNPC
+    NAMES miniupnpc
+    PATHS ${MINIUPNPC_LIBRARY_DIR}
+)
+
 ## Link to the Qt libraries and other libraries built as a part of Vidalia
 target_link_libraries(${vidalia_BIN}
   ${QT_LIBRARIES}
+  ${MINIUPNPC}
   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. */

Add in dummy method for setting up UPnP (and a couple of items to note)
Add in dummy method for setting up UPnP (and a couple of items to note)

svn:r14158
