rsence-pre 2.1.0.17 → 2.1.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0.17.pre
1
+ 2.1.0.18.pre
@@ -173,7 +173,7 @@ module RSence
173
173
  end
174
174
 
175
175
  def clone_ses( msg, old_data, old_id, old_key, ses_seed )
176
- ses_data = Marshal.restore( Marshal.dump( old_data ) )
176
+ ses_data = Marshal.load( Marshal.dump( old_data ) )
177
177
  old_data[:timeout] = Time.now.to_i + @config[:cloned_session_expires_in]
178
178
  timeout = Time.now.to_i + @config[:timeout_secs]
179
179
  cookie_key = @randgen.gen_many(@config[:cookie_key_multiplier]).join('')
@@ -181,13 +181,6 @@ module RSence
181
181
  ## Used for future upgrades:
182
182
  # version = table_version
183
183
 
184
- if @config[:reset_sessions]
185
- puts "Resetting all sessions..."
186
- reset_sessions()
187
- else
188
- restore_sessions()
189
- end
190
-
191
184
  return true
192
185
  end
193
186
 
@@ -219,7 +212,7 @@ module RSence
219
212
  @db[:rsence_session].filter(:id => ses_id).delete
220
213
  @db[:rsence_uploads].filter(:ses_id => ses_id).delete
221
214
  else
222
- ses_data = Marshal.restore( ses_data_dump )
215
+ ses_data = Marshal.load( ses_data_dump )
223
216
  ses_key = ses_data[:ses_key]
224
217
  @sessions[ses_id] = ses_data
225
218
  @session_keys[ ses_key ] = ses_id
@@ -51,6 +51,13 @@ module RSence
51
51
  :resolved_deps => core_pkgs[:core],
52
52
  :resolved_categories => core_pkgs
53
53
  })
54
+ if RSence.config[:session_conf][:reset_sessions]
55
+ puts "Resetting all sessions..."
56
+ @sessions.reset_sessions()
57
+ else
58
+ @sessions.restore_sessions()
59
+ end
60
+
54
61
  if RSence.launch_pid != Process.pid
55
62
  Process.kill( 'TERM', RSence.launch_pid )
56
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence-pre
3
3
  version: !ruby/object:Gem::Version
4
- hash: 69
4
+ hash: 67
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
9
  - 0
10
- - 17
11
- version: 2.1.0.17
10
+ - 18
11
+ version: 2.1.0.18
12
12
  platform: ruby
13
13
  authors:
14
14
  - Riassence Inc.