- RETVALUE((*func)(pst, suId, status));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on common
- * channel for transmission
-*
-* @details
-*
-* Function : cmPkRguCDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguCDatReq
-(
-Pst* pst,
-SpId spId,
-RguCDatReqInfo * datReq
-)
-#else
-PUBLIC S16 cmPkRguCDatReq(pst, spId, datReq)
-Pst* pst;
-SpId spId;
-RguCDatReqInfo * datReq;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguCDatReq)
-
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU016, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo));
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) datReq, mBuf);
- }
- else
- {
- if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU017, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU019, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- datReq = NULLP;
- }
-
- if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU018, (ErrVal)0, "Packing failed");
-#endif
-
- if (datReq != NULLP)
- {
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- }
-
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUCDATREQ;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on common
- * channel for transmission
-*
-* @details
-*
-* Function : cmUnpkRguCDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguCDatReq
-(
-RguCDatReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf)
-RguCDatReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SpId spId;
- RguCDatReqInfo *datReq;
-
- TRC3(cmUnpkRguCDatReq)
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool,
- (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU020, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo));
- if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU021, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, spId, datReq));