* [PATCH BlueZ 0/1] Fix failure to register bt transport
@ 2025-06-24 14:23 Pete Beardmore
2025-06-24 14:23 ` [PATCH BlueZ 1/1] obexd: " Pete Beardmore
0 siblings, 1 reply; 4+ messages in thread
From: Pete Beardmore @ 2025-06-24 14:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pete Beardmore
Regurgitating the single commit message:
On initial logind update, the internal 'active' state is FALSE. Where
querying the current state (`sd_uid_get_state`) returns 'active' we do
NOT want to short-circuit the update to the internal state value and
ultimate transport initialisation.
---
I am guessing that this was a typo in the initial implementation
[obexd: Unregister profiles when the user is inactive](https://github.com/bluez/bluez/commit/765356e80262a20c359ec7722a5590232442d0d3)
which is where I landed having bisected for the error:
```
obexd[188706]: obexd/src/server.c:obex_server_init() No transport driver registered
obexd[188706]: obex_server_init failed
```
in my distro (ArchLinux)'s latest 5.83 version. I went from working bt
file transfer to not working post upgrade. Dropping back to 5.82
resolved the issue and I went from there.
I haven't seen any other complaints about this yet, which leads me to
speculate that IFF one upgrades, reboots (yuck!) and the systemd USER
SPACE obexd service is thus loaded prior to login, then the mechanism
that the implementation was aiming for (new seat detection) kicks in
and the internal active state is correctly set and the bt transport
initialised. This just didn't happen in my scenario.
Pete Beardmore (1):
obexd: Fix failure to register bt transport
obexd/src/logind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.50.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ 1/1] obexd: Fix failure to register bt transport
2025-06-24 14:23 [PATCH BlueZ 0/1] Fix failure to register bt transport Pete Beardmore
@ 2025-06-24 14:23 ` Pete Beardmore
2025-06-24 15:59 ` bluez.test.bot
2025-06-24 16:54 ` [PATCH BlueZ 1/1] obexd: " Pauli Virtanen
0 siblings, 2 replies; 4+ messages in thread
From: Pete Beardmore @ 2025-06-24 14:23 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Pete Beardmore
On initial logind update, the internal 'active' state is FALSE. Where
querying the current state (`sd_uid_get_state`) returns 'active' we do
NOT want to short-circuit the update to the internal state value and
ultimate transport initialisation.
---
obexd/src/logind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/obexd/src/logind.c b/obexd/src/logind.c
index b4279b209..e681dd39f 100644
--- a/obexd/src/logind.c
+++ b/obexd/src/logind.c
@@ -68,7 +68,7 @@ static int update(void)
return res;
if (state_is_active) {
- if (!active)
+ if (active)
return 0;
} else {
res = sd_uid_get_seats(uid, 1, NULL);
--
2.50.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: Fix failure to register bt transport
2025-06-24 14:23 ` [PATCH BlueZ 1/1] obexd: " Pete Beardmore
@ 2025-06-24 15:59 ` bluez.test.bot
2025-06-24 16:54 ` [PATCH BlueZ 1/1] obexd: " Pauli Virtanen
1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2025-06-24 15:59 UTC (permalink / raw)
To: linux-bluetooth, pete.beardmore
[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=975328
---Test result---
Test Summary:
CheckPatch PENDING 0.28 seconds
GitLint PENDING 0.29 seconds
BuildEll PASS 20.72 seconds
BluezMake PASS 3037.97 seconds
MakeCheck PASS 19.96 seconds
MakeDistcheck PASS 202.42 seconds
CheckValgrind PASS 279.52 seconds
CheckSmatch PASS 307.19 seconds
bluezmakeextell PASS 129.87 seconds
IncrementalBuild PENDING 0.26 seconds
ScanBuild PASS 928.37 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ 1/1] obexd: Fix failure to register bt transport
2025-06-24 14:23 ` [PATCH BlueZ 1/1] obexd: " Pete Beardmore
2025-06-24 15:59 ` bluez.test.bot
@ 2025-06-24 16:54 ` Pauli Virtanen
1 sibling, 0 replies; 4+ messages in thread
From: Pauli Virtanen @ 2025-06-24 16:54 UTC (permalink / raw)
To: Pete Beardmore, linux-bluetooth; +Cc: Andrew Sayers
ti, 2025-06-24 kello 15:23 +0100, Pete Beardmore kirjoitti:
> On initial logind update, the internal 'active' state is FALSE. Where
> querying the current state (`sd_uid_get_state`) returns 'active' we do
> NOT want to short-circuit the update to the internal state value and
> ultimate transport initialisation.
> ---
> obexd/src/logind.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/obexd/src/logind.c b/obexd/src/logind.c
> index b4279b209..e681dd39f 100644
> --- a/obexd/src/logind.c
> +++ b/obexd/src/logind.c
> @@ -68,7 +68,7 @@ static int update(void)
> return res;
>
> if (state_is_active) {
> - if (!active)
> + if (active)
> return 0;
> } else {
> res = sd_uid_get_seats(uid, 1, NULL);
Just above this line there appears to be
state_is_active = g_strcmp0(state, "active");
which looks like it's inverted too.
What this function probably should do is to make it simpler and
something like
state_is_active = (g_strcmp0(state, "active") == 0);
/* if active but no seat, consider as not active */
if (state_is_active && sd_uid_get_seats(uid, 1, NULL) == 0)
state_is_active = FALSE;
if (state_is_active == active)
return;
active = state_is_active;
emit callbacks;
--
Pauli Virtanen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-24 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 14:23 [PATCH BlueZ 0/1] Fix failure to register bt transport Pete Beardmore
2025-06-24 14:23 ` [PATCH BlueZ 1/1] obexd: " Pete Beardmore
2025-06-24 15:59 ` bluez.test.bot
2025-06-24 16:54 ` [PATCH BlueZ 1/1] obexd: " Pauli Virtanen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox