本网站可以出售:只需60000元直接拥有。QQ:939804642
您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ACELIB_ERROR函数代码示例

51自学网 2021-06-01 19:32:00
  C++
这篇教程C++ ACELIB_ERROR函数代码示例写得很实用,希望能帮到您。

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

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

示例1: base_type

ACE_Strategy_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Strategy_Connector(ACE_Reactor *reactor, ACE_Creation_Strategy<SVC_HANDLER> *cre_s, ACE_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2> *conn_s, ACE_Concurrency_Strategy<SVC_HANDLER> *con_s, int flags)  : base_type (reactor),    creation_strategy_ (0),    delete_creation_strategy_ (false),    connect_strategy_ (0),    delete_connect_strategy_ (false),    concurrency_strategy_ (0),    delete_concurrency_strategy_ (false){  ACE_TRACE ("ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2>::ACE_Strategy_Connector");  if (this->open (reactor, cre_s, conn_s, con_s, flags) == -1)    ACELIB_ERROR ((LM_ERROR,  ACE_TEXT ("%p/n"),  ACE_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector")));}
开发者ID:manut,项目名称:ACE,代码行数:19,


示例2: completion_port_

ACE_WIN32_Proactor::ACE_WIN32_Proactor (size_t number_of_threads,                                        bool used_with_reactor_event_loop)  : completion_port_ (0),    // This *MUST* be 0, *NOT* ACE_INVALID_HANDLE !!!    number_of_threads_ (static_cast<DWORD> (number_of_threads)),    used_with_reactor_event_loop_ (used_with_reactor_event_loop){  // Create the completion port.  this->completion_port_ = ::CreateIoCompletionPort (INVALID_HANDLE_VALUE,                                                     0,                                                     0,                                                     this->number_of_threads_);  if (this->completion_port_ == 0)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("CreateIoCompletionPort")));  this->get_asynch_pseudo_task ().start ();}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:19,


示例3: open_mode_

ACE_DLL::ACE_DLL (const ACE_DLL &rhs)  : open_mode_ (0),    dll_name_ (0),    close_handle_on_destruction_ (false),    dll_handle_ (0),    error_ (0){  ACE_TRACE ("ACE_DLL::ACE_DLL (const ACE_DLL &)");  if (rhs.dll_name_      // This will automatically up the refcount.      && this->open (rhs.dll_name_,                     rhs.open_mode_,                     rhs.close_handle_on_destruction_) != 0      && ACE::debug ())    ACELIB_ERROR ((LM_ERROR,    ACE_TEXT ("ACE_DLL::copy_ctor: error: %s/n"),    this->error ()));}
开发者ID:binary42,项目名称:OCI,代码行数:19,


示例4: ACE_TEXT

    void    Linux_Network_Interface_Monitor::init (void)    {      for (unsigned long i = 0UL; i < MAX_INTERFACES; ++i)        {          this->value_array_[i] = 0UL;        }      /// Read the file once to get a base value that we can subtract      /// from subsequent readings to get bytes sent since we started      /// monitoring.      char buf[1024];      FILE* fp = ACE_OS::fopen (ACE_TEXT ("/proc/net/dev"),                                ACE_TEXT ("r"));      if (fp == 0)        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("bytes sent - opening ")                      ACE_TEXT ("/proc/net/dev failed/n")));          return;        }      /// Ignore the first 2 lines of the file, which are file      /// and column headers.      void* dummy = ACE_OS::fgets (buf, sizeof (buf), fp);      ACE_UNUSED_ARG (dummy);      dummy = ACE_OS::fgets (buf, sizeof (buf), fp);      ACE_UNUSED_ARG (dummy);      unsigned long iface_value = 0UL;      ACE_UINT32 iface_index = 0UL;      while (ACE_OS::fgets (buf, sizeof (buf), fp) != 0)        {          sscanf (buf, this->scan_format_.c_str (), &iface_value);          this->start_ += iface_value;          ++iface_index;        }      (void) ACE_OS::fclose (fp);    }
开发者ID:binary42,项目名称:OCI,代码行数:43,


示例5: ssl_

ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (ACE_SSL_Context *context)  : ssl_ (0),    stream_ (){  ACE_TRACE ("ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream");  ACE_SSL_Context * ctx =    (context == 0 ? ACE_SSL_Context::instance () : context);  this->ssl_ = ::SSL_new (ctx->context ());  if (this->ssl_ == 0)    {      ACELIB_ERROR ((LM_ERROR,                  "(%P|%t) ACE_SSL_SOCK_Stream "                  "- cannot allocate new SSL structure %p/n",                  ACE_TEXT ("")));    }}
开发者ID:CCJY,项目名称:ACE,代码行数:19,


示例6: ACE_Event_Handler

ACE_Process_Manager::ACE_Process_Manager (size_t size,                                          ACE_Reactor *r)  : ACE_Event_Handler (),    process_table_ (0),    max_process_table_size_ (0),    current_count_ (0),    default_exit_handler_ (0)#if defined (ACE_HAS_THREADS)  , lock_ ()#endif /* ACE_HAS_THREADS */{  ACE_TRACE ("ACE_Process_Manager::ACE_Process_Manager");  if (this->open (size, r) == -1)    {      ACELIB_ERROR ((LM_ERROR,                  ACE_TEXT ("%p/n"),                  ACE_TEXT ("ACE_Process_Manager")));    }}
开发者ID:CCJY,项目名称:ACE,代码行数:20,


示例7: ACELIB_ERROR

ACE_SOCK::ACE_SOCK (int type,                    int protocol_family,                    int protocol,                    ACE_Protocol_Info *protocolinfo,                    ACE_SOCK_GROUP g,                    u_long flags,                    int reuse_addr){  // ACE_TRACE ("ACE_SOCK::ACE_SOCK");  if (this->open (type,                  protocol_family,                  protocol,                  protocolinfo,                  g,                  flags,                  reuse_addr) == -1)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("ACE_SOCK::ACE_SOCK")));}
开发者ID:Adeer,项目名称:OregonCore,代码行数:20,


示例8: ACE_Event_Base

ACE_Event_T<TIME_POLICY>::ACE_Event_T (int manual_reset,                                       int initial_state,                                       int type,                                       const ACE_TCHAR *name,                                       void *arg,                                       LPSECURITY_ATTRIBUTES sa)  : ACE_Event_Base (){  ACE_Condition_Attributes_T<TIME_POLICY> cond_attr (type);  if (ACE_OS::event_init (&this->handle_,                          type,                          &const_cast<ACE_condattr_t&> (cond_attr.attributes ()),                          manual_reset,                          initial_state,                          name,                          arg,                          sa) != 0)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("ACE_Event_T<TIME_POLICY>::ACE_Event_T")));}
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:21,


示例9: ACE_TRACE

voidACE_Token_Proxy_Queue::dequeue (void){  ACE_TRACE ("ACE_Token_Proxy_Queue::dequeue");  if (head_ == 0)    return;  ACE_TPQ_Entry *temp = this->head_;  this->head_ = this->head_->next_;  temp->next_ = 0;  --this->size_;  if (this->head_ == 0 && this->size_ != 0)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("incorrect size = %d/n"),                this->size_));}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:21,


示例10: shmem_

ACE_BEGIN_VERSIONED_NAMESPACE_DECLACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname)  : shmem_ (0)  , delta_time_ (0){  ACE_TRACE ("ACE_System_Time::ACE_System_Time");  // Only create a new unique filename for the memory pool file  // if the user didn't supply one...  if (poolname == 0)    {#if defined (ACE_DEFAULT_BACKING_STORE)      // Create a temporary file.      ACE_OS::strcpy (this->poolname_,                      ACE_DEFAULT_BACKING_STORE);#else /* ACE_DEFAULT_BACKING_STORE */      if (ACE::get_temp_dir (this->poolname_,                                      MAXPATHLEN - 17) == -1)        // -17 for ace-malloc-XXXXXX        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("Temporary path too long, ")                      ACE_TEXT ("defaulting to current directory/n")));          this->poolname_[0] = 0;        }      // Add the filename to the end      ACE_OS::strcat (this->poolname_, ACE_TEXT ("ace-malloc-XXXXXX"));#endif /* ACE_DEFAULT_BACKING_STORE */    }  else    ACE_OS::strsncpy (this->poolname_,                      poolname,                      (sizeof this->poolname_ / sizeof (ACE_TCHAR)));  ACE_NEW (this->shmem_,           ALLOCATOR (this->poolname_));}
开发者ID:Adeer,项目名称:OregonCore,代码行数:40,


示例11: switch

ACE_Service_Type_Impl *ACE_Service_Config::create_service_type_impl (const ACE_TCHAR *name,                                              int type,                                              void *symbol,                                              u_int flags,                                              ACE_Service_Object_Exterminator gobbler){  ACE_Service_Type_Impl *stp = 0;  // Note, the only place we need to put a case statement.  This is  // also the place where we'd put the RTTI tests, if the compiler  // actually supported them!  switch (type)    {    case ACE_Service_Type::SERVICE_OBJECT:      ACE_NEW_RETURN (stp,                      ACE_Service_Object_Type ((ACE_Service_Object *) symbol,                                               name, flags,                                               gobbler),                      0);      break;    case ACE_Service_Type::MODULE:      ACE_NEW_RETURN (stp,                      ACE_Module_Type (symbol, name, flags),                      0);      break;    case ACE_Service_Type::STREAM:      ACE_NEW_RETURN (stp,                      ACE_Stream_Type (symbol, name, flags),                      0);      break;    default:      ACELIB_ERROR ((LM_ERROR,                  ACE_TEXT ("unknown case/n")));      break;    }  return stp;}
开发者ID:CCJY,项目名称:ACE,代码行数:40,


示例12: ACE_TEXT

    void    CPU_Load_Monitor::access_proc_stat (unsigned long *which_idle)    {      this->file_ptr_ = ACE_OS::fopen (ACE_TEXT ("/proc/stat"),                                       ACE_TEXT ("r"));      if (this->file_ptr_ == 0)        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("CPU load - opening /proc/stat failed/n")));          return;        }      char *item = 0;      char *arg = 0;      while ((ACE_OS::fgets (buf_, sizeof (buf_), file_ptr_)) != 0)        {          item = ACE_OS::strtok (this->buf_, " /t/n");          arg = ACE_OS::strtok (0, "/n");          if (item == 0 || arg == 0)            {              continue;            }          if (ACE_OS::strcmp (item, "cpu") == 0)            {              sscanf (arg,                      "%lu %lu %lu %lu",                      &this->user_,                      &this->wait_,                      &this->kernel_,                      which_idle);              break;            }        }      ACE_OS::fclose (this->file_ptr_);    }
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:40,


示例13: ACE_TRACE

// Trigger reconfiguration to re-read configuration files.voidACE_Service_Config::reconfigure (void){  ACE_TRACE ("ACE_Service_Config::reconfigure");  ACE_Service_Config::reconfig_occurred_ = 0;  if (ACE::debug ())    {#if !defined (ACE_NLOGGING)      time_t t = ACE_OS::time (0);#endif /* ! ACE_NLOGGING */      if (ACE::debug ())        ACELIB_DEBUG ((LM_DEBUG,                    ACE_TEXT ("beginning reconfiguration at %s"),                    ACE_OS::ctime (&t)));    }  if (ACE_Service_Config::process_directives () == -1)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("process_directives")));}
开发者ID:CCJY,项目名称:ACE,代码行数:23,


示例14: ACE_TRACE

ACE_SOCK_Acceptor::ACE_SOCK_Acceptor (const ACE_Addr &local_sap,                                      ACE_Protocol_Info *protocolinfo,                                      ACE_SOCK_GROUP g,                                      u_long flags,                                      int reuse_addr,                                      int protocol_family,                                      int backlog,                                      int protocol){  ACE_TRACE ("ACE_SOCK_Acceptor::ACE_SOCK_Acceptor");  if (this->open (local_sap,                  protocolinfo,                  g,                  flags,                  reuse_addr,                  protocol_family,                  backlog,                  protocol) == -1)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("ACE_SOCK_Acceptor")));}
开发者ID:CCJY,项目名称:ACE,代码行数:22,


示例15: ACELIB_ERROR

intACE_Proactor::close (void){  // Close the implementation.  if (this->implementation ()->close () == -1)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%N:%l:(%P | %t):%p/n"),                ACE_TEXT ("ACE_Proactor::close: implementation close")));  // Delete the implementation.  if (this->delete_implementation_)    {      delete this->implementation ();      this->implementation_ = 0;    }  // Delete the timer handler.  if (this->timer_handler_)    {      delete this->timer_handler_;      this->timer_handler_ = 0;    }  // Delete the timer queue.  if (this->delete_timer_queue_)    {      delete this->timer_queue_;      this->timer_queue_ = 0;      this->delete_timer_queue_ = 0;    }  else if (this->timer_queue_)    {      this->timer_queue_->close ();      this->timer_queue_ = 0;    }  return 0;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:38,


示例16: ACE_TRACE

void *ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors, ACE_TString &error){  ACE_TRACE ("ACE_DLL_Handle::symbol");  ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0));  ACE_Auto_Array_Ptr <ACE_TCHAR> auto_name (ACE::ldname (sym_name));  // handle_ can be invalid especially when ACE_DLL_Handle resigned ownership  // BTW. Handle lifecycle management is a little crazy in ACE  if (this->handle_ != ACE_SHLIB_INVALID_HANDLE)    {#if defined (ACE_OPENVMS)      void *sym =  ACE::ldsymbol (this->handle_, auto_name.get ());#else      void *sym =  ACE_OS::dlsym (this->handle_, auto_name.get ());#endif      // Linux says that the symbol could be null and that it isn't an      // error.  So you should check the error message also, but since      // null symbols won't do us much good anyway, let's still report      // an error.      if (!sym && !ignore_errors)        {          this->error (error);          if (ACE::debug ())            ACELIB_ERROR ((LM_ERROR,                        ACE_TEXT ("ACE (%P|%t) DLL_Handle::symbol (/"%s/") ")                        ACE_TEXT (" failed with /"%s/"./n"),                        auto_name.get (),                        error.c_str ()));          return 0;        }      return sym;    }  return 0;}
开发者ID:INMarkus,项目名称:ATCD,代码行数:38,


