summaryrefslogtreecommitdiffstats
path: root/drivers/hfpmodem/voicecall.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-07-20 14:55:31 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-07-21 03:49:27 -0500
commitb33d6b5fcb2267fcaf8bae06b621a349187c455e (patch)
tree1c9a54aab4885eb5b9cd5f42dc302aafcec5e214 /drivers/hfpmodem/voicecall.c
parent77ae92efc0829b79824ba1a9018ee004ae597f36 (diff)
downloadofono-b33d6b5fcb2267fcaf8bae06b621a349187c455e.tar.bz2
hfp_hf: Reorganize common code into hfpmodem
Diffstat (limited to 'drivers/hfpmodem/voicecall.c')
-rw-r--r--drivers/hfpmodem/voicecall.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c
index 9870838a..126c1e31 100644
--- a/drivers/hfpmodem/voicecall.c
+++ b/drivers/hfpmodem/voicecall.c
@@ -29,15 +29,17 @@
#include <stdio.h>
#include <glib.h>
+#include <gatchat.h>
+#include <gatresult.h>
#include <ofono/log.h>
#include <ofono/modem.h>
#include <ofono/voicecall.h>
+
#include "common.h"
-#include "gatchat.h"
-#include "gatresult.h"
#include "hfpmodem.h"
+#include "slc.h"
#define POLL_CLCC_INTERVAL 2000
#define CLIP_TIMEOUT 500
@@ -1115,17 +1117,17 @@ static void hfp_voicecall_initialized(gboolean ok, GAtResult *result,
static int hfp_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
gpointer user_data)
{
- struct hfp_data *data = user_data;
+ struct hfp_slc_info *info = user_data;
struct voicecall_data *vd;
vd = g_new0(struct voicecall_data, 1);
- vd->chat = data->chat;
- vd->ag_features = data->ag_features;
- vd->ag_mpty_features = data->ag_mpty_features;
+ vd->chat = g_at_chat_clone(info->chat);
+ vd->ag_features = info->ag_features;
+ vd->ag_mpty_features = info->ag_mpty_features;
- memcpy(vd->cind_pos, data->cind_pos, HFP_INDICATOR_LAST);
- memcpy(vd->cind_val, data->cind_val, HFP_INDICATOR_LAST);
+ memcpy(vd->cind_pos, info->cind_pos, HFP_INDICATOR_LAST);
+ memcpy(vd->cind_val, info->cind_val, HFP_INDICATOR_LAST);
ofono_voicecall_set_data(vc, vd);