You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2015/04/29 21:38:48 UTC

[01/13] qpid-proton git commit: PROTON-870: Fix none_sasl.c to use pn_strdup instead of strdup This closes #24

Repository: qpid-proton
Updated Branches:
  refs/heads/kgiusti-python3 64a7ce296 -> 758295d2b


PROTON-870: Fix none_sasl.c to use pn_strdup instead of strdup
This closes #24


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/73d8ff9a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/73d8ff9a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/73d8ff9a

Branch: refs/heads/kgiusti-python3
Commit: 73d8ff9af3e2745020157bca9338ea29848bb358
Parents: f05810e
Author: dcristoloveanu <dc...@microsoft.com>
Authored: Mon Apr 27 17:44:05 2015 -0700
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Apr 28 00:10:32 2015 -0400

----------------------------------------------------------------------
 proton-c/src/sasl/none_sasl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/73d8ff9a/proton-c/src/sasl/none_sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/none_sasl.c b/proton-c/src/sasl/none_sasl.c
index 87f7917..ff962ac 100644
--- a/proton-c/src/sasl/none_sasl.c
+++ b/proton-c/src/sasl/none_sasl.c
@@ -25,6 +25,7 @@
 #include "buffer.h"
 #include "protocol.h"
 #include "dispatch_actions.h"
+#include "util.h"
 #include "engine/engine-internal.h"
 
 struct pni_sasl_t {
@@ -93,7 +94,7 @@ void pn_sasl_allowed_mechs(pn_sasl_t *sasl0, const char *mechs)
   pni_sasl_t *sasl = get_sasl_internal(sasl0);
   if (!sasl) return;
   free(sasl->included_mechanisms);
-  sasl->included_mechanisms = mechs ? strdup(mechs) : NULL;
+  sasl->included_mechanisms = mechs ? pn_strdup(mechs) : NULL;
   if (strcmp(mechs, "ANONYMOUS")==0 ) {
     // If we do this on the client it is a hack to tell us that
     // no actual negatiation is going to happen and we can go
@@ -165,7 +166,7 @@ void pni_sasl_set_user_password(pn_transport_t *transport, const char *user, con
 {
   pni_sasl_t *sasl = transport->sasl;
   sasl->username = user;
-  sasl->password = password ? strdup(password) : NULL;
+  sasl->password = password ? pn_strdup(password) : NULL;
 }
 
 const char *pn_sasl_get_user(pn_sasl_t *sasl0)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[13/13] qpid-proton git commit: Merge branch 'master' into kgiusti-python3

Posted by kg...@apache.org.
Merge branch 'master' into kgiusti-python3


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/758295d2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/758295d2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/758295d2

Branch: refs/heads/kgiusti-python3
Commit: 758295d2bb601dc34b6892027616bf0644674d38
Parents: 64a7ce2 fe3290b
Author: Ken Giusti <kg...@apache.org>
Authored: Wed Apr 29 15:36:52 2015 -0400
Committer: Ken Giusti <kg...@apache.org>
Committed: Wed Apr 29 15:36:52 2015 -0400

----------------------------------------------------------------------
 CMakeLists.txt                                  |  7 ++++++
 proton-c/include/proton/sasl.h                  |  2 +-
 proton-c/src/sasl/cyrus_sasl.c                  |  6 ++++-
 proton-c/src/sasl/none_sasl.c                   |  5 ++--
 proton-c/src/tests/CMakeLists.txt               | 10 +++-----
 .../apache/qpid/proton/engine/Transport.java    |  4 +++
 .../qpid/proton/engine/impl/FrameParser.java    | 10 +++++++-
 .../qpid/proton/engine/impl/FrameWriter.java    |  7 ++++++
 .../qpid/proton/engine/impl/TransportImpl.java  | 12 +++++++++
 proton-j/src/main/resources/cengine.py          |  5 +++-
 tests/python/proton_tests/engine.py             | 21 ++++++++++++++++
 tests/python/proton_tests/messenger.py          | 26 +++++++++++---------
 12 files changed, 92 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/758295d2/tests/python/proton_tests/engine.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/758295d2/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[07/13] qpid-proton git commit: give up on ever more specific asserts

Posted by kg...@apache.org.
give up on ever more specific asserts


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/0d266c67
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/0d266c67
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/0d266c67

Branch: refs/heads/kgiusti-python3
Commit: 0d266c679b3ad46d635ea7dc08d936ac6163cd12
Parents: a6d3818
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Tue Apr 28 10:52:01 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Tue Apr 28 10:52:33 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 10 ----------
 1 file changed, 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0d266c67/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 0fc9fec..94e4e0d 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1013,16 +1013,6 @@ class SelectableMessengerTest(common.Test):
     mc = Message()
 
     for i in range(count):
-      before = msnd.outgoing
-      if mrcv.incoming == 0:
-        p.pump()
-      # If we didn't receive the messages, check that they are
-      # in-flight. We can only check this after the first message
-      # arrives since sasl handshaking might require multiple pumps
-      # prior to the first message arrival.
-      if i > 0 and mrcv.incoming == 0:
-        assert msnd.outgoing < before
-      # now pump until they arrive
       while mrcv.incoming == 0:
         p.pump()
       assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[02/13] qpid-proton git commit: added error info for assertion

Posted by kg...@apache.org.
added error info for assertion


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/da117ea2
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/da117ea2
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/da117ea2

Branch: refs/heads/kgiusti-python3
Commit: da117ea289743f560fc26bc16dd8962f3d7a94e7
Parents: 73d8ff9
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Tue Apr 28 06:34:03 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Tue Apr 28 06:34:03 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/da117ea2/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index c7c7dd3..298c5d9 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1015,7 +1015,7 @@ class SelectableMessengerTest(common.Test):
     for i in range(count):
       if mrcv.incoming == 0:
         p.pump()
-      assert mrcv.incoming > 0
+      assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
       mrcv.get(mc)
       assert mc.body == u"Hello World! %s" % i, (i, mc.body)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[03/13] qpid-proton git commit: modify testSelectable to allow for in-flight messages

Posted by kg...@apache.org.
modify testSelectable to allow for in-flight messages


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9ab060fd
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9ab060fd
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9ab060fd

Branch: refs/heads/kgiusti-python3
Commit: 9ab060fda2afbfdf2046decf0ea9d80db594dc6a
Parents: da117ea
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Tue Apr 28 06:54:04 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Tue Apr 28 06:54:04 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9ab060fd/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 298c5d9..26600e9 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1013,8 +1013,15 @@ class SelectableMessengerTest(common.Test):
     mc = Message()
 
     for i in range(count):
+      before = mrcv.outgoing
       if mrcv.incoming == 0:
         p.pump()
+      # if we didn't receive the messages, they should be "in flight"
+      if mrcv.incoming == 0:
+        assert msnd.outgoing < before
+      # now pump until they arrive
+      while mrcv.incoming == 0:
+        p.pump()
       assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
       mrcv.get(mc)
       assert mc.body == u"Hello World! %s" % i, (i, mc.body)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[11/13] qpid-proton git commit: PROTON-344: Fix code not to trigger pedantic C++ warning

Posted by kg...@apache.org.
PROTON-344: Fix code not to trigger pedantic C++ warning


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/5f06462f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/5f06462f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/5f06462f

Branch: refs/heads/kgiusti-python3
Commit: 5f06462f37fa10d2da36e7755fa813c5b57986bd
Parents: 57d6dcc
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Apr 28 15:48:04 2015 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Apr 28 15:49:29 2015 -0400

----------------------------------------------------------------------
 proton-c/include/proton/sasl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/5f06462f/proton-c/include/proton/sasl.h
----------------------------------------------------------------------
diff --git a/proton-c/include/proton/sasl.h b/proton-c/include/proton/sasl.h
index 635e7a8..b2a8a27 100644
--- a/proton-c/include/proton/sasl.h
+++ b/proton-c/include/proton/sasl.h
@@ -53,7 +53,7 @@ typedef enum {
   PN_SASL_AUTH=1,   /** failed due to bad credentials */
   PN_SASL_SYS=2,    /** failed due to a system error */
   PN_SASL_PERM=3,   /** failed due to unrecoverable error */
-  PN_SASL_TEMP=4,   /** failed due to transient error */
+  PN_SASL_TEMP=4    /** failed due to transient error */
 } pn_sasl_outcome_t;
 
 /** Construct an Authentication and Security Layer object


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[09/13] qpid-proton git commit: NO-JIRA: fix SelectableMessengerTest on Mac

Posted by kg...@apache.org.
NO-JIRA: fix SelectableMessengerTest on Mac

The SelectableMessengerTest was failing intermittently on Mac builds,
Modify the test slightly to be more resilient.

Closes #23


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/dd95103e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/dd95103e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/dd95103e

Branch: refs/heads/kgiusti-python3
Commit: dd95103e510df31796482ea490f603c65e1a495f
Parents: a509195
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Tue Apr 28 16:11:30 2015 +0100
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Tue Apr 28 16:14:26 2015 +0100

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/dd95103e/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 94e4e0d..23004ba 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1012,17 +1012,21 @@ class SelectableMessengerTest(common.Test):
 
     mc = Message()
 
-    for i in range(count):
-      while mrcv.incoming == 0:
-        p.pump()
-      assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
-      mrcv.get(mc)
-      assert mc.body == u"Hello World! %s" % i, (i, mc.body)
-
-    mrcv.stop()
-    assert not mrcv.stopped
-    p.pump()
-    assert mrcv.stopped
+    try:
+      for i in range(count):
+        while mrcv.incoming == 0:
+          p.pump()
+        assert mrcv.incoming > 0, (count, msnd.outgoing, mrcv.incoming)
+        mrcv.get(mc)
+        assert mc.body == u"Hello World! %s" % i, (i, mc.body)
+    finally:
+      mrcv.stop()
+      msnd.stop()
+      assert not mrcv.stopped
+      assert not msnd.stopped
+      p.pump()
+      assert mrcv.stopped
+      assert msnd.stopped
 
   def testSelectable16(self):
     self.testSelectable(count=16)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[06/13] qpid-proton git commit: NO-JIRA: Fix CMP0026 CMake warnings and fix windows tests

Posted by kg...@apache.org.
NO-JIRA: Fix CMP0026 CMake warnings and fix windows tests


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a6d38181
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a6d38181
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a6d38181

Branch: refs/heads/kgiusti-python3
Commit: a6d38181dba576ae65a4eeb25aa6929e43b7fd0d
Parents: 2d899d1
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Apr 28 01:11:23 2015 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Apr 28 10:50:47 2015 -0400

----------------------------------------------------------------------
 proton-c/src/tests/CMakeLists.txt | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a6d38181/proton-c/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/src/tests/CMakeLists.txt b/proton-c/src/tests/CMakeLists.txt
index efec9bd..ac749e1 100644
--- a/proton-c/src/tests/CMakeLists.txt
+++ b/proton-c/src/tests/CMakeLists.txt
@@ -29,12 +29,10 @@ macro (pn_add_c_test test file)
   target_link_libraries (${test} qpid-proton)
   pn_c_files (${file})
   if (CMAKE_SYSTEM_NAME STREQUAL Windows)
-    get_target_property(QPID_PROTON_TARGET qpid-proton LOCATION_${bld_suffix})
-    get_target_property(${test}_LOCATION ${test} LOCATION_${bld_suffix})
-    get_filename_component(QPID_PROTON_TARGET_DIR ${QPID_PROTON_TARGET} PATH)
-    add_test (${test} ${env_py}
-	          "PATH=${QPID_PROTON_TARGET_DIR}"
-	          ${${test}_LOCATION})
+    add_test (NAME ${test}
+              COMMAND ${env_py}
+                "PATH=$<TARGET_FILE_DIR:qpid-proton>"
+                $<TARGET_FILE:${test}>)
   else ()
     add_test (${test} ${memcheck-cmd} ${CMAKE_CURRENT_BINARY_DIR}/${test})
   endif ()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[04/13] qpid-proton git commit: fixed braino

Posted by kg...@apache.org.
fixed braino


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/0c1de249
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/0c1de249
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/0c1de249

Branch: refs/heads/kgiusti-python3
Commit: 0c1de249e5be4cb5dc9eb394222e72dee9b64b53
Parents: 9ab060f
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Tue Apr 28 06:59:08 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Tue Apr 28 06:59:08 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0c1de249/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 26600e9..172e38c 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1013,7 +1013,7 @@ class SelectableMessengerTest(common.Test):
     mc = Message()
 
     for i in range(count):
-      before = mrcv.outgoing
+      before = msnd.outgoing
       if mrcv.incoming == 0:
         p.pump()
       # if we didn't receive the messages, they should be "in flight"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[12/13] qpid-proton git commit: reproducer and fix for sasl infinite event loop

Posted by kg...@apache.org.
reproducer and fix for sasl infinite event loop


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/fe3290be
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/fe3290be
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/fe3290be

Branch: refs/heads/kgiusti-python3
Commit: fe3290be1d12b6f3731333fc35311ffde37d4ce0
Parents: 5f06462
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Wed Apr 29 11:48:51 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Wed Apr 29 14:21:44 2015 -0400

----------------------------------------------------------------------
 proton-c/src/sasl/cyrus_sasl.c      |  6 +++++-
 tests/python/proton_tests/engine.py | 21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fe3290be/proton-c/src/sasl/cyrus_sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/cyrus_sasl.c b/proton-c/src/sasl/cyrus_sasl.c
index 8738507..58d6c9b 100644
--- a/proton-c/src/sasl/cyrus_sasl.c
+++ b/proton-c/src/sasl/cyrus_sasl.c
@@ -241,6 +241,7 @@ static void pni_post_sasl_frame(pn_transport_t *transport)
     case SASL_POSTED_INIT:
       pn_post_frame(transport, SASL_FRAME_TYPE, 0, "DL[sz]", SASL_INIT, sasl->selected_mechanism,
                     out.size, out.start);
+      pni_emit(transport);
       break;
     case SASL_PRETEND_OUTCOME:
       if (sasl->last_state < SASL_POSTED_INIT) {
@@ -267,10 +268,12 @@ static void pni_post_sasl_frame(pn_transport_t *transport)
       }
       pn_post_frame(transport, SASL_FRAME_TYPE, 0, "DL[@T[*s]]", SASL_MECHANISMS, PN_SYMBOL, count, mechs);
       free(mechlist);
+      pni_emit(transport);
       break;
     }
     case SASL_POSTED_RESPONSE:
       pn_post_frame(transport, SASL_FRAME_TYPE, 0, "DL[z]", SASL_RESPONSE, out.size, out.start);
+      pni_emit(transport);
       break;
     case SASL_POSTED_CHALLENGE:
       if (sasl->last_state < SASL_POSTED_MECHANISMS) {
@@ -278,6 +281,7 @@ static void pni_post_sasl_frame(pn_transport_t *transport)
         continue;
       }
       pn_post_frame(transport, SASL_FRAME_TYPE, 0, "DL[z]", SASL_CHALLENGE, out.size, out.start);
+      pni_emit(transport);
       break;
     case SASL_POSTED_OUTCOME:
       if (sasl->last_state < SASL_POSTED_MECHANISMS) {
@@ -285,6 +289,7 @@ static void pni_post_sasl_frame(pn_transport_t *transport)
         continue;
       }
       pn_post_frame(transport, SASL_FRAME_TYPE, 0, "DL[B]", SASL_OUTCOME, sasl->outcome);
+      pni_emit(transport);
       break;
     case SASL_NONE:
     case SASL_RECVED_OUTCOME:
@@ -293,7 +298,6 @@ static void pni_post_sasl_frame(pn_transport_t *transport)
     sasl->last_state = desired_state;
     desired_state = sasl->desired_state;
   }
-  pni_emit(transport);
 }
 
 // Set up callbacks to use interact

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fe3290be/tests/python/proton_tests/engine.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/engine.py b/tests/python/proton_tests/engine.py
index 3944b85..2d2b8cd 100644
--- a/tests/python/proton_tests/engine.py
+++ b/tests/python/proton_tests/engine.py
@@ -2465,3 +2465,24 @@ class DeliverySegFaultTest(Test):
     t.bind(conn)
     t.unbind()
     dlv = snd.delivery("tag")
+
+class SaslEventTest(CollectorTest):
+
+  def testAnonymousNoInitialResponse(self):
+    if "java" in sys.platform:
+      raise Skipped()
+    conn = Connection()
+    conn.collect(self.collector)
+    transport = Transport(Transport.SERVER)
+    transport.bind(conn)
+    self.expect(Event.CONNECTION_INIT, Event.CONNECTION_BOUND)
+
+    transport.push('AMQP\x03\x01\x00\x00\x00\x00\x00 \x02\x01\x00\x00\x00SA'
+                   '\xd0\x00\x00\x00\x10\x00\x00\x00\x02\xa3\tANONYMOUS@'
+                   'AMQP\x00\x01\x00\x00')
+    self.expect(Event.TRANSPORT)
+    for i in range(1024):
+      p = transport.pending()
+      self.drain()
+    p = transport.pending()
+    self.expect()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[10/13] qpid-proton git commit: PROTON-871: implement the needed frame counting bits to stop the shim making the IdleTimeoutTest skip when run

Posted by kg...@apache.org.
PROTON-871: implement the needed frame counting bits to stop the shim making the IdleTimeoutTest skip when run


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/57d6dcc7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/57d6dcc7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/57d6dcc7

Branch: refs/heads/kgiusti-python3
Commit: 57d6dcc7f73e77394cb2a01b1b1a089924ccee37
Parents: dd95103
Author: Robert Gemmell <ro...@apache.org>
Authored: Tue Apr 28 16:40:07 2015 +0100
Committer: Robert Gemmell <ro...@apache.org>
Committed: Tue Apr 28 16:41:00 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/qpid/proton/engine/Transport.java   |  4 ++++
 .../org/apache/qpid/proton/engine/impl/FrameParser.java | 10 +++++++++-
 .../org/apache/qpid/proton/engine/impl/FrameWriter.java |  7 +++++++
 .../apache/qpid/proton/engine/impl/TransportImpl.java   | 12 ++++++++++++
 proton-j/src/main/resources/cengine.py                  |  5 ++++-
 5 files changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57d6dcc7/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java
index 3f3f09f..d83f76b 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/Transport.java
@@ -229,4 +229,8 @@ public interface Transport extends Endpoint
     int getRemoteIdleTimeout();
 
     long tick(long now);
+
+    long getFramesInput();
+
+    long getFramesOutput();
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57d6dcc7/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameParser.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameParser.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameParser.java
index 7b1445e..4c4f137 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameParser.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameParser.java
@@ -71,6 +71,8 @@ class FrameParser implements TransportInput
 
     private State _state = State.HEADER0;
 
+    private long _framesInput = 0;
+
     /** the stated size of the current frame */
     private int _size;
 
@@ -366,9 +368,10 @@ class FrameParser implements TransportInput
 
                     try
                     {
+                        _framesInput += 1;
+
                         if (frameBodySize > 0)
                         {
-
                             _decoder.setByteBuffer(in);
                             Object val = _decoder.readObject();
                             _decoder.setByteBuffer(null);
@@ -568,4 +571,9 @@ class FrameParser implements TransportInput
         _size = 0;
         _state = State.SIZE_0;
     }
+
+    long getFramesInput()
+    {
+        return _framesInput;
+    }
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57d6dcc7/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameWriter.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameWriter.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameWriter.java
index b5f718d..382c726 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameWriter.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/FrameWriter.java
@@ -51,6 +51,7 @@ class FrameWriter
     private int _frameStart = 0;
     private int _payloadStart;
     private int _performativeSize;
+    private long _framesOutput = 0;
 
     FrameWriter(EncoderImpl encoder, int maxFrameSize, byte frameType,
                 Ref<ProtocolTracer> protocolTracer, TransportImpl transport)
@@ -185,6 +186,8 @@ class FrameWriter
         }
 
         endFrame(channel);
+
+        _framesOutput += 1;
     }
 
     void writeFrame(Object frameBody)
@@ -215,4 +218,8 @@ class FrameWriter
         return size;
     }
 
+    long getFramesOutput()
+    {
+        return _framesOutput;
+    }
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57d6dcc7/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
----------------------------------------------------------------------
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
index c40cdee..a5c8ba9 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/TransportImpl.java
@@ -1508,6 +1508,18 @@ public class TransportImpl extends EndpointImpl
     }
 
     @Override
+    public long getFramesOutput()
+    {
+        return _frameWriter.getFramesOutput();
+    }
+
+    @Override
+    public long getFramesInput()
+    {
+        return _frameParser.getFramesInput();
+    }
+
+    @Override
     public void close_head()
     {
         _outputProcessor.close_head();

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/57d6dcc7/proton-j/src/main/resources/cengine.py
----------------------------------------------------------------------
diff --git a/proton-j/src/main/resources/cengine.py b/proton-j/src/main/resources/cengine.py
index a2c210b..6c45f33 100644
--- a/proton-j/src/main/resources/cengine.py
+++ b/proton-j/src/main/resources/cengine.py
@@ -893,7 +893,10 @@ def pn_transport_get_remote_idle_timeout(trans):
   return trans.impl.getRemoteIdleTimeout()
 
 def pn_transport_get_frames_input(trans):
-  raise Skipped()
+  return trans.impl.getFramesInput()
+
+def pn_transport_get_frames_output(trans):
+  return trans.impl.getFramesOutput()
 
 def pn_transport_set_channel_max(trans, n):
   trans.impl.setChannelMax(n)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[08/13] qpid-proton git commit: NO-JIRA: default to universal binaries on Mac OS X

Posted by kg...@apache.org.
NO-JIRA: default to universal binaries on Mac OS X

The system-installed Perl, Python etc. are all built as universal
binaries on Mac and so we need to build libqpid-proton to similarly
contain both architectures. This allows the bindings to link
successfully.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a509195b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a509195b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a509195b

Branch: refs/heads/kgiusti-python3
Commit: a509195b94eef52389d6880ada6d77e7ed7a1885
Parents: 0d266c6
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Mon Apr 27 15:41:55 2015 +0100
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Tue Apr 28 16:14:22 2015 +0100

----------------------------------------------------------------------
 CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a509195b/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b07c931..966d333 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,13 @@ if (MSVC)
 endif (MSVC)
 option(BUILD_WITH_CXX "Compile Proton using C++" ${DEFAULT_BUILD_WITH_CXX})
 
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+  # Default to universal binary on Mac OS X unless user has overriden
+  if (NOT DEFINED CMAKE_OSX_ARCHITECTURES OR "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
+    set(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
+  endif ()
+endif ()
+
 if (BUILD_WITH_CXX)
   project (Proton C CXX)
 endif (BUILD_WITH_CXX)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[05/13] qpid-proton git commit: further refined the assert statement

Posted by kg...@apache.org.
further refined the assert statement


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/2d899d1f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/2d899d1f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/2d899d1f

Branch: refs/heads/kgiusti-python3
Commit: 2d899d1f5b3eac660f7a5fb647aeaeec68347fa2
Parents: 0c1de24
Author: Rafael Schloming <rh...@alum.mit.edu>
Authored: Tue Apr 28 10:44:04 2015 -0400
Committer: Rafael Schloming <rh...@alum.mit.edu>
Committed: Tue Apr 28 10:44:04 2015 -0400

----------------------------------------------------------------------
 tests/python/proton_tests/messenger.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/2d899d1f/tests/python/proton_tests/messenger.py
----------------------------------------------------------------------
diff --git a/tests/python/proton_tests/messenger.py b/tests/python/proton_tests/messenger.py
index 172e38c..0fc9fec 100644
--- a/tests/python/proton_tests/messenger.py
+++ b/tests/python/proton_tests/messenger.py
@@ -1016,8 +1016,11 @@ class SelectableMessengerTest(common.Test):
       before = msnd.outgoing
       if mrcv.incoming == 0:
         p.pump()
-      # if we didn't receive the messages, they should be "in flight"
-      if mrcv.incoming == 0:
+      # If we didn't receive the messages, check that they are
+      # in-flight. We can only check this after the first message
+      # arrives since sasl handshaking might require multiple pumps
+      # prior to the first message arrival.
+      if i > 0 and mrcv.incoming == 0:
         assert msnd.outgoing < before
       # now pump until they arrive
       while mrcv.incoming == 0:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org