Makingcoap_transaction_id() always use the peer for ID generation.

This commit is contained in:
Pawel Winogrodzki committed 2017-04-04 02:32:45 -07:00
1 parent bcd4019d3a
commit 6112604569
2 files changed
-6

No files matched your search

-2
View File
@@ -387,11 +387,9 @@ int coap_handle_message(coap_context_t *ctx,
* @param pdu The message that initiated the transaction.
* @param id Set to the new id.
*/
#if defined(WITH_POSIX) || defined(WITH_LWIP) || defined(WITH_CONTIKI)
void coap_transaction_id(const coap_address_t *peer,
const coap_pdu_t *pdu,
coap_tid_t *id);
#endif
/**
* This function removes the element with given @p id from the list given list.
-4
View File
@@ -491,12 +491,9 @@ coap_option_check_critical(coap_context_t *ctx,
return ok;
}
#if defined(WITH_POSIX) || defined(WITH_LWIP) || defined(WITH_CONTIKI)
void
coap_transaction_id(const coap_address_t *peer, const coap_pdu_t *pdu,
coap_tid_t *id) {
(void)peer;
coap_key_t h;
memset(h, 0, sizeof(coap_key_t));
@@ -531,7 +528,6 @@ coap_transaction_id(const coap_address_t *peer, const coap_pdu_t *pdu,
*id = (((h[0] << 8) | h[1]) ^ ((h[2] << 8) | h[3])) & INT_MAX;
}
#endif
coap_tid_t
coap_send_ack(coap_context_t *context,