diff options
author | Denis Kenzior <denkenz@gmail.com> | 2014-01-31 15:05:40 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2014-10-20 13:40:28 -0500 |
commit | de02f68a2e2b1f3cf41292167044946fdb6b6ce0 (patch) | |
tree | d811c2e2912bacaf9d5d287a6e17bc971fbf114e | |
parent | 0f28d9206d48be0294deeb52eae6c0baef246b3b (diff) | |
download | ofono-de02f68a2e2b1f3cf41292167044946fdb6b6ce0.tar.bz2 |
handsfree: Don't try to send a method return
When we are simply updating the AG of HF indicator changes, do not try
to send a method return message.
-rw-r--r-- | src/handsfree.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/handsfree.c b/src/handsfree.c index 3488baa9..49eef679 100644 --- a/src/handsfree.c +++ b/src/handsfree.c @@ -408,10 +408,20 @@ void ofono_handsfree_set_hf_indicators(struct ofono_handsfree *hf, } } +static void ddr_update_cb(const struct ofono_error *error, void *data) +{ + if (error->type == OFONO_ERROR_TYPE_NO_ERROR) + return; + + ofono_info("Failed to update DDR indicator"); +} + void ofono_handsfree_hf_indicator_active_notify(struct ofono_handsfree *hf, unsigned int indicator, ofono_bool_t active) { + DBG("%d, %d", indicator, active); + switch (indicator) { case HFP_HF_INDICATOR_ENHANCED_SAFETY: if (!hf->have_ddr) @@ -425,7 +435,7 @@ void ofono_handsfree_hf_indicator_active_notify(struct ofono_handsfree *hf, if (hf->ddr_active && hf->driver && hf->driver->hf_indicator) hf->driver->hf_indicator(hf, HFP_HF_INDICATOR_ENHANCED_SAFETY, - hf->ddr, ddr_set_cb, hf); + hf->ddr, ddr_update_cb, hf); break; } } |