alanxz/SimpleAmqpClient — pull request #46 by alanxz (2012-11-28 17:05:34+00:00)
Title: Fix for throw bad_alloc when 0-length table received

This is a fix for the issue #45: a std::bad_alloc being thrown when a
0-length table is received by SimpleAmqpClient. The bug is incorrectly
thinking the allocation failed when we try to allocate a 0-length buffer
and thinking the allocation failed when we check it against NULL.

The fix is to check for 0-length table in TableImpl::CopyTable and return
AMQP_EMPTY_TABLE when a 0-length table is detected.