SOURCES: pdns-strbind.patch (NEW) - missing function strbind - cut...
zbyniu
zbyniu at pld-linux.org
Tue Aug 2 03:09:06 CEST 2005
Author: zbyniu Date: Tue Aug 2 01:09:06 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- missing function strbind
- cutted from http://www.linuxnetworks.de/pdnsldap/ldapbackend_2.9.17-3.diff
---- Files affected:
SOURCES:
pdns-strbind.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/pdns-strbind.patch
diff -u /dev/null SOURCES/pdns-strbind.patch:1.1
--- /dev/null Tue Aug 2 03:09:06 2005
+++ SOURCES/pdns-strbind.patch Tue Aug 2 03:09:01 2005
@@ -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
================================================================
More information about the pld-cvs-commit
mailing list