aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/browser-wpadebug.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-10-09 12:56:52 -0700
committerDmitry Shmidt <dimitrysh@google.com>2014-10-09 12:56:52 -0700
commita7b06faf528d1765cc2712cc9a31ad45d7c3110b (patch)
tree3bab8a719792eb5a2bfd0745bcaaaa575a6cfdfd /src/utils/browser-wpadebug.c
parent9ead16e203b81d44a2d84eadc2901ceeb7daf805 (diff)
downloadandroid_external_wpa_supplicant_8-a7b06faf528d1765cc2712cc9a31ad45d7c3110b.tar.gz
android_external_wpa_supplicant_8-a7b06faf528d1765cc2712cc9a31ad45d7c3110b.tar.bz2
android_external_wpa_supplicant_8-a7b06faf528d1765cc2712cc9a31ad45d7c3110b.zip
Cumulative patch to Release 2.3
724fce8 Change version information for the 2.3 release 5cb1440 Update ChangeLog files for v2.3 2b28ef6 browser-wpadebug: Use more robust mechanism for starting browser 3d8a3ff browser-android: Use more robust mechanism for starting browser 17dc39a browser-system: Use more robust mechanism for starting browser 4a274f4 DFS: Allow 80+80 MHz be configured for VHT Change-Id: I5562ac22e5bf8a55d0f7f8944ca0d9c8ebd8d13f Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/utils/browser-wpadebug.c')
-rw-r--r--src/utils/browser-wpadebug.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/utils/browser-wpadebug.c b/src/utils/browser-wpadebug.c
index eeb8f650..ce3054bb 100644
--- a/src/utils/browser-wpadebug.c
+++ b/src/utils/browser-wpadebug.c
@@ -76,7 +76,7 @@ int hs20_web_browser(const char *url)
os_memset(&data, 0, sizeof(data));
ret = os_snprintf(cmd, sizeof(cmd),
- "am start -a android.action.MAIN "
+ "start -a android.action.MAIN "
"-c android.intent.category.LAUNCHER "
"-n w1.fi.wpadebug/.WpaWebViewActivity "
"-e w1.fi.wpadebug.URL '%s'", url);
@@ -97,7 +97,7 @@ int hs20_web_browser(const char *url)
return -1;
}
- if (system(cmd) != 0) {
+ if (os_exec("/system/bin/am", cmd, 1) != 0) {
wpa_printf(MSG_INFO, "Failed to launch wpadebug browser");
eloop_cancel_timeout(browser_timeout, NULL, NULL);
http_server_deinit(http);
@@ -112,10 +112,11 @@ int hs20_web_browser(const char *url)
eloop_destroy();
wpa_printf(MSG_INFO, "Closing Android browser");
- if (system("am start -a android.action.MAIN "
- "-c android.intent.category.LAUNCHER "
- "-n w1.fi.wpadebug/.WpaWebViewActivity "
- "-e w1.fi.wpadebug.URL FINISH") != 0) {
+ if (os_exec("/system/bin/am",
+ "start -a android.action.MAIN "
+ "-c android.intent.category.LAUNCHER "
+ "-n w1.fi.wpadebug/.WpaWebViewActivity "
+ "-e w1.fi.wpadebug.URL FINISH", 1) != 0) {
wpa_printf(MSG_INFO, "Failed to close wpadebug browser");
}