Add --local support to interface command line

This commit is contained in:
ZappoMan 2013-03-28 14:03:16 -07:00
parent ed6195f3a0
commit 6ec9949098

View file

@ -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;