]> git.pld-linux.org Git - packages/pdns.git/commitdiff
- missing function strbind
authorzbyniu <zbyniu@pld-linux.org>
Tue, 2 Aug 2005 01:09:01 +0000 (01:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- cutted from http://www.linuxnetworks.de/pdnsldap/ldapbackend_2.9.17-3.diff

Changed files:
    pdns-strbind.patch -> 1.1

pdns-strbind.patch [new file with mode: 0644]

diff --git a/pdns-strbind.patch b/pdns-strbind.patch
new file mode 100644 (file)
index 0000000..e2b7ad9
--- /dev/null
@@ -0,0 +1,40 @@
+--- pdns-2.9.17/modules/ldapbackend/utils.hh   2004-02-22 10:35:01.000000000 +0100
++++ pdns-2.9.17.new/modules/ldapbackend/utils.hh       2005-05-20 11:15:40.530121464 +0200
+@@ -73,7 +73,7 @@
+ }
+
+
+-inline string ip2ptr4( string ip )
++inline string ip2ptr4( const string& ip )
+ {
+       string ptr;
+       vector<string> parts;
+@@ -89,7 +89,7 @@
+ }
+
+
+-inline string ip2ptr6( string ip )
++inline string ip2ptr6( const string& ip )
+ {
+       string ptr, part, defstr;
+       vector<string> parts;
+@@ -116,4 +116,19 @@
+       return ptr + "ip6.arpa";
+ }
+
++
++inline string strbind( const string& search, const string& replace, string subject )
++{
++      size_t pos = 0;
++
++
++      while( ( pos = subject.find( search, pos ) ) != string::npos )
++      {
++              subject.replace( pos, search.size(), replace );
++              pos += replace.size();
++      }
++
++      return subject;
++}
++
+ #endif
This page took 0.039283 seconds and 4 git commands to generate.