Skip to content

[esp-nghttp]: sh2lib_do_get() return value != documentation (IEC-326) #525

@bryghtlabs-richard

Description

@bryghtlabs-richard

Answers checklist.

  • I have read the documentation of the component in question and the issue is not addressed there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

sh2lib_do_get() and many siblings claim to return:

/*
 * @return
 *             - ESP_OK if request setup is successful
 *             - ESP_FAIL if the request setup fails
 */
int sh2lib_do_get_with_nv(struct sh2lib_handle *hd, const nghttp2_nv *nva, size_t nvlen, sh2lib_frame_data_recv_cb_t recv_cb);

However, the implementation actually returns the result of nghttp2_submit_request(), which is a stream-ID when not negative. For example, the documentation suggests this is a good check: if(ESP_OK != sh2lib_do_get(...)), but it will fail as soon as the stream-ID becomes positive.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions