mtpd: Fix a minor bug which did not exit just after connect() failed.
diff --git a/mtpd.c b/mtpd.c
index 197c525..ed03fcf 100644
--- a/mtpd.c
+++ b/mtpd.c
@@ -172,9 +172,8 @@
     int timeout;
     int status;
 #ifdef ANDROID_CHANGES
-    unsigned char code;
     int control = get_control_and_arguments(&argc, &argv);
-    code = argc - 1;
+    unsigned char code = argc - 1;
     send(control, &code, 1, 0);
 #endif
 
@@ -292,6 +291,7 @@
                 break;
             }
             close(the_socket);
+            the_socket = -1;
         }
     }