diff -r ea3d443fb6bc -r 3c36683e13be servlib/bundling/BPQResponse.cc --- a/servlib/bundling/BPQResponse.cc Wed Jun 29 13:09:12 2011 +0100 +++ b/servlib/bundling/BPQResponse.cc Thu Jun 30 13:13:10 2011 +0100 @@ -75,9 +75,16 @@ buf(current_bi.full_length()) + current_bi.data_offset(); - BlockInfo* new_bi = new_response->api_blocks()->append_block(new_bp); + // it is intentional that the blocks are copied from + // the api -> recv list + // API blocks should not exist before a bundle is sent + // and will break an assertion in + // bundling/PrimaryBlockProcessor.cc: + // ASSERTION FAILED (xmit_blocks->size() == 0) + BlockInfo* new_bi = new_response->mutable_recv_blocks()-> + append_block(new_bp); new_bp->init_block( new_bi, - new_response->api_blocks(), + new_response->mutable_recv_blocks(), current_bi.type(), current_bi.flags(), data,