diff options
author | Matthew Sackman <matthew@lshift.net> | 2010-02-04 15:40:56 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@lshift.net> | 2010-02-04 15:40:56 +0000 |
commit | fd34fb884352f9f010684665bb251abecd934874 (patch) | |
tree | b8eed88469ed3a7dd0ca49f331743e91fc9fb3a4 /codegen.py | |
parent | 30aa0f6084dd0a78f9ef196bc76d5302b269b7bc (diff) | |
parent | 4713a64bd42efe0c4e61e7f8bad0c7122a1c433a (diff) | |
download | rabbitmq-server-bug22254.tar.gz |
merging default into bug 22254bug22254
Diffstat (limited to 'codegen.py')
-rw-r--r-- | codegen.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -214,6 +214,8 @@ def genErl(spec): elif type == 'table': print " F%d = rabbit_binary_parser:parse_table(F%dTab)," % \ (f.index, f.index) + elif type == 'shortstr': + print " if F%dLen > 255 -> exit(method_field_shortstr_overflow); true -> ok end," % (f.index) else: pass @@ -246,7 +248,10 @@ def genErl(spec): elif type == 'table': print " F%dTab = rabbit_binary_generator:generate_table(F%d)," % (f.index, f.index) print " F%dLen = size(F%dTab)," % (f.index, f.index) - elif type in ['shortstr', 'longstr']: + elif type == 'shortstr': + print " F%dLen = size(F%d)," % (f.index, f.index) + print " if F%dLen > 255 -> exit(method_field_shortstr_overflow); true -> ok end," % (f.index) + elif type == 'longstr': print " F%dLen = size(F%d)," % (f.index, f.index) else: pass |