The problem still exists in version 3.0.5. I have attached a new patch.
--
Tarlika Elisabeth Schmitz
If you need to contact me, please, reply to this bug, not to my email
address displayed here. As it gets spammed to hell, I have redirected
it to /dev/null and cc'd myself under a different address.
--- ./toolkit/xre/nsAppRunner.cpp.ori 2009-01-14 19:42:47.000000000 +0000
+++ ./toolkit/xre/nsAppRunner.cpp 2009-01-29 18:01:16.000000000 +0000
@@ -260,6 +260,7 @@
int gArgc;
char **gArgv;
+const char *gAppName;
static char gToolkitVersion[20];
static char gToolkitBuildID[40];
@@ -1233,14 +1234,7 @@
return 1;
}
- const char *temp = nsnull;
- ar = CheckArg("a", PR_FALSE, &temp);
- if (ar == ARG_BAD) {
- PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
- return 1;
- } else if (ar == ARG_FOUND) {
- program.Assign(temp);
- }
+ program.Assign(gAppName);
ar = CheckArg("u", PR_FALSE, &username);
if (ar == ARG_BAD) {
@@ -1284,14 +1278,7 @@
ToLowerCase(program);
const char *username = getenv("LOGNAME");
- const char *temp = nsnull;
- ar = CheckArg("a", PR_TRUE, &temp);
- if (ar == ARG_BAD) {
- PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
- return REMOTE_ARG_BAD;
- } else if (ar == ARG_FOUND) {
- program.Assign(temp);
- }
+ program.Assign(gAppName);
ar = CheckArg("u", PR_TRUE, &username);
if (ar == ARG_BAD) {
@@ -2878,6 +2865,17 @@
}
const char* desktopStartupIDPtr =
desktopStartupID.IsEmpty() ? nsnull : desktopStartupID.get();
+
+ ArgResult app_ar;
+ PRBool checkOSInt = PR_TRUE;
+ if (ar)
+ checkOSInt = PR_FALSE;
+ app_ar = CheckArg("a", checkOSInt, &gAppName);
+ if (app_ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
+ return 1;
+ }
+
if (ar) {
return HandleRemoteArgument(xremotearg, desktopStartupIDPtr);
}
@@ -3182,8 +3180,7 @@
nsCOMPtr<nsIRemoteService> remoteService;
remoteService = do_GetService("@mozilla.org/toolkit/remote-service;1");
if (remoteService)
- remoteService->Startup(gAppData->name,
- PromiseFlatCString(profileName).get());
+ remoteService->Startup((nsnull == gAppName ? "default" : gAppName), PromiseFlatCString(profileName).get());
#endif /* MOZ_ENABLE_XREMOTE */
// enable win32 DDE responses and Mac appleevents responses