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

add -l option to examples #248

Merged
merged 4 commits into from
Sep 15, 2023
Merged

add -l option to examples #248

merged 4 commits into from
Sep 15, 2023

Conversation

p-avital
Copy link
Contributor

No description provided.

@@ -53,11 +53,15 @@ int main(int argc, char **argv) {
case 'm':
mode = optarg;
break;
case 'l':
locator = optarg;
mode = "peer";
Copy link
Member

Choose a reason for hiding this comment

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

In addition to that, configuration should be updated accordingly. I.e.: in case of -e the config is:
zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator));

In case of -l the config should be:
zp_config_insert(z_loan(config), Z_CONFIG_LISTEN_KEY, z_string_make(locator));

This comment applies also to all the other examples.

Copy link
Member

Choose a reason for hiding this comment

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

It seems to me that using Z_CONFIG_LISTEN_KEY would imply more changes. At least from a quick search it is not used anywhere in the code.

@Mallets Mallets merged commit 29a57a1 into master Sep 15, 2023
44 checks passed
@Mallets Mallets deleted the examples-l branch September 15, 2023 14:58
This pull request was closed.
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