Shoichi Sakane
 changed
              bug 8070
        
             
          
            | What | 
            Removed | 
            Added | 
          
         
           | Status | 
           RESOLVED
            | 
           INCOMPLETE
            | 
         
         
           | Resolution | 
           LATER
            | 
           ---
            | 
         
      
        
            Comment # 3
              on bug 8070
              from  Shoichi Sakane
        New version of the draft was submitted immediately after I submitted the patch.
 Now latest version is two more increased.  The latest version of coap is 14. 
I am going to submit new patch for that soon.
> - The functions coap_opt_is_valid, coap_opt_len_min and coap_opt_len_max are all only ever used together. It would be much more efficient to replace them all with a "coap_opt_get" function that returns a pointer to a struct coap_option_range_t (or NULL if the option type is invalid). Then it would only have to loop through the list of options once instead of three times.
Absolutely! Thanks.
> - You replace some proto_tree_add_item calls with proto_tree_add_text. This is generally discouraged as the values can no longer be filtered on this way (there are some cases where it is unavoidable, unfortunately). Is there a particular reason you replaced these, or can they be left as is? New code should try to use proto_tree_add_item where possible, for the same reason.
The encoding rule of CoAP is not simple and is complicated comparingwith the
things supported by proto_tree_add_item().if the length field of some of
options is zero, it means null, some mean zero.
some length fields have a semantic to decode the folloging field.
So, I decide to use proto_tree_add_text() instead stick to use add_item().
Other reason is to make the output more readable.
> - You say you fuzz-tested the changes, which implies you have a capture. If you could attach the capture to the bug so that it gets picked up by the auto-tester, that would be appreciated.
I will also submit a capture data next time.
Shoichi
         
      
      
      You are receiving this mail because:
      
      
          - You are watching all bug changes.