Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12 from wconrad/ruby-2.3
Browse files Browse the repository at this point in the history
active mode transfers work in ruby-2.3.0
  • Loading branch information
wconrad authored Jun 15, 2016
2 parents 535590b + f043219 commit eca9efd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## 0.1.3

Bugfixes:

- Active mode transfers send proper commands with Ruby > 2.2.2

## 0.1.2

Bugfixes:

- Reuse SSL session when creating new sockets
Expand Down
2 changes: 1 addition & 1 deletion double_bag_ftps.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)

Gem::Specification.new do |s|
s.name = "double-bag-ftps"
s.version = "0.1.2"
s.version = "0.1.3"
s.license = "MIT"
s.author = "Bryan Nix"
s.homepage = "https://github.com/bnix/double-bag-ftps"
Expand Down
5 changes: 5 additions & 0 deletions lib/double_bag_ftps.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'net/ftp'
require 'rubygems'
begin
require 'openssl'
rescue LoadError
Expand Down Expand Up @@ -109,6 +110,10 @@ def transfercmd(cmd, rest_offset = nil)
conn = ssl_socket(conn) # SSL connection now possible after cmd sent
else
sock = makeport
# Before ruby-2.2.3, makeport did a sendport automatically
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.2.3")
sendport(sock.addr[3], sock.addr[1])
end
if @resume and rest_offset
resp = sendcmd('REST ' + rest_offset.to_s)
if resp[0] != ?3
Expand Down

0 comments on commit eca9efd

Please sign in to comment.