From 5439a45e67f36298144061065921897d388e52fc Mon Sep 17 00:00:00 2001 From: Luca Cominardi Date: Tue, 12 Sep 2023 14:09:18 +0200 Subject: [PATCH] Fix #245 --- examples/arduino/z_get.ino | 8 ++++---- examples/arduino/z_pub.ino | 8 ++++---- examples/arduino/z_pull.ino | 8 ++++---- examples/arduino/z_queryable.ino | 8 ++++---- examples/arduino/z_sub.ino | 8 ++++---- examples/espidf/z_get.c | 8 ++++---- examples/espidf/z_pub.c | 8 ++++---- examples/espidf/z_pull.c | 8 ++++---- examples/espidf/z_queryable.c | 8 ++++---- examples/espidf/z_sub.c | 8 ++++---- examples/mbed/z_get.cpp | 8 ++++---- examples/mbed/z_pub.cpp | 8 ++++---- examples/mbed/z_pull.cpp | 8 ++++---- examples/mbed/z_queryable.cpp | 8 ++++---- examples/mbed/z_sub.cpp | 8 ++++---- examples/unix/c11/z_get.c | 2 +- examples/unix/c11/z_info.c | 2 +- examples/unix/c11/z_pub.c | 2 +- examples/unix/c11/z_pub_st.c | 2 +- examples/unix/c11/z_pull.c | 2 +- examples/unix/c11/z_put.c | 2 +- examples/unix/c11/z_queryable.c | 2 +- examples/unix/c11/z_sub.c | 2 +- examples/unix/c11/z_sub_st.c | 2 +- examples/unix/c99/z_get.c | 2 +- examples/unix/c99/z_info.c | 2 +- examples/unix/c99/z_pub.c | 2 +- examples/unix/c99/z_pub_st.c | 2 +- examples/unix/c99/z_pull.c | 2 +- examples/unix/c99/z_put.c | 2 +- examples/unix/c99/z_queryable.c | 2 +- examples/unix/c99/z_sub.c | 2 +- examples/unix/c99/z_sub_st.c | 2 +- examples/windows/z_get.c | 2 +- examples/windows/z_info.c | 2 +- examples/windows/z_pub.c | 2 +- examples/windows/z_pub_st.c | 2 +- examples/windows/z_pull.c | 2 +- examples/windows/z_put.c | 2 +- examples/windows/z_queryable.c | 2 +- examples/windows/z_sub.c | 2 +- examples/windows/z_sub_st.c | 2 +- examples/zephyr/z_get.c | 8 ++++---- examples/zephyr/z_pub.c | 8 ++++---- examples/zephyr/z_pull.c | 8 ++++---- examples/zephyr/z_queryable.c | 8 ++++---- examples/zephyr/z_sub.c | 8 ++++---- include/zenoh-pico/config.h | 4 ++-- src/net/config.c | 2 +- src/net/session.c | 4 ++-- tests/z_api_alignment_test.c | 8 ++++---- tests/z_client_test.c | 4 ++-- tests/z_peer_multicast_test.c | 4 ++-- 53 files changed, 120 insertions(+), 120 deletions(-) diff --git a/examples/arduino/z_get.ino b/examples/arduino/z_get.ino index 3cdba9b88..1f92eb3c2 100644 --- a/examples/arduino/z_get.ino +++ b/examples/arduino/z_get.ino @@ -23,10 +23,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -79,8 +79,8 @@ void setup() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/arduino/z_pub.ino b/examples/arduino/z_pub.ino index c56bc0adc..81f3745b2 100644 --- a/examples/arduino/z_pub.ino +++ b/examples/arduino/z_pub.ino @@ -23,10 +23,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -56,8 +56,8 @@ void setup() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/arduino/z_pull.ino b/examples/arduino/z_pull.ino index 90b6fdf02..5e2952d6c 100644 --- a/examples/arduino/z_pull.ino +++ b/examples/arduino/z_pull.ino @@ -23,10 +23,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -67,8 +67,8 @@ void setup() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/arduino/z_queryable.ino b/examples/arduino/z_queryable.ino index 732f8c55b..fe1f87b65 100644 --- a/examples/arduino/z_queryable.ino +++ b/examples/arduino/z_queryable.ino @@ -23,10 +23,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -67,8 +67,8 @@ void setup() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/arduino/z_sub.ino b/examples/arduino/z_sub.ino index 83719af1c..e9b829245 100644 --- a/examples/arduino/z_sub.ino +++ b/examples/arduino/z_sub.ino @@ -23,10 +23,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -65,8 +65,8 @@ void setup() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/espidf/z_get.c b/examples/espidf/z_get.c index 891588acd..83f321351 100644 --- a/examples/espidf/z_get.c +++ b/examples/espidf/z_get.c @@ -37,10 +37,10 @@ static int s_retry_count = 0; #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -133,8 +133,8 @@ void app_main() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/espidf/z_pub.c b/examples/espidf/z_pub.c index 10e1c9565..112429cbd 100644 --- a/examples/espidf/z_pub.c +++ b/examples/espidf/z_pub.c @@ -37,10 +37,10 @@ static int s_retry_count = 0; #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -120,8 +120,8 @@ void app_main() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/espidf/z_pull.c b/examples/espidf/z_pull.c index 057f98ebe..976880a79 100644 --- a/examples/espidf/z_pull.c +++ b/examples/espidf/z_pull.c @@ -37,10 +37,10 @@ static int s_retry_count = 0; #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -126,8 +126,8 @@ void app_main() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/espidf/z_queryable.c b/examples/espidf/z_queryable.c index 57e527c14..9f5eb9abe 100644 --- a/examples/espidf/z_queryable.c +++ b/examples/espidf/z_queryable.c @@ -37,10 +37,10 @@ static int s_retry_count = 0; #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -129,8 +129,8 @@ void app_main() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/espidf/z_sub.c b/examples/espidf/z_sub.c index eb2127767..e09bad00d 100644 --- a/examples/espidf/z_sub.c +++ b/examples/espidf/z_sub.c @@ -37,10 +37,10 @@ static int s_retry_count = 0; #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -126,8 +126,8 @@ void app_main() { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/mbed/z_get.cpp b/examples/mbed/z_get.cpp index 693f6214a..a7acba4fd 100644 --- a/examples/mbed/z_get.cpp +++ b/examples/mbed/z_get.cpp @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -53,8 +53,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/mbed/z_pub.cpp b/examples/mbed/z_pub.cpp index 4b44ae93e..8720faaa3 100644 --- a/examples/mbed/z_pub.cpp +++ b/examples/mbed/z_pub.cpp @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -40,8 +40,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/mbed/z_pull.cpp b/examples/mbed/z_pull.cpp index 767fa595b..3ca962ed7 100644 --- a/examples/mbed/z_pull.cpp +++ b/examples/mbed/z_pull.cpp @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -46,8 +46,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/mbed/z_queryable.cpp b/examples/mbed/z_queryable.cpp index 50c230aef..5f621c74e 100644 --- a/examples/mbed/z_queryable.cpp +++ b/examples/mbed/z_queryable.cpp @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -49,8 +49,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/mbed/z_sub.cpp b/examples/mbed/z_sub.cpp index 903abc816..d8f9329ee 100644 --- a/examples/mbed/z_sub.cpp +++ b/examples/mbed/z_sub.cpp @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -46,8 +46,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/unix/c11/z_get.c b/examples/unix/c11/z_get.c index 632be3719..c1971702e 100644 --- a/examples/unix/c11/z_get.c +++ b/examples/unix/c11/z_get.c @@ -71,7 +71,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_info.c b/examples/unix/c11/z_info.c index e5ae98dd6..68091cde8 100644 --- a/examples/unix/c11/z_info.c +++ b/examples/unix/c11/z_info.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_pub.c b/examples/unix/c11/z_pub.c index 3516dfb43..e7b7e64bc 100644 --- a/examples/unix/c11/z_pub.c +++ b/examples/unix/c11/z_pub.c @@ -72,7 +72,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_pub_st.c b/examples/unix/c11/z_pub_st.c index 5f20feb92..1e27ade12 100644 --- a/examples/unix/c11/z_pub_st.c +++ b/examples/unix/c11/z_pub_st.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_pull.c b/examples/unix/c11/z_pull.c index 55b5b09da..678641aed 100644 --- a/examples/unix/c11/z_pull.c +++ b/examples/unix/c11/z_pull.c @@ -53,7 +53,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_put.c b/examples/unix/c11/z_put.c index 9a7d70195..2a403af44 100644 --- a/examples/unix/c11/z_put.c +++ b/examples/unix/c11/z_put.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_queryable.c b/examples/unix/c11/z_queryable.c index d8e067b46..e6f9d8e48 100644 --- a/examples/unix/c11/z_queryable.c +++ b/examples/unix/c11/z_queryable.c @@ -70,7 +70,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_sub.c b/examples/unix/c11/z_sub.c index ee17640da..7cc329416 100644 --- a/examples/unix/c11/z_sub.c +++ b/examples/unix/c11/z_sub.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c11/z_sub_st.c b/examples/unix/c11/z_sub_st.c index a007918a6..7a8b96143 100644 --- a/examples/unix/c11/z_sub_st.c +++ b/examples/unix/c11/z_sub_st.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_get.c b/examples/unix/c99/z_get.c index 1d01b4890..f20104028 100644 --- a/examples/unix/c99/z_get.c +++ b/examples/unix/c99/z_get.c @@ -71,7 +71,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_info.c b/examples/unix/c99/z_info.c index e434be56f..a06f13ee3 100644 --- a/examples/unix/c99/z_info.c +++ b/examples/unix/c99/z_info.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_pub.c b/examples/unix/c99/z_pub.c index 51743bdc4..a5839f36f 100644 --- a/examples/unix/c99/z_pub.c +++ b/examples/unix/c99/z_pub.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_pub_st.c b/examples/unix/c99/z_pub_st.c index 25b1dc88e..1261fcd50 100644 --- a/examples/unix/c99/z_pub_st.c +++ b/examples/unix/c99/z_pub_st.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_pull.c b/examples/unix/c99/z_pull.c index bb21dd313..e01f43155 100644 --- a/examples/unix/c99/z_pull.c +++ b/examples/unix/c99/z_pull.c @@ -53,7 +53,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_put.c b/examples/unix/c99/z_put.c index cdeab6652..45ebe29b4 100644 --- a/examples/unix/c99/z_put.c +++ b/examples/unix/c99/z_put.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_queryable.c b/examples/unix/c99/z_queryable.c index 58ddb2b3c..e920b1035 100644 --- a/examples/unix/c99/z_queryable.c +++ b/examples/unix/c99/z_queryable.c @@ -66,7 +66,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_sub.c b/examples/unix/c99/z_sub.c index 01aa4ebb8..db294ee00 100644 --- a/examples/unix/c99/z_sub.c +++ b/examples/unix/c99/z_sub.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/unix/c99/z_sub_st.c b/examples/unix/c99/z_sub_st.c index cdc216623..4a87cce3b 100644 --- a/examples/unix/c99/z_sub_st.c +++ b/examples/unix/c99/z_sub_st.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_config_loan(&config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_config_loan(&config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_config_loan(&config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_get.c b/examples/windows/z_get.c index 602703050..b2b6aafda 100644 --- a/examples/windows/z_get.c +++ b/examples/windows/z_get.c @@ -43,7 +43,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_info.c b/examples/windows/z_info.c index 4df38b1e6..eed2c2952 100644 --- a/examples/windows/z_info.c +++ b/examples/windows/z_info.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_pub.c b/examples/windows/z_pub.c index 400872361..31bf582db 100644 --- a/examples/windows/z_pub.c +++ b/examples/windows/z_pub.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_pub_st.c b/examples/windows/z_pub_st.c index 65ca61cfd..55475ad22 100644 --- a/examples/windows/z_pub_st.c +++ b/examples/windows/z_pub_st.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_pull.c b/examples/windows/z_pull.c index c98ead7fb..52941550e 100644 --- a/examples/windows/z_pull.c +++ b/examples/windows/z_pull.c @@ -33,7 +33,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_put.c b/examples/windows/z_put.c index 7f71ae46d..464eab495 100644 --- a/examples/windows/z_put.c +++ b/examples/windows/z_put.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_queryable.c b/examples/windows/z_queryable.c index c9f404540..60b03ab5d 100644 --- a/examples/windows/z_queryable.c +++ b/examples/windows/z_queryable.c @@ -42,7 +42,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_sub.c b/examples/windows/z_sub.c index 61c41bf57..d48328500 100644 --- a/examples/windows/z_sub.c +++ b/examples/windows/z_sub.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/windows/z_sub_st.c b/examples/windows/z_sub_st.c index 0a2f76692..d9b66fa80 100644 --- a/examples/windows/z_sub_st.c +++ b/examples/windows/z_sub_st.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode)); if (locator != NULL) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(locator)); } printf("Opening session...\n"); diff --git a/examples/zephyr/z_get.c b/examples/zephyr/z_get.c index a99166284..4fcc47649 100644 --- a/examples/zephyr/z_get.c +++ b/examples/zephyr/z_get.c @@ -20,10 +20,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -49,8 +49,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/zephyr/z_pub.c b/examples/zephyr/z_pub.c index 9ed3d29c2..606311860 100644 --- a/examples/zephyr/z_pub.c +++ b/examples/zephyr/z_pub.c @@ -20,10 +20,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -37,8 +37,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/zephyr/z_pull.c b/examples/zephyr/z_pull.c index 6a7209aae..2d4d7c856 100644 --- a/examples/zephyr/z_pull.c +++ b/examples/zephyr/z_pull.c @@ -18,10 +18,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -41,8 +41,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/zephyr/z_queryable.c b/examples/zephyr/z_queryable.c index d26735bee..154075dfa 100644 --- a/examples/zephyr/z_queryable.c +++ b/examples/zephyr/z_queryable.c @@ -19,10 +19,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -45,8 +45,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/examples/zephyr/z_sub.c b/examples/zephyr/z_sub.c index f385a2962..3860f9e8a 100644 --- a/examples/zephyr/z_sub.c +++ b/examples/zephyr/z_sub.c @@ -18,10 +18,10 @@ #define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode #if CLIENT_OR_PEER == 0 #define MODE "client" -#define PEER "" // If empty, it will scout +#define CONNECT "" // If empty, it will scout #elif CLIENT_OR_PEER == 1 #define MODE "peer" -#define PEER "udp/224.0.0.225:7447#iface=en0" +#define CONNECT "udp/224.0.0.225:7447#iface=en0" #else #error "Unknown Zenoh operation mode. Check CLIENT_OR_PEER value." #endif @@ -41,8 +41,8 @@ int main(int argc, char **argv) { // Initialize Zenoh Session and other parameters z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(MODE)); - if (strcmp(PEER, "") != 0) { - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(PEER)); + if (strcmp(CONNECT, "") != 0) { + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(CONNECT)); } // Open Zenoh session diff --git a/include/zenoh-pico/config.h b/include/zenoh-pico/config.h index 23a929993..2bbb9abc2 100644 --- a/include/zenoh-pico/config.h +++ b/include/zenoh-pico/config.h @@ -32,7 +32,7 @@ * Default value : None. * Multiple values are not accepted in zenoh-pico. */ -#define Z_CONFIG_PEER_KEY 0x41 +#define Z_CONFIG_CONNECT_KEY 0x41 /** * A locator to listen on. @@ -40,7 +40,7 @@ * Default value : None. * Multiple values accepted. */ -#define Z_CONFIG_LISTENER_KEY 0x42 +#define Z_CONFIG_LISTEN_KEY 0x42 /** * The user name to use for authentication. diff --git a/src/net/config.c b/src/net/config.c index ae6ab4c65..7b0457836 100644 --- a/src/net/config.c +++ b/src/net/config.c @@ -33,7 +33,7 @@ _z_config_t *_z_config_client(const char *locator) { _zp_config_insert(ps, Z_CONFIG_MODE_KEY, _z_string_make(Z_CONFIG_MODE_CLIENT)); if (locator != NULL) { // Connect only to the provided locator - _zp_config_insert(ps, Z_CONFIG_PEER_KEY, _z_string_make(locator)); + _zp_config_insert(ps, Z_CONFIG_CONNECT_KEY, _z_string_make(locator)); } else { // The locator is not provided, we should perform scouting _zp_config_insert(ps, Z_CONFIG_MULTICAST_SCOUTING_KEY, _z_string_make(Z_CONFIG_MULTICAST_SCOUTING_DEFAULT)); diff --git a/src/net/session.c b/src/net/session.c index cf1f73407..28ceb6725 100644 --- a/src/net/session.c +++ b/src/net/session.c @@ -61,7 +61,7 @@ int8_t _z_open(_z_session_t *zn, _z_config_t *config) { if (config != NULL) { _z_str_array_t locators = _z_str_array_empty(); - if (_z_config_get(config, Z_CONFIG_PEER_KEY) == NULL) { // Scout if peer is not configured + if (_z_config_get(config, Z_CONFIG_CONNECT_KEY) == NULL) { // Scout if peer is not configured opt_as_str = _z_config_get(config, Z_CONFIG_SCOUTING_WHAT_KEY); if (opt_as_str == NULL) { opt_as_str = Z_CONFIG_SCOUTING_WHAT_DEFAULT; @@ -89,7 +89,7 @@ int8_t _z_open(_z_session_t *zn, _z_config_t *config) { _z_hello_list_free(&hellos); } else { locators = _z_str_array_make(1); - locators.val[0] = _z_str_clone(_z_config_get(config, Z_CONFIG_PEER_KEY)); + locators.val[0] = _z_str_clone(_z_config_get(config, Z_CONFIG_CONNECT_KEY)); } ret = _Z_ERR_SCOUT_NO_RESULTS; diff --git a/tests/z_api_alignment_test.c b/tests/z_api_alignment_test.c index a11d3095c..a9cadb833 100644 --- a/tests/z_api_alignment_test.c +++ b/tests/z_api_alignment_test.c @@ -183,9 +183,9 @@ int main(int argc, char **argv) { _ret_config = z_config_default(); assert(z_check(_ret_config)); #ifdef ZENOH_PICO - _ret_int8 = zp_config_insert(z_loan(_ret_config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + _ret_int8 = zp_config_insert(z_loan(_ret_config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); assert_eq(_ret_int8, 0); - const char *_ret_cstr = zp_config_get(z_loan(_ret_config), Z_CONFIG_PEER_KEY); + const char *_ret_cstr = zp_config_get(z_loan(_ret_config), Z_CONFIG_CONNECT_KEY); assert_eq(strlen(_ret_cstr), strlen(argv[1])); assert_eq(strncmp(_ret_cstr, argv[1], strlen(_ret_cstr)), 0); #endif @@ -249,9 +249,9 @@ int main(int argc, char **argv) { _ret_config = z_config_default(); #ifdef ZENOH_PICO - _ret_int8 = zp_config_insert(z_loan(_ret_config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + _ret_int8 = zp_config_insert(z_loan(_ret_config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); assert_eq(_ret_int8, 0); - _ret_cstr = zp_config_get(z_loan(_ret_config), Z_CONFIG_PEER_KEY); + _ret_cstr = zp_config_get(z_loan(_ret_config), Z_CONFIG_CONNECT_KEY); assert_eq(strlen(_ret_cstr), strlen(argv[1])); assert_eq(strncmp(_ret_cstr, argv[1], strlen(_ret_cstr)), 0); #endif diff --git a/tests/z_client_test.c b/tests/z_client_test.c index 5c4b1fd1d..80ca3c2e5 100644 --- a/tests/z_client_test.c +++ b/tests/z_client_test.c @@ -112,7 +112,7 @@ int main(int argc, char **argv) { int is_reliable = strncmp(argv[1], "tcp", 3) == 0; z_owned_config_t config = z_config_default(); - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); for (unsigned int i = 0; i < SET; i++) idx[i] = i; @@ -129,7 +129,7 @@ int main(int argc, char **argv) { z_sleep_s(SLEEP); config = z_config_default(); - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); z_owned_session_t s2 = z_open(z_move(config)); assert(z_check(s2)); diff --git a/tests/z_peer_multicast_test.c b/tests/z_peer_multicast_test.c index 6d803b67b..125c90039 100644 --- a/tests/z_peer_multicast_test.c +++ b/tests/z_peer_multicast_test.c @@ -65,7 +65,7 @@ int main(int argc, char **argv) { z_owned_config_t config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make("peer")); - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); for (unsigned int i = 0; i < SET; i++) idx[i] = i; @@ -84,7 +84,7 @@ int main(int argc, char **argv) { config = z_config_default(); zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make("peer")); - zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(argv[1])); + zp_config_insert(z_loan(config), Z_CONFIG_CONNECT_KEY, z_string_make(argv[1])); z_owned_session_t s2 = z_open(z_move(config)); assert(z_check(s2));