示例17: creation_strategy_

ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor  (const ACE_PEER_ACCEPTOR_ADDR &addr,   ACE_Reactor *reactor,   ACE_Creation_Strategy<SVC_HANDLER> *cre_s,   ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> *acc_s,   ACE_Concurrency_Strategy<SVC_HANDLER> *con_s,   ACE_Scheduling_Strategy<SVC_HANDLER> *sch_s,   const ACE_TCHAR service_name[],   const ACE_TCHAR service_description[],   int use_select,   int reuse_addr)    : creation_strategy_ (0),      delete_creation_strategy_ (false),      accept_strategy_ (0),      delete_accept_strategy_ (false),      concurrency_strategy_ (0),      delete_concurrency_strategy_ (false),      scheduling_strategy_ (0),      delete_scheduling_strategy_ (false),      service_name_ (0),      service_description_ (0){  ACE_TRACE ("ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::ACE_Strategy_Acceptor");  if (this->open (addr,                  reactor,                  cre_s,                  acc_s,                  con_s,                  sch_s,                  service_name,                  service_description,                  use_select,                  reuse_addr) == -1)    ACELIB_ERROR ((LM_ERROR,                ACE_TEXT ("%p/n"),                ACE_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor")));}
开发者ID:manut,项目名称:ACE,代码行数:38,


示例18: ext_handler_

// ************************************************************//  ACE_SSL_Asynch_Stream Constructor / Destructor// ************************************************************ACE_SSL_Asynch_Stream::ACE_SSL_Asynch_Stream (  ACE_SSL_Asynch_Stream::Stream_Type s_type,  ACE_SSL_Context * context)  : type_         (s_type),    proactor_     (0),    ext_handler_  (0),    ext_read_result_ (0),    ext_write_result_(0),    flags_        (0),    ssl_          (0),    handshake_complete_(false),    bio_          (0),    bio_istream_  (),    bio_inp_msg_  (),    bio_inp_errno_(0),    bio_inp_flag_ (0),    bio_ostream_  (),    bio_out_msg_  (),    bio_out_errno_(0),    bio_out_flag_ (0),    mutex_ (){  ACE_TRACE ("ACE_SSL_Asynch_Stream::ACE_SSL_Asynch_Stream");  // was honestly copied from ACE_SSL_SOCK_Stream :)  ACE_SSL_Context * ctx =    (context == 0 ? ACE_SSL_Context::instance () : context);  this->ssl_ = ::SSL_new (ctx->context ());  if (this->ssl_ == 0)    ACELIB_ERROR      ((LM_ERROR,        ACE_TEXT ("(%P|%t) ACE_SSL_Asynch_Stream %p/n"),        ACE_TEXT ("- cannot allocate new SSL structure")     ));}
开发者ID:binary42,项目名称:OCI,代码行数:41,


示例19: defined

intACE_FILE_Addr::set (const ACE_FILE_Addr &sa){  if (sa.get_type () == AF_ANY)    {#if defined (ACE_DEFAULT_TEMP_FILE)      // Create a temporary file.      ACE_OS::strcpy (this->filename_,                      ACE_DEFAULT_TEMP_FILE);#else /* ACE_DEFAULT_TEMP_FILE */      if (ACE::get_temp_dir (this->filename_, MAXPATHLEN - 15) == -1)        // -15 for ace-file-XXXXXX        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("Temporary path too long, ")                      ACE_TEXT ("defaulting to current directory/n")));          this->filename_[0] = 0;        }      // Add the filename to the end      ACE_OS::strcat (this->filename_, ACE_TEXT ("ace-fileXXXXXX"));#endif /* ACE_DEFAULT_TEMP_FILE */      if (ACE_OS::mktemp (this->filename_) == 0)        return -1;      this->base_set (AF_FILE,                      static_cast<int> (ACE_OS::strlen (this->filename_) + 1));    }  else    {      (void)ACE_OS::strsncpy (this->filename_, sa.filename_, sa.get_size ());      this->base_set (sa.get_type (), sa.get_size ());    }  return 0;}
开发者ID:AtVirus,项目名称:SkyFireEMU,代码行数:37,


示例20: thread_priority_mask_

My_ACE_Logging_Strategy::My_ACE_Logging_Strategy (void)    : thread_priority_mask_ (0),      process_priority_mask_ (0),      flags_ (0),      filename_ (0),      logger_key_ (0),      program_name_ (0),      wipeout_logfile_ (false),      fixed_number_ (false),      order_files_ (false),      count_ (0),      max_file_number_ (1), // 2 files by default (max file number + 1)      interval_ (ACE_DEFAULT_LOGFILE_POLL_INTERVAL),      max_size_ (0),      log_msg_ (ACE_Log_Msg::instance ()){#if defined (ACE_DEFAULT_LOGFILE)    this->filename_ = ACE::strnew (ACE_DEFAULT_LOGFILE);#else /* ACE_DEFAULT_LOGFILE */    ACE_NEW (this->filename_,             ACE_TCHAR[MAXPATHLEN + 1]);    // Get the temporary directory    if (ACE::get_temp_dir        (this->filename_,         MAXPATHLEN - 7) == -1) // 7 for "logfile"    {        ACELIB_ERROR ((LM_ERROR,                       ACE_TEXT ("Temporary path too long, ")                       ACE_TEXT ("defaulting to current directory/n")));        this->filename_[0] = 0;    }    // Add the filename to the end    ACE_OS::snprintf(this->filename_, MAXPATHLEN, "%s%s", this->filename_, ACE_TEXT("logfile"));#endif /* ACE_DEFAULT_LOGFILE */}
开发者ID:freeeyes,项目名称:PSS,代码行数:37,


示例21: ACE_TRACE

intACE_Remote_Token_Proxy::release (ACE_Synch_Options &options){    ACE_TRACE ("ACE_Remote_Token_Proxy::release");    ACE_Token_Request request (token_->type (),                               this->type (),                               ACE_Token_Request::RELEASE,                               this->name (),                               this->client_id (),                               options);    int result = this->request_reply (request, options);    if (result == 0)        ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) released %s remotely./n"), this->name ()));    // whether success or failure, we're going to release the shadow.    // If race conditions exist such that we are no longer the owner,    // this release will perform a remove.    if (ACE_Token_Proxy::release () == -1)        ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("(%t) shadow: release failed/n")));    return result;}
开发者ID:binary42,项目名称:OCI,代码行数:24,


示例22: ACELIB_ERROR

    Monitor_Control_Types::NameList    Monitor_Base::get_list (void) const    {      Monitor_Control_Types::NameList retval;      if (this->data_.type_ != Monitor_Control_Types::MC_LIST)        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("get_list: %s is not a ")                      ACE_TEXT ("list monitor type/n"),                      this->name_.c_str ()));          return retval;        }      ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->mutex_, retval);      for (size_t i = 0UL; i < this->data_.index_; ++i)        {          retval.push_back (this->data_.list_[i]);        }      return retval;    }
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:24,


示例23: ACE_TRACE

intACE_SOCK_Dgram_Bcast::mk_broadcast (const ACE_TCHAR *host_name){  ACE_TRACE ("ACE_SOCK_Dgram_Bcast::mk_broadcast");  int one = 1;  if (ACE_OS::setsockopt (this->get_handle (),                          SOL_SOCKET,                          SO_BROADCAST,                          (char *) &one,                          sizeof one) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT("%p/n"),                      ACE_TEXT("ACE_SOCK_Dgram_Bcast::mk_broadcast: setsockopt failed")),                      -1);#if !defined (ACE_WIN32) && !defined(__INTERIX)  ACE_HANDLE s = this->get_handle ();  char buf[BUFSIZ];  struct ifconf ifc;  ifc.ifc_len = sizeof buf;  ifc.ifc_buf = buf;  // Get interface structure and initialize the addresses using UNIX  // techniques.  if (ACE_OS::ioctl (s,                     SIOCGIFCONF,                     (char *) &ifc) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT("%p/n"),                      ACE_TEXT("ACE_SOCK_Dgram_Bcast::mk_broadcast: ioctl (get interface configuration)")),                      ACE_INVALID_HANDLE);  struct ifreq *ifr = ifc.ifc_req;  struct sockaddr_in host_addr;  // Get host ip address  if (host_name)    {      hostent *hp = ACE_OS::gethostbyname (ACE_TEXT_ALWAYS_CHAR (host_name));      if (hp == 0)        return -1;      else        ACE_OS::memcpy ((char *) &host_addr.sin_addr.s_addr,# ifdef ACE_HOSTENT_H_ADDR                        (char *) hp->ACE_HOSTENT_H_ADDR,# else                        (char *) hp->h_addr,# endif                        hp->h_length);    }#if !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__)  for (int n = ifc.ifc_len / sizeof (struct ifreq) ; n > 0;       n--, ifr++)#else  /*     There are addresses longer than sizeof (struct sockaddr) eg. IPv6     or QNX::links. In this case address does not fit into struct ifreq.     The code below could be applied everywhere, but not every system         provides sockaddr.sa_len field.   */  for (int nbytes = ifc.ifc_len; nbytes >= (int) sizeof (struct ifreq) &&        ((ifr->ifr_addr.sa_len > sizeof (struct sockaddr)) ?          (nbytes >= (int) sizeof (ifr->ifr_name) + ifr->ifr_addr.sa_len) : 1);        ((ifr->ifr_addr.sa_len > sizeof (struct sockaddr)) ?          (nbytes -= sizeof (ifr->ifr_name) + ifr->ifr_addr.sa_len,            ifr = (struct ifreq *)              ((caddr_t) &ifr->ifr_addr + ifr->ifr_addr.sa_len)) :          (nbytes -= sizeof (struct ifreq), ifr++)))#endif /* !defined(AIX) && !defined (__QNX__) && !defined (__FreeBSD__) && !defined(__NetBSD__) && !defined (ACE_VXWORKS) && !defined(__APPLE__) */    {#if defined (__QNX__) || defined (ACE_VXWORKS)      // Silently skip link interfaces      if (ifr->ifr_addr.sa_family == AF_LINK)        continue;#endif /* __QNX__ || ACE_VXWORKS */      // Compare host ip address with interface ip address.      if (host_name)        {          struct sockaddr_in if_addr;          ACE_OS::memcpy (&if_addr,                          &ifr->ifr_addr,                          sizeof if_addr);          if (host_addr.sin_addr.s_addr != if_addr.sin_addr.s_addr)            continue;        }      if (ifr->ifr_addr.sa_family != AF_INET)        {          // Note that some systems seem to generate 0 (AF_UNDEF) for          // the sa_family, even when there are no errors!  Thus, we          // only print an error if this is not the case, or if we're          // in "debugging" mode.//.........这里部分代码省略.........
开发者ID:binary42,项目名称:OCI,代码行数:101,


示例24: ACE_TRACE

void *ACE_Static_Function_Node::symbol (ACE_Service_Gestalt *config,                                  int &yyerrno,                                  ACE_Service_Object_Exterminator *gobbler){  ACE_TRACE ("ACE_Static_Function_Node::symbol");  this->symbol_ = 0;  // Locate the factory function <function_name> in the statically  // linked svcs.  ACE_Static_Svc_Descriptor *ssd = 0;  if (config->find_static_svc_descriptor (this->function_name_, &ssd) == -1)    {      ++yyerrno;      if (ACE::debug ())        {          ACELIB_ERROR ((LM_ERROR,                     ACE_TEXT ("(%P|%t) No static service ")                     ACE_TEXT ("registered for function %s/n"),                     this->function_name_));        }      return 0;    }  if (ssd->alloc_ == 0)    {      ++yyerrno;      if (this->symbol_ == 0)        {          ++yyerrno;          if (ACE::debug ())            {              ACELIB_ERROR ((LM_ERROR,                          ACE_TEXT ("(%P|%t) No static service factory ")                          ACE_TEXT ("function registered for function %s/n"),                          this->function_name_));            }          return 0;        }    }  // Invoke the factory function and record it's return value.  this->symbol_ = (*ssd->alloc_) (gobbler);  if (this->symbol_ == 0)    {      ++yyerrno;      if (ACE::debug ())        {          ACELIB_ERROR ((LM_ERROR,                      ACE_TEXT ("%p/n"),                      this->function_name_));        }      return 0;    }  return this->symbol_;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:62,


示例25: ACE_TRACE

intACE_Shared_Memory_Pool::handle_signal (int , siginfo_t *siginfo, ucontext_t *){  ACE_TRACE ("ACE_Shared_Memory_Pool::handle_signal");  // ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("signal %S occurred/n"), signum));  // While FreeBSD 5.X has a siginfo_t struct with a si_addr field,  // it does not define SEGV_MAPERR.#if defined (ACE_HAS_SIGINFO_T) && !defined (ACE_LACKS_SI_ADDR) && /        (defined (SEGV_MAPERR) || defined (SEGV_MEMERR))  ACE_OFF_T offset;  // Make sure that the pointer causing the problem is within the  // range of the backing store.  if (siginfo != 0)    {      // ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%P|%t) si_signo = %d, si_code = %d, addr = %u/n"), siginfo->si_signo, siginfo->si_code, siginfo->si_addr));      size_t counter;      if (this->in_use (offset, counter) == -1)        ACELIB_ERROR ((LM_ERROR,                    ACE_TEXT ("(%P|%t) %p/n"),                    ACE_TEXT ("in_use")));      else if (!(siginfo->si_code == SEGV_MAPERR           && siginfo->si_addr < (((char *) this->base_addr_) + offset)           && siginfo->si_addr >= ((char *) this->base_addr_)))        ACELIB_ERROR_RETURN ((LM_ERROR,                           "(%P|%t) address %u out of range/n",                           siginfo->si_addr),                          -1);    }  // The above if case will check to see that the address is in the  // proper range.  Therefore there is a segment out there that the  // pointer wants to point into.  Find the segment that someone else  // has used and attach to it ([email
C++ ACELIB_ERROR_RETURN函数代码示例
C++ ACELIB_DEBUG函数代码示例
51自学网自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1