Пример #1
0
ACE_Service_Repository::~ACE_Service_Repository (void)
{
  ACE_TRACE ("ACE_Service_Repository::~ACE_Service_Repository");
#ifndef ACE_NLOGGING
  if(ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG, "ACE (%P|%t) SR::<dtor>, this=%@\n", this));
#endif
  this->close ();
}
Пример #2
0
int
ACE_Naming_Context::fini (void)
{
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("ACE_Naming_Context::fini\n")));
  this->close_down ();
  return 0;
}
Пример #3
0
void
ACE_Remote_Token_Proxy::token_acquired (ACE_TPQ_Entry *)
{
    ACE_TRACE ("ACE_Remote_Token_Proxy::token_acquired");
    ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) %s shadow token %s acquired\n"),
                   this->client_id (),
                   this->name ()));
    // ACE_Token_Proxy::token_acquired (vp);
}
Пример #4
0
int
ACE_Service_Gestalt::process_directive_i (const ACE_Static_Svc_Descriptor &ssd,
                                          bool force_replace)
{
  if (this->repo_ == 0)
    return -1;

  if (!force_replace)
    {
      if (this->repo_->find (ssd.name_, 0, 0) >= 0)
        {
          // The service is already there, just return
          return 0;
        }
    }


  ACE_Service_Object_Exterminator gobbler;
  void *sym = (ssd.alloc_)(&gobbler);

  ACE_Service_Type_Impl *stp =
    ACE_Service_Config::create_service_type_impl (ssd.name_,
                                                  ssd.type_,
                                                  sym,
                                                  ssd.flags_,
                                                  gobbler);
  if (stp == 0)
    return 0;

  ACE_Service_Type *service_type = 0;

  // This is just a temporary to force the compiler to use the right
  // constructor in ACE_Service_Type. Note that, in cases where we are
  // called from a static initializer which is part of a DLL, there is
  // not enough information about the actuall DLL in this context.
  ACE_DLL tmp_dll;

  ACE_NEW_RETURN (service_type,
                  ACE_Service_Type (ssd.name_,
                                    stp,
                                    tmp_dll,
                                    ssd.active_),
                  -1);

#ifndef ACE_NLOGGING
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("ACE (%P|%t) SG::process_directive_i, ")
                ACE_TEXT ("repo=%@ - %s, dll=%s, force=%d\n"),
                this->repo_,
                ssd.name_,
                (tmp_dll.dll_name_ == 0) ? ACE_TEXT ("<null>") : tmp_dll.dll_name_,
                force_replace));
