diff options
author | Dan Williams <dcbw@redhat.com> | 2011-08-02 11:05:55 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-08-02 11:07:55 -0500 |
commit | b9c2180886dc759403c837564cf39a4d030fea52 (patch) | |
tree | 9b0bbd31a59e6a55dac6f846961ddd7e7ce05e8d | |
parent | 26debc1a9745ebc54d35569ba416a368f084a3f4 (diff) |
core: fix serial port flashing after d3c2228f7b55465f4433bedb36d47744b8d791f1 (bgo #650740)
Fix one more possible memory leak (left un-fixed by d3c2228 but not
caused by it) and ensure that modems that do want flashing get it
by default by adding the missing G_PARAM_CONSTRUCT so FLASH_OK
defaults to TRUE.
-rw-r--r-- | src/mm-serial-port.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mm-serial-port.c b/src/mm-serial-port.c index 00d35d5e..732cb322 100644 --- a/src/mm-serial-port.c +++ b/src/mm-serial-port.c @@ -1228,6 +1228,8 @@ mm_serial_port_flash (MMSerialPort *self, success = set_speed (self, B0, &error); if (!success && !ignore_errors) goto error; + g_clear_error (&error); + priv->flash_id = g_timeout_add (flash_time, flash_do, info); } else priv->flash_id = g_idle_add (flash_do, info); @@ -1536,7 +1538,7 @@ mm_serial_port_class_init (MMSerialPortClass *klass) "Flashing the port (0 baud for a short period) " "is allowed.", TRUE, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /* Signals */ signals[BUFFER_FULL] = |