diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-04-12 18:44:07 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-04-12 20:27:42 +0000 |
commit | c0d94c2a75adff93fc0307946e88081332dd28fd (patch) | |
tree | 256d1ba3e1e2cac4cb47a75a590fcfd4dd35bf2b /extcap | |
parent | afff4248c9a5dce9077028b469351bdc7080da4e (diff) |
androiddump: Disable automatic starting adb
It does not work as expected.
Change-Id: Ibbfce9fdbb3e1aae747101a576fbe32c979b42c9
Reviewed-on: https://code.wireshark.org/review/8033
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/androiddump.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 6342c1552b..070d3e146a 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -335,6 +335,14 @@ static socket_handle_t adb_connect(const char *server_ip, unsigned short *server } if (connect(sock, (struct sockaddr *) &server, sizeof(server)) == SOCKET_ERROR) { +#if 0 +/* NOTE: This does not work well - make significant delay while initializing Wireshark. + Do fork() then call "adb" also does not make sense, because there is need to + do something like sleep(1) to ensure adb is started... system() cannot be used + on Windows, because open console window. This helper does not work as expected, + so disable it and user must ensure that adb is started (adb start-server, + but also all other command start-server automatically) +*/ #ifdef _WIN32 if (_execlp("adb", "adb", "start-server", NULL)) { #else @@ -349,6 +357,11 @@ static socket_handle_t adb_connect(const char *server_ip, unsigned short *server fprintf(stderr, "INFO: Please check that adb daemon is running.\n"); return INVALID_SOCKET; } +#else + fprintf(stderr, "ERROR: Cannot connect to ADB: %s\n", strerror(errno)); + fprintf(stderr, "INFO: Please check that adb daemon is running.\n"); + return INVALID_SOCKET; +#endif } if (verbose) { |