summaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorDavid Turner <>2009-04-15 06:50:15 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-04-15 06:50:15 -0700
commit240094a972ec4cb946706a225192b3f781310a29 (patch)
treea0a7b1a3f70633e76cf0ea8ec6c7a126d0775244 /emulator
parente8d5ba4bd5c86487127a3da17b1f2d636a110873 (diff)
downloadandroid_development-240094a972ec4cb946706a225192b3f781310a29.tar.gz
android_development-240094a972ec4cb946706a225192b3f781310a29.tar.bz2
android_development-240094a972ec4cb946706a225192b3f781310a29.zip
AI 146315: am: CL 146314 modify GSM emulation to accomodate 1.0 and 1.1 system images.
without this, networking doesn't work well when using the 1.1 add-on with the cupcake sdk Original author: digit Merged from: //branches/cupcake/... Automated import of CL 146315
Diffstat (limited to 'emulator')
-rw-r--r--emulator/qemud/qemud.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/emulator/qemud/qemud.c b/emulator/qemud/qemud.c
index 8f7e616b5..c5781458f 100644
--- a/emulator/qemud/qemud.c
+++ b/emulator/qemud/qemud.c
@@ -1438,12 +1438,14 @@ multiplexer_handle_control( Multiplexer* mult, Packet* p )
*/
if (client != NULL) {
client_registration(client, 1);
+ } else {
+ D("%s: NULL client: '%.*s'", __FUNCTION__, p->len, p->data+11);
}
goto EXIT;
}
/* connection registration failure */
- if (p->len >= 13 && !memcmp(p->data, "ko:connect:",11)) {
+ if (p->len == 13 && !memcmp(p->data, "ko:connect:",11)) {
int channel = hex2int(p->data+11, 2);
Client* client = multiplexer_find_client(mult, channel);
@@ -1464,8 +1466,18 @@ multiplexer_handle_control( Multiplexer* mult, Packet* p )
goto EXIT;
}
- D("%s: unknown control message: '%.*s'",
- __FUNCTION__, p->len, p->data);
+ /* A message that begins with "X00" is a probe sent by
+ * the emulator used to detect which version of qemud it runs
+ * against (in order to detect 1.0/1.1 system images. Just
+ * silently ignore it there instead of printing an error
+ * message.
+ */
+ if (p->len >= 3 && !memcmp(p->data,"X00",3)) {
+ goto EXIT;
+ }
+
+ D("%s: unknown control message (%d bytes): '%.*s'",
+ __FUNCTION__, p->len, p->len, p->data);
EXIT:
packet_free(&p);
@@ -1477,6 +1489,8 @@ multiplexer_serial_receive( Multiplexer* mult, Packet* p )
{
Client* client;
+ T("%s: channel=%d '%.*s'", __FUNCTION__, p->channel, p->len, p->data);
+
if (p->channel == CHANNEL_CONTROL) {
multiplexer_handle_control(mult, p);
return;