net-tns 1.1.2 → 1.1.3

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
2
  SHA1:
3
- metadata.gz: abd5c0ddbf15b9a4e4c3c37795d88dfc92357a45
4
- data.tar.gz: 83401b9ffebe9ad974a918443196f5bf1493b9a3
3
+ metadata.gz: 960f9f3d455d66f315ed56e487b697847a901645
4
+ data.tar.gz: f6974f868b7ec2eaff1569b53cc1caac04eec1da
5
5
  SHA512:
6
- metadata.gz: a0b363f8c3c8fb3a156e33f695d7b1220f296b809c787d9e25c66da3ff6ece1706138586fb01219280980e1efce901141dc4460876503631b718aa6a0fd8d34d
7
- data.tar.gz: f943432ae2af1f05f1f2b7f9e66c53416ba585d99f5fdb63d30158dd3a1302aa6e1150e164738d8bdb221a34f531229dbec95b24e4ecc3eb7469a9adc743a18e
6
+ metadata.gz: efd7ac7d200532d8b204e42b8fbdb413e3ce03f33a601e5b1b5c820ac41d6e558d97fac4d77ebc43987c476adc5b192eb07b423734462c46e5388a6c48e2a86d
7
+ data.tar.gz: 7eb7c6bce9a5300eda5a73b0974d0aa731cabb7954ca5ace9967e406162dcfcd27f779ba41f55cf20836dea75db886bcf466cf5ddfbd3f29506debda159dc0b4
@@ -127,6 +127,10 @@ module Net
127
127
 
128
128
  # @param packet [Net::TNS::Packet]
129
129
  def send_tns_packet( packet )
130
+ if @socket.nil? || @socket.closed?
131
+ Net::TNS.logger.warn( "Can't send packet to a closed or nil socket!" )
132
+ return
133
+ end
130
134
  # Store this in case we get a Resend
131
135
  @tns_last_sent_packet = packet
132
136
  Net::TNS.logger.debug( "Sending packet #{packet.class} (#{packet.num_bytes} bytes)" )
@@ -1,5 +1,5 @@
1
1
  module Net
2
2
  module TNS
3
- VERSION = "1.1.2"
3
+ VERSION = "1.1.3"
4
4
  end
5
5
  end
@@ -152,7 +152,7 @@ module Net::TTI
152
152
 
153
153
  # Helper function for encryption.
154
154
  def self.openssl_encrypt( cipher, key, iv, data, padding=false )
155
- cipher = OpenSSL::Cipher::Cipher.new( cipher )
155
+ cipher = OpenSSL::Cipher.new( cipher )
156
156
  cipher.encrypt
157
157
  cipher.key = key
158
158
  cipher.iv = iv unless iv.nil?
@@ -163,7 +163,7 @@ module Net::TTI
163
163
 
164
164
  # Helper function for decryption.
165
165
  def self.openssl_decrypt( cipher, key, iv, data, padding=false )
166
- cipher = OpenSSL::Cipher::Cipher.new( cipher )
166
+ cipher = OpenSSL::Cipher.new( cipher )
167
167
  cipher.decrypt
168
168
  cipher.key = key
169
169
  cipher.iv = iv unless iv.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-tns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Woodbury
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-11 00:00:00.000000000 Z
12
+ date: 2017-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bindata