From 84f4d71d7de54561e44cd48c1fa28a9f370224af Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Sat, 13 Aug 2011 13:31:36 -0400 Subject: [PATCH] Fix get/set_hfp_active to match name conventions These two functions are defined exclusively for headsets, so follow established name conventions. --- audio/headset.c | 4 ++-- audio/headset.h | 4 ++-- audio/main.c | 2 +- audio/manager.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/audio/headset.c b/audio/headset.c index b7ad052e7..de3fd3e07 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -2430,14 +2430,14 @@ unsigned int headset_suspend_stream(struct audio_device *dev, return id; } -gboolean get_hfp_active(struct audio_device *dev) +gboolean headset_get_hfp_active(struct audio_device *dev) { struct headset *hs = dev->headset; return hs->hfp_active; } -void set_hfp_active(struct audio_device *dev, gboolean active) +void headset_set_hfp_active(struct audio_device *dev, gboolean active) { struct headset *hs = dev->headset; diff --git a/audio/headset.h b/audio/headset.h index 8180d69bd..99eeca87e 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -79,8 +79,8 @@ unsigned int headset_suspend_stream(struct audio_device *dev, void *user_data); gboolean headset_cancel_stream(struct audio_device *dev, unsigned int id); -gboolean get_hfp_active(struct audio_device *dev); -void set_hfp_active(struct audio_device *dev, gboolean active); +gboolean headset_get_hfp_active(struct audio_device *dev); +void headset_set_hfp_active(struct audio_device *dev, gboolean active); gboolean headset_get_rfcomm_initiator(struct audio_device *dev); void headset_set_rfcomm_initiator(struct audio_device *dev, diff --git a/audio/main.c b/audio/main.c index 745c30792..5c751afba 100644 --- a/audio/main.c +++ b/audio/main.c @@ -105,7 +105,7 @@ static void sco_server_cb(GIOChannel *chan, GError *err, gpointer data) goto drop; } - if (!get_hfp_active(device)) { + if (!headset_get_hfp_active(device)) { error("Refusing non-HFP SCO connect attempt from %s", addr); goto drop; diff --git a/audio/manager.c b/audio/manager.c index 4f654cf38..33b4f5f01 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -510,7 +510,7 @@ static void ag_confirm(GIOChannel *chan, gpointer data) goto drop; } - set_hfp_active(device, hfp_active); + headset_set_hfp_active(device, hfp_active); headset_set_rfcomm_initiator(device, TRUE); if (headset_connect_rfcomm(device, chan) < 0) { -- 2.47.3