qpid_proton 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/examples/example_test.rb +1 -0
- data/examples/server.rb +1 -1
- data/ext/cproton/cproton.c +65 -40
- data/lib/codec/data.rb +9 -1
- data/lib/core/connection.rb +4 -2
- data/lib/core/message.rb +7 -10
- data/lib/core/transfer.rb +1 -1
- data/lib/handler/messaging_adapter.rb +7 -3
- data/tests/test_container.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f467d8f5a8d3486f54525c91d46662a3d2f32a70
|
4
|
+
data.tar.gz: 066a3b8d04ffa0647acb6c32b27e99fcf91ba7ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1d0dbf829b98d7ce13c84591d2331209c4b6ee7480c24dc23827de1f6850828433f1aa21b1bc570a50d964e537587d5c11b4c0dd6fdbbf8487ad7b80665f288
|
7
|
+
data.tar.gz: 305a551f875f09cb052266f150125c99e24c5e8a497acc41d8c17b9c84d0d58513f1804094b9ab9be9e56b11c6c544d5d04745f9a52133d9c225ae36859123d2
|
data/examples/example_test.rb
CHANGED
@@ -75,6 +75,7 @@ EOS
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def test_ssl_send_recv
|
78
|
+
skip 'SSL not available' unless Qpid::Proton::SSL.present?
|
78
79
|
out = run_script("ssl_send.rb", $url, "examples").read.strip
|
79
80
|
assert_match(/Connection secured with "...*\"\nAll 10 messages confirmed!/, out)
|
80
81
|
want = (0..9).reduce("") { |x,y| x << "Received: sequence #{y}\n" }
|
data/examples/server.rb
CHANGED
@@ -37,7 +37,7 @@ class Server < Qpid::Proton::MessagingHandler
|
|
37
37
|
|
38
38
|
def on_connection_open(connection)
|
39
39
|
if connection.offered_capabilities &&
|
40
|
-
connection.offered_capabilities.
|
40
|
+
connection.offered_capabilities.include?(:"ANONYMOUS-RELAY")
|
41
41
|
@relay = connection.open_sender({:target => nil})
|
42
42
|
end
|
43
43
|
end
|
data/ext/cproton/cproton.c
CHANGED
@@ -4404,7 +4404,7 @@ _wrap_pn_class_hashcode(int argc, VALUE *argv, VALUE self) {
|
|
4404
4404
|
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "void *","pn_class_hashcode", 2, argv[1] ));
|
4405
4405
|
}
|
4406
4406
|
result = (uintptr_t)pn_class_hashcode((struct pn_class_t const *)arg1,arg2);
|
4407
|
-
vresult =
|
4407
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
4408
4408
|
return vresult;
|
4409
4409
|
fail:
|
4410
4410
|
return Qnil;
|
@@ -4628,7 +4628,7 @@ _wrap_pn_void_hashcode(int argc, VALUE *argv, VALUE self) {
|
|
4628
4628
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_void_hashcode", 1, argv[0] ));
|
4629
4629
|
}
|
4630
4630
|
result = (uintptr_t)pn_void_hashcode(arg1);
|
4631
|
-
vresult =
|
4631
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
4632
4632
|
return vresult;
|
4633
4633
|
fail:
|
4634
4634
|
return Qnil;
|
@@ -4948,7 +4948,7 @@ _wrap_pn_hashcode(int argc, VALUE *argv, VALUE self) {
|
|
4948
4948
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "void *","pn_hashcode", 1, argv[0] ));
|
4949
4949
|
}
|
4950
4950
|
result = (uintptr_t)pn_hashcode(arg1);
|
4951
|
-
vresult =
|
4951
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
4952
4952
|
return vresult;
|
4953
4953
|
fail:
|
4954
4954
|
return Qnil;
|
@@ -5598,7 +5598,7 @@ _wrap_pn_map_head(int argc, VALUE *argv, VALUE self) {
|
|
5598
5598
|
}
|
5599
5599
|
arg1 = (pn_map_t *)(argp1);
|
5600
5600
|
result = (pn_handle_t)pn_map_head(arg1);
|
5601
|
-
vresult =
|
5601
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
5602
5602
|
return vresult;
|
5603
5603
|
fail:
|
5604
5604
|
return Qnil;
|
@@ -5611,7 +5611,7 @@ _wrap_pn_map_next(int argc, VALUE *argv, VALUE self) {
|
|
5611
5611
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5612
5612
|
void *argp1 = 0 ;
|
5613
5613
|
int res1 = 0 ;
|
5614
|
-
unsigned long val2 ;
|
5614
|
+
unsigned long long val2 ;
|
5615
5615
|
int ecode2 = 0 ;
|
5616
5616
|
pn_handle_t result;
|
5617
5617
|
VALUE vresult = Qnil;
|
@@ -5624,13 +5624,13 @@ _wrap_pn_map_next(int argc, VALUE *argv, VALUE self) {
|
|
5624
5624
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_next", 1, argv[0] ));
|
5625
5625
|
}
|
5626
5626
|
arg1 = (pn_map_t *)(argp1);
|
5627
|
-
ecode2 =
|
5627
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5628
5628
|
if (!SWIG_IsOK(ecode2)) {
|
5629
5629
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_next", 2, argv[1] ));
|
5630
5630
|
}
|
5631
5631
|
arg2 = (pn_handle_t)(val2);
|
5632
5632
|
result = (pn_handle_t)pn_map_next(arg1,(void const *)arg2);
|
5633
|
-
vresult =
|
5633
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
5634
5634
|
return vresult;
|
5635
5635
|
fail:
|
5636
5636
|
return Qnil;
|
@@ -5643,7 +5643,7 @@ _wrap_pn_map_key(int argc, VALUE *argv, VALUE self) {
|
|
5643
5643
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5644
5644
|
void *argp1 = 0 ;
|
5645
5645
|
int res1 = 0 ;
|
5646
|
-
unsigned long val2 ;
|
5646
|
+
unsigned long long val2 ;
|
5647
5647
|
int ecode2 = 0 ;
|
5648
5648
|
void *result = 0 ;
|
5649
5649
|
VALUE vresult = Qnil;
|
@@ -5656,7 +5656,7 @@ _wrap_pn_map_key(int argc, VALUE *argv, VALUE self) {
|
|
5656
5656
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_key", 1, argv[0] ));
|
5657
5657
|
}
|
5658
5658
|
arg1 = (pn_map_t *)(argp1);
|
5659
|
-
ecode2 =
|
5659
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5660
5660
|
if (!SWIG_IsOK(ecode2)) {
|
5661
5661
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_key", 2, argv[1] ));
|
5662
5662
|
}
|
@@ -5675,7 +5675,7 @@ _wrap_pn_map_value(int argc, VALUE *argv, VALUE self) {
|
|
5675
5675
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5676
5676
|
void *argp1 = 0 ;
|
5677
5677
|
int res1 = 0 ;
|
5678
|
-
unsigned long val2 ;
|
5678
|
+
unsigned long long val2 ;
|
5679
5679
|
int ecode2 = 0 ;
|
5680
5680
|
void *result = 0 ;
|
5681
5681
|
VALUE vresult = Qnil;
|
@@ -5688,7 +5688,7 @@ _wrap_pn_map_value(int argc, VALUE *argv, VALUE self) {
|
|
5688
5688
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_map_t *","pn_map_value", 1, argv[0] ));
|
5689
5689
|
}
|
5690
5690
|
arg1 = (pn_map_t *)(argp1);
|
5691
|
-
ecode2 =
|
5691
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5692
5692
|
if (!SWIG_IsOK(ecode2)) {
|
5693
5693
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_map_value", 2, argv[1] ));
|
5694
5694
|
}
|
@@ -5772,7 +5772,7 @@ _wrap_pn_hash_put(int argc, VALUE *argv, VALUE self) {
|
|
5772
5772
|
void *arg3 = (void *) 0 ;
|
5773
5773
|
void *argp1 = 0 ;
|
5774
5774
|
int res1 = 0 ;
|
5775
|
-
unsigned long val2 ;
|
5775
|
+
unsigned long long val2 ;
|
5776
5776
|
int ecode2 = 0 ;
|
5777
5777
|
int res3 ;
|
5778
5778
|
int result;
|
@@ -5786,7 +5786,7 @@ _wrap_pn_hash_put(int argc, VALUE *argv, VALUE self) {
|
|
5786
5786
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_put", 1, argv[0] ));
|
5787
5787
|
}
|
5788
5788
|
arg1 = (pn_hash_t *)(argp1);
|
5789
|
-
ecode2 =
|
5789
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5790
5790
|
if (!SWIG_IsOK(ecode2)) {
|
5791
5791
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_put", 2, argv[1] ));
|
5792
5792
|
}
|
@@ -5809,7 +5809,7 @@ _wrap_pn_hash_get(int argc, VALUE *argv, VALUE self) {
|
|
5809
5809
|
uintptr_t arg2 ;
|
5810
5810
|
void *argp1 = 0 ;
|
5811
5811
|
int res1 = 0 ;
|
5812
|
-
unsigned long val2 ;
|
5812
|
+
unsigned long long val2 ;
|
5813
5813
|
int ecode2 = 0 ;
|
5814
5814
|
void *result = 0 ;
|
5815
5815
|
VALUE vresult = Qnil;
|
@@ -5822,7 +5822,7 @@ _wrap_pn_hash_get(int argc, VALUE *argv, VALUE self) {
|
|
5822
5822
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_get", 1, argv[0] ));
|
5823
5823
|
}
|
5824
5824
|
arg1 = (pn_hash_t *)(argp1);
|
5825
|
-
ecode2 =
|
5825
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5826
5826
|
if (!SWIG_IsOK(ecode2)) {
|
5827
5827
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_get", 2, argv[1] ));
|
5828
5828
|
}
|
@@ -5841,7 +5841,7 @@ _wrap_pn_hash_del(int argc, VALUE *argv, VALUE self) {
|
|
5841
5841
|
uintptr_t arg2 ;
|
5842
5842
|
void *argp1 = 0 ;
|
5843
5843
|
int res1 = 0 ;
|
5844
|
-
unsigned long val2 ;
|
5844
|
+
unsigned long long val2 ;
|
5845
5845
|
int ecode2 = 0 ;
|
5846
5846
|
|
5847
5847
|
if ((argc < 2) || (argc > 2)) {
|
@@ -5852,7 +5852,7 @@ _wrap_pn_hash_del(int argc, VALUE *argv, VALUE self) {
|
|
5852
5852
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_del", 1, argv[0] ));
|
5853
5853
|
}
|
5854
5854
|
arg1 = (pn_hash_t *)(argp1);
|
5855
|
-
ecode2 =
|
5855
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5856
5856
|
if (!SWIG_IsOK(ecode2)) {
|
5857
5857
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "uintptr_t","pn_hash_del", 2, argv[1] ));
|
5858
5858
|
}
|
@@ -5881,7 +5881,7 @@ _wrap_pn_hash_head(int argc, VALUE *argv, VALUE self) {
|
|
5881
5881
|
}
|
5882
5882
|
arg1 = (pn_hash_t *)(argp1);
|
5883
5883
|
result = (pn_handle_t)pn_hash_head(arg1);
|
5884
|
-
vresult =
|
5884
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
5885
5885
|
return vresult;
|
5886
5886
|
fail:
|
5887
5887
|
return Qnil;
|
@@ -5894,7 +5894,7 @@ _wrap_pn_hash_next(int argc, VALUE *argv, VALUE self) {
|
|
5894
5894
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5895
5895
|
void *argp1 = 0 ;
|
5896
5896
|
int res1 = 0 ;
|
5897
|
-
unsigned long val2 ;
|
5897
|
+
unsigned long long val2 ;
|
5898
5898
|
int ecode2 = 0 ;
|
5899
5899
|
pn_handle_t result;
|
5900
5900
|
VALUE vresult = Qnil;
|
@@ -5907,13 +5907,13 @@ _wrap_pn_hash_next(int argc, VALUE *argv, VALUE self) {
|
|
5907
5907
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_next", 1, argv[0] ));
|
5908
5908
|
}
|
5909
5909
|
arg1 = (pn_hash_t *)(argp1);
|
5910
|
-
ecode2 =
|
5910
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5911
5911
|
if (!SWIG_IsOK(ecode2)) {
|
5912
5912
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_next", 2, argv[1] ));
|
5913
5913
|
}
|
5914
5914
|
arg2 = (pn_handle_t)(val2);
|
5915
5915
|
result = (pn_handle_t)pn_hash_next(arg1,(void const *)arg2);
|
5916
|
-
vresult =
|
5916
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
5917
5917
|
return vresult;
|
5918
5918
|
fail:
|
5919
5919
|
return Qnil;
|
@@ -5926,7 +5926,7 @@ _wrap_pn_hash_key(int argc, VALUE *argv, VALUE self) {
|
|
5926
5926
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5927
5927
|
void *argp1 = 0 ;
|
5928
5928
|
int res1 = 0 ;
|
5929
|
-
unsigned long val2 ;
|
5929
|
+
unsigned long long val2 ;
|
5930
5930
|
int ecode2 = 0 ;
|
5931
5931
|
uintptr_t result;
|
5932
5932
|
VALUE vresult = Qnil;
|
@@ -5939,13 +5939,13 @@ _wrap_pn_hash_key(int argc, VALUE *argv, VALUE self) {
|
|
5939
5939
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_key", 1, argv[0] ));
|
5940
5940
|
}
|
5941
5941
|
arg1 = (pn_hash_t *)(argp1);
|
5942
|
-
ecode2 =
|
5942
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5943
5943
|
if (!SWIG_IsOK(ecode2)) {
|
5944
5944
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_key", 2, argv[1] ));
|
5945
5945
|
}
|
5946
5946
|
arg2 = (pn_handle_t)(val2);
|
5947
5947
|
result = (uintptr_t)pn_hash_key(arg1,(void const *)arg2);
|
5948
|
-
vresult =
|
5948
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
5949
5949
|
return vresult;
|
5950
5950
|
fail:
|
5951
5951
|
return Qnil;
|
@@ -5958,7 +5958,7 @@ _wrap_pn_hash_value(int argc, VALUE *argv, VALUE self) {
|
|
5958
5958
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
5959
5959
|
void *argp1 = 0 ;
|
5960
5960
|
int res1 = 0 ;
|
5961
|
-
unsigned long val2 ;
|
5961
|
+
unsigned long long val2 ;
|
5962
5962
|
int ecode2 = 0 ;
|
5963
5963
|
void *result = 0 ;
|
5964
5964
|
VALUE vresult = Qnil;
|
@@ -5971,7 +5971,7 @@ _wrap_pn_hash_value(int argc, VALUE *argv, VALUE self) {
|
|
5971
5971
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_hash_t *","pn_hash_value", 1, argv[0] ));
|
5972
5972
|
}
|
5973
5973
|
arg1 = (pn_hash_t *)(argp1);
|
5974
|
-
ecode2 =
|
5974
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
5975
5975
|
if (!SWIG_IsOK(ecode2)) {
|
5976
5976
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_hash_value", 2, argv[1] ));
|
5977
5977
|
}
|
@@ -6546,7 +6546,7 @@ _wrap_pn_record_def(int argc, VALUE *argv, VALUE self) {
|
|
6546
6546
|
pn_class_t *arg3 = (pn_class_t *) 0 ;
|
6547
6547
|
void *argp1 = 0 ;
|
6548
6548
|
int res1 = 0 ;
|
6549
|
-
unsigned long val2 ;
|
6549
|
+
unsigned long long val2 ;
|
6550
6550
|
int ecode2 = 0 ;
|
6551
6551
|
void *argp3 = 0 ;
|
6552
6552
|
int res3 = 0 ;
|
@@ -6559,7 +6559,7 @@ _wrap_pn_record_def(int argc, VALUE *argv, VALUE self) {
|
|
6559
6559
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_record_t *","pn_record_def", 1, argv[0] ));
|
6560
6560
|
}
|
6561
6561
|
arg1 = (pn_record_t *)(argp1);
|
6562
|
-
ecode2 =
|
6562
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
6563
6563
|
if (!SWIG_IsOK(ecode2)) {
|
6564
6564
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_record_def", 2, argv[1] ));
|
6565
6565
|
}
|
@@ -6582,7 +6582,7 @@ _wrap_pn_record_has(int argc, VALUE *argv, VALUE self) {
|
|
6582
6582
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
6583
6583
|
void *argp1 = 0 ;
|
6584
6584
|
int res1 = 0 ;
|
6585
|
-
unsigned long val2 ;
|
6585
|
+
unsigned long long val2 ;
|
6586
6586
|
int ecode2 = 0 ;
|
6587
6587
|
bool result;
|
6588
6588
|
VALUE vresult = Qnil;
|
@@ -6595,7 +6595,7 @@ _wrap_pn_record_has(int argc, VALUE *argv, VALUE self) {
|
|
6595
6595
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_record_t *","pn_record_has", 1, argv[0] ));
|
6596
6596
|
}
|
6597
6597
|
arg1 = (pn_record_t *)(argp1);
|
6598
|
-
ecode2 =
|
6598
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
6599
6599
|
if (!SWIG_IsOK(ecode2)) {
|
6600
6600
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_record_has", 2, argv[1] ));
|
6601
6601
|
}
|
@@ -6614,7 +6614,7 @@ _wrap_pn_record_get(int argc, VALUE *argv, VALUE self) {
|
|
6614
6614
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
6615
6615
|
void *argp1 = 0 ;
|
6616
6616
|
int res1 = 0 ;
|
6617
|
-
unsigned long val2 ;
|
6617
|
+
unsigned long long val2 ;
|
6618
6618
|
int ecode2 = 0 ;
|
6619
6619
|
void *result = 0 ;
|
6620
6620
|
VALUE vresult = Qnil;
|
@@ -6627,7 +6627,7 @@ _wrap_pn_record_get(int argc, VALUE *argv, VALUE self) {
|
|
6627
6627
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_record_t *","pn_record_get", 1, argv[0] ));
|
6628
6628
|
}
|
6629
6629
|
arg1 = (pn_record_t *)(argp1);
|
6630
|
-
ecode2 =
|
6630
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
6631
6631
|
if (!SWIG_IsOK(ecode2)) {
|
6632
6632
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_record_get", 2, argv[1] ));
|
6633
6633
|
}
|
@@ -6647,7 +6647,7 @@ _wrap_pn_record_set(int argc, VALUE *argv, VALUE self) {
|
|
6647
6647
|
void *arg3 = (void *) 0 ;
|
6648
6648
|
void *argp1 = 0 ;
|
6649
6649
|
int res1 = 0 ;
|
6650
|
-
unsigned long val2 ;
|
6650
|
+
unsigned long long val2 ;
|
6651
6651
|
int ecode2 = 0 ;
|
6652
6652
|
int res3 ;
|
6653
6653
|
|
@@ -6659,7 +6659,7 @@ _wrap_pn_record_set(int argc, VALUE *argv, VALUE self) {
|
|
6659
6659
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_record_t *","pn_record_set", 1, argv[0] ));
|
6660
6660
|
}
|
6661
6661
|
arg1 = (pn_record_t *)(argp1);
|
6662
|
-
ecode2 =
|
6662
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
6663
6663
|
if (!SWIG_IsOK(ecode2)) {
|
6664
6664
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_record_set", 2, argv[1] ));
|
6665
6665
|
}
|
@@ -10124,6 +10124,30 @@ fail:
|
|
10124
10124
|
}
|
10125
10125
|
|
10126
10126
|
|
10127
|
+
SWIGINTERN VALUE
|
10128
|
+
_wrap_pn_terminus_has_expiry_policy(int argc, VALUE *argv, VALUE self) {
|
10129
|
+
pn_terminus_t *arg1 = (pn_terminus_t *) 0 ;
|
10130
|
+
void *argp1 = 0 ;
|
10131
|
+
int res1 = 0 ;
|
10132
|
+
bool result;
|
10133
|
+
VALUE vresult = Qnil;
|
10134
|
+
|
10135
|
+
if ((argc < 1) || (argc > 1)) {
|
10136
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
|
10137
|
+
}
|
10138
|
+
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_pn_terminus_t, 0 | 0 );
|
10139
|
+
if (!SWIG_IsOK(res1)) {
|
10140
|
+
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_terminus_t const *","pn_terminus_has_expiry_policy", 1, argv[0] ));
|
10141
|
+
}
|
10142
|
+
arg1 = (pn_terminus_t *)(argp1);
|
10143
|
+
result = (bool)pn_terminus_has_expiry_policy((struct pn_terminus_t const *)arg1);
|
10144
|
+
vresult = SWIG_From_bool((bool)(result));
|
10145
|
+
return vresult;
|
10146
|
+
fail:
|
10147
|
+
return Qnil;
|
10148
|
+
}
|
10149
|
+
|
10150
|
+
|
10127
10151
|
SWIGINTERN VALUE
|
10128
10152
|
_wrap_pn_terminus_set_expiry_policy(int argc, VALUE *argv, VALUE self) {
|
10129
10153
|
pn_terminus_t *arg1 = (pn_terminus_t *) 0 ;
|
@@ -20449,7 +20473,7 @@ _wrap_pn_data_point(int argc, VALUE *argv, VALUE self) {
|
|
20449
20473
|
}
|
20450
20474
|
arg1 = (pn_data_t *)(argp1);
|
20451
20475
|
result = (pn_handle_t)pn_data_point(arg1);
|
20452
|
-
vresult =
|
20476
|
+
vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
|
20453
20477
|
return vresult;
|
20454
20478
|
fail:
|
20455
20479
|
return Qnil;
|
@@ -20462,7 +20486,7 @@ _wrap_pn_data_restore(int argc, VALUE *argv, VALUE self) {
|
|
20462
20486
|
pn_handle_t arg2 = (pn_handle_t) 0 ;
|
20463
20487
|
void *argp1 = 0 ;
|
20464
20488
|
int res1 = 0 ;
|
20465
|
-
unsigned long val2 ;
|
20489
|
+
unsigned long long val2 ;
|
20466
20490
|
int ecode2 = 0 ;
|
20467
20491
|
bool result;
|
20468
20492
|
VALUE vresult = Qnil;
|
@@ -20475,7 +20499,7 @@ _wrap_pn_data_restore(int argc, VALUE *argv, VALUE self) {
|
|
20475
20499
|
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "pn_data_t *","pn_data_restore", 1, argv[0] ));
|
20476
20500
|
}
|
20477
20501
|
arg1 = (pn_data_t *)(argp1);
|
20478
|
-
ecode2 =
|
20502
|
+
ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[1], &val2);
|
20479
20503
|
if (!SWIG_IsOK(ecode2)) {
|
20480
20504
|
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "pn_handle_t","pn_data_restore", 2, argv[1] ));
|
20481
20505
|
}
|
@@ -23198,8 +23222,8 @@ static swig_type_info _swigt__p_short = {"_p_short", "short *|int16_t *", 0, 0,
|
|
23198
23222
|
static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int8_t *", 0, 0, (void*)0, 0};
|
23199
23223
|
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0};
|
23200
23224
|
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "size_t *|unsigned int *", 0, 0, (void*)0, 0};
|
23201
|
-
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|
|
23202
|
-
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "pn_decimal64_t *|uint64_t *|unsigned long long *", 0, 0, (void*)0, 0};
|
23225
|
+
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "pn_seconds_t *|pn_decimal32_t *|uint32_t *|unsigned long *|pn_millis_t *|pn_char_t *", 0, 0, (void*)0, 0};
|
23226
|
+
static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uintptr_t *|pn_decimal64_t *|uint64_t *|unsigned long long *", 0, 0, (void*)0, 0};
|
23203
23227
|
static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint16_t *", 0, 0, (void*)0, 0};
|
23204
23228
|
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
|
23205
23229
|
|
@@ -23751,7 +23775,7 @@ SWIGEXPORT void Init_cproton(void) {
|
|
23751
23775
|
rb_define_module_function(mCproton, "pni_connection_driver", _wrap_pni_connection_driver, -1);
|
23752
23776
|
rb_define_const(mCproton, "PROTON_IMPORT_EXPORT_H", SWIG_From_int((int)(1)));
|
23753
23777
|
rb_define_const(mCproton, "PN_VERSION_MAJOR", SWIG_From_int((int)(0)));
|
23754
|
-
rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(
|
23778
|
+
rb_define_const(mCproton, "PN_VERSION_MINOR", SWIG_From_int((int)(24)));
|
23755
23779
|
rb_define_const(mCproton, "PN_VERSION_POINT", SWIG_From_int((int)(0)));
|
23756
23780
|
rb_define_const(mCproton, "PROTON_TYPES_H", SWIG_From_int((int)(1)));
|
23757
23781
|
rb_define_const(mCproton, "PN_MILLIS_MAX", SWIG_From_unsigned_SS_int((unsigned int)((~0U))));
|
@@ -24029,6 +24053,7 @@ SWIGEXPORT void Init_cproton(void) {
|
|
24029
24053
|
rb_define_module_function(mCproton, "pn_terminus_get_durability", _wrap_pn_terminus_get_durability, -1);
|
24030
24054
|
rb_define_module_function(mCproton, "pn_terminus_set_durability", _wrap_pn_terminus_set_durability, -1);
|
24031
24055
|
rb_define_module_function(mCproton, "pn_terminus_get_expiry_policy", _wrap_pn_terminus_get_expiry_policy, -1);
|
24056
|
+
rb_define_module_function(mCproton, "pn_terminus_has_expiry_policy", _wrap_pn_terminus_has_expiry_policy, -1);
|
24032
24057
|
rb_define_module_function(mCproton, "pn_terminus_set_expiry_policy", _wrap_pn_terminus_set_expiry_policy, -1);
|
24033
24058
|
rb_define_module_function(mCproton, "pn_terminus_get_timeout", _wrap_pn_terminus_get_timeout, -1);
|
24034
24059
|
rb_define_module_function(mCproton, "pn_terminus_set_timeout", _wrap_pn_terminus_set_timeout, -1);
|
data/lib/codec/data.rb
CHANGED
@@ -41,6 +41,15 @@ module Qpid::Proton
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
# @private
|
45
|
+
# Convert a pn_data_t* containing an AMQP "multiple" field to an Array or nil.
|
46
|
+
# A "multiple" field can be encoded as an array or a single value - always return Array.
|
47
|
+
# @return [Array, nil] The ruby Array extracted from +impl+ or nil if impl is empty
|
48
|
+
def self.to_multiple(impl)
|
49
|
+
o = self.to_object(impl)
|
50
|
+
Array(o) if o
|
51
|
+
end
|
52
|
+
|
44
53
|
# @private
|
45
54
|
# Clear a pn_data_t* and convert a ruby object into it. If x==nil leave it empty.
|
46
55
|
def self.from_object(impl, x)
|
@@ -676,7 +685,6 @@ module Qpid::Proton
|
|
676
685
|
return err
|
677
686
|
end
|
678
687
|
end
|
679
|
-
|
680
688
|
end
|
681
689
|
end
|
682
690
|
end
|
data/lib/core/connection.rb
CHANGED
@@ -77,13 +77,15 @@ module Qpid::Proton
|
|
77
77
|
|
78
78
|
# @return [Array<Symbol>] offered capabilities provided by the remote peer
|
79
79
|
def offered_capabilities
|
80
|
-
|
80
|
+
# Provide capabilities consistently as an array, even if encoded as a single symbol
|
81
|
+
Codec::Data.to_multiple(Cproton.pn_connection_remote_offered_capabilities(@impl))
|
81
82
|
end
|
82
83
|
deprecated_alias :remote_offered_capabilities, :offered_capabilities
|
83
84
|
|
84
85
|
# @return [Array<Symbol>] desired capabilities provided by the remote peer
|
85
86
|
def desired_capabilities
|
86
|
-
|
87
|
+
# Provide capabilities consistently as an array, even if encoded as a single symbol
|
88
|
+
Codec::Data.to_multiple(Cproton.pn_connection_remote_desired_capabilities(@impl))
|
87
89
|
end
|
88
90
|
deprecated_alias :remote_desired_capabilities, :desired_capabilities
|
89
91
|
|
data/lib/core/message.rb
CHANGED
@@ -279,22 +279,19 @@ module Qpid::Proton
|
|
279
279
|
Cproton.pn_message_get_user_id(@impl)
|
280
280
|
end
|
281
281
|
|
282
|
-
#
|
283
|
-
|
284
|
-
# ==== Options
|
285
|
-
#
|
286
|
-
# * address - the address
|
287
|
-
#
|
288
|
-
def address=(address)
|
282
|
+
# @param address[String] set the destination address
|
283
|
+
def to=(address)
|
289
284
|
Cproton.pn_message_set_address(@impl, address)
|
290
285
|
end
|
286
|
+
alias address= to=
|
291
287
|
|
292
|
-
#
|
293
|
-
|
294
|
-
def address
|
288
|
+
# @return [String] get the destination address.
|
289
|
+
def to
|
295
290
|
Cproton.pn_message_get_address(@impl)
|
296
291
|
end
|
297
292
|
|
293
|
+
alias address to
|
294
|
+
|
298
295
|
# Sets the subject.
|
299
296
|
#
|
300
297
|
# ==== Options
|
data/lib/core/transfer.rb
CHANGED
@@ -51,7 +51,7 @@ module Qpid::Proton
|
|
51
51
|
# @deprecated use {#id}
|
52
52
|
deprecated_alias :tag, :id
|
53
53
|
|
54
|
-
# @return [Boolean] True if the transfer
|
54
|
+
# @return [Boolean] True if the transfer is remotely settled.
|
55
55
|
proton_caller :settled?
|
56
56
|
|
57
57
|
# @return [Integer] Remote state of the transfer, one of the values in {State}
|
@@ -66,6 +66,10 @@ module Qpid::Proton
|
|
66
66
|
# Link open/close is handled separately because links are split into
|
67
67
|
# sender and receiver on the messaging API
|
68
68
|
def on_link_remote_open(event)
|
69
|
+
if !event.link.local_active? # Copy remote terminus data to local
|
70
|
+
event.link.source.replace(event.link.remote_source);
|
71
|
+
event.link.target.replace(event.link.remote_target);
|
72
|
+
end
|
69
73
|
delegate(event.link.sender? ? :on_sender_open : :on_receiver_open, event.link)
|
70
74
|
event.link.open if event.link.local_uninit?
|
71
75
|
add_credit(event)
|
@@ -102,11 +106,11 @@ module Qpid::Proton
|
|
102
106
|
else
|
103
107
|
begin
|
104
108
|
delegate(:on_message, d, d.message)
|
105
|
-
d.accept if d.receiver.auto_accept
|
109
|
+
d.accept if d.receiver.auto_accept && d.local_state == 0
|
106
110
|
rescue Reject
|
107
|
-
d.reject
|
111
|
+
d.reject
|
108
112
|
rescue Release
|
109
|
-
d.release
|
113
|
+
d.release
|
110
114
|
end
|
111
115
|
end
|
112
116
|
end
|
data/tests/test_container.rb
CHANGED
@@ -20,6 +20,10 @@ require 'test_tools'
|
|
20
20
|
require 'minitest/unit'
|
21
21
|
require 'socket'
|
22
22
|
|
23
|
+
# Since ruby 2.5 the default is true, turn it off since we have tests that deliberately
|
24
|
+
# leak exceptions from threads to very they are caught properly from Container#run()
|
25
|
+
Thread.report_on_exception = false rescue nil
|
26
|
+
|
23
27
|
# MessagingHandler that raises in on_error to catch unexpected errors
|
24
28
|
class ExceptionMessagingHandler
|
25
29
|
def on_error(e) raise e; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qpid_proton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darryl L. Pierce
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
Proton is a high performance, lightweight messaging library. It can be used in
|