parent
868533cd6a
commit
0cc6c9889a
@ -1,32 +0,0 @@
|
||||
From fc37fa00539906cac2f0639c166fb233e826fe7e Mon Sep 17 00:00:00 2001
|
||||
From: "Darryl L. Pierce" <mcpierce@gmail.com>
|
||||
Date: Mon, 16 Mar 2015 09:15:22 -0400
|
||||
Subject: [PATCH 1/2] NO-JIRA: Fix install of Perl bindings
|
||||
|
||||
---
|
||||
proton-c/bindings/perl/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/proton-c/bindings/perl/CMakeLists.txt b/proton-c/bindings/perl/CMakeLists.txt
|
||||
index 9891c09..55cf032 100644
|
||||
--- a/proton-c/bindings/perl/CMakeLists.txt
|
||||
+++ b/proton-c/bindings/perl/CMakeLists.txt
|
||||
@@ -56,13 +56,13 @@ swig_link_libraries(cproton_perl ${BINDING_DEPS} ${PERL_LIBRARY})
|
||||
|
||||
if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton_perl.so
|
||||
- DESTINATION ${PERL_VENDORARCH_DIR}
|
||||
+ DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl
|
||||
COMPONENT Perl
|
||||
)
|
||||
else()
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcproton_perl.so
|
||||
RENAME cproton_perl.so
|
||||
- DESTINATION ${PERL_VENDORARCH_DIR}
|
||||
+ DESTINATION ${PERL_VENDORARCH_DIR}/auto/cproton_perl
|
||||
COMPONENT Perl
|
||||
)
|
||||
endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))
|
||||
--
|
||||
2.1.0
|
||||
|
@ -1,66 +0,0 @@
|
||||
From caf9578be09e1540a9b1bb6a0a47abbaa62312ce Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Stitcher <astitcher@apache.org>
|
||||
Date: Tue, 11 Aug 2015 16:21:39 -0400
|
||||
Subject: [PATCH] PROTON-974: Accept a single symbol in SASL mechs frame - As
|
||||
well as an array of symbols - This is a specific interop issue with qpidd
|
||||
AMQP 1.0 support
|
||||
|
||||
---
|
||||
proton-c/src/sasl/sasl.c | 33 +++++++++++++++++++++++----------
|
||||
1 file changed, 23 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/proton-c/src/sasl/sasl.c b/proton-c/src/sasl/sasl.c
|
||||
index 6e1ce1d..fb98894 100644
|
||||
--- a/proton-c/src/sasl/sasl.c
|
||||
+++ b/proton-c/src/sasl/sasl.c
|
||||
@@ -671,24 +671,37 @@ int pn_do_mechanisms(pn_transport_t *transport, uint8_t frame_type, uint16_t cha
|
||||
|
||||
// This scanning relies on pn_data_scan leaving the pn_data_t cursors
|
||||
// where they are after finishing the scan
|
||||
- int err = pn_data_scan(args, "D.[@[");
|
||||
+ pn_string_t *mechs = pn_string("");
|
||||
+
|
||||
+ // Try array of symbols for mechanism list
|
||||
+ bool array = false;
|
||||
+ int err = pn_data_scan(args, "D.[?@[", &array);
|
||||
if (err) return err;
|
||||
|
||||
- pn_string_t *mechs = pn_string("");
|
||||
+ if (array) {
|
||||
+ // Now keep checking for end of array and pull a symbol
|
||||
+ while(pn_data_next(args)) {
|
||||
+ pn_bytes_t s = pn_data_get_symbol(args);
|
||||
+ if (pni_included_mech(transport->sasl->included_mechanisms, s)) {
|
||||
+ pn_string_addf(mechs, "%*s ", (int)s.size, s.start);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- // Now keep checking for end of array and pull a symbol
|
||||
- while(pn_data_next(args)) {
|
||||
- pn_bytes_t s = pn_data_get_symbol(args);
|
||||
- if (pni_included_mech(transport->sasl->included_mechanisms, s)) {
|
||||
- pn_string_addf(mechs, "%*s ", (int)s.size, s.start);
|
||||
+ if (pn_string_size(mechs)) {
|
||||
+ pn_string_buffer(mechs)[pn_string_size(mechs)-1] = 0;
|
||||
}
|
||||
- }
|
||||
+ } else {
|
||||
+ // No array of symbols; try single symbol
|
||||
+ pn_data_rewind(args);
|
||||
+ pn_bytes_t symbol;
|
||||
+ int err = pn_data_scan(args, "D.[s]", &symbol);
|
||||
+ if (err) return err;
|
||||
|
||||
- if (pn_string_size(mechs)) {
|
||||
- pn_string_buffer(mechs)[pn_string_size(mechs)-1] = 0;
|
||||
+ pn_string_setn(mechs, symbol.start, symbol.size);
|
||||
}
|
||||
|
||||
if (pni_init_client(transport) &&
|
||||
+ pn_string_size(mechs) &&
|
||||
pni_process_mechanisms(transport, pn_string_get(mechs))) {
|
||||
pni_sasl_set_desired_state(transport, SASL_POSTED_INIT);
|
||||
} else {
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,73 +0,0 @@
|
||||
From ba8cee70089adfe64c2429a20eb5bee90d96b606 Mon Sep 17 00:00:00 2001
|
||||
From: "Darryl L. Pierce" <mcpierce@gmail.com>
|
||||
Date: Tue, 17 Mar 2015 09:04:31 -0400
|
||||
Subject: [PATCH 2/2] PROTON-582: Added in missing is_float method to Perl
|
||||
bindings.
|
||||
|
||||
---
|
||||
examples/perl/messenger/send.pl | 2 +-
|
||||
proton-c/bindings/perl/lib/qpid/proton/Data.pm | 4 ++--
|
||||
proton-c/bindings/perl/lib/qpid/proton/Message.pm | 2 +-
|
||||
proton-c/bindings/perl/lib/qpid/proton/utils.pm | 7 +++++++
|
||||
4 files changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/examples/perl/messenger/send.pl b/examples/perl/messenger/send.pl
|
||||
index b622b68..27893ce 100755
|
||||
--- a/examples/perl/messenger/send.pl
|
||||
+++ b/examples/perl/messenger/send.pl
|
||||
@@ -59,7 +59,7 @@ foreach (@messages)
|
||||
{
|
||||
$msg->set_address($address);
|
||||
$msg->set_subject($subject);
|
||||
- $msg->set_content($content);
|
||||
+ $msg->set_body($content);
|
||||
# try a few different body types
|
||||
my $body_type = int(rand(6));
|
||||
$msg->set_property("sent", "" . localtime(time));
|
||||
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Data.pm b/proton-c/bindings/perl/lib/qpid/proton/Data.pm
|
||||
index 156e09a..494a8f3 100644
|
||||
--- a/proton-c/bindings/perl/lib/qpid/proton/Data.pm
|
||||
+++ b/proton-c/bindings/perl/lib/qpid/proton/Data.pm
|
||||
@@ -1165,8 +1165,8 @@ sub put_list_helper {
|
||||
$self->enter;
|
||||
|
||||
for my $value (@{$array}) {
|
||||
- if (qpid::proton::is_num($value)) {
|
||||
- if (qpid::proton::is_float($value)) {
|
||||
+ if (qpid::proton::utils::is_num($value)) {
|
||||
+ if (qpid::proton::utils::is_float($value)) {
|
||||
$self->put_float($value);
|
||||
} else {
|
||||
$self->put_int($value);
|
||||
diff --git a/proton-c/bindings/perl/lib/qpid/proton/Message.pm b/proton-c/bindings/perl/lib/qpid/proton/Message.pm
|
||||
index b36caa7..0251b89 100644
|
||||
--- a/proton-c/bindings/perl/lib/qpid/proton/Message.pm
|
||||
+++ b/proton-c/bindings/perl/lib/qpid/proton/Message.pm
|
||||
@@ -438,7 +438,7 @@ sub set_body {
|
||||
# be, which is going to be a best guess
|
||||
if (!defined($body_type)) {
|
||||
if (qpid::proton::utils::is_num($body)) {
|
||||
- if (qpid::proton::is_float($body)) {
|
||||
+ if (qpid::proton::utils::is_float($body)) {
|
||||
$body_type = qpid::proton::FLOAT;
|
||||
} else {
|
||||
$body_type = qpid::proton::INT;
|
||||
diff --git a/proton-c/bindings/perl/lib/qpid/proton/utils.pm b/proton-c/bindings/perl/lib/qpid/proton/utils.pm
|
||||
index 5652535..0ab4e3e 100644
|
||||
--- a/proton-c/bindings/perl/lib/qpid/proton/utils.pm
|
||||
+++ b/proton-c/bindings/perl/lib/qpid/proton/utils.pm
|
||||
@@ -28,4 +28,11 @@ sub is_num {
|
||||
$_[0] ^ $_[0] ? 0 : 1
|
||||
}
|
||||
|
||||
+sub is_float {
|
||||
+ my $val = $_[0];
|
||||
+
|
||||
+ return 1 if ($val - int($val));
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
1;
|
||||
--
|
||||
2.1.0
|
||||
|
Loading…
Reference in new issue