diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2012-06-14 13:12:30 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-06-14 13:12:31 -0700 |
commit | e36a3a2f998a62b0bf61d1ffff4a752746163cf4 (patch) | |
tree | 8de8db4336126c6363c10f82fca074031c2e079e | |
parent | 176545930d60a366734bbf70c3b60332a606c01e (diff) | |
parent | b756f69226d86380ea88b9330356c9fd210dbafe (diff) | |
download | netd-e36a3a2f998a62b0bf61d1ffff4a752746163cf4.tar.gz |
Merge "Run dnsmasq with options --keep-in-foreground and --pid-file."android-sdk-adt_r20tools_r20ics-plus-aosp
-rw-r--r-- | TetherController.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/TetherController.cpp b/TetherController.cpp index 2059cceb..4f54c4d5 100644 --- a/TetherController.cpp +++ b/TetherController.cpp @@ -134,15 +134,17 @@ int TetherController::startTethering(int num_addrs, struct in_addr* addrs) { close(pipefd[0]); } - int num_processed_args = 4 + (num_addrs/2) + 1; // 1 null for termination + int num_processed_args = 6 + (num_addrs/2) + 1; // 1 null for termination char **args = (char **)malloc(sizeof(char *) * num_processed_args); args[num_processed_args - 1] = NULL; args[0] = (char *)"/system/bin/dnsmasq"; - args[1] = (char *)"--no-daemon"; + args[1] = (char *)"--keep-in-foreground"; args[2] = (char *)"--no-resolv"; args[3] = (char *)"--no-poll"; + args[4] = (char *)"--pid-file"; + args[5] = (char *)""; - int nextArg = 4; + int nextArg = 6; for (int addrIndex=0; addrIndex < num_addrs;) { char *start = strdup(inet_ntoa(addrs[addrIndex++])); char *end = strdup(inet_ntoa(addrs[addrIndex++])); |