paho-mqtt 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 80ab469d38120ae2f9cdcb6901ecc3f82e31cdca
4
- data.tar.gz: 2ac290819f952a35d16708d78105acac6edd10dd
2
+ SHA256:
3
+ metadata.gz: f72a4a93df7ac3c4660b9f0ee7a5c8cb68b188c60782f4fd03c63f39f30321ea
4
+ data.tar.gz: a84a45e964b18c73b64b376e263622a84c807266ba8ff6e615cf1a587956de3a
5
5
  SHA512:
6
- metadata.gz: 022c3db947547fd72a9b7cdba15a1c60d5a0412ffed0e31bfca54e934178ba1a0d30935b9bba49402959bf9a91ff9c3e2dc3ceff51fb3806ed657e1c3e90240b
7
- data.tar.gz: 22712df65d41429e9c16d3f34ebf4130af07c2b026f7ab4a6eadc8712181844d358c6030c529ec18ac363e41ee9fa4268019bab60a7615ff1737085c8df76293
6
+ metadata.gz: 73b2d7de679fe898c86e031efe8fe966dc2b3428d6985a9d24a81ff166d235122643fdf74f0c5b2559b362fb47635f0d58eefeba6358c90e18f1634c3b03f547
7
+ data.tar.gz: a6a170ebdc2b5bdfa166913b8de5284f1066c1b24cb272a72bc68fe24d2cb8beea7f820ef436ff0651fe24929f521750aea90e68964c299912459771fe256af2
@@ -123,7 +123,8 @@ module PahoMqtt
123
123
  max_qos = packet.return_codes
124
124
  id = packet.id
125
125
  topics = []
126
- if @subscriber.add_subscription(max_qos, id, topics) == MQTT_ERR_SUCCESS
126
+ topics = @subscriber.add_subscription(max_qos, id, topics)
127
+ unless topics.empty?
127
128
  @on_suback.call(topics) unless @on_suback.nil?
128
129
  end
129
130
  end
@@ -131,7 +132,9 @@ module PahoMqtt
131
132
  def handle_unsuback(packet)
132
133
  id = packet.id
133
134
  topics = []
134
- if @subscriber.remove_subscription(id, topics) == MQTT_ERR_SUCCESS
135
+ topics = @subscriber.remove_subscription(id, topics)
136
+ unless topcis.empty?
137
+ puts "PAHO TOPICS: #{topics}"
135
138
  @on_unsuback.call(topics) unless @on_unsuback.nil?
136
139
  end
137
140
  end
@@ -23,7 +23,7 @@ module PahoMqtt
23
23
  set_cert(cert_path, ssl_context)
24
24
  set_key(key_path, ssl_context)
25
25
  set_root_ca(ca_path, ssl_context)
26
- ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER unless ca_path.nil?
26
+ #ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER unless ca_path.nil?
27
27
  ssl_context
28
28
  end
29
29
 
@@ -72,7 +72,7 @@ module PahoMqtt
72
72
  @subscribed_mutex.synchronize {
73
73
  @subscribed_topics.concat(adjust_qos)
74
74
  }
75
- MQTT_ERR_SUCCESS
75
+ return adjust_qos
76
76
  end
77
77
 
78
78
  def remove_subscription(packet_id, to_unsub)
@@ -92,7 +92,7 @@ module PahoMqtt
92
92
  @subscribed_topics.delete_if { |topic| PahoMqtt.match_filter(topic.first, filter) }
93
93
  end
94
94
  }
95
- MQTT_ERR_SUCCESS
95
+ return to_unsub
96
96
  end
97
97
 
98
98
  def send_subscribe(topics, new_id)
@@ -1,3 +1,3 @@
1
1
  module PahoMqtt
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paho-mqtt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Goudet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2018-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.6.11
121
+ rubygems_version: 2.7.4
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: A simple mqtt client gem