Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement error reply support #523

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

sashacmc
Copy link
Member

@sashacmc sashacmc commented Jul 9, 2024

Implement error reply send and receive support
Add API methods:

  • z_query_reply_err_options_default
  • z_query_reply_err

Update z_get to receive error reply
Update z_queryable with the option to send error
Mark z_reply_tag_t as private

Closes:
#460
#463

@sashacmc sashacmc force-pushed the add_reply_err branch 3 times, most recently from 1de96ec to 6dac662 Compare July 10, 2024 14:17
@sashacmc sashacmc changed the title Reply error draft Implement error reply support Jul 10, 2024
@sashacmc sashacmc marked this pull request as ready for review July 10, 2024 14:52
@@ -65,7 +74,7 @@ int main(int argc, char **argv) {
int n = 0;

int opt;
while ((opt = getopt(argc, argv, "k:e:m:v:l:n:d")) != -1) {
while ((opt = getopt(argc, argv, "k:e:m:v:l:n:df")) != -1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

df -> d:f ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, ":" means that option value expected
https://www.man7.org/linux/man-pages/man3/getopt.3.html

// FIXME: The support for reply errors will come in the next release.
return true;
}
_Bool z_reply_is_ok(const z_loaned_reply_t *reply) { return reply->_tag != _Z_REPLY_TAG_ERROR; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this modification, this PR probably closes #345 as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems, yes

@gabrik gabrik merged commit 510d583 into eclipse-zenoh:dev/1.0.0 Jul 10, 2024
50 checks passed
@gabrik gabrik deleted the add_reply_err branch July 10, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants