summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-chi Yeh <chiachi@android.com>2009-07-11 01:01:33 +0800
committerChia-chi Yeh <chiachi@android.com>2009-07-11 01:01:33 +0800
commitfa04c31da4ef8765c2c8967fe548bcb55d0523d9 (patch)
tree22b6f90dd4620925ccaa06727f5cd0b4e15732b5
parentf102920925b71379dc47cead612b4374d712278a (diff)
downloadmtpd-fa04c31da4ef8765c2c8967fe548bcb55d0523d9.tar.gz
mtpd: Fix a minor bug which did not exit just after connect() failed.
-rw-r--r--mtpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mtpd.c b/mtpd.c
index 197c525..ed03fcf 100644
--- a/mtpd.c
+++ b/mtpd.c
@@ -172,9 +172,8 @@ int main(int argc, char **argv)
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 @@ void create_socket(int family, int type, char *server, char *port)
break;
}
close(the_socket);
+ the_socket = -1;
}
}