• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MessageLoaderParms函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MessageLoaderParms函数的典型用法代码示例。如果您正苦于以下问题:C++ MessageLoaderParms函数的具体用法?C++ MessageLoaderParms怎么用?C++ MessageLoaderParms使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MessageLoaderParms函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: checkBlocked

static void checkBlocked(CIMInstance &pm)
{
    PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, "checkBlocked");
    
    Array<Uint16> operationalStatus;

    Uint32 pos = pm.findProperty(CIMName ("OperationalStatus"));
    if(pos == PEG_NOT_FOUND) {
        PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
            "OperationalStatus not found.");
        PEG_METHOD_EXIT();
	//l10n
        //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "provider lookup failed.");
        throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
        					"ProviderManager.ProviderManagerService.PROVIDER_LOOKUP_FAILED",
        					"provider lookup failed."));
    }

    pm.getProperty(pos).getValue().get(operationalStatus);
    for(Uint32 i = 0; i < operationalStatus.size(); i++) {
        if(operationalStatus[i] == _MODULE_STOPPED ||
	   operationalStatus[i] == _MODULE_STOPPING) {
            PEG_TRACE_STRING(TRC_PROVIDERMANAGER, Tracer::LEVEL4,
                "Provider blocked.");
            PEG_METHOD_EXIT();
			//l10n
            //throw PEGASUS_CIM_EXCEPTION(CIM_ERR_ACCESS_DENIED, "provider blocked.");
            throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(
            			"ProviderManager.ProviderManagerService.PROVIDER_BLOCKED",
            			"provider blocked."));
        }
    }
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,代码来源:ProviderRegistrar.cpp


示例2: MessageLoaderParms

void AuditLogger::setEnabled(Boolean enable)
{
    if (enable)
    {
        if (!_auditLogFlag)
        {
            Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER,
                Logger::INFORMATION,
                MessageLoaderParms(
                    "Common.AuditLogger.ENABLE_AUDIT_LOG",
                    "Audit logging is enabled."));

            // only call the audit intiialzation call back if set.
            if (_auditLogInitializeCallback != 0)
            {
                _auditLogInitializeCallback();
            }
        }
    }
    else
    {
        if (_auditLogFlag)
        {
            Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER,
                Logger::INFORMATION,
                MessageLoaderParms(
                    "Common.AuditLogger.DISABLE_AUDIT_LOG",
                    "Audit logging is disabled."));
        }
    }

    _auditLogFlag = enable;

}
开发者ID:brunolauze,项目名称:pegasus,代码行数:34,代码来源:AuditLoggerToSMF.cpp


示例3: PEG_METHOD_ENTER

void ZOSConsoleManager::_issueSyntaxError(const char* command)
{
    PEG_METHOD_ENTER(TRC_SERVER,
                     "ZOSConsoleManager::_issueSyntaxError");

    Logger::put_l(
        Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
        MessageLoaderParms(
            "Server.ConsoleManager_zOS.CON_SYNTAX_ERR.PEGASUS_OS_ZOS",
            "CIM MODIFY COMMAND REJECTED DUE TO SYNTAX ERROR"));

    if (!strncmp(command,STRLIT_ARGS(ZOSCONSOLEMANAGER_TOKEN_CONFIG)))
    {
        Logger::put_l(
            Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
            MessageLoaderParms(
                "Server.ConsoleManager_zOS.CON_MODIFY_SYNTAX.PEGASUS_OS_ZOS",
                "Syntax is: "
                "MODIFY CFZCIM,APPL=CONFIG,<name>=<value>[,PLANNED]"));
    }
    else if (!strncmp(command,STRLIT_ARGS(ZOSCONSOLEMANAGER_TOKEN_ENV)))
    {
        Logger::put_l(
            Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
            MessageLoaderParms(
                "Server.ConsoleManager_zOS."
                "CON_MODIFY_ENV_SYNTAX.PEGASUS_OS_ZOS",
                "Syntax is:"
                " MODIFY CFZCIM,APPL=ENV[,<varname>][=<value>]"));
    }

    PEG_METHOD_EXIT();
}
开发者ID:deleisha,项目名称:neopegasus,代码行数:33,代码来源:ConsoleManager_zOS.cpp


