[Asterisk-Dev] Re: [Asterisk-cvs] asterisk/apps app_rpt.c, 1.21, 1.22

Steven Critchfield critch at basesys.com
Mon Sep 13 06:36:59 MST 2004


On Mon, 2004-09-13 at 08:10, jim at lists.digium.com wrote:
> Update of /usr/cvsroot/asterisk/apps
> In directory mongoose.digium.com:/tmp/cvs-serv12540
> 
> Modified Files:
> 	app_rpt.c 
> Log Message:
> Fixed minor issue in app_rpt(). Allows it to work better with many Linux distributions
> 
> 
> Index: app_rpt.c
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
> retrieving revision 1.21
> retrieving revision 1.22
> diff -u -d -r1.21 -r1.22
> --- app_rpt.c	22 Aug 2004 03:58:42 -0000	1.21
> +++ app_rpt.c	13 Sep 2004 12:12:17 -0000	1.22
> @@ -137,7 +137,7 @@
>  #include <tonezone.h>
>  #include <linux/zaptel.h>
>  
> -static  char *tdesc = "Radio Repeater / Remote Base  version 0.16  08/21/2004";
> +static  char *tdesc = "Radio Repeater / Remote Base  version 0.17  09/13/2004";
>  static char *app = "Rpt";
>  
>  static char *synopsis = "Radio Repeater/Remote Base Control System";
> @@ -1014,7 +1014,7 @@
>  	    case STATS_TIME:
>  	    	wait_interval(myrpt, DLY_TELEM); /* Wait a little bit */
>  		t = time(NULL);
> -		ast_localtime(&t, &localtm, NULL);
> +		localtime_r(&t, &localtm);
>  		/* Say the phase of the day is before the time */
>  		if((localtm.tm_hour >= 0) && (localtm.tm_hour < 12))
>  			p = "rpt/goodmorning";

Doesn't this seem backwards. Shouldn't the fix have been to make sure
ast_localtime did what ever is appropriate instead? Isn't the reason
there is a ast_func because there can be problems from time to time with
distros or OSes like the BSDs. 

-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-dev mailing list