Index: /code/branches/masterserver/data/gui/scripts/MultiplayerMenu.lua
===================================================================
--- /code/branches/masterserver/data/gui/scripts/MultiplayerMenu.lua	(revision 7691)
+++ /code/branches/masterserver/data/gui/scripts/MultiplayerMenu.lua	(revision 7692)
@@ -98,5 +98,5 @@
     end
     
-function P.showServerList()
+function P.showServerListmeow()
     local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     CEGUI.toListbox(listbox):resetList()
@@ -131,9 +131,11 @@
 
 -- same as above, but use WAN Discovery
-function P.showServerListWAN()
+function P.showServerList()
     local listbox = winMgr:getWindow("orxonox/MultiplayerListbox")
     CEGUI.toListbox(listbox):resetList()
     local discovery = orxonox.WANDiscovery:getInstance()
+    cout(0, "discovering.\n" )
     discovery:discover()
+    cout(0, "discovered.\n" )
     P.serverList = {}
     local index = 0
Index: /code/branches/masterserver/src/libraries/network/MasterServerComm.cc
===================================================================
--- /code/branches/masterserver/src/libraries/network/MasterServerComm.cc	(revision 7691)
+++ /code/branches/masterserver/src/libraries/network/MasterServerComm.cc	(revision 7692)
@@ -110,5 +110,9 @@
     /* see whether anything happened */
     /* WORK MARK REMOVE THIS OUTPUT */
-    //COUT(2) << "MARK polling...\n";
+    COUT(2) << "polling masterserver...\n";
+
+    /* address buffer */
+    char *addrconv = NULL;
+    int retval = 0;
 
     /* enet_host_service returns 0 if no event occured */
@@ -116,8 +120,4 @@
     if( enet_host_service( this->client, this->event, 1000 ) > 0 )
     { 
-      /* address buffer */
-      char *addrconv = NULL;
-      int retval = 0;
-
       /* check what type of event it is and react accordingly */
       switch (this->event->type)
@@ -131,4 +131,10 @@
         case ENET_EVENT_TYPE_RECEIVE: 
           addrconv = (char *) calloc( 50, 1 );
+          if( !addrconv ) 
+          { COUT(2) << "MasterServerComm.cc: Could not allocate memory!\n";
+            break;
+          }
+
+          /* resolve IP */
           enet_address_get_host_ip( &(this->event->peer->address), 
             addrconv, 49 );
@@ -175,5 +181,6 @@
     enet_host_flush( this->client );
    
-    if( packet ) free( packet );
+    /* free the packet */
+    enet_packet_destroy( packet );
 
     /* all done. */
Index: /code/branches/masterserver/src/libraries/network/MasterServerProtocol.h
===================================================================
--- /code/branches/masterserver/src/libraries/network/MasterServerProtocol.h	(revision 7691)
+++ /code/branches/masterserver/src/libraries/network/MasterServerProtocol.h	(revision 7692)
@@ -31,5 +31,5 @@
 
 /* master server address (to be moved elsewhere later) */
-#define MS_ADDRESS "172.16.113.1"
+#define MS_ADDRESS "129.132.3.8"
 
 #define MSPROTO_CLIENT "CL"
Index: /code/branches/masterserver/src/libraries/network/WANDiscovery.cc
===================================================================
--- /code/branches/masterserver/src/libraries/network/WANDiscovery.cc	(revision 7691)
+++ /code/branches/masterserver/src/libraries/network/WANDiscovery.cc	(revision 7692)
@@ -96,9 +96,9 @@
        * the list
        */
-      return 1; 
+      return 2; 
     }
 
     /* done handling, return all ok code 0 */
-    return 0;
+    return 1;
   }
  
@@ -112,9 +112,17 @@
 
     /* poll for replies */
-    /* TODO add some timeout here so we don't wait indefinitely */
-    while( !((this->msc).pollForReply( rhandler )) )
-      /* nothing */;
-
-    /* done receiving. */
+    int i = WANDISC_MAXTRIES;
+    while( i > 0 )
+    {
+      /* poll for reply and act according to what was received */
+      switch( this->msc.pollForReply( rhandler ) )
+      { case 0: /* no event occured, decrease timeout */
+          --i; break;
+        case 1: /* got a list element, continue */ 
+          break;
+        case 2: /* done. */
+          i = 0; break;
+      }
+    }
   }
 
Index: /code/branches/masterserver/src/libraries/network/WANDiscovery.h
===================================================================
--- /code/branches/masterserver/src/libraries/network/WANDiscovery.h	(revision 7691)
+++ /code/branches/masterserver/src/libraries/network/WANDiscovery.h	(revision 7692)
@@ -38,4 +38,5 @@
 #include <vector>
 
+#define WANDISC_MAXTRIES 5
 
 // tolua_begin
Index: /code/branches/masterserver/src/modules/masterserver/MasterServer.cc
===================================================================
--- /code/branches/masterserver/src/modules/masterserver/MasterServer.cc	(revision 7691)
+++ /code/branches/masterserver/src/modules/masterserver/MasterServer.cc	(revision 7692)
@@ -35,5 +35,5 @@
 {
   /* singleton stuff */
-  ManageScopedSingleton( MasterServer, ScopeID::Root, false );
+  //ManageScopedSingleton( MasterServer, ScopeID::Root, false );
 
   /* helpers */
