mtpd: remove the feedback protocol.
In the future, we might implement a new protocol and
get rid of the system properties.
Change-Id: I99ca612c45512002b5b34d1a94d71fa188841bef
diff --git a/mtpd.c b/mtpd.c
index 1198d9d..b419eff 100644
--- a/mtpd.c
+++ b/mtpd.c
@@ -94,7 +94,7 @@
#ifdef ANDROID_CHANGES
-static int get_control_and_arguments(int *argc, char ***argv)
+static void get_control_and_arguments(int *argc, char ***argv)
{
static char *args[32];
int control;
@@ -109,7 +109,6 @@
exit(SYSTEM_ERROR);
}
close(i);
- fcntl(control, F_SETFD, FD_CLOEXEC);
args[0] = (*argv)[0];
for (i = 1; i < 32; ++i) {
@@ -142,7 +141,7 @@
*argc = i;
*argv = args;
- return control;
+ close(control);
}
#endif
@@ -153,9 +152,7 @@
int timeout;
int status;
#ifdef ANDROID_CHANGES
- int control = get_control_and_arguments(&argc, &argv);
- unsigned char code = argc - 1;
- send(control, &code, 1, 0);
+ get_control_and_arguments(&argc, &argv);
#endif
srandom(time(NULL));
@@ -212,11 +209,6 @@
stop_pppd();
the_protocol->shutdown();
-
-#ifdef ANDROID_CHANGES
- code = status;
- send(control, &code, 1, 0);
-#endif
log_print(INFO, "Mtpd is terminated (status = %d)", status);
return status;
}