X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Flib%2Flibcoap-4.1.1%2Fasync.c;h=5bf5d954b8fd21aa7abcf9983e0ba74aae69d576;hb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;hp=8c6ec26279127379aad600040e8a51341de3237d;hpb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/lib/libcoap-4.1.1/async.c b/resource/csdk/connectivity/lib/libcoap-4.1.1/async.c index 8c6ec26..5bf5d95 100644 --- a/resource/csdk/connectivity/lib/libcoap-4.1.1/async.c +++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/async.c @@ -3,10 +3,10 @@ * Copyright (C) 2010,2011 Olaf Bergmann * * This file is part of the CoAP library libcoap. Please see - * README for terms of use. + * README for terms of use. */ -/** +/** * @file async.c * @brief state management for asynchronous messages */ @@ -41,28 +41,28 @@ coap_register_async(coap_context_t *context, coap_address_t *peer, coap_pdu_t *r /* store information for handling the asynchronous task */ s = (coap_async_state_t *) coap_malloc(sizeof(coap_async_state_t) + - request->hdr->token_length); + request->hdr->coap_hdr_udp_t.token_length); if (!s) { coap_log(LOG_CRIT, "coap_register_async: insufficient memory\n"); return NULL; } - memset(s, 0, sizeof(coap_async_state_t) + request->hdr->token_length); + memset(s, 0, sizeof(coap_async_state_t) + request->hdr->coap_hdr_udp_t.token_length); /* set COAP_ASYNC_CONFIRM according to request's type */ s->flags = flags & ~COAP_ASYNC_CONFIRM; - if (request->hdr->type == COAP_MESSAGE_CON) + if (request->hdr->coap_hdr_udp_t.type == COAP_MESSAGE_CON) s->flags |= COAP_ASYNC_CONFIRM; s->appdata = data; memcpy(&s->peer, peer, sizeof(coap_address_t)); - if (request->hdr->token_length) + if (request->hdr->coap_hdr_udp_t.token_length) { - s->tokenlen = request->hdr->token_length; - memcpy(s->token, request->hdr->token, request->hdr->token_length); + s->tokenlen = request->hdr->coap_hdr_udp_t.token_length; + memcpy(s->token, request->hdr->coap_hdr_udp_t.token, request->hdr->coap_hdr_udp_t.token_length); } memcpy(&s->id, &id, sizeof(coap_tid_t));