Closed
Bug 417372
Opened 17 years ago
Closed 17 years ago
permit RWS to be disabled
Categories
(Core Graveyard :: Widget: OS/2, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dragtext, Assigned: mozilla)
Details
Attachments
(1 file, 1 obsolete file)
1.38 KB,
patch
|
Details | Diff | Splinter Review |
Currently, there's no reliable way to disable the RWS08 library's WPS-integration features. The attached patch to nsRwsService.cpp tests for the environment variable "MOZ_NORWS" in the class's constructor. If it exists, the constructor returns NS_ERROR_NOT_AVAILABLE - the same as when the library can't be found.
Assignee | ||
Comment 1•17 years ago
|
||
Yes, that is a good idea, will make the doc part in README.txt easier. How about calling the variable MOZ_DISABLE_RWS instead? The other environment variable we have also test the value to be 1 or true. As there is no good way (that I know of) to unset a variable in standard CMD we should still use RWS if MOZ_DISABLE_RWS=0. Like we use for the hires timer in NSPR:
char *envp;
if ((envp = getenv("NSPR_OS2_NO_HIRES_TIMER")) != NULL) {
if (atoi(envp) == 1)
return;
}
Reporter | ||
Comment 2•17 years ago
|
||
(In reply to comment #1)
> How about calling the variable MOZ_DISABLE_RWS instead?
You already have MOZ_NO_REMOTE & NSPR_OS2_NO_HIRES_TIMER, so MOZ_NO_RWS would be more consistent (and somewhat easier to remember).
> As there is no good way (that I know of) to unset a variable in standard CMD
"SET MOZ_NO_RWS="
> The other environment variable we have also test the value to be 1 or true.
> [...] we should still use RWS if MOZ_DISABLE_RWS=0. Like we use for the hires
> timer in NSPR:
I was more nearly emulating MOZ_NO_REMOTE:
if (getenv("MOZ_NO_REMOTE")) {
mUseDDE = PR_FALSE;
*aResult = PR_TRUE;
return NS_OK;
}
Use whichever model you wish - and feel free to change my DosScanEnv() to getenv().
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> You already have MOZ_NO_REMOTE & NSPR_OS2_NO_HIRES_TIMER, so MOZ_NO_RWS would
> be more consistent (and somewhat easier to remember).
OK, convinced.
> > As there is no good way (that I know of) to unset a variable in standard CMD
>
> "SET MOZ_NO_RWS="
Last time I tried that it wasn't really removed from the environment (still got something back from getenv()). Will retest, perhaps I messed something up back then.
Assignee | ||
Comment 4•17 years ago
|
||
(In reply to comment #3)
> (In reply to comment #2)
> > > As there is no good way (that I know of) to unset a variable in standard CMD
> >
> > "SET MOZ_NO_RWS="
>
> Last time I tried that it wasn't really removed from the environment (still got
> something back from getenv()). Will retest, perhaps I messed something up back
> then.
OK, turns out that that this is a bug in the YAOS shell that I still always come back to despite all the other great CMD replacements that are available.
Assignee | ||
Comment 5•17 years ago
|
||
OK, I couldn't get DosScanEnv to compile (problems with const char** vs char** that I didn't just want to cast away) so I used PR_GetEnv instead. Rich, does that look OK to you, too?
Attachment #303160 -
Attachment is obsolete: true
Reporter | ||
Comment 6•17 years ago
|
||
(In reply to comment #5)
> Created an attachment (id=308229) [details]
> working patch
>
> I used PR_GetEnv instead. Rich, does that look OK to you, too?
Sure. I suppose PR_GetEnv() was always the "proper" way to do this.
Assignee | ||
Comment 7•17 years ago
|
||
Great, fix checked into trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•