implementation-ID setting. Now that it does (and has done
for eighteen months -- since YAZ release 1.8.6 of
2002/03/25!), I've finally removed the comments.
+ - Init handler now understands the setting of {ERR_CODE} as
+ more than a boolean success indicator, and also {ERR_STR}.
+ They are now passed back to the client (thanks to recent
+ changes to the YAZ generic front-end server) in accordance
+ with Z39.50 Implementor Agreement 5, found at
+ http://lcweb.loc.gov/z3950/agency/agree/initdiag.html
0.07 Fri Jan 03 10:12:15 2003
- Applied Dave Mitchell's (davem@fdgroup.com) GRS-1 parsing patch.
##
## $Log: SimpleServer.pm,v $
-## Revision 1.17 2003-09-09 11:40:10 mike
+## Revision 1.18 2003-09-09 20:12:38 mike
+## Return diagnostics on Init failure
+##
+## Revision 1.17 2003/09/09 11:40:10 mike
## (Finally!) support implementation-ID
##
## Revision 1.16 2003/01/03 09:01:51 sondberg
IMP_NAME => "", ## Z39.50 Implementation name
IMP_VER => "", ## Z39.50 Implementation version
ERR_CODE => 0, ## Error code, cnf. Z39.50 manual
+ ERR_STR => "", ## Error string (additional info.)
USER => "xxx" ## If Z39.50 authentication is used,
## this member contains user name
PASS => "yyy" ## Under same conditions, this member
The ERR_CODE should be left at 0 (the default value) if you wish to
accept the connection. Any other value is interpreted as a failure
-and the client will be shown the door.
+and the client will be shown the door, with the code and the
+associated additional information, ERR_STR returned.
=head2 Search handler
*/
/*$Log: SimpleServer.xs,v $
-/*Revision 1.19 2003-09-09 11:40:10 mike
+/*Revision 1.20 2003-09-09 20:12:38 mike
+/*Return diagnostics on Init failure
+/*
+/*Revision 1.19 2003/09/09 11:40:10 mike
/*(Finally!) support implementation-ID
/*
/*Revision 1.18 2003/01/03 09:05:41 sondberg
hv_store(href, "IMP_NAME", 8, newSVpv("", 0), 0);
hv_store(href, "IMP_VER", 7, newSVpv("", 0), 0);
hv_store(href, "ERR_CODE", 8, newSViv(0), 0);
+ hv_store(href, "ERR_STR", 7, newSViv(0), 0);
hv_store(href, "PEER_NAME", 9, newSVpv(q->peer_name, 0), 0);
hv_store(href, "HANDLE", 6, newSVsv(&sv_undef), 0);
hv_store(href, "PID", 3, newSViv(getpid()), 0);
temp = hv_fetch(href, "ERR_CODE", 8, 1);
status = newSVsv(*temp);
+ temp = hv_fetch(href, "ERR_STR", 7, 1);
+ err_str = newSVsv(*temp);
+
temp = hv_fetch(href, "HANDLE", 6, 1);
handle= newSVsv(*temp);
LEAVE;
zhandle->handle = handle;
r->errcode = SvIV(status);
+ ptr = SvPV(err_str, len);
+ r->errstring = (char *)odr_malloc(q->stream, len + 1);
+ strcpy(r->errstring, ptr);
+ sv_free(err_str);
r->handle = zhandle;
ptr = SvPV(id, len);
q->implementation_id = (char *)xmalloc(len + 1);