added sanity check on relay command
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 7 Mar 2005 16:06:06 +0000 (16:06 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 7 Mar 2005 16:06:06 +0000 (16:06 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@186 9efc2488-bf62-4759-914b-345cdb29e865

src/srfsh/srfsh.c

index aa8e334..5bef3d5 100644 (file)
@@ -301,8 +301,8 @@ int send_request( char* server,
                if( buffer != NULL && buffer->n_used > 0 ) 
                        params = json_tokener_parse(buffer->buf);
        } else {
-               if(!last_result->result_content) { 
-                       warning_handler("We're not going to call 'relay' on empty result");
+               if(!last_result || ! last_result->result_content) { 
+                       printf("We're not going to call 'relay' with no result params\n");
                        return 1;
                }
                else {