Commit Graph
26 Commits
Author SHA1 Message Date
Jon Shallow a5c0d12354 doc: Document the coap_can_exit() function 2021-08-04 14:14:37 +01:00
Jon Shallow 8ce139d349 coap_event.h: Make coap_event_t an enum
examples/coap-client.c:
examples/coap-server.c:

Explicitly define each enum case to remove complier warnings.
2021-07-31 17:08:10 +01:00
Jon Shallow c61748f4dd RFC7959: session->lg_xmit not being released for a server
Following transmission of a large body by a server using BLOCK2,
session->lg_xmit is not getting released. It does get released when the session
is freed off.

A client doing transmission of a large body idoes release session->lg_xmit.

Timeout lg_xmit after 4 * ACK_TIMEOUT seconds after final block is transmitted.
2021-07-07 15:27:06 +01:00
Jon Shallow d52986f004 coap_resource_init: Leading '/' is not required for uri_path
Remind users in the documentation that the full path defining the resource in
the uri_path parameter does not normally need a leading '/'.

E.g. It should be "full/path/for/resource", not "/full/path/for/resource".
2021-06-30 14:05:22 +01:00
Jon Shallow 60c69557f3 pdu.h: Remove unassigned response code COAP_RESPONSE_CODE_OK 2021-06-30 12:11:54 +01:00
Olaf Bergmann 1da37b9abb Bump version to 4.3.0 2021-06-21 10:39:42 +02:00
Olaf Bergmann 64505862d1 update release version to rc4 in configuration 2021-06-15 10:27:25 +02:00
Olaf Bergmann 60421db0a5 Add SPDX-License-Identifier to source files
This change adds 'SPDX-License-Identifier: BSD-2-Clause' [1] to
the source code files that originate in the libcoap project.

Note that not all files are tagged because they are pulled in
from other sources and thus may fall under a different license.
More information about these is contained in the LICENSE file.

[1] https://spdx.org/licenses/BSD-2-Clause.html
2021-06-08 18:14:03 +02:00
Olaf Bergmann 677b0c8330 coap.h.windows{,.in}: Remove bits.h 2021-06-08 15:53:23 +02:00
Olaf Bergmann db79086c67 Cleanup: Remove unused header file bits.h
The functions in bits.h have not been used anymore and can be removed.
2021-06-08 15:26:52 +02:00
Olaf Bergmann 44075adb52 uthash: Update URIs to uthash homepage
* Update uthash.h and utlist.h from upstream. These files now include
  the fixed URI to the uthash homepage.
* Update uthash URI in the LICENSE file.
2021-06-08 14:57:16 +02:00
Jon Shallow 8d73044579 coap_send(): Consolidate coap_send() and coap_send_large() for applications
As it is not that intuitive when to use coap_send() or coap_send_large()
in applications, rename libcoap usage of coap_send() to coap_send_internal()
and then all usages of coap_send_large() to coap_send() so that only
coap_send() is required in applications.

Documentation updated accordingly.
2021-05-29 14:08:00 +01:00
Jon Shallow 58fca65ceb net.c: coap_option_check_critical() not updating 'unknown' by ref
'unknown' is updated by coap_option_check_critical if there is a critical
option, but as it is not passed in by reference, any caller does not see
any change to 'unknown'.

Pass in 'unknown' by reference.

Issue got missed in change e2e7830
2021-05-26 14:57:48 +01:00
Jon Shallow f726d0460a Observe: Support FETCH with data for triggered responses
The original requesting PDU is now kept with the Observe request along with
its data and used whenever an additional response needs to be generated.

Abstracted information from the requesting PDU is no longer kept in
coap_subscription_t as it can be obtained from the kept PDU.

No longer any need to check for request PDU in request handlers as it is now
always provided.

coap_resource_notify_observers() now ignores the query parameter, as a
cache_key is now used for request matching.
2021-05-21 13:08:11 +01:00
Jon Shallow aaf4d874d4 TLS Support: Move common TLS support descriptions into libcoap
Added new function coap_string_tls_support() for outputting what key types the
TLS library supports to remove duplicated code out of the examples.
2021-05-12 18:02:37 +01:00
Olaf Bergmann 4214760117 update release version to rc3 in configuration 2021-04-30 09:46:10 +02:00
Olaf Bergmann 2cae4ff662 coap_resource_internal.h: include uthash.h 2021-04-29 12:41:33 +02:00
Olaf Bergmann 07ac47ae73 resource.h: remove uthash from public API
As the uthash macros have been moved to coap_resource_internal.h by
PR #582 [1], see commit da18643, the convenience macros and uthash.h
inclusion can be removed from resource.h

[1] https://github.com/obgm/libcoap/pull/582
2021-04-29 12:41:33 +02:00
Jon Shallow 14cf0fe9e5 struct: Remove struct prefix for structures that are typedef'd 2021-04-26 16:52:14 +01:00
obgm 8c4a566313 Merge pull request #661 from mrdeep1/const_pdu
net.h: Make request PDUs const in functions
2021-04-26 17:32:48 +02:00
Jon Shallow 17b7c13435 net.h: Make request PDUs const in functions
Now that coap_method_handler_t passes in the request PDU as const, make
functions that have request PDUs as a parameter const for that parameter.
2021-04-26 08:00:26 +01:00
Jon Shallow f436961084 coap_session.c: Correct coap_session_get_max_retransmit() name
Make things consistent.
2021-04-23 09:11:19 +01:00
Jon Shallow 23f8a531b1 Nits: Fix documentation
Remove a duplicate definition.
2021-04-22 16:47:35 +01:00
Jon Shallow 5bcd89da01 handlers: Make parameters const where appropriate
Also remove the unneeded parameters which can easily be derived - e.g context
and token.
2021-04-22 07:18:47 +01:00
Olaf Bergmann 2e54ca5252 pdu.[hc]: make token argument const in coap_pdu_duplicate() 2021-04-21 14:38:54 +02:00
Olaf Bergmann 3f7ba0afc8 Bump API version to 3, release candidate 2 2021-04-21 14:38:54 +02:00