]> git.tdb.fi Git - r2c2.git/blobdiff - source/network/server.cpp
Add an SVG exporter to Designer
[r2c2.git] / source / network / server.cpp
index 8db68717ddf27743b903d85c94976df10a605f83..2bf641297309ad2e3a5ba304f6502af00fbc6fad 100644 (file)
@@ -54,7 +54,7 @@ void Server::train_added(Train &train)
 
        TrainInfoPacket pkt;
        pkt.address = train.get_address();
-       pkt.loco_type = train.get_locomotive_type().get_article_number();
+       pkt.loco_type = train.get_locomotive_type().get_article_number().str();
        pkt.name = train.get_name();
        send(pkt);
 }
@@ -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);
        }
 
@@ -135,7 +135,7 @@ void Server::Connection::handshake_done()
                {
                        TrainInfoPacket pkt;
                        pkt.address = train.get_address();
-                       pkt.loco_type = train.get_locomotive_type().get_article_number();
+                       pkt.loco_type = train.get_locomotive_type().get_article_number().str();
                        pkt.name = train.get_name();
                        comm.send(pkt);
                }