ospasn1ids.c

来自「mgcp协议源代码。支持多种编码:g711」· C语言 代码 · 共 89 行

C
89
字号
/**########################################################################*########################################################################*########################################################################*                                                               *   COPYRIGHT (c) 1998, 1999 by TransNexus, LLC                          *                                                                    *   This software contains proprietary and confidential information  *   of TransNexus, LLC. Except as may be set forth in the license    *   agreement under which this software is supplied, use, disclosure, *   or reproduction is prohibited without the prior, express, written*   consent of TransNexus, LLC.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospasn1ids.c - ASN1 defined ID's definitions and functions. */#define OSPC_OSPASN1ID_INCLUDE_STATIC 1 /* Forces inclusion of static *//* data defined in ospasn1id.h */#include "osp.h"#include "ospasn1.h"#include "ospasn1ids.h"         /* FUNCTION PROTOTYPES *//* ---------------------------------------------------------*//* Member functions                                         *//* ---------------------------------------------------------*/intOSPPASN1IdGetValue(    OSPEASN1ID      ospvId,    unsigned char   **ospvIdValue,    unsigned        *ospvIdLength){    int errorcode = OSPC_ERR_NO_ERROR;    OSPTIDINDEX *idxRec = OSPC_OSNULL;    if ((ospvId < 0) || (ospvId > OSPEID_LISTEND))    {        errorcode = OSPC_ERR_ASN1_OBJECTID_NOT_FOUND;           OSPM_DBGERRORLOG(errorcode, "Object Id enum out of range");    }     else if (ospvIdValue == OSPC_OSNULL)    {        errorcode = OSPC_ERR_ASN1_NULL_POINTER;        OSPM_DBGERRORLOG(errorcode,             "Invalid Null Pointer provided for object Id return");    }    if (errorcode == OSPC_ERR_NO_ERROR)    {        idxRec = &(ospgASN1IDIndex[ospvId]);        if (idxRec->Id != ospvId)        {            errorcode = OSPC_ERR_ASN1_OBJECTID_MISMATCH;            OSPM_DBGERRORLOG(errorcode,                "ID definitions and reference enums are out-of-sync");        }    }    if (errorcode == OSPC_ERR_NO_ERROR)    {        *ospvIdValue = idxRec->Value;        *ospvIdLength = idxRec->ValueLength;    }    if (errorcode != OSPC_ERR_NO_ERROR)    {        *ospvIdValue = OSPC_OSNULL;        *ospvIdLength = 0;    }    return errorcode;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?