From 6cc10a9551c52dbb3ad0f84adec02bac42fd300c Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Thu, 19 Jul 2007 18:32:44 +0000 Subject: [PATCH] ccs_pipe_t needs copy and release functions On Windows it is an allocated type. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19717 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ccapi/server/ccs_os_pipe.h | 4 ++++ src/ccapi/server/ccs_pipe.c | 15 +++++++++++++++ src/ccapi/server/ccs_pipe.h | 5 +++++ src/ccapi/server/mac/ccs_os_pipe.c | 23 +++++++++++++++++++++++ 4 files changed, 47 insertions(+) diff --git a/src/ccapi/server/ccs_os_pipe.h b/src/ccapi/server/ccs_os_pipe.h index fd17828e5..0311ffa2b 100644 --- a/src/ccapi/server/ccs_os_pipe.h +++ b/src/ccapi/server/ccs_os_pipe.h @@ -31,5 +31,9 @@ cc_int32 ccs_os_pipe_valid (ccs_pipe_t in_pipe); +cc_int32 ccs_os_pipe_copy (ccs_pipe_t *out_pipe, + ccs_pipe_t in_pipe); + +cc_int32 ccs_os_pipe_release (ccs_pipe_t io_pipe); #endif /* CCS_OS_PIPE_H */ diff --git a/src/ccapi/server/ccs_pipe.c b/src/ccapi/server/ccs_pipe.c index a7a547f17..ac02f95df 100644 --- a/src/ccapi/server/ccs_pipe.c +++ b/src/ccapi/server/ccs_pipe.c @@ -33,3 +33,18 @@ cc_int32 ccs_pipe_valid (ccs_pipe_t in_pipe) { return ccs_os_pipe_valid (in_pipe); } + +/* ------------------------------------------------------------------------ */ + +cc_int32 ccs_pipe_copy (ccs_pipe_t *out_pipe, + ccs_pipe_t in_pipe) +{ + return ccs_os_pipe_copy (out_pipe, in_pipe); +} + +/* ------------------------------------------------------------------------ */ + +cc_int32 ccs_pipe_release (ccs_pipe_t io_pipe) +{ + return ccs_os_pipe_release (io_pipe); +} diff --git a/src/ccapi/server/ccs_pipe.h b/src/ccapi/server/ccs_pipe.h index d124a9049..7e21be6cc 100644 --- a/src/ccapi/server/ccs_pipe.h +++ b/src/ccapi/server/ccs_pipe.h @@ -31,4 +31,9 @@ cc_int32 ccs_pipe_valid (ccs_pipe_t in_pipe); +cc_int32 ccs_pipe_copy (ccs_pipe_t *out_pipe, + ccs_pipe_t in_pipe); + +cc_int32 ccs_pipe_release (ccs_pipe_t io_pipe); + #endif /* CCS_PIPE_H */ diff --git a/src/ccapi/server/mac/ccs_os_pipe.c b/src/ccapi/server/mac/ccs_os_pipe.c index 0b5fa8952..494c91f58 100644 --- a/src/ccapi/server/mac/ccs_os_pipe.c +++ b/src/ccapi/server/mac/ccs_os_pipe.c @@ -37,3 +37,26 @@ cc_int32 ccs_os_pipe_valid (ccs_pipe_t in_pipe) return MACH_PORT_VALID (in_pipe); } +/* ------------------------------------------------------------------------ */ + +cc_int32 ccs_os_pipe_copy (ccs_pipe_t *out_pipe, + ccs_pipe_t in_pipe) +{ + cc_int32 err = 0; + + *out_pipe = in_pipe; + + return cci_check_error (err); +} + +/* ------------------------------------------------------------------------ */ + +cc_int32 ccs_os_pipe_release (ccs_pipe_t io_pipe) +{ + cc_int32 err = 0; + + /* Nothing to do here on Mac OS X */ + + return cci_check_error (err); +} + -- 2.26.2