Forgot to initialize hdrs.

This commit is contained in:
Steve Powell 2012-07-25 15:57:37 +01:00
parent f87babeb55
commit 2cec0d0c09
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ parser(<<Ch:8, Rest/binary>>, Term , State) -> parser(Rest, Term, accu
%% state transitions
goto(noframe, command, Rest, State ) -> parser(Rest, command, State#state{acc = []});
goto(command, headers, Rest, State = #state{acc = Acc} ) -> parser(Rest, headers, State#state{cmd = lists:reverse(Acc)});
goto(command, headers, Rest, State = #state{acc = Acc} ) -> parser(Rest, headers, State#state{cmd = lists:reverse(Acc), hdrs = []});
goto(headers, body, Rest, #state{cmd = Cmd, hdrs = Hdrs}) -> parse_body(Rest, #stomp_frame{command = Cmd, headers = Hdrs});
goto(headers, hdrname, Rest, State ) -> parser(Rest, hdrname, State#state{acc = []});
goto(hdrname, hdrvalue, Rest, State = #state{acc = Acc} ) -> parser(Rest, hdrvalue, State#state{acc = [], hdrname = lists:reverse(Acc)});