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
fea496a1
Commit
fea496a1
authored
Aug 22, 2017
by
jehan
Browse files
Make sure log handler is only for belle-sip trace domain
parent
2eee2e30
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
include/belle-sip/utils.h
include/belle-sip/utils.h
+3
-4
src/sipstack.c
src/sipstack.c
+5
-1
tester/belle_sip_tester.c
tester/belle_sip_tester.c
+0
-1
No files found.
include/belle-sip/utils.h
View file @
fea496a1
...
...
@@ -60,7 +60,7 @@ BELLE_SIP_END_DECLS
#define BELLE_SIP_LOG_END BCTBX_LOG_END
#define belle_sip_log_level BctbxLogLevel
#define belle_sip_log_function_t Bct
oolbo
xLogFunc
#define belle_sip_log_function_t Bct
b
xLogFunc
typedef
enum
{
...
...
@@ -105,9 +105,8 @@ BELLE_SIP_BEGIN_DECLS
#endif
#define belle_sip_set_log_file bctbx_set_log_file
#define belle_sip_set_log_handler bctbx_set_log_handler
#define belle_sip_get_log_handler bctbx_get_log_handler
BELLESIP_EXPORT
void
belle_sip_set_log_handler
(
belle_sip_log_function_t
func
);
#define belle_sip_strdup_printf bctbx_strdup_printf
#define belle_sip_strcat_vprintf bctbx_strcat_vprintf
...
...
src/sipstack.c
View file @
fea496a1
...
...
@@ -112,13 +112,14 @@ static void belle_sip_stack_destroy(belle_sip_stack_t *stack){
if
(
stack
->
http_proxy_passwd
)
belle_sip_free
(
stack
->
http_proxy_passwd
);
if
(
stack
->
http_proxy_username
)
belle_sip_free
(
stack
->
http_proxy_username
);
belle_sip_list_free_with_data
(
stack
->
dns_servers
,
belle_sip_free
);
bctbx_uninit_logger
();
}
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES
(
belle_sip_stack_t
);
BELLE_SIP_INSTANCIATE_VPTR
(
belle_sip_stack_t
,
belle_sip_object_t
,
belle_sip_stack_destroy
,
NULL
,
NULL
,
FALSE
);
belle_sip_stack_t
*
belle_sip_stack_new
(
const
char
*
properties
){
bctbx_init_logger
(
FALSE
);
belle_sip_stack_t
*
stack
=
belle_sip_object_new
(
belle_sip_stack_t
);
stack
->
ml
=
belle_sip_main_loop_new
();
stack
->
timer_config
.
T1
=
500
;
...
...
@@ -315,3 +316,6 @@ int belle_sip_stack_content_encoding_available(belle_sip_stack_t *stack, const c
GET_SET_STRING
(
belle_sip_stack
,
http_proxy_host
)
GET_SET_INT
(
belle_sip_stack
,
http_proxy_port
,
int
)
void
belle_sip_set_log_handler
(
belle_sip_log_function_t
func
)
{
bctbx_set_log_handler_for_domain
(
func
,
BELLE_SIP_LOG_DOMAIN
);
}
tester/belle_sip_tester.c
View file @
fea496a1
...
...
@@ -173,7 +173,6 @@ int belle_sip_tester_set_log_file(const char *filename) {
belle_sip_message
(
"Redirecting traces to file [%s]"
,
filename
);
filehandler
=
bctbx_create_file_log_handler
(
0
,
dir
,
base
,
log_file
);
bctbx_add_log_handler
(
filehandler
);
bctbx_add_log_handler
(
filehandler
);
if
(
dir
)
bctbx_free
(
dir
);
if
(
base
)
bctbx_free
(
base
);
return
0
;
...
...
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