/[hydra]/hydra/src/virthost.c
ViewVC logotype

Diff of /hydra/src/virthost.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by nmav, Fri Sep 27 23:40:29 2002 UTC revision 1.8 by nmav, Sat Sep 28 08:50:07 2002 UTC
# Line 25  Line 25 
25  static virthost *virthost_hashtable[VIRTHOST_HASHTABLE_SIZE];  static virthost *virthost_hashtable[VIRTHOST_HASHTABLE_SIZE];
26    
27  /*  /*
  * Name: get_host_hash_value  
  *  
  * Here we simply use the algorithm used in get_alias_hash_value();  
  */  
   
 int get_host_hash_value(const char *file)  
 {  
     unsigned int hash = 0;  
     unsigned int index = 0;  
     unsigned char c;  
   
     hash = file[index++];  
     while ((c = file[index++]) && c != '/')  
         hash += (unsigned int) c;  
   
     return hash % VIRTHOST_HASHTABLE_SIZE;  
 }  
   
 /*  
28   * Name: add_virthost   * Name: add_virthost
29   *   *
30   * Description: add a virtual host to the virthost hash table.   * Description: add a virtual host to the virthost hash table.

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26