Skip to content

Commit

Permalink
libflux/message: rename vset_jsonf->vpack
Browse files Browse the repository at this point in the history
Rename flux_msg_vset_jsonf() to flux_msg_vpack()
per discussion in flux-framework#1094.

Update users in libflux message encoding functions.
  • Loading branch information
garlick committed Jul 10, 2017
1 parent c5dee15 commit fadf34f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common/libflux/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static flux_msg_t *flux_event_vencodef (const char *topic,
flux_msg_t *msg = flux_event_create (topic);
if (!msg)
goto error;
if (flux_msg_vset_jsonf (msg, fmt, ap) < 0)
if (flux_msg_vpack (msg, fmt, ap) < 0)
goto error;
return msg;
error:
Expand Down
4 changes: 2 additions & 2 deletions src/common/libflux/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ int flux_msg_set_payload (flux_msg_t *msg, int flags, const void *buf, int size)
return rc;
}

int flux_msg_vset_jsonf (flux_msg_t *msg, const char *fmt, va_list ap)
int flux_msg_vpack (flux_msg_t *msg, const char *fmt, va_list ap)
{
json_error_t error;
char *json_str = NULL;
Expand Down Expand Up @@ -1056,7 +1056,7 @@ int flux_msg_pack (flux_msg_t *msg, const char *fmt, ...)
int rc;

va_start (ap, fmt);
rc = flux_msg_vset_jsonf (msg, fmt, ap);
rc = flux_msg_vpack (msg, fmt, ap);
va_end (ap);
return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/libflux/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bool flux_msg_has_payload (const flux_msg_t *msg);
*/
int flux_msg_set_json (flux_msg_t *msg, const char *json_str);
int flux_msg_pack (flux_msg_t *msg, const char *fmt, ...);
int flux_msg_vset_jsonf (flux_msg_t *msg, const char *fmt, va_list ap);
int flux_msg_vpack (flux_msg_t *msg, const char *fmt, va_list ap);

int flux_msg_get_json (const flux_msg_t *msg, const char **json_str);
int flux_msg_get_jsonf (const flux_msg_t *msg, const char *fmt, ...);
Expand Down
2 changes: 1 addition & 1 deletion src/common/libflux/mrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ flux_mrpc_t *flux_mrpcf (flux_t *h,
va_start (ap, fmt);
if (!(msg = flux_request_encode (topic, NULL)))
goto done;
if (flux_msg_vset_jsonf (msg, fmt, ap) < 0)
if (flux_msg_vpack (msg, fmt, ap) < 0)
goto done;
rc = mrpc (h, nodeset, flags, msg);
done:
Expand Down
2 changes: 1 addition & 1 deletion src/common/libflux/response.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static int flux_vrespondf (flux_t *h, const flux_msg_t *request,
flux_msg_t *msg = derive_response (h, request, 0);
if (!msg)
goto fatal;
if (flux_msg_vset_jsonf (msg, fmt, ap) < 0)
if (flux_msg_vpack (msg, fmt, ap) < 0)
goto fatal;
if (flux_send (h, msg, 0) < 0)
goto fatal;
Expand Down
2 changes: 1 addition & 1 deletion src/common/libflux/rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static flux_future_t *flux_vrpcf (flux_t *h,

if (!(msg = flux_request_encode (topic, NULL)))
goto done;
if (flux_msg_vset_jsonf (msg, fmt, ap) < 0)
if (flux_msg_vpack (msg, fmt, ap) < 0)
goto done;
f = flux_rpc_msg (h, nodeid, flags, msg);
done:
Expand Down

0 comments on commit fadf34f

Please sign in to comment.