⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospinit.c

📁 mgcp协议源代码。支持多种编码:g711
💻 C
字号:
/**########################################################################*########################################################################*########################################################################*                                                               *   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.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospinit.cpp - Provider space initialization. */#include "osp.h"#include "ospprovider.h"OSPTPROVIDER    OSPVProviderCollection[OSPC_MAX_PROVIDERS];OSPTMUTEX       OSPVProviderMutex;#ifdef OSPC_GK_SIMchar *OSPVDeleteAllowed;#endif/* * The OSPPInit function performs internal housekeeping necessary to  * prepare the SDK software for operation. * * returns OSPC_ERR_NO_ERROR if successful, OSPC_ERR_XXX otherwise. */intOSPPInit(void){    int         providerindex = 0;    int         errorcode     = OSPC_ERR_NO_ERROR,                tmperror      = OSPC_ERR_NO_ERROR;    /*     * create global provider mutex     */    OSPM_MUTEX_INIT(OSPVProviderMutex, NULL, errorcode);    if (errorcode == OSPC_ERR_NO_ERROR)     {        /*         * cycle thru collection, initializing each element.         */        for(providerindex = 0; providerindex < OSPC_MAX_PROVIDERS; providerindex++)        {            OSPM_MEMSET(&OSPVProviderCollection[providerindex], 0,                 sizeof(OSPTPROVIDER));        }        /*         * initialize Winsock Library if necessary         */        OSPM_INITWINSOCK(errorcode);        /*         * if initialization failed, destroy the mutex and return failure         */        if (errorcode != OSPC_ERR_NO_ERROR)            OSPM_MUTEX_DESTROY(OSPVProviderMutex, tmperror);    }    if (errorcode != OSPC_ERR_NO_ERROR)        errorcode = OSPC_ERR_PROV_INIT_FAILURE;#ifdef OSPC_GK_SIM    if (errorcode == OSPC_ERR_NO_ERROR)    {        OSPVDeleteAllowed = OSPM_GETENV("GKSIM_DELETE_ALLOWED");    }#endif    return errorcode;}voidOSPPCleanup(void){    int errorcode = OSPC_ERR_NO_ERROR;    /*     * called to cleanup any resources allocated by OSPPinit     */    OSPM_MUTEX_DESTROY(OSPVProviderMutex, errorcode);    OSPM_CLEANUPWINSOCK();    return;}

⌨️ 快捷键说明

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