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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
01048011
Commit
01048011
authored
Mar 2, 2010
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#2926] Cleanup
parent
8c4b25d3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sflphone-common/src/sip/sdp.cpp
+3
-3
3 additions, 3 deletions
sflphone-common/src/sip/sdp.cpp
sflphone-common/src/sip/sipvoiplink.cpp
+13
-11
13 additions, 11 deletions
sflphone-common/src/sip/sipvoiplink.cpp
with
16 additions
and
14 deletions
sflphone-common/src/sip/sdp.cpp
+
3
−
3
View file @
01048011
...
@@ -240,17 +240,17 @@ pj_status_t Sdp::check_sdp_answer (pjsip_inv_session *inv, pjsip_rx_data *rdata)
...
@@ -240,17 +240,17 @@ pj_status_t Sdp::check_sdp_answer (pjsip_inv_session *inv, pjsip_rx_data *rdata)
message
=
rdata
->
msg_info
.
msg
;
message
=
rdata
->
msg_info
.
msg
;
if
(
message
==
NULL
)
{
if
(
message
==
NULL
)
{
_error
(
"No message"
);
_error
(
"
SDP:
No message"
);
return
PJMEDIA_SDP_EINSDP
;
return
PJMEDIA_SDP_EINSDP
;
}
}
if
(
message
->
body
==
NULL
)
{
if
(
message
->
body
==
NULL
)
{
_error
(
"Empty message body"
);
_error
(
"
SDP:
Empty message body"
);
return
PJMEDIA_SDP_EINSDP
;
return
PJMEDIA_SDP_EINSDP
;
}
}
if
(
pj_stricmp
(
&
message
->
body
->
content_type
.
type
,
&
str_application
)
||
pj_stricmp
(
&
message
->
body
->
content_type
.
subtype
,
&
str_sdp
))
{
if
(
pj_stricmp
(
&
message
->
body
->
content_type
.
type
,
&
str_application
)
||
pj_stricmp
(
&
message
->
body
->
content_type
.
subtype
,
&
str_sdp
))
{
_error
(
"Incoming Message does not contain SDP"
);
_error
(
"
SDP:
Incoming Message does not contain SDP"
);
return
PJMEDIA_SDP_EINSDP
;
return
PJMEDIA_SDP_EINSDP
;
}
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipvoiplink.cpp
+
13
−
11
View file @
01048011
...
@@ -1497,20 +1497,20 @@ void
...
@@ -1497,20 +1497,20 @@ void
SIPVoIPLink
::
SIPCallAnswered
(
SIPCall
*
call
,
pjsip_rx_data
*
rdata
)
SIPVoIPLink
::
SIPCallAnswered
(
SIPCall
*
call
,
pjsip_rx_data
*
rdata
)
{
{
_
debug
(
"
SIP
C
all
A
nswered"
);
_
info
(
"UserAgent:
SIP
c
all
a
nswered"
);
if
(
!
call
)
{
if
(
!
call
)
{
_
debug
(
"!
SIP
F
ailure
:
unknown call"
);
_
warn
(
"UserAgent: Error:
SIP
f
ailure
,
unknown call"
);
return
;
return
;
}
}
if
(
call
->
getConnectionState
()
!=
Call
::
Connected
)
{
if
(
call
->
getConnectionState
()
!=
Call
::
Connected
)
{
_debug
(
"Update call state , id = %s"
,
call
->
getCallId
().
c_str
());
_debug
(
"
UserAgent:
Update call state , id = %s"
,
call
->
getCallId
().
c_str
());
call
->
setConnectionState
(
Call
::
Connected
);
call
->
setConnectionState
(
Call
::
Connected
);
call
->
setState
(
Call
::
Active
);
call
->
setState
(
Call
::
Active
);
Manager
::
instance
().
peerAnsweredCall
(
call
->
getCallId
());
Manager
::
instance
().
peerAnsweredCall
(
call
->
getCallId
());
}
else
{
}
else
{
_debug
(
"
* SIP Info
: Answering call (on/off hold to send ACK)"
);
_debug
(
"
UserAgent
: Answering call (on/off hold to send ACK)"
);
}
}
}
}
...
@@ -3076,7 +3076,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
...
@@ -3076,7 +3076,7 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
status
=
call
->
getLocalSDP
()
->
check_sdp_answer
(
inv
,
rdata
);
status
=
call
->
getLocalSDP
()
->
check_sdp_answer
(
inv
,
rdata
);
if
(
status
!=
PJ_SUCCESS
)
{
if
(
status
!=
PJ_SUCCESS
)
{
_
debug
(
"
Failed to check_incoming_sdp in call_on_state_changed"
);
_
warn
(
"UserAgent:
Failed to check_incoming_sdp in call_on_state_changed"
);
return
;
return
;
}
}
}
}
...
@@ -3434,12 +3434,12 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3434,12 +3434,12 @@ mod_on_rx_request (pjsip_rx_data *rdata)
// No need to go any further on incoming ACK
// No need to go any further on incoming ACK
if
(
rdata
->
msg_info
.
msg
->
line
.
req
.
method
.
id
==
PJSIP_ACK_METHOD
)
{
if
(
rdata
->
msg_info
.
msg
->
line
.
req
.
method
.
id
==
PJSIP_ACK_METHOD
)
{
_
debug
(
"UserAgent: received an ACK"
);
_
info
(
"UserAgent: received an ACK"
);
return
true
;
return
true
;
}
}
// Handle the incoming call invite in this function
// Handle the incoming call invite in this function
_
debug
(
"UserAgent: Receiving REQUEST using transport: %s %s (refcnt=%d)"
,
_
info
(
"UserAgent: Receiving REQUEST using transport: %s %s (refcnt=%d)"
,
rdata
->
tp_info
.
transport
->
obj_name
,
rdata
->
tp_info
.
transport
->
obj_name
,
rdata
->
tp_info
.
transport
->
info
,
rdata
->
tp_info
.
transport
->
info
,
(
int
)
pj_atomic_get
(
rdata
->
tp_info
.
transport
->
ref_cnt
));
(
int
)
pj_atomic_get
(
rdata
->
tp_info
.
transport
->
ref_cnt
));
...
@@ -3470,7 +3470,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3470,7 +3470,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
/* If we can't find any voIP link to handle the incoming call */
/* If we can't find any voIP link to handle the incoming call */
if
(
!
link
)
{
if
(
!
link
)
{
_warn
(
"
ERROR
: cannot retrieve the voiplink from the account ID..."
);
_warn
(
"
UserAgent: Error
: cannot retrieve the voiplink from the account ID..."
);
pj_strdup2
(
_pool
,
&
reason
,
"ERROR: cannot retrieve the voip link from account"
);
pj_strdup2
(
_pool
,
&
reason
,
"ERROR: cannot retrieve the voip link from account"
);
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
&
reason
,
NULL
,
NULL
);
&
reason
,
NULL
,
NULL
);
...
@@ -3582,7 +3582,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3582,7 +3582,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
/************************************************************************************************/
/************************************************************************************************/
_
debug
(
"UserAgent: Create a new call"
);
_
info
(
"UserAgent: Create a new call"
);
// Generate a new call ID for the incoming call!
// Generate a new call ID for the incoming call!
id
=
Manager
::
instance
().
getNewCallID
();
id
=
Manager
::
instance
().
getNewCallID
();
...
@@ -3639,7 +3639,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3639,7 +3639,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
// Notify UI there is an incoming call
// Notify UI there is an incoming call
_debug
(
"Add call to account link"
);
_debug
(
"
UserAgent:
Add call to account link"
);
if
(
Manager
::
instance
().
incomingCall
(
call
,
account_id
))
{
if
(
Manager
::
instance
().
incomingCall
(
call
,
account_id
))
{
// Add this call to the callAccountMap in ManagerImpl
// Add this call to the callAccountMap in ManagerImpl
...
@@ -3672,7 +3672,8 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3672,7 +3672,8 @@ mod_on_rx_request (pjsip_rx_data *rdata)
if
(
status
!=
PJ_SUCCESS
)
{
if
(
status
!=
PJ_SUCCESS
)
{
delete
call
;
call
=
NULL
;
delete
call
;
call
=
NULL
;
pj_strdup2
(
_pool
,
&
reason
,
"fail in receiving local offer"
);
_warn
(
"UserAgent: fail in receiving initial offer"
);
pj_strdup2
(
_pool
,
&
reason
,
"fail in receiving initial offer"
);
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
&
reason
,
NULL
,
NULL
);
&
reason
,
NULL
,
NULL
);
return
false
;
return
false
;
...
@@ -3683,6 +3684,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
...
@@ -3683,6 +3684,7 @@ mod_on_rx_request (pjsip_rx_data *rdata)
status
=
pjsip_dlg_create_uas
(
pjsip_ua_instance
(),
rdata
,
NULL
,
&
dialog
);
status
=
pjsip_dlg_create_uas
(
pjsip_ua_instance
(),
rdata
,
NULL
,
&
dialog
);
if
(
status
!=
PJ_SUCCESS
)
{
if
(
status
!=
PJ_SUCCESS
)
{
delete
call
;
call
=
NULL
;
delete
call
;
call
=
NULL
;
_warn
(
"UserAgent: Error: Failed to create uas dialog"
);
pj_strdup2
(
_pool
,
&
reason
,
"fail to create uas dialog"
);
pj_strdup2
(
_pool
,
&
reason
,
"fail to create uas dialog"
);
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
pjsip_endpt_respond_stateless
(
_endpt
,
rdata
,
PJSIP_SC_INTERNAL_SERVER_ERROR
,
&
reason
,
NULL
,
NULL
);
&
reason
,
NULL
,
NULL
);
...
...
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