OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
065783d
)
tools/l2cap-tester: Fix closing server sockets in time
author
Johan Hedberg
<johan.hedberg@intel.com>
Sun, 6 Oct 2013 15:38:17 +0000
(18:38 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Sun, 6 Oct 2013 15:39:33 +0000
(18:39 +0300)
We should use the teardown function instead of the destroy function for
closing server sockets since otherwise tests may conflict with each
other.
tools/l2cap-tester.c
patch
|
blob
|
history
diff --git
a/tools/l2cap-tester.c
b/tools/l2cap-tester.c
index
802c0e4
..
df8f1bf
100644
(file)
--- a/
tools/l2cap-tester.c
+++ b/
tools/l2cap-tester.c
@@
-198,6
+198,11
@@
static void test_post_teardown(const void *test_data)
{
struct test_data *data = tester_get_data();
+ if (data->io_id > 0) {
+ g_source_remove(data->io_id);
+ data->io_id = 0;
+ }
+
hciemu_unref(data->hciemu);
data->hciemu = NULL;
}
@@
-206,9
+211,6
@@
static void test_data_free(void *test_data)
{
struct test_data *data = test_data;
- if (data->io_id > 0)
- g_source_remove(data->io_id);
-
free(data);
}