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
belle-sip
Commits
8b7546d3
Commit
8b7546d3
authored
Jun 12, 2013
by
jehan
Browse files
add privacy support for dialog
parent
5a01fc61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/belle_sip_internal.h
src/belle_sip_internal.h
+1
-0
src/dialog.c
src/dialog.c
+9
-0
No files found.
src/belle_sip_internal.h
View file @
8b7546d3
...
...
@@ -710,6 +710,7 @@ struct belle_sip_dialog{
int
terminate_on_bye
:
1
;
int
needs_ack
:
1
;
belle_sip_transaction_t
*
last_transaction
;
belle_sip_header_privacy_t
*
privacy
;
};
belle_sip_dialog_t
*
belle_sip_dialog_new
(
belle_sip_transaction_t
*
t
);
...
...
src/dialog.c
View file @
8b7546d3
...
...
@@ -43,6 +43,10 @@ static void belle_sip_dialog_uninit(belle_sip_dialog_t *obj){
belle_sip_object_unref
(
obj
->
last_out_ack
);
if
(
obj
->
last_transaction
)
belle_sip_object_unref
(
obj
->
last_transaction
);
if
(
obj
->
privacy
)
belle_sip_object_unref
(
obj
->
privacy
);
/* if(obj->preferred_identity)
belle_sip_object_unref(obj->preferred_identity);*/
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES
(
belle_sip_dialog_t
);
...
...
@@ -227,6 +231,8 @@ int belle_sip_dialog_establish(belle_sip_dialog_t *obj, belle_sip_request_t *req
if
(
obj
->
state
==
BELLE_SIP_DIALOG_NULL
){
set_to_tag
(
obj
,
to
);
obj
->
call_id
=
(
belle_sip_header_call_id_t
*
)
belle_sip_object_ref
(
call_id
);
obj
->
privacy
=
belle_sip_message_get_header_by_type
(
req
,
belle_sip_header_privacy_t
);
if
(
obj
->
privacy
)
belle_sip_object_ref
(
obj
->
privacy
);
set_state
(
obj
,
BELLE_SIP_DIALOG_EARLY
);
}
return
-
1
;
...
...
@@ -505,6 +511,9 @@ belle_sip_request_t *belle_sip_dialog_create_request(belle_sip_dialog_t *obj, co
if
(
obj
->
route_set
)
{
belle_sip_message_add_headers
((
belle_sip_message_t
*
)
req
,
obj
->
route_set
);
}
if
(
obj
->
privacy
)
{
belle_sip_message_add_header
((
belle_sip_message_t
*
)
req
,
BELLE_SIP_HEADER
(
obj
->
privacy
));
}
return
req
;
}
static
unsigned
int
is_system_header
(
belle_sip_header_t
*
header
)
{
...
...
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