summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-17 17:03:43 +0000
committerAlan Conway <aconway@apache.org>2008-11-17 17:03:43 +0000
commit4aad013bdb4fcac090a31d20b333345865a32309 (patch)
treed95fa97a418ed096b33d093ca23a4be1dc6f86fb /cpp/src/qpid
parent392cd6f2b17e51631dde930668d437356430ab82 (diff)
downloadqpid-python-4aad013bdb4fcac090a31d20b333345865a32309.tar.gz
Remove optimistic consume options. Better default message for SSL errors.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@718277 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/broker/Queue.h1
-rw-r--r--cpp/src/qpid/client/QueueOptions.cpp11
-rw-r--r--cpp/src/qpid/client/QueueOptions.h12
-rw-r--r--cpp/src/qpid/sys/ssl/check.cpp2
4 files changed, 2 insertions, 24 deletions
diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h
index 21cb5ad42d..76d9a59c3e 100644
--- a/cpp/src/qpid/broker/Queue.h
+++ b/cpp/src/qpid/broker/Queue.h
@@ -76,7 +76,6 @@ namespace qpid {
OwnershipToken* exclusive;
bool noLocal;
bool lastValueQueue;
- bool optimisticConsume;
bool persistLastNode;
bool inLastNodeFailure;
std::string traceId;
diff --git a/cpp/src/qpid/client/QueueOptions.cpp b/cpp/src/qpid/client/QueueOptions.cpp
index 9719183ec4..66cf8544f0 100644
--- a/cpp/src/qpid/client/QueueOptions.cpp
+++ b/cpp/src/qpid/client/QueueOptions.cpp
@@ -36,7 +36,6 @@ const std::string QueueOptions::strFLOW_TO_DISK("flow_to_disk");
const std::string QueueOptions::strRING("ring");
const std::string QueueOptions::strRING_STRICT("ring_strict");
const std::string QueueOptions::strLastValueQueue("qpid.last_value_queue");
-const std::string QueueOptions::strOptimisticConsume("qpid.optimistic_consume");
const std::string QueueOptions::strPersistLastNode("qpid.persist_last_node");
const std::string QueueOptions::strLVQMatchProperty("qpid.LVQ_key");
@@ -71,11 +70,6 @@ void QueueOptions::setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t
}
-void QueueOptions::setOptimisticConsume()
-{
- setInt(strOptimisticConsume, 1);
-}
-
void QueueOptions::setPersistLastNode()
{
setInt(strPersistLastNode, 1);
@@ -102,11 +96,6 @@ void QueueOptions::clearSizePolicy()
erase(strTypeKey);
}
-void QueueOptions::clearOptimisticConsume()
-{
- erase(strOptimisticConsume);
-}
-
void QueueOptions::clearPersistLastNode()
{
erase(strPersistLastNode);
diff --git a/cpp/src/qpid/client/QueueOptions.h b/cpp/src/qpid/client/QueueOptions.h
index 149bb6c34a..e9deb7ead8 100644
--- a/cpp/src/qpid/client/QueueOptions.h
+++ b/cpp/src/qpid/client/QueueOptions.h
@@ -54,12 +54,6 @@ class QueueOptions: public framing::FieldTable
void setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount );
/**
- * Enables optimistic consume allowing the consumer to dequeue the message before the
- * broker has safe stored it.
- */
- void setOptimisticConsume();
-
- /**
* Enables the persisting of a queue to the store module when a cluster fails down to it's last
* node. Does so optimistically. Will start persisting when cluster count >1 again.
*/
@@ -76,11 +70,6 @@ class QueueOptions: public framing::FieldTable
void clearSizePolicy();
/**
- * Clear Optimistic Consume Policy
- */
- void clearOptimisticConsume();
-
- /**
* Clear Persist Last Node Policy
*/
void clearPersistLastNode();
@@ -103,7 +92,6 @@ class QueueOptions: public framing::FieldTable
static const std::string strRING;
static const std::string strRING_STRICT;
static const std::string strLastValueQueue;
- static const std::string strOptimisticConsume;
static const std::string strPersistLastNode;
static const std::string strLVQMatchProperty;
};
diff --git a/cpp/src/qpid/sys/ssl/check.cpp b/cpp/src/qpid/sys/ssl/check.cpp
index 2f95ab71b8..b580e9bcf5 100644
--- a/cpp/src/qpid/sys/ssl/check.cpp
+++ b/cpp/src/qpid/sys/ssl/check.cpp
@@ -35,6 +35,7 @@ const std::string SSL_ERROR_BAD_CERT_DOMAIN_STR =
const std::string SSL_ERROR_BAD_CERT_ALERT_STR = "SSL peer cannot verify your certificate.";
const std::string SEC_ERROR_BAD_DATABASE_STR = "Security library: bad database.";
const std::string SSL_ERROR_NO_CERTIFICATE_STR = "Unable to find the certificate or key necessary for authentication.";
+const std::string SSL_ERROR_UNKNOWN = "Unknown NSS error code.";
ErrorString::ErrorString() : code(PR_GetError()), buffer(new char[PR_GetErrorTextLength()]), used(PR_GetErrorText(buffer)) {}
@@ -55,6 +56,7 @@ std::string ErrorString::getString() const
case SSL_ERROR_BAD_CERT_ALERT: msg = SSL_ERROR_BAD_CERT_ALERT_STR; break;
case SEC_ERROR_BAD_DATABASE: msg = SEC_ERROR_BAD_DATABASE_STR; break;
case SSL_ERROR_NO_CERTIFICATE: msg = SSL_ERROR_NO_CERTIFICATE_STR; break;
+ default: msg = SSL_ERROR_UNKNOWN; break;
}
}
return str(format("%1% [%2%]") % msg % code);