1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-08 12:55:32 +00:00

ofono: call: Codestyle

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-12-10 08:12:07 +01:00
parent 09699254c8
commit aadf546472

View file

@ -139,8 +139,7 @@ operation_cb (GDBOVoiceCall *voice_call,
g_autoptr (GError) error = NULL; g_autoptr (GError) error = NULL;
ok = data->finish_func (voice_call, res, &error); ok = data->finish_func (voice_call, res, &error);
if (!ok) if (!ok) {
{
g_warning ("Error %s oFono voice call to `%s': %s", g_warning ("Error %s oFono voice call to `%s': %s",
data->desc, data->self->id, error->message); data->desc, data->self->id, error->message);
CALLS_ERROR (data->self, error); CALLS_ERROR (data->self, error);
@ -191,8 +190,7 @@ static void
calls_ofono_call_send_dtmf_tone (CallsCall *call, gchar key) calls_ofono_call_send_dtmf_tone (CallsCall *call, gchar key)
{ {
CallsOfonoCall *self = CALLS_OFONO_CALL (call); CallsOfonoCall *self = CALLS_OFONO_CALL (call);
if (self->state != CALLS_CALL_STATE_ACTIVE) if (self->state != CALLS_CALL_STATE_ACTIVE) {
{
g_warning ("Tone start requested for non-active call to `%s'", g_warning ("Tone start requested for non-active call to `%s'",
self->id); self->id);
return; return;
@ -257,18 +255,13 @@ property_changed_cb (CallsOfonoCall *self,
gchar *str = NULL; gchar *str = NULL;
CallsCallState state; CallsCallState state;
gboolean ok; gboolean ok;
g_autofree char *text = g_variant_print (value, TRUE);
{
gchar *text = g_variant_print (value, TRUE);
g_debug ("Property `%s' for oFono call to `%s' changed to: %s", g_debug ("Property `%s' for oFono call to `%s' changed to: %s",
name, self->id, text); name, self->id, text);
g_free (text);
}
if (g_strcmp0 (name, "State") != 0) if (g_strcmp0 (name, "State") != 0)
{
return; return;
}
g_variant_get (value, "v", &str_var); g_variant_get (value, "v", &str_var);
g_variant_get (str_var, "&s", &str); g_variant_get (str_var, "&s", &str);
@ -276,15 +269,11 @@ property_changed_cb (CallsOfonoCall *self,
ok = calls_call_state_parse_nick (&state, str); ok = calls_call_state_parse_nick (&state, str);
if (ok) if (ok)
{
change_state (self, state); change_state (self, state);
}
else else
{
g_warning ("Could not parse new state `%s'" g_warning ("Could not parse new state `%s'"
" of oFono call to `%s'", " of oFono call to `%s'",
str, self->id); str, self->id);
}
g_variant_unref (str_var); g_variant_unref (str_var);
} }