Skip to content
Permalink
Browse files
[GLIB] Fix invalid D-Bus name for MPRIS
https://bugs.webkit.org/show_bug.cgi?id=241807

Reviewed by Philippe Normand.

A mistake introduced in #1651 used a bus name where a segment started with
a number which is not allowed. Change this to `.instance-$INSTANCE_ID` to fix that.

* Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:
(WebCore::MediaSessionGLib::MediaSessionGLib):

Canonical link: https://commits.webkit.org/251744@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
TingPing committed Jun 22, 2022
1 parent e4d783c commit 262ef2f34e256bc97dce7a1d5df3b82692abb677
Showing 1 changed file with 1 addition and 1 deletion.
@@ -222,7 +222,7 @@ MediaSessionGLib::MediaSessionGLib(MediaSessionManagerGLib& manager, GRefPtr<GDB
}

const auto& applicationID = getApplicationID();
m_instanceId = applicationID.isEmpty() ? makeString("org.mpris.MediaPlayer2.webkit.instance", getpid(), "-", identifier.toUInt64()) : makeString("org.mpris.MediaPlayer2.", applicationID.ascii().data(), ".", identifier.toUInt64());
m_instanceId = applicationID.isEmpty() ? makeString("org.mpris.MediaPlayer2.webkit.instance", getpid(), "-", identifier.toUInt64()) : makeString("org.mpris.MediaPlayer2.", applicationID.ascii().data(), ".instance-", identifier.toUInt64());

m_ownerId = g_bus_own_name_on_connection(m_connection.get(), m_instanceId.ascii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, nullptr, nullptr, this, nullptr);
}

0 comments on commit 262ef2f

Please sign in to comment.