Skip to content

Commit

Permalink
net: downloader: fix coap url parsing
Browse files Browse the repository at this point in the history
CoAP URLs were parsed twice, leading to errors.
Now, the backend doesn't try to treat the file name as a URL anymore.

Signed-off-by: Maximilian Deubel <[email protected]>
  • Loading branch information
maxd-nordic committed Jan 21, 2025
1 parent c4d5cf0 commit f5ff2a2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions subsys/net/lib/downloader/src/transports/coap.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,8 @@ static int coap_request_send(struct downloader *dl)
return err;
}

err = dl_parse_url_file(dl->file, file, sizeof(file));
if (err) {
LOG_ERR("Unable to parse url");
return err;
}
LOG_DBG("dl->file: %s", dl->file);
strncpy(file, dl->file, sizeof(file) - 1);

path_elem = strtok_r(file, COAP_PATH_ELEM_DELIM, &path_elem_saveptr);
do {
Expand Down

0 comments on commit f5ff2a2

Please sign in to comment.