core: use G_SOURCE_REMOVE and G_SOURCE_CONTINUE in GSourceFuncs

This commit is contained in:
Aleksander Morgado
2015-12-02 17:07:11 +01:00
parent 2a99bdfa00
commit ffde429843
35 changed files with 73 additions and 73 deletions

View File

@@ -684,7 +684,7 @@ altair_sim_refresh_timer_expired (MMBroadbandModemAltairLte *self)
self); self);
self->priv->sim_refresh_timer_id = 0; self->priv->sim_refresh_timer_id = 0;
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -553,7 +553,7 @@ power_off_timeout_cb (PowerOffContext *ctx)
"Power off operation timed out"); "Power off operation timed out");
power_off_context_complete_and_free (ctx); power_off_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -1588,7 +1588,7 @@ simstatus_timeout_cb (AfterSimUnlockContext *ctx)
{ {
ctx->timeout_id = 0; ctx->timeout_id = 0;
after_sim_unlock_context_step (ctx); after_sim_unlock_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -126,7 +126,7 @@ connect_retry_ndisstatqry_check_cb (MMBroadbandBearerHuawei *self)
/* Retry same step */ /* Retry same step */
connect_3gpp_context_step (ctx); connect_3gpp_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -505,7 +505,7 @@ disconnect_retry_ndisstatqry_check_cb (MMBroadbandBearerHuawei *self)
/* Retry same step */ /* Retry same step */
disconnect_3gpp_context_step (ctx); disconnect_3gpp_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -705,7 +705,7 @@ network_disconnect_3gpp_delayed (MMBroadbandBearerHuawei *self)
self->priv->network_disconnect_pending_id = 0; self->priv->network_disconnect_pending_id = 0;
mm_base_bearer_report_connection_status (MM_BASE_BEARER (self), mm_base_bearer_report_connection_status (MM_BASE_BEARER (self),
MM_BEARER_CONNECTION_STATUS_DISCONNECTED); MM_BEARER_CONNECTION_STATUS_DISCONNECTED);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -712,7 +712,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -328,7 +328,7 @@ first_interface_missing_timeout_cb (MMDevice *device)
/* Reload the timeout, just in case we end up not having the next interface to probe... /* Reload the timeout, just in case we end up not having the next interface to probe...
* which is anyway very unlikely as we got it by looking at the real probe list, but anyway... */ * which is anyway very unlikely as we got it by looking at the real probe list, but anyway... */
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void

View File

@@ -288,7 +288,7 @@ disconnect_3gpp_timed_out_cb (MMBroadbandBearerIcera *self)
"Disconnection attempt timed out"); "Disconnection attempt timed out");
disconnect_3gpp_context_complete_and_free (ctx); disconnect_3gpp_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -547,7 +547,7 @@ connect_timed_out_cb (MMBroadbandBearerIcera *self)
/* It's probably pointless to try to reset this here, but anyway... */ /* It's probably pointless to try to reset this here, but anyway... */
connect_reset (ctx); connect_reset (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -795,7 +795,7 @@ static gboolean
retry_authentication_cb (Dial3gppContext *ctx) retry_authentication_cb (Dial3gppContext *ctx)
{ {
authenticate (ctx); authenticate (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -272,7 +272,7 @@ poll_timeout_cb (MMBroadbandBearerMbm *self)
MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT,
"Connection attempt timed out"); "Connection attempt timed out");
dial_3gpp_context_complete_and_free (ctx); dial_3gpp_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
ctx->poll_count++; ctx->poll_count++;
@@ -286,7 +286,7 @@ poll_timeout_cb (MMBroadbandBearerMbm *self)
(GAsyncReadyCallback)poll_ready, (GAsyncReadyCallback)poll_ready,
g_object_ref (ctx->self)); /* we pass the bearer object! */ g_object_ref (ctx->self)); /* we pass the bearer object! */
self->priv->connect_pending_id = 0; self->priv->connect_pending_id = 0;
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -181,7 +181,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -90,7 +90,7 @@ cpin_query_cb (SendPinPukContext *ctx)
FALSE, FALSE,
(GAsyncReadyCallback)cpin_query_ready, (GAsyncReadyCallback)cpin_query_ready,
ctx); ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -168,7 +168,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -161,7 +161,7 @@ poll_connection (MMBroadbandBearerNovatelLte *bearer)
bearer); bearer);
g_object_unref (modem); g_object_unref (modem);
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void
@@ -248,7 +248,7 @@ connect_3gpp_qmistatus (DetailedConnectContext *ctx)
(GAsyncReadyCallback)connect_3gpp_qmistatus_ready, /* callback */ (GAsyncReadyCallback)connect_3gpp_qmistatus_ready, /* callback */
ctx); /* user_data */ ctx); /* user_data */
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -463,7 +463,7 @@ disconnect_3gpp_qmistatus (DetailedDisconnectContext *ctx)
NULL, /* cancellable */ NULL, /* cancellable */
(GAsyncReadyCallback)disconnect_3gpp_status_ready, (GAsyncReadyCallback)disconnect_3gpp_status_ready,
ctx); /* user_data */ ctx); /* user_data */
return FALSE; return G_SOURCE_REMOVE;
} }

View File

@@ -164,7 +164,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -84,7 +84,7 @@ static gboolean
custom_init_wait_cb (CustomInitContext *ctx) custom_init_wait_cb (CustomInitContext *ctx)
{ {
custom_init_step (ctx); custom_init_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -438,7 +438,7 @@ connect_timed_out_cb (MMBroadbandBearerHso *self)
/* It's probably pointless to try to reset this here, but anyway... */ /* It's probably pointless to try to reset this here, but anyway... */
connect_reset (ctx); connect_reset (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -675,7 +675,7 @@ after_power_up_wait_cb (GSimpleAsyncResult *result)
option->priv->after_power_up_wait_id = 0; option->priv->after_power_up_wait_id = 0;
g_object_unref (option); g_object_unref (option);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -122,7 +122,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -937,7 +937,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -257,7 +257,7 @@ sierra_power_up_wait_cb (GSimpleAsyncResult *result)
g_simple_async_result_set_op_res_gboolean (result, TRUE); g_simple_async_result_set_op_res_gboolean (result, TRUE);
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -1220,7 +1220,7 @@ after_sim_unlock_wait_cb (GSimpleAsyncResult *result)
{ {
g_simple_async_result_complete (result); g_simple_async_result_complete (result);
g_object_unref (result); g_object_unref (result);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -150,7 +150,7 @@ cpms_timeout_cb (ModemAfterSimUnlockContext *ctx)
{ {
ctx->retries--; ctx->retries--;
modem_after_sim_unlock_context_step (ctx); modem_after_sim_unlock_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -200,7 +200,7 @@ deferred_3gpp_unregistration_cb (MMBaseBearer *self)
mm_dbg ("Forcing bearer disconnection, not registered in 3GPP network"); mm_dbg ("Forcing bearer disconnection, not registered in 3GPP network");
mm_base_bearer_disconnect_force (self); mm_base_bearer_disconnect_force (self);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -282,7 +282,7 @@ deferred_cdma_unregistration_cb (MMBaseBearer *self)
mm_dbg ("Forcing bearer disconnection, not registered in CDMA network"); mm_dbg ("Forcing bearer disconnection, not registered in CDMA network");
mm_base_bearer_disconnect_force (self); mm_base_bearer_disconnect_force (self);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -453,7 +453,7 @@ start_device_added_idle (StartDeviceAdded *ctx)
g_object_unref (ctx->self); g_object_unref (ctx->self);
g_object_unref (ctx->device); g_object_unref (ctx->device);
g_slice_free (StartDeviceAdded, ctx); g_slice_free (StartDeviceAdded, ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -1357,7 +1357,7 @@ base_modem_invalid_idle (MMBaseModem *self)
* cancelled */ * cancelled */
mm_base_modem_set_valid (self, FALSE); mm_base_modem_set_valid (self, FALSE);
g_object_unref (self); g_object_unref (self);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -682,7 +682,7 @@ wait_for_sim_ready (LoadUnlockRequiredContext *ctx)
(GAsyncReadyCallback)unlock_required_subscriber_ready_state_ready, (GAsyncReadyCallback)unlock_required_subscriber_ready_state_ready,
ctx); ctx);
mbim_message_unref (message); mbim_message_unref (message);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -5495,7 +5495,7 @@ static gboolean
retry_msisdn_check_cb (CdmaActivationContext *ctx) retry_msisdn_check_cb (CdmaActivationContext *ctx)
{ {
cdma_activation_context_step (ctx); cdma_activation_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -7666,7 +7666,7 @@ run_cdma_registration_checks_again (RegisterInCdmaNetworkContext *ctx)
MM_IFACE_MODEM_CDMA (ctx->self), MM_IFACE_MODEM_CDMA (ctx->self),
(GAsyncReadyCallback)run_cdma_registration_checks_ready, (GAsyncReadyCallback)run_cdma_registration_checks_ready,
ctx); ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -8304,7 +8304,7 @@ enabling_after_modem_init_timeout (EnablingStartedContext *ctx)
ctx->self->priv->enabled_ports_ctx = ports_context_ref (ctx->ports); ctx->self->priv->enabled_ports_ctx = ports_context_ref (ctx->ports);
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
enabling_started_context_complete_and_free (ctx); enabling_started_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -8506,7 +8506,7 @@ schedule_initial_registration_checks_cb (MMBroadbandModem *self)
NULL); NULL);
/* We got a full reference, so balance it out here */ /* We got a full reference, so balance it out here */
g_object_unref (self); g_object_unref (self);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -233,7 +233,7 @@ run_registration_checks_again (RegisterInNetworkContext *ctx)
ctx->self, ctx->self,
(GAsyncReadyCallback)run_registration_checks_ready, (GAsyncReadyCallback)run_registration_checks_ready,
ctx); ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -1309,7 +1309,7 @@ periodic_registration_check (MMIfaceModem3gpp *self)
(GAsyncReadyCallback)periodic_registration_checks_ready, (GAsyncReadyCallback)periodic_registration_checks_ready,
NULL); NULL);
} }
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void

