Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
149f8286
Commit
149f8286
authored
Dec 03, 2019
by
jehan
Browse files
allows sipfrag with response without final CRLF
parent
1edfd5a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/sal/call-op.cpp
src/sal/call-op.cpp
+10
-0
No files found.
src/sal/call-op.cpp
View file @
149f8286
...
...
@@ -1471,6 +1471,12 @@ void SalCallOp::processNotify (const belle_sip_request_event_t *event, belle_sip
&&
body
)
{
auto
sipfrag
=
BELLE_SIP_RESPONSE
(
belle_sip_message_parse
(
body
));
if
(
!
sipfrag
)
{
lWarning
()
<<
"Cannot parse sipfrag ["
<<
body
<<
"trying compatibility mode by adding CRLF"
;
string
compatibilityBody
(
body
);
compatibilityBody
.
append
(
"
\r\n
"
);
sipfrag
=
BELLE_SIP_RESPONSE
(
belle_sip_message_parse
(
compatibilityBody
.
c_str
()));
}
if
(
sipfrag
)
{
int
code
=
belle_sip_response_get_status_code
(
sipfrag
);
SalReferStatus
status
=
SalReferFailed
;
...
...
@@ -1484,6 +1490,10 @@ void SalCallOp::processNotify (const belle_sip_request_event_t *event, belle_sip
auto
response
=
createResponseFromRequest
(
request
,
200
);
belle_sip_server_transaction_send_response
(
serverTransaction
,
response
);
mRoot
->
mCallbacks
.
notify_refer
(
this
,
status
);
}
else
{
lError
()
<<
"Notify with malformed sipfrag, rejecting"
;
auto
response
=
createResponseFromRequest
(
request
,
400
);
belle_sip_server_transaction_send_response
(
serverTransaction
,
response
);
}
}
else
{
lError
()
<<
"Notify without sipfrag or not for 'refer' event package, rejecting"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment