Commit cf58135d authored by Olaf Bergmann's avatar Olaf Bergmann

Updated to libcoap v4.3.0beta

parent 75465d88
/*
* am.cc -- DCAF authorization manager
*
* Copyright (C) 2015-2018 Olaf Bergmann <bergmann@tzi.org>
* 2015-2018 Stefanie Gerdes <gerdes@tzi.org>
* Copyright (C) 2015-2020 Olaf Bergmann <bergmann@tzi.org>
* 2015-2020 Stefanie Gerdes <gerdes@tzi.org>
*
* This file is part of the DCAF library libdcaf. Please see README
* for terms of use.
......@@ -280,7 +280,7 @@ main(int argc, char **argv) {
wait_ms = COAP_RESOURCE_CHECK_TIME * 1000;
while (!quit) {
int result = coap_run_once(ctx, wait_ms);
int result = coap_io_process(ctx, wait_ms);
if ( result < 0 ) {
break;
} else if ((unsigned)result < wait_ms) {
......
/* s -- CoAP resource server with authenticated authorization
*
* Copyright (c) 2016-2017 Olaf Bergmann <bergmann@tzi.org>
* 2016-2017 Stefanie Gerdes <gerdes@tzi.org>
* Copyright (c) 2016-2020 Olaf Bergmann <bergmann@tzi.org>
* 2016-2020 Stefanie Gerdes <gerdes@tzi.org>
*
* This file is part of the DCAF library libdcaf. Please see README
* for terms of use.
......@@ -290,7 +290,7 @@ main(int argc, char **argv) {
init_resources(ctx);
while (true) {
coap_run_once(ctx, 0);
coap_io_process(ctx, COAP_IO_WAIT);
/* regularly check tickets, deprecated tickets and nonces if they
are expired */
dcaf_expiration();
......
/*
* dcaf.c -- libdcaf core
*
* Copyright (C) 2015-2019 Olaf Bergmann <bergmann@tzi.org>
* 2015-2019 Stefanie Gerdes <gerdes@tzi.org>
* Copyright (C) 2015-2020 Olaf Bergmann <bergmann@tzi.org>
* 2015-2020 Stefanie Gerdes <gerdes@tzi.org>
*
* This file is part of the DCAF library libdcaf. Please see README
* for terms of use.
......@@ -345,7 +345,7 @@ handle_ticket_transfer(dcaf_context_t *dcaf_context,
dcaf_transaction_update(t->state.future, session, pdu);
coap_send(session, pdu);
while (!done) {
coap_run_once(ctx, 0);
coap_io_process(ctx, COAP_IO_WAIT);
done = dcaf_check_transaction(dcaf_context, t->state.future)
&& (t->state.future->state.act == DCAF_STATE_IDLE);
}
......
/*
* dcaf_transaction.c -- DCAF transaction store
*
* Copyright (C) 2015-2016 Olaf Bergmann <bergmann@tzi.org>
* 2015-2016 Stefanie Gerdes <gerdes@tzi.org>
* Copyright (C) 2015-2020 Olaf Bergmann <bergmann@tzi.org>
* 2015-2020 Stefanie Gerdes <gerdes@tzi.org>
*
* This file is part of the DCAF library libdcaf. Please see README
* for terms of use.
......@@ -365,10 +365,10 @@ dcaf_send_request_uri(dcaf_context_t *dcaf_context,
while (!(done && coap_can_exit(ctx))) {
unsigned int timeout = wait_ms == 0 ? 1000 : min(wait_ms, 1000);
/* coap_run_once() returns the time in milliseconds it has
/* coap_io_process() returns the time in milliseconds it has
* spent. We use this value to determine if we have run out of
* time. */
result = coap_run_once(ctx, timeout);
result = coap_io_process(ctx, timeout);
dcaf_log(DCAF_LOG_DEBUG, "coap_run_once returns %d\n", result);
if (result < 0) { /* error */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment