diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 10:07:53 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-07 10:07:53 +0000 |
commit | f53c5cbb2c4d745db50211ff863e7b5d0fcaf742 (patch) | |
tree | f5dd5bbe98aa89d705a186ae6da46fdb4a9ae77d /ext | |
parent | ffdcd1a4dc9ad1ea4d2a320461746dbe50fb5527 (diff) |
merge revision(s) 26850:
* ext/openssl/ossl_ssl_session.c
(ossl_ssl_session_{get,set}_time{,out}): fixed a bug introduced by
backporting. (see [ruby-dev:40573]) use long in according to
OpenSSL API. (SSL_SESSION_{get,set}_time{,out})
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@28194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl_ssl_session.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c index 96c4c94b91..86f9d80cef 100644 --- a/ext/openssl/ossl_ssl_session.c +++ b/ext/openssl/ossl_ssl_session.c @@ -100,7 +100,7 @@ static VALUE ossl_ssl_session_eq(VALUE val1, VALUE val2) static VALUE ossl_ssl_session_get_time(VALUE self) { SSL_SESSION *ctx; - time_t t; + long t; GetSSLSession(self, ctx); @@ -109,7 +109,7 @@ static VALUE ossl_ssl_session_get_time(VALUE self) if (t == 0) return Qnil; - return rb_funcall(rb_cTime, rb_intern("at"), 1, TIMET2NUM(t)); + return rb_funcall(rb_cTime, rb_intern("at"), 1, LONG2NUM(t)); } /* @@ -122,20 +122,20 @@ static VALUE ossl_ssl_session_get_time(VALUE self) static VALUE ossl_ssl_session_get_timeout(VALUE self) { SSL_SESSION *ctx; - time_t t; + long t; GetSSLSession(self, ctx); t = SSL_SESSION_get_timeout(ctx); - return TIMET2NUM(t); + return LONG2NUM(t); } #define SSLSESSION_SET_TIME(func) \ static VALUE ossl_ssl_session_set_##func(VALUE self, VALUE time_v) \ { \ SSL_SESSION *ctx; \ - unsigned long t; \ + long t; \ \ GetSSLSession(self, ctx); \ \ @@ -147,7 +147,7 @@ static VALUE ossl_ssl_session_get_timeout(VALUE self) rb_raise(rb_eArgError, "unknown type"); \ } \ \ - t = NUM2ULONG(time_v); \ + t = NUM2LONG(time_v); \ \ SSL_SESSION_set_##func(ctx, t); \ \ |