16 maj 2006 kl. 22.25 skrev Kevin P. Fleming:

[EMAIL PROTECTED] 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
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to