ekiga r6844 - in trunk: . src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6844 - in trunk: . src/endpoints
- Date: Sat, 6 Sep 2008 17:40:26 +0000 (UTC)
Author: dsandras
Date: Sat Sep 6 17:40:26 2008
New Revision: 6844
URL: http://svn.gnome.org/viewvc/ekiga?rev=6844&view=rev
Log:
Use new way of registering to allow registering to non standard ports.
Modified:
trunk/ChangeLog
trunk/src/endpoints/sip-endpoint.cpp
Modified: trunk/src/endpoints/sip-endpoint.cpp
==============================================================================
--- trunk/src/endpoints/sip-endpoint.cpp (original)
+++ trunk/src/endpoints/sip-endpoint.cpp Sat Sep 6 17:40:26 2008
@@ -590,14 +590,26 @@
void Opal::Sip::EndPoint::Register (const Opal::Account & account)
{
std::stringstream aor;
+ std::string host = account.get_host ();
+ std::string::size_type loc = host.find (":", 0);
+ if (loc != std::string::npos)
+ host = host.substr (0, loc);
- aor << account.get_username () << "@" << account.get_host ();
- if (!SIPEndPoint::Register (account.get_host (),
- account.get_username (),
- account.get_authentication_username (),
- account.get_password (),
- PString::Empty (),
- (account.is_enabled () ? account.get_timeout () : 0)))
+ if (account.get_username ().find ("@") == std::string::npos)
+ aor << account.get_username () << "@" << host;
+ else
+ aor << account.get_username ();
+
+ SIPRegister::Params params;
+ params.m_addressOfRecord = aor.str ();
+ params.m_registrarAddress = account.get_host ();
+ params.m_authID = account.get_authentication_username ();
+ params.m_password = account.get_password ();
+ params.m_expire = (account.is_enabled () ? account.get_timeout () : 0);
+ params.m_minRetryTime = 0;
+ params.m_maxRetryTime = 0;
+
+ if (!SIPEndPoint::Register (params))
OnRegistrationFailed (aor.str (), SIP_PDU::MaxStatusCode, account.is_enabled ());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]