Skip to content

Commit ee5cdf8

Browse files
committed
Fixes for 0.7
1 parent 6113172 commit ee5cdf8

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/AMQPClient.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
__precompile__(true)
2-
32
module AMQPClient
43

54
using Compat
6-
using Base.I18n
75
import Base: write, read, read!, close, convert, show, isopen
86

7+
const DEBUG = false
8+
99
if !isdefined(Base, Symbol("@debug"))
1010
# 0.6: enable logging only during debugging
11-
const DEBUG = false
1211
macro debug(s)
1312
esc(:(DEBUG && println("[ Debug: ", $s)))
1413
end
1514
else
1615
# 0.7: use builtin logging by enabling following statement
1716
# Base.CoreLogging.global_logger(Base.CoreLogging.SimpleLogger(STDERR, Base.CoreLogging.Debug))
17+
macro debug(s)
18+
esc(:(DEBUG && Base.@debug($s)))
19+
end
1820
end
1921

2022
if !isdefined(Base, :popfirst!)

src/protocol.jl

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ end
110110

111111
write(io::IO, f::TAMQPGenericFrame) = write(io, hton(f.hdr), f.props, f.payload, f.fend)
112112

113-
"""
114-
Given a generic frame, convert it to appropriate exact frame type.
115-
"""
113+
# """
114+
# Given a generic frame, convert it to appropriate exact frame type.
115+
# """
116116
#function narrow_frame(f::TAMQPGenericFrame)
117117
# if f.hdr == FrameMethod
118118
# return TAMQPMethodFrame(f)
@@ -968,13 +968,10 @@ function send_connection_start_ok(chan::MessageChannel, auth_params::Dict{String
968968
@assert mechanism in mechanisms
969969

970970
# set up locale
971-
client_locale = locale()
972-
if isempty(client_locale)
973-
# pick up one of the server locales
974-
locales = split(get_property(chan, :Locales, ""), ' ')
975-
@debug("supported locales: $(locales)")
976-
client_locale = locales[1]
977-
end
971+
# pick up one of the server locales
972+
locales = split(get_property(chan, :Locales, ""), ' ')
973+
@debug("supported locales: $(locales)")
974+
client_locale = locales[1]
978975
@debug("client_locale: $(client_locale)")
979976

980977
# respond to login

0 commit comments

Comments
 (0)