From 315e8b45506745f4b28f658772cc65cdef9a2d9e Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Thu, 3 Jan 2008 09:13:39 +0000 Subject: gsmd: add Call Forwarding function (Sean Chiang) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3760 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/usock.c | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 147 insertions(+), 1 deletion(-) (limited to 'src/gsmd') diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c index c7a0224..5caedac 100644 --- a/src/gsmd/usock.c +++ b/src/gsmd/usock.c @@ -217,6 +217,75 @@ static int voicecall_ctrl_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) cmd->id, sizeof(ret), &ret); } +static int voicecall_fwd_stat_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) +{ + struct gsmd_user *gu = ctx; + struct gsm_extrsp *er; + struct gsmd_call_fwd_stat gcfs; + int ret = 0; + + DEBUGP("resp: %s\n", resp); + + er = extrsp_parse(cmd, resp); + + if ( !er ) + return -ENOMEM; + + gcfs.is_last = (cmd->ret == 0 || cmd->ret == 4)? 1:0; + + if ( er->num_tokens == 2 && + er->tokens[0].type == GSMD_ECMD_RTT_NUMERIC && + er->tokens[1].type == GSMD_ECMD_RTT_NUMERIC ) { + + /* + * +CCFC: ,[,, + * [,,[,