diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /apps/drwho/HT_Server.cpp | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'apps/drwho/HT_Server.cpp')
-rw-r--r-- | apps/drwho/HT_Server.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/apps/drwho/HT_Server.cpp b/apps/drwho/HT_Server.cpp deleted file mode 100644 index 5af2b21c4b5..00000000000 --- a/apps/drwho/HT_Server.cpp +++ /dev/null @@ -1,37 +0,0 @@ -// $Id$ - -#include "HT_Server.h" -#include "ace/ACE.h" - -// Insert a KEY_NAME into the hash table, if it doesn't already exist -// there. What gets returned is a pointer to the node inserted. Note -// that we do our own memory allocation here... - -Protocol_Record * -HT_Server::insert (const char *key_name, int max_len) -{ - Protocol_Record **prpp = 0; - - // This is tricky... - - for (prpp = &this->hash_table[ACE::hash_pjw (key_name) % this->hash_table_size]; - *prpp != 0 && strncmp ((*prpp)->get_login (), key_name, max_len) != 0; - prpp = &(*prpp)->next_) - continue; - - if (*prpp == 0) - { - // Remember, the server must be very careful about stuff it - // receives from the rwho manager, since it may not be - // NUL-terminated. That's why we use ACE::strnnew ()... - - ACE_NEW_RETURN (*prpp, - Protocol_Record (ACE::strnnew (key_name, - max_len), - *prpp), - 0); - this->count_++; - } - - return *prpp; -} |