Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 302395 Details for
Bug 442406
Cannot read MCD configuration file
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Add extra PR_LOGing to MCD
MCD-extra-logging.patch (text/plain), 6.02 KB, created by
Christopher Aillon
on 2008-04-14 21:33:45 UTC
(
hide
)
Description:
Add extra PR_LOGing to MCD
Filename:
MIME Type:
Creator:
Christopher Aillon
Created:
2008-04-14 21:33:45 UTC
Size:
6.02 KB
patch
obsolete
>Index: mozilla/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp >=================================================================== >RCS file: /cvsroot/mozilla/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp,v >retrieving revision 1.11 >diff -d -u -p -r1.11 nsJSConfigTriggers.cpp >--- mozilla/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp 15 Jan 2008 15:50:59 -0000 1.11 >+++ mozilla/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp 14 Apr 2008 21:29:55 -0000 >@@ -127,12 +127,15 @@ nsresult CentralizedAdminPrefManagerInit > JSRuntime *rt; > > // If autoconfig_cx already created, no need to create it again >- if (autoconfig_cx) >+ if (autoconfig_cx) { >+ PR_LOG(MCD, PR_LOG_DEBUG, ("autoconfig_cx already created, no need to create it again\n")); > return NS_OK; >+ } > > // We need the XPCONNECT service > nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID(), &rv); > if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, ("Can't get XPConnect\n")); > return rv; > } > >@@ -144,14 +147,16 @@ nsresult CentralizedAdminPrefManagerInit > > if (NS_FAILED(rv)) { > NS_ERROR("Couldn't get JS RunTime"); >+ PR_LOG(MCD, PR_LOG_DEBUG, ("Can't get JSRunTime\n")); > return rv; > } > > // Create a new JS context for autoconfig JS script > autoconfig_cx = JS_NewContext(rt, 1024); >- if (!autoconfig_cx) >+ if (!autoconfig_cx) { >+ PR_LOG(MCD, PR_LOG_DEBUG, ("No memory\n")); > return NS_ERROR_OUT_OF_MEMORY; >- >+ } > JSAutoRequest ar(autoconfig_cx); > > JS_SetErrorReporter(autoconfig_cx, autoConfigErrorReporter); >@@ -170,7 +175,7 @@ nsresult CentralizedAdminPrefManagerInit > return NS_OK; > } > } >- >+ PR_LOG(MCD, PR_LOG_DEBUG, ("Failure enabling our JSContext\n")); > // failue exit... clean up the JS context > JS_DestroyContext(autoconfig_cx); > autoconfig_cx = nsnull; >Index: mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp >=================================================================== >RCS file: /cvsroot/mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp,v >retrieving revision 1.21 >diff -d -u -p -r1.21 nsReadConfig.cpp >--- mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp 19 Oct 2007 23:29:39 -0000 1.21 >+++ mozilla/extensions/pref/autoconfig/src/nsReadConfig.cpp 14 Apr 2008 21:29:55 -0000 >@@ -188,17 +188,17 @@ nsresult nsReadConfig::readConfigFile() > rv = CentralizedAdminPrefManagerInit(); > if (NS_FAILED(rv)) > return rv; >- >+ PR_LOG(MCD, PR_LOG_DEBUG, ("CentralizedAdminPrefManagerInit() succeeded\n")); > // Open and evaluate function calls to set/lock/unlock prefs > rv = openAndEvaluateJSFile("prefcalls.js", 0, PR_FALSE, PR_FALSE); > if (NS_FAILED(rv)) > return rv; >- >+ PR_LOG(MCD, PR_LOG_DEBUG, ("openAndEvaluateJSFile(prefcalls.js) succeeded\n")); > // Evaluate platform specific directives > rv = openAndEvaluateJSFile("platform.js", 0, PR_FALSE, PR_FALSE); > if (NS_FAILED(rv)) > return rv; >- >+ PR_LOG(MCD, PR_LOG_DEBUG, ("openAndEvaluateJSFile(prefcalls.js) succeeded\n")); > mRead = PR_TRUE; > } > // If the lockFileName is NULL return ok, because no lockFile will be used >@@ -273,12 +273,14 @@ nsresult nsReadConfig::openAndEvaluateJS > { > nsresult rv; > nsCOMPtr<nsIFile> jsFile; >- >+ PR_LOG(MCD, PR_LOG_DEBUG, ("nsReadConfig::openAndEvaluateJSFile(%s,%d) called\n", aFileName, obscureValue)); > if (isBinDir) { > rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, > getter_AddRefs(jsFile)); >- if (NS_FAILED(rv)) >+ if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, (" can't get special dir: %s\n", NS_XPCOM_CURRENT_PROCESS_DIR)); > return rv; >+ } > > #ifdef XP_MAC > jsFile->AppendNative(NS_LITERAL_CSTRING("Essential Files")); >@@ -286,20 +288,28 @@ nsresult nsReadConfig::openAndEvaluateJS > } else { > rv = NS_GetSpecialDirectory(NS_APP_DEFAULTS_50_DIR, > getter_AddRefs(jsFile)); >- if (NS_FAILED(rv)) >+ if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, (" can't get special dir: %s\n", NS_APP_DEFAULTS_50_DIR)); > return rv; >+ } > rv = jsFile->AppendNative(NS_LITERAL_CSTRING("autoconfig")); >- if (NS_FAILED(rv)) >+ if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, (" can't appened autoconfig native\n")); > return rv; >+ } > } > rv = jsFile->AppendNative(nsDependentCString(aFileName)); >- if (NS_FAILED(rv)) >+ if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, (" can't append native: %s\n", aFileName)); > return rv; >+ } > > nsCOMPtr<nsIInputStream> inStr; > rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile); >- if (NS_FAILED(rv)) >- return rv; >+ if (NS_FAILED(rv)) { >+ PR_LOG(MCD, PR_LOG_DEBUG, (" can't get input stream!\n")); >+ return rv; >+ } > > PRInt64 fileSize; > PRUint32 fs, amt = 0; >@@ -311,6 +321,8 @@ nsresult nsReadConfig::openAndEvaluateJS > return NS_ERROR_OUT_OF_MEMORY; > > rv = inStr->Read(buf, fs, &amt); >+ PR_LOG(MCD, PR_LOG_DEBUG, (" amt = %d, fs = %d\n", amt, fs)); >+ if (amt == fs) PR_LOG(MCD, PR_LOG_DEBUG, (" failed to read the entire configuration file!!\n")); > NS_ASSERTION((amt == fs), "failed to read the entire configuration file!!"); > if (NS_SUCCEEDED(rv)) { > if (obscureValue > 0) { >@@ -324,6 +336,7 @@ nsresult nsReadConfig::openAndEvaluateJS > jsFile->GetNativePath(path); > nsCAutoString fileURL; > fileURL = NS_LITERAL_CSTRING("file:///") + path; >+ PR_LOG(MCD, PR_LOG_DEBUG, (" calling EvaluateAdminConfigScript(%s)\n", fileURL.get())); > rv = EvaluateAdminConfigScript(buf, amt, fileURL.get(), > PR_FALSE, PR_TRUE, > isEncoded ? PR_TRUE:PR_FALSE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 442406
: 302395