Without reordering these two statements, the logs look like this: bnep%d connected bnep0 disconnected --- profiles/network/connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/network/connection.c b/profiles/network/connection.c index 97b87d02e..170841de6 100644 --- a/profiles/network/connection.c +++ b/profiles/network/connection.c @@ -216,9 +216,9 @@ static void bnep_conn_cb(char *iface, int err, void *data) goto failed; } + memcpy(nc->dev, iface, sizeof(nc->dev)); info("%s connected", nc->dev); - memcpy(nc->dev, iface, sizeof(nc->dev)); btd_service_connecting_complete(nc->service, 0); if (nc->connect) -- 2.27.0