Function anj_coap_downloader_get_error

Function Documentation

int anj_coap_downloader_get_error(anj_coap_downloader_t *coap_downloader)

Retrieves the error code from the last failed download operation.

This function must be called only when the downloader’s status is ANJ_COAP_DOWNLOADER_STATUS_FAILED. It returns a negative error code indicating the reason for the failure. The behavior is undefined if this function is called in any other state.

Parameters:

coap_downloader – CoAP downloader state.

Returns:

Error code indicating the reason for the failure. For possible return values, see CoAP downloader error codes.