From 20bdeee6e5d70c71ea47d8511e9a92973067ff77 Mon Sep 17 00:00:00 2001 From: Dusan Stevanovic Date: Thu, 30 Jan 2025 18:52:38 +0100 Subject: [PATCH] send env variable in confconn, so we know if we are on FF or chrome --- include/avs_econn.h | 1 + src/ccall/ccall.c | 2 ++ src/econn_fmt/msg.c | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/include/avs_econn.h b/include/avs_econn.h index e80293092..e2465ba8e 100644 --- a/include/avs_econn.h +++ b/include/avs_econn.h @@ -166,6 +166,7 @@ struct econn_message { struct zapi_ice_server *turnv; size_t turnc; bool update; + int env; char *tool; char *toolver; enum econn_confconn_status status; diff --git a/src/ccall/ccall.c b/src/ccall/ccall.c index 07ffd1779..c0d23bbe6 100644 --- a/src/ccall/ccall.c +++ b/src/ccall/ccall.c @@ -2167,6 +2167,8 @@ static int ccall_send_conf_conn(struct ccall *ccall, if (err) { goto out; } + msg->u.confconn.env = msystem_get_env(); + msg->u.confconn.update = update; msg->u.confconn.selective_audio = true; msg->u.confconn.selective_video = true; diff --git a/src/econn_fmt/msg.c b/src/econn_fmt/msg.c index 32bf6dc27..5aa123218 100644 --- a/src/econn_fmt/msg.c +++ b/src/econn_fmt/msg.c @@ -662,6 +662,8 @@ int econn_message_encode(char **strp, const struct econn_message *msg) "%s", msg->u.confconn.tool); jzon_add_str(jobj, "toolver", "%s", msg->u.confconn.toolver); + jzon_add_int(jobj, "env", + msg->u.confconn.env); jzon_add_int(jobj, "status", msg->u.confconn.status); jzon_add_bool(jobj, "selective_audio", @@ -1122,6 +1124,8 @@ int econn_message_decode(struct econn_message **msgp, goto out; } + jzon_int(&msg->u.confconn.env, jobj, "env"); + /* status is optional, missing = 0 */ err = jzon_int(&status, jobj, "status"); if (err) {