]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use pointer instead of un-needed buffer. Thanks Kevin!
authorOlle Johansson <oej@edvina.net>
Wed, 17 May 2006 06:18:09 +0000 (06:18 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 17 May 2006 06:18:09 +0000 (06:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27684 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 189e4f0646c4b835960ad1c49a6acc739a806fb3..964eee1d3858a4a0246e644384accdedda4ad299 100644 (file)
@@ -4747,7 +4747,7 @@ static int add_sdp(struct sip_request *resp, struct sip_pvt *p)
        char c[256];
        char t[256];
        char b[256];
-       char hold[256];
+       char *hold;
        char m_audio[256];
        char m_video[256];
        char a_audio[1024];
@@ -4828,9 +4828,9 @@ static int add_sdp(struct sip_request *resp, struct sip_pvt *p)
        ast_build_string(&m_video_next, &m_video_left, "m=video %d RTP/AVP", ntohs(vdest.sin_port));
 
        if (ast_test_flag(&p->flags[0], SIP_CALL_ONHOLD))
-               sprintf(hold, "a=recvonly");
+               hold = "a=recvonly";
        else
-               sprintf(hold, "a=sendrecv");
+               hold = "a=sendrecv";
 
        /* Prefer the codec we were requested to use, first, no matter what */
        if (capability & p->prefcodec) {