These two functions are defined exclusively for headsets, so follow established name conventions. --- v2: Commit was missing a file 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 bdc91da..ee78b5d 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 8180d69..99eeca8 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 745c307..5c751af 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 4e4cca5..28c6ad3 100644 --- a/audio/manager.c +++ b/audio/manager.c @@ -507,7 +507,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) { -- 1.7.4.1 ��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