示例4: PEG_METHOD_ENTER

void ProviderAgent::_writeResponse(Message* message)
{
    PEG_METHOD_ENTER(TRC_PROVIDERAGENT, "ProviderAgent::_writeResponse");

    CIMMessage* response = dynamic_cast<CIMMessage*>(message);
    PEGASUS_ASSERT(response != 0);

    //
    // Write the response message to the pipe
    //
    try
    {
        // Use Mutex to prevent concurrent writes to the same pipe
        AutoMutex pipeLock(_pipeToServerMutex);

        AnonymousPipe::Status writeStatus =
            _pipeToServer->writeMessage(response);

        if (writeStatus != AnonymousPipe::STATUS_SUCCESS)
        {
            PEG_TRACE_CSTRING(TRC_PROVIDERAGENT, Tracer::LEVEL1,
                "Error writing response to pipe.");
            Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
                MessageLoaderParms(
                    "ProviderManager.ProviderAgent.ProviderAgent."
                        "CIMSERVER_COMMUNICATION_FAILED",
                    "cimprovagt \"$0\" communication with CIM Server failed.  "
                        "Exiting.",
                    _agentId));
            _terminating = true;
        }
    }
    catch (...)
    {
        PEG_TRACE_CSTRING(TRC_PROVIDERAGENT, Tracer::LEVEL1,
            "Caught exception while writing response.");
        Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
            MessageLoaderParms(
                "ProviderManager.ProviderAgent.ProviderAgent."
                    "CIMSERVER_COMMUNICATION_FAILED",
                "cimprovagt \"$0\" communication with CIM Server failed.  "
                    "Exiting.",
                _agentId));
        _terminating = true;
    }

    PEG_METHOD_EXIT();
}
开发者ID:rdobson,项目名称:openpegasus,代码行数:48,代码来源:ProviderAgent.cpp


示例5: _getKeyValue

void _getKeyValue (
    const CIMObjectPath&  instanceName,
    CIMNamespaceName& childNamespaceName,
    Boolean& isRelativeName)

