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

C++ ORBSVCS_ERROR_RETURN函数代码示例

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

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



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

示例1: ORBSVCS_ERROR_RETURN

/**
 * The naming service shall provide a command line utility to remove a specified
 * object group from the naming service.
 * Removes the specified object group from the naming service.
 */
int
NS_group_svc::group_remove (const ACE_TCHAR* group_name)
{
  if (group_name == 0)
  {
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("group_remove args not provided\n")),
                       -2);
  }

  try
  {
    this->naming_manager_->delete_object_group (
      ACE_TEXT_ALWAYS_CHAR (group_name));
  }
  catch (const PortableGroup::ObjectGroupNotFound&)
  {
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("\nUnable to find group %s\n"),
                       group_name),
                       -1);
  }
  catch (const CORBA::Exception&)
  {
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("\nUnable to remove group %s\n"),
                       group_name),
                      -1);
  }

  return 0;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:37,代码来源:nsgroup_svc.cpp


示例2: ORBSVCS_ERROR_RETURN

int
TAO_ECG_UDP_EH::open (const ACE_INET_Addr& ipaddr,
                      int reuse_addr)
{
  // Check that we haven't been closed already.
  if (!this->receiver_)
    return -1;

  if (this->dgram_.open (ipaddr, PF_INET, 0, reuse_addr) == -1)
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       "Unable to open udp handler: "
                       "error opening receiving dgram.\n"),
                       -1);

  if (!this->reactor ()
      || 0 != this->reactor ()->register_handler (this->dgram_.get_handle (),
                                                  this,
                                                  ACE_Event_Handler::READ_MASK))
    {
      this->dgram_.close ();
      ORBSVCS_ERROR_RETURN ((LM_ERROR,
                         "Cannot register handler with reactor.\n"),
                        -1);
    }

  return 0;
}
开发者ID:binary42,项目名称:OCI,代码行数:27,代码来源:ECG_UDP_EH.cpp


示例3: while

int
TAO::SSLIOP::Acceptor::parse_options_i (int &argc, ACE_CString ** argv)
{
  //first, do the base class parser, then parse the leftovers.
  int result = this->IIOP_SSL_Acceptor::parse_options_i(argc,argv);
  if (result == -1)
    return result;

  // then parse out our own options.
  int i = 0;
  while (i < argc)
    {
      // since the base class has already iterated over the list once,
      // it has vound any ill-formed options. Therefore we don't need
      // to do that again here.
      int slot = argv[i]->find ("=");
      ACE_CString name = argv[i]->substring (0, slot);
      ACE_CString value = argv[i]->substring (slot + 1);

      if (name == "priority")
        {
          ORBSVCS_ERROR_RETURN ((LM_ERROR,
                             ACE_TEXT ("TAO (%P|%t) Invalid SSLIOP endpoint format: ")
                             ACE_TEXT ("endpoint priorities no longer supported.\n"),
                             value.c_str ()),
                            -1);
        }
      else if (ACE_OS::strcmp (name.c_str (), "ssl_port") == 0)
        {
          int ssl_port = ACE_OS::atoi (value.c_str ());

          if (ssl_port >= 0 && ssl_port < 65536)
            this->ssl_component_.port = ssl_port;
          else
            ORBSVCS_ERROR_RETURN ((LM_ERROR,
                               ACE_TEXT ("TAO (%P|%t) Invalid ")
                               ACE_TEXT ("IIOP/SSL endpoint ")
                               ACE_TEXT ("port: <%s>\n"),
                               value.c_str ()),
                              -1);
        }
      else
        {
          // the name is not known, skip to the next option
          i++;
          continue;
        }
      // at the end, we've consumed this argument. Shift the list and
      // put this one on the end. This technique has the effect of
      // putting them in reverse order, but that doesn't matter, since
      // these arguments are only whole strings.
      argc--;
      ACE_CString *temp = argv[i];
      for (int j = i; j <= argc-1; j++)
        argv[j] = argv[j+1];
      argv[argc] = temp;

    }
  return 0;
}
开发者ID:CCJY,项目名称:ATCD,代码行数:60,代码来源:SSLIOP_Acceptor.cpp


