diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-11-24 22:46:49 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-11-28 10:31:15 -0600 |
commit | 68df0eb758d6107c501743e5cdaa31ce93b30e05 (patch) | |
tree | 0781779c09f6d75a98784e62b44ee114b1578259 /drivers/ifxmodem/voicecall.c | |
parent | 11014653052207f89f424ef0d06263fc69a67a83 (diff) | |
download | ofono-68df0eb758d6107c501743e5cdaa31ce93b30e05.tar.bz2 |
ifx: Fix the case of modem-originated call
During STK Set Up Call, we have modem-originated calls that do not go
through the core 'Dial' method. Make sure the calls are still detected
in this case.
Diffstat (limited to 'drivers/ifxmodem/voicecall.c')
-rw-r--r-- | drivers/ifxmodem/voicecall.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/ifxmodem/voicecall.c b/drivers/ifxmodem/voicecall.c index 5d4d207f..7c276422 100644 --- a/drivers/ifxmodem/voicecall.c +++ b/drivers/ifxmodem/voicecall.c @@ -169,11 +169,19 @@ static void xcallstat_notify(GAtResult *result, gpointer user_data) break; } case CALL_STATUS_DIALING: + new_call = create_call(vc, 0, CALL_DIRECTION_MOBILE_ORIGINATED, + status, NULL, 128, + CLIP_VALIDITY_NOT_AVAILABLE, id); + if (new_call == NULL) { + ofono_error("Unable to malloc. " + "Call management is fubar"); + return; + } + + ofono_voicecall_notify(vc, new_call); + break; case CALL_STATUS_WAITING: case CALL_STATUS_INCOMING: - { - int direction; - /* Handle the following situation: * Active Call + Waiting Call. Active Call is Released. * The Waiting call becomes Incoming. In this case, no @@ -185,13 +193,8 @@ static void xcallstat_notify(GAtResult *result, gpointer user_data) return; } - if (status == CALL_STATUS_DIALING) - direction = CALL_DIRECTION_MOBILE_ORIGINATED; - else - direction = CALL_DIRECTION_MOBILE_TERMINATED; - - new_call = create_call(vc, 0, direction, status, - NULL, 128, + new_call = create_call(vc, 0, CALL_DIRECTION_MOBILE_TERMINATED, + status, NULL, 128, CLIP_VALIDITY_NOT_AVAILABLE, id); if (new_call == NULL) { ofono_error("Unable to malloc. " @@ -199,9 +202,7 @@ static void xcallstat_notify(GAtResult *result, gpointer user_data) return; } - new_call->id = id; break; - } case CALL_STATUS_ALERTING: case CALL_STATUS_ACTIVE: case CALL_STATUS_HELD: |