core: fix serial port flashing after d3c2228f7b (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.
This commit is contained in:
Dan Williams
2011-08-02 11:07:55 -05:00
parent 26debc1a97
commit b9c2180886
+3 -1
View File
@@ -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] =