Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B12BF200C4E for ; Wed, 1 Mar 2017 21:54:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AFFE0160B56; Wed, 1 Mar 2017 20:54:56 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0B8A8160B7F for ; Wed, 1 Mar 2017 21:54:55 +0100 (CET) Received: (qmail 35130 invoked by uid 500); 1 Mar 2017 20:54:55 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 35063 invoked by uid 99); 1 Mar 2017 20:54:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2017 20:54:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 02F54DFFC0; Wed, 1 Mar 2017 20:54:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aconway@apache.org To: commits@qpid.apache.org Date: Wed, 01 Mar 2017 20:54:56 -0000 Message-Id: <3dd8647e923b4d6390cb3acd396905b9@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/4] qpid-dispatch git commit: DISPATCH-309: Added AMQP condition constants archived-at: Wed, 01 Mar 2017 20:54:56 -0000 DISPATCH-309: Added AMQP condition constants Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/275a8fb3 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/275a8fb3 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/275a8fb3 Branch: refs/heads/master Commit: 275a8fb30058942c6e040c46388eedf89929101a Parents: 454474e Author: Alan Conway Authored: Mon Jan 23 10:08:51 2017 -0500 Committer: Alan Conway Committed: Wed Mar 1 13:59:59 2017 -0500 ---------------------------------------------------------------------- include/qpid/dispatch/amqp.h | 21 +++++++++++++++++++-- src/amqp.c | 16 ++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/275a8fb3/include/qpid/dispatch/amqp.h ---------------------------------------------------------------------- diff --git a/include/qpid/dispatch/amqp.h b/include/qpid/dispatch/amqp.h index bda1300..59332df 100644 --- a/include/qpid/dispatch/amqp.h +++ b/include/qpid/dispatch/amqp.h @@ -132,7 +132,7 @@ extern const char * const QD_CONNECTION_PROPERTY_COST_KEY; /** @name AMQP error codes. */ /// @{ -/** An AMQP error status code and string description */ +/** AMQP management error status code and string description (HTTP-style) */ typedef struct qd_amqp_error_t { int status; const char* description; } qd_amqp_error_t; extern const qd_amqp_error_t QD_AMQP_OK; extern const qd_amqp_error_t QD_AMQP_CREATED; @@ -143,6 +143,23 @@ extern const qd_amqp_error_t QD_AMQP_NOT_FOUND; extern const qd_amqp_error_t QD_AMQP_NOT_IMPLEMENTED; /// @} -/// @} +/** @name Standard AMQP error condition names. */ +/// @{ +extern const char * const QD_AMQP_COND_INTERNAL_ERROR; +extern const char * const QD_AMQP_COND_NOT_FOUND; +extern const char * const QD_AMQP_COND_UNAUTHORIZED_ACCESS; +extern const char * const QD_AMQP_COND_DECODE_ERROR; +extern const char * const QD_AMQP_COND_RESOURCE_LIMIT_EXCEEDED; +extern const char * const QD_AMQP_COND_NOT_ALLOWED; +extern const char * const QD_AMQP_COND_INVALID_FIELD; +extern const char * const QD_AMQP_COND_NOT_IMPLEMENTED; +extern const char * const QD_AMQP_COND_RESOURCE_LOCKED; +extern const char * const QD_AMQP_COND_PRECONDITION_FAILED; +extern const char * const QD_AMQP_COND_RESOURCE_DELETED; +extern const char * const QD_AMQP_COND_ILLEGAL_STATE; +extern const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL; +/// @}; +/// Name for AMQP conditions from the router that don't have a more specific name. +extern const char * const QD_COND; #endif http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/275a8fb3/src/amqp.c ---------------------------------------------------------------------- diff --git a/src/amqp.c b/src/amqp.c index 9568800..4d2062d 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -44,3 +44,19 @@ const qd_amqp_error_t QD_AMQP_BAD_REQUEST = { 400, "Bad Request" }; const qd_amqp_error_t QD_AMQP_FORBIDDEN = { 403, "Forbidden" }; const qd_amqp_error_t QD_AMQP_NOT_FOUND = { 404, "Not Found" }; const qd_amqp_error_t QD_AMQP_NOT_IMPLEMENTED = { 501, "Not Implemented"}; + +const char * const QD_AMQP_COND_INTERNAL_ERROR = "amqp:internal-error"; +const char * const QD_AMQP_COND_NOT_FOUND = "amqp:not-found"; +const char * const QD_AMQP_COND_UNAUTHORIZED_ACCESS = "amqp:unauthorized-access"; +const char * const QD_AMQP_COND_DECODE_ERROR = "amqp:decode-error"; +const char * const QD_AMQP_COND_RESOURCE_LIMIT_EXCEEDED = "amqp:resource-limit-exceeded"; +const char * const QD_AMQP_COND_NOT_ALLOWED = "amqp:not-allowed"; +const char * const QD_AMQP_COND_INVALID_FIELD = "amqp:invalid-field"; +const char * const QD_AMQP_COND_NOT_IMPLEMENTED = "amqp:not-implemented"; +const char * const QD_AMQP_COND_RESOURCE_LOCKED = "amqp:resource-locked"; +const char * const QD_AMQP_COND_PRECONDITION_FAILED = "amqp:precondition-failed"; +const char * const QD_AMQP_COND_RESOURCE_DELETED = "amqp:resource-deleted"; +const char * const QD_AMQP_COND_ILLEGAL_STATE = "amqp:illegal-state"; +const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL = "amqp:frame-size-too-small"; + +const char * const QD_COND_NAME = "router:error"; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org