Skip to content

Commit

Permalink
cdp: Fix for undefined symbols when using older/unsupported OpenSSL
Browse files Browse the repository at this point in the history
This was originaly fixed in #3601, but that did not handle the change in #3612 very well.
  • Loading branch information
mtryfoss authored and miconda committed Nov 2, 2023
1 parent 02dd4e2 commit ba72724
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/modules/cdp/receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ void receiver_process(peer *p)

static inline int do_read(serviced_peer_t *sp, char *dst, int n)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
int cnt, ssl_err;
char *err_str;

Expand All @@ -547,6 +548,11 @@ static inline int do_read(serviced_peer_t *sp, char *dst, int n)
} else {
cnt = recv(sp->tcp_socket, dst, n, 0);
}
#else
int cnt;

cnt = recv(sp->tcp_socket, dst, n, 0);
#endif
return cnt;
}

Expand Down Expand Up @@ -684,6 +690,7 @@ static inline int do_receive(serviced_peer_t *sp)

static int do_write(serviced_peer_t *sp, const void *buf, int num)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
int cnt, ssl_err;
char *err_str;

Expand All @@ -698,6 +705,11 @@ static int do_write(serviced_peer_t *sp, const void *buf, int num)
} else {
cnt = write(sp->tcp_socket, buf, num);
}
#else
int cnt;

cnt = write(sp->tcp_socket, buf, num);
#endif
return cnt;
}

Expand Down

0 comments on commit ba72724

Please sign in to comment.