#endif

  return this->repo_->insert (service_type);
}
Пример #5
0
int
ACE_Naming_Context::init (int argc, ACE_TCHAR *argv[])
{
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("ACE_Naming_Context::init\n")));
  this->name_options_->parse_args (argc, argv);
  return this->open (this->name_options_->context ());
}
Пример #6
0
// Get the instance using <name> for specific configuration repository.
void *
ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo,
                                    const ACE_TCHAR *name,
                                    bool no_global)
{
  ACE_TRACE ("ACE_Dynamic_Service_Base::instance");

  void *obj = 0;
  const ACE_Service_Type_Impl *type = 0;

  const ACE_Service_Gestalt* repo_found = repo;
  const ACE_Service_Type *svc_rec = find_i (repo_found, name, no_global);
  if (svc_rec != 0)
    {
      type = svc_rec->type ();
      if (type != 0)
        obj = type->object ();
    }

  if (ACE::debug ())
    {
      ACE_GUARD_RETURN (ACE_Log_Msg, log_guard, *ACE_Log_Msg::instance (), 0);

      if (repo->repo_ != repo_found->repo_)
        {
          ACELIB_DEBUG ((LM_DEBUG,
                    ACE_TEXT ("ACE (%P|%t) DSB::instance, repo=%@, name=%s")
                    ACE_TEXT (" type=%@ => %@")
                    ACE_TEXT (" [in repo=%@]\n"),
                    repo->repo_, name, type, obj,
                    repo_found->repo_));
        }
      else
        {
          ACELIB_DEBUG ((LM_DEBUG,
                    ACE_TEXT ("ACE (%P|%t) DSB::instance, repo=%@, name=%s")
                    ACE_TEXT (" type=%@ => %@\n"),
                    repo->repo_, name, type, obj));
        }
    }

  return obj;
}
Пример #7
0
template <class ACE_LOCK, class ALLOCATOR> void
ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR>::print_absolute_times (void)
{
  ACE_GUARD (ACE_LOCK, ace_mon, this->lock_);

  // Sort the event descriptions
  this->sort_event_descriptions_i ();

  u_long size = this->report_buffer_full_ ? this->max_size_
                                          : this->current_size_;

  ACELIB_DEBUG ((LM_DEBUG,
              "\nACE_Timeprobe_Ex; %u timestamps were recorded:\n",
              size));

  if (size == 0)
    return;

  ACELIB_DEBUG ((LM_DEBUG,
              "\n%-50.50s %8.8s %13.13s\n\n",
              "Event",
              "thread",
              "stamp"));

  u_long i = this->report_buffer_full_ ? this->current_size_ : 0;

  ACE_Time_Value tv; // to convert ACE_hrtime_t
  do
    {
      ACE_High_Res_Timer::hrtime_to_tv (tv, this->timeprobes_ [i].time_);

      ACELIB_DEBUG ((LM_DEBUG,
                  "%-50.50s %8.8x %12.12u\n",
                  this->find_description_i (i),
                  this->timeprobes_ [i].thread_,
                  tv.sec () * 1000000
                   + tv.usec ()));

      // Modulus increment: loops around at the end.
      i = (i + 1) % this->max_size_;
    }
  while (i != this->current_size_);
}
Пример #8
0
int
ACE_ATM_Acceptor::get_local_addr (ACE_ATM_Addr &local_addr)
{
  ACE_TRACE ("ACE_ATM_Acceptor::get_local_addr");

#if defined (ACE_HAS_FORE_ATM_WS2)
  unsigned long ret = 0;
  DWORD deviceID = 0;
  ATM_ADDRESS addr;
  struct sockaddr_atm *laddr;

  if (::WSAIoctl ((int) ((ACE_SOCK_Acceptor *)this) -> get_handle (),
                SIO_GET_ATM_ADDRESS,
 (LPVOID) &deviceID,
                sizeof (DWORD),
 (LPVOID)&addr,
                sizeof (ATM_ADDRESS),
                &ret,
                0,
                0) == SOCKET_ERROR) {
    ACE_OS::printf ("ATM_Acceptor (get_local_addr): WSIoctl: %d\n",
                    ::WSAGetLastError ());
    return -1;
  }

  laddr = (struct sockaddr_atm *)local_addr.get_addr ();
  ACE_OS::memcpy ((void *)& (laddr -> satm_number),
 (void *)&addr,
                 ATM_ADDR_SIZE - 1);

  return 0;
#elif defined (ACE_HAS_FORE_ATM_XTI)
  ACE_UNUSED_ARG (local_addr);

  return 0;
#elif defined (ACE_HAS_LINUX_ATM)
  ATM_Addr *myaddr = (ATM_Addr *)local_addr.get_addr ();
  int addrlen = sizeof (myaddr->sockaddratmsvc);

  if (ACE_OS::getsockname (acceptor_.get_handle (),
 (struct sockaddr *) & (myaddr->sockaddratmsvc),
                          &addrlen) < 0) {
    ACELIB_DEBUG ((LM_DEBUG,
               ACE_TEXT ("ATM_Acceptor (get_local_addr): ioctl: %d\n"),
               errno));
    return -1;
  }

  return 0;
#else
  ACE_UNUSED_ARG (local_addr);

  return 0;
#endif /* ACE_HAS_FORE_ATM_WS2 && ACE_HAS_FORE_ATM_XTI */
}
Пример #9
0
int
ACE_Token_Proxy::renew (int requeue_position,
                        ACE_Synch_Options &options)
{
  ACE_TRACE ("ACE_Token_Proxy::renew");
  if (this->token_ == 0)
    {
      errno = ENOENT;
      ACELIB_ERROR_RETURN ((LM_ERROR,
                         ACE_TEXT ("Not open.\n")),
                        -1);
    }

  // Make sure no one calls our token_acquired until we have a chance
  // to sleep first!
  this->waiter_->cond_var_.mutex ().acquire ();

  if (this->token_->renew (this->waiter_, requeue_position) == -1)
    {
      // check for error
      if (errno != EWOULDBLOCK)
        ACELIB_ERROR_RETURN ((LM_ERROR,
                           ACE_TEXT ("%p renew failed\n"), ACE_TEXT ("ACE_Token_Proxy")), -1);

      if (this->debug_)
        ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) renew blocking for %s, owner is %s\n"),
                    this->name (),
                    token_->owner_id ()));

      // no error, but would block, so block or return
      return this->handle_options (options, waiter_->cond_var_);
    }
  else
    // we have the token
    {
      if (this->debug_)
        ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) renewed %s\n"),
                    this->name ()));
      waiter_->cond_var_.mutex ().release ();
      return 0;
    }
}
Пример #10
0
template <typename PEER_STREAM, typename SYNCH_TRAITS> void
ACE_Buffered_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Buffered_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::dump");

  ACE_Buffered_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::dump ();
  ACELIB_DEBUG ((LM_DEBUG,
              "maximum_buffer_size_ = %d\n",
              this->maximum_buffer_size_));
  ACELIB_DEBUG ((LM_DEBUG,
              "current_buffer_size_ = %d\n",
              this->current_buffer_size_));
  if (this->timeoutp_ != 0)
    ACELIB_DEBUG ((LM_DEBUG,
                "next_timeout_.sec = %d, next_timeout_.usec = %d\n",
                this->next_timeout_.sec (),
                this->next_timeout_.usec ()));
