Skip to content

Commit

Permalink
Merge branch 'master' of github.com:processone/tsung into github
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Sep 9, 2014
2 parents b4504bc + 27cf6f5 commit e84703a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/mqtt_frame.erl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ decode(<<FixedHeader:8/big, Rest/binary>>) ->
{RemainingLength, Rest1} = decode_length(Rest),
Size = size(Rest1),
if
RemainingLength == 0 andalso Size == 0 -> more;
Size >= RemainingLength ->
<<Body:RemainingLength/binary-unit:8, Left/binary>> = Rest1,
{decode_message(decode_fixed_header(<<FixedHeader>>), Body), Left};
Expand Down Expand Up @@ -336,6 +337,8 @@ encode_message(#mqtt{} = Message) ->

decode_length(Data) ->
decode_length(Data, 1, 0).
decode_length(<<>>, Multiplier, Value) ->
{0, <<>>};
decode_length(<<0:1, Length:7, Rest/binary>>, Multiplier, Value) ->
{Value + Multiplier * Length, Rest};
decode_length(<<1:1, Length:7, Rest/binary>>, Multiplier, Value) ->
Expand Down
5 changes: 5 additions & 0 deletions src/tsung-plotter/tsplot.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ sys.path.append(LIBDIR)

from tsung_plotter.tsung import TsungLog
from ConfigParser import ConfigParser

# Prevents pylab from requiring a X Server to run
import matplotlib
matplotlib.use("Agg")

from pylab import *


Expand Down

0 comments on commit e84703a

Please sign in to comment.