[reSIProcate] examples does not run properly
Hi All,
I have built the resiprocate stack under VC6. (the newest code checked out
today)
But the SipIMP does not run properly.
The configuration code are (SipIMP.cpp):
--------------------------
CString mHost =
this->GetProfileString("Proxy","host","192.168.16.170");
CString mProtocol =
this->GetProfileString("Proxy","protocol","UDP");
int mPort = this->GetProfileInt("Proxy","port",5060);
CString mUser = this->GetProfileString("Proxy","user","8001");
CString mPassword =
this->GetProfileString("Proxy","password","8001");
CString mKey = this->GetProfileString("PKI","key","");
CString mCertPath =
this->GetProfileString("PKI","CertPath","C:\\certs");
CString mOutbound = this->GetProfileString("Proxy","outbound","");
CString mContact =
this->GetProfileString("UA","contact","sip:8574@xxxxxxxxxxxxxx");
int port = this->GetProfileInt("UA","udpPort",5060);
int tlsPort = this->GetProfileInt("UA","tlsPort",5061);
------------------------------------
The code leads to crash:
--------------------(1: SipIMP.cpp)
// registter
if ( !mHost.IsEmpty() )
{
assert(tuIM);
tuIM->registerAor( aor , Data(mPassword) ); <--- Lead to
crash
}
--------------------(2: Helper.cxx)
SipMessage*
Helper::makeRegister(const NameAddr& to, const NameAddr& from, const
NameAddr& contact)
{
SipMessage* request = new SipMessage;
RequestLine rLine(REGISTER);
rLine.uri().scheme() = to.uri().scheme();
rLine.uri().host() = to.uri().host();
rLine.uri().port() = to.uri().port();
if (to.uri().exists(p_transport))
{
rLine.uri().param(p_transport) = to.uri().param(p_transport);
}
request->header(h_To) = to; <---------------------- Crash here,
(unhandled exception!)
request->header(h_RequestLine) = rLine;
request->header(h_MaxForwards).value() = 70;
request->header(h_CSeq).method() = REGISTER;
request->header(h_CSeq).sequence() = 1;
request->header(h_From) = from;
request->header(h_From).param(p_tag) =
Helper::computeTag(Helper::tagSize);
request->header(h_CallId).value() = Helper::computeCallId();
assert(!request->exists(h_Contacts) ||
request->header(h_Contacts).empty());
request->header(h_Contacts).push_front( contact );
Via via;
request->header(h_Vias).push_front(via);
return request;
}
Call Stack when crash:
------------------------------------------------
resip::Helper::makeRegister(const resip::NameAddr & {...}, const
resip::NameAddr & {...}, const resip::NameAddr & {...}) line 79
resip::Dialog::makeInitialRegister(const resip::NameAddr & {...}, const
resip::NameAddr & {...}) line 361 + 17 bytes
resip::TuIM::registerAor(const resip::Uri & {...}, const resip::Data &
{...}) line 1153 + 105 bytes
SipImpApp::imInit() line 370 + 70 bytes
SipImpApp::InitInstance() line 79
AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
0x0013444e, int 1) line 39 + 11 bytes
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char *
0x0013444e, int 1) line 30
WinMainCRTStartup() line 198 + 54 bytes
KERNEL32! 7c581af6()
-------------------------------
Can anyone help me out? and give me some suggestions.
Thanks in advance!
Ling