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/11/15 21:05:43 UTC
[19/31] qpid-proton git commit: PROTON-1652: Fix tests to run on
Windows - run test in correct directory - some extra broker output flushing -
treat empty ssl cert_name like no cert_name
PROTON-1652: Fix tests to run on Windows
- run test in correct directory
- some extra broker output flushing
- treat empty ssl cert_name like no cert_name
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/23601872
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/23601872
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/23601872
Branch: refs/heads/go1
Commit: 236018722ab8fcb7aa947c319c5e2ec95c235f1d
Parents: fb352ce
Author: Andrew Stitcher <as...@apache.org>
Authored: Fri Oct 27 13:49:14 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Fri Oct 27 13:49:14 2017 -0400
----------------------------------------------------------------------
examples/c/CMakeLists.txt | 5 ++++-
examples/c/broker.c | 1 +
examples/c/direct.c | 1 +
examples/c/send-ssl.c | 1 +
proton-c/src/ssl/schannel.c | 2 +-
5 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/23601872/examples/c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt
index bdb1c7d..894f1d8 100644
--- a/examples/c/CMakeLists.txt
+++ b/examples/c/CMakeLists.txt
@@ -43,4 +43,7 @@ else()
endif()
set(run_env ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/proton-c/env.py ${EXAMPLE_ENV})
-add_test(NAME c-example-tests COMMAND ${run_env} "PATH=${test_path}" ${VALGRIND_ENV} -- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example_test.py -v)
+add_test(
+ NAME c-example-tests
+ COMMAND ${run_env} "PATH=${test_path}" ${VALGRIND_ENV} -- ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example_test.py -v
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/23601872/examples/c/broker.c
----------------------------------------------------------------------
diff --git a/examples/c/broker.c b/examples/c/broker.c
index 541fbff..ceb9e96 100644
--- a/examples/c/broker.c
+++ b/examples/c/broker.c
@@ -365,6 +365,7 @@ static void handle(broker_t* b, pn_event_t* e) {
recv = pn_link_recv(l, m->start, m->size);
if (recv == PN_ABORTED) { /* */
fprintf(stderr, "Message aborted\n");
+ fflush(stderr);
m->size = 0; /* Forget the data we accumulated */
pn_delivery_settle(d); /* Free the delivery so we can receive the next message */
pn_link_flow(l, WINDOW - pn_link_credit(l)); /* Replace credit for the aborted message */
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/23601872/examples/c/direct.c
----------------------------------------------------------------------
diff --git a/examples/c/direct.c b/examples/c/direct.c
index fb737a1..219cd60 100644
--- a/examples/c/direct.c
+++ b/examples/c/direct.c
@@ -150,6 +150,7 @@ static void handle_receive(app_data_t *app, pn_event_t* event) {
recv = pn_link_recv(l, m->start, m->size);
if (recv == PN_ABORTED) {
fprintf(stderr, "Message aborted\n");
+ fflush(stderr);
m->size = 0; /* Forget the data we accumulated */
pn_delivery_settle(d); /* Free the delivery so we can receive the next message */
pn_link_flow(l, 1); /* Replace credit for aborted message */
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/23601872/examples/c/send-ssl.c
----------------------------------------------------------------------
diff --git a/examples/c/send-ssl.c b/examples/c/send-ssl.c
index 8e0722e..83a3ab3 100644
--- a/examples/c/send-ssl.c
+++ b/examples/c/send-ssl.c
@@ -153,6 +153,7 @@ static bool handle(app_data_t* app, pn_event_t* event) {
if (pn_delivery_remote_state(d) == PN_ACCEPTED) {
if (++app->acknowledged == app->message_count) {
printf("%d messages sent and acknowledged\n", app->acknowledged);
+ fflush(stdout);
pn_connection_close(pn_event_connection(event));
/* Continue handling events till we receive TRANSPORT_CLOSED */
}
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/23601872/proton-c/src/ssl/schannel.c
----------------------------------------------------------------------
diff --git a/proton-c/src/ssl/schannel.c b/proton-c/src/ssl/schannel.c
index 788b52d..054683c 100644
--- a/proton-c/src/ssl/schannel.c
+++ b/proton-c/src/ssl/schannel.c
@@ -177,7 +177,7 @@ static int win_credential_load_cert(win_credential_t *cred, const char *store_na
char *fn = name_len ? (char *) malloc(name_len + 1) : 0;
while (tmpctx = CertEnumCertificatesInStore(cert_store, tmpctx)) {
cert_count++;
- if (cert_name) {
+ if (cert_name && *cert_name) {
DWORD len = CertGetNameString(tmpctx, CERT_NAME_FRIENDLY_DISPLAY_TYPE,
0, NULL, NULL, 0);
if (len != name_len + 1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org