Skip to content

Commit

Permalink
client REFACTOR move param check & delete func def
Browse files Browse the repository at this point in the history
  • Loading branch information
roman committed Oct 26, 2023
1 parent 0829840 commit 252ea54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/messages_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ nc_rpc_act_generic(const struct lyd_node *data, NC_PARAMTYPE paramtype)
{
struct nc_rpc_act_generic *rpc;

NC_CHECK_ARG_RET(NULL, data, data->next, NULL);
if (data->prev != data) {
NC_CHECK_ARG_RET(NULL, data, NULL);
if (data->next || data->prev != data) {
ERR(NULL, "nc_rpc_act_generic missing data");
return NULL;
}
Expand Down
24 changes: 0 additions & 24 deletions src/session_client_ch.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,6 @@ int nc_accept_callhome(int timeout, struct ly_ctx *ctx, struct nc_session **sess
* @{
*/

/**
* @brief Set SSH Call Home authentication hostkey check (knownhosts) callback.
*
* Repetitive calling causes replacing of the previous callback and its private data. Caller is responsible for
* freeing the private data when necessary (the private data can be obtained by
* nc_client_ssh_ch_get_auth_hostkey_check_clb()).
*
* @param[in] auth_hostkey_check Function to call, returns 0 on success, non-zero in error.
* If NULL, the default callback is set.
* @param[in] priv Optional private data to be passed to the callback function.
*/
void nc_client_ssh_ch_set_auth_hostkey_check_clb(int (*auth_hostkey_check)(const char *hostname, ssh_session session, void *priv),
void *priv);

/**
* @brief Get currently set SSH Call Home authentication hostkey check (knownhosts) callback and its private data
* previously set by nc_client_ssh_ch_set_auth_hostkey_check_clb().
*
* @param[out] auth_hostkey_check Currently set callback, NULL in case of the default callback.
* @param[out] priv Currently set (optional) private data to be passed to the callback function.
*/
void nc_client_ssh_ch_get_auth_hostkey_check_clb(int (**auth_hostkey_check)(const char *hostname, ssh_session session, void *priv),
void **priv);

/**
* @brief Set SSH Call Home password authentication callback.
*
Expand Down

0 comments on commit 252ea54

Please sign in to comment.