]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/server.cpp
Display the total length of selected tracks in status bar
[r2c2.git] / source / network / server.cpp
index dd0dd8b927bde2a43ea9522d30aaef3f99cd912a..d27683965897161a1c50f26db4716070c53f5002 100644 (file)
@@ -6,9 +6,9 @@ Distributed under the GPL
 */
 
 #include <msp/net/inet.h>
-#include "libmarklin/locotype.h"
 #include "libmarklin/route.h"
 #include "libmarklin/train.h"
+#include "libmarklin/vehicletype.h"
 #include "server.h"
 
 using namespace std;
@@ -119,11 +119,11 @@ Server::Connection::~Connection()
 
 void Server::Connection::handshake_done()
 {
-       const map<string, Route *> &routes = server.layout.get_routes();
-       for(map<string, Route *>::const_iterator i=routes.begin(); i!=routes.end(); ++i)
+       const set<Route *> &routes = server.layout.get_routes();
+       for(set<Route *>::const_iterator i=routes.begin(); i!=routes.end(); ++i)
        {
                RouteInfoPacket pkt;
-               pkt.name = i->first;
+               pkt.name = (*i)->get_name();
                comm.send(pkt);
        }