serial: fix cleanup of flash function (rh #591728)

The flash function could be called when the port was closed, and since
the flash function would only be canceled when the port was open,
it could trigger after the port object was destroyed.
This commit is contained in:
Dan Williams
2010-05-26 11:43:06 -07:00
parent 6c3ae7d8fd
commit d5b8019d66
3 changed files with 14 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ enum {
MM_SERIAL_ERROR_RESPONSE_TIMEOUT = 2,
MM_SERIAL_ERROR_OPEN_FAILED_NO_DEVICE = 3,
MM_SERIAL_ERROR_FLASH_FAILED = 4,
MM_SERIAL_ERROR_NOT_OPEN = 5,
};
#define MM_SERIAL_ERROR (mm_serial_error_quark ())