示例4: ACE_TEXT

int
TAO_Naming_Server::write_ior_to_file (const char* ior_string,
                                      const char* file_name)
{
  if ((file_name != 0) &&
      (ior_string != 0))
    {
      FILE *iorf = ACE_OS::fopen (file_name, ACE_TEXT("w"));
      if (iorf == 0)
        {
          ORBSVCS_ERROR_RETURN ((LM_ERROR,
                             ACE_TEXT("Unable to open %s for writing:(%u) %p\n"),
                             file_name,
                             ACE_ERRNO_GET,
                             ACE_TEXT("Naming_Server::write_ior_to_file")),
                            -1);
        }

      ACE_OS::fprintf (iorf, "%s\n", ior_string);
      ACE_OS::fclose (iorf);
    }
  else
    {
      ORBSVCS_ERROR_RETURN ((LM_ERROR,
                         ACE_TEXT ("Invalid file name or IOR string provided")
                         ACE_TEXT ("to TAO_Naming_Server::write_ior_to_file\n")),
                        -1);

    }

  return 0;
}
开发者ID:CCJY,项目名称:ATCD,代码行数:32,代码来源:Naming_Server.cpp


示例5: ACE_NEW_RETURN

int
TAO_AV_UDP_QoS_Session_Helper::activate_qos_handler (ACE_QoS_Session *qos_session,
        TAO_AV_UDP_QoS_Flow_Handler *handler)
{
    ACE_QoS_Decorator* qos_decorator;

    // Decorate the above handler with QoS functionality.
    ACE_NEW_RETURN (qos_decorator,
                    ACE_QoS_Decorator (handler,
                                       qos_session,
                                       handler->av_core ()->reactor ()),
                    -1);

    // Initialize the Decorator.
    if (qos_decorator->init () != 0)
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                               "QoS Decorator init () failed (%N|%l)\n"),
                              -1);

    // Register the decorated Event Handler with the Reactor.
    int result = handler->av_core ()->reactor ()->register_handler (qos_decorator,
                 ACE_Event_Handler::QOS_MASK |
                 ACE_Event_Handler::READ_MASK);
    if (result == -1)
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                               "Error in registering the Decorator with the Reactor (%N|%l)\n"),
                              -1);

    return 0;

}
开发者ID:binary42,项目名称:OCI,代码行数:31,代码来源:QoS_UDP.cpp


示例6: factory_addr

int
FT_EventService::report_factory(CORBA::ORB_ptr orb,
                   FtRtecEventChannelAdmin::EventChannel_ptr ec)
{
  try{
    char* addr = ACE_OS::getenv("EventChannelFactoryAddr");

    if (addr != 0) {
      // instaniated by object factory, report my ior back to the factory
      ACE_INET_Addr factory_addr(addr);
      ACE_SOCK_Connector connector;
      ACE_SOCK_Stream stream;

      ORBSVCS_DEBUG((LM_DEBUG,"connecting to %s\n",addr));
      if (connector.connect(stream, factory_addr) == -1)
        ORBSVCS_ERROR_RETURN((LM_ERROR, "(%P|%t) Invalid Factory Address\n"), -1);

      ORBSVCS_DEBUG((LM_DEBUG,"Factory connected\n"));
      CORBA::String_var my_ior_string = orb->object_to_string(ec);

      int len = ACE_OS::strlen(my_ior_string.in()) ;

      if (stream.send_n(my_ior_string.in(), len) != len)
        ORBSVCS_ERROR_RETURN((LM_ERROR, "(%P|%t) IOR Transmission Error\n"), -1);

      stream.close();
    }
  }
  catch (...){
    return -1;
  }
  return 0;
}
开发者ID:CCJY,项目名称:ATCD,代码行数:33,代码来源:FT_EventService.cpp


示例7: ORBSVCS_ERROR_RETURN

