From dbea1e03c9d8f605c8bc14a0bbe5884fc1fcee18 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:17:01 -0700 Subject: [PATCH 1/6] libflux: convert some params to const Problem: flux_msg_get_payload() accepts a void ** argument that is set to point to the message payload, but the payload belongs to the const flux_msg_t * passed in as another argument. Make the payload pointer 'const'. The following functions, based on the above, are similarly updated: flux_request_decode_raw() flux_response_decode_raw() flux_rpc_get_raw() flux_mrpc_get_raw() flux_content_load_get() Finally, all users of the above functions are updated. And a libutil function write_all() parameter was changed to const as well, since flux-content was using it on payload returned from flux_content_load_get(), and anyway it was appropriate there. Fixes #1211 --- src/broker/content-cache.c | 6 +++--- src/broker/log.c | 2 +- src/cmd/builtin/content.c | 4 ++-- src/common/libflux/content.c | 4 ++-- src/common/libflux/content.h | 2 +- src/common/libflux/message.c | 9 +++++---- src/common/libflux/message.h | 2 +- src/common/libflux/mrpc.c | 2 +- src/common/libflux/mrpc.h | 2 +- src/common/libflux/request.c | 4 ++-- src/common/libflux/request.h | 2 +- src/common/libflux/response.c | 4 ++-- src/common/libflux/response.h | 2 +- src/common/libflux/rpc.c | 2 +- src/common/libflux/rpc.h | 2 +- src/common/libflux/test/message.c | 7 ++++--- src/common/libflux/test/request.c | 4 ++-- src/common/libflux/test/response.c | 4 ++-- src/common/libutil/readall.c | 2 +- src/common/libutil/readall.h | 2 +- src/modules/content-sqlite/content-sqlite.c | 8 ++++---- src/modules/kvs/kvs.c | 2 +- t/request/req.c | 2 +- t/rpc/rpc.c | 6 +++--- 24 files changed, 44 insertions(+), 42 deletions(-) diff --git a/src/broker/content-cache.c b/src/broker/content-cache.c index fcaf8e9b16f6..f5bd1f7307f9 100644 --- a/src/broker/content-cache.c +++ b/src/broker/content-cache.c @@ -273,7 +273,7 @@ static void cache_load_continuation (flux_future_t *f, void *arg) { content_cache_t *cache = arg; struct cache_entry *e = flux_future_aux_get (f, "entry"); - void *data = NULL; + const void *data = NULL; int len = 0; int saved_errno; int rc = -1; @@ -359,7 +359,7 @@ void content_load_request (flux_t *h, flux_msg_handler_t *w, int saved_errno = 0; int rc = -1; - if (flux_request_decode_raw (msg, NULL, (void **)&blobref, + if (flux_request_decode_raw (msg, NULL, (const void **)&blobref, &blobref_size) < 0) { saved_errno = errno; goto done; @@ -518,7 +518,7 @@ static void content_store_request (flux_t *h, flux_msg_handler_t *w, const flux_msg_t *msg, void *arg) { content_cache_t *cache = arg; - void *data; + const void *data; int len; struct cache_entry *e = NULL; char blobref[BLOBREF_MAX_STRING_SIZE]; diff --git a/src/broker/log.c b/src/broker/log.c index e98c12d85fd1..ea6e8a1125bd 100644 --- a/src/broker/log.c +++ b/src/broker/log.c @@ -532,7 +532,7 @@ static void append_request_cb (flux_t *h, flux_msg_handler_t *w, log_msg ("%s: malformed log request", __FUNCTION__); return; } - if (flux_request_decode_raw (msg, NULL, (void **)&buf, &len) < 0) + if (flux_request_decode_raw (msg, NULL, (const void **)&buf, &len) < 0) goto error; if (logbuf_append (logbuf, buf, len) < 0) goto error; diff --git a/src/cmd/builtin/content.c b/src/cmd/builtin/content.c index e8da485fdab1..f4a407b51935 100644 --- a/src/cmd/builtin/content.c +++ b/src/cmd/builtin/content.c @@ -32,7 +32,7 @@ static int internal_content_load (optparse_t *p, int ac, char *av[]) { int n; const char *ref; - uint8_t *data; + const uint8_t *data; int size; flux_t *h; flux_future_t *f; @@ -50,7 +50,7 @@ static int internal_content_load (optparse_t *p, int ac, char *av[]) flags |= CONTENT_FLAG_CACHE_BYPASS; if (!(f = flux_content_load (h, ref, flags))) log_err_exit ("flux_content_load"); - if (flux_content_load_get (f, (void **)&data, &size) < 0) + if (flux_content_load_get (f, (const void **)&data, &size) < 0) log_err_exit ("flux_content_load_get"); if (write_all (STDOUT_FILENO, data, size) < 0) log_err_exit ("write"); diff --git a/src/common/libflux/content.c b/src/common/libflux/content.c index e21d365edbe7..3cf31accf598 100644 --- a/src/common/libflux/content.c +++ b/src/common/libflux/content.c @@ -52,7 +52,7 @@ flux_future_t *flux_content_load (flux_t *h, const char *blobref, int flags) return flux_rpc_raw (h, topic, blobref, strlen (blobref) + 1, rank, 0); } -int flux_content_load_get (flux_future_t *f, void **buf, int *len) +int flux_content_load_get (flux_future_t *f, const void **buf, int *len) { return flux_rpc_get_raw (f, buf, len); } @@ -76,7 +76,7 @@ int flux_content_store_get (flux_future_t *f, const char **blobref) int ref_size; const char *ref; - if (flux_rpc_get_raw (f, (void **)&ref, &ref_size) < 0) + if (flux_rpc_get_raw (f, (const void **)&ref, &ref_size) < 0) return -1; if (!ref || ref[ref_size - 1] != '\0' || blobref_validate (ref) < 0) { errno = EPROTO; diff --git a/src/common/libflux/content.h b/src/common/libflux/content.h index 523964e77fab..cc006819d56d 100644 --- a/src/common/libflux/content.h +++ b/src/common/libflux/content.h @@ -19,7 +19,7 @@ flux_future_t *flux_content_load (flux_t *h, * Storage for 'buf' belongs to 'f' and is valid until 'f' is destroyed. * Returns 0 on success, -1 on failure with errno set. */ -int flux_content_load_get (flux_future_t *f, void **buf, int *len); +int flux_content_load_get (flux_future_t *f, const void **buf, int *len); /* Send request to store blob. */ diff --git a/src/common/libflux/message.c b/src/common/libflux/message.c index 4ac2ebbcbeb3..4a75fb553e99 100644 --- a/src/common/libflux/message.c +++ b/src/common/libflux/message.c @@ -1061,7 +1061,8 @@ int flux_msg_pack (flux_msg_t *msg, const char *fmt, ...) return rc; } -int flux_msg_get_payload (const flux_msg_t *msg, int *flags, void **buf, int *size) +int flux_msg_get_payload (const flux_msg_t *msg, int *flags, + const void **buf, int *size) { zframe_t *zf; uint8_t msgflags; @@ -1124,7 +1125,7 @@ int flux_msg_set_json (flux_msg_t *msg, const char *s) int flux_msg_get_json (const flux_msg_t *msg, const char **s) { - char *buf; + const char *buf; int size; int flags; int rc = -1; @@ -1133,7 +1134,7 @@ int flux_msg_get_json (const flux_msg_t *msg, const char **s) errno = EINVAL; goto done; } - if (flux_msg_get_payload (msg, &flags, (void **)&buf, &size) < 0) { + if (flux_msg_get_payload (msg, &flags, (const void **)&buf, &size) < 0) { errno = 0; *s = NULL; } else { @@ -1403,7 +1404,7 @@ void flux_msg_fprint (FILE *f, const flux_msg_t *msg) */ if (flux_msg_has_payload (msg)) { const char *json_str; - void *buf; + const void *buf; int size, flags; if (flux_msg_get_json (msg, &json_str) == 0) fprintf (f, "%s[%3.3zu] %s\n", prefix, strlen (json_str), json_str); diff --git a/src/common/libflux/message.h b/src/common/libflux/message.h index 940093545207..ea2a30f70d95 100644 --- a/src/common/libflux/message.h +++ b/src/common/libflux/message.h @@ -160,7 +160,7 @@ int flux_msg_get_topic (const flux_msg_t *msg, const char **topic); * Flags can be 0 or FLUX_MSGFLAG_JSON (hint for decoding). */ int flux_msg_get_payload (const flux_msg_t *msg, int *flags, - void **buf, int *size); + const void **buf, int *size); int flux_msg_set_payload (flux_msg_t *msg, int flags, const void *buf, int size); bool flux_msg_has_payload (const flux_msg_t *msg); diff --git a/src/common/libflux/mrpc.c b/src/common/libflux/mrpc.c index 9adeeb409231..fb73df03d46a 100644 --- a/src/common/libflux/mrpc.c +++ b/src/common/libflux/mrpc.c @@ -241,7 +241,7 @@ int flux_mrpc_get (flux_mrpc_t *mrpc, const char **json_str) return rc; } -int flux_mrpc_get_raw (flux_mrpc_t *mrpc, void **data, int *len) +int flux_mrpc_get_raw (flux_mrpc_t *mrpc, const void **data, int *len) { int rc = -1; diff --git a/src/common/libflux/mrpc.h b/src/common/libflux/mrpc.h index 2539f40ce2e4..1cf732844663 100644 --- a/src/common/libflux/mrpc.h +++ b/src/common/libflux/mrpc.h @@ -59,7 +59,7 @@ int flux_mrpc_get_nodeid (flux_mrpc_t *mrpc, uint32_t *nodeid); * or flux_mrpc_next(). * Returns 0 on success, or -1 on failure with errno set. */ -int flux_mrpc_get_raw (flux_mrpc_t *mrpc, void **data, int *len); +int flux_mrpc_get_raw (flux_mrpc_t *mrpc, const void **data, int *len); /* Arrange for reactor to handle response and call 'cb' continuation function * when a response is received. The function should call flux_mrpc_get(). diff --git a/src/common/libflux/request.c b/src/common/libflux/request.c index 5bfc7b076b67..9a27a1b4d0f0 100644 --- a/src/common/libflux/request.c +++ b/src/common/libflux/request.c @@ -75,10 +75,10 @@ int flux_request_decode (const flux_msg_t *msg, const char **topic, } int flux_request_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len) + const void **data, int *len) { const char *ts; - void *d = NULL; + const void *d = NULL; int l = 0; int rc = -1; diff --git a/src/common/libflux/request.h b/src/common/libflux/request.h index b7e5032c6717..664a742f01f3 100644 --- a/src/common/libflux/request.h +++ b/src/common/libflux/request.h @@ -28,7 +28,7 @@ int flux_request_unpack (const flux_msg_t *msg, const char **topic, * Returns 0 on success, or -1 on failure with errno set. */ int flux_request_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len); + const void **data, int *len); /* Encode a request message. * If json_str is non-NULL, assign the json payload. diff --git a/src/common/libflux/response.c b/src/common/libflux/response.c index ff5f828947ec..b4a241bf6dd2 100644 --- a/src/common/libflux/response.c +++ b/src/common/libflux/response.c @@ -85,10 +85,10 @@ int flux_response_decode (const flux_msg_t *msg, const char **topic, } int flux_response_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len) + const void **data, int *len) { const char *ts; - void *d = NULL; + const void *d = NULL; int l = 0; int flags = 0; int rc = -1; diff --git a/src/common/libflux/response.h b/src/common/libflux/response.h index 38978d50794b..741ab2c5d08b 100644 --- a/src/common/libflux/response.h +++ b/src/common/libflux/response.h @@ -27,7 +27,7 @@ int flux_response_decode (const flux_msg_t *msg, const char **topic, * Returns 0 on success, or -1 on failure with errno set. */ int flux_response_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len); + const void **data, int *len); flux_msg_t *flux_response_encode (const char *topic, int errnum, const char *json_str); diff --git a/src/common/libflux/rpc.c b/src/common/libflux/rpc.c index c263ca418f77..e953f575ea5f 100644 --- a/src/common/libflux/rpc.c +++ b/src/common/libflux/rpc.c @@ -98,7 +98,7 @@ int flux_rpc_get (flux_future_t *f, const char **json_str) return rc; } -int flux_rpc_get_raw (flux_future_t *f, void **data, int *len) +int flux_rpc_get_raw (flux_future_t *f, const void **data, int *len) { const flux_msg_t *msg; int rc = -1; diff --git a/src/common/libflux/rpc.h b/src/common/libflux/rpc.h index 313869cf0ae4..b1dd7b90d784 100644 --- a/src/common/libflux/rpc.h +++ b/src/common/libflux/rpc.h @@ -25,7 +25,7 @@ int flux_rpc_get (flux_future_t *f, const char **json_str); int flux_rpc_get_unpack (flux_future_t *f, const char *fmt, ...); -int flux_rpc_get_raw (flux_future_t *f, void **data, int *len); +int flux_rpc_get_raw (flux_future_t *f, const void **data, int *len); #endif /* !_FLUX_CORE_RPC_H */ diff --git a/src/common/libflux/test/message.c b/src/common/libflux/test/message.c index 7f5cec7e716a..9873fefbec39 100644 --- a/src/common/libflux/test/message.c +++ b/src/common/libflux/test/message.c @@ -230,7 +230,8 @@ void check_payload_json_formatted (void) void check_payload (void) { flux_msg_t *msg; - void *pay[1024], *buf; + const void *buf; + void *pay[1024]; int plen = sizeof (pay), len; int flags; @@ -610,8 +611,8 @@ void check_copy (void) int type; const char *topic; int cpylen, flags; - char buf[] = "xxxxxxxxxxxxxxxxxx"; - void *cpybuf; + const char buf[] = "xxxxxxxxxxxxxxxxxx"; + const void *cpybuf; ok ((msg = flux_msg_create (FLUX_MSGTYPE_KEEPALIVE)) != NULL, "created no-payload keepalive"); diff --git a/src/common/libflux/test/request.c b/src/common/libflux/test/request.c index 7fb8b4fa4c2b..f24b73c5e755 100644 --- a/src/common/libflux/test/request.c +++ b/src/common/libflux/test/request.c @@ -11,8 +11,8 @@ int main (int argc, char *argv[]) flux_msg_t *msg; const char *topic, *s; const char *json_str = "{\"a\":42}"; - void *d; - char data[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + const void *d; + const char data[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; int i, l, len = strlen (data); plan (NO_PLAN); diff --git a/src/common/libflux/test/response.c b/src/common/libflux/test/response.c index 7de2c471abb6..691f1cf88529 100644 --- a/src/common/libflux/test/response.c +++ b/src/common/libflux/test/response.c @@ -11,8 +11,8 @@ int main (int argc, char *argv[]) flux_msg_t *msg; const char *topic, *s; const char *json_str = "{\"a\":42}"; - void *d; - char data[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; + const void *d; + const char data[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; int l, len = strlen (data); plan (NO_PLAN); diff --git a/src/common/libutil/readall.c b/src/common/libutil/readall.c index 43e67916cec4..a4984bea80cc 100644 --- a/src/common/libutil/readall.c +++ b/src/common/libutil/readall.c @@ -32,7 +32,7 @@ #include "readall.h" -int write_all (int fd, uint8_t *buf, int len) +int write_all (int fd, const uint8_t *buf, int len) { int n; int count = 0; diff --git a/src/common/libutil/readall.h b/src/common/libutil/readall.h index bfc137832f2b..58dd032f6866 100644 --- a/src/common/libutil/readall.h +++ b/src/common/libutil/readall.h @@ -3,7 +3,7 @@ #include -int write_all (int fd, uint8_t *buf, int len); +int write_all (int fd, const uint8_t *buf, int len); int read_all (int fd, uint8_t **bufp); #endif /* !_UTIL_READ_ALL_H */ diff --git a/src/modules/content-sqlite/content-sqlite.c b/src/modules/content-sqlite/content-sqlite.c index 973124b91247..674f6284f8b2 100644 --- a/src/modules/content-sqlite/content-sqlite.c +++ b/src/modules/content-sqlite/content-sqlite.c @@ -246,7 +246,7 @@ void load_cb (flux_t *h, flux_msg_handler_t *w, const flux_msg_t *msg, void *arg) { sqlite_ctx_t *ctx = arg; - char *blobref = "-"; + const char *blobref = "-"; int blobref_size; uint8_t hash[BLOBREF_MAX_DIGEST_SIZE]; int hash_len; @@ -258,7 +258,7 @@ void load_cb (flux_t *h, flux_msg_handler_t *w, //delay cancellation to ensure lock-correctness in sqlite pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old_state); - if (flux_request_decode_raw (msg, NULL, (void **)&blobref, + if (flux_request_decode_raw (msg, NULL, (const void **)&blobref, &blobref_size) < 0) { flux_log_error (h, "load: request decode failed"); goto done; @@ -327,7 +327,7 @@ void store_cb (flux_t *h, flux_msg_handler_t *w, const flux_msg_t *msg, void *arg) { sqlite_ctx_t *ctx = arg; - void *data; + const void *data; int size, hash_len; uint8_t hash[BLOBREF_MAX_DIGEST_SIZE]; char blobref[BLOBREF_MAX_STRING_SIZE] = "-"; @@ -492,7 +492,7 @@ void shutdown_cb (flux_t *h, flux_msg_handler_t *w, flux_log_error (h, "shutdown: store"); continue; } - if (flux_rpc_get_raw (f, (void **)&blobref, &blobref_size) < 0) { + if (flux_rpc_get_raw (f, (const void **)&blobref, &blobref_size) < 0) { flux_log_error (h, "shutdown: store"); flux_future_destroy (f); continue; diff --git a/src/modules/kvs/kvs.c b/src/modules/kvs/kvs.c index 6058ef40b05b..f6358f83c01c 100644 --- a/src/modules/kvs/kvs.c +++ b/src/modules/kvs/kvs.c @@ -169,7 +169,7 @@ static void content_load_completion (flux_future_t *f, void *arg) { kvs_ctx_t *ctx = arg; json_t *o; - void *data; + const void *data; int size; const char *blobref; struct cache_entry *hp; diff --git a/t/request/req.c b/t/request/req.c index d1760869928e..65371b546ebf 100644 --- a/t/request/req.c +++ b/t/request/req.c @@ -328,7 +328,7 @@ void null_request_cb (flux_t *h, flux_msg_handler_t *w, t_req_ctx_t *ctx = arg; const char *topic; int type, size; - void *buf; + const void *buf; uint32_t nodeid; int flags; diff --git a/t/rpc/rpc.c b/t/rpc/rpc.c index 04effbc3845f..286f8af13bc2 100644 --- a/t/rpc/rpc.c +++ b/t/rpc/rpc.c @@ -63,7 +63,7 @@ void rpctest_rawecho_cb (flux_t *h, flux_msg_handler_t *w, const flux_msg_t *msg, void *arg) { int errnum = 0; - void *d = NULL; + const void *d = NULL; int l = 0; if (flux_request_decode_raw (msg, NULL, &d, &l) < 0) { @@ -260,8 +260,8 @@ void test_encoding (flux_t *h) flux_future_destroy (r); /* working with-payload RPC (raw) */ - void *d; - char data[] = "aaaaaaaaaaaaaaaaaaaa"; + const void *d; + const char data[] = "aaaaaaaaaaaaaaaaaaaa"; int l, len = strlen (data); ok ((r = flux_rpc_raw (h, "rpctest.rawecho", data, len, FLUX_NODEID_ANY, 0)) != NULL, From 909654e28c7562f42e9dce3ff7d490158052687c Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:51:06 -0700 Subject: [PATCH 2/6] doc/flux_content_load(3): update func prototype Update for flux_content_load_get() prototype change. --- doc/man3/flux_content_load.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/flux_content_load.adoc b/doc/man3/flux_content_load.adoc index 78b6c0d6b76d..adb3911c88bd 100644 --- a/doc/man3/flux_content_load.adoc +++ b/doc/man3/flux_content_load.adoc @@ -17,7 +17,7 @@ SYNOPSIS int flags); int flux_content_load_get (flux_future_t *f, - void **buf, + const void **buf, size_t *len); From fb3decc7adde3a3209665e856f96213a4e2fef5f Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:52:31 -0700 Subject: [PATCH 3/6] doc/flux_rpc(3): update func prototype Update for flux_rpc_get_raw() prototype change. --- doc/man3/flux_rpc.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/man3/flux_rpc.adoc b/doc/man3/flux_rpc.adoc index 2a25bc80fdc6..09f31d227b17 100644 --- a/doc/man3/flux_rpc.adoc +++ b/doc/man3/flux_rpc.adoc @@ -28,7 +28,8 @@ SYNOPSIS int flux_rpc_get_unpack (flux_future_t *f, const char *fmt, ...); - int flux_rpc_get_raw (flux_future_t *f, void **data, int *len); + int flux_rpc_get_raw (flux_future_t *f, + const void **data, int *len); DESCRIPTION From e0a81fefeff14a3a5a2acb12a18bed6cc2e4f477 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:53:10 -0700 Subject: [PATCH 4/6] doc/flux_response_decode(3): update func prototype Update for flux_response_decode_raw() prototype change. --- doc/man3/flux_response_decode.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/flux_response_decode.adoc b/doc/man3/flux_response_decode.adoc index 7206ccd12a85..585d226df20d 100644 --- a/doc/man3/flux_response_decode.adoc +++ b/doc/man3/flux_response_decode.adoc @@ -18,7 +18,7 @@ SYNOPSIS int flux_response_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len); + const void **data, int *len); DESCRIPTION ----------- From 9cc3a8e33cc6cec0d24f304e2d3ad0b885f7137d Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:53:56 -0700 Subject: [PATCH 5/6] doc/flux_request_decode(3): update func prototype Update for flux_request_decode_raw() prototype change --- doc/man3/flux_request_decode.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/flux_request_decode.adoc b/doc/man3/flux_request_decode.adoc index c914f3dbf8b9..476e4e4cdfa4 100644 --- a/doc/man3/flux_request_decode.adoc +++ b/doc/man3/flux_request_decode.adoc @@ -22,7 +22,7 @@ SYNOPSIS int flux_request_decode_raw (const flux_msg_t *msg, const char **topic, - void **data, int *len); + const void **data, int *len); DESCRIPTION ----------- From 32e96cbfa35d7a9b5163320a4e19eac25c240406 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 27 Sep 2017 10:54:27 -0700 Subject: [PATCH 6/6] doc/flux_mrpc(3): update func prototype Update for flux_mrpc_get_raw() prototype change. --- doc/man3/flux_mrpc.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man3/flux_mrpc.adoc b/doc/man3/flux_mrpc.adoc index e04d1285005f..9472ae7a8108 100644 --- a/doc/man3/flux_mrpc.adoc +++ b/doc/man3/flux_mrpc.adoc @@ -22,7 +22,7 @@ int flux_mrpc_get (flux_mrpc_t *mrpc, const char **json_str); int flux_mrpc_getf (flux_mrpc_t *mrpc, const char *fmt, ...); -int flux_mrpc_get_raw (flux_mrpc_t *mrpc, void **data, int *len); +int flux_mrpc_get_raw (flux_mrpc_t *mrpc, const void **data, int *len); int flux_mrpc_get_nodeid (flux_mrpc_t *mrpc, uint32_t *nodeid);