* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.c,v $
- * Revision 1.6 1995-03-01 14:46:03 quinn
+ * Revision 1.10 1995-03-15 11:17:40 quinn
+ * Fixed some return-checks from choice.. need better ay to handle those..
+ *
+ * Revision 1.9 1995/03/15 08:37:06 quinn
+ * Fixed protocol bugs.
+ *
+ * Revision 1.8 1995/03/14 16:59:24 quinn
+ * Fixed OPTIONAL flag in attributeelement
+ *
+ * Revision 1.7 1995/03/07 16:29:33 quinn
+ * Added authentication stuff.
+ *
+ * Revision 1.6 1995/03/01 14:46:03 quinn
* Fixed protocol bug in 8777query.
*
* Revision 1.5 1995/02/14 11:54:22 quinn
5, 0) &&
odr_implicit(o, odr_integer, &pp->maximumRecordSize, ODR_CONTEXT,
6, 0) &&
- odr_implicit(o, odr_visiblestring, &pp->idAuthentication, ODR_CONTEXT,
+ odr_explicit(o, odr_any, &pp->idAuthentication, ODR_CONTEXT,
7, 1) &&
odr_implicit(o, odr_visiblestring, &pp->implementationId, ODR_CONTEXT,
110, 1) &&
odr_sequence_end(o);
}
+int z_NSRAuthentication(ODR o, Z_NSRAuthentication **p, int opt)
+{
+ if (!odr_sequence_begin(o, p, sizeof(**p)))
+ return opt;
+ return
+ odr_visiblestring(o, &(*p)->user, 0) &&
+ odr_visiblestring(o, &(*p)->password, 0) &&
+ odr_visiblestring(o, &(*p)->account, 0) &&
+ odr_sequence_end(o);
+}
+
+int z_StrAuthentication(ODR o, char **p, int opt)
+{
+ return odr_visiblestring(o, p, opt);
+}
+
/* ------------------------ SEARCH SERVICE ----------------------- */
int z_ElementSetName(ODR o, char **p, int opt)
return opt;
return
odr_implicit(o, odr_integer, &(*p)->attributeType, ODR_CONTEXT,
- 120, 1) &&
+ 120, 0) &&
odr_implicit(o, odr_integer, &(*p)->attributeValue, ODR_CONTEXT,
- 121, 1) &&
+ 121, 0) &&
odr_sequence_end(o);
}
odr_constructed_end(o))
return 1;
*p = 0;
- return opt;
+ return opt && !o->error;
}
int z_Operand(ODR o, Z_Operand **p, int opt)
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
return 1;
*p = 0;
- return opt;
+ return opt && !o->error;
}
int z_RPNStructure(ODR o, Z_RPNStructure **p, int opt);
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
return 1;
*p = 0;
- return opt;
+ return opt && !o->error;
}
int z_RPNQuery(ODR o, Z_RPNQuery **p, int opt)
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
return 1;
*p = 0;
- return opt;
+ return opt && !o->error;
}
int z_SearchRequest(ODR o, Z_SearchRequest **p, int opt)
if (odr_choice(o, arm, &(*p)->u, &(*p)->which))
return 1;
*p = 0;
- return opt;
+ return opt && !o->error;
}
/* ------------------------ SEARCHRESPONSE ----------------*/
if (!odr_choice(o, arm, &(*p)->u, &(*p)->which))
{
if (o->direction == ODR_DECODE)
- {
*p = 0;
- return opt;
- }
+ return opt && !o->error;
}
return 1;
}