Changeset 1243
- Timestamp:
- 08/03/08 19:59:15 (20 months ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
docs/pdns.sgml (modified) (1 diff)
-
rec_channel_rec.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/docs/pdns.sgml
r1236 r1243 7947 7947 <para> 7948 7948 Retrieve a statistic. For items that can be queried, see below. 7949 </para> 7950 </listitem> 7951 </varlistentry> 7952 <varlistentry> 7953 <term>get-parameter parameter1 parameter2 ../term> 7954 <listitem> 7955 <para> 7956 Retrieve a configuration parameter. All parameters from the configuration and command line can be queried. 7949 7957 </para> 7950 7958 </listitem> -
trunk/pdns/pdns/rec_channel_rec.cc
r1204 r1243 11 11 #include <boost/tuple/tuple.hpp> 12 12 #include <boost/format.hpp> 13 #include <boost/algorithm/string.hpp> 13 14 #include <sys/types.h> 14 15 #include <sys/stat.h> … … 16 17 #include "logger.hh" 17 18 #include "dnsparser.hh" 19 #include "arguments.hh" 18 20 #ifndef WIN32 19 21 #include <sys/resource.h> … … 69 71 return ret; 70 72 } 73 74 template<typename T> 75 string doGetParameter(T begin, T end) 76 { 77 string ret; 78 string parm; 79 for(T i=begin; i != end; ++i) { 80 if(::arg().parmIsset(*i)) { 81 parm=::arg()[*i]; 82 replace_all(parm, "\\", "\\\\"); 83 replace_all(parm, "\"", "\\\""); 84 replace_all(parm, "\n", "\\n"); 85 ret += *i +"=\""+ parm +"\"\n"; 86 } 87 else 88 ret += *i +" not known\n"; 89 } 90 return ret; 91 } 92 71 93 72 94 template<typename T> … … 290 312 return doGet(begin, end); 291 313 314 if(cmd=="get-parameter") 315 return doGetParameter(begin, end); 316 317 292 318 if(cmd=="quit") { 293 319 *command=&doExit;