system/corennnnn
Revision | 3b268646f802d72f9b53800ac00540201223cf2e (tree) |
---|---|
Time | 2016-08-17 07:52:46 |
Author | Josh Gao <jmgao@goog...> |
Commiter | gitbuildkicker |
adb: use asocket's close function when closing.
close_all_sockets was assuming that all registered local sockets used
local_socket_close as their close function. However, this is not true
for JDWP sockets.
Bug: http://b/28347842
Change-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e
(cherry picked from commit 53eb31d87cb84a4212f4850bf745646e1fb12814)
(cherry picked from commit 014b01706cc64dc9c2ad94a96f62e07c058d0b5d)
@@ -43,8 +43,6 @@ | ||
43 | 43 | using std::recursive_mutex; |
44 | 44 | #endif |
45 | 45 | |
46 | -static void local_socket_close(asocket* s); | |
47 | - | |
48 | 46 | static recursive_mutex& local_socket_list_lock = *new recursive_mutex(); |
49 | 47 | static unsigned local_socket_next_id = 1; |
50 | 48 |
@@ -128,7 +126,7 @@ void close_all_sockets(atransport *t) | ||
128 | 126 | restart: |
129 | 127 | for (s = local_socket_list.next; s != &local_socket_list; s = s->next) { |
130 | 128 | if (s->transport == t || (s->peer && s->peer->transport == t)) { |
131 | - local_socket_close(s); | |
129 | + s->close(s); | |
132 | 130 | goto restart; |
133 | 131 | } |
134 | 132 | } |