diff -r 000000000000 -r 9cfd9a3ee49c networkprotocolmodules/common/suplrrlpasn1/src/rrlputils.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/networkprotocolmodules/common/suplrrlpasn1/src/rrlputils.cpp Tue Feb 02 01:50:39 2010 +0200 @@ -0,0 +1,54 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +/** + @file + @internalTechnology + +*/ +#include +#include "rrlputils.h" +#include "supldevloggermacros.h" +#include "rtxErrCodes.h" + +/** +Translates error codes returned by the ASN1 runtime library to distinguish +from Symbian global error codes. + +Errors are simply translated to positive error codes. They maintain their +meaning as described in rtxErrCodes.h and asn1ErrCodes.h. + +Exceptions: + RTERR_NOMEM is translated to global error code KErrNoMemory + +@see rtxErrCodes.h +@see asn1ErrCodes.h +*/ +TInt RrlpUtils::ProcessAsn1Error(TInt aError) + { + SUPLLOG(ELogP1, "CRrlpMessageBase::ProcessAsn1Error() Begin\n"); + if (aError == RTERR_NOMEM) + { + SUPLLOG(ELogP1, "CRrlpMessageBase::ProcessAsn1Error() End (Out Of Memory)\n"); + return KErrNoMemory; + } + else + { + SUPLLOG2(ELogP1, "CRrlpMessageBase::ProcessAsn1Error() End (ASN1Error runtime error %d)\n", aError); + return aError * -1; + } + } + +