persistentstorage/sql/SRC/Server/SqlSrvSession.cpp
branchRCL_3
changeset 9 667e88a979d7
parent 8 fa9941cf3867
child 10 31a8f755b7fe
equal deleted inserted replaced
8:fa9941cf3867 9:667e88a979d7
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
  1666 		{
  1666 		{
  1667 		//Extracting handle and handle type from the message code
  1667 		//Extracting handle and handle type from the message code
  1668 		TSqlSrvHandleType handleType = static_cast <TSqlSrvHandleType> (msgCode & KSqlSrvHandleTypeMask);
  1668 		TSqlSrvHandleType handleType = static_cast <TSqlSrvHandleType> (msgCode & KSqlSrvHandleTypeMask);
  1669 		aHandle = (msgCode & KSqlSrvHandleMask) >> KSqlSrvHandleShiftBits;
  1669 		aHandle = (msgCode & KSqlSrvHandleMask) >> KSqlSrvHandleShiftBits;
  1670 		__SQLPANIC_CLIENT(aHandle > 0, aMessage, ESqlPanicBadArgument);
  1670 		__SQLPANIC_CLIENT(aHandle > 0, aMessage, ESqlPanicBadArgument);
  1671 		if(aFunction >= ESqlSrvStmtClose && aFunction < ESqlSrvStreamBase)
  1671 		if(aFunction < ESqlSrvStreamBase)
  1672 			{
  1672 			{
  1673 			__SQLPANIC_CLIENT(handleType == ESqlSrvStatementHandle, aMessage, ESqlPanicBadArgument);
  1673 			__SQLPANIC_CLIENT(handleType == ESqlSrvStatementHandle, aMessage, ESqlPanicBadArgument);
  1674 			}
  1674 			}
  1675 		else if(aFunction > ESqlSrvStreamBase)
  1675 		else
  1676 			{
  1676 			{
  1677 			__SQLPANIC_CLIENT(handleType == ESqlSrvStreamHandle, aMessage, ESqlPanicBadArgument);
  1677 			__SQLPANIC_CLIENT(handleType == ESqlSrvStreamHandle, aMessage, ESqlPanicBadArgument);
  1678 			}
  1678 			}
  1679 		}
  1679 		}
  1680 	}
  1680 	}