summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-09-24 00:22:06 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-09-24 00:29:59 -0500
commit4b134bd15f5ae2ec96b197cbcad2b5be894fa4e9 (patch)
tree1c0bf538c3484106f9742223b5bbfdef846a2f27
parent09c0ae8478940121ebc8ce1d26aa6ae15097b3c3 (diff)
downloadofono-4b134bd15f5ae2ec96b197cbcad2b5be894fa4e9.tar.bz2
ifx: Don't bother polling on an ATD
The core can handle stateless drivers that do not keep clip state, in the case of IFX we can skip the poll after ATD for finding out our CLIP and just keep it as invalid / obtained from COLP. The core should do the right thing.
-rw-r--r--drivers/ifxmodem/voicecall.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/ifxmodem/voicecall.c b/drivers/ifxmodem/voicecall.c
index 3b889460..c2c45368 100644
--- a/drivers/ifxmodem/voicecall.c
+++ b/drivers/ifxmodem/voicecall.c
@@ -324,7 +324,6 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
struct ofono_voicecall *vc = cbd->user;
- struct voicecall_data *vd = ofono_voicecall_get_data(vc);
ofono_voicecall_cb_t cb = cbd->cb;
GAtResultIter iter;
const char *num;
@@ -335,8 +334,10 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
decode_at_error(&error, g_at_result_final_response(result));
- if (!ok)
- goto out;
+ if (!ok) {
+ cb(&error, cbd->data);
+ return;
+ }
g_at_result_iter_init(&iter, result);
@@ -360,20 +361,14 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
return;
}
- /* oFono core will generate a call with the dialed number
- * inside its dial callback. Unless we got COLP information
- * we do not need to communicate that a call is being
- * dialed
+ /* Let oFono core will generate a call with the dialed number
+ * inside its dial callback.
*/
+ cb(&error, cbd->data);
+
+ /* If we got COLP information, then notify the core */
if (validity != 2)
ofono_voicecall_notify(vc, call);
-
- if (!vd->clcc_source)
- vd->clcc_source = g_timeout_add(POLL_CLCC_INTERVAL,
- poll_clcc, vc);
-
-out:
- cb(&error, cbd->data);
}
static void ifx_dial(struct ofono_voicecall *vc,