Add TODO comments to remove start/stopReverseTethering
Return error code with exit() in child process in startReverseTethering
when executing dhcpcd fails.
This is needed so we can get BT certification.
The cleanup is tracked in stopship b/
6820232
Change-Id: I98a1c8aedfa042b1824de7d8c69f2600c9bfcf29
ALOGD("Tethering services stopped");
return 0;
}
+
+// TODO(BT) remove
int TetherController::startReverseTethering(const char* iface) {
if (mDhcpcdPid != 0) {
ALOGE("Reverse tethering already started");
ALOGE("startReverseTethering, execv failed (%s)", strerror(errno));
}
ALOGE("startReverseTethering, Should never get here!");
- return 0;
+ // TODO(BT) inform parent of the failure.
+ // Parent process need wait for child to report error status
+ // before it set mDhcpcdPid and return 0.
+ exit(-1);
} else {
mDhcpcdPid = pid;
ALOGD("Reverse Tethering running, pid:%d", pid);
}
return 0;
}
+
+// TODO(BT) remove
int TetherController::stopReverseTethering() {
if (mDhcpcdPid == 0) {