Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
0f08d546
Commit
0f08d546
authored
12 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #9968: fixed segfault in transaction callback
parent
c524e9c9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/sip/sipvoiplink.cpp
+18
-6
18 additions, 6 deletions
daemon/src/sip/sipvoiplink.cpp
with
18 additions
and
6 deletions
daemon/src/sip/sipvoiplink.cpp
+
18
−
6
View file @
0f08d546
...
...
@@ -171,7 +171,15 @@ pj_bool_t transaction_response_cb(pjsip_rx_data *rdata)
pj_bool_t
transaction_request_cb
(
pjsip_rx_data
*
rdata
)
{
if
(
!
rdata
or
!
rdata
->
msg_info
.
msg
)
{
ERROR
(
"SIPVoIPLink: rx_data is NULL"
);
return
false
;
}
pjsip_method
*
method
=
&
rdata
->
msg_info
.
msg
->
line
.
req
.
method
;
if
(
!
method
)
{
ERROR
(
"SIPVoIPLink: method is NULL"
);
return
false
;
}
if
(
method
->
id
==
PJSIP_ACK_METHOD
&&
pjsip_rdata_get_dlg
(
rdata
))
return
true
;
...
...
@@ -188,15 +196,19 @@ pj_bool_t transaction_request_cb(pjsip_rx_data *rdata)
pj_str_t
*
str
=
&
method
->
name
;
std
::
string
request
(
str
->
ptr
,
str
->
slen
);
if
(
request
.
find
(
"NOTIFY"
)
!=
(
size_t
)
-
1
)
{
int
voicemail
;
if
(
sscanf
((
const
char
*
)
rdata
->
msg_info
.
msg
->
body
->
data
,
"Voice-Message: %d/"
,
&
voicemail
)
==
1
&&
voicemail
!=
0
)
Manager
::
instance
().
startVoiceMessageNotification
(
account_id
,
voicemail
);
if
(
request
.
find
(
"NOTIFY"
)
!=
std
::
string
::
npos
)
{
if
(
rdata
->
msg_info
.
msg
->
body
)
{
void
*
data
=
rdata
->
msg_info
.
msg
->
body
->
data
;
if
(
data
)
{
int
voicemail
=
0
;
int
ret
=
sscanf
((
const
char
*
)
data
,
"Voice-Message: %d/"
,
&
voicemail
);
if
(
ret
==
1
and
voicemail
!=
0
)
Manager
::
instance
().
startVoiceMessageNotification
(
account_id
,
voicemail
);
}
}
}
pjsip_endpt_respond_stateless
(
endpt_
,
rdata
,
PJSIP_SC_OK
,
NULL
,
NULL
,
NULL
);
return
true
;
}
else
if
(
method
->
id
==
PJSIP_OPTIONS_METHOD
)
{
handleIncomingOptions
(
rdata
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment