Commit Graph
7 Commits
Author SHA1 Message Date
Olaf Bergmann e90be63294 changed type of m and szx in coap_block_t back to unsigned int.
This is a partial revert of commit 4f6a7f5db to avoid compiler-specific
code.
2014-06-18 18:48:37 +02:00
Olaf Bergmann 4f6a7f5dbf Replaced bit field for data from block header by unsigned int.
Usually, the block number can grow to 20 bits which is not
guaranteed to fit in a single unsigned int. To avoid compilers
(especially msp430-gcc) complaining about the width of the used
bit field, the type for num has been changed to unsigned int
hence restricting the number of acceptable blocks to 65536 on
those platforms. (No bounds check is done yet.)

m and szx now share a uint8_t.
2014-06-18 16:43:32 +02:00
Olaf Bergmann b5fe35646b Fixed handling of zero-length options in COAP_OPT_BLOCK_LAST macro.
The macro did not respect zero-length option values hence a pointer
to the option byte itself was returned. This macro now returns NULL
for zero-length option values. Macros and functions that use this
macro have been updated accordingly. COAP_OPT_BLOCK_NUM has been
replaced by the function coap_opt_block_num().
2014-02-04 17:50:35 +01:00
Olaf Bergmann f37ec9654e (Yet incomplete) support for block-wise transfer of .well-known/core.
The function wellknown_response() now honors a Block2 option when present
in the request or adds a new Block2 option to the response when the resource
description does not fit.

Bug: get_wkc_len() currently returns a hard-coded value instead of calculating
the size of the resource description (which requires changes in resource.c).
2014-01-07 23:41:15 +01:00
Olaf Bergmann 7daf193b53 modified block handling 2012-03-15 14:57:25 +01:00
Olaf Bergmann 9403e5bbeb improved block support 2012-03-10 02:30:01 +01:00
Olaf Bergmann 6f5d2524a5 support for block transfer 2012-03-10 01:00:03 +01:00