Explorar o código

mediaproxy: declare variables at function start

Fixes compilation with gcc < 3.0.
Andrei Pelinescu-Onciul %!s(int64=15) %!d(string=hai) anos
pai
achega
8448267811
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      modules/mediaproxy/mediaproxy.c

+ 2 - 1
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;
     Bool removed_session_ip, have_sdp;
     SessionInfo session;
     SessionInfo session;
     StreamInfo stream;
     StreamInfo stream;
+    unsigned int priority;
 
 
     if (msg == NULL)
     if (msg == NULL)
         return -1;
         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;
             struct in_addr hexip;
             inet_aton(tokens[0].s, &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]);
             port = strtoint(&tokens[j]);
             candidate.s = buf;
             candidate.s = buf;
             candidate.len = sprintf(candidate.s, "a=candidate:R%x 1 UDP %u %.*s %i typ relay%.*s",
             candidate.len = sprintf(candidate.s, "a=candidate:R%x 1 UDP %u %.*s %i typ relay%.*s",