diff options
-rw-r--r-- | src/voicecall.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 3507f33e..9225de9c 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -2758,6 +2758,22 @@ static void emulator_chld_cb(struct ofono_emulator *em, goto fail; switch (chld) { + case 0: + if (vc->driver->set_udub == NULL) + goto fail; + + if (vc->driver->release_all_held == NULL) + goto fail; + + if (voicecalls_have_waiting(vc)) { + vc->driver->set_udub(vc, + emulator_generic_cb, em); + return; + } + + vc->driver->release_all_held(vc, + emulator_generic_cb, em); + return; case 1: if (vc->driver->release_all_active == NULL) goto fail; @@ -2781,8 +2797,15 @@ static void emulator_chld_cb(struct ofono_emulator *em, memcpy(buf, "+CHLD=", 6); info = buf + 6; - if (vc->driver->release_all_active) + if (vc->driver->release_all_held && vc->driver->set_udub) + *info++ = '0'; + + if (vc->driver->release_all_active) { + if (info - buf > 6) + *info++ = ','; + *info++ = '1'; + } if (vc->driver->hold_all_active) { if (info - buf > 6) |