summaryrefslogtreecommitdiff
path: root/Protocols/SIP/SIPProto.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2010-01-04 04:06:19 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2010-01-04 04:06:19 +0000
commit41fe0062de49bd68ce2da4d57d670789c958216a (patch)
treeb3dc8775b1838a0c00a1f417a30c56dc3468dec6 /Protocols/SIP/SIPProto.cpp
parentd908076a8ec4e3f56db03ba3cd3b79c74e95b29d (diff)
sip: getting ready to release
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@202 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Protocols/SIP/SIPProto.cpp')
-rw-r--r--Protocols/SIP/SIPProto.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/Protocols/SIP/SIPProto.cpp b/Protocols/SIP/SIPProto.cpp
index c114e2c..fb2559c 100644
--- a/Protocols/SIP/SIPProto.cpp
+++ b/Protocols/SIP/SIPProto.cpp
@@ -98,12 +98,7 @@ public:
return tchar;
}
- TCHAR operator[](int pos) const
- {
- return tchar[pos];
- }
-
- TCHAR & operator[](int pos)
+ const TCHAR & operator[](int pos) const
{
return tchar[pos];
}
@@ -113,6 +108,14 @@ private:
};
+static pj_str_t pj_str(const char *str)
+{
+ pj_str_t ret;
+ pj_cstr(&ret, str);
+ return ret;
+}
+
+
static char * mir_pjstrdup(const pj_str_t *from)
{
char *ret = (char *) mir_alloc(from->slen + 1);
@@ -637,6 +640,7 @@ int SIPProto::Connect()
pjsua_config cfg;
pjsua_config_default(&cfg);
+ cfg.use_srtp = PJMEDIA_SRTP_OPTIONAL;
cfg.cb.on_incoming_call = &static_on_incoming_call;
cfg.cb.on_call_media_state = &static_on_call_media_state;
cfg.cb.on_call_state = &static_on_call_state;
@@ -717,6 +721,7 @@ int SIPProto::Connect()
pjsua_acc_config_default(&cfg);
cfg.user_data = this;
cfg.transport_id = transport_id;
+ cfg.use_srtp = PJMEDIA_SRTP_OPTIONAL;
BuildURI(tmp, MAX_REGS(tmp), opts.username, opts.domain);
TcharToSip id(tmp);
@@ -1245,7 +1250,7 @@ void SIPProto::on_incoming_call(pjsua_call_id call_id)
name[0] = 0;
if (remote_info[0] == _T('"'))
{
- TCHAR *other = _tcsstr(&remote_info[1], _T("\" <"));
+ const TCHAR *other = _tcsstr(&remote_info[1], _T("\" <"));
if (other != NULL)
lstrcpyn(name, &remote_info[1], min(MAX_REGS(name), other - remote_info));
}