From 7e474fe29af26c6fa56a15b6dc4722fa552aaa22 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 22 Aug 2011 14:00:01 +0000 Subject: [PATCH] Fix this up so that it works for this function as well git-svn-id: file:///home/svn/framework3/trunk@13610 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/db.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index d2a39e46e0..2867557858 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -543,6 +543,7 @@ class DBManager return if not active raise ArgumentError.new("Missing required option :session") if opts[:session].nil? raise ArgumentError.new("Expected an :etype") unless opts[:etype] + session = nil if opts[:session].respond_to? :db_record session = opts[:session].db_record @@ -563,7 +564,7 @@ class DBManager event_data = { :created_at => opts[:created_at] } end - unless s.respond_to?(:sid) + unless session.respond_to?(:sid) raise ArgumentError.new("Invalid :session, expected Session object got #{session.class}") end event_data[:session_id] = session.id