base-call: formatting cleanups

This commit is contained in:
Dan Williams
2016-08-02 16:27:56 -05:00
parent 5350b9f568
commit f33ea91ccf

View File

@@ -610,10 +610,9 @@ call_start_ready (MMBaseModem *modem,
mm_base_call_change_state(ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_ERROR); mm_base_call_change_state(ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_ERROR);
} }
if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_BUSY) || if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_BUSY) ||
g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_ANSWER) || g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_ANSWER) ||
g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_CARRIER) ) g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_CARRIER)) {
{
/* Update state */ /* Update state */
mm_base_call_change_state(ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_REFUSED_OR_BUSY); mm_base_call_change_state(ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_REFUSED_OR_BUSY);
} }
@@ -626,14 +625,14 @@ call_start_ready (MMBaseModem *modem,
/* check response for error */ /* check response for error */
if (response && strlen (response) > 0 ) { if (response && strlen (response) > 0 ) {
g_set_error (&error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED,
"Couldn't start the call: " "Couldn't start the call: "
"Modem response '%s'", response); "Modem response '%s'", response);
/* Update state */ /* Update state */
mm_base_call_change_state(ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_REFUSED_OR_BUSY); mm_base_call_change_state (ctx->self, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_REFUSED_OR_BUSY);
} else { } else {
/* Update state */ /* Update state */
mm_base_call_change_state(ctx->self, MM_CALL_STATE_ACTIVE, MM_CALL_STATE_REASON_ACCEPTED); mm_base_call_change_state (ctx->self, MM_CALL_STATE_ACTIVE, MM_CALL_STATE_REASON_ACCEPTED);
} }
if (error) { if (error) {
@@ -648,8 +647,8 @@ call_start_ready (MMBaseModem *modem,
static void static void
call_start (MMBaseCall *self, call_start (MMBaseCall *self,
GAsyncReadyCallback callback, GAsyncReadyCallback callback,
gpointer user_data) gpointer user_data)
{ {
CallStartContext *ctx; CallStartContext *ctx;
gchar *cmd; gchar *cmd;
@@ -663,7 +662,7 @@ call_start (MMBaseCall *self,
ctx->self = g_object_ref (self); ctx->self = g_object_ref (self);
ctx->modem = g_object_ref (self->priv->modem); ctx->modem = g_object_ref (self->priv->modem);
cmd = g_strdup_printf ("ATD%s;", mm_gdbus_call_get_number (MM_GDBUS_CALL (self)) ); cmd = g_strdup_printf ("ATD%s;", mm_gdbus_call_get_number (MM_GDBUS_CALL (self)));
mm_base_modem_at_command (ctx->modem, mm_base_modem_at_command (ctx->modem,
cmd, cmd,
90, 90,