[calls] sip: origin: Don't mix code and declarations
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] sip: origin: Don't mix code and declarations
- Date: Wed, 15 Jun 2022 03:05:21 +0000 (UTC)
commit 01b214c5fba45cb3e46219fa5a240dff20fb627e
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Fri Jun 3 12:14:45 2022 +0200
sip: origin: Don't mix code and declarations
Move (and reorder) declarations to avoid warnings triggered by
-Wdeclaration-after-statement
Closes #459
plugins/sip/calls-sip-origin.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c
index 488f1ad1..bfece4c8 100644
--- a/plugins/sip/calls-sip-origin.c
+++ b/plugins/sip/calls-sip-origin.c
@@ -590,12 +590,17 @@ sip_i_state (int status,
}
if (r_sdp) {
+ g_autoptr (CallsSdpCryptoContext) ctx = NULL;
g_autoptr (GList) remote_codecs =
calls_sip_media_manager_get_codecs_from_sdp (origin->media_manager,
r_sdp->sdp_media);
- GList *preferred_codecs = calls_sip_media_manager_codec_candidates (origin->media_manager);
g_autoptr (GList) codecs = NULL;
GList *node;
+ GList *preferred_codecs = calls_sip_media_manager_codec_candidates (origin->media_manager);
+ const char *session_ip = NULL;
+ const char *media_ip = NULL;
+ int rtp_port;
+ int rtcp_port = 0;
for (node = remote_codecs; node != NULL; node = node->next) {
MediaCodecInfo *codec = node->data;
@@ -605,12 +610,6 @@ sip_i_state (int status,
}
}
- g_autoptr (CallsSdpCryptoContext) ctx = NULL;
- const char *session_ip = NULL;
- const char *media_ip = NULL;
- int rtp_port;
- int rtcp_port = 0;
-
g_debug ("Remote SDP was set to:\n%s", r_sdp_str);
if (!codecs) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]