Added a pipe comparison function. Forgot it when I was adding
support for non-integer pipe types (such as used by Windows).
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20200
dc483132-0cff-0310-8789-
dd5450dbe970
if (!out_is_for_client_pipe ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- *out_is_for_client_pipe = (in_callback->client_pipe == in_client_pipe);
+ err = ccs_pipe_compare (in_callback->client_pipe, in_client_pipe,
+ out_is_for_client_pipe);
}
return cci_check_error (err);
if (!out_uses_pipe) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- *out_uses_pipe = (in_client->client_pipe == in_pipe);
+ err = ccs_pipe_compare (in_client->client_pipe, in_pipe, out_uses_pipe);
}
return cci_check_error (err);
cc_int32 ccs_os_pipe_valid (ccs_pipe_t in_pipe);
+cc_int32 ccs_os_pipe_compare (ccs_pipe_t in_pipe,
+ ccs_pipe_t in_compare_to_pipe,
+ cc_uint32 *out_equal);
+
cc_int32 ccs_os_pipe_copy (ccs_pipe_t *out_pipe,
ccs_pipe_t in_pipe);
/* ------------------------------------------------------------------------ */
+cc_int32 ccs_pipe_compare (ccs_pipe_t in_pipe,
+ ccs_pipe_t in_compare_to_pipe,
+ cc_uint32 *out_equal)
+{
+ return ccs_os_pipe_compare (in_pipe, in_compare_to_pipe, out_equal);
+}
+
+/* ------------------------------------------------------------------------ */
+
cc_int32 ccs_pipe_copy (ccs_pipe_t *out_pipe,
ccs_pipe_t in_pipe)
{
cc_int32 ccs_pipe_valid (ccs_pipe_t in_pipe);
+cc_int32 ccs_pipe_compare (ccs_pipe_t in_pipe,
+ ccs_pipe_t in_compare_to_pipe,
+ cc_uint32 *out_equal);
+
cc_int32 ccs_pipe_copy (ccs_pipe_t *out_pipe,
ccs_pipe_t in_pipe);
/* ------------------------------------------------------------------------ */
+cc_int32 ccs_os_pipe_compare (ccs_pipe_t in_pipe,
+ ccs_pipe_t in_compare_to_pipe,
+ cc_uint32 *out_equal)
+{
+ cc_int32 err = ccNoError;
+
+ if (!in_pipe ) { err = cci_check_error (ccErrBadParam); }
+ if (!in_compare_to_pipe) { err = cci_check_error (ccErrBadParam); }
+ if (!out_equal ) { err = cci_check_error (ccErrBadParam); }
+
+ if (!err) {
+ *out_equal = (in_pipe == in_compare_to_pipe);
+ }
+
+ return cci_check_error (err);
+}
+
+/* ------------------------------------------------------------------------ */
+
cc_int32 ccs_os_pipe_copy (ccs_pipe_t *out_pipe,
ccs_pipe_t in_pipe)
{