Protocol_Record * PM_Client::insert_protocol_info (Protocol_Record &protocol_record) { Protocol_Record *prp = this->ss->insert (protocol_record.get_login ()); Drwho_Node *current_node = protocol_record.get_drwho_list (); Drwho_Node *np = this->get_drwho_node (ACE::strnew (current_node->get_host_name ()), prp->drwho_list_); // Update the active and inactive counts. if (np->get_active_count () < current_node->get_active_count ()) { np->set_active_count (current_node->get_active_count ()); prp->is_active_ = 1; } if (np->get_inactive_count () < current_node->get_inactive_count()) np->set_inactive_count (current_node->get_inactive_count ()); return prp; }
Protocol_Record * PMC_Ruser::insert_protocol_info (Protocol_Record &protocol_record) { Protocol_Record *prp = this->ss->insert (protocol_record.get_host (), MAXHOSTNAMELEN); Drwho_Node *current_node = protocol_record.get_drwho_list (); Drwho_Node *np = this->get_drwho_node (ACE::strnnew (current_node->get_login_name (), MAXUSERIDNAMELEN), prp->drwho_list_); int length = ACE_OS::strlen (prp->get_host ()); np->set_real_name (ACE::strnew (current_node->get_real_name ())); if (np->get_active_count () < current_node->get_active_count ()) np->set_active_count (current_node->get_active_count ()); if (np->get_inactive_count () < current_node->get_inactive_count()) np->set_inactive_count (current_node->get_inactive_count ()); if (length > this->max_key_length) this->max_key_length = length; return prp; }