summaryrefslogtreecommitdiff
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2015-12-12 10:08:50 -0700
committerGeorge Joseph <george.joseph@fairview5.com>2015-12-12 11:16:08 -0600
commit3e6637feb581fd8488227e78ae4823be560aafce (patch)
tree70a42a498ddd5d3372691a5fd8c942df30d2a15c /include/asterisk/utils.h
parentceebdfce40d278d17ecfb82afdffc41a8cc1cc94 (diff)
pjsip/config_transport: Check pjproject version at runtime for async ops
pjproject < 2.5.0 will segfault on a tls transport if async_operations is greater than 1. A runtime version check has been added to throw an error if the version is < 2.5.0 and async_operations > 1. To assist in the check, a new api "ast_compare_versions" was added to utils which compares 2 major.minor.patch.extra version strings. ASTERISK-25615 #close Change-Id: I8e88bb49cbcfbca88d9de705496d6f6a8c938a98 Reported-by: George Joseph Tested-by: George Joseph
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r--include/asterisk/utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 832500c31..cfb78c027 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -1099,4 +1099,16 @@ int ast_crypt_validate(const char *key, const char *expected);
*/
int ast_file_is_readable(const char *filename);
+/*
+ * \brief Compare 2 major.minor.patch.extra version strings.
+ * \since 13.7.0
+ *
+ * \param version1.
+ * \param version2.
+ * \return -1 if version 1 < version 2.
+ * \return 0 if version 1 = version 2.
+ * \return 1 if version 1 > version 2.
+ */
+int ast_compare_versions(const char *version1, const char *version2);
+
#endif /* _ASTERISK_UTILS_H */