Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblinphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
22
Merge Requests
22
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
liblinphone
Commits
b7020d45
Commit
b7020d45
authored
Mar 11, 2016
by
jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix memory leak in event test suite
parent
9b28a0d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
event.c
coreapi/event.c
+3
-1
eventapi_tester.c
tester/eventapi_tester.c
+5
-5
No files found.
coreapi/event.c
View file @
b7020d45
...
...
@@ -111,7 +111,7 @@ void linphone_event_set_state(LinphoneEvent *lev, LinphoneSubscriptionState stat
ms_message
(
"LinphoneEvent [%p] moving to subscription state %s"
,
lev
,
linphone_subscription_state_to_string
(
state
));
lev
->
subscription_state
=
state
;
linphone_core_notify_subscription_state_changed
(
lev
->
lc
,
lev
,
state
);
if
(
state
==
LinphoneSubscriptionTerminated
){
if
(
state
==
LinphoneSubscriptionTerminated
||
state
==
LinphoneSubscriptionError
){
linphone_event_unref
(
lev
);
}
}
...
...
@@ -194,6 +194,7 @@ int linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneContent *bod
if
(
lev
->
send_custom_headers
){
sal_op_set_sent_custom_header
(
lev
->
op
,
lev
->
send_custom_headers
);
sal_custom_header_free
(
lev
->
send_custom_headers
);
lev
->
send_custom_headers
=
NULL
;
}
else
sal_op_set_sent_custom_header
(
lev
->
op
,
NULL
);
...
...
@@ -269,6 +270,7 @@ static int _linphone_event_send_publish(LinphoneEvent *lev, const LinphoneConten
}
if
(
lev
->
send_custom_headers
){
sal_op_set_sent_custom_header
(
lev
->
op
,
lev
->
send_custom_headers
);
sal_custom_header_free
(
lev
->
send_custom_headers
);
lev
->
send_custom_headers
=
NULL
;
}
else
sal_op_set_sent_custom_header
(
lev
->
op
,
NULL
);
body_handler
=
sal_body_handler_from_content
(
body
);
...
...
tester/eventapi_tester.c
View file @
b7020d45
...
...
@@ -359,15 +359,15 @@ static void publish_without_expires(void){
}
test_t
event_tests
[]
=
{
TEST_ONE_TAG
(
"Subscribe declined"
,
subscribe_test_declined
,
"
LeaksMemory
"
),
TEST_ONE_TAG
(
"Subscribe declined"
,
subscribe_test_declined
,
"
presence
"
),
TEST_ONE_TAG
(
"Subscribe terminated by subscriber"
,
subscribe_test_terminated_by_subscriber
,
"presence"
),
TEST_ONE_TAG
(
"Subscribe with custom headers"
,
subscribe_test_with_custom_header
,
"
LeaksMemory
"
),
TEST_ONE_TAG
(
"Subscribe with custom headers"
,
subscribe_test_with_custom_header
,
"
presence
"
),
TEST_ONE_TAG
(
"Subscribe refreshed"
,
subscribe_test_refreshed
,
"presence"
),
TEST_ONE_TAG
(
"Subscribe manually refreshed"
,
subscribe_test_manually_refreshed
,
"presence"
),
TEST_ONE_TAG
(
"Subscribe terminated by notifier"
,
subscribe_test_terminated_by_notifier
,
"LeaksMemory"
),
TEST_ONE_TAG
(
"Publish"
,
publish_test
,
"
LeaksMemory
"
),
TEST_ONE_TAG
(
"Publish without expires"
,
publish_without_expires
,
"
LeaksMemory
"
),
TEST_ONE_TAG
(
"Publish without automatic refresh"
,
publish_no_auto_test
,
"
LeaksMemory
"
)
TEST_ONE_TAG
(
"Publish"
,
publish_test
,
"
presence
"
),
TEST_ONE_TAG
(
"Publish without expires"
,
publish_without_expires
,
"
presence
"
),
TEST_ONE_TAG
(
"Publish without automatic refresh"
,
publish_no_auto_test
,
"
presence
"
)
};
test_suite_t
event_test_suite
=
{
"Event"
,
NULL
,
NULL
,
liblinphone_tester_before_each
,
liblinphone_tester_after_each
,
...
...
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