[sr-dev] git:master: mediaproxy: declare variables at function start

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Aug 26 22:02:19 CEST 2010


Module: sip-router
Branch: master
Commit: 84482678115bfaf3815c03f55376e553f77dafb8
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=84482678115bfaf3815c03f55376e553f77dafb8

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Aug 26 21:49:58 2010 +0200

mediaproxy: declare variables at function start

Fixes compilation with gcc < 3.0.

---

 modules/mediaproxy/mediaproxy.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index 855fb7d..b195123 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -1568,6 +1568,7 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id, ice_candidate_data *ice_da
     Bool removed_session_ip, have_sdp;
     SessionInfo session;
     StreamInfo stream;
+    unsigned int priority;
 
     if (msg == NULL)
         return -1;
@@ -1807,7 +1808,7 @@ use_media_proxy(struct sip_msg *msg, char *dialog_id, ice_candidate_data *ice_da
             struct in_addr hexip;
             inet_aton(tokens[0].s, &hexip);
 
-            unsigned int priority = (ice_data == NULL)?get_ice_candidate_priority(priority_str):ice_data->priority;
+            priority = (ice_data == NULL)?get_ice_candidate_priority(priority_str):ice_data->priority;
             port = strtoint(&tokens[j]);
             candidate.s = buf;
             candidate.len = sprintf(candidate.s, "a=candidate:R%x 1 UDP %u %.*s %i typ relay%.*s",




More information about the sr-dev mailing list