{

    Array<CIMKeyBinding> kbArray = instanceName.getKeyBindings();
    if ((kbArray.size() == 1) &&
            (kbArray[0].getName() == NAMESPACE_PROPERTYNAME))
    {
        String childNamespaceString = kbArray[0].getValue();

        if (childNamespaceString != String::EMPTY)
        {
            childNamespaceName = childNamespaceString;
        }

        isRelativeName = !(childNamespaceName.isNull());
    }
    else
    {
        //l10n
        //throw CIMInvalidParameterException("Invalid key property:  ");
        throw CIMInvalidParameterException(MessageLoaderParms(
                                               "ControlProviders.NamespaceProvider.NamespaceProvider.INVALID_KEY_PROPERTY",
                                               "Invalid key property:  "));
    }
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:29,代码来源:NamespaceProvider.cpp


示例6: PEGASUS_DEBUG_ASSERT

void Mutex::lock()
{
    PEGASUS_DEBUG_ASSERT(_magic);

    int r = pthread_mutex_lock(&_rep.mutex);

    if (r == 0)
    {
#if defined(PEGASUS_DEBUG)
        _rep.count++;
#endif
    }
    else
    {
        if (r != -1)
        {
            // Special behavior for Single UNIX Specification, Version 3
            errno = r;
        }

        throw Exception(MessageLoaderParms(
                            MUTEX_LOCK_FAILED_KEY,
                            MUTEX_LOCK_FAILED_MSG,
                            PEGASUS_SYSTEM_ERRORMSG_NLS));
    }
}
开发者ID:xenserver,项目名称:openpegasus,代码行数:26,代码来源:Mutex.cpp


示例7: _resolvePhysicalName

ProviderName DefaultProviderManager::_resolveProviderName(
    const ProviderIdContainer& providerId)
{
    String providerName;
    String fileName;
    String moduleName;
    CIMValue genericValue;

    genericValue = providerId.getModule().getProperty(
        providerId.getModule().findProperty(
            PEGASUS_PROPERTYNAME_NAME)).getValue();
    genericValue.get(moduleName);

    genericValue = providerId.getProvider().getProperty(
        providerId.getProvider().findProperty(
            PEGASUS_PROPERTYNAME_NAME)).getValue();
    genericValue.get(providerName);

    genericValue = providerId.getModule().getProperty(
        providerId.getModule().findProperty("Location")).getValue();
    genericValue.get(fileName);

    String resolvedFileName = _resolvePhysicalName(fileName);

    if (resolvedFileName == String::EMPTY)
    {
        // Provider library not found
        throw Exception(MessageLoaderParms(
            "ProviderManager.ProviderManagerService.PROVIDER_FILE_NOT_FOUND",
            "File \"$0\" was not found for provider module \"$1\".",
            FileSystem::buildLibraryFileName(fileName), moduleName));
    }

    return ProviderName(moduleName, providerName, resolvedFileName);
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:35,代码来源:DefaultProviderManager.cpp


示例8: _generateFullNamespaceName

void _generateFullNamespaceName(
    Array<CIMNamespaceName>& namespaceNames,
    CIMNamespaceName& parentNamespaceName,
    CIMNamespaceName& childNamespaceName,
    Boolean isRelativeName,
    CIMNamespaceName& fullNamespaceName)

{
    // If isRelativeName is true, then the parentNamespace
    // MUST exist
    //
    if (isRelativeName)
    {
        if (!Contains(namespaceNames, parentNamespaceName))
        {
            //l10n
            //throw CIMObjectNotFoundException("Parent namespace does not exist: "
            //+ parentNamespaceName.getString());
            throw CIMObjectNotFoundException(MessageLoaderParms(
                                                 "ControlProviders.NamespaceProvider.NamespaceProvider.PARENT_NAMESPACE_DOES_NOT_EXIST",
                                                 "Parent namespace does not exist: $0",
                                                 parentNamespaceName.getString()));
        }
        // Create full namespace name by prepending parentNamespaceName
        fullNamespaceName = CIMNamespaceName (parentNamespaceName.getString()
                                              + "/" + childNamespaceName.getString());
    }
    else
    {
        fullNamespaceName = parentNamespaceName;
    }

}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:33,代码来源:NamespaceProvider.cpp


示例9: PEG_METHOD_ENTER

//
//  Removes the file that was created
//
Boolean LocalAuthFile::remove()
{
    PEG_METHOD_ENTER(TRC_AUTHENTICATION, "LocalAuthFile::remove()");

    Boolean retVal = true;

    //
    // remove the file
    //
    if (FileSystem::exists(_filePathName))
    {

#if !defined(PEGASUS_OS_TYPE_WINDOWS)
        // change ownership back to the CIMOM
        int rc = chown(
            (const char *)_filePathName.getCString(), geteuid(), getegid());

        if (rc == -1)
        {
            Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::WARNING,
                MessageLoaderParms(
                    "Security.Authentication.LocalAuthFile.NO_CHOWN",
                    "Changing ownership of the local authentication "
                        "security file back to the CIMServer UserId failed."));
        }
#endif

        retVal = FileSystem::removeFile(_filePathName);
    }

    PEG_METHOD_EXIT();

    return retVal;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:37,代码来源:LocalAuthFile.cpp


示例10: PEG_METHOD_ENTER

void FileListenerDestination::_recordIndicationToFile(
        const char* path,
        const String& formattedText)
{
    PEG_METHOD_ENTER(TRC_IND_HANDLER,
            "FileListenerDestination::_recordIndicationToFile");

    FILE *fd = fopen(path, "a");
    if(fd)
    {
        if( fprintf(fd, "%s\n", (const char*)formattedText.getCString()) > 0)
        {
            fclose(fd);
        }
        else
        {
          fclose(fd);
          PEG_METHOD_EXIT();
          throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED, MessageLoaderParms(
              "Handler.FileListenerDestination.FileListenerDestination."
              "FAILED_TO_WRITE_INDICATION_TO_FILE",
              "Failed to write indication to local file $0.", 
              path));
        }
    }
    else // file opening failed
    {
        PEG_METHOD_EXIT();
        ThrowCannotOpenFileException(path);
    }

    PEG_METHOD_EXIT();
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:33,代码来源:FileListenerDestination.cpp


示例11: PEG_METHOD_ENTER

/** This method should be called after the consumer is terminated and the
 * module is unloaded.  Note that we cannot test for a loaded condition,
 * since the _module reference here may still exist (if more than one
 * consumer is using the module).
 * Simply test whether the consumer is initialized.
 * If it was terminated properly, initialized will be false and the _module
 * ref count will be decremented.
 */
void DynamicConsumer::reset()
{
    PEG_METHOD_ENTER(TRC_LISTENER, "DynamicConsumer::reset");

    if (_initialized)
    {
        throw Exception(
                 MessageLoaderParms(
                     "DynListener.DynamicConsumer.CONSUMER_INVALID_STATE",
                     "Error: The consumer is not in the correct state to "
                         "perform the operation."));
    }

    // do not delete it, that is taken care of in ConsumerModule itself
    _module = 0;
    // ATTN: attempting to delete this causes an exception -- why??
    _consumer = 0;

    PEG_TRACE((TRC_LISTENER,Tracer::LEVEL4,
                  "Deleting %d outstanding requests for %s",
                  _eventqueue.size(),
                  (const char*)_name.getCString()));

    //delete outstanding requests
    IndicationDispatchEvent* event = 0;
    for (Uint32 i = 0; i < _eventqueue.size(); i++)
    {
        event = _eventqueue.remove_front();
        delete event;
    }

    PEG_METHOD_EXIT();
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:41,代码来源:DynamicConsumer.cpp


示例12: ClientCIMOMHandleAccessController

 ClientCIMOMHandleAccessController(Mutex& lock)
     : _lock(lock)
 {
     try
     {
         // assume default client timeout
         if (!_lock.timed_lock(PEGASUS_DEFAULT_CLIENT_TIMEOUT_MILLISECONDS))
         {
             throw CIMException(CIM_ERR_ACCESS_DENIED, MessageLoaderParms(
                 "Provider.CIMOMHandle.CIMOMHANDLE_TIMEOUT",
                 "Timeout waiting for CIMOMHandle"));
         }
     }
     catch (Exception& e)
     {
         PEG_TRACE((TRC_CIMOM_HANDLE, Tracer::LEVEL2,
             "Unexpected Exception: %s",
             (const char*)e.getMessage().getCString()));
         throw;
     }
     catch (...)
     {
         PEG_TRACE_CSTRING(TRC_CIMOM_HANDLE, Tracer::LEVEL2,
             "Unexpected exception");
         throw;
     }
 }
开发者ID:rdobson,项目名称:openpegasus,代码行数:27,代码来源:ClientCIMOMHandleRep.cpp


示例13: MessageLoaderParms

/**
    UnrecognizedConfigProperty Exception class
*/
UnrecognizedConfigProperty::UnrecognizedConfigProperty(const String& name)
    :Exception(
        MessageLoaderParms(
            "Config.ConfigExceptions.UNRECOGNIZED_CONFIG_PROPERTY",
            "Unrecognized config property: $0",
            name))
{
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:11,代码来源:ConfigExceptions.cpp


示例14: isProviderDirValid

/**
    Checks if the given directory is existing and writable
*/
Boolean isProviderDirValid(const String& dirName)
{
    String path;
    Uint32 pos=0;
    Uint32 token=0;

    // make multiple, relative paths absolute for check
    String temp = ConfigManager::getHomedPath(dirName);
    do
    {
        if (( pos = temp.find(FileSystem::getPathDelimiter())) == PEG_NOT_FOUND)
        {
            pos = temp.size();
            token = 0;
        }
        else
        {
            token = 1;
        }
        path = temp.subString(0,pos);
        if (!FileSystem::isDirectory(path))
        {
            Logger::put_l(
                Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
                MessageLoaderParms(
                    "Config.ProviderDirPropertyOwner.NOT_A_DIRECTORY",
                    "providerDir configuration value $0 is not a directory.",
                    path));
            return false;
        }
        if (!FileSystem::canRead(path))
        {
            Logger::put_l(
                Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
                MessageLoaderParms(
                    "Config.ProviderDirPropertyOwner.DIRECTORY_NOT_READABLE",
                    "providerDir configuration directory $0 is not readable.",
                    path));
            return false;
        }
        temp.remove(0,pos+token);
    }
    while ( temp.size() > 0 );
    return true;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:48,代码来源:ProviderDirPropertyOwner.cpp


示例15: _formPartialMessage

static MessageLoaderParms _formPartialMessage(Uint32 code, Uint32 line)
{
    String dftMsg = _xmlMessages[Uint32(code) - 1];
    const char* key = _xmlKeys[Uint32(code) - 1];

    dftMsg.append(": on line $0");

    return MessageLoaderParms(key, dftMsg.getCString(), line);
}
开发者ID:kaixuanlive,项目名称:openpegasus,代码行数:9,代码来源:XmlParser.cpp


示例16: Exception

CIMProvider* ProviderModule::load(const String& providerName)
{
    // dynamically load the provider library
    if (!_library.load())
    {
        throw Exception(MessageLoaderParms(
            "ProviderManager.ProviderModule.CANNOT_LOAD_LIBRARY",
            "ProviderLoadFailure ($0:$1):Cannot load library, error: $2",
            _library.getFileName(),
            providerName,
            _library.getLoadErrorMessage()));
    }

    // find library entry point
    CIMProvider * (*createProvider)(const String&) =
        (CIMProvider* (*)(const String&))
            _library.getSymbol("PegasusCreateProvider");

    if (createProvider == 0)
    {
        _library.unload();
        throw Exception(MessageLoaderParms(
            "ProviderManager.ProviderModule.ENTRY_POINT_NOT_FOUND",
            "ProviderLoadFailure ($0:$1):entry point not found.",
            _library.getFileName(),
            providerName));
    }

    // invoke the provider entry point
    CIMProvider* provider = createProvider(providerName);

    // test for the appropriate interface
    if (dynamic_cast<CIMProvider *>(provider) == 0)
    {
        _library.unload();
        throw Exception(MessageLoaderParms(
            "ProviderManager.ProviderModule.PROVIDER_IS_NOT_A",
            "ProviderLoadFailure ($0:$1):provider is not a CIMProvider.",
            _library.getFileName(),
            providerName));
    }

    return provider;
}
开发者ID:brunolauze,项目名称:pegasus,代码行数:44,代码来源:ProviderModule.cpp


示例17: PEG_METHOD_ENTER

void EmailListenerDestination::_buildMailHeader(
    const Array<String> & mailTo,
    const Array<String> & mailCc,
    const String & mailSubject,
    FILE * filePtr)
{
    PEG_METHOD_ENTER (TRC_IND_HANDLER,
                      "EmailListenerDestination::_buildMailHeader");

    String exceptionStr;

    String mailToStr = _buildMailAddrStr(mailTo);

    if (mailToStr == String::EMPTY)
    {
        PEG_METHOD_EXIT();
        throw PEGASUS_CIM_EXCEPTION_L (CIM_ERR_FAILED,
                                       MessageLoaderParms("Handler.EmailListenerDestination."
                                               "EmailListenerDestination.DO_NOT_HAVE_EMAIL_ADDRESS",
                                               "Do not have an e-mail address."));
    }

    String mailHdrStr = String::EMPTY;

    // Write the mailToStr to file
    mailHdrStr.append("To: ");
    mailHdrStr.append(mailToStr);
    _writeStrToFile(mailHdrStr, filePtr);

    String mailCcStr = _buildMailAddrStr(mailCc);

    // Write the mailCcStr to file
    mailHdrStr = String::EMPTY;

    mailHdrStr.append("Cc: ");
    mailHdrStr.append(mailCcStr);
    _writeStrToFile(mailHdrStr, filePtr);

    // build from string
    String fromStr = String::EMPTY;
    fromStr.append("From: ");
    fromStr.append(System::getEffectiveUserName());
    fromStr.append("@");
    fromStr.append(System::getFullyQualifiedHostName ());

    // Write the fromStr to file
    _writeStrToFile(fromStr, filePtr);

    // Write the mailSubject string to file
    String mailSubjectStr = String::EMPTY;
    mailSubjectStr.append("Subject: ");
    mailSubjectStr.append(mailSubject);
    _writeStrToFile(mailSubjectStr, filePtr);

    PEG_METHOD_EXIT();
}
开发者ID:ncultra,项目名称:Pegasus-2.5,代码行数:56,代码来源:EmailListenerDestination.cpp


示例18: PEG_METHOD_ENTER

Boolean IndicationHandlerService::_loadHandler(
    CIMHandleIndicationRequestMessage* request,
    CIMException& cimException)
{
    PEG_METHOD_ENTER(TRC_IND_HANDLER,
        "IndicationHandlerService::__loadHandler()");

    CIMName className = request->handlerInstance.getClassName();

    try
    {
        CIMHandler* handlerLib = _lookupHandlerForClass(className);

        if (handlerLib)
        {
            ContentLanguageList langs = 
                ((ContentLanguageListContainer)request->operationContext.
                get(ContentLanguageListContainer::NAME)).getLanguages();

            handlerLib->handleIndication(
                request->operationContext,
                request->nameSpace.getString(),
                request->indicationInstance,
                request->handlerInstance,
                request->subscriptionInstance,
                langs);
        }
        else
        {
            cimException = PEGASUS_CIM_EXCEPTION_L(CIM_ERR_FAILED,
                MessageLoaderParms("HandlerService."
                "IndicationHandlerService.FAILED_TO_LOAD",
                "Failed to load Handler"));
            PEG_METHOD_EXIT();
            return false;
        }

    }
    catch (Exception& e)
    {
        cimException =
            PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, e.getMessage());
        PEG_METHOD_EXIT();
        return false;
    }
    catch (...)
    {
        cimException =
            PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED, "Exception: Unknown");
        PEG_METHOD_EXIT();
        return false;
    }
    PEG_METHOD_EXIT();
    return true;
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:55,代码来源:IndicationHandlerService.cpp


示例19: _initialize

static inline void _initialize(MutexRep& rep)
{
    rep.handle = CreateMutex(NULL, FALSE, NULL);
    if (rep.handle == NULL)
    {
        throw Exception(MessageLoaderParms(
                            "Common.InternalException.CREATE_MUTEX_FAILED",
                            "CreateMutex failed : $0",
                            PEGASUS_SYSTEM_ERRORMSG_NLS));
    }
    rep.count = 0;
}
开发者ID:xenserver,项目名称:openpegasus,代码行数:12,代码来源:Mutex.cpp


示例20: socket

SocketHandle Socket::createSocket(int domain, int type, int protocol)
{
    SocketHandle newSocket;

    if (domain == AF_UNIX)
    {
        return socket(domain,type,protocol);
    }

    bool sendTcpipMsg = true;

    while (1)
    {
        newSocket = socket(domain,type,protocol);

        if ((newSocket != PEGASUS_INVALID_SOCKET) ||
            (getSocketError() != PEGASUS_NETWORK_TRYAGAIN))
        {
            break;
        }

#ifdef PEGASUS_OS_ZOS
        // The program should wait for transport layer to become ready.

        if (sendTcpipMsg)
        {
            Logger::put_l(
                Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
                MessageLoaderParms(
                    "Common.Socket.WAIT_FOR_TCPIP",
                    "TCP/IP temporary unavailable."));
            sendTcpipMsg = false;
        }

        System::sleep(30);
#endif
    } // wait for the transport layer become ready.

    // Is the socket in an unrecoverable error ?
    if (newSocket == PEGASUS_INVALID_SOCKET)
    {
        // return immediate
        return PEGASUS_INVALID_SOCKET;
    }
    else
    {
        // set aditional socket options
        _setTCPNoDelay(newSocket);
        _setInformIfNewTCPIP(newSocket);

        return newSocket;
    }
}
开发者ID:host1812,项目名称:scx_plugin_public,代码行数:53,代码来源:Socket.cpp



注:本文中的MessageLoaderParms函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MessageQueue_Event函数代码示例发布时间:2022-05-30
下一篇:
C++ MessageEnd函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap