Skip to content

Commit

Permalink
session server REFACTOR move server_opts to header
Browse files Browse the repository at this point in the history
  • Loading branch information
roman authored and michalvasko committed Nov 15, 2024
1 parent 8bfccdb commit b61032e
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/messages_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "messages_server.h"
#include "netconf.h"

extern struct nc_server_opts server_opts;

API struct nc_server_reply *
nc_server_reply_ok(void)
{
Expand Down
2 changes: 0 additions & 2 deletions src/server_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include "server_config_p.h"
#include "session_p.h"

extern struct nc_server_opts server_opts;

/* returns a parent node of 'node' that matches the name 'name' */
static const struct lyd_node *
nc_server_config_get_parent(const struct lyd_node *node, const char *name)
Expand Down
2 changes: 0 additions & 2 deletions src/server_config_ks.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "server_config_p.h"
#include "session_p.h"

extern struct nc_server_opts server_opts;

/**
* @brief Get the pointer to an asymmetric key structure based on node's location in the YANG data.
*
Expand Down
2 changes: 0 additions & 2 deletions src/server_config_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include "server_config_p.h"
#include "session_p.h"

extern struct nc_server_opts server_opts;

/**
* @brief Get the pointer to a certificate bag structure based on node's location in the YANG data.
*
Expand Down
2 changes: 0 additions & 2 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
/* in milliseconds */
#define NC_CLOSE_REPLY_TIMEOUT 200

extern struct nc_server_opts server_opts;

void
nc_timeouttime_get(struct timespec *ts, uint32_t add_ms)
{
Expand Down
2 changes: 2 additions & 0 deletions src/session_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "session_server_ch.h"
#include "session_wrapper.h"

extern struct nc_server_opts server_opts;

/**
* Enumeration of diff operation types.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/session_server_ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
#include "session_p.h"
#include "session_wrapper.h"

extern struct nc_server_opts server_opts;

/**
* @brief Stores the private key data as a temporary file.
*
Expand Down
2 changes: 0 additions & 2 deletions src/session_server_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include "session_p.h"
#include "session_wrapper.h"

extern struct nc_server_opts server_opts;

static int
nc_server_tls_ks_ref_get_cert_key(const char *referenced_key_name, const char *referenced_cert_name,
char **privkey_data, enum nc_privkey_format *privkey_type, char **cert_data)
Expand Down
2 changes: 0 additions & 2 deletions src/session_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ struct nc_tls_verify_cb_data {
void *chain; /**< Certificate chain used to verify the client cert. */
};

extern struct nc_server_opts server_opts;

/**
* @brief Creates a new TLS session from the given configuration.
*
Expand Down

0 comments on commit b61032e

Please sign in to comment.