Skip to content

Commit 535d848

Browse files
committed
Fix to make sure we are listening before we try to register
1 parent 9d19eed commit 535d848

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,11 @@ bool Manager::Init(PArgList &args)
373373

374374
PString *aor = new PString("");
375375
//sipep->SetProxy(args.GetOptionString('w'));
376+
377+
if (!StartListener()) {
378+
return false;
379+
}
380+
376381
if (!sipep->Register(param, *aor)) {
377382
cout
378383
<< "Could not register to "
@@ -386,10 +391,6 @@ bool Manager::Init(PArgList &args)
386391
}
387392
}
388393

389-
if (!StartListener()) {
390-
return false;
391-
}
392-
393394
TPState::Instance().SetProtocol(TPState::SIP);
394395

395396
} else if (!protocol.compare("h323")) {

0 commit comments

Comments
 (0)