Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
include/qb/qbipcc.h | 6 ++++++
lib/ipcc.c | 28 ++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/include/qb/qbipcc.h b/include/qb/qbipcc.h
index f873b59..39fa5a1 100644
--- a/include/qb/qbipcc.h
+++ b/include/qb/qbipcc.h
@@ -80,6 +80,12 @@ qb_ipcc_dispatch_flow_control_get (
unsigned int *flow_control_state);
extern int32_t
+qb_ipcc_msg_send (
+ qb_hdb_handle_t handle,
+ const struct iovec *iov,
+ unsigned int iov_len);
+
+extern int32_t
qb_ipcc_msg_send_reply_receive (
qb_hdb_handle_t handle,
const struct iovec *iov,
diff --git a/lib/ipcc.c b/lib/ipcc.c
index a21f3f0..bb79673 100644
--- a/lib/ipcc.c
+++ b/lib/ipcc.c
@@ -999,6 +999,34 @@ error_exit:
}
int32_t
+qb_ipcc_msg_send (
+ qb_hdb_handle_t handle,
+ const struct iovec *iov,
+ unsigned int iov_len)
+{
+ int32_t res;
+ struct ipc_instance *ipc_instance;
+
+ res = qb_hdb_handle_get (&ipc_hdb, handle, (void **)&ipc_instance);
+ if (res != 0) {
+ return (res);
+ }
+
+ pthread_mutex_lock (&ipc_instance->mutex);
+
+ res = msg_send (ipc_instance, iov, iov_len);
+ if (res != 0) {
+ goto error_exit;
+ }
+
+error_exit:
+ qb_hdb_handle_put (&ipc_hdb, handle);
+ pthread_mutex_unlock (&ipc_instance->mutex);
+
+ return (res);
+}
+
+int32_t
qb_ipcc_msg_send_reply_receive (
qb_hdb_handle_t handle,
const struct iovec *iov,
--
1.6.6.1
Show replies by date