changeallow.cc (305B)
1 #include "config" 2 3 void Config::changeallow (string &a, unsigned index) { 4 if (index >= allowlist.size()) 5 throw Error("No such allow-from specifier"); 6 7 struct in_addr in; 8 if (!inet_aton (a.c_str(), &in)) 9 throw Error("Bad allow-from specfier '" + a + "'"); 10 allowlist[index] = (in); 11 } 12