[asterisk-commits] kpfleming: trunk r181985 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 13 11:55:41 CDT 2009


Author: kpfleming
Date: Fri Mar 13 11:55:38 2009
New Revision: 181985

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=181985
Log:
improve a bit of suboptimal code

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=181985&r1=181984&r2=181985
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Mar 13 11:55:38 2009
@@ -19865,11 +19865,7 @@
 	} else if (!strcasecmp(args.param, "peername")) {
 		ast_copy_string(buf, p->peername, buflen);
 	} else if (!strcasecmp(args.param, "t38passthrough")) {
-		if (p->t38.state == T38_DISABLED) {
-			ast_copy_string(buf, "0", sizeof("0"));
-		} else {  /* T38 is offered or enabled in this call */
-			ast_copy_string(buf, "1", sizeof("1"));
-		}
+		ast_copy_string(buf, (p->t38.state == T38_DISABLED) ? "0" : "1", buflen);
 	} else if (!strcasecmp(args.param, "rtpdest")) {
 		struct sockaddr_in sin;
 




More information about the asterisk-commits mailing list