-Bug Fixes
This commit is contained in:
		| @@ -70,7 +70,8 @@ namespace Novell.CASA.DataEngines | |||||||
| 		//Uninitialize the profile if initialized earlier | 		//Uninitialize the profile if initialized earlier | ||||||
| 		//FIXME:- CURRENTLY NOT IVOKED SINCE THERES IS A BUG WHICH NEEDS TO BE FIXED IN FF NATIVE		 | 		//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); | 		//Console.WriteLine("FFEngine Destructor:UnInitializing the Profile "+defaultProfileName); | ||||||
| 		FireFox.UninitProfile(defaultProfileName); | 		if(defaultProfileName!=null) | ||||||
|  | 			FireFox.UninitProfile(defaultProfileName); | ||||||
|        } |        } | ||||||
|  |  | ||||||
|        public XmlNode Aggregate() |        public XmlNode Aggregate() | ||||||
| @@ -82,8 +83,36 @@ namespace Novell.CASA.DataEngines | |||||||
|             	doc.AppendChild(rootElem); |             	doc.AppendChild(rootElem); | ||||||
|  |  | ||||||
| 		//Initialize & Aggregate DefaultProfile from Firefox | 		//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.... | 		//Initialize & Aggregate any other profiles here if required.... | ||||||
| 	 | 	 | ||||||
|  		//Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:"); |  		//Console.WriteLine("FFEngine:Returning Aggregated Node for FireFox:"); | ||||||
| @@ -179,10 +208,11 @@ namespace Novell.CASA.DataEngines | |||||||
|              		Host hostList = null; |              		Host hostList = null; | ||||||
|  |  | ||||||
|  			//Console.WriteLine("FireFox:Getting Data for profile "+profileName); |  			//Console.WriteLine("FireFox:Getting Data for profile "+profileName); | ||||||
| 			hostList=FireFox.GetProfileData(profileName); | 			hostList = FireFox.GetProfileData(profileName);		 | ||||||
|  | 				 | ||||||
| 			if(hostList!=null) | 			if(hostList!=null) | ||||||
| 			{// Something to Aggregate | 			{// Something to Aggregate | ||||||
|  | 					//Console.WriteLine("\nFFEngine.cs : HostList is not null"); | ||||||
| 		            		XmlElement xmlProfileElement; | 		            		XmlElement xmlProfileElement; | ||||||
|  |  | ||||||
|               				String hostName; |               				String hostName; | ||||||
| @@ -279,8 +309,10 @@ namespace Novell.CASA.DataEngines | |||||||
|         { |         { | ||||||
|               try |               try | ||||||
|               { |               { | ||||||
| 		    System.Runtime.InteropServices.Marshal.PrelinkAll(typeof(FireFox)); | 		    if(FireFox.IsStoreAvailable() == 1) | ||||||
|                     return true;                 |                     	return true;                 | ||||||
|  | 		    else | ||||||
|  | 			return false; | ||||||
|               } |               } | ||||||
|               catch(DllNotFoundException d) |               catch(DllNotFoundException d) | ||||||
|               { |               { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user