Skip to content

Commit 1ca2f07

Browse files
committed
session wrapper BUGFIX includes depend on SSH/TLS
Fixes #525
1 parent c0bac65 commit 1ca2f07

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

src/io.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,13 @@
3838
#include "netconf.h"
3939
#include "session.h"
4040
#include "session_p.h"
41+
42+
#ifdef NC_ENABLED_SSH_TLS
43+
4144
#include "session_wrapper.h"
4245

46+
#endif /* NC_ENABLED_SSH_TLS */
47+
4348
const char *nc_msgtype2str[] = {
4449
"error",
4550
"would block",

src/server_config_util.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@
2929
#include "log_p.h"
3030
#include "session.h"
3131
#include "session_p.h"
32+
33+
#ifdef NC_ENABLED_SSH_TLS
34+
3235
#include "session_wrapper.h"
3336

37+
#endif /* NC_ENABLED_SSH_TLS */
38+
3439
int
3540
nc_server_config_create(const struct ly_ctx *ctx, struct lyd_node **tree, const char *value, const char *path_fmt, ...)
3641
{

src/session.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737

3838
#ifdef NC_ENABLED_SSH_TLS
3939

40+
#include "session_wrapper.h"
41+
4042
#include <curl/curl.h>
4143
#include <libssh/libssh.h>
42-
#include "session_wrapper.h"
4344

4445
#endif /* NC_ENABLED_SSH_TLS */
4546

src/session_p.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@
3030
#include "session_client.h"
3131
#include "session_server.h"
3232
#include "session_server_ch.h"
33+
34+
#ifdef NC_ENABLED_SSH_TLS
35+
3336
#include "session_wrapper.h"
3437

38+
#endif /* NC_ENABLED_SSH_TLS */
39+
3540
extern struct nc_server_opts server_opts;
3641

3742
/**

src/session_server.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444
#include "session_p.h"
4545
#include "session_server.h"
4646
#include "session_server_ch.h"
47-
#include "session_wrapper.h"
4847

4948
#ifdef NC_ENABLED_SSH_TLS
49+
50+
#include "session_wrapper.h"
51+
5052
#include <curl/curl.h>
5153
#include <libssh/libssh.h>
52-
#endif
54+
55+
#endif /* NC_ENABLED_SSH_TLS */
5356

5457
struct nc_server_opts server_opts = {
5558
.hello_lock = PTHREAD_RWLOCK_INITIALIZER,

src/session_wrapper.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,6 @@ void nc_tls_sans_destroy_wrap(void *sans);
267267
*/
268268
int nc_tls_get_num_sans_wrap(void *sans);
269269

270-
#ifdef NC_ENABLED_SSH_TLS
271-
272270
/**
273271
* @brief Get the SAN value and type in the context of CTN.
274272
*
@@ -280,8 +278,6 @@ int nc_tls_get_num_sans_wrap(void *sans);
280278
*/
281279
int nc_tls_get_san_value_type_wrap(void *sans, int idx, char **san_value, NC_TLS_CTN_MAPTYPE *san_type);
282280

283-
#endif
284-
285281
/**
286282
* @brief Get the number of certificates in a certificate chain.
287283
*

0 commit comments

Comments
 (0)