diff --git a/api/oc_knx_client.c b/api/oc_knx_client.c index f7c48bbc6..f2b56942d 100644 --- a/api/oc_knx_client.c +++ b/api/oc_knx_client.c @@ -665,7 +665,7 @@ oc_do_s_mode_read(int64_t group_address) (uint32_t)group_address, sia_value, iid); // find the grpid that belongs to the group address - grpid = oc_find_grpid_in_publisher_table(group_address); + grpid = oc_find_grpid_in_recipient_table(group_address); if (grpid > 0) { #ifdef OC_USE_MULTICAST_SCOPE_2 oc_issue_s_mode(2, sia_value, grpid, group_address, iid, "r", 0, 0); diff --git a/security/oc_oscore_engine.c b/security/oc_oscore_engine.c index 6691a962f..045078497 100644 --- a/security/oc_oscore_engine.c +++ b/security/oc_oscore_engine.c @@ -1029,8 +1029,7 @@ oc_oscore_send_message(oc_message_t *msg) coap_set_header_max_age(coap_pkt, 0); } - bool is_request = - coap_pkt->type == COAP_TYPE_CON || coap_pkt->type == COAP_TYPE_NON; + bool is_request = coap_pkt->code >= OC_GET && coap_pkt->code <= OC_FETCH; bool is_empty_ack = coap_pkt->type == COAP_TYPE_ACK && inner_code == 0; bool is_separate_response = coap_pkt->type == COAP_TYPE_CON; /* Set the OSCORE option */