Commit 4802af3a authored by Christian Kellner's avatar Christian Kellner
Browse files

device: adjust keystate on disconnect

If we used a new key to authorize the device, the key will only
be "new" until the first disconnect of the device.
parent 390d8460
......@@ -853,6 +853,16 @@ bolt_device_disconnected (BoltDevice *dev)
"status", BOLT_STATUS_DISCONNECTED,
NULL);
/* check if we have a new key for the device, and
* if so, change its state to KEY_HAVE, because
* now it is not new anymore.
*/
if (dev->key == BOLT_KEY_NEW)
{
dev->key = BOLT_KEY_HAVE;
g_object_notify (G_OBJECT (dev), "key");
}
return dev->status;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment