From d44d23af8fdd73522ca6892830c58d22ed47df2d Mon Sep 17 00:00:00 2001 From: scottmk Date: Fri, 6 Nov 2009 12:34:34 +0000 Subject: [PATCH] Corrected a glitch in the command-line parser. Now commas are treated as the equivalent of white space between parameters. For example { "a":5 },{ "b":true } is parsed as two separate JSON objects, even though there is no white space between them. M src/srfsh/srfsh.c git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1845 9efc2488-bf62-4759-914b-345cdb29e865 --- src/srfsh/srfsh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index ffa15f8..e99d5cc 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -1306,8 +1306,9 @@ static void parse_args( const char* request, osrfStringArray* cmd_array ) while( !done ) { OSRF_BUFFER_RESET( parser.buf ); - // skip any white space - while( *parser.itr && isspace( (unsigned char) *parser.itr ) ) + // skip any white space or commas + while( *parser.itr + && ( isspace( (unsigned char) *parser.itr ) || ',' == *parser.itr ) ) ++parser.itr; if( '\0' == *parser.itr ) -- 2.43.2