Hello community, here is the log from the commit of package ldapcpplib checked in at Sat Aug 30 00:39:12 CEST 2008. -------- --- ldapcpplib/ldapcpplib.changes 2008-08-08 11:37:44.000000000 +0200 +++ ldapcpplib/ldapcpplib.changes 2008-08-27 21:28:03.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Aug 27 20:25:43 CEST 2008 - rhafer@suse.de + +- synced with latest CVS, allows to create LDAP Controls without + any value (bnc#420016) + +------------------------------------------------------------------- Old: ---- ldapcpplib-0.1.1.tar.bz2 New: ---- ldapcpplib-0.1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ldapcpplib.spec ++++++ --- /var/tmp/diff_new_pack.dTD908/_old 2008-08-30 00:37:25.000000000 +0200 +++ /var/tmp/diff_new_pack.dTD908/_new 2008-08-30 00:37:25.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package ldapcpplib (Version 0.1.1) +# spec file for package ldapcpplib (Version 0.1.2) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,7 +23,7 @@ License: BSD 3-Clause; OpenLDAP Public License 2.7 Group: Development/Libraries/C and C++ Summary: C++ API for LDAPv3 -Version: 0.1.1 +Version: 0.1.2 Release: 1 Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -127,6 +127,9 @@ %{_defaultdocdir}/%{name}/COPYRIGHT %changelog +* Wed Aug 27 2008 rhafer@suse.de +- synced with latest CVS, allows to create LDAP Controls without + any value (bnc#420016) * Fri Aug 08 2008 rhafer@suse.de - synced with latest CVS, allows to pass flags to Schema Parser * Mon Jun 23 2008 rhafer@suse.de ++++++ ldapcpplib-0.1.1.tar.bz2 -> ldapcpplib-0.1.2.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ldapcpplib-0.1.1/src/LDAPControl.cpp new/ldapcpplib-0.1.2/src/LDAPControl.cpp --- old/ldapcpplib-0.1.1/src/LDAPControl.cpp 2008-03-28 11:05:10.000000000 +0100 +++ new/ldapcpplib-0.1.2/src/LDAPControl.cpp 2008-08-27 21:19:51.000000000 +0200 @@ -1,4 +1,4 @@ -// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.cpp,v 1.5 2008/03/28 10:05:10 ralf Exp $ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.cpp,v 1.6 2008/08/27 19:19:51 ralf Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -10,13 +10,6 @@ using namespace std; -LDAPCtrl::LDAPCtrl(const LDAPCtrl& c){ - DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPCtrl::LDAPCtrl(&)" << endl); - m_oid=c.m_oid; - m_data=c.m_data; - m_isCritical=c.m_isCritical; -} - LDAPCtrl::LDAPCtrl(const char *oid, bool critical, const char* data, int length){ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPCtrl::LDAPCtrl()" << endl); @@ -28,10 +21,10 @@ m_data.assign(data,length); }else{ m_data=string(); + m_noData=true; } } - LDAPCtrl::LDAPCtrl(const string& oid, bool critical, const string& data){ DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPCtrl::LDAPCtrl()" << endl); DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER, @@ -39,6 +32,7 @@ m_oid=oid; m_isCritical=critical; m_data=data; + m_noData=false; } LDAPCtrl::LDAPCtrl(const LDAPControl* ctrl){ @@ -62,6 +56,10 @@ return m_isCritical; } +bool LDAPCtrl::hasData() const{ + return !m_noData; +} + string LDAPCtrl::getData() const { DEBUG(LDAP_DEBUG_TRACE,"LDAPCtrl::getData()" << endl); return m_data; @@ -73,9 +71,14 @@ ret->ldctl_oid= new char[m_oid.size() + 1]; m_oid.copy(ret->ldctl_oid,string::npos); ret->ldctl_oid[m_oid.size()]=0; - ret->ldctl_value.bv_len=m_data.size(); - ret->ldctl_value.bv_val= new char[m_data.size()]; - m_data.copy(ret->ldctl_value.bv_val,string::npos); + if ( m_noData ) { + ret->ldctl_value.bv_len = 0; + ret->ldctl_value.bv_val = NULL; + } else { + ret->ldctl_value.bv_len=m_data.size(); + ret->ldctl_value.bv_val= new char[m_data.size()]; + m_data.copy(ret->ldctl_value.bv_val,string::npos); + } ret->ldctl_iscritical = ( m_isCritical ? 1:0); return ret; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ldapcpplib-0.1.1/src/LDAPControl.h new/ldapcpplib-0.1.2/src/LDAPControl.h --- old/ldapcpplib-0.1.1/src/LDAPControl.h 2008-03-28 11:05:10.000000000 +0100 +++ new/ldapcpplib-0.1.2/src/LDAPControl.h 2008-08-27 21:19:51.000000000 +0200 @@ -1,4 +1,4 @@ -// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.h,v 1.6 2008/03/28 10:05:10 ralf Exp $ +// $OpenLDAP: pkg/ldap/contrib/ldapc++/src/LDAPControl.h,v 1.7 2008/08/27 19:19:51 ralf Exp $ /* * Copyright 2000, OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file @@ -17,11 +17,6 @@ class LDAPCtrl{ public : /** - * Copy-constructor - */ - LDAPCtrl(const LDAPCtrl& c); - - /** * Constructor. * @param oid: The Object Identifier of the Control * @param critical: "true" if the Control should be handled @@ -29,7 +24,7 @@ * @param data: If there is data for the control, put it here. * @param length: The length of the data field */ - LDAPCtrl(const char *oid, bool critical, const char *data=0, + LDAPCtrl(const char *oid, bool critical=false, const char *data=0, int length=0); /** @@ -39,8 +34,8 @@ * critical by the server. * @param data: If there is data for the control, put it here. */ - LDAPCtrl(const std::string& oid, bool critical=false, - const std::string& data=std::string()); + LDAPCtrl(const std::string& oid, bool critical, + const std::string& data); /** * Creates a copy of the Control that "ctrl is pointing to @@ -58,7 +53,13 @@ std::string getOID() const; /** - * @return The Data of the control as a std::string-Objekt + * @return true if there is no "Control Value" (there is a + * difference between no and an empty control value) + */ + bool hasData() const; + + /** + * @return The Data of the control as a std::string-Object */ std::string getData() const; @@ -80,6 +81,7 @@ std::string m_oid; std::string m_data; bool m_isCritical; + bool m_noData; }; #endif //LDAP_CONTROL_H diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ldapcpplib-0.1.1/version.var new/ldapcpplib-0.1.2/version.var --- old/ldapcpplib-0.1.1/version.var 2008-08-08 11:20:16.000000000 +0200 +++ new/ldapcpplib-0.1.2/version.var 2008-08-27 21:20:11.000000000 +0200 @@ -6,8 +6,8 @@ ol_cpp_api_rel_major=0 ol_cpp_api_rel_minor=1 -ol_cpp_api_rel_patch=1 +ol_cpp_api_rel_patch=2 ol_cpp_api_current=1 -ol_cpp_api_revision=1 +ol_cpp_api_revision=2 ol_cpp_api_age=0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de