From: erickson Date: Wed, 7 Dec 2005 15:24:40 +0000 (+0000) Subject: srfsh now takes login commands like so: X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ff3a7e313e41df3da0d329164418ca46d76b6d74;p=working%2FOpenSRF.git srfsh now takes login commands like so: login [ ] this allows testing of different login types and org locations git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@601 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index 8909887..de0969b 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -242,6 +242,11 @@ int handle_login( char* words[]) { char* username = words[1]; char* password = words[2]; + char* type = words[3]; + char* orgloc = words[4]; + int orgloci = 0; + if(orgloc) orgloci = atoi(orgloc); + if(!type) type = "opac"; char buf[256]; memset(buf,0,256); @@ -268,9 +273,8 @@ int handle_login( char* words[]) { char* mess_buf = md5sum(both_buf); - sprintf( buf2, - "request open-ils.auth open-ils.auth.authenticate.complete \"%s\", \"%s\", \"opac\"", - username, mess_buf ); + sprintf( buf2, "request open-ils.auth open-ils.auth.authenticate.complete " + "\"%s\", \"%s\", \"%s\", %d", username, mess_buf, type, orgloci ); free(pass_buf); free(mess_buf);