mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-08 10:32:53 +03:00
Merge pull request #74 from PawelWMS/transaction_id_fix
Reverting coap_transaction_id() to work the way it did.
This commit is contained in:
commit
f446afdf1e
2 files changed
-6
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user