[Asterisk-Dev] Re: asterisk manager.c,1.67,1.68

Tony Mountifield tony at softins.clara.co.uk
Fri Aug 13 00:46:28 MST 2004


In article <20040813002636.08F28243464 at lists.digium.com>,
 <markster at lists.digium.com> wrote:
> Update of /usr/cvsroot/asterisk
> In directory localhost.localdomain:/tmp/cvs-serv2100
> 
> Modified Files:
> 	manager.c 
> Log Message:
> Fix missing \r\n
> 
> 
> Index: manager.c
> ===================================================================
> RCS file: /usr/cvsroot/asterisk/manager.c,v
> retrieving revision 1.67
> retrieving revision 1.68
> diff -u -d -r1.67 -r1.68
> --- manager.c	8 Aug 2004 17:15:01 -0000	1.67
> +++ manager.c	12 Aug 2004 23:12:44 -0000	1.68
> @@ -636,7 +636,8 @@
>  	  
>  	ast_mutex_unlock(&c->lock);
>  	ast_cli(s->fd, "Response: Success\r\n"
> -		"%s: %s",varname,varval);
> +		"%s: %s\r\n" ,varname,varval);
> +	ast_cli(s->fd, "\r\n");
>  
>  	return 0;
>  }

That doesn't look right to me. Couldn't there be a thread switch
(however unlikely) between the two calls to ast_cli()?

Why not just finish the first ast_cli() with \r\n\r\n ?

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list