X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fmt%2Fss_pack.c;h=283e9844f5ee10427263252d249218fb0243bcbe;hb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;hp=7441a6c75b8aaeaaf2798cc105d8f2cdc27dab28;hpb=829bbd114f1c3dc00c1da47bca0a8207c049df3f;p=o-du%2Fl2.git diff --git a/src/mt/ss_pack.c b/src/mt/ss_pack.c index 7441a6c75..283e9844f 100644 --- a/src/mt/ss_pack.c +++ b/src/mt/ss_pack.c @@ -107,14 +107,14 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS242, (ErrVal)ret, "SAddPreMsg() failed"); #endif - RETVALUE(ret); + return (ret); } /* end of SPkS8 */ /* * -* Fun: SPkU8 +* Fun: oduUnpackUInt8 * * Desc: This function packs an unsigned 8 bit value into a message. * @@ -129,26 +129,26 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SPkU8 +PUBLIC S16 oduUnpackUInt8 ( U8 val, /* value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SPkU8(val, mBuf) +PUBLIC S16 oduUnpackUInt8(val, mBuf) U8 val; /* value */ Buffer *mBuf; /* message buffer */ #endif { S16 ret; /* return code */ - TRC1(SPkU8) + TRC1(oduUnpackUInt8) ret = SAddPreMsg((Data) val, mBuf); #if (ERRCLASS & ERRCLS_ADD_RES) if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS243, (ErrVal)ret, "SAddPreMsg() failed"); #endif - RETVALUE(ret); -} /* end of SPkU8 */ + return (ret); +} /* end of oduUnpackUInt8 */ /* * @@ -194,13 +194,13 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS244, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); + return (ret); } /* end of SPkS16 */ /* * -* Fun: SPkU16 +* Fun: oduUnpackUInt16 * * Desc: This function packs an unsigned 16 bit value into a message. * @@ -215,13 +215,13 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SPkU16 +PUBLIC S16 oduUnpackUInt16 ( U16 val, /* value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SPkU16(val, mBuf) +PUBLIC S16 oduUnpackUInt16(val, mBuf) U16 val; /* value */ Buffer *mBuf; /* message buffer */ #endif @@ -229,7 +229,7 @@ Buffer *mBuf; /* message buffer */ Data pkArray[2]; /* array for packing */ S16 ret; /* return code */ - TRC1(SPkU16) + TRC1(oduUnpackUInt16) #ifndef FCSPKINT /* backward compatibility, packing order */ pkArray[0] = (Data) GetHiByte(val); pkArray[1] = (Data) GetLoByte(val); @@ -242,8 +242,8 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS245, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); -} /* end of SPkU16 */ + return (ret); +} /* end of oduUnpackUInt16 */ /* @@ -299,13 +299,13 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS246, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); + return (ret); } /* end of SPkS32 */ /* * -* Fun: SPkU32 +* Fun: oduUnpackUInt32 * * Desc: This function packs an unsigned 32 bit value into a message. * @@ -320,13 +320,13 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SPkU32 +PUBLIC S16 oduUnpackUInt32 ( U32 val, /* value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SPkU32(val, mBuf) +PUBLIC S16 oduUnpackUInt32(val, mBuf) U32 val; /* value */ Buffer *mBuf; /* message buffer */ #endif @@ -335,7 +335,7 @@ Buffer *mBuf; /* message buffer */ Data pkArray[4]; /* packing array */ S16 ret; /* return code */ - TRC1(SPkU32) + TRC1(oduUnpackUInt32) #ifndef FCSPKINT /* backward compatibility, packing order */ tmp = (U16) GetHiWord(val); pkArray[0] = (Data) GetHiByte(tmp); @@ -356,8 +356,8 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS247, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); -} /* end of SPkU32 */ + return (ret); +} /* end of oduUnpackUInt32 */ /*ss038.103 1. Added Floating point support*/ #ifdef SS_FLOAT @@ -417,7 +417,7 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS248, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); + return (ret); } /* end of SPkF32 */ /* @@ -477,7 +477,7 @@ Buffer *mBuf; /* message buffer */ if (ret != ROK) SSLOGERROR(ERRCLS_ADD_RES, ESS249, (ErrVal)ret, "SAddPreMsgMult() failed"); #endif - RETVALUE(ret); + return (ret); } /* end of SPkF64 */ #endif /* SS_FLOAT */ @@ -518,7 +518,7 @@ Buffer *mBuf; /* message buffer */ if (!val) { SSLOGERROR(ERRCLS_INT_PAR, ESS250, ERRZERO, "SUnpkS8 : Null value"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -528,13 +528,13 @@ Buffer *mBuf; /* message buffer */ SSLOGERROR(ERRCLS_DEBUG, ESS251, (ErrVal)ret, "SRemPreMsg() failed"); #endif *val = (S8) tmp; - RETVALUE(ret); + return (ret); } /* end of SUnpkS8 */ /* * -* Fun: SUnpkU8 +* Fun: oduPackUInt8 * * Desc: This function unpacks an unsigned 8 bit value from a message. * @@ -547,28 +547,28 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SUnpkU8 +PUBLIC S16 oduPackUInt8 ( U8 *val, /* pointer to value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SUnpkU8(val, mBuf) +PUBLIC S16 oduPackUInt8(val, mBuf) U8 *val; /* pointer to value */ Buffer *mBuf; /* message buffer */ #endif { Data tmp; /* temporary value */ S16 ret; /* return code */ - TRC1(SUnpkU8) + TRC1(oduPackUInt8) /* ss021.103 - Addition of data pointer check */ #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!val) { - SSLOGERROR(ERRCLS_INT_PAR, ESS252, ERRZERO, "SUnpkU8 : Null value"); - RETVALUE(RFAILED); + SSLOGERROR(ERRCLS_INT_PAR, ESS252, ERRZERO, "oduPackUInt8 : Null value"); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -578,8 +578,8 @@ Buffer *mBuf; /* message buffer */ SSLOGERROR(ERRCLS_DEBUG, ESS253, (ErrVal)ret, "SRemPreMsg() failed"); #endif *val = (U8) tmp; - RETVALUE(ret); -} /* end of SUnpkU8 */ + return (ret); +} /* end of oduPackUInt8 */ /* * @@ -618,7 +618,7 @@ Buffer *mBuf; /* message buffer */ if (!val) { SSLOGERROR(ERRCLS_INT_PAR, ESS254, ERRZERO, "SUnpkS16 : Null value"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -636,13 +636,13 @@ Buffer *mBuf; /* message buffer */ tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]); #endif *val = (S16) tmp16; - RETVALUE(ret); + return (ret); } /* end of SUnpkS16 */ /* * -* Fun: SUnpkU16 +* Fun: oduPackUInt16 * * Desc: This function unpacks an unsigned 16 bit value from a message. * @@ -655,13 +655,13 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SUnpkU16 +PUBLIC S16 oduPackUInt16 ( U16 *val, /* pointer to value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SUnpkU16(val, mBuf) +PUBLIC S16 oduPackUInt16(val, mBuf) U16 *val; /* pointer to value */ Buffer *mBuf; /* message buffer */ #endif @@ -669,15 +669,15 @@ Buffer *mBuf; /* message buffer */ U16 tmp16; /* temporary value */ Data unpkArray[2]; /* unpacking array */ S16 ret; /* return code */ - TRC1(SUnpkU16) + TRC1(oduPackUInt16) /* ss021.103 - Addition of data pointer check */ #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!val) { - SSLOGERROR(ERRCLS_INT_PAR, ESS256, ERRZERO, "SUnpkU16 : Null value"); - RETVALUE(RFAILED); + SSLOGERROR(ERRCLS_INT_PAR, ESS256, ERRZERO, "oduPackUInt16 : Null value"); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -695,8 +695,8 @@ Buffer *mBuf; /* message buffer */ tmp16 = (U16) PutLoByte(tmp16, (U8) unpkArray[1]); #endif *val = tmp16; - RETVALUE(ret); -} /* end of SUnpkU16 */ + return (ret); +} /* end of oduPackUInt16 */ /* @@ -737,7 +737,7 @@ Buffer *mBuf; /* message buffer */ if (!val) { SSLOGERROR(ERRCLS_INT_PAR, ESS258, ERRZERO, "SUnpkS32 : Null value"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -764,13 +764,13 @@ Buffer *mBuf; /* message buffer */ tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16); #endif *val = (S32) tmp32; - RETVALUE(ret); + return (ret); } /* end of SUnpkS32 */ /* * -* Fun: SUnpkU32 +* Fun: oduPackUInt32 * * Desc: This function unpacks an unsigned 32 bit value from a message. * @@ -783,13 +783,13 @@ Buffer *mBuf; /* message buffer */ */ #ifdef ANSI -PUBLIC S16 SUnpkU32 +PUBLIC S16 oduPackUInt32 ( U32 *val, /* pointer to value */ Buffer *mBuf /* message buffer */ ) #else -PUBLIC S16 SUnpkU32(val, mBuf) +PUBLIC S16 oduPackUInt32(val, mBuf) U32 *val; /* pointer to value */ Buffer *mBuf; /* message buffer */ #endif @@ -800,15 +800,15 @@ Buffer *mBuf; /* message buffer */ #ifdef ERRCLASS S16 ret; /* return code */ #endif /* ERRCLASS */ - TRC1(SUnpkU32) + TRC1(oduPackUInt32) /* ss021.103 - Addition of data pointer check */ #if (ERRCLASS & ERRCLS_INT_PAR) /* check data pointer */ if (!val) { - SSLOGERROR(ERRCLS_INT_PAR, ESS260, ERRZERO, "SUnpkU32 : Null value"); - RETVALUE(RFAILED); + SSLOGERROR(ERRCLS_INT_PAR, ESS260, ERRZERO, "oduPackUInt32 : Null value"); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -836,8 +836,8 @@ Buffer *mBuf; /* message buffer */ tmp32 = (U32) PutLoWord(tmp32, (U16) tmp16); #endif *val = tmp32; - RETVALUE(ret); -} /* end of SUnpkU32 */ + return (ret); +} /* end of oduPackUInt32 */ /*ss038.103 1. Added Floating point support*/ #ifdef SS_FLOAT @@ -882,7 +882,7 @@ Buffer *mBuf; /* message buffer */ if (!val) { SSLOGERROR(ERRCLS_INT_PAR, ESS262, ERRZERO, "SUnpkF32 : Null value"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -903,7 +903,7 @@ Buffer *mBuf; /* message buffer */ sscanf(tmpArray, "%f", val); #endif - RETVALUE(ret); + return (ret); } /* end of SUnpkF32 */ @@ -949,7 +949,7 @@ Buffer *mBuf; /* message buffer */ if (!val) { SSLOGERROR(ERRCLS_INT_PAR, ESS264, ERRZERO, "SUnpkF64 : Null value"); - RETVALUE(RFAILED); + return RFAILED; } #endif /* ERRCLASS & ERRCLS_INT_PAR */ @@ -970,7 +970,7 @@ Buffer *mBuf; /* message buffer */ sscanf(tmpArray, "%lf", val); #endif - RETVALUE(ret); + return (ret); } /* end of SUnpkF64 */ #endif /* SS_FLOAT */