mdns mdns_search_service mdns_search_stop: define the request id as unsigned.

This commit is contained in:
Our Air Quality 2019-04-12 10:20:11 +10:00 committed by Dirk Ziegelmeier
parent 3d7ff53070
commit ff17530997
2 changed files with 5 additions and 5 deletions

View File

@ -2506,10 +2506,10 @@ mdns_resp_add_service_txtitem(struct mdns_service *service, const char *txt, u8_
* @param request_id The search request to stop
*/
void
mdns_search_stop(s8_t request_id)
mdns_search_stop(u8_t request_id)
{
struct mdns_request *req;
LWIP_ASSERT("mdns_search_stop: bad request_id", (request_id >= 0) && (request_id < MDNS_MAX_REQUESTS));
LWIP_ASSERT("mdns_search_stop: bad request_id", request_id < MDNS_MAX_REQUESTS);
req = &mdns_requests[request_id];
if (req && req->result_fn) {
req->result_fn = NULL;
@ -2533,7 +2533,7 @@ mdns_search_stop(s8_t request_id)
err_t
mdns_search_service(const char *name, const char *service, enum mdns_sd_proto proto,
struct netif *netif, search_result_fn_t result_fn, void *arg,
s8_t *request_id)
u8_t *request_id)
{
u8_t slot;
struct mdns_request *req;

View File

@ -136,8 +136,8 @@ typedef void (*search_result_fn_t)(struct mdns_answer *answer, const char *varpa
err_t mdns_search_service(const char *name, const char *service, enum mdns_sd_proto proto,
struct netif *netif, search_result_fn_t result_fn, void *arg,
s8_t *request_id);
void mdns_search_stop(s8_t request_id);
u8_t *request_id);
void mdns_search_stop(u8_t request_id);
#endif /* LWIP_MDNS_SEARCH */