Skip to content

Commit

Permalink
mod: print output of DATA dialog only when @debug flag is set as well…
Browse files Browse the repository at this point in the history
… as @Audit
  • Loading branch information
TomFreudenberg committed Mar 3, 2015
1 parent ff1a4b7 commit df43c72
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/midi-smtp-server-example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def on_message_data_event(ctx)
# and accepting a maximum of 5 simultaneous connections
server = MySmtpServer.new

# we want io-logging enabled
# we want smtp-server-dialog-logging enabled
server.audit = true

# Start the server
Expand Down
2 changes: 1 addition & 1 deletion lib/midi-smtp-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def serve(io)

# read and handle input
data = io.readline
log("<<< " + data) if(@audit)
log("<<< " + data) if(@audit) && ((Thread.current[:cmd_sequence] != :CMD_DATA) || @debug)

# process commands and handle special MidiSmtpServerExceptions
begin
Expand Down
2 changes: 1 addition & 1 deletion midi-smtp-server.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'midi-smtp-server'
s.version = '1.1.2'
s.version = '1.1.3'
s.date = '2015-03-03'
s.summary = "MidiSmtpServer Class"
s.description = "A small and highly customizable ruby SMTP-Server."
Expand Down

0 comments on commit df43c72

Please sign in to comment.