summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>2011-05-02 17:48:07 +0200
committerDenis Kenzior <denkenz@gmail.com>2011-05-04 22:00:07 -0500
commitaa0f93b664a4c5e9ab97c63f2fe3d3a9f5f74630 (patch)
tree4ee8a01d48d15c5228f9594f2686f47ebc98a2f1
parent6d501aa93ade18112605edec6be14336a0076dcc (diff)
downloadofono-aa0f93b664a4c5e9ab97c63f2fe3d3a9f5f74630.tar.bz2
voicecall: add +CHLD=1X support for HFP emulator
-rw-r--r--src/voicecall.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 3fe590d4..432c7394 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -2803,9 +2803,19 @@ static void emulator_chld_cb(struct ofono_emulator *em,
emulator_generic_cb, em);
return;
default:
- goto fail;
+ break;
}
- break;
+
+ if (chld >= 10 && chld <= 17) {
+ if (vc->driver->release_specific == NULL)
+ goto fail;
+
+ vc->driver->release_specific(vc, chld - 10,
+ emulator_generic_cb, em);
+ return;
+ }
+
+ goto fail;
case OFONO_EMULATOR_REQUEST_TYPE_SUPPORT:
memcpy(buf, "+CHLD=", 6);
@@ -2842,6 +2852,14 @@ static void emulator_chld_cb(struct ofono_emulator *em,
*info++ = '4';
}
+ if (vc->driver->release_specific) {
+ if (info - buf > 6)
+ *info++ = ',';
+
+ *info++ = '1';
+ *info++ = 'X';
+ }
+
*info++ = '\0';
ofono_emulator_send_info(em, buf, TRUE);