-Bug Fixes

This commit is contained in:
lsreevatsa 2006-03-08 13:13:42 +00:00
parent 6f6109b488
commit bfc022c2f6

View File

@ -70,7 +70,8 @@ namespace Novell.CASA.DataEngines
//Uninitialize the profile if initialized earlier
//FIXME:- CURRENTLY NOT IVOKED SINCE THERES IS A BUG WHICH NEEDS TO BE FIXED IN FF NATIVE
//Console.WriteLine("FFEngine Destructor:UnInitializing the Profile "+defaultProfileName);
FireFox.UninitProfile(defaultProfileName);
if(defaultProfileName!=null)
FireFox.UninitProfile(defaultProfileName);
}
public XmlNode Aggregate()
@ -82,8 +83,36 @@ namespace Novell.CASA.DataEngines
doc.AppendChild(rootElem);
//Initialize & Aggregate DefaultProfile from Firefox
readProfileToCCF(doc,rootElem,defaultProfileName);
if(defaultProfileName == null)
{
defaultProfileName=FireFox.GetDefaultProfileName();
initProfileStatus=FireFox.InitProfile(defaultProfileName);
if(initProfileStatus!=1)
return rootElem;
}
/*Console.WriteLine("FFEngine.cs : Printing Doc to Console-BEFORE\n");
doc.Save(Console.Out);
int temp = readProfileToCCF(doc,rootElem,defaultProfileName);
Console.WriteLine("FFEngine.cs : Printing Doc to Console-AFTER\n");
doc.Save(Console.Out);*/
int temp = readProfileToCCF(doc,rootElem,defaultProfileName);
if(temp!=1)
{
//Console.WriteLine("FFEngine : Host List is null even when secrets are present");
FireFox.UninitProfile(defaultProfileName);
defaultProfileName = FireFox.GetDefaultProfileName();
//Console.WriteLine("FFEngine : Default Profile Name : " + defaultProfileName);
if(defaultProfileName==null)
return rootElem;
initProfileStatus = FireFox.InitProfile(defaultProfileName);
if(initProfileStatus!=1)
return rootElem;
readProfileToCCF(doc,rootElem,defaultProfileName);
}
//Initialize & Aggregate any other profiles here if required....
//Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:");
@ -179,10 +208,11 @@ namespace Novell.CASA.DataEngines
Host hostList = null;
//Console.WriteLine("FireFox:Getting Data for profile "+profileName);
hostList=FireFox.GetProfileData(profileName);
hostList = FireFox.GetProfileData(profileName);
if(hostList!=null)
{// Something to Aggregate
//Console.WriteLine("\nFFEngine.cs : HostList is not null");
XmlElement xmlProfileElement;
String hostName;
@ -279,8 +309,10 @@ namespace Novell.CASA.DataEngines
{
try
{
System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(FireFox));
return true;
if(FireFox.IsStoreAvailable() == 1)
return true;
else
return false;
}
catch(DllNotFoundException d)
{