@@ -134,16 +134,16 @@ static void _resp_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu,
134134 uri_parser_result_t urip ;
135135 uri_parser_process (& urip , _last_req_uri , strlen (_last_req_uri ));
136136 if (* _proxy_uri ) {
137- gcoap_req_init (pdu , ( uint8_t * ) pdu -> hdr , CONFIG_GCOAP_PDU_BUF_SIZE ,
137+ gcoap_req_init (pdu , pdu -> buf , CONFIG_GCOAP_PDU_BUF_SIZE ,
138138 COAP_METHOD_GET , NULL );
139139 }
140140 else {
141- gcoap_req_init (pdu , ( uint8_t * ) pdu -> hdr , CONFIG_GCOAP_PDU_BUF_SIZE ,
141+ gcoap_req_init (pdu , pdu -> buf , CONFIG_GCOAP_PDU_BUF_SIZE ,
142142 COAP_METHOD_GET , urip .path );
143143 }
144144
145145 if (msg_type == COAP_TYPE_ACK ) {
146- coap_hdr_set_type (pdu -> hdr , COAP_TYPE_CON );
146+ coap_pkt_set_type (pdu , COAP_TYPE_CON );
147147 }
148148 block .blknum ++ ;
149149 coap_opt_add_block2_control (pdu , & block );
@@ -154,7 +154,7 @@ static void _resp_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu,
154154
155155 int len = coap_opt_finish (pdu , COAP_OPT_FINISH_NONE );
156156 gcoap_socket_type_t tl = _get_tl (* _proxy_uri ? _proxy_uri : _last_req_uri );
157- _send (( uint8_t * ) pdu -> hdr , len , remote , memo -> context , tl );
157+ _send (pdu -> buf , len , remote , memo -> context , tl );
158158 }
159159 else {
160160 puts ("--- blockwise complete ---" );
@@ -341,7 +341,7 @@ static int _cli_cmd(int argc, char **argv)
341341 }
342342 }
343343
344- coap_hdr_set_type ( pdu . hdr , msg_type );
344+ coap_pkt_set_type ( & pdu , msg_type );
345345
346346 size_t paylen = 0 ;
347347 if (apos < argc ) {
0 commit comments