• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revision3b268646f802d72f9b53800ac00540201223cf2e (tree)
Time2016-08-17 07:52:46
AuthorJosh Gao <jmgao@goog...>
Commitergitbuildkicker

Log Message

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)

Change Summary

Incremental Difference

--- a/adb/sockets.cpp
+++ b/adb/sockets.cpp
@@ -43,8 +43,6 @@
4343 using std::recursive_mutex;
4444 #endif
4545
46-static void local_socket_close(asocket* s);
47-
4846 static recursive_mutex& local_socket_list_lock = *new recursive_mutex();
4947 static unsigned local_socket_next_id = 1;
5048
@@ -128,7 +126,7 @@ void close_all_sockets(atransport *t)
128126 restart:
129127 for (s = local_socket_list.next; s != &local_socket_list; s = s->next) {
130128 if (s->transport == t || (s->peer && s->peer->transport == t)) {
131- local_socket_close(s);
129+ s->close(s);
132130 goto restart;
133131 }
134132 }