Branch: Tag:

2008-04-07

2008-04-07 13:04:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Updated SNMP protocol.

Rev: server/base_server/configuration.pike:1.634
Rev: server/base_server/roxen.pike:1.961
Rev: server/config_interface/sites/site_content.pike:1.149
Rev: server/etc/modules/SNMP.pmod:1.1
Rev: server/protocols/prot_snmp.pike:2.1

6:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.960 2008/02/05 17:41:57 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.961 2008/04/07 13:04:47 grubba Exp $";      //! @appears roxen   //!
2176:   mapping(string:mapping(string:mapping(int:Protocol))) open_ports = ([ ]);      // url:"port" ==> Protocol. - mapping(string:mapping(string:Configuration)) urls = ([]); + mapping(string:mapping(string:Configuration|Protocol|array(Protocol)|string)) +  urls = ([]);   array sorted_urls = ({});      array(string) find_ips_for( string what )
2439:       urls[url]->port = m[required_host][port];    urls[ourl]->port = m[required_host][port]; +  if (urls[ourl]->ports) { +  urls[ourl]->ports += ({ m[required_host][port] }); +  } else { +  urls[ourl]->ports = ({ m[required_host][port] }); +  }    continue; /* No need to open a new port */    }   
2481:       urls[ url ]->port = m[ required_host ][ port ];    urls[ ourl ]->port = m[ required_host ][ port ]; +  if (urls[ourl]->ports) { +  urls[ourl]->ports += ({ m[required_host][port] }); +  } else { +  urls[ourl]->ports = ({ m[required_host][port] }); +  }    m[ required_host ][ port ]->ref(url, urls[url]);       if( !m[ required_host ][ port ]->bound )