[cpp-sp COMMIT] in /branches/REL_2: configure.ac memcache-store/memcache-store.cpp shibboleth.spec.in

noreply at shibboleth.net noreply at shibboleth.net
Fri Feb 10 18:41:30 GMT 2012


Author: scantor
Date: Fri Feb 10 18:41:30 2012
New Revision: 3576

URL: http://svn.shibboleth.net/view/cpp-sp?rev=3576&view=rev
Log:
https://issues.shibboleth.net/jira/browse/SSPCPP-420

Modified:
    branches/REL_2/configure.ac
    branches/REL_2/memcache-store/memcache-store.cpp
    branches/REL_2/shibboleth.spec.in

Modified: branches/REL_2/configure.ac
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/configure.ac?rev=3576&r1=3575&r2=3576&view=diff
==============================================================================
--- branches/REL_2/configure.ac (original)
+++ branches/REL_2/configure.ac Fri Feb 10 18:41:30 2012
@@ -511,6 +511,9 @@
     fi
     AC_CHECK_HEADER([libmemcached/memcached.h],,
         AC_MSG_ERROR([unable to find Memcached header files]))
+    AC_CHECK_DECL([memcached_last_error_message],
+        [AC_DEFINE([HAVE_MEMCACHED_LAST_ERROR_MESSAGE],[1],[Define to 1 if libmemcached supports error handling function.])],,
+        [#include <libmemcached/memcached.h>])
     MEMCACHED_LIBS="-lmemcached"
 fi
 

Modified: branches/REL_2/memcache-store/memcache-store.cpp
URL: http://svn.shibboleth.net/view/cpp-sp/branches/REL_2/memcache-store/memcache-store.cpp?rev=3576&r1=3575&r2=3576&view=diff
==============================================================================
--- branches/REL_2/memcache-store/memcache-store.cpp (original)
+++ branches/REL_2/memcache-store/memcache-store.cpp Fri Feb 10 18:41:30 2012
@@ -42,6 +42,7 @@
 
 #include <list>
 #include <iostream> 
+#include <boost/scoped_ptr.hpp>
 #include <libmemcached/memcached.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 
@@ -56,703 +57,568 @@
 using namespace xmltooling::logging;
 using namespace xmltooling;
 using namespace xercesc;
+using namespace boost;
 using namespace std;
 
-namespace xmltooling {
-  static const XMLCh Hosts[] = UNICODE_LITERAL_5(H,o,s,t,s);
-  static const XMLCh prefix[] = UNICODE_LITERAL_6(p,r,e,f,i,x);
-  static const XMLCh buildMap[] = UNICODE_LITERAL_8(b,u,i,l,d,M,a,p);
-  static const XMLCh sendTimeout[] = UNICODE_LITERAL_11(s,e,n,d,T,i,m,e,o,u,t);
-  static const XMLCh recvTimeout[] = UNICODE_LITERAL_11(r,e,c,v,T,i,m,e,o,u,t);
-  static const XMLCh pollTimeout[] = UNICODE_LITERAL_11(p,o,l,l,T,i,m,e,o,u,t);
-  static const XMLCh failLimit[] = UNICODE_LITERAL_9(f,a,i,l,L,i,m,i,t);
-  static const XMLCh retryTimeout[] = UNICODE_LITERAL_12(r,e,t,r,y,T,i,m,e,o,u,t);
-  static const XMLCh nonBlocking[] = UNICODE_LITERAL_11(n,o,n,B,l,o,c,k,i,n,g);
+namespace {
+    static const XMLCh Hosts[] = UNICODE_LITERAL_5(H,o,s,t,s);
+    static const XMLCh prefix[] = UNICODE_LITERAL_6(p,r,e,f,i,x);
+    static const XMLCh buildMap[] = UNICODE_LITERAL_8(b,u,i,l,d,M,a,p);
+    static const XMLCh sendTimeout[] = UNICODE_LITERAL_11(s,e,n,d,T,i,m,e,o,u,t);
+    static const XMLCh recvTimeout[] = UNICODE_LITERAL_11(r,e,c,v,T,i,m,e,o,u,t);
+    static const XMLCh pollTimeout[] = UNICODE_LITERAL_11(p,o,l,l,T,i,m,e,o,u,t);
+    static const XMLCh failLimit[] = UNICODE_LITERAL_9(f,a,i,l,L,i,m,i,t);
+    static const XMLCh retryTimeout[] = UNICODE_LITERAL_12(r,e,t,r,y,T,i,m,e,o,u,t);
+    static const XMLCh nonBlocking[] = UNICODE_LITERAL_11(n,o,n,B,l,o,c,k,i,n,g);
   
-  class mc_record {
-  public:
-    string value;
-    time_t expiration;
-    mc_record(){};
-    mc_record(string _v, time_t _e) :
-      value(_v), expiration(_e)
-    {}
-  };
-
-  class MemcacheBase {
-  public:
-    MemcacheBase(const DOMElement* e);
-    ~MemcacheBase();
+    class mc_record {
+    public:
+        string value;
+        time_t expiration;
+        mc_record() {};
+        mc_record(string _v, time_t _e) : value(_v), expiration(_e) {}
+    };
+
+    class MemcacheBase {
+    public:
+        MemcacheBase(const DOMElement* e);
+        ~MemcacheBase();
         
-    bool addMemcache(const char *key,
-                     string &value,
-                     time_t timeout,
-                     uint32_t flags,
-                     bool use_prefix = true);
-    bool setMemcache(const char *key,
-                     string &value,
-                     time_t timeout,
-                     uint32_t flags,
-                     bool use_prefix = true);
-    bool replaceMemcache(const char *key,
-                         string &value,
-                         time_t timeout,
-                         uint32_t flags,
-                         bool use_prefix = true);
-    bool getMemcache(const char *key,
-                     string &dest,
-                     uint32_t *flags,
-                     bool use_prefix = true);
-    bool deleteMemcache(const char *key,
-                        time_t timeout,
-                        bool use_prefix = true);
-
-    void serialize(mc_record &source, string &dest);
-    void serialize(list<string> &source, string &dest);
-    void deserialize(string &source, mc_record &dest);
-    void deserialize(string &source, list<string> &dest);
-
-    bool addLock(string what, bool use_prefix = true);
-    void deleteLock(string what, bool use_prefix = true);
-
-  protected:

[... 1197 lines stripped ...]


More information about the commits mailing list