#endif /* ACE_HAS_DUMP */
}
Пример #11
0
template <class TYPE, class FUNCTOR, class ACE_LOCK, typename TIME_POLICY> void
ACE_Timer_List_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Timer_List_T::dump");
  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));

  int count = 0;

  ACE_Timer_Node_T<TYPE>* n = this->get_first_i();
  if (n != 0) {
    for (; n != this->head_; n = n->get_next()) {
      ++count;
    }
  }

  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsize_ = %d"), count));
  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #12
0
ACE_BEGIN_VERSIONED_NAMESPACE_DECL

void
ACE_Activation_Queue::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,
              ACE_TEXT ("delete_queue_ = %d\n"),
              this->delete_queue_));
  ACELIB_DEBUG ((LM_INFO, ACE_TEXT ("queue_:\n")));
  if (this->queue_)
    this->queue_->dump();
  else
    //FUZZ: disable check_for_NULL
    ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n")));
    //FUZZ: enable check_for_NULL

  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #13
0
template <typename PEER_STREAM, typename SYNCH_TRAITS> void
ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Svc_Handler<PEER_STREAM, SYNCH_TRAITS>::dump");

  this->peer_.dump ();
  ACELIB_DEBUG ((LM_DEBUG,
              "dynamic_ = %d\n",
              this->dynamic_));
  ACELIB_DEBUG ((LM_DEBUG,
              "closing_ = %d\n",
              this->closing_));
  ACELIB_DEBUG ((LM_DEBUG,
              "recycler_ = %d\n",
              this->recycler_));
  ACELIB_DEBUG ((LM_DEBUG,
              "recycling_act_ = %d\n",
              this->recycling_act_));
#endif /* ACE_HAS_DUMP */
}
Пример #14
0
void
ACE_Token_Proxy::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Token_Proxy::dump");
  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("ACE_Token_Proxy::dump:\n")
                        ACE_TEXT (" type = %d\n")
                        ACE_TEXT (" ignore_deadlock_ = %d\n")
                        ACE_TEXT (" debug_ = %d\n"),
                        (int) this->type (), ignore_deadlock_, debug_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("mutex_, and waiter_\n")));

  if (this->token_ != 0)
    this->token_->dump ();

  this->waiter_.dump ();
  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump end.\n")));
  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #15
0
void
ACE_Parse_Node::print (void) const
{
  ACE_TRACE ("ACE_Parse_Node::print");

  ACELIB_DEBUG ((LM_DEBUG,
              ACE_TEXT ("svc = %s\n"),
              this->name ()));

  if (this->next_)
    this->next_->print ();
}
Пример #16
0
void
ACE_PI_Control_Block::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_PI_Control_Block::dump");

  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("Name Node:\n")));
  for (ACE_Name_Node *nextn = this->name_head_;
       nextn != 0;
       nextn = nextn->next_)
    nextn->dump ();

  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("freep_ = %x"), (ACE_Malloc_Header *) this->freep_));
  this->base_.dump ();

  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nMalloc Header:\n")));
  for (ACE_Malloc_Header *nexth = ((ACE_Malloc_Header *)this->freep_)->next_block_;
       nexth != 0 && nexth != &this->base_;
       nexth = nexth->next_block_)
    nexth->dump ();

  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #17
0
template <class T, class C> void
ACE_Unbounded_Set_Ex<T, C>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Unbounded_Set_Ex<T, C>::dump");

  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nhead_ = %u"), this->head_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_));

  T *item = 0;
#if !defined (ACE_NLOGGING)
  size_t count = 1;
#endif /* ! ACE_NLOGGING */

  const_iterator const the_end = this->end ();
  for (const_iterator i (this->begin ());
       i != the_end;
       ++i)
    ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("count = %u\n"), count++));

  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #18
0
// ************************************************************
// Print SSL errors
// ************************************************************
void
ACE_SSL_Asynch_Stream::print_error (int err_ssl,
                                    const ACE_TCHAR * pText)
{
  ACELIB_DEBUG ((LM_DEBUG,
              ACE_TEXT("SSL-error:%d %s\n"),
              err_ssl,
              pText));

#if OPENSSL_VERSION_NUMBER >= 0x0090601fL
  // OpenSSL < 0.9.6a doesn't have ERR_error_string_n() function.
  unsigned long lerr = 0;
  char buf[1024];

  while ((lerr = ERR_get_error()) != 0)
    {
      ERR_error_string_n (lerr, buf, sizeof buf);

      ACELIB_DEBUG ((LM_DEBUG, "%C\n", buf));
    }
#endif  /* OPENSSL_VERSION_NUMBER */
}
Пример #19
0
void
ACE_Get_Opt::dump (void) const
{
#if defined (ACE_HAS_DUMP)
    ACE_TRACE ("ACE_Get_Opt::dump");

    ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
    ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")
                   ACE_TEXT ("opstring_ = %s\n")
                   ACE_TEXT ("long_only_ = %d\n")
                   ACE_TEXT ("has_colon_ = %d\n")
                   ACE_TEXT ("last_option_ = %s\n")
                   ACE_TEXT ("nextchar_ = %s\n")
                   ACE_TEXT ("optopt_ = %c\n")
                   ACE_TEXT ("ordering_ = %d\n"),
                   this->optstring_->c_str (),
                   this->long_only_,
                   this->has_colon_,
                   this->last_option_->c_str (),
                   this->nextchar_,
                   this->optopt_,
                   this->ordering_));

    // now loop through the
    size_t size = this->long_opts_.size ();
    for (u_int i = 0; i < size ; ++i)
    {
        ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")
                       ACE_TEXT ("long_option name_ = %s\n")
                       ACE_TEXT ("has_arg_ = %d\n")
                       ACE_TEXT ("val_ = %d\n"),
                       this->long_opts_[i]->name_,
                       this->long_opts_[i]->has_arg_,
                       this->long_opts_[i]->val_));
    }
    ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #20
0
void
ACE_Mem_Map::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Mem_Map::dump");

  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("base_addr_ = %x"), this->base_addr_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nfilename_ = %s"), this->filename_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nlength_ = %d"), this->length_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nhandle_ = %d"), this->handle_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nfile_mapping_ = %d"), this->file_mapping_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nclose_handle_ = %d"), this->close_handle_));
  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #21
0
void
ACE_TPQ_Entry::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_TPQ_Entry::dump");
  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,
              ACE_TEXT ("ACE_TPQ_Entry::dump:\n")
              ACE_TEXT (" nesting_level_ = %d\n")
              ACE_TEXT (" client_id_ = %s\n"),
              nesting_level_,
              client_id_));

  if (next_ != 0)
    {
      ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next:.\n")));
      next_->dump ();
    }

  ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Entry::dump end.\n")));
  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #22
0
ACE_Service_Config_Guard::~ACE_Service_Config_Guard (void)
{
  ACE_Service_Gestalt* s = this->saved_.get ();
  ACE_ASSERT (s != 0);

  ACE_Service_Config::current (s);

  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("ACE (%P|%t) SCG:<dtor=%@>")
                ACE_TEXT (" - new repo=%@\n"),
                this,
                this->saved_->repo_));
}
void
ACE_Dynamic_Service_Dependency::init (const ACE_Service_Gestalt *cfg,
                                      const ACE_TCHAR *principal)
{
  const ACE_Service_Type* st =
    ACE_Dynamic_Service_Base::find_i (cfg, principal,false);
  if (ACE::debug ())
    {
      ACELIB_DEBUG ((LM_DEBUG,
      ACE_TEXT ("(%P|%t) DSD, this=%@ - creating dependency on "), this));
      st->dump ();
    }
  this->tracker_ = st->dll ();
}
Пример #24
0
void
ACE_Dummy_Node::apply (ACE_Service_Gestalt *, int &yyerrno)
{
  ACE_TRACE ("ACE_Dummy_Node::apply");

#ifndef ACE_NLOGGING
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("did operations on stream %s, error = %d\n"),
                this->name (),
                yyerrno));
#else
  ACE_UNUSED_ARG (yyerrno);
#endif /* ACE_NLOGGING */
}
Пример #25
0
/// ctor
ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt * psg)
  : saved_ (ACE_Service_Config::current ())
{
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("ACE (%P|%t) - SCG:<ctor=%@>")
                ACE_TEXT (" - config=%@ repo=%@ superceded by repo=%@\n"),
                this,
                this->saved_.get (),
                this->saved_->repo_,
                psg->repo_));

  // Modify the TSS if the repo has changed
  ACE_Service_Config::current (psg);
}
Пример #26
0
template <ACE_SYNCH_DECL, class TIME_POLICY> void
ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::dump");
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("-------- module links --------\n")));

  for (ACE_Module<ACE_SYNCH_USE, TIME_POLICY> *mp = this->stream_head_;
       ;
       mp = mp->next ())
    {
      ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("module name = %s\n"), mp->name ()));
      if (mp == this->stream_tail_)
        break;
    }

  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("-------- writer links --------\n")));

  ACE_Task<ACE_SYNCH_USE, TIME_POLICY> *tp;

  for (tp = this->stream_head_->writer ();
       ;
       tp = tp->next ())
    {
      ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("writer queue name = %s\n"), tp->name ()));
      tp->dump ();
      ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("-------\n")));
      if (tp == this->stream_tail_->writer ()
          || (this->linked_us_
              && tp == this->linked_us_->stream_head_->reader ()))
        break;
    }

  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("-------- reader links --------\n")));
  for (tp = this->stream_tail_->reader (); ; tp = tp->next ())
    {
      ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("reader queue name = %s\n"), tp->name ()));
      tp->dump ();
      ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("-------\n")));
      if (tp == this->stream_head_->reader ()
          || (this->linked_us_
              && tp == this->linked_us_->stream_head_->writer ()))
        break;
    }
#endif /* ACE_HAS_DUMP */
}
Пример #27
0
int
ACE_Service_Manager::list_services (void)
{
  ACE_TRACE ("ACE_Service_Manager::list_services");
  ACE_Service_Repository_Iterator sri (*ACE_Service_Repository::instance (), 0);

  for (const ACE_Service_Type *sr;
       sri.next (sr) != 0;
       sri.advance ())
    {
      ssize_t len = static_cast<ssize_t> (ACE_OS::strlen (sr->name ())) + 11;
      ACE_TCHAR buf[BUFSIZ];
      ACE_TCHAR *p = buf + len;

      ACE_OS::strcpy (buf, sr->name ());
      ACE_OS::strcat (buf, (sr->active ()) ?
                      ACE_TEXT (" (active) ") :
                      ACE_TEXT (" (paused) "));

      p[-1] = ' ';
      p[0]  = '\0';

      len += sr->type ()->info (&p, sizeof buf - len);

      if (this->debug_)
        {
          ACELIB_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("len = %d, info = %s%s"),
                      len,
                      buf,
                      buf[len - 1] == '\n' ? ACE_TEXT ("") : ACE_TEXT ("\n")));
        }

      if (len > 0)
        {
          ssize_t n = this->client_stream_.send_n (buf, len);

          if (n <= 0 && errno != EPIPE)
            {
              ACELIB_ERROR ((LM_ERROR,
                          ACE_TEXT ("%p\n"),
                          ACE_TEXT ("send_n")));
            }
        }
    }

  return 0;
}
Пример #28
0
template <ACE_SYNCH_DECL, class TIME_POLICY> void
ACE_Task<ACE_SYNCH_USE, TIME_POLICY>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
  ACE_TRACE ("ACE_Task<ACE_SYNCH_USE, TIME_POLICY>::dump");
  ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nthr_mgr_ = %x"), this->thr_mgr_));
  this->msg_queue_->dump ();
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("delete_msg_queue_ = %d\n"), this->delete_msg_queue_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nflags = %x"), this->flags_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nmod_ = %x"), this->mod_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nnext_ = %x"), this->next_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\ngrp_id_ = %d"), this->grp_id_));
  ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("\nthr_count_ = %d"), this->thr_count_));
#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
  this->lock_.dump ();
#endif /* ACE_MT_SAFE */

  ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
Пример #29
0
void
ACE_Resume_Node::apply (ACE_Service_Gestalt *config, int &yyerrno)
{
  ACE_TRACE ("ACE_Resume_Node::apply");

  if (config->resume (this->name ()) == -1)
    ++yyerrno;

#ifndef ACE_NLOGGING
  if (ACE::debug ())
    ACELIB_DEBUG ((LM_DEBUG,
                ACE_TEXT ("did resume on %s, error = %d\n"),
                this->name (),
                yyerrno));
#endif /* ACE_NLOGGING */
}
Пример #30
0
// Close the RAPI QoS Session.
int
ACE_RAPI_Session::close (void)
{
  this->rsvp_error = rapi_release(this->session_id_);

  if (rsvp_error == 0)
    ACELIB_ERROR_RETURN ((LM_ERROR,
                       "Can't release RSVP session:\n\t%s\n",
                       rapi_errlist[rsvp_error]),
                      -1);
  else
    ACELIB_DEBUG ((LM_DEBUG,
                "rapi session with id %d released successfully.\n",
                this->session_id_));
  return 0;
}