Commit Graph

10 Commits

Author SHA1 Message Date
David 'Digit' Turner
8b057ed6f6 Fix bad qemud crash on emulator startup. 2009-05-26 22:21:28 +02:00
David 'Digit' Turner
af45b39d88 This adds a new helper program (qemu-props) to support the emulated system.
Its purpose is to contact the 'boot-properties' service during the
boot process and to set the list of system properties read from the
emulator program through it.

It must be launched from /system/etc/init.goldfish.rc as root.

It depends on the 'boot-properties' service being implemented by the
emulator (in a later patch). If not available, it will simply timeout.

This also fixes a potential crash in qemud which can happen in the following case:

- client sends a command to a service
- the service responds with one or more message
- the service immediately closes the connection before the client can read the data

what happened is that the FDHandler object was buffering out-going packets to the
client, but the Multiplexer acted on the disconnection immediately. This resulted
in:

- client_free() being called
-   fdhandler_shutdown() being called
-     the FDHandler being placed on the 'closing' list to be able to send
      buffered packets later. And 'receiver_close' being called
-       client_fd_close() being called, which would call client_free()
        recursively
-         the second client_free() call would free the object
-  the first client_free() call would try to free the object again
-  ==> dlmalloc() detects a double-free and immediately aborts.

the fixes simply avoids the calle to receiver_close() in fdhandler_shutdown()
since this function is called from an explicit shutdown request from the multiplexer,
it doesn't correspond to the case where the client has closed the connection itself.
2009-05-26 17:07:25 +02:00
David Turner
240094a972 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
2009-04-15 06:50:15 -07:00
David Turner
d7484a2ff5 AI 144596: am: CL 144595 Fix the AVD configuration code to support "sdcard.path" in config.ini to indicate an explicit SD Card image file (instead of using the one in the content directory)
Note that this also fix a bug where the SD Card image was not properly locked in the previous implementation.
  Allow the http-proxy support code to actually manage to receive chunked encoding data, instead of complaining needlessly.
  Introduce a new CharBuffer object that is used indirectly by "-radio <hostdevice>" and "-gps <hostdevice>" options
  Add new documentation for QEMUD and CharDriverState objects
  Update the Audio documentation with ASCII graphics (because I'm an artist too)
  Original author: digit
  Merged from: //branches/cupcake/...

Automated import of CL 144596
2009-04-05 14:22:25 -07:00
The Android Open Source Project
6ffae015b4 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:43 -07:00
The Android Open Source Project
52d4c30ca5 auto import from //depot/cupcake/@135843 2009-03-03 19:29:09 -08:00
The Android Open Source Project
d4aee0c0ca auto import from //depot/cupcake/@135843 2009-03-03 18:28:16 -08:00
The Android Open Source Project
b8d704a517 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:07 -08:00
The Android Open Source Project
e943f2fd8e Code drop from //branches/cupcake/...@124589 2008-12-17 18:04:04 -08:00
The Android Open Source Project
5c11852110 Initial Contribution 2008-10-21 07:00:00 -07:00