From 7bd5b9a253f2240e96f3cf0779d4462753cbf91e Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Sat, 1 Jun 2024 23:08:31 +0300 Subject: [PATCH] Clens up variable names. --- jilo | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jilo b/jilo index f14e890..24ef035 100755 --- a/jilo +++ b/jilo @@ -197,34 +197,34 @@ jitsi_log_parse() { # locate participant joining event elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=([a-zA-Z0-9-]+)\ stats_id=([a-zA-Z0-9-]+)\ .*Starting\ the\ Agent\ without\ remote\ candidates ]]; then - participant_join_time="${BASH_REMATCH[1]}" + event_time="${BASH_REMATCH[1]}" event_type='participant joining' participant_endpoint_id="${BASH_REMATCH[2]}" participant_stats_id="${BASH_REMATCH[3]}" if [[ -n "$conference_id" ]]; then - db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$participant_join_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "") + db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "") db_query "$db_insert" fi # locate participant pair selection event elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\ .*Selected\ pair\ for\ stream\ .*([0-9.]+):10000/udp/srflx\ \-\>\ ([0-9.]+):[0-9]+/udp/prflx ]]; then - participant_join_time="${BASH_REMATCH[1]}" + event_time="${BASH_REMATCH[1]}" event_type='pair selected' participant_IP="${BASH_REMATCH[3]}" if [[ -n "$conference_id" ]]; then - db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$participant_join_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP") + db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP") db_query "$db_insert" fi # locate participant leaving event elif [[ "$line" =~ ([0-9-]+\ [0-9:.]+)\ [A-Z]+:.*\[confId=${conference_id}\ .*epId=${participant_endpoint_id}\ stats_id=${participant_stats_id}\]\ Endpoint\.expire.*:\ Expired\. ]]; then - participant_join_time="${BASH_REMATCH[1]}" + event_time="${BASH_REMATCH[1]}" event_type='participant leaving' if [[ -n "$conference_id" ]]; then - db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$participant_join_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP") + db_insert=$(printf "$db_insert_participant_template" "$conference_id" "$event_time" "$event_type" "$participant_endpoint_id" "$participant_stats_id" "$participant_IP") db_query "$db_insert" # the participant left, forget about him - unset $participant_join_time $event_type $participant_endpoint_id $participant_stats_id $participant_IP + unset $event_time $event_type $participant_endpoint_id $participant_stats_id $participant_IP fi # locate the corresponding conference ending event