diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-01-28 15:02:38 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-01-28 15:08:24 -0600 |
commit | 586003ba52d6afa89bb4df3c74261b46ab5e2af3 (patch) | |
tree | b9b1290ce729906683097bac806e5ff494a04a63 /drivers | |
parent | 337b0367eefbcd05ac56248f4d6976c0e7c2169f (diff) | |
download | ofono-586003ba52d6afa89bb4df3c74261b46ab5e2af3.tar.bz2 |
Style: Various whitespace issues
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/stemodem/voicecall.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/stemodem/voicecall.c b/drivers/stemodem/voicecall.c index e74aa3d6..7c615650 100644 --- a/drivers/stemodem/voicecall.c +++ b/drivers/stemodem/voicecall.c @@ -448,9 +448,10 @@ static void ecav_notify(GAtResult *result, gpointer user_data) g_at_result_iter_skip_next(&iter); status = call_status_ste_to_ofono(status); + if (status == CALL_STATUS_DIALING || - status == CALL_STATUS_WAITING || - status == CALL_STATUS_INCOMING) { + status == CALL_STATUS_WAITING || + status == CALL_STATUS_INCOMING) { if (!g_at_result_iter_next_string(&iter, &num)) return; @@ -467,14 +468,15 @@ static void ecav_notify(GAtResult *result, gpointer user_data) */ l = g_slist_find_custom(vd->calls, GUINT_TO_POINTER(id), at_util_call_compare_by_id); + if (l) existing_call = l->data; if (l == NULL && status != CALL_STATUS_DIALING && - status != CALL_STATUS_WAITING && - status != CALL_STATUS_INCOMING) { + status != CALL_STATUS_WAITING && + status != CALL_STATUS_INCOMING) { ofono_error("ECAV notification for unknow call." - " id: %d, status: %d", id, status); + " id: %d, status: %d", id, status); return; } @@ -490,11 +492,12 @@ static void ecav_notify(GAtResult *result, gpointer user_data) reason = OFONO_DISCONNECT_REASON_REMOTE_HANGUP; ofono_voicecall_disconnected(vc, existing_call->id, - reason, NULL); + reason, NULL); vd->calls = g_slist_remove(vd->calls, l->data); break; } + case CALL_STATUS_DIALING: case CALL_STATUS_WAITING: case CALL_STATUS_INCOMING: { @@ -512,10 +515,11 @@ static void ecav_notify(GAtResult *result, gpointer user_data) clip_validity = CLIP_VALIDITY_NOT_AVAILABLE; new_call = create_call(vc, call_type, direction, status, - num, num_type, clip_validity); + num, num_type, clip_validity); + if (!new_call) { ofono_error("Unable to malloc. " - "Call management is fubar"); + "Call management is fubar"); return; } @@ -523,18 +527,19 @@ static void ecav_notify(GAtResult *result, gpointer user_data) ofono_voicecall_notify(vc, new_call); break; } + case CALL_STATUS_ALERTING: case CALL_STATUS_ACTIVE: case CALL_STATUS_HELD: existing_call->status = status; ofono_voicecall_notify(vc, existing_call); break; + default: break; } } - static int ste_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor, void *data) { |