net: coap: make coap vars configurable
COAP_DEFAULT_MAX_RETRANSMIT and COAP_DEFAULT_ACK_RANDOM_FACTOR should be configurable to determine the max transmission timeout of a CoAP packet. Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
This commit is contained in:
parent
934f53202e
commit
363e2f3014
5 changed files with 17 additions and 7 deletions
|
@ -365,7 +365,7 @@ int lwm2m_init_message(struct lwm2m_message *msg)
|
|||
}
|
||||
|
||||
r = coap_pending_init(msg->pending, &msg->cpkt, &msg->ctx->remote_addr,
|
||||
COAP_DEFAULT_MAX_RETRANSMIT);
|
||||
CONFIG_COAP_MAX_RETRANSMIT);
|
||||
if (r < 0) {
|
||||
LOG_ERR("Unable to initialize a pending "
|
||||
"retransmission (err:%d).",
|
||||
|
@ -2122,7 +2122,7 @@ static int lwm2m_response_promote_to_con(struct lwm2m_message *msg)
|
|||
}
|
||||
|
||||
ret = coap_pending_init(msg->pending, &msg->cpkt, &msg->ctx->remote_addr,
|
||||
COAP_DEFAULT_MAX_RETRANSMIT);
|
||||
CONFIG_COAP_MAX_RETRANSMIT);
|
||||
if (ret < 0) {
|
||||
LOG_ERR("Unable to initialize a pending "
|
||||
"retransmission (err:%d).",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue