diff options
| author | Christian Hopps <chopps@labn.net> | 2024-01-15 07:03:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-15 07:03:34 -0500 |
| commit | f2bb6874268b271e49ca2acdc5dba5efd2b0b697 (patch) | |
| tree | f44cc26dec9896b45d2a3c4139b1ea30fd2f3e75 /lib/mgmt_fe_client.c | |
| parent | bd9174f424bd33e75895160aa1f4a63dae795460 (diff) | |
| parent | 2764344bcbd37c5ea69231d6e51ba9cd58edbb44 (diff) | |
Merge pull request #15154 from idryzhov/mgmt-get-data
mgmtd get-data request expansion
Diffstat (limited to 'lib/mgmt_fe_client.c')
| -rw-r--r-- | lib/mgmt_fe_client.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c index 0bea663004..57ac071ecf 100644 --- a/lib/mgmt_fe_client.c +++ b/lib/mgmt_fe_client.c @@ -306,25 +306,26 @@ int mgmt_fe_send_regnotify_req(struct mgmt_fe_client *client, } /* - * Send get-tree request. + * Send get-data request. */ -int mgmt_fe_send_get_tree_req(struct mgmt_fe_client *client, - uint64_t session_id, uint64_t req_id, - LYD_FORMAT result_type, const char *xpath) +int mgmt_fe_send_get_data_req(struct mgmt_fe_client *client, uint64_t session_id, + uint64_t req_id, LYD_FORMAT result_type, + uint8_t flags, const char *xpath) { - struct mgmt_msg_get_tree *msg; + struct mgmt_msg_get_data *msg; size_t xplen = strlen(xpath); int ret; - msg = mgmt_msg_native_alloc_msg(struct mgmt_msg_get_tree, xplen + 1, - MTYPE_MSG_NATIVE_GET_TREE); + msg = mgmt_msg_native_alloc_msg(struct mgmt_msg_get_data, xplen + 1, + MTYPE_MSG_NATIVE_GET_DATA); msg->refer_id = session_id; msg->req_id = req_id; - msg->code = MGMT_MSG_CODE_GET_TREE; + msg->code = MGMT_MSG_CODE_GET_DATA; msg->result_type = result_type; + msg->flags = flags; strlcpy(msg->xpath, xpath, xplen + 1); - MGMTD_FE_CLIENT_DBG("Sending GET_TREE_REQ session-id %" PRIu64 + MGMTD_FE_CLIENT_DBG("Sending GET_DATA_REQ session-id %" PRIu64 " req-id %" PRIu64 " xpath: %s", session_id, req_id, xpath); |
