mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 05:33:03 -05:00
fix dbus_name.patch for 102
This commit is contained in:
parent
f13e9ccefb
commit
8322baf647
1 changed files with 21 additions and 21 deletions
|
@ -1,9 +1,9 @@
|
|||
diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp
|
||||
index 1c8db04..d8916f5 100644
|
||||
index 68c67c3482eb..914bae09a227 100644
|
||||
--- a/toolkit/components/remote/nsDBusRemoteClient.cpp
|
||||
+++ b/toolkit/components/remote/nsDBusRemoteClient.cpp
|
||||
@@ -86,7 +86,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
|
||||
profileName.ReplaceChar("+/=-", '_');
|
||||
@@ -97,7 +97,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
|
||||
mozilla::XREAppData::SanitizeNameForDBus(profileName);
|
||||
|
||||
aDestinationName =
|
||||
- nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
|
||||
|
@ -11,7 +11,7 @@ index 1c8db04..d8916f5 100644
|
|||
if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
|
||||
aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
||||
|
||||
@@ -99,7 +99,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
|
||||
@@ -111,7 +111,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
|
||||
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
||||
// We don't have a valid busName yet - try to create a default one.
|
||||
aDestinationName =
|
||||
|
@ -20,8 +20,8 @@ index 1c8db04..d8916f5 100644
|
|||
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
|
||||
// We failed completelly to get a valid bus name - just quit
|
||||
// to prevent crash at dbus_bus_request_name().
|
||||
@@ -122,7 +122,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -139,7 +139,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
|
||||
}
|
||||
|
||||
nsAutoCString pathName;
|
||||
- pathName = nsPrintfCString("/org/mozilla/%s/Remote", appName.get());
|
||||
|
@ -29,20 +29,20 @@ index 1c8db04..d8916f5 100644
|
|||
|
||||
static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
|
||||
RTLD_DEFAULT, "dbus_validate_path");
|
||||
@@ -132,7 +132,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
|
||||
@@ -150,7 +150,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
|
||||
}
|
||||
|
||||
nsAutoCString remoteInterfaceName;
|
||||
- remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
|
||||
+ remoteInterfaceName = nsPrintfCString("io.gitlab.%s", appName.get());
|
||||
|
||||
RefPtr<DBusMessage> msg =
|
||||
already_AddRefed<DBusMessage>(dbus_message_new_method_call(
|
||||
LOG(" DBus destination: %s\n", destinationName.get());
|
||||
LOG(" DBus path: %s\n", pathName.get());
|
||||
diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp
|
||||
index ff88482..28e6329 100644
|
||||
index 34167177d972..6b5c3e036b21 100644
|
||||
--- a/toolkit/components/remote/nsDBusRemoteServer.cpp
|
||||
+++ b/toolkit/components/remote/nsDBusRemoteServer.cpp
|
||||
@@ -33,7 +33,7 @@ static const char* introspect_template =
|
||||
@@ -30,7 +30,7 @@ static const char* introspect_template =
|
||||
" <arg name=\"data\" direction=\"out\" type=\"s\"/>\n"
|
||||
" </method>\n"
|
||||
" </interface>\n"
|
||||
|
@ -51,7 +51,7 @@ index ff88482..28e6329 100644
|
|||
" <method name=\"OpenURL\">\n"
|
||||
" <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
|
||||
" </method>\n"
|
||||
@@ -68,7 +68,7 @@ DBusHandlerResult nsDBusRemoteServer::OpenURL(DBusMessage* msg) {
|
||||
@@ -63,7 +63,7 @@ DBusHandlerResult nsDBusRemoteServer::OpenURL(DBusMessage* msg) {
|
||||
&commandLine, &length, DBUS_TYPE_INVALID) ||
|
||||
length == 0) {
|
||||
nsAutoCString errorMsg;
|
||||
|
@ -60,7 +60,7 @@ index ff88482..28e6329 100644
|
|||
reply = dbus_message_new_error(msg, errorMsg.get(), "Wrong argument");
|
||||
} else {
|
||||
guint32 timestamp = gtk_get_current_event_time();
|
||||
@@ -98,7 +98,7 @@ DBusHandlerResult nsDBusRemoteServer::HandleDBusMessage(
|
||||
@@ -93,7 +93,7 @@ DBusHandlerResult nsDBusRemoteServer::HandleDBusMessage(
|
||||
}
|
||||
|
||||
nsAutoCString ourInterfaceName;
|
||||
|
@ -69,16 +69,16 @@ index ff88482..28e6329 100644
|
|||
|
||||
if ((strcmp("OpenURL", method) == 0) &&
|
||||
(strcmp(ourInterfaceName.get(), iface) == 0)) {
|
||||
@@ -164,7 +164,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
@@ -154,7 +154,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
|
||||
nsAutoCString busName;
|
||||
busName =
|
||||
- nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), profileName.get());
|
||||
+ nsPrintfCString("io.gitlab.%s.%s", mAppName.get(), profileName.get());
|
||||
mozilla::XREAppData::SanitizeNameForDBus(profileName);
|
||||
|
||||
- nsPrintfCString busName("org.mozilla.%s.%s", mAppName.get(),
|
||||
+ nsPrintfCString busName("io.gitlab.%s.%s", mAppName.get(),
|
||||
profileName.get());
|
||||
if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
|
||||
busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
|
||||
|
||||
@@ -176,7 +176,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
@@ -167,7 +167,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
|
||||
// We don't have a valid busName yet - try to create a default one.
|
||||
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
||||
|
@ -87,7 +87,7 @@ index ff88482..28e6329 100644
|
|||
if (!sDBusValidateBusName(busName.get(), nullptr)) {
|
||||
// We failed completelly to get a valid bus name - just quit
|
||||
// to prevent crash at dbus_bus_request_name().
|
||||
@@ -196,7 +196,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
@@ -186,7 +186,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue