3 #include "ace/OS_NS_string.h"
4 #include "ace/OS_Memory.h"
6 // Insert a KEY_NAME into the hash table, if it doesn't already exist
7 // there. What gets returned is a pointer to the node inserted. Note
8 // that we do our own memory allocation here...
11 HT_Client::insert (const char *key_name
, int max_len
)
13 Protocol_Record
**prpp
= 0;
17 for (prpp
= &this->hash_table
[ACE::hash_pjw (key_name
) % this->hash_table_size
];
19 && ACE_OS::strncmp ((*prpp
)->get_login (),
20 key_name
, max_len
) != 0;
21 prpp
= &(*prpp
)->next_
)
26 ACE_NEW_RETURN (*prpp
,
27 Protocol_Record (ACE::strnew (key_name
),