You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/06/12 21:31:14 UTC
[1/2] qpid-proton git commit: NO-JIRA: proton-c added
pn_disposition_type_name() for logging
Repository: qpid-proton
Updated Branches:
refs/heads/master cd5551778 -> 4fd08e09d
NO-JIRA: proton-c added pn_disposition_type_name() for logging
Analogous to pn_event_type_name() for dispositions.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/c5c2ff13
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/c5c2ff13
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/c5c2ff13
Branch: refs/heads/master
Commit: c5c2ff133289423959c81713ee023368d7b3e86f
Parents: cd55517
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Jun 9 17:54:43 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Jun 9 17:54:43 2017 -0400
----------------------------------------------------------------------
proton-c/include/proton/disposition.h | 5 +++++
proton-c/src/core/engine.c | 11 +++++++++++
2 files changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c5c2ff13/proton-c/include/proton/disposition.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/disposition.h b/proton-c/include/proton/disposition.h
index 1d35db7..de438bf 100644
--- a/proton-c/include/proton/disposition.h
+++ b/proton-c/include/proton/disposition.h
@@ -105,6 +105,11 @@ typedef struct pn_disposition_t pn_disposition_t;
PN_EXTERN uint64_t pn_disposition_type(pn_disposition_t *disposition);
/**
+ * Name of a disposition type for logging and debugging: "received", "accepted" etc.
+ */
+PN_EXTERN const char *pn_disposition_type_name(uint64_t disposition_type);
+
+/**
* Access the condition object associated with a disposition.
*
* The ::pn_condition_t object retrieved by this operation may be
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c5c2ff13/proton-c/src/core/engine.c
----------------------------------------------------------------------
diff --git a/proton-c/src/core/engine.c b/proton-c/src/core/engine.c
index efddc93..3264d01 100644
--- a/proton-c/src/core/engine.c
+++ b/proton-c/src/core/engine.c
@@ -2309,3 +2309,14 @@ pn_condition_t *pn_event_condition(pn_event_t *e) {
return NULL;
}
}
+
+const char *pn_disposition_type_name(uint64_t d) {
+ switch(d) {
+ case PN_RECEIVED: return "received";
+ case PN_ACCEPTED: return "accepted";
+ case PN_REJECTED: return "rejected";
+ case PN_RELEASED: return "released";
+ case PN_MODIFIED: return "modified";
+ default: return "unknown";
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-proton git commit: PROTON-1501: c epoll proactor can raise
SIGPIPE
Posted by ac...@apache.org.
PROTON-1501: c epoll proactor can raise SIGPIPE
Use MSG_NOSIGNAL flag to send() to prevent SIGPIPE being raised on write to a
broken pipe.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/4fd08e09
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/4fd08e09
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/4fd08e09
Branch: refs/heads/master
Commit: 4fd08e09d3d686e0cbf953ea5e2d3f22c6160598
Parents: c5c2ff1
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Jun 12 13:48:39 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Mon Jun 12 13:48:39 2017 -0400
----------------------------------------------------------------------
proton-c/src/proactor/epoll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/4fd08e09/proton-c/src/proactor/epoll.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/epoll.c b/proton-c/src/proactor/epoll.c
index 1f10ca0..c4d0c73 100644
--- a/proton-c/src/proactor/epoll.c
+++ b/proton-c/src/proactor/epoll.c
@@ -889,7 +889,7 @@ static pconnection_t *get_pconnection(pn_connection_t* c) {
// Return true unless error
static bool pconnection_write(pconnection_t *pc, pn_bytes_t wbuf) {
- ssize_t n = write(pc->psocket.sockfd, wbuf.start, wbuf.size);
+ ssize_t n = send(pc->psocket.sockfd, wbuf.start, wbuf.size, MSG_NOSIGNAL);
if (n > 0) {
pn_connection_driver_write_done(&pc->driver, n);
if ((size_t) n < wbuf.size) pc->write_blocked = true;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org