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
064b3c30
Commit
064b3c30
authored
Aug 02, 2018
by
Ghislain MARY
Browse files
Fix bad cast of SalAddress into a LinphoneAddress in linphone_proxy_config_get_service_route().
parent
6d7fdab6
Pipeline
#214
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
coreapi/private_structs.h
coreapi/private_structs.h
+1
-0
coreapi/proxy.c
coreapi/proxy.c
+16
-1
No files found.
coreapi/private_structs.h
View file @
064b3c30
...
...
@@ -89,6 +89,7 @@ struct _LinphoneProxyConfig
char
*
reg_identity
;
LinphoneAddress
*
identity_address
;
LinphoneAddress
*
contact_address
;
LinphoneAddress
*
service_route
;
LinphoneAddress
*
contact_address_without_params
;
bctbx_list_t
*
reg_routes
;
char
*
quality_reporting_collector
;
...
...
coreapi/proxy.c
View file @
064b3c30
...
...
@@ -265,6 +265,7 @@ void _linphone_proxy_config_destroy(LinphoneProxyConfig *cfg){
linphone_error_info_unref
(
cfg
->
ei
);
}
if
(
cfg
->
service_route
)
linphone_address_unref
(
cfg
->
service_route
);
if
(
cfg
->
contact_address
)
linphone_address_unref
(
cfg
->
contact_address
);
if
(
cfg
->
contact_address_without_params
)
linphone_address_unref
(
cfg
->
contact_address_without_params
);
...
...
@@ -1416,8 +1417,22 @@ const LinphoneErrorInfo *linphone_proxy_config_get_error_info(const LinphoneProx
}
const
LinphoneAddress
*
linphone_proxy_config_get_service_route
(
const
LinphoneProxyConfig
*
cfg
)
{
return
cfg
->
op
?
(
const
LinphoneAddress
*
)
cfg
->
op
->
getServiceRoute
()
:
NULL
;
if
(
!
cfg
->
op
)
return
NULL
;
const
SalAddress
*
salAddr
=
cfg
->
op
->
getServiceRoute
();
if
(
!
salAddr
)
return
NULL
;
if
(
cfg
->
service_route
)
L_GET_PRIVATE_FROM_C_OBJECT
(
cfg
->
service_route
)
->
setInternalAddress
(
const_cast
<
SalAddress
*>
(
salAddr
));
else
{
char
*
buf
=
sal_address_as_string
(
salAddr
);
const_cast
<
LinphoneProxyConfig
*>
(
cfg
)
->
service_route
=
linphone_address_new
(
buf
);
ms_free
(
buf
);
}
return
cfg
->
service_route
;
}
const
char
*
linphone_proxy_config_get_transport
(
const
LinphoneProxyConfig
*
cfg
)
{
const
char
*
addr
=
NULL
;
const
char
*
ret
=
"udp"
;
/*default value*/
...
...
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