servlib/bundling/BundleProtocol.cc
changeset 50 4ef31c3e5a8b
parent 49 767b4a1b4a9e
child 51 c6ca423f1eaf
equal deleted inserted replaced
49:767b4a1b4a9e 50:4ef31c3e5a8b
   132                 && xmit_blocks->find_block(BundleProtocol::PAYLOAD_BLOCK)) {
   132                 && xmit_blocks->find_block(BundleProtocol::PAYLOAD_BLOCK)) {
   133                 continue;
   133                 continue;
   134             }
   134             }
   135             
   135             
   136             log_debug_p(LOG, "adding recv_block %d", iter->type());
   136             log_debug_p(LOG, "adding recv_block %d", iter->type());
   137             iter->owner()->prepare(bundle, xmit_blocks, &*iter, link,
   137             find_processor(iter->type())->prepare(bundle, 
   138                                    BlockInfo::LIST_RECEIVED);
   138                                                   xmit_blocks,
       
   139                                                   &*iter, 
       
   140                                                   link, 
       
   141                                                   BlockInfo::LIST_RECEIVED);
       
   142 
       
   143 //            iter->owner()->prepare(bundle, xmit_blocks, &*iter, link,
       
   144 //                                   BlockInfo::LIST_RECEIVED);
   139         }
   145         }
   140     }
   146     }
   141     else {
   147     else {
   142         log_debug_p(LOG, "adding primary and payload block");
   148         log_debug_p(LOG, "adding primary and payload block");
   143         BlockProcessor* bp = find_processor(PRIMARY_BLOCK);
   149         BlockProcessor* bp = find_processor(PRIMARY_BLOCK);
   150     for (BlockInfoVec::iterator iter = api_blocks->begin();
   156     for (BlockInfoVec::iterator iter = api_blocks->begin();
   151          iter != api_blocks->end();
   157          iter != api_blocks->end();
   152          ++iter)
   158          ++iter)
   153     {
   159     {
   154         log_debug_p(LOG, "adding api_block %d", iter->type());
   160         log_debug_p(LOG, "adding api_block %d", iter->type());
   155         iter->owner()->prepare(bundle, xmit_blocks, 
   161         find_processor(iter->type())->prepare(bundle, 
   156                                &*iter, link, BlockInfo::LIST_API);
   162                                               xmit_blocks,
       
   163                                               &*iter, 
       
   164                                               link, 
       
   165                                               BlockInfo::LIST_API);
       
   166 
       
   167 //        iter->owner()->prepare(bundle, xmit_blocks, 
       
   168 //                               &*iter, link, BlockInfo::LIST_API);
   157     }
   169     }
   158 
   170 
   159     // now we also make sure to prepare() on any registered processors
   171     // now we also make sure to prepare() on any registered processors
   160     // that don't already have a block in the output list. this
   172     // that don't already have a block in the output list. this
   161     // handles the case where we have a locally generated block with
   173     // handles the case where we have a locally generated block with