[asterisk-commits] jdixon: branch jdixon/chan_usbradio-1.4 r141992 - /team/jdixon/chan_usbradio-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 9 01:56:59 CDT 2008


Author: jdixon
Date: Tue Sep  9 01:56:59 2008
New Revision: 141992

URL: http://svn.digium.com/view/asterisk?view=rev&rev=141992
Log:
Fixed stupid ineffiency

Modified:
    team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c

Modified: team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c
URL: http://svn.digium.com/view/asterisk/team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c?view=diff&rev=141992&r1=141991&r2=141992
==============================================================================
--- team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c (original)
+++ team/jdixon/chan_usbradio-1.4/channels/chan_irlp.c Tue Sep  9 01:56:59 2008
@@ -31,7 +31,7 @@
 /*** MODULEINFO
  ***/
 
-/* Version 0.9, 9/8/2008
+/* Version 0.10, 9/8/2008
 irlp channel driver for Asterisk/app_rpt.
 
 I wish to thank the following people for the immeasurable amount of
@@ -615,13 +615,13 @@
 		myctl = (alt_ctrl_sock != -1) ? alt_ctrl_sock : ctrl_sock;
 
 		time(&now);
-		cp = irlp_read_file(IRLP_ROOT,"codec");
-		i = ((cp && *cp));
-		if (cp) free(cp);
-		if (i && keepalive && ((keepalive + KEEPALIVE_TIME) < now))
-		{
+		if (keepalive && ((keepalive + KEEPALIVE_TIME) < now))
+		{
+			cp = irlp_read_file(IRLP_ROOT,"codec");
+			i = ((cp && *cp));
+			if (cp) free(cp);
+			if (i) send_keepalive();
 			keepalive = now;
-			send_keepalive();
 		}
 		FD_ZERO(fds);
 		FD_SET(myaud,fds);




More information about the asterisk-commits mailing list