int
TAO_Notify_Service_Driver::resolve_naming_service (void)
{
  try
    {
      CORBA::Object_var naming_obj =
        this->orb_->resolve_initial_references ("NameService");

      // Need to check return value for errors.
      if (CORBA::is_nil (naming_obj.in ()))
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                           " (%P|%t) Unable to resolve the Naming Service.\n"),
                          -1);

      this->naming_ = CosNaming::NamingContextExt::_narrow (naming_obj.in ());
    }
  catch (const CORBA::Exception &)
    {
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                           " (%P|%t) Unable to resolve the Naming Service.\n"),
                          -1);
    }
  catch (...)
    {
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                           " (%P|%t) Unable to resolve the Naming Service.\n"),
                          -1);
    }
  return 0;
}
开发者ID:esohns,项目名称:ATCD,代码行数:30,代码来源:Notify_Service.cpp


示例8: ACE_TMAIN

int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
    Notify_Logging_Service service;

    Logging_Svc_Shutdown killer (service);
    Service_Shutdown kill_contractor (killer);

    try
    {
        int rc;

        rc = service.init (argc, argv);
        if (rc == -1)
            ORBSVCS_ERROR_RETURN ((LM_ERROR,
                                   "Failed to initialize the Telecom Log Service.\n"),
                                  1);

        rc = service.run ();
        if (rc == -1)
            ORBSVCS_ERROR_RETURN ((LM_ERROR,
                                   "Failed to start the Telecom Log Service.\n"),
                                  1);
    }
    catch (const CORBA::Exception& ex)
    {
        ex._tao_print_exception ("Failed to start the Telecom Log Service.\n");
        return 1;
    }

    return 0;
}
开发者ID:akostrikov,项目名称:ATCD,代码行数:32,代码来源:Notify_Logging_Server.cpp


示例9: defined

int
TAO_AV_TCP_Flow_Handler::open (void * /*arg*/)
{

#if defined (TCP_NODELAY)
  int nodelay = 1;

  if (this->peer ().set_option (IPPROTO_TCP,
                                TCP_NODELAY,
                                (void *) &nodelay,
                                sizeof (nodelay)) == -1)
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       "NODELAY failed\n"),
                      -1);
#endif /* TCP_NODELAY */

  int buf_size = BUFSIZ;
  int s = sizeof (buf_size);
  if (this->peer ().get_option (SOL_SOCKET, /*IPPROTO_TCP,*/
                                SO_RCVBUF,
                                (void *) &buf_size, &s) == -1)
       buf_size = BUFSIZ;

    ((TAO_AV_TCP_Object*)(this->protocol_object_))->frame_.size (buf_size);

  // Called by the <Strategy_Acceptor> when the handler is completely
  // connected.
  ACE_INET_Addr addr;

  if (this->peer ().get_remote_addr (addr) == -1)
    return -1;

  ACE_TCHAR server[MAXHOSTNAMELEN + 16];

  (void) addr.addr_to_string (server, sizeof (server));

  if (TAO_debug_level > 0)
    if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG,
                "(%P|%t) connection to server <%s> on %d\n",
                server, this->peer ().get_handle ()));

  this->peer ().enable (ACE_NONBLOCK);
  // Register the handler with the reactor.
  if (this->reactor ()
      && this->reactor ()->register_handler
      (this,
       ACE_Event_Handler::READ_MASK) == -1)
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("%p\n"),
                       ACE_TEXT ("unable to register client handler")),
                      -1);
  return 0;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:53,代码来源:TCP.cpp


示例10: ORBSVCS_ERROR_RETURN

