lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #9792] mDNS: mdns_search_service mdns_search_stop: d


From: Douglas
Subject: [lwip-devel] [patch #9792] mDNS: mdns_search_service mdns_search_stop: define the request id as unsigned.
Date: Tue, 23 Apr 2019 06:48:03 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36

Follow-up Comment #2, patch #9792 (project lwip):

The request ID is an unsigned integer so declaring it as such seems most
appropriate (to me anyway). The search service functions are relatively new
additions, and also an option, so it might be best to change this now - if
that is the consensus.

There are pros and cons to some of these decisions. Some might consider it a
clever encoding of an integer to have negative values be the error codes and
positive values the index, and then to have functions that accept that ID
check for an error value passed to them. On the other hand some might consider
it cleaner to use two separate values and not conflate these, so that both the
error code value and the ID index value can have separate types and that is my
own general preference for a range of reasons.

Fwiw I did a good deal of rewriting of the mdns code, to malloc dynamic
objecst rather than using large fix stack allocations - for the benefit of
limited memory devices. The patches submitted back here are just some
suggestions and not necessary. If people wish to see the full changes, which
will never be accepted here as lwip can not depend on malloc, see
https://github.com/ourairquality/lwip/

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?9792>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]