supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp
changeset 20 82ee1f804b63
parent 18 3825cf2dc8c2
child 22 4c4ed41530db
--- a/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp	Fri Apr 16 15:23:31 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp	Mon May 03 12:54:42 2010 +0300
@@ -369,17 +369,33 @@
 		{			
 		HandlePacketError(errorCode);
 		return;
-		} 
+		}
+	
+	//Work out what SUPL Protocol Hanlder version should be used
 	if( major == 1 )
 		{
+		//SUPL v1
 		if(iOMASuplProtocolHandler1)
 		    {
 		    iOMASuplProtocolHandler1->HandlePacket(aPacket,aPortNum);
 		    }
 		}
+	else if( major == 2)
+		{
+		//SUPL v2
+		if(iOMASuplProtocolHandler2)
+            {
+            iOMASuplProtocolHandler2->HandlePacket(aPacket,aPortNum);
+            }
+		}
 	else 
 		{
-		if(iOMASuplProtocolHandler2)
+		//Use either of the Protocol Handlers to handle the packet
+		if(iOMASuplProtocolHandler1)
+		    {
+		    iOMASuplProtocolHandler1->HandlePacket(aPacket,aPortNum);
+		    }
+		else if(iOMASuplProtocolHandler2)
             {
             iOMASuplProtocolHandler2->HandlePacket(aPacket,aPortNum);
             }	
@@ -501,17 +517,32 @@
 		return;
 		}
 
+	//Work out what SUPL Protocol Hanlder version should be used
 	TInt major = aSuplSession->GetSUPLVersion();	
 	if( major == 1 )
 		{
+		//SUPL v1
 		if(iOMASuplProtocolHandler1)
 		    {
 		    iOMASuplProtocolHandler1->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
 		    }
 		}
+	else if( major == 2 )
+		{
+		//SUPL v2
+		if(iOMASuplProtocolHandler2)
+		    {
+		    iOMASuplProtocolHandler2->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
+		    }
+		}
 	else 
 		{
-		if(iOMASuplProtocolHandler2)
+		//Use either of the Protocol Handlers (if they exist) to handle the packet
+		if(iOMASuplProtocolHandler1)
+		    {
+		    iOMASuplProtocolHandler1->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
+		    }
+		else if(iOMASuplProtocolHandler2)
 		    {
 		    iOMASuplProtocolHandler2->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
 		    }