[asterisk-dev] Re: [asterisk-commits] trunk r27479 -
/trunk/channels/chan_sip.c
Olle E Johansson
oej at edvina.net
Tue May 16 13:54:13 MST 2006
16 maj 2006 kl. 22.25 skrev Kevin P. Fleming:
> asterisk-commits at lists.digium.com wrote:
>
>> + char hold[256];
>> char m_audio[256];
>> char m_video[256];
>> char a_audio[1024];
>> @@ -4822,6 +4823,11 @@
>> ast_build_string(&m_audio_next, &m_audio_left, "m=audio %d RTP/
>> AVP", ntohs(dest.sin_port));
>> 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");
>> + else
>> + sprintf(hold, "a=sendrecv");
>> +
>
> There is no need for this to be a character array or use sprintf() at
> all.. it can just be a 'char *' and hold a pointer to one of these two
> constant strings.
Agreed. Too late, just did a copycat of existing stuff... Will fix
when I'm awake again.
/O
More information about the asterisk-dev
mailing list