]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk: correct build error from r409129
authorJonathan Rose <jrose@digium.com>
Thu, 27 Feb 2014 19:38:10 +0000 (19:38 +0000)
committerJonathan Rose <jrose@digium.com>
Thu, 27 Feb 2014 19:38:10 +0000 (19:38 +0000)
Accidentally placed a declaration below functional code

(issue ASTERISK-23213)
Reported by: Andrea Suisani
Review: https://reviewboard.asterisk.org/r/3256/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409130 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_rtp_asterisk.c

index b8d3931c5409e28fd69a89d88268bbd098f471ea..0dbb30b984585764727416697ad355f1e5f059c8 100644 (file)
@@ -1688,12 +1688,11 @@ static void rtp_add_candidates_to_ice(struct ast_rtp_instance *instance, struct
 
                if (!ast_stun_request(component == AST_RTP_ICE_COMPONENT_RTCP ? rtp->rtcp->s : rtp->s, &stunaddr, NULL, &answer)) {
                        pj_sockaddr base;
+                       pj_str_t mapped = pj_str(ast_strdupa(ast_inet_ntoa(answer.sin_addr)));
 
                        /* Use the first local host candidate as the base */
                        pj_sockaddr_cp(&base, &address[0]);
 
-                       pj_str_t mapped = pj_str(ast_strdupa(ast_inet_ntoa(answer.sin_addr)));
-
                        pj_sockaddr_init(pj_AF_INET(), &address[0], &mapped, ntohs(answer.sin_port));
 
                        ast_rtp_ice_add_cand(rtp, component, transport, PJ_ICE_CAND_TYPE_SRFLX, 65535, &address[0], &base,