X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=zlayer%2Fzaccess.c;h=d0eead41285c1faee63adcd488b5932f8e0c797b;hb=e2ca7150cc23d2ad81d0364544ebf0d94f260722;hp=e342786606604dd8f636dee8518a055eb165fa72;hpb=2f21d298f05796bd90d51574c242f2634bed9902;p=egate.git diff --git a/zlayer/zaccess.c b/zlayer/zaccess.c index e342786..d0eead4 100644 --- a/zlayer/zaccess.c +++ b/zlayer/zaccess.c @@ -2,7 +2,13 @@ * Europagate, 1995 * * $Log: zaccess.c,v $ - * Revision 1.2 1995/02/16 15:14:53 quinn + * Revision 1.4 1995/02/16 15:33:45 quinn + * Fixed bug in KWAQS generator + * + * Revision 1.3 1995/02/16 15:20:45 quinn + * Added initialization of response from search + * + * Revision 1.2 1995/02/16 15:14:53 quinn * Fixed KWAQS-generator * * Revision 1.1 1995/02/16 14:47:55 quinn @@ -53,7 +59,7 @@ int rpn2kwaqs(struct ccl_rpn_node *q, char **p) for (i = q->u.t.attr_list; i; i = i->next) { sprintf(*p, "%d,%d%s", i->type, i->value, i->next ? - " " : ""); + "," : ""); *p += strlen(*p); } strcat(*p, "]"); @@ -217,6 +223,8 @@ const struct zass_searchent *zass_search(ZASS a, struct ccl_rpn_node *query, r.status = SearchResponse_GetSearchStatus(pdu); r.num = SearchResponse_GetResultCount(pdu); r.status = SearchResponse_GetResultSetStatus(pdu); + r.errcode = -1; + *r.errstring = '\0'; if ((record = SearchResponse_GetRecords(pdu))) { if (zutil_GetTag(record) == NONSURROGATEDIAGNOSTIC_TAG) @@ -233,11 +241,7 @@ const struct zass_searchent *zass_search(ZASS a, struct ccl_rpn_node *query, strcpy(r.errstring, s); FREE(s); } - else - *r.errstring = '\0'; } - else - *r.errstring = '\0'; } else gw_log(GW_LOG_WARN, ZASS_TYPE, "Got real record in SRCHRESP");