summaryrefslogtreecommitdiffstats
path: root/src/ccapi/server
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-09-30 21:23:17 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-09-30 21:23:17 +0000
commit89db2820d03f280d0bf0e217d520e89c2bb8acd2 (patch)
treebaf4c5e5930974bf928509aea9d511d947b623f2 /src/ccapi/server
parent6b6d24e1ae0aadffb9062ac94ae8e600e09dbef0 (diff)
downloadkrb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.tar.gz
krb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.tar.xz
krb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.zip
CCAPI should use common ipc and stream code
KIM and CCAPI should share the same IPC and stream object types. Modified CCAPI to use code in src/util (stream) and src/util/mac (ipc) ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20787 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/server')
-rw-r--r--src/ccapi/server/ccs_cache_collection.c108
-rw-r--r--src/ccapi/server/ccs_cache_collection.h4
-rw-r--r--src/ccapi/server/ccs_callback.c2
-rw-r--r--src/ccapi/server/ccs_callback.h2
-rw-r--r--src/ccapi/server/ccs_ccache.c138
-rw-r--r--src/ccapi/server/ccs_ccache.h8
-rw-r--r--src/ccapi/server/ccs_ccache_iterator.c22
-rw-r--r--src/ccapi/server/ccs_ccache_iterator.h4
-rw-r--r--src/ccapi/server/ccs_credentials.c4
-rw-r--r--src/ccapi/server/ccs_credentials.h4
-rw-r--r--src/ccapi/server/ccs_credentials_iterator.c22
-rw-r--r--src/ccapi/server/ccs_credentials_iterator.h4
-rw-r--r--src/ccapi/server/ccs_list.c4
-rw-r--r--src/ccapi/server/ccs_list.h4
-rw-r--r--src/ccapi/server/ccs_list_internal.c2
-rw-r--r--src/ccapi/server/ccs_list_internal.h2
-rw-r--r--src/ccapi/server/ccs_os_server.h2
-rw-r--r--src/ccapi/server/ccs_server.c24
-rw-r--r--src/ccapi/server/ccs_server.h4
-rw-r--r--src/ccapi/server/mac/ccs_os_server.c174
-rw-r--r--src/ccapi/server/win/WorkItem.cpp18
-rw-r--r--src/ccapi/server/win/WorkQueue.cpp4
-rw-r--r--src/ccapi/server/win/WorkQueue.h4
-rw-r--r--src/ccapi/server/win/ccs_os_server.cpp18
-rw-r--r--src/ccapi/server/win/ccs_request_proc.c6
-rw-r--r--src/ccapi/server/win/workitem.h8
26 files changed, 228 insertions, 368 deletions
diff --git a/src/ccapi/server/ccs_cache_collection.c b/src/ccapi/server/ccs_cache_collection.c
index 1a312b90e..b09ae8d8e 100644
--- a/src/ccapi/server/ccs_cache_collection.c
+++ b/src/ccapi/server/ccs_cache_collection.c
@@ -137,7 +137,7 @@ cc_int32 ccs_cache_collection_compare_identifier (ccs_cache_collection_t in_cac
cc_int32 ccs_cache_collection_changed (ccs_cache_collection_t io_cache_collection)
{
cc_int32 err = ccNoError;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!io_cache_collection) { err = cci_check_error (ccErrBadParam); }
@@ -152,11 +152,11 @@ cc_int32 ccs_cache_collection_changed (ccs_cache_collection_t io_cache_collectio
}
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
- err = cci_stream_write_time (reply_data, io_cache_collection->last_changed_time);
+ err = k5_ipc_stream_write_time (reply_data, io_cache_collection->last_changed_time);
}
if (!err) {
@@ -181,7 +181,7 @@ cc_int32 ccs_cache_collection_changed (ccs_cache_collection_t io_cache_collectio
err = ccs_os_notify_cache_collection_changed (io_cache_collection);
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
@@ -572,8 +572,8 @@ cc_int32 ccs_cache_collection_set_default_ccache (ccs_cache_collection_t io_cac
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_context_release (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -591,8 +591,8 @@ static cc_int32 ccs_cache_collection_context_release (ccs_cache_collection_t io_
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_sync (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -610,8 +610,8 @@ static cc_int32 ccs_cache_collection_sync (ccs_cache_collection_t io_cache_colle
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_get_change_time (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -620,7 +620,7 @@ static cc_int32 ccs_cache_collection_get_change_time (ccs_cache_collection_t io_
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_time (io_reply_data, io_cache_collection->last_changed_time);
+ err = k5_ipc_stream_write_time (io_reply_data, io_cache_collection->last_changed_time);
}
return cci_check_error (err);
@@ -631,8 +631,8 @@ static cc_int32 ccs_cache_collection_get_change_time (ccs_cache_collection_t io_
static cc_int32 ccs_cache_collection_wait_for_change (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data,
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data,
cc_uint32 *out_will_block)
{
cc_int32 err = ccNoError;
@@ -646,12 +646,12 @@ static cc_int32 ccs_cache_collection_wait_for_change (ccs_pipe_t in
if (!out_will_block ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_time (in_request_data, &last_wait_for_change_time);
+ err = k5_ipc_stream_read_time (in_request_data, &last_wait_for_change_time);
}
if (!err) {
if (last_wait_for_change_time < io_cache_collection->last_changed_time) {
- err = cci_stream_write_time (io_reply_data, io_cache_collection->last_changed_time);
+ err = k5_ipc_stream_write_time (io_reply_data, io_cache_collection->last_changed_time);
} else {
ccs_callback_t callback = NULL;
@@ -685,8 +685,8 @@ static cc_int32 ccs_cache_collection_wait_for_change (ccs_pipe_t in
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_get_default_ccache_name (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint64 count = 0;
@@ -709,7 +709,7 @@ static cc_int32 ccs_cache_collection_get_default_ccache_name (ccs_cache_collecti
err = ccs_ccache_write_name (ccache, io_reply_data);
}
} else {
- err = cci_stream_write_string (io_reply_data,
+ err = k5_ipc_stream_write_string (io_reply_data,
k_cci_context_initial_ccache_name);
}
}
@@ -720,8 +720,8 @@ static cc_int32 ccs_cache_collection_get_default_ccache_name (ccs_cache_collecti
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_open_ccache (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
char *name = NULL;
@@ -732,7 +732,7 @@ static cc_int32 ccs_cache_collection_open_ccache (ccs_cache_collection_t io_cach
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_string (in_request_data, &name);
+ err = k5_ipc_stream_read_string (in_request_data, &name);
}
if (!err) {
@@ -744,7 +744,7 @@ static cc_int32 ccs_cache_collection_open_ccache (ccs_cache_collection_t io_cach
err = ccs_ccache_write (ccache, io_reply_data);
}
- free (name);
+ k5_ipc_stream_free_string (name);
return cci_check_error (err);
}
@@ -752,8 +752,8 @@ static cc_int32 ccs_cache_collection_open_ccache (ccs_cache_collection_t io_cach
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_open_default_ccache (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_ccache_t ccache = NULL;
@@ -777,8 +777,8 @@ static cc_int32 ccs_cache_collection_open_default_ccache (ccs_cache_collection_t
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_create_ccache (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
char *name = NULL;
@@ -791,15 +791,15 @@ static cc_int32 ccs_cache_collection_create_ccache (ccs_cache_collection_t io_ca
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_string (in_request_data, &name);
+ err = k5_ipc_stream_read_string (in_request_data, &name);
}
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
- err = cci_stream_read_string (in_request_data, &principal);
+ err = k5_ipc_stream_read_string (in_request_data, &principal);
}
if (!err) {
@@ -824,8 +824,8 @@ static cc_int32 ccs_cache_collection_create_ccache (ccs_cache_collection_t io_ca
err = ccs_cache_collection_changed (io_cache_collection);
}
- free (name);
- free (principal);
+ k5_ipc_stream_free_string (name);
+ k5_ipc_stream_free_string (principal);
return cci_check_error (err);
}
@@ -833,8 +833,8 @@ static cc_int32 ccs_cache_collection_create_ccache (ccs_cache_collection_t io_ca
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_create_default_ccache (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 cred_vers;
@@ -846,11 +846,11 @@ static cc_int32 ccs_cache_collection_create_default_ccache (ccs_cache_collection
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
- err = cci_stream_read_string (in_request_data, &principal);
+ err = k5_ipc_stream_read_string (in_request_data, &principal);
}
if (!err) {
@@ -883,7 +883,7 @@ static cc_int32 ccs_cache_collection_create_default_ccache (ccs_cache_collection
err = ccs_cache_collection_changed (io_cache_collection);
}
- free (principal);
+ k5_ipc_stream_free_string (principal);
return cci_check_error (err);
}
@@ -891,8 +891,8 @@ static cc_int32 ccs_cache_collection_create_default_ccache (ccs_cache_collection
/* ------------------------------------------------------------------------ */
static cc_int32 ccs_cache_collection_create_new_ccache (ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 cred_vers;
@@ -905,11 +905,11 @@ static cc_int32 ccs_cache_collection_create_new_ccache (ccs_cache_collection_t i
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
- err = cci_stream_read_string (in_request_data, &principal);
+ err = k5_ipc_stream_read_string (in_request_data, &principal);
}
if (!err) {
@@ -931,7 +931,7 @@ static cc_int32 ccs_cache_collection_create_new_ccache (ccs_cache_collection_t i
}
free (name);
- free (principal);
+ k5_ipc_stream_free_string (principal);
return cci_check_error (err);
}
@@ -940,8 +940,8 @@ static cc_int32 ccs_cache_collection_create_new_ccache (ccs_cache_collection_t i
static cc_int32 ccs_cache_collection_new_ccache_iterator (ccs_cache_collection_t io_cache_collection,
ccs_pipe_t in_client_pipe,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_ccache_iterator_t ccache_iterator = NULL;
@@ -968,9 +968,9 @@ static cc_int32 ccs_cache_collection_new_ccache_iterator (ccs_cache_collection_
static cc_int32 ccs_cache_collection_lock (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t io_reply_data)
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 lock_type;
@@ -983,11 +983,11 @@ static cc_int32 ccs_cache_collection_lock (ccs_pipe_t in_client_pip
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &lock_type);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &lock_type);
}
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &block);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &block);
}
if (!err) {
@@ -1003,8 +1003,8 @@ static cc_int32 ccs_cache_collection_lock (ccs_pipe_t in_client_pip
static cc_int32 ccs_cache_collection_unlock (ccs_pipe_t in_client_pipe,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -1031,13 +1031,13 @@ static cc_int32 ccs_cache_collection_unlock (ccs_pipe_t in_client_pi
ccs_pipe_t in_reply_pipe,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t *out_reply_data)
+ k5_ipc_stream *out_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 will_block = 0;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!ccs_pipe_valid (in_client_pipe)) { err = cci_check_error (ccErrBadParam); }
if (!ccs_pipe_valid (in_reply_pipe) ) { err = cci_check_error (ccErrBadParam); }
@@ -1047,7 +1047,7 @@ static cc_int32 ccs_cache_collection_unlock (ccs_pipe_t in_client_pi
if (!out_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
@@ -1124,7 +1124,7 @@ static cc_int32 ccs_cache_collection_unlock (ccs_pipe_t in_client_pi
}
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
diff --git a/src/ccapi/server/ccs_cache_collection.h b/src/ccapi/server/ccs_cache_collection.h
index b3278f7db..f0507967b 100644
--- a/src/ccapi/server/ccs_cache_collection.h
+++ b/src/ccapi/server/ccs_cache_collection.h
@@ -66,8 +66,8 @@ cc_int32 ccs_cache_collection_handle_message (ccs_pipe_t in_client_
ccs_pipe_t in_reply_pipe,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t *out_reply_data);
+ k5_ipc_stream *out_reply_data);
#endif /* CCS_CACHE_COLLECTION_H */
diff --git a/src/ccapi/server/ccs_callback.c b/src/ccapi/server/ccs_callback.c
index 6a5281c2f..94e9d9b4b 100644
--- a/src/ccapi/server/ccs_callback.c
+++ b/src/ccapi/server/ccs_callback.c
@@ -156,7 +156,7 @@ cc_int32 ccs_callback_invalidate (ccs_callback_t io_callback)
/* ------------------------------------------------------------------------ */
cc_int32 ccs_callback_reply_to_client (ccs_callback_t io_callback,
- cci_stream_t in_stream)
+ k5_ipc_stream in_stream)
{
cc_int32 err = ccNoError;
diff --git a/src/ccapi/server/ccs_callback.h b/src/ccapi/server/ccs_callback.h
index 3ebe28d47..26526984e 100644
--- a/src/ccapi/server/ccs_callback.h
+++ b/src/ccapi/server/ccs_callback.h
@@ -47,7 +47,7 @@ cc_int32 ccs_callback_release (ccs_callback_t io_callback);
cc_int32 ccs_callback_invalidate (ccs_callback_t io_callback);
cc_int32 ccs_callback_reply_to_client (ccs_callback_t io_callback,
- cci_stream_t in_stream);
+ k5_ipc_stream in_stream);
cc_uint32 ccs_callback_is_pending (ccs_callback_t in_callback,
cc_uint32 *out_pending);
diff --git a/src/ccapi/server/ccs_ccache.c b/src/ccapi/server/ccs_ccache.c
index 35f70903c..88cf1e0d9 100644
--- a/src/ccapi/server/ccs_ccache.c
+++ b/src/ccapi/server/ccs_ccache.c
@@ -315,7 +315,7 @@ cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection)
{
cc_int32 err = ccNoError;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!io_ccache ) { err = cci_check_error (ccErrBadParam); }
if (!io_cache_collection) { err = cci_check_error (ccErrBadParam); }
@@ -335,11 +335,11 @@ cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
}
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
- err = cci_stream_write_time (reply_data, io_ccache->last_changed_time);
+ err = k5_ipc_stream_write_time (reply_data, io_ccache->last_changed_time);
}
if (!err) {
@@ -365,7 +365,7 @@ cc_int32 ccs_ccache_changed (ccs_ccache_t io_ccache,
io_ccache->name);
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
@@ -461,7 +461,7 @@ cc_int32 ccs_ccache_find_credentials_iterator (ccs_ccache_t in_cc
/* ------------------------------------------------------------------------ */
cc_int32 ccs_ccache_write (ccs_ccache_t in_ccache,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -479,7 +479,7 @@ cc_int32 ccs_ccache_write (ccs_ccache_t in_ccache,
/* ------------------------------------------------------------------------ */
cc_int32 ccs_ccache_write_name (ccs_ccache_t in_ccache,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -487,7 +487,7 @@ cc_int32 ccs_ccache_write_name (ccs_ccache_t in_ccache,
if (!io_stream) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_string (io_stream, in_ccache->name);
+ err = k5_ipc_stream_write_string (io_stream, in_ccache->name);
}
return cci_check_error (err);
@@ -502,8 +502,8 @@ cc_int32 ccs_ccache_write_name (ccs_ccache_t in_ccache,
static cc_int32 ccs_ccache_destroy (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -529,8 +529,8 @@ static cc_int32 ccs_ccache_destroy (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_set_default (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -551,8 +551,8 @@ static cc_int32 ccs_ccache_set_default (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_get_credentials_version (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -562,7 +562,7 @@ static cc_int32 ccs_ccache_get_credentials_version (ccs_ccache_t io_cc
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_uint32 (io_reply_data, io_ccache->creds_version);
+ err = k5_ipc_stream_write_uint32 (io_reply_data, io_ccache->creds_version);
}
return cci_check_error (err);
@@ -572,8 +572,8 @@ static cc_int32 ccs_ccache_get_credentials_version (ccs_ccache_t io_cc
static cc_int32 ccs_ccache_get_name (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -583,7 +583,7 @@ static cc_int32 ccs_ccache_get_name (ccs_ccache_t io_ccache,
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_string (io_reply_data, io_ccache->name);
+ err = k5_ipc_stream_write_string (io_reply_data, io_ccache->name);
}
return cci_check_error (err);
@@ -593,8 +593,8 @@ static cc_int32 ccs_ccache_get_name (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_get_principal (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 version = 0;
@@ -605,7 +605,7 @@ static cc_int32 ccs_ccache_get_principal (ccs_ccache_t io_ccache,
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &version);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &version);
}
if (!err && version == cc_credentials_v4_v5) {
@@ -614,10 +614,10 @@ static cc_int32 ccs_ccache_get_principal (ccs_ccache_t io_ccache,
if (!err) {
if (version == cc_credentials_v4) {
- err = cci_stream_write_string (io_reply_data, io_ccache->v4_principal);
+ err = k5_ipc_stream_write_string (io_reply_data, io_ccache->v4_principal);
} else if (version == cc_credentials_v5) {
- err = cci_stream_write_string (io_reply_data, io_ccache->v5_principal);
+ err = k5_ipc_stream_write_string (io_reply_data, io_ccache->v5_principal);
} else {
err = cci_check_error (ccErrBadCredentialsVersion);
@@ -631,8 +631,8 @@ static cc_int32 ccs_ccache_get_principal (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_set_principal (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 version = 0;
@@ -644,11 +644,11 @@ static cc_int32 ccs_ccache_set_principal (ccs_ccache_t io_ccache,
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &version);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &version);
}
if (!err) {
- err = cci_stream_read_string (in_request_data, &principal);
+ err = k5_ipc_stream_read_string (in_request_data, &principal);
}
if (!err) {
@@ -681,7 +681,7 @@ static cc_int32 ccs_ccache_set_principal (ccs_ccache_t io_ccache,
err = ccs_ccache_changed (io_ccache, io_cache_collection);
}
- free (principal);
+ k5_ipc_stream_free_string (principal);
return cci_check_error (err);
}
@@ -690,8 +690,8 @@ static cc_int32 ccs_ccache_set_principal (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_store_credentials (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_credentials_t credentials = NULL;
@@ -719,8 +719,8 @@ static cc_int32 ccs_ccache_store_credentials (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_remove_credentials (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cci_identifier_t credentials_identifier = NULL;
@@ -752,8 +752,8 @@ static cc_int32 ccs_ccache_remove_credentials (ccs_ccache_t io_ccache,
static cc_int32 ccs_ccache_new_credentials_iterator (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
ccs_pipe_t in_client_pipe,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_credentials_iterator_t credentials_iterator = NULL;
@@ -780,8 +780,8 @@ static cc_int32 ccs_ccache_new_credentials_iterator (ccs_ccache_t io_c
static cc_int32 ccs_ccache_move (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cci_identifier_t source_identifier = NULL;
@@ -818,9 +818,9 @@ static cc_int32 ccs_ccache_lock (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t io_reply_data)
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 lock_type;
@@ -834,11 +834,11 @@ static cc_int32 ccs_ccache_lock (ccs_pipe_t in_client_pipe,
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &lock_type);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &lock_type);
}
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &block);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &block);
}
if (!err) {
@@ -855,8 +855,8 @@ static cc_int32 ccs_ccache_lock (ccs_pipe_t in_client_pipe,
static cc_int32 ccs_ccache_unlock (ccs_pipe_t in_client_pipe,
ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -877,8 +877,8 @@ static cc_int32 ccs_ccache_unlock (ccs_pipe_t in_client_pipe,
static cc_int32 ccs_ccache_get_last_default_time (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -892,7 +892,7 @@ static cc_int32 ccs_ccache_get_last_default_time (ccs_ccache_t io_ccac
}
if (!err) {
- err = cci_stream_write_time (io_reply_data, io_ccache->last_default_time);
+ err = k5_ipc_stream_write_time (io_reply_data, io_ccache->last_default_time);
}
return cci_check_error (err);
@@ -902,8 +902,8 @@ static cc_int32 ccs_ccache_get_last_default_time (ccs_ccache_t io_ccac
static cc_int32 ccs_ccache_get_change_time (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -913,7 +913,7 @@ static cc_int32 ccs_ccache_get_change_time (ccs_ccache_t io_ccache,
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_time (io_reply_data, io_ccache->last_changed_time);
+ err = k5_ipc_stream_write_time (io_reply_data, io_ccache->last_changed_time);
}
return cci_check_error (err);
@@ -925,8 +925,8 @@ static cc_int32 ccs_ccache_wait_for_change (ccs_pipe_t in_client_pi
ccs_pipe_t in_reply_pipe,
ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data,
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data,
cc_uint32 *out_will_block)
{
cc_int32 err = ccNoError;
@@ -941,13 +941,13 @@ static cc_int32 ccs_ccache_wait_for_change (ccs_pipe_t in_client_pi
if (!out_will_block ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_time (in_request_data, &last_wait_for_change_time);
+ err = k5_ipc_stream_read_time (in_request_data, &last_wait_for_change_time);
}
if (!err) {
if (last_wait_for_change_time < io_ccache->last_changed_time) {
cci_debug_printf ("%s returning immediately", __FUNCTION__);
- err = cci_stream_write_time (io_reply_data, io_ccache->last_changed_time);
+ err = k5_ipc_stream_write_time (io_reply_data, io_ccache->last_changed_time);
} else {
ccs_callback_t callback = NULL;
@@ -983,8 +983,8 @@ static cc_int32 ccs_ccache_wait_for_change (ccs_pipe_t in_client_pi
static cc_int32 ccs_ccache_get_kdc_time_offset (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 cred_vers = 0;
@@ -995,20 +995,20 @@ static cc_int32 ccs_ccache_get_kdc_time_offset (ccs_ccache_t io_ccache
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
if (cred_vers == cc_credentials_v4) {
if (io_ccache->kdc_time_offset_v4_valid) {
- err = cci_stream_write_time (io_reply_data, io_ccache->kdc_time_offset_v4);
+ err = k5_ipc_stream_write_time (io_reply_data, io_ccache->kdc_time_offset_v4);
} else {
err = cci_check_error (ccErrTimeOffsetNotSet);
}
} else if (cred_vers == cc_credentials_v5) {
if (io_ccache->kdc_time_offset_v5_valid) {
- err = cci_stream_write_time (io_reply_data, io_ccache->kdc_time_offset_v5);
+ err = k5_ipc_stream_write_time (io_reply_data, io_ccache->kdc_time_offset_v5);
} else {
err = cci_check_error (ccErrTimeOffsetNotSet);
}
@@ -1025,8 +1025,8 @@ static cc_int32 ccs_ccache_get_kdc_time_offset (ccs_ccache_t io_ccache
static cc_int32 ccs_ccache_set_kdc_time_offset (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 cred_vers = 0;
@@ -1037,18 +1037,18 @@ static cc_int32 ccs_ccache_set_kdc_time_offset (ccs_ccache_t io_ccache
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
if (cred_vers == cc_credentials_v4) {
- err = cci_stream_read_time (in_request_data, &io_ccache->kdc_time_offset_v4);
+ err = k5_ipc_stream_read_time (in_request_data, &io_ccache->kdc_time_offset_v4);
if (!err) {
io_ccache->kdc_time_offset_v4_valid = 1;
}
} else if (cred_vers == cc_credentials_v5) {
- err = cci_stream_read_time (in_request_data, &io_ccache->kdc_time_offset_v5);
+ err = k5_ipc_stream_read_time (in_request_data, &io_ccache->kdc_time_offset_v5);
if (!err) {
io_ccache->kdc_time_offset_v5_valid = 1;
@@ -1069,8 +1069,8 @@ static cc_int32 ccs_ccache_set_kdc_time_offset (ccs_ccache_t io_ccache
static cc_int32 ccs_ccache_clear_kdc_time_offset (ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 cred_vers = 0;
@@ -1081,7 +1081,7 @@ static cc_int32 ccs_ccache_clear_kdc_time_offset (ccs_ccache_t io_ccac
if (!io_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request_data, &cred_vers);
+ err = k5_ipc_stream_read_uint32 (in_request_data, &cred_vers);
}
if (!err) {
@@ -1116,13 +1116,13 @@ cc_int32 ccs_ccache_handle_message (ccs_pipe_t in_client_pipe,
ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t *out_reply_data)
+ k5_ipc_stream *out_reply_data)
{
cc_int32 err = ccNoError;
cc_uint32 will_block = 0;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!ccs_pipe_valid (in_client_pipe)) { err = cci_check_error (ccErrBadParam); }
if (!ccs_pipe_valid (in_reply_pipe) ) { err = cci_check_error (ccErrBadParam); }
@@ -1132,7 +1132,7 @@ cc_int32 ccs_ccache_handle_message (ccs_pipe_t in_client_pipe,
if (!out_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
@@ -1231,7 +1231,7 @@ cc_int32 ccs_ccache_handle_message (ccs_pipe_t in_client_pipe,
}
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
diff --git a/src/ccapi/server/ccs_ccache.h b/src/ccapi/server/ccs_ccache.h
index 3e9f6ae85..21c9f410f 100644
--- a/src/ccapi/server/ccs_ccache.h
+++ b/src/ccapi/server/ccs_ccache.h
@@ -66,18 +66,18 @@ cc_int32 ccs_ccache_find_credentials_iterator (ccs_ccache_t in_cc
ccs_credentials_iterator_t *out_credentials_iterator);
cc_int32 ccs_ccache_write (ccs_ccache_t in_ccache,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_int32 ccs_ccache_write_name (ccs_ccache_t in_ccache,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_int32 ccs_ccache_handle_message (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
ccs_ccache_t io_ccache,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t *out_reply_data);
+ k5_ipc_stream *out_reply_data);
#endif /* CCS_CCACHE_H */
diff --git a/src/ccapi/server/ccs_ccache_iterator.c b/src/ccapi/server/ccs_ccache_iterator.c
index 77d8eda45..0e0505644 100644
--- a/src/ccapi/server/ccs_ccache_iterator.c
+++ b/src/ccapi/server/ccs_ccache_iterator.c
@@ -30,8 +30,8 @@
static cc_int32 ccs_ccache_iterator_release (ccs_ccache_iterator_t io_ccache_iterator,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -51,8 +51,8 @@ static cc_int32 ccs_ccache_iterator_release (ccs_ccache_iterator_t io_ccache_i
static cc_int32 ccs_ccache_iterator_next (ccs_ccache_iterator_t io_ccache_iterator,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_ccache_t ccache = NULL;
@@ -77,8 +77,8 @@ static cc_int32 ccs_ccache_iterator_next (ccs_ccache_iterator_t io_ccache_iter
static cc_int32 ccs_ccache_iterator_clone (ccs_ccache_iterator_t io_ccache_iterator,
ccs_cache_collection_t io_cache_collection,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_ccache_iterator_t ccache_iterator = NULL;
@@ -109,17 +109,17 @@ static cc_int32 ccs_ccache_iterator_clone (ccs_ccache_iterator_t io_ccache_ite
cc_int32 ccs_ccache_iterator_handle_message (ccs_ccache_iterator_t io_ccache_iterator,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
- cci_stream_t *out_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream *out_reply_data)
{
cc_int32 err = ccNoError;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!in_request_data) { err = cci_check_error (ccErrBadParam); }
if (!out_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
@@ -151,7 +151,7 @@ static cc_int32 ccs_ccache_iterator_clone (ccs_ccache_iterator_t io_ccache_ite
reply_data = NULL; /* take ownership */
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
diff --git a/src/ccapi/server/ccs_ccache_iterator.h b/src/ccapi/server/ccs_ccache_iterator.h
index 8ec361a67..642ebcc5b 100644
--- a/src/ccapi/server/ccs_ccache_iterator.h
+++ b/src/ccapi/server/ccs_ccache_iterator.h
@@ -32,7 +32,7 @@
cc_int32 ccs_ccache_iterator_handle_message (ccs_ccache_iterator_t io_ccache_iterator,
ccs_cache_collection_t io_cache_collection,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
- cci_stream_t *out_reply_data);
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream *out_reply_data);
#endif /* CCS_CCACHE_ITERATOR_H */
diff --git a/src/ccapi/server/ccs_credentials.c b/src/ccapi/server/ccs_credentials.c
index 72721e68a..56b5a5799 100644
--- a/src/ccapi/server/ccs_credentials.c
+++ b/src/ccapi/server/ccs_credentials.c
@@ -36,7 +36,7 @@ struct ccs_credentials_d ccs_credentials_initializer = { NULL, NULL };
/* ------------------------------------------------------------------------ */
cc_int32 ccs_credentials_new (ccs_credentials_t *out_credentials,
- cci_stream_t in_stream,
+ k5_ipc_stream in_stream,
cc_uint32 in_ccache_version,
ccs_credentials_list_t io_credentials_list)
{
@@ -100,7 +100,7 @@ cc_int32 ccs_credentials_release (ccs_credentials_t io_credentials)
/* ------------------------------------------------------------------------ */
cc_int32 ccs_credentials_write (ccs_credentials_t in_credentials,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
diff --git a/src/ccapi/server/ccs_credentials.h b/src/ccapi/server/ccs_credentials.h
index b9219aa40..24b279484 100644
--- a/src/ccapi/server/ccs_credentials.h
+++ b/src/ccapi/server/ccs_credentials.h
@@ -31,14 +31,14 @@
cc_int32 ccs_credentials_new (ccs_credentials_t *out_credentials,
- cci_stream_t in_stream,
+ k5_ipc_stream in_stream,
cc_uint32 in_ccache_version,
ccs_credentials_list_t io_credentials_list);
cc_int32 ccs_credentials_release (ccs_credentials_t io_credentials);
cc_int32 ccs_credentials_write (ccs_credentials_t in_credentials,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_int32 ccs_credentials_compare_identifier (ccs_credentials_t in_credentials,
cci_identifier_t in_identifier,
diff --git a/src/ccapi/server/ccs_credentials_iterator.c b/src/ccapi/server/ccs_credentials_iterator.c
index b13a294b1..38e323c26 100644
--- a/src/ccapi/server/ccs_credentials_iterator.c
+++ b/src/ccapi/server/ccs_credentials_iterator.c
@@ -30,8 +30,8 @@
static cc_int32 ccs_credentials_iterator_release (ccs_credentials_iterator_t io_credentials_iterator,
ccs_ccache_t io_ccache,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
@@ -51,8 +51,8 @@ static cc_int32 ccs_credentials_iterator_release (ccs_credentials_iterator_t io_
static cc_int32 ccs_credentials_iterator_next (ccs_credentials_iterator_t io_credentials_iterator,
ccs_ccache_t io_ccache,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_credentials_t credentials = NULL;
@@ -78,8 +78,8 @@ static cc_int32 ccs_credentials_iterator_next (ccs_credentials_iterator_t io_cre
static cc_int32 ccs_credentials_iterator_clone (ccs_credentials_iterator_t io_credentials_iterator,
ccs_ccache_t io_ccache,
- cci_stream_t in_request_data,
- cci_stream_t io_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream io_reply_data)
{
cc_int32 err = ccNoError;
ccs_credentials_iterator_t credentials_iterator = NULL;
@@ -111,17 +111,17 @@ static cc_int32 ccs_credentials_iterator_clone (ccs_credentials_iterator_t io_c
cc_int32 ccs_credentials_iterator_handle_message (ccs_credentials_iterator_t io_credentials_iterator,
ccs_ccache_t io_ccache,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
- cci_stream_t *out_reply_data)
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream *out_reply_data)
{
cc_int32 err = ccNoError;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!in_request_data) { err = cci_check_error (ccErrBadParam); }
if (!out_reply_data ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&reply_data);
+ err = k5_ipc_stream_new (&reply_data);
}
if (!err) {
@@ -153,7 +153,7 @@ static cc_int32 ccs_credentials_iterator_clone (ccs_credentials_iterator_t io_c
reply_data = NULL; /* take ownership */
}
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
diff --git a/src/ccapi/server/ccs_credentials_iterator.h b/src/ccapi/server/ccs_credentials_iterator.h
index af3cf1a18..84ff0ba00 100644
--- a/src/ccapi/server/ccs_credentials_iterator.h
+++ b/src/ccapi/server/ccs_credentials_iterator.h
@@ -32,7 +32,7 @@
cc_int32 ccs_credentials_iterator_handle_message (ccs_credentials_iterator_t io_credentials_iterator,
ccs_ccache_t io_ccache,
enum cci_msg_id_t in_request_name,
- cci_stream_t in_request_data,
- cci_stream_t *out_reply_data);
+ k5_ipc_stream in_request_data,
+ k5_ipc_stream *out_reply_data);
#endif /* CCS_CREDENTIALS_ITERATOR_H */
diff --git a/src/ccapi/server/ccs_list.c b/src/ccapi/server/ccs_list.c
index 2743994a1..c5b1eb421 100644
--- a/src/ccapi/server/ccs_list.c
+++ b/src/ccapi/server/ccs_list.c
@@ -199,7 +199,7 @@ cc_int32 ccs_ccache_list_release (ccs_ccache_list_t io_list)
/* ------------------------------------------------------------------------ */
cc_int32 ccs_ccache_list_iterator_write (ccs_ccache_list_iterator_t in_list_iterator,
- cci_stream_t in_stream)
+ k5_ipc_stream in_stream)
{
return ccs_list_iterator_write (in_list_iterator, in_stream);
}
@@ -322,7 +322,7 @@ cc_int32 ccs_credentials_list_release (ccs_credentials_list_t io_list)
/* ------------------------------------------------------------------------ */
cc_int32 ccs_credentials_list_iterator_write (ccs_credentials_list_iterator_t in_list_iterator,
- cci_stream_t in_stream)
+ k5_ipc_stream in_stream)
{
return ccs_list_iterator_write (in_list_iterator, in_stream);
}
diff --git a/src/ccapi/server/ccs_list.h b/src/ccapi/server/ccs_list.h
index fff2f5421..e48d4c4f1 100644
--- a/src/ccapi/server/ccs_list.h
+++ b/src/ccapi/server/ccs_list.h
@@ -81,7 +81,7 @@ cc_int32 ccs_ccache_list_release (ccs_ccache_list_t io_list);
cc_int32 ccs_ccache_list_iterator_write (ccs_ccache_list_iterator_t in_list_iterator,
- cci_stream_t in_stream);
+ k5_ipc_stream in_stream);
cc_int32 ccs_ccache_list_iterator_clone (ccs_ccache_list_iterator_t in_list_iterator,
ccs_ccache_list_iterator_t *out_list_iterator);
@@ -122,7 +122,7 @@ cc_int32 ccs_credentials_list_release (ccs_credentials_list_t io_list);
cc_int32 ccs_credentials_list_iterator_write (ccs_credentials_list_iterator_t in_list_iterator,
- cci_stream_t in_stream);
+ k5_ipc_stream in_stream);
cc_int32 ccs_credentials_list_iterator_clone (ccs_credentials_list_iterator_t in_list_iterator,
ccs_credentials_list_iterator_t *out_list_iterator);
diff --git a/src/ccapi/server/ccs_list_internal.c b/src/ccapi/server/ccs_list_internal.c
index 1a8d0c639..74bc45a6a 100644
--- a/src/ccapi/server/ccs_list_internal.c
+++ b/src/ccapi/server/ccs_list_internal.c
@@ -477,7 +477,7 @@ static cc_int32 ccs_list_iterator_new (ccs_list_iterator_t *out_list_iterator,
/* ------------------------------------------------------------------------ */
cc_int32 ccs_list_iterator_write (ccs_list_iterator_t in_list_iterator,
- cci_stream_t in_stream)
+ k5_ipc_stream in_stream)
{
cc_int32 err = ccNoError;
diff --git a/src/ccapi/server/ccs_list_internal.h b/src/ccapi/server/ccs_list_internal.h
index 1ab6aa4c1..d659fbe10 100644
--- a/src/ccapi/server/ccs_list_internal.h
+++ b/src/ccapi/server/ccs_list_internal.h
@@ -77,7 +77,7 @@ cc_int32 ccs_list_push_front (ccs_list_t io_list,
cc_int32 ccs_list_iterator_write (ccs_list_iterator_t in_list_iterator,
- cci_stream_t in_stream);
+ k5_ipc_stream in_stream);
cc_int32 ccs_list_iterator_clone (ccs_list_iterator_t in_list_iterator,
ccs_list_iterator_t *out_list_iterator);
diff --git a/src/ccapi/server/ccs_os_server.h b/src/ccapi/server/ccs_os_server.h
index c447ae4d0..8212028d6 100644
--- a/src/ccapi/server/ccs_os_server.h
+++ b/src/ccapi/server/ccs_os_server.h
@@ -36,6 +36,6 @@ cc_int32 ccs_os_server_cleanup (int argc, const char *argv[]);
cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]);
cc_int32 ccs_os_server_send_reply (ccs_pipe_t in_reply_pipe,
- cci_stream_t in_reply_stream);
+ k5_ipc_stream in_reply_stream);
#endif /* CCS_OS_SERVER_H */
diff --git a/src/ccapi/server/ccs_server.c b/src/ccapi/server/ccs_server.c
index 5954d661c..c1bbe539a 100644
--- a/src/ccapi/server/ccs_server.c
+++ b/src/ccapi/server/ccs_server.c
@@ -207,9 +207,9 @@ static cc_int32 ccs_server_request_demux (ccs_pipe_t in_client_pipe
ccs_cache_collection_t in_cache_collection,
enum cci_msg_id_t in_request_name,
cci_identifier_t in_request_identifier,
- cci_stream_t in_request_data,
+ k5_ipc_stream in_request_data,
cc_uint32 *out_will_block,
- cci_stream_t *out_reply_data)
+ k5_ipc_stream *out_reply_data)
{
cc_int32 err = ccNoError;
@@ -311,13 +311,13 @@ static cc_int32 ccs_server_request_demux (ccs_pipe_t in_client_pipe
cc_int32 ccs_server_handle_request (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
- cci_stream_t in_request)
+ k5_ipc_stream in_request)
{
cc_int32 err = ccNoError;
enum cci_msg_id_t request_name = 0;
cci_identifier_t request_identifier = NULL;
cc_uint32 will_block = 0;
- cci_stream_t reply_data = NULL;
+ k5_ipc_stream reply_data = NULL;
if (!ccs_pipe_valid (in_client_pipe)) { err = cci_check_error (ccErrBadParam); }
if (!ccs_pipe_valid (in_reply_pipe) ) { err = cci_check_error (ccErrBadParam); }
@@ -366,7 +366,7 @@ cc_int32 ccs_server_handle_request (ccs_pipe_t in_client_pipe,
}
cci_identifier_release (request_identifier);
- cci_stream_release (reply_data);
+ k5_ipc_stream_release (reply_data);
return cci_check_error (err);
}
@@ -375,10 +375,10 @@ cc_int32 ccs_server_handle_request (ccs_pipe_t in_client_pipe,
cc_int32 ccs_server_send_reply (ccs_pipe_t in_reply_pipe,
cc_int32 in_reply_err,
- cci_stream_t in_reply_data)
+ k5_ipc_stream in_reply_data)
{
cc_int32 err = ccNoError;
- cci_stream_t reply = NULL;
+ k5_ipc_stream reply = NULL;
if (!ccs_pipe_valid (in_reply_pipe) ) { err = cci_check_error (ccErrBadParam); }
@@ -386,17 +386,17 @@ cc_int32 ccs_server_send_reply (ccs_pipe_t in_reply_pipe,
err = cci_message_new_reply_header (&reply, in_reply_err);
}
- if (!err && in_reply_data && cci_stream_size (in_reply_data) > 0) {
- err = cci_stream_write (reply,
- cci_stream_data (in_reply_data),
- cci_stream_size (in_reply_data));
+ if (!err && in_reply_data && k5_ipc_stream_size (in_reply_data) > 0) {
+ err = k5_ipc_stream_write (reply,
+ k5_ipc_stream_data (in_reply_data),
+ k5_ipc_stream_size (in_reply_data));
}
if (!err) {
err = ccs_os_server_send_reply (in_reply_pipe, reply);
}
- cci_stream_release (reply);
+ k5_ipc_stream_release (reply);
return cci_check_error (err);
}
diff --git a/src/ccapi/server/ccs_server.h b/src/ccapi/server/ccs_server.h
index 670a74ee2..e059d86bc 100644
--- a/src/ccapi/server/ccs_server.h
+++ b/src/ccapi/server/ccs_server.h
@@ -43,10 +43,10 @@ cc_int32 ccs_server_client_is_valid (ccs_pipe_t in_client_pipe,
cc_int32 ccs_server_handle_request (ccs_pipe_t in_client_pipe,
ccs_pipe_t in_reply_pipe,
- cci_stream_t in_request);
+ k5_ipc_stream in_request);
cc_int32 ccs_server_send_reply (ccs_pipe_t in_reply_pipe,
cc_int32 in_reply_err,
- cci_stream_t in_reply_data);
+ k5_ipc_stream in_reply_data);
#endif /* CCS_SERVER_H */
diff --git a/src/ccapi/server/mac/ccs_os_server.c b/src/ccapi/server/mac/ccs_os_server.c
index c99547fe8..98bc6b30a 100644
--- a/src/ccapi/server/mac/ccs_os_server.c
+++ b/src/ccapi/server/mac/ccs_os_server.c
@@ -27,118 +27,33 @@
#include "ccs_common.h"
#include <syslog.h>
-#include <Kerberos/kipc_server.h>
-#include "cci_mig_requestServer.h"
-#include "cci_mig_reply.h"
+#include "k5_mig_server.h"
#include "ccs_os_server.h"
-
/* ------------------------------------------------------------------------ */
-static boolean_t ccs_server_demux (mach_msg_header_t *request,
- mach_msg_header_t *reply)
+int32_t k5_ipc_server_add_client (mach_port_t in_client_port)
{
- boolean_t handled = false;
-
- if (!handled) {
- handled = ccs_server (request, reply);
- }
-
- if (!handled && request->msgh_id == MACH_NOTIFY_NO_SENDERS) {
- kern_return_t err = KERN_SUCCESS;
-
- err = ccs_server_remove_client (request->msgh_local_port);
-
- if (!err) {
- /* Check here for a client in our table and free rights associated with it */
- err = mach_port_mod_refs (mach_task_self (), request->msgh_local_port,
- MACH_PORT_RIGHT_RECEIVE, -1);
- }
-
- if (!err) {
- handled = 1; /* was a port we are tracking */
- }
-
- cci_check_error (err);
- }
-
- return handled;
+ return cci_check_error (ccs_server_add_client (in_client_port));
}
/* ------------------------------------------------------------------------ */
-kern_return_t ccs_mipc_create_client_connection (mach_port_t in_server_port,
- mach_port_t *out_connection_port)
+int32_t k5_ipc_server_remove_client (mach_port_t in_client_port)
{
- kern_return_t err = KERN_SUCCESS;
- mach_port_t connection_port = MACH_PORT_NULL;
- mach_port_t old_notification_target = MACH_PORT_NULL;
-
- if (!err) {
- err = mach_port_allocate (mach_task_self (), MACH_PORT_RIGHT_RECEIVE, &connection_port);
- }
-
- if (!err) {
- err = mach_port_move_member (mach_task_self (), connection_port, kipc_server_get_listen_portset ());
- }
-
- if (!err) {
- /* request no-senders notification so we can tell when client quits/crashes */
- err = mach_port_request_notification (mach_task_self (), connection_port,
- MACH_NOTIFY_NO_SENDERS, 1, connection_port,
- MACH_MSG_TYPE_MAKE_SEND_ONCE, &old_notification_target );
- }
-
- if (!err) {
- err = ccs_server_add_client (connection_port);
- }
-
- if (!err) {
- *out_connection_port = connection_port;
- connection_port = MACH_PORT_NULL;
- }
-
- if (MACH_PORT_VALID (connection_port)) { mach_port_deallocate (mach_task_self (), connection_port); }
-
- return cci_check_error (err);
+ return cci_check_error (ccs_server_remove_client (in_client_port));
}
+
/* ------------------------------------------------------------------------ */
-kern_return_t ccs_mipc_request (mach_port_t in_connection_port,
- mach_port_t in_reply_port,
- cci_mipc_inl_request_t in_inl_request,
- mach_msg_type_number_t in_inl_requestCnt,
- cci_mipc_ool_request_t in_ool_request,
- mach_msg_type_number_t in_ool_requestCnt)
+kern_return_t k5_ipc_server_handle_request (mach_port_t in_connection_port,
+ mach_port_t in_reply_port,
+ k5_ipc_stream in_request_stream)
{
- kern_return_t err = KERN_SUCCESS;
- cci_stream_t request_stream = NULL;
-
- if (!err) {
- err = cci_stream_new (&request_stream);
- }
-
- if (!err) {
- if (in_inl_requestCnt) {
- err = cci_stream_write (request_stream, in_inl_request, in_inl_requestCnt);
-
- } else if (in_ool_requestCnt) {
- err = cci_stream_write (request_stream, in_ool_request, in_ool_requestCnt);
-
- } else {
- err = cci_check_error (ccErrBadInternalMessage);
- }
- }
-
- if (!err) {
- err = ccs_server_handle_request (in_connection_port, in_reply_port, request_stream);
- }
-
- cci_stream_release (request_stream);
- if (in_ool_requestCnt) { vm_deallocate (mach_task_self (), (vm_address_t) in_ool_request, in_ool_requestCnt); }
-
- return cci_check_error (err);
+ return cci_check_error (ccs_server_handle_request (in_connection_port,
+ in_reply_port,
+ in_request_stream));
}
#pragma mark -
@@ -152,8 +67,6 @@ cc_int32 ccs_os_server_initialize (int argc, const char *argv[])
openlog (argv[0], LOG_CONS | LOG_PID, LOG_AUTH);
syslog (LOG_INFO, "Starting up.");
- syslog (LOG_NOTICE, "Exiting: %s (%d)", kipc_error_string (err), err);
-
return cci_check_error (err);
}
@@ -163,10 +76,7 @@ cc_int32 ccs_os_server_cleanup (int argc, const char *argv[])
{
cc_int32 err = 0;
- openlog (argv[0], LOG_CONS | LOG_PID, LOG_AUTH);
- syslog (LOG_INFO, "Starting up.");
-
- syslog (LOG_NOTICE, "Exiting: %s (%d)", kipc_error_string (err), err);
+ syslog (LOG_NOTICE, "Exiting.");
return cci_check_error (err);
}
@@ -175,64 +85,14 @@ cc_int32 ccs_os_server_cleanup (int argc, const char *argv[])
cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[])
{
- /* Run the Mach IPC listen loop.
- * This will call ccs_mipc_create_client_connection for new clients
- * and ccs_mipc_request for existing clients */
-
- return cci_check_error (kipc_server_run_server (ccs_server_demux));
+ return cci_check_error (k5_ipc_server_listen_loop ());
}
/* ------------------------------------------------------------------------ */
cc_int32 ccs_os_server_send_reply (ccs_pipe_t in_reply_pipe,
- cci_stream_t in_reply_stream)
+ k5_ipc_stream in_reply_stream)
{
- kern_return_t err = KERN_SUCCESS;
- cci_mipc_inl_reply_t inl_reply;
- mach_msg_type_number_t inl_reply_length = 0;
- cci_mipc_ool_reply_t ool_reply = NULL;
- mach_msg_type_number_t ool_reply_length = 0;
-
- if (!ccs_pipe_valid (in_reply_pipe)) { err = cci_check_error (ccErrBadParam); }
- if (!in_reply_stream ) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- /* depending on how big the message is, use the fast inline buffer or
- * the slow dynamically allocated buffer */
- mach_msg_type_number_t reply_length = cci_stream_size (in_reply_stream);
-
- if (reply_length > kCCAPIMaxILMsgSize) {
- cci_debug_printf ("%s choosing out of line buffer (size is %d)",
- __FUNCTION__, reply_length);
-
- err = vm_read (mach_task_self (),
- (vm_address_t) cci_stream_data (in_reply_stream), reply_length,
- (vm_address_t *) &ool_reply, &ool_reply_length);
- cci_check_error (err);
-
- } else {
- //cci_debug_printf ("%s choosing in line buffer (size is %d)",
- // __FUNCTION__, reply_length);
-
- inl_reply_length = reply_length;
- memcpy (inl_reply, cci_stream_data (in_reply_stream), reply_length);
- }
- }
-
- if (!err) {
- err = ccs_mipc_reply (in_reply_pipe,
- inl_reply, inl_reply_length,
- ool_reply, ool_reply_length);
- cci_check_error (err);
- }
-
- if (!err) {
- /* Because we use ",dealloc" ool_reply will be freed by mach. Don't double free it. */
- ool_reply = NULL;
- ool_reply_length = 0;
- }
-
- if (ool_reply_length) { vm_deallocate (mach_task_self (), (vm_address_t) ool_reply, ool_reply_length); }
-
- return cci_check_error (err);
+ return cci_check_error (k5_ipc_server_send_reply (in_reply_pipe,
+ in_reply_stream));
}
diff --git a/src/ccapi/server/win/WorkItem.cpp b/src/ccapi/server/win/WorkItem.cpp
index 7e6aeb1cb..2e9ebcc93 100644
--- a/src/ccapi/server/win/WorkItem.cpp
+++ b/src/ccapi/server/win/WorkItem.cpp
@@ -47,28 +47,28 @@ void deleteBuffer(char** buf) {
// WorkItem contains a CountedBuffer which must be deleted,
// so each WorkItem must be deleted.
-WorkItem::WorkItem(cci_stream_t buf, WIN_PIPE* pipe, const long type, const long sst)
+WorkItem::WorkItem(k5_ipc_stream buf, WIN_PIPE* pipe, const long type, const long sst)
: _buf(buf), _rpcmsg(type), _pipe(pipe), _sst(sst) { }
WorkItem::WorkItem(const WorkItem& item) : _buf(NULL), _rpcmsg(0), _pipe(NULL), _sst(0) {
- cci_stream_t _buf = NULL;
- cci_stream_new(&_buf);
- cci_stream_write(_buf,
- cci_stream_data(item.payload()),
- cci_stream_size(item.payload()) );
+ k5_ipc_stream _buf = NULL;
+ k5_ipc_stream_new(&_buf);
+ k5_ipc_stream_write(_buf,
+ k5_ipc_stream_data(item.payload()),
+ k5_ipc_stream_size(item.payload()) );
WorkItem(_buf, item._pipe, item._rpcmsg, item._sst);
}
WorkItem::WorkItem() : _buf(NULL), _rpcmsg(CCMSG_INVALID), _pipe(NULL), _sst(0) { }
WorkItem::~WorkItem() {
- if (_buf) cci_stream_release(_buf);
+ if (_buf) k5_ipc_stream_release(_buf);
if (_pipe) ccs_win_pipe_release(_pipe);
}
-const cci_stream_t WorkItem::take_payload() {
- cci_stream_t temp = payload();
+const k5_ipc_stream WorkItem::take_payload() {
+ k5_ipc_stream temp = payload();
_buf = NULL;
return temp;
}
diff --git a/src/ccapi/server/win/WorkQueue.cpp b/src/ccapi/server/win/WorkQueue.cpp
index 711ecc173..f16ad117e 100644
--- a/src/ccapi/server/win/WorkQueue.cpp
+++ b/src/ccapi/server/win/WorkQueue.cpp
@@ -39,14 +39,14 @@ EXTERN_C bool worklist_isEmpty() {
EXTERN_C int worklist_add( const long rpcmsg,
const ccs_pipe_t pipe,
- const cci_stream_t stream,
+ const k5_ipc_stream stream,
const time_t serverStartTime) {
return worklist.add(new WorkItem(stream, pipe, rpcmsg, serverStartTime) );
}
EXTERN_C int worklist_remove(long* rpcmsg,
ccs_pipe_t* pipe,
- cci_stream_t* stream,
+ k5_ipc_stream* stream,
time_t* sst) {
WorkItem* item = NULL;
cc_int32 err = worklist.remove(&item);
diff --git a/src/ccapi/server/win/WorkQueue.h b/src/ccapi/server/win/WorkQueue.h
index eb4678019..42d0cf207 100644
--- a/src/ccapi/server/win/WorkQueue.h
+++ b/src/ccapi/server/win/WorkQueue.h
@@ -35,12 +35,12 @@ EXTERN_C BOOL worklist_isEmpty();
EXTERN_C void worklist_add( const long rpcmsg,
const ccs_pipe_t pipe,
- const cci_stream_t stream,
+ const k5_ipc_stream stream,
const time_t serverStartTime);
EXTERN_C int worklist_remove(long* rpcmsg,
ccs_pipe_t* pipe,
- cci_stream_t* stream,
+ k5_ipc_stream* stream,
time_t* serverStartTime);
#endif // _work_queue_h \ No newline at end of file
diff --git a/src/ccapi/server/win/ccs_os_server.cpp b/src/ccapi/server/win/ccs_os_server.cpp
index a6725b4ed..99854d113 100644
--- a/src/ccapi/server/win/ccs_os_server.cpp
+++ b/src/ccapi/server/win/ccs_os_server.cpp
@@ -231,12 +231,12 @@ cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {
SleepEx(1000, TRUE);
}
else if (TRUE) { // Take next WorkItem from the queue:
- cci_stream_t buf = NULL;
+ k5_ipc_stream buf = NULL;
long rpcmsg = CCMSG_INVALID;
time_t serverStartTime = 0xDEADDEAD;
RPC_STATUS status = 0;
char* uuid = NULL;
- cci_stream_t stream = NULL;
+ k5_ipc_stream stream = NULL;
ccs_pipe_t pipe = NULL;
ccs_pipe_t pipe2 = NULL;
@@ -279,8 +279,8 @@ cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {
break;
case CCMSG_PING:
cci_debug_printf(" Processing PING");
- err = cci_stream_new (&stream);
- err = cci_stream_write(stream, "This is a test of the emergency broadcasting system", 52);
+ err = k5_ipc_stream_new (&stream);
+ err = k5_ipc_stream_write(stream, "This is a test of the emergency broadcasting system", 52);
err = ccs_os_server_send_reply(pipe, stream);
break;
default:
@@ -288,7 +288,7 @@ cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {
rpcmsg, uuid);
break;
}
- if (buf) cci_stream_release(buf);
+ if (buf) k5_ipc_stream_release(buf);
/* Don't free uuid, which was allocated here. A pointer to it is in the
rpcargs struct which was passed to connectionListener which will be
received by ccapi_listen when the client exits. ccapi_listen needs
@@ -311,10 +311,10 @@ cc_int32 ccs_os_server_listen_loop (int argc, const char *argv[]) {
/* ------------------------------------------------------------------------ */
cc_int32 ccs_os_server_send_reply (ccs_pipe_t in_pipe,
- cci_stream_t in_reply_stream) {
+ k5_ipc_stream in_reply_stream) {
/* ccs_pipe_t in_reply_pipe is a char* reply endpoint.
- cci_stream_t in_reply_stream is the data to be sent.
+ k5_ipc_stream in_reply_stream is the data to be sent.
*/
cc_int32 err = 0;
@@ -333,8 +333,8 @@ cc_int32 ccs_os_server_send_reply (ccs_pipe_t in_pipe,
(unsigned char*)&h, /* client's tspdata* */
(unsigned char*)uuid,
getMySST(),
- cci_stream_size(in_reply_stream), /* Length of buffer */
- (const unsigned char*)cci_stream_data(in_reply_stream), /* Data buffer */
+ k5_ipc_stream_size(in_reply_stream), /* Length of buffer */
+ (const unsigned char*)k5_ipc_stream_data(in_reply_stream), /* Data buffer */
&status ); /* Return code */
}
RpcExcept(1) {
diff --git a/src/ccapi/server/win/ccs_request_proc.c b/src/ccapi/server/win/ccs_request_proc.c
index e3c741bcc..8a0da03f4 100644
--- a/src/ccapi/server/win/ccs_request_proc.c
+++ b/src/ccapi/server/win/ccs_request_proc.c
@@ -43,7 +43,7 @@ void ccs_rpc_request(
long* return_status ) { /* Return code */
cc_int32 status = 0;
- cci_stream_t stream;
+ k5_ipc_stream stream;
DWORD* p = (DWORD*)(tspHandle);
WIN_PIPE* pipe = NULL;
#if 0
@@ -52,11 +52,11 @@ void ccs_rpc_request(
status = (rpcmsg != CCMSG_REQUEST) && (rpcmsg != CCMSG_PING);
if (!status) {
- status = cci_stream_new (&stream); /* Create a stream for the request data */
+ status = k5_ipc_stream_new (&stream); /* Create a stream for the request data */
}
if (!status) { /* Put the data into the stream */
- status = cci_stream_write (stream, pbRequest, lenRequest);
+ status = k5_ipc_stream_write (stream, pbRequest, lenRequest);
}
pipe = ccs_win_pipe_new(pszUUID, *p);
diff --git a/src/ccapi/server/win/workitem.h b/src/ccapi/server/win/workitem.h
index df1d7794a..105380669 100644
--- a/src/ccapi/server/win/workitem.h
+++ b/src/ccapi/server/win/workitem.h
@@ -11,12 +11,12 @@ extern "C" {
class WorkItem {
private:
- cci_stream_t _buf;
+ k5_ipc_stream _buf;
WIN_PIPE* _pipe;
const long _rpcmsg;
const long _sst;
public:
- WorkItem( cci_stream_t buf,
+ WorkItem( k5_ipc_stream buf,
WIN_PIPE* pipe,
const long type,
const long serverStartTime);
@@ -24,8 +24,8 @@ public:
WorkItem();
~WorkItem();
- const cci_stream_t payload() const {return _buf;}
- const cci_stream_t take_payload();
+ const k5_ipc_stream payload() const {return _buf;}
+ const k5_ipc_stream take_payload();
WIN_PIPE* take_pipe();
WIN_PIPE* pipe() const {return _pipe;}
const long type() const {return _rpcmsg;}