diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2010-11-16 12:44:18 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-11-18 16:56:28 +0200 |
commit | f6322e527e7f8b301fb05e418f71cbd27f16c750 (patch) | |
tree | f82cf43e94ba378ce29f5c4b73fa9e0472d90926 /health | |
parent | fb750fb7fd809f7c4f1c5705a251e0425d00db17 (diff) | |
download | bluez-f6322e527e7f8b301fb05e418f71cbd27f16c750.tar.gz |
Check if MCAP Instance is already released when a callbacks comes back.
Diffstat (limited to 'health')
-rw-r--r-- | health/hdp_util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/health/hdp_util.c b/health/hdp_util.c index 2718fcec9..aefe5f93d 100644 --- a/health/hdp_util.c +++ b/health/hdp_util.c @@ -1039,6 +1039,12 @@ static void search_cb(sdp_list_t *recs, int err, gpointer user_data) bdaddr_t dst; uint16_t ccpsm; + if (!conn_data->dev->hdp_adapter->mi) { + g_set_error(&gerr, HDP_ERROR, HDP_CONNECTION_ERROR, + "Mcap instance released"); + goto fail; + } + if (err || !recs) { g_set_error(&gerr, HDP_ERROR, HDP_CONNECTION_ERROR, "Error getting remote SDP records"); |