int
ifr_removing_visitor::visit_root (AST_Root *node)
{
  try
    {
      CORBA::Container_var new_scope =
        CORBA::Container::_narrow (be_global->repository ());

      if (be_global->ifr_scopes ().push (new_scope.in ()) != 0)
        {
          ORBSVCS_ERROR_RETURN ((
              LM_ERROR,
              ACE_TEXT ("(%N:%l) ifr_removing_visitor::visit_root -")
              ACE_TEXT (" scope push failed\n")
            ),
            -1
          );
        }

      if (this->visit_scope (node) == -1)
        {
          ORBSVCS_ERROR_RETURN ((
              LM_ERROR,
              ACE_TEXT ("(%N:%l) ifr_removing_visitor::visit_root -")
              ACE_TEXT (" visit_scope failed\n")
            ),
            -1
          );
        }

      CORBA::Container_ptr tmp = CORBA::Container::_nil ();

      if (be_global->ifr_scopes ().pop (tmp) != 0)
        {
          ORBSVCS_ERROR_RETURN ((
              LM_ERROR,
              ACE_TEXT ("(%N:%l) ifr_removing_visitor::visit_root -")
              ACE_TEXT (" scope pop failed\n")
            ),
            -1
          );
        }
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (ACE_TEXT ("visit_root"));

      return -1;
    }

  return 0;
}
开发者ID:CCJY,项目名称:ATCD,代码行数:52,代码来源:ifr_removing_visitor.cpp


示例11: ORBSVCS_ERROR_RETURN

int
TAO_AV_SCTP_SEQ_Object::handle_input (void)
{
    int n = this->transport_->recv (this->frame_.rd_ptr (),
                                    this->frame_.size ());
    if (n == -1)
        ORBSVCS_ERROR_RETURN ((LM_ERROR,"TAO_AV_SCTP_SEQ_Flow_Handler::handle_input recv failed\n"),-1);
    if (n == 0)
        ORBSVCS_ERROR_RETURN ((LM_ERROR,"TAO_AV_SCTP_SEQ_Flow_Handler::handle_input connection closed\n"),-1);
    this->frame_.wr_ptr (this->frame_.rd_ptr () + n);

    return this->callback_->receive_frame (&this->frame_);
}
开发者ID:binary42,项目名称:OCI,代码行数:13,代码来源:SCTP_SEQ.cpp


示例12: ORBSVCS_DEBUG

int
TAO_AV_RTP_Object::handle_input (void)
{
  TAO_AV_frame_info frame_info;

  if (TAO_debug_level > 1)
    ORBSVCS_DEBUG ((LM_DEBUG,
                "\nTAO_AV_RTP_Object::handle_input\n"));

  // Handles the incoming RTP packet input.
  this->frame_.rd_ptr (this->frame_.base ());

  int n = this->transport_->recv (this->frame_.rd_ptr (),
                                  this->frame_.size ());
  if (n == 0)
    ORBSVCS_ERROR_RETURN ( (LM_ERROR,"TAO_AV_RTP::handle_input:connection closed\n"),-1);
  if (n < 0)
    {
      if ((errno == EADDRNOTAVAIL) || (errno == ECONNRESET))
        {
          this->connection_gone_ = 1;
          return -1;
        }
      else
        ORBSVCS_ERROR_RETURN ( (LM_ERROR,"TAO_AV_RTP::handle_input:recv error\n"),-1);
    }

  this->frame_.wr_ptr (this->frame_.rd_ptr () + n);
  ACE_Addr *addr = this->transport_->get_peer_addr ();

  if(this->control_object_)
    this->control_object_->handle_control_input (&this->frame_, *addr);

  // Get payload that has been converted to host byte order
  char *data_ptr;
  ACE_UINT16 length;
  RTP_Packet rtp_packet(this->frame_.rd_ptr (),
                        static_cast<int> (this->frame_.length ()));

  rtp_packet.get_frame_info (&frame_info);
  rtp_packet.get_payload(&data_ptr, length);

  this->frame_.rd_ptr (this->frame_.base ());
  ACE_OS::memcpy (this->frame_.rd_ptr (), data_ptr, length);
  this->frame_.wr_ptr (this->frame_.rd_ptr() + length);

  this->callback_->receive_frame (&this->frame_, &frame_info, *addr);

  return 0;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:50,代码来源:RTP.cpp


示例13: catch

int
TAO_LB_Signal_Handler::perform_cleanup (int signum)
{
  try
    {
      // Shutdown the POA.
      //
      // Shutting down the POA will cause servants "owned" by the POA
      // to be destroyed.  Servants will then have the opportunity to
      // clean up all resources they are responsible for.
      this->poa_->destroy (1, 1);

      // Now shutdown the ORB.
      this->orb_->shutdown (1);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("Caught exception");

      ORBSVCS_ERROR_RETURN ((LM_ERROR,
                         "Problem during cleanup initiated by signal %d.\n",
                         signum),
                        -1);
    }

  return 0;
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:27,代码来源:Signal_Handler.cpp


示例14: ACE_TMAIN

int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
  TAO_Naming_Service naming_service;

  // Stuff to insure that we're gracefully shut down...
  Naming_Svc_Shutdown killer (naming_service);
  Service_Shutdown kill_contractor(killer);

  if (naming_service.init (argc, argv) == -1)
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT("Failed to start the Naming Service.\n")),
                      1);

  try
    {
      naming_service.run ();
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("NamingService");
      return 1;
    }

  naming_service.fini ();

  return 0;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:28,代码来源:Naming_Server.cpp


