Make dev->authorized private to audio/device.c
There's no need to expose the authorized setting outside of device.c.
diff --git a/audio/device.c b/audio/device.c
index f2ddd24..d60e359 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -91,6 +91,8 @@
guint control_timer;
guint avdtp_timer;
guint headset_timer;
+
+ gboolean authorized;
};
static unsigned int sink_callback_id = 0;
@@ -151,7 +153,7 @@
return;
if (new_state == AUDIO_STATE_DISCONNECTED)
- dev->authorized = FALSE;
+ priv->authorized = FALSE;
if (dev->priv->state == new_state) {
debug("state change attempted from %s to %s",
@@ -683,7 +685,7 @@
struct dev_priv *priv = dev->priv;
if (derr == NULL)
- dev->authorized = TRUE;
+ priv->authorized = TRUE;
while (priv->auths) {
struct service_auth *auth = priv->auths->data;
@@ -749,7 +751,7 @@
if (g_slist_length(priv->auths) > 1)
return 0;
- if (dev->authorized || audio_device_is_connected(dev)) {
+ if (priv->authorized || audio_device_is_connected(dev)) {
g_idle_add(auth_idle_cb, dev);
return 0;
}
diff --git a/audio/device.h b/audio/device.h
index f4d8390..45c54e8 100644
--- a/audio/device.h
+++ b/audio/device.h
@@ -59,7 +59,6 @@
bdaddr_t dst;
gboolean auto_connect;
- gboolean authorized;
struct headset *headset;
struct gateway *gateway;