AI 146565: am: CL 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/... Original author: android-build Automated import of CL 146565
This commit is contained in:
committed by
The Android Open Source Project
parent
bc15cfa7d2
commit
d3b2e5bb5e
@@ -1438,12 +1438,14 @@ multiplexer_handle_control( Multiplexer* mult, Packet* p )
|
|||||||
*/
|
*/
|
||||||
if (client != NULL) {
|
if (client != NULL) {
|
||||||
client_registration(client, 1);
|
client_registration(client, 1);
|
||||||
|
} else {
|
||||||
|
D("%s: NULL client: '%.*s'", __FUNCTION__, p->len, p->data+11);
|
||||||
}
|
}
|
||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* connection registration failure */
|
/* 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);
|
int channel = hex2int(p->data+11, 2);
|
||||||
Client* client = multiplexer_find_client(mult, channel);
|
Client* client = multiplexer_find_client(mult, channel);
|
||||||
|
|
||||||
@@ -1464,8 +1466,18 @@ multiplexer_handle_control( Multiplexer* mult, Packet* p )
|
|||||||
goto EXIT;
|
goto EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
D("%s: unknown control message: '%.*s'",
|
/* A message that begins with "X00" is a probe sent by
|
||||||
__FUNCTION__, p->len, p->data);
|
* 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:
|
EXIT:
|
||||||
packet_free(&p);
|
packet_free(&p);
|
||||||
@@ -1477,6 +1489,8 @@ multiplexer_serial_receive( Multiplexer* mult, Packet* p )
|
|||||||
{
|
{
|
||||||
Client* client;
|
Client* client;
|
||||||
|
|
||||||
|
T("%s: channel=%d '%.*s'", __FUNCTION__, p->channel, p->len, p->data);
|
||||||
|
|
||||||
if (p->channel == CHANNEL_CONTROL) {
|
if (p->channel == CHANNEL_CONTROL) {
|
||||||
multiplexer_handle_control(mult, p);
|
multiplexer_handle_control(mult, p);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user