示例15: TAO_ORB_Core_instance

// Get ourselves a Naming service reference
int
TAO_AV_Endpoint_Process_Strategy::bind_to_naming_service (void)
{
  try
    {
      if (CORBA::is_nil (this->naming_context_.in ()) == 0)
        return 0;

      CORBA::Object_var naming_obj =
        TAO_ORB_Core_instance ()->orb ()->resolve_initial_references ("NameService");

      if (CORBA::is_nil (naming_obj.in ()))
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                           " (%P|%t) Unable to resolve the Name Service.\n"),
                          -1);
      this->naming_context_ =
        CosNaming::NamingContext::_narrow (naming_obj.in ());
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "TAO_AV_Endpoint_Process_Strategy::bind_to_naming_service");
      return -1;
    }
  return 0;
}
开发者ID:binary42,项目名称:OCI,代码行数:27,代码来源:Endpoint_Strategy.cpp


示例16: ORBSVCS_ERROR_RETURN

TAO_AV_Protocol_Object*
TAO_AV_TCP_Flow_Factory::make_protocol_object (TAO_FlowSpec_Entry *entry,
                                               TAO_Base_StreamEndPoint *endpoint,
                                               TAO_AV_Flow_Handler *handler,
                                               TAO_AV_Transport *transport)
{
  TAO_AV_Callback *callback = 0;
  if (endpoint->get_callback (entry->flowname (), callback))
    {
      ORBSVCS_ERROR_RETURN ((LM_ERROR, "(%N,%l) Invalid callback\n"), 0);
    }

  TAO_AV_TCP_Object *object = 0;
  ACE_NEW_RETURN (object,
                  TAO_AV_TCP_Object (callback,
                                     transport),
                  0);
  callback->open (object,
                  handler);
  endpoint->set_protocol_object (entry->flowname (),
                                 object);

  endpoint->protocol_object_set ();

  return object;
}
开发者ID:asdlei00,项目名称:ACE,代码行数:26,代码来源:TCP.cpp


示例17: ORBSVCS_ERROR_RETURN

int
TAO_EC_Gateway_IIOP::init_i (RtecEventChannelAdmin::EventChannel_ptr supplier_ec,
                             RtecEventChannelAdmin::EventChannel_ptr consumer_ec)
{
  if (CORBA::is_nil (this->supplier_ec_.in ()) && CORBA::is_nil (this->consumer_ec_.in ()))
    {
      this->supplier_ec_ =
        RtecEventChannelAdmin::EventChannel::_duplicate (supplier_ec);
      this->consumer_ec_ =
        RtecEventChannelAdmin::EventChannel::_duplicate (consumer_ec);

      if (ec_control_ == 0)
        {
          ec_control_ = factory_->create_consumerec_control(this);
          ec_control_->activate();
        }

      return 0;
    }
  else
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       "TAO_EC_Gateway_IIOP - init_i "
                       "Supplier and consumer event channel reference "
                       "should be nil.\n"), -1);
}
开发者ID:chenbk85,项目名称:ACE-Middleware,代码行数:25,代码来源:EC_Gateway_IIOP.cpp


