commit | fa04c31da4ef8765c2c8967fe548bcb55d0523d9 | [log] [tgz] |
---|---|---|
author | Chia-chi Yeh <chiachi@android.com> | Sat Jul 11 01:01:33 2009 +0800 |
committer | Chia-chi Yeh <chiachi@android.com> | Sat Jul 11 01:01:33 2009 +0800 |
tree | 22b6f90dd4620925ccaa06727f5cd0b4e15732b5 | |
parent | f102920925b71379dc47cead612b4374d712278a [diff] |
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; } }