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
5cfb2710
Commit
5cfb2710
authored
Oct 17, 2013
by
Sylvain Berfini
Browse files
Fix guess_contact_for_register when identity contains display name
parent
db7c47f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
coreapi/proxy.c
View file @
5cfb2710
...
...
@@ -275,15 +275,28 @@ LinphoneAddress *guess_contact_for_register(LinphoneProxyConfig *obj){
host
=
linphone_address_get_domain
(
proxy
);
if
(
host
!=
NULL
){
int
localport
=
-
1
;
const
char
*
localip
=
NULL
;
char
*
tmp
;
char
*
tmp2
;
LinphoneAddress
*
identity
;
LinphoneAddress
*
contact
;
if
(
obj
->
contact_params
)
tmp
=
ms_strdup_printf
(
"%s;%s"
,
obj
->
reg_identity
,
obj
->
contact_params
);
else
if
(
obj
->
contact_params
)
{
// We want to add a list of contacts params to the linphone address
// We remove the display name in the identity (if present) to prevent a failure in the parsing of the address due to the quotes
identity
=
linphone_address_new
(
obj
->
reg_identity
);
if
(
identity
)
{
tmp2
=
linphone_address_as_string_uri_only
(
identity
);
tmp
=
ms_strdup_printf
(
"%s;%s"
,
tmp2
,
obj
->
contact_params
);
linphone_address_destroy
(
identity
);
ms_free
(
tmp2
);
}
else
{
tmp
=
ms_strdup_printf
(
"%s;%s"
,
obj
->
reg_identity
,
obj
->
contact_params
);
}
}
else
{
tmp
=
strdup
(
obj
->
reg_identity
);
}
contact
=
linphone_address_new
(
tmp
);
if
(
!
contact
)
{
...
...
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