X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fcentralstation.cpp;h=fc7855b0726fc9fbcf8183d45e3b05ddd57d35ad;hb=2c08ce7d004b20a1cd9bc68fccbf734a6ba2d242;hp=124c1beed8aa14efba0fc96bc59a8ab17ca7a709;hpb=269b667175f68821a3f2b871a097d4899d7abd78;p=r2c2.git diff --git a/source/libr2c2/centralstation.cpp b/source/libr2c2/centralstation.cpp index 124c1be..fc7855b 100644 --- a/source/libr2c2/centralstation.cpp +++ b/source/libr2c2/centralstation.cpp @@ -14,7 +14,7 @@ using namespace Msp; namespace R2C2 { -CentralStation::CentralStation(const string &host): +CentralStation::CentralStation(const Options &opts): socket(Net::INET), pending_commands(0), power(false), @@ -23,7 +23,7 @@ CentralStation::CentralStation(const string &host): accessories_synced(false), sensors_synced(false) { - RefPtr addr = Net::resolve(host+":15471"); + RefPtr addr = Net::resolve(opts.get(string())+":15471"); socket.connect(*addr); IO::print("Connected to central station at %s\n", addr->str());