summaryrefslogtreecommitdiff
path: root/plugins/policy.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-05-06 16:59:43 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-05-07 10:43:34 +0300
commit96db78604252eeb17614b9982ced95fd66c6c6fc (patch)
tree4956ecedb00e401d9d5c23d20b691e07bf5c5dd3 /plugins/policy.c
parent97e60dbc1e986ce1d990d38a0746e9c02031555e (diff)
downloadbluez-96db78604252eeb17614b9982ced95fd66c6c6fc.tar.gz
policy: Fix not incrementing attempts
The number of attempts and intervals maybe different causing the attempts to not be incremented properly.
Diffstat (limited to 'plugins/policy.c')
-rw-r--r--plugins/policy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/policy.c b/plugins/policy.c
index 7687203e7..6bb826886 100644
--- a/plugins/policy.c
+++ b/plugins/policy.c
@@ -683,6 +683,8 @@ static void reconnect_set_timer(struct reconnect_data *reconnect)
{
static int timeout = 0;
+ reconnect->attempt++;
+
if (reconnect->attempt < reconnect_intervals_len)
timeout = reconnect_intervals[reconnect->attempt];