From 6ec9949098221054fa610b940560575d3e1d4116 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 28 Mar 2013 14:03:16 -0700 Subject: [PATCH] Add --local support to interface command line --- interface/src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 203d9098e4..f0eecd4d62 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -897,6 +897,14 @@ void audioMixerUpdate(in_addr_t newMixerAddress, in_port_t newMixerPort) { int main(int argc, const char * argv[]) { + // Handle Local Domain testing with the --local command line + bool wantLocalDomain = cmdOptionExists(argc, argv, "--local"); + if (wantLocalDomain) { + printf("Local Domain MODE!\n"); + int ip = getLocalAddress(); + sprintf(DOMAIN_IP,"%d.%d.%d.%d", (ip & 0xFF), ((ip >> 8) & 0xFF),((ip >> 16) & 0xFF), ((ip >> 24) & 0xFF)); + } + // the callback for our instance of AgentList is attachNewHeadToAgent agentList.linkedDataCreateCallback = &attachNewHeadToAgent;