mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Live debug logging confirmed notifypermissionlist entries always had permission_id=None - only permission_name/description were populated, plus an unrelated group_id_end marker. The old code silently discarded every entry because it only inserted into the name cache when permission_id was Some. Real numeric IDs (as seen e.g. in notifyservergrouppermlist) only match a catalog entry's ordinal position in the arrival stream, so names are now assigned from a running counter instead. Also fixed a related race: three call sites (permoverview, permissionlist, permlist) each independently checked permission_names.is_empty() before firing their own 'permissionlist' catalog fetch, so two could race and fire duplicate concurrent fetches whose interleaved chunks would have corrupted the new ordinal counter. They now check pending_permission_list too and piggyback on an in-flight fetch instead of duplicating it.