View File

@@ -1160,7 +1160,7 @@ periodic_registration_check (MMIfaceModemCdma *self)
(GAsyncReadyCallback)periodic_registration_checks_ready, (GAsyncReadyCallback)periodic_registration_checks_ready,
NULL); NULL);
} }
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void

View File

@@ -157,7 +157,7 @@ refresh_context_cb (MMIfaceModemSignal *self)
NULL, NULL,
(GAsyncReadyCallback)load_values_ready, (GAsyncReadyCallback)load_values_ready,
NULL); NULL);
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void

View File

@@ -270,7 +270,7 @@ timezone_poll_cb (UpdateNetworkTimezoneContext *ctx)
(GAsyncReadyCallback)load_network_timezone_ready, (GAsyncReadyCallback)load_network_timezone_ready,
ctx); ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -131,7 +131,7 @@ state_changed_wait_expired (WaitForFinalStateContext *ctx)
MM_CORE_ERROR_RETRY, MM_CORE_ERROR_RETRY,
"Too much time waiting to get to a final state"); "Too much time waiting to get to a final state");
wait_for_final_state_context_complete_and_free (ctx); wait_for_final_state_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -250,7 +250,7 @@ load_unlock_required_again (InternalLoadUnlockRequiredContext *ctx)
ctx->pin_check_timeout_id = 0; ctx->pin_check_timeout_id = 0;
/* Retry the step */ /* Retry the step */
internal_load_unlock_required_context_step (ctx); internal_load_unlock_required_context_step (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -961,7 +961,7 @@ periodic_access_technologies_check (MMIfaceModem *self)
NULL); NULL);
} }
return TRUE; return G_SOURCE_CONTINUE;
} }
void void
@@ -1111,7 +1111,7 @@ expire_signal_quality (MMIfaceModem *self)
/* Remove source id */ /* Remove source id */
ctx = g_object_get_qdata (G_OBJECT (self), signal_quality_update_context_quark); ctx = g_object_get_qdata (G_OBJECT (self), signal_quality_update_context_quark);
ctx->recent_timeout_source = 0; ctx->recent_timeout_source = 0;
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -1261,7 +1261,7 @@ periodic_signal_quality_check (MMIfaceModem *self)
NULL); NULL);
} }
return TRUE; return G_SOURCE_CONTINUE;
} }
static void static void
@@ -2775,7 +2775,7 @@ restart_initialize_idle (MMIfaceModem *self)
mm_base_modem_initialize (MM_BASE_MODEM (self), mm_base_modem_initialize (MM_BASE_MODEM (self),
(GAsyncReadyCallback) reinitialize_ready, (GAsyncReadyCallback) reinitialize_ready,
NULL); NULL);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void

View File

@@ -334,7 +334,7 @@ deferred_support_check_idle (PortProbeContext *port_probe_ctx)
{ {
port_probe_ctx->defer_id = 0; port_probe_ctx->defer_id = 0;
port_probe_context_step (port_probe_ctx); port_probe_context_step (port_probe_ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -765,7 +765,7 @@ min_wait_timeout_cb (FindDeviceSupportContext *ctx)
ctx->timeout_id = g_timeout_add (MIN_PROBING_TIME_MSECS - MIN_WAIT_TIME_MSECS, ctx->timeout_id = g_timeout_add (MIN_PROBING_TIME_MSECS - MIN_WAIT_TIME_MSECS,
(GSourceFunc)min_probing_timeout_cb, (GSourceFunc)min_probing_timeout_cb,
ctx); ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
void void

View File

@@ -563,7 +563,7 @@ wdm_probe (MMPortProbe *self)
/* All done now */ /* All done now */
port_probe_run_task_complete (task, TRUE, NULL); port_probe_run_task_complete (task, TRUE, NULL);
return FALSE; return G_SOURCE_REMOVE;
} }
/***************************************************************/ /***************************************************************/
@@ -659,7 +659,7 @@ serial_probe_qcdm (MMPortProbe *self)
/* If already cancelled, do nothing else */ /* If already cancelled, do nothing else */
if (port_probe_run_is_cancelled (self)) if (port_probe_run_is_cancelled (self))
return FALSE; return G_SOURCE_REMOVE;
mm_dbg ("(%s/%s) probing QCDM...", mm_dbg ("(%s/%s) probing QCDM...",
g_udev_device_get_subsystem (self->priv->port), g_udev_device_get_subsystem (self->priv->port),
@@ -687,7 +687,7 @@ serial_probe_qcdm (MMPortProbe *self)
"(%s/%s) Couldn't create QCDM port", "(%s/%s) Couldn't create QCDM port",
g_udev_device_get_subsystem (self->priv->port), g_udev_device_get_subsystem (self->priv->port),
g_udev_device_get_name (self->priv->port))); g_udev_device_get_name (self->priv->port)));
return FALSE; return G_SOURCE_REMOVE;
} }
/* Try to open the port */ /* Try to open the port */
@@ -702,7 +702,7 @@ serial_probe_qcdm (MMPortProbe *self)
g_udev_device_get_name (self->priv->port), g_udev_device_get_name (self->priv->port),
(error ? error->message : "unknown error"))); (error ? error->message : "unknown error")));
g_clear_error (&error); g_clear_error (&error);
return FALSE; return G_SOURCE_REMOVE;
} }
/* Build up the probe command; 0x7E is the frame marker, so put one at the /* Build up the probe command; 0x7E is the frame marker, so put one at the
@@ -723,7 +723,7 @@ serial_probe_qcdm (MMPortProbe *self)
"(%s/%s) Failed to create QCDM versin info command", "(%s/%s) Failed to create QCDM versin info command",
g_udev_device_get_subsystem (self->priv->port), g_udev_device_get_subsystem (self->priv->port),
g_udev_device_get_name (self->priv->port))); g_udev_device_get_name (self->priv->port)));
return FALSE; return G_SOURCE_REMOVE;
} }
verinfo->len = len + 1; verinfo->len = len + 1;
@@ -740,7 +740,7 @@ serial_probe_qcdm (MMPortProbe *self)
self); self);
g_byte_array_unref (verinfo); g_byte_array_unref (verinfo);
return FALSE; return G_SOURCE_REMOVE;
} }
/***************************************************************/ /***************************************************************/
@@ -955,7 +955,7 @@ serial_probe_at (MMPortProbe *self)
/* If already cancelled, do nothing else */ /* If already cancelled, do nothing else */
if (port_probe_run_is_cancelled (self)) if (port_probe_run_is_cancelled (self))
return FALSE; return G_SOURCE_REMOVE;
/* If AT probing cancelled, end this partial probing */ /* If AT probing cancelled, end this partial probing */
if (g_cancellable_is_cancelled (task->at_probing_cancellable)) { if (g_cancellable_is_cancelled (task->at_probing_cancellable)) {
@@ -964,7 +964,7 @@ serial_probe_at (MMPortProbe *self)
g_udev_device_get_name (self->priv->port)); g_udev_device_get_name (self->priv->port));
task->at_result_processor (self, NULL); task->at_result_processor (self, NULL);
serial_probe_schedule (self); serial_probe_schedule (self);
return FALSE; return G_SOURCE_REMOVE;
} }
mm_port_serial_at_command ( mm_port_serial_at_command (
@@ -976,7 +976,7 @@ serial_probe_at (MMPortProbe *self)
task->at_probing_cancellable, task->at_probing_cancellable,
(GAsyncReadyCallback)serial_probe_at_parse_response, (GAsyncReadyCallback)serial_probe_at_parse_response,
self); self);
return FALSE; return G_SOURCE_REMOVE;
} }
static const MMPortProbeAtCommand at_probing[] = { static const MMPortProbeAtCommand at_probing[] = {
@@ -1162,7 +1162,7 @@ serial_open_at (MMPortProbe *self)
/* If already cancelled, do nothing else */ /* If already cancelled, do nothing else */
if (port_probe_run_is_cancelled (self)) if (port_probe_run_is_cancelled (self))
return FALSE; return G_SOURCE_REMOVE;
/* Create AT serial port if not done before */ /* Create AT serial port if not done before */
if (!task->serial) { if (!task->serial) {
@@ -1183,7 +1183,7 @@ serial_open_at (MMPortProbe *self)
"(%s/%s) couldn't create AT port", "(%s/%s) couldn't create AT port",
g_udev_device_get_subsystem (self->priv->port), g_udev_device_get_subsystem (self->priv->port),
g_udev_device_get_name (self->priv->port))); g_udev_device_get_name (self->priv->port)));
return FALSE; return G_SOURCE_REMOVE;
} }
g_object_set (task->serial, g_object_set (task->serial,
@@ -1236,7 +1236,7 @@ serial_open_at (MMPortProbe *self)
} }
g_clear_error (&error); g_clear_error (&error);
return FALSE; return G_SOURCE_REMOVE;
} }
/* success, start probing */ /* success, start probing */
@@ -1250,7 +1250,7 @@ serial_open_at (MMPortProbe *self)
TRUE, TRUE,
(GAsyncReadyCallback)serial_flash_ready, (GAsyncReadyCallback)serial_flash_ready,
self); self);
return FALSE; return G_SOURCE_REMOVE;
} }
gboolean gboolean

View File

@@ -762,7 +762,7 @@ port_serial_timed_out (gpointer data)
* serial port */ * serial port */
g_signal_emit (self, signals[TIMED_OUT], 0, self->priv->n_consecutive_timeouts); g_signal_emit (self, signals[TIMED_OUT], 0, self->priv->n_consecutive_timeouts);
return FALSE; return G_SOURCE_REMOVE;
} }
static void static void
@@ -795,7 +795,7 @@ port_serial_queue_process (gpointer data)
ctx = (CommandContext *) g_queue_peek_head (self->priv->queue); ctx = (CommandContext *) g_queue_peek_head (self->priv->queue);
if (!ctx) if (!ctx)
return FALSE; return G_SOURCE_REMOVE;
if (ctx->allow_cached) { if (ctx->allow_cached) {
const GByteArray *cached; const GByteArray *cached;
@@ -814,7 +814,7 @@ port_serial_queue_process (gpointer data)
g_byte_array_append (self->priv->response, cached->data, cached->len); g_byte_array_append (self->priv->response, cached->data, cached->len);
port_serial_got_response (self, NULL); port_serial_got_response (self, NULL);
return FALSE; return G_SOURCE_REMOVE;
} }
/* Cached reply wasn't found, keep on */ /* Cached reply wasn't found, keep on */
@@ -824,7 +824,7 @@ port_serial_queue_process (gpointer data)
if (!port_serial_process_command (self, ctx, &error)) { if (!port_serial_process_command (self, ctx, &error)) {
port_serial_got_response (self, error); port_serial_got_response (self, error);
g_error_free (error); g_error_free (error);
return FALSE; return G_SOURCE_REMOVE;
} }
/* Schedule the next byte of the command to be sent */ /* Schedule the next byte of the command to be sent */
@@ -833,7 +833,7 @@ port_serial_queue_process (gpointer data)
(mm_port_get_subsys (MM_PORT (self)) == MM_PORT_SUBSYS_TTY ? (mm_port_get_subsys (MM_PORT (self)) == MM_PORT_SUBSYS_TTY ?
self->priv->send_delay / 1000 : self->priv->send_delay / 1000 :
0)); 0));
return FALSE; return G_SOURCE_REMOVE;
} }
/* Setup the cancellable so that we can stop waiting for a response */ /* Setup the cancellable so that we can stop waiting for a response */
@@ -850,7 +850,7 @@ port_serial_queue_process (gpointer data)
"Won't wait for the reply"); "Won't wait for the reply");
port_serial_got_response (self, error); port_serial_got_response (self, error);
g_error_free (error); g_error_free (error);
return FALSE; return G_SOURCE_REMOVE;
} }
} }
@@ -858,7 +858,7 @@ port_serial_queue_process (gpointer data)
self->priv->timeout_id = g_timeout_add_seconds (ctx->timeout, self->priv->timeout_id = g_timeout_add_seconds (ctx->timeout,
port_serial_timed_out, port_serial_timed_out,
self); self);
return FALSE; return G_SOURCE_REMOVE;
} }
static gboolean static gboolean
@@ -1511,7 +1511,7 @@ reopen_do (MMPortSerial *self)
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
reopen_context_complete_and_free (ctx); reopen_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
void void
@@ -1729,7 +1729,7 @@ flash_do (MMPortSerial *self)
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE); g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
flash_context_complete_and_free (ctx); flash_context_complete_and_free (ctx);
return FALSE; return G_SOURCE_REMOVE;
} }
void void

View File

@@ -250,7 +250,7 @@ start_cb (void)
FALSE, FALSE,
(GAsyncReadyCallback) flash_ready, (GAsyncReadyCallback) flash_ready,
NULL); NULL);
return FALSE; return G_SOURCE_REMOVE;
} }
int main (int argc, char **argv) int main (int argc, char **argv)