From b33d6b5fcb2267fcaf8bae06b621a349187c455e Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 20 Jul 2011 14:55:31 -0500 Subject: hfp_hf: Reorganize common code into hfpmodem --- drivers/hfpmodem/voicecall.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'drivers/hfpmodem/voicecall.c') 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 #include +#include +#include #include #include #include + #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); -- cgit v1.2.3