示例18: ACE_TEXT

int
TAO_Notify_Service_Driver::init_ORB (int& argc, ACE_TCHAR *argv [])
{
  this->orb_ = CORBA::ORB_init (argc, argv);

  ACE_LOG_MSG->open
    (argv[0], ACE_Log_Msg::SYSLOG, ACE_TEXT ("TAO Notify"));

  this->apply_timeout (this->orb_.in ());

  CORBA::Object_var object =
    this->orb_->resolve_initial_references("RootPOA");

  if (CORBA::is_nil (object.in ()))
    ORBSVCS_ERROR_RETURN ((LM_ERROR,
                       " (%P|%t) Unable to resolve the RootPOA.\n"),
                      -1);

  this->poa_ =
    PortableServer::POA::_narrow (object.in ());

  PortableServer::POAManager_var poa_manager =
    this->poa_->the_POAManager ();

  poa_manager->activate ();

  return 0;
}
开发者ID:esohns,项目名称:ATCD,代码行数:28,代码来源:Notify_Service.cpp


示例19: ORBSVCS_DEBUG

int
Notify_Logging_Service::init_ORB (int& argc, ACE_TCHAR *argv [])
{
    this->orb_ = CORBA::ORB_init (argc, argv);

    this->notify_service_ = TAO_Notify_Service::load_default ();

    if (this->notify_service_ == 0)
    {
        ORBSVCS_DEBUG ((LM_DEBUG, "Notify Service not found! check conf. file\n"));
        return -1;
    }

    CORBA::Object_var poa_object =
        this->orb_->resolve_initial_references("RootPOA");

    if (CORBA::is_nil (poa_object.in ()))
        ORBSVCS_ERROR_RETURN ((LM_ERROR,
                               " (%P|%t) Unable to resolve the RootPOA.\n"),
                              -1);

    this->poa_ =
        PortableServer::POA::_narrow (poa_object.in ());

    PortableServer::POAManager_var poa_manager =
        this->poa_->the_POAManager ();

    poa_manager->activate ();

    return 0;
}
开发者ID:akostrikov,项目名称:ATCD,代码行数:31,代码来源:Notify_Logging_Service.cpp


示例20: log_record_size

int
TAO_Hash_LogRecordStore::log (const DsLogAdmin::LogRecord &const_rec)
{
  // Get log record size...
  size_t record_size = log_record_size (const_rec);

  // Check if we are allowed to write...
  if (max_size_ !=0 && ((current_size_ + record_size) >= max_size_))
    return 1; // return code for log rec. full

  // Copy record...
  DsLogAdmin::LogRecord rec = const_rec;

  // Initialize a couple of fields first...
  // ACE emulation of U Long Long (for platforms that don't have one)
  // does not define postfix operators
  rec.id = ++maxid_;
  rec.time = ORBSVCS_Time::to_Absolute_TimeT (ACE_OS::gettimeofday ());

  // First, bind the id to the LogRecord in the hash_map
  if (this->rec_map_.bind (rec.id, rec) != 0)
    {
           ORBSVCS_ERROR_RETURN ((LM_ERROR,
                         "LogRecordStore (%P|%t):Failed to bind %Q in the hash map\n",
                         rec.id),
                       -1);
    }

  // Increment the number of records in the log
  ++this->num_records_;
  this->current_size_ += record_size;
  this->gauge_ += record_size;

  return 0;
}
开发者ID:OspreyHub,项目名称:ATCD,代码行数:35,代码来源:Hash_LogRecordStore.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ORDATA函数代码示例发布时间:2022-05-30
下一篇:
C++ ORBSVCS_DEBUG函数代码示例发布时间: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