[sr-dev] git:master:449f9faf: tls: typedef'ed several structs, enums and unions

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 20 12:40:43 CEST 2020


Module: kamailio
Branch: master
Commit: 449f9faf54238bcf1d6c1bf1b42738e79aad9bfd
URL: https://github.com/kamailio/kamailio/commit/449f9faf54238bcf1d6c1bf1b42738e79aad9bfd

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-20T12:40:06+02:00

tls: typedef'ed several structs, enums and unions

---

Modified: src/modules/tls/tls_server.h

---

Diff:  https://github.com/kamailio/kamailio/commit/449f9faf54238bcf1d6c1bf1b42738e79aad9bfd.diff
Patch: https://github.com/kamailio/kamailio/commit/449f9faf54238bcf1d6c1bf1b42738e79aad9bfd.patch

---

diff --git a/src/modules/tls/tls_server.h b/src/modules/tls/tls_server.h
index fb86bc277e..51ba176b46 100644
--- a/src/modules/tls/tls_server.h
+++ b/src/modules/tls/tls_server.h
@@ -34,25 +34,25 @@
 #include "tls_domain.h"
 #include "tls_ct_wrq.h"
 
-enum tls_conn_states {
+typedef enum tls_conn_states {
 						S_TLS_NONE = 0,
 						S_TLS_ACCEPTING,
 						S_TLS_CONNECTING,
 						S_TLS_ESTABLISHED
-					};
+					} tls_conn_states_t;
 
-struct tls_rd_buf {
+typedef struct tls_rd_buf {
 	unsigned int pos; /* current position */
 	unsigned int size; /* total size (buf) */
 	unsigned char buf[1];
-};
+} tls_rd_buf_t;
 
 /* tls conn flags */
 #define F_TLS_CON_WR_WANTS_RD    1 /* write wants read */
 #define F_TLS_CON_HANDSHAKED     2 /* connection is handshaked */
 #define F_TLS_CON_RENEGOTIATION  4 /* renegotiation by clinet */
 
-struct tls_extra_data {
+typedef struct tls_extra_data {
 	tls_domains_cfg_t* cfg; /* Configuration used for this connection */
 	SSL* ssl;               /* SSL context used for the connection */
 	BIO* rwbio;             /* bio used for read/write
@@ -62,7 +62,7 @@ struct tls_extra_data {
 	struct tls_rd_buf* enc_rd_buf;
 	unsigned int flags;
 	enum  tls_conn_states state;
-};
+} tls_extra_data_t;
 
 
 /* return true if write wants read */




More information about the sr-dev mailing list