Module: kamailio
Branch: master
Commit: d09098cc9cb3cd0059f8e4fbff6e33eae5b9c28a
URL:
https://github.com/kamailio/kamailio/commit/d09098cc9cb3cd0059f8e4fbff6e33e…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-10-20T12:17:10+02:00
core/ip_addr: Convert SND_F_ flags to enum
Easier to recognize the correct flags in the forest of flags.
---
Modified: src/core/ip_addr.h
---
Diff:
https://github.com/kamailio/kamailio/commit/d09098cc9cb3cd0059f8e4fbff6e33e…
Patch:
https://github.com/kamailio/kamailio/commit/d09098cc9cb3cd0059f8e4fbff6e33e…
---
diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h
index b366586ca9..8e712cc307 100644
--- a/src/core/ip_addr.h
+++ b/src/core/ip_addr.h
@@ -134,9 +134,11 @@ typedef struct socket_info {
/* send flags */
-#define SND_F_FORCE_CON_REUSE 1 /* reuse an existing connection or fail */
-#define SND_F_CON_CLOSE 2 /* close the connection after sending */
-#define SND_F_FORCE_SOCKET 4 /* send socket in dst is forced */
+enum send_flags {
+ SND_F_FORCE_CON_REUSE = (1 << 0), /* reuse an existing connection or fail */
+ SND_F_CON_CLOSE = (1 << 1), /* close the connection after sending */
+ SND_F_FORCE_SOCKET = (1 << 2), /* send socket in dst is forced */
+};
typedef struct snd_flags {
unsigned short f; /* snd flags */