Project

General

Profile

Bug #2629

Updated by Junxiao Shi about 6 years ago

Snippet I get ERROR: Incorrect format of Exclude filter, when I add an implicit digest to reproduce: the exclude and send the Interest via face. 

 ``` 
 // g++ -std=c++0x x.cpp $(pkg-config --cflags --libs libndn-cxx) 
 #include <ndn-cxx/exclude.hpp> 

 using ndn::Exclude; 
 using ndn::Block; 

 int 
 main() 
 { 
   uint8_t WIRE[] = { 
     0x10, 0x22, // Exclude 
           0x01, 0x20, // ImplicitSha256DigestComponent 
                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 
                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 
                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 
                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd 
   }; 

   Block block(WIRE, sizeof(WIRE)); 

   Exclude exclude; 
   exclude.wireDecode(block); 

   return 0; 
 } 
 ``` 

 Expect: no error   
 Actual: `Exclude::wireDecode` throws `ndn::Exclude::Error` Problem can be reproduced if you run the attached code.

Back