aboutsummaryrefslogtreecommitdiffstats
path: root/net/asterisk14
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2006-06-20 02:38:41 +0800
committersobomax <sobomax@FreeBSD.org>2006-06-20 02:38:41 +0800
commit191153d353902e581de50e2146932a63b2cfd486 (patch)
tree0316872183436149a4f65e490de095b4a6ff0bd4 /net/asterisk14
parentb9e068027430d78c39164d8e1a89d0afbfc76dce (diff)
downloadfreebsd-ports-graphics-191153d353902e581de50e2146932a63b2cfd486.tar.gz
freebsd-ports-graphics-191153d353902e581de50e2146932a63b2cfd486.tar.zst
freebsd-ports-graphics-191153d353902e581de50e2146932a63b2cfd486.zip
Merge in patch from Asterisk's ticket 7305. This patch should be part of the
next release. Requested by: Denis Shaposhnikov <dsh@vlink.ru>
Diffstat (limited to 'net/asterisk14')
-rw-r--r--net/asterisk14/files/patch-asterisk.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/net/asterisk14/files/patch-asterisk.c b/net/asterisk14/files/patch-asterisk.c
new file mode 100644
index 00000000000..fbd6dd4874c
--- /dev/null
+++ b/net/asterisk14/files/patch-asterisk.c
@@ -0,0 +1,62 @@
+
+$FreeBSD$
+
+--- asterisk.c.orig
++++ asterisk.c
+@@ -177,6 +177,7 @@
+ int fully_booted = 0;
+ char record_cache_dir[AST_CACHE_DIR_LEN] = AST_TMP_DIR;
+ char debug_filename[AST_FILENAME_MAX] = "";
++enum ast_trans_algorithm option_translation_algorithm = AST_TRANS_ALG_STRICT;
+
+ static int ast_socket = -1; /*!< UNIX Socket for allowing remote control */
+ static int ast_consock = -1; /*!< UNIX Socket for controlling another asterisk */
+@@ -1803,7 +1804,6 @@
+
+ if (option_exec && data) { /* hack to print output then exit if asterisk -rx is used */
+ char tempchar;
+-#ifdef __Darwin__
+ struct pollfd fds[0];
+ fds[0].fd = ast_consock;
+ fds[0].events = POLLIN;
+@@ -1811,9 +1811,6 @@
+ while (poll(fds, 1, 100) > 0) {
+ ast_el_read_char(el, &tempchar);
+ }
+-#else
+- while (!ast_el_read_char(el, &tempchar));
+-#endif
+ return;
+ }
+ for(;;) {
+@@ -2009,6 +2006,30 @@
+ ast_copy_string(ast_config_AST_RUN_GROUP, v->value, sizeof(ast_config_AST_RUN_GROUP));
+ }
+ v = v->next;
++ }
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ for (v = ast_variable_browse(cfg, "codec_negotiation"); v; v = v->next)
++ {
++ if (!strcasecmp(v->name, "translation_algorithm")) {
++ if (!strcasecmp(v->value, "loose") ||
++ !strcasecmp(v->value, "save_cpu") ||
++ !strcasecmp(v->value, "avoid_translation") ||
++ !strcasecmp(v->value, "asymmetric"))
++ {
++ option_translation_algorithm = AST_TRANS_ALG_LOOSE;
++ }
++/*
++ else if (!strcasecmp(v->value, "strict") ||
++ !strcasecmp(v->value, "follow_peer") ||
++ !strcasecmp(v->value, "avoid_asymmetry"))
++ {
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ }
++*/
++ else {
++ option_translation_algorithm = AST_TRANS_ALG_STRICT;
++ }
++ }
+ }
+ ast_config_destroy(cfg);
+ }