Skip to content

Commit

Permalink
libjsc/jstatctl: [cleanup] fix outdated comments
Browse files Browse the repository at this point in the history
kvs_watch is no longer used internally so drop comment
that refers to it.

The returned "jcb" parameter is now a string, so tell
the user to release it with free(), not json_object_put().
  • Loading branch information
garlick committed Mar 28, 2018
1 parent e70e9bd commit 6519db9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/common/libjsc/jstatctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ typedef int (*jsc_handler_f)(const char *base_jcb, void *arg, int errnum);
* "d" is arbitrary data that will transparently be passed into "callback."
* However, one should pass its flux_t object as part of this callback data.
* Note that the caller must start its reactor to get an asynchronous status
* change notification via "callback." This is because it uses the KVS-watch
* facility which has the same limitation.
* change notification via "callback."
* One can register mutliple callbacks by calling this function
* multiple times. The callbacks will be invoked in the order
* they are registered. Returns 0 on success; otherwise -1.
Expand All @@ -102,10 +101,8 @@ int jsc_notify_status (flux_t *h, jsc_handler_f callback, void *d);

/**
* Query the "key" attribute of JCB of "jobid." The JCB info on this attribute
* will be passed via "jcb." It is the caller's responsibility to release "jcb."
* All of the ownership associated with the sub-attributes in jcb's hierarchy
* are trasferred to "jcb," so that json_object_put (*jcb) will free this hierarchy
* in its entirety. Returns 0 on success; otherwise -1.
* will be passed via "jcb." It is the caller's responsibility to free "jcb."
* Returns 0 on success; otherwise -1.
*/
int jsc_query_jcb (flux_t *h, int64_t jobid, const char *key, char **jcb);

Expand Down

0 comments on commit 6519db9

Please sign in to comment.