Module: kamailio
Branch: master
Commit: ba72724fd1c3547feccb56ae68bd8bed11a3d19a
URL:
https://github.com/kamailio/kamailio/commit/ba72724fd1c3547feccb56ae68bd8be…
Author: Morten Tryfoss <morten(a)tryfoss.no>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-02T13:10:44+01:00
cdp: Fix for undefined symbols when using older/unsupported OpenSSL
This was originaly fixed in #3601, but that did not handle the change in #3612 very well.
---
Modified: src/modules/cdp/receiver.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ba72724fd1c3547feccb56ae68bd8be…
Patch:
https://github.com/kamailio/kamailio/commit/ba72724fd1c3547feccb56ae68bd8be…
---
diff --git a/src/modules/cdp/receiver.c b/src/modules/cdp/receiver.c
index 223d14dd403..17200cf8143 100644
--- a/src/modules/cdp/receiver.c
+++ b/src/modules/cdp/receiver.c
@@ -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;
@@ -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;
}
@@ -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;
@@ -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;
}