* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.83 1999-05-26 15:24:26 adam
+ * Revision 1.84 1999-06-01 14:29:11 adam
+ * Work on Extended Services.
+ *
+ * Revision 1.83 1999/05/26 15:24:26 adam
* Fixed minor bugs regarding DB Update (introduced by previous commit).
*
* Revision 1.82 1999/05/26 13:49:12 adam
void process_ESResponse(Z_ExtendedServicesResponse *res)
{
- printf("process_ESResponse\n");
+ printf("process_ESResponse status=");
+ switch (*res->operationStatus)
+ {
+ case Z_ExtendedServicesResponse_done:
+ printf ("done\n");
+ break;
+ case Z_ExtendedServicesResponse_accepted:
+ printf ("accepted\n");
+ break;
+ case Z_ExtendedServicesResponse_failure:
+ printf ("failure\n");
+ display_diagrecs(res->diagnostics, res->num_diagnostics);
+ break;
+ }
}
static Z_External *CreateItemOrderExternal(int itemno)
* OF THIS SOFTWARE.
*
* $Log: backend.h,v $
- * Revision 1.24 1999-03-31 11:18:24 adam
+ * Revision 1.25 1999-06-01 14:29:12 adam
+ * Work on Extended Services.
+ *
+ * Revision 1.24 1999/03/31 11:18:24 adam
* Implemented odr_strdup. Added Reference ID to backend server API.
*
* Revision 1.23 1998/10/13 16:12:23 adam
Z_ReferenceId *referenceId;/* reference ID */
bend_request request;
bend_association association;
- int errcode; /* 0==success */
+ int errcode; /* 0==success, -1==accepted, >0 = failure */
char *errstring; /* system error string or NULL */
} bend_esrequest_rr;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.90 1999-05-27 13:02:20 adam
+ * Revision 1.91 1999-06-01 14:29:12 adam
+ * Work on Extended Services.
+ *
+ * Revision 1.90 1999/05/27 13:02:20 adam
* Assigned OID for old DB Update (VAL_DBUPDATE0).
*
* Revision 1.89 1999/05/26 15:24:26 adam
resp->referenceId = req->referenceId;
- if ( esrequest.errcode == 0 )
+ if (esrequest.errcode == -1)
+ {
+ /* Backend service indicates request will be processed */
+ logf(LOG_DEBUG,"Request could be processed...Accepted !");
+ *resp->operationStatus = Z_ExtendedServicesResponse_accepted;
+ }
+ else if (esrequest.errcode == 0)
{
/* Backend service indicates request will be processed */
- logf(LOG_DEBUG,"Request will be processed...Good !");
+ logf(LOG_DEBUG,"Request could be processed...Done !");
*resp->operationStatus = Z_ExtendedServicesResponse_done;
}
else
{
+ Z_DiagRecs *diagRecs = diagrecs (assoc, esrequest.errcode,
+ esrequest.errstring);
+
/* Backend indicates error, request will not be processed */
- logf(LOG_DEBUG,"Request will not be processed...BAD !");
+ logf(LOG_DEBUG,"Request could not be processed...failure !");
*resp->operationStatus = Z_ExtendedServicesResponse_failure;
+ resp->num_diagnostics = diagRecs->num_diagRecs;
+ resp->diagnostics = diagRecs->diagRecs;
}
/* Do something with the members of bend_extendedservice */
logf(LOG_DEBUG,"Send the result apdu");
-
return apdu;
}
* Chas Woodfield, Fretwell Downing Datasystems.
*
* $Log: ztest.c,v $
- * Revision 1.24 1999-05-27 13:07:54 adam
+ * Revision 1.25 1999-06-01 14:29:12 adam
+ * Work on Extended Services.
+ *
+ * Revision 1.24 1999/05/27 13:07:54 adam
* Fix.
*
* Revision 1.23 1999/05/27 13:02:20 adam
logf (LOG_LOG, " unknown (%d)", *toKeep->action);
}
}
- logf (LOG_LOG, "database: %s",
- (toKeep->databaseName ? toKeep->databaseName : "<null>"));
+ if (toKeep->databaseName)
+ {
+ logf (LOG_LOG, "database: %s", toKeep->databaseName);
+ if (!strcmp(toKeep->databaseName, "fault"))
+ {
+ rr->errcode = 109;
+ rr->errstring = toKeep->databaseName;
+ }
+ if (!strcmp(toKeep->databaseName, "accept"))
+ rr->errcode = -1;
+ }
if (notToKeep)
{
int i;
rr->esr->taskSpecificParameters->which);
}
- rr->errcode = 0;
return 0;
}