asterisk/asterisk.patch

changeset 676
7a7cc794483b
parent 414
fd611cde817f
child 712
bf4f2bc90467
equal deleted inserted replaced
10:95abb4881db8 11:18bdba3b1ba8
253 static char imapfolder[64]; 253 static char imapfolder[64];
254 +static int imapsubfold = 0; 254 +static int imapsubfold = 0;
255 static char imapparentfolder[64] = "\0"; 255 static char imapparentfolder[64] = "\0";
256 static char greetingfolder[64]; 256 static char greetingfolder[64];
257 static char authuser[32]; 257 static char authuser[32];
258 @@ -2524,7 +2525,7 @@ 258 @@ -2527,7 +2528,7 @@
259 } 259 }
260 260
261 /* Build up server information */ 261 /* Build up server information */
262 - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport); 262 - ast_build_string(&t, &left, "{%s:%s/imap", imapserver, imapport);
263 + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport); 263 + ast_build_string(&t, &left, "{%s:%s", imapserver, imapport);
264 264
265 /* Add authentication user if present */ 265 /* Add authentication user if present */
266 if (!ast_strlen_zero(authuser)) 266 if (!ast_strlen_zero(authuser))
267 @@ -6186,6 +6187,7 @@ 267 @@ -6193,6 +6194,7 @@
268 /* simple. huh? */ 268 /* simple. huh? */
269 char sequence[10]; 269 char sequence[10];
270 char mailbox[256]; 270 char mailbox[256];
271 + char folder[256]; 271 + char folder[256];
272 int res; 272 int res;
273 273
274 /* get the real IMAP message number for this message */ 274 /* get the real IMAP message number for this message */
275 @@ -6201,10 +6203,24 @@ 275 @@ -6208,10 +6210,24 @@
276 mail_setflag(vms->mailstream, sequence, "\\Unseen"); 276 mail_setflag(vms->mailstream, sequence, "\\Unseen");
277 mail_clearflag(vms->mailstream, sequence, "\\Seen"); 277 mail_clearflag(vms->mailstream, sequence, "\\Seen");
278 } 278 }
279 - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) { 279 - if (!strcasecmp(mbox(vmu, NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
280 - ast_mutex_unlock(&vms->lock); 280 - ast_mutex_unlock(&vms->lock);
297 } 297 }
298 + 298 +
299 /* Create the folder if it don't exist */ 299 /* Create the folder if it don't exist */
300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */ 300 imap_mailbox_name(mailbox, sizeof(mailbox), vms, box, 1); /* Get the full mailbox name */
301 ast_debug(5, "Checking if folder exists: %s\n", mailbox); 301 ast_debug(5, "Checking if folder exists: %s\n", mailbox);
302 @@ -10478,6 +10494,10 @@ 302 @@ -10517,6 +10533,10 @@
303 #ifndef IMAP_STORAGE 303 #ifndef IMAP_STORAGE
304 } else if (!cmd) { 304 } else if (!cmd) {
305 vms.deleted[vms.curmsg] = 1; 305 vms.deleted[vms.curmsg] = 1;
306 +#else 306 +#else
307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) { 307 + } else if (!cmd && (folder_int(vms.curbox) > 1 || box > 1)) {
308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */ 308 + vms.deleted[vms.curmsg] = 1; /* Enforce deletion after */
309 + deleted = 1; /* successful copy op */ 309 + deleted = 1; /* successful copy op */
310 #endif 310 #endif
311 } else { 311 } else {
312 vms.deleted[vms.curmsg] = 0; 312 vms.deleted[vms.curmsg] = 0;
313 @@ -11996,6 +12016,15 @@ 313 @@ -12046,6 +12066,15 @@
314 } else { 314 } else {
315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder)); 315 ast_copy_string(imapfolder, "INBOX", sizeof(imapfolder));
316 } 316 }
317 + /* IMAP saved (sub)folder location policy */ 317 + /* IMAP saved (sub)folder location policy */
318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) { 318 + if ((val = ast_variable_retrieve(cfg, "general", "imapsubfold"))) {
377 + return -1; 377 + return -1;
378 + } 378 + }
379 379
380 /* Unique ID */ 380 /* Unique ID */
381 if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0)) 381 if (!rc_avpair_add(rh, tosend, PW_ACCT_SESSION_ID, &cdr->uniqueid, strlen(cdr->uniqueid), 0))
382 Index: chan_capi-1.1.5.20120324/chan_capi20.h 382 Index: chan_capi-1.1.5.20120615/chan_capi20.h
383 diff -Nau chan_capi-1.1.5.20120324/chan_capi20.h.orig chan_capi-1.1.5.20120324/chan_capi20.h 383 diff -Nau chan_capi-1.1.5.20120615/chan_capi20.h.orig chan_capi-1.1.5.20120615/chan_capi20.h
384 --- chan_capi-1.1.5.20120324/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 384 --- chan_capi-1.1.5.20120615/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200
385 +++ chan_capi-1.1.5.20120324/chan_capi20.h 2012-03-18 17:47:07.888451260 +0100 385 +++ chan_capi-1.1.5.20120615/chan_capi20.h 2012-03-18 17:47:07.888451260 +0100
386 @@ -4,10 +4,13 @@ 386 @@ -4,10 +4,13 @@
387 * first. Else the checks below will fail. 387 * first. Else the checks below will fail.
388 */ 388 */
389 389
390 +#include <stddef.h> 390 +#include <stddef.h>
404 +#endif 404 +#endif
405 + 405 +
406 #ifndef HEADER_CID 406 #ifndef HEADER_CID
407 #define HEADER_CID(x) ((x)->adr.adrNCCI) 407 #define HEADER_CID(x) ((x)->adr.adrNCCI)
408 #endif 408 #endif
409 Index: chan_capi-1.1.5.20120324/chan_capi_utils.c 409 Index: chan_capi-1.1.5.20120615/chan_capi_utils.c
410 diff -Nau chan_capi-1.1.5.20120324/chan_capi_utils.c.orig chan_capi-1.1.5.20120324/chan_capi_utils.c 410 diff -Nau chan_capi-1.1.5.20120615/chan_capi_utils.c.orig chan_capi-1.1.5.20120615/chan_capi_utils.c
411 --- chan_capi-1.1.5.20120324/chan_capi_utils.c.orig 2011-08-07 16:31:05.000000000 +0200 411 --- chan_capi-1.1.5.20120615/chan_capi_utils.c.orig 2011-08-07 16:31:05.000000000 +0200
412 +++ chan_capi-1.1.5.20120324/chan_capi_utils.c 2012-03-18 17:47:07.888451260 +0100 412 +++ chan_capi-1.1.5.20120615/chan_capi_utils.c 2012-03-18 17:47:07.888451260 +0100
413 @@ -1160,6 +1160,9 @@ 413 @@ -1160,6 +1160,9 @@
414 { 414 {
415 MESSAGE_EXCHANGE_ERROR error; 415 MESSAGE_EXCHANGE_ERROR error;
416 int waitcount = 50; 416 int waitcount = 50;
417 +#ifndef CAPI_MANUFACTURER_LEN 417 +#ifndef CAPI_MANUFACTURER_LEN
418 +#define CAPI_MANUFACTURER_LEN 64 418 +#define CAPI_MANUFACTURER_LEN 64
419 +#endif 419 +#endif
420 unsigned char manbuf[CAPI_MANUFACTURER_LEN]; 420 unsigned char manbuf[CAPI_MANUFACTURER_LEN];
421 _cmsg CMSG; 421 _cmsg CMSG;
422 422
423 Index: chan_capi-1.1.5.20120324/libcapi20/capi20.c 423 Index: chan_capi-1.1.5.20120615/libcapi20/capi20.c
424 diff -Nau chan_capi-1.1.5.20120324/libcapi20/capi20.c.orig chan_capi-1.1.5.20120324/libcapi20/capi20.c 424 diff -Nau chan_capi-1.1.5.20120615/libcapi20/capi20.c.orig chan_capi-1.1.5.20120615/libcapi20/capi20.c
425 --- chan_capi-1.1.5.20120324/libcapi20/capi20.c.orig 2010-02-17 20:10:53.000000000 +0100 425 --- chan_capi-1.1.5.20120615/libcapi20/capi20.c.orig 2010-02-17 20:10:53.000000000 +0100
426 +++ chan_capi-1.1.5.20120324/libcapi20/capi20.c 2012-03-18 17:47:07.888451260 +0100 426 +++ chan_capi-1.1.5.20120615/libcapi20/capi20.c 2012-03-18 17:47:07.888451260 +0100
427 @@ -19,8 +19,10 @@ 427 @@ -19,8 +19,10 @@
428 #include <stdio.h> 428 #include <stdio.h>
429 #include <ctype.h> 429 #include <ctype.h>
430 #include <assert.h> 430 #include <assert.h>
431 +#ifdef __linux__ 431 +#ifdef __linux__
715 return CapiNoError; 715 return CapiNoError;
716 +#endif 716 +#endif
717 } 717 }
718 /* 718 /*
719 * functions added to the CAPI2.0 spec 719 * functions added to the CAPI2.0 spec
720 Index: chan_capi-1.1.5.20120324/libcapi20/convert.c 720 Index: chan_capi-1.1.5.20120615/libcapi20/convert.c
721 diff -Nau chan_capi-1.1.5.20120324/libcapi20/convert.c.orig chan_capi-1.1.5.20120324/libcapi20/convert.c 721 diff -Nau chan_capi-1.1.5.20120615/libcapi20/convert.c.orig chan_capi-1.1.5.20120615/libcapi20/convert.c
722 --- chan_capi-1.1.5.20120324/libcapi20/convert.c.orig 2010-09-14 21:54:25.000000000 +0200 722 --- chan_capi-1.1.5.20120615/libcapi20/convert.c.orig 2010-09-14 21:54:25.000000000 +0200
723 +++ chan_capi-1.1.5.20120324/libcapi20/convert.c 2012-03-18 17:47:07.888451260 +0100 723 +++ chan_capi-1.1.5.20120615/libcapi20/convert.c 2012-03-18 17:47:07.888451260 +0100
724 @@ -11,7 +11,14 @@ 724 @@ -11,7 +11,14 @@
725 #include <stddef.h> 725 #include <stddef.h>
726 #include <time.h> 726 #include <time.h>
727 #include <ctype.h> 727 #include <ctype.h>
728 +#ifdef __FreeBSD__ 728 +#ifdef __FreeBSD__
734 #include <byteswap.h> 734 #include <byteswap.h>
735 +#endif 735 +#endif
736 736
737 #include "capi20.h" 737 #include "capi20.h"
738 738
739 Index: chan_capi-1.1.5.20120324/Makefile 739 Index: chan_capi-1.1.5.20120615/Makefile
740 diff -Nau chan_capi-1.1.5.20120324/Makefile.orig chan_capi-1.1.5.20120324/Makefile 740 diff -Nau chan_capi-1.1.5.20120615/Makefile.orig chan_capi-1.1.5.20120615/Makefile
741 --- chan_capi-1.1.5.20120324/Makefile.orig 2011-02-04 18:41:46.000000000 +0100 741 --- chan_capi-1.1.5.20120615/Makefile.orig 2011-02-04 18:41:46.000000000 +0100
742 +++ chan_capi-1.1.5.20120324/Makefile 2012-03-18 17:47:07.888451260 +0100 742 +++ chan_capi-1.1.5.20120615/Makefile 2012-03-18 17:47:07.888451260 +0100
743 @@ -114,6 +114,9 @@ 743 @@ -115,6 +115,9 @@
744 CFLAGS+=-O2 744 CFLAGS+=-O2
745 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) 745 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
746 CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) 746 CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi)
747 +ifeq (${USE_OWN_LIBCAPI},yes) 747 +ifeq (${USE_OWN_LIBCAPI},yes)
748 +CFLAGS+=-DUSE_OWN_LIBCAPI 748 +CFLAGS+=-DUSE_OWN_LIBCAPI
752 endif 752 endif
753 Index: channels/chan_sip.c 753 Index: channels/chan_sip.c
754 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c 754 diff -Nau channels/chan_sip.c.orig channels/chan_sip.c
755 --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100 755 --- channels/chan_sip.c.orig 2012-02-28 18:53:34.000000000 +0100
756 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100 756 +++ channels/chan_sip.c 2012-03-18 17:47:07.898462166 +0100
757 @@ -12034,7 +12034,16 @@ 757 @@ -12104,7 +12104,16 @@
758 } else { 758 } else {
759 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) { 759 if (sipmethod == SIP_NOTIFY && !ast_strlen_zero(p->theirtag)) {
760 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */ 760 /* If this is a NOTIFY, use the From: tag in the subscribe (RFC 3265) */
761 - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag); 761 - snprintf(to, sizeof(to), "<%s%s>;tag=%s", (strncasecmp(p->uri, "sip:", 4) ? "sip:" : ""), p->uri, p->theirtag);
762 + if (strncasecmp(p->uri, "sip:", strlen("sip:"))) 762 + if (strncasecmp(p->uri, "sip:", strlen("sip:")))
790 "console {videodevice|videocodec" \ 790 "console {videodevice|videocodec" \
791 Index: configure 791 Index: configure
792 diff -Nau configure.orig configure 792 diff -Nau configure.orig configure
793 --- configure.orig 2012-01-14 17:40:17.000000000 +0100 793 --- configure.orig 2012-01-14 17:40:17.000000000 +0100
794 +++ configure 2012-03-18 17:47:32.518450837 +0100 794 +++ configure 2012-03-18 17:47:32.518450837 +0100
795 @@ -4716,11 +4716,6 @@ 795 @@ -4711,11 +4711,6 @@
796 esac 796 esac
797 797
798 case "${host_os}" in 798 case "${host_os}" in
799 - freebsd*) 799 - freebsd*)
800 - ac_default_prefix=/usr/local 800 - ac_default_prefix=/usr/local
802 - LDFLAGS=-L/usr/local/lib 802 - LDFLAGS=-L/usr/local/lib
803 - ;; 803 - ;;
804 openbsd*) 804 openbsd*)
805 ac_default_prefix=/usr/local 805 ac_default_prefix=/usr/local
806 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then 806 if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then
807 @@ -18904,8 +18899,8 @@ 807 @@ -18994,8 +18989,8 @@
808 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then 808 if test -f "${IMAP_TK_DIR}/c-client/LDFLAGS"; then
809 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS` 809 imap_ldflags=`cat ${IMAP_TK_DIR}/c-client/LDFLAGS`
810 fi 810 fi
811 - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a" 811 - imap_libs="${IMAP_TK_DIR}/c-client/c-client.a"
812 - imap_include="-I${IMAP_TK_DIR}/c-client" 812 - imap_include="-I${IMAP_TK_DIR}/c-client"
813 + imap_libs="-limap -lssl -lcrypto -lcrypt" 813 + imap_libs="-limap -lssl -lcrypto -lcrypt"
814 + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap" 814 + imap_include="-DUSE_SYSTEM_IMAP -I${IMAP_TK_DIR}/include/imap"
815 CPPFLAGS="${CPPFLAGS} ${imap_include}" 815 CPPFLAGS="${CPPFLAGS} ${imap_include}"
816 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}` 816 LIBS="${LIBS} ${imap_libs} "`echo ${imap_ldflags}`
817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
818 @@ -26681,7 +26676,7 @@ 818 @@ -26771,7 +26766,7 @@
819 pbxlibdir="-L${SQLITE_DIR}" 819 pbxlibdir="-L${SQLITE_DIR}"
820 fi 820 fi
821 fi 821 fi
822 - pbxfuncname="sqlite_exec" 822 - pbxfuncname="sqlite_exec"
823 + pbxfuncname="sqlite3_exec" 823 + pbxfuncname="sqlite3_exec"
826 else 826 else
827 Index: formats/format_pcm.c 827 Index: formats/format_pcm.c
828 diff -Nau formats/format_pcm.c.orig formats/format_pcm.c 828 diff -Nau formats/format_pcm.c.orig formats/format_pcm.c
829 --- formats/format_pcm.c.orig 2011-07-14 22:13:06.000000000 +0200 829 --- formats/format_pcm.c.orig 2011-07-14 22:13:06.000000000 +0200
830 +++ formats/format_pcm.c 2012-03-18 17:47:07.898462166 +0100 830 +++ formats/format_pcm.c 2012-03-18 17:47:07.898462166 +0100
831 @@ -354,6 +354,7 @@ 831 @@ -376,6 +376,7 @@
832 ast_log(LOG_WARNING, "Unable to write header\n"); 832 ast_log(LOG_WARNING, "Unable to write header\n");
833 return -1; 833 return -1;
834 } 834 }
835 + fflush(f); /* issues.asterisk.org bug 0016610 */ 835 + fflush(f); /* issues.asterisk.org bug 0016610 */
836 return 0; 836 return 0;
838 838
839 Index: formats/format_wav.c 839 Index: formats/format_wav.c
840 diff -Nau formats/format_wav.c.orig formats/format_wav.c 840 diff -Nau formats/format_wav.c.orig formats/format_wav.c
841 --- formats/format_wav.c.orig 2011-11-09 16:25:33.000000000 +0100 841 --- formats/format_wav.c.orig 2011-11-09 16:25:33.000000000 +0100
842 +++ formats/format_wav.c 2012-03-18 17:47:07.898462166 +0100 842 +++ formats/format_wav.c 2012-03-18 17:47:07.898462166 +0100
843 @@ -308,6 +308,7 @@ 843 @@ -310,6 +310,7 @@
844 ast_log(LOG_WARNING, "Unable to write header\n"); 844 ast_log(LOG_WARNING, "Unable to write header\n");
845 return -1; 845 return -1;
846 } 846 }
847 + fflush(f); /* issues.asterisk.org bug 0016610 */ 847 + fflush(f); /* issues.asterisk.org bug 0016610 */
848 return 0; 848 return 0;
889 /* 889 /*
890 Index: main/features.c 890 Index: main/features.c
891 diff -Nau main/features.c.orig main/features.c 891 diff -Nau main/features.c.orig main/features.c
892 --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100 892 --- main/features.c.orig 2012-01-23 21:30:21.000000000 +0100
893 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100 893 +++ main/features.c 2012-03-18 17:47:07.898462166 +0100
894 @@ -2067,6 +2067,10 @@ 894 @@ -2127,6 +2127,10 @@
895 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename); 895 snprintf(args, len, "%s,%s,m", S_OR(touch_format, "wav"), touch_filename);
896 } 896 }
897 897
898 + for(x = 0; x < strlen(touch_filename); x++) { 898 + for(x = 0; x < strlen(touch_filename); x++) {
899 + if (args[x] == '/') 899 + if (args[x] == '/')
900 + args[x] = '-'; 900 + args[x] = '-';
901 + } 901 + }
902 for(x = 0; x < strlen(args); x++) { 902 for(x = 0; x < strlen(args); x++) {
903 if (args[x] == '/') 903 if (args[x] == '/')
904 args[x] = '-'; 904 args[x] = '-';
905 @@ -2183,6 +2187,10 @@ 905 @@ -2239,6 +2243,10 @@
906 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav")); 906 snprintf(args, len, "%s.%s,b", touch_filename, S_OR(touch_format, "wav"));
907 } 907 }
908 908
909 + for( x = 0; x < strlen(touch_filename); x++) { 909 + for( x = 0; x < strlen(touch_filename); x++) {
910 + if (args[x] == '/') 910 + if (args[x] == '/')
911 + args[x] = '-'; 911 + args[x] = '-';
912 + } 912 + }
913 for( x = 0; x < strlen(args); x++) { 913 for( x = 0; x < strlen(args); x++) {
914 if (args[x] == '/') 914 if (args[x] == '/')
915 args[x] = '-'; 915 args[x] = '-';
916 Index: main/file.c 916 Index: main/file.c
917 diff -Nau main/file.c.orig main/file.c 917 diff -Nau main/file.c.orig main/file.c
918 --- main/file.c.orig 2012-01-05 23:06:46.000000000 +0100 918 --- main/file.c.orig 2012-01-05 23:06:46.000000000 +0100
919 +++ main/file.c 2012-03-18 17:47:07.898462166 +0100 919 +++ main/file.c 2012-03-18 17:47:07.898462166 +0100
920 @@ -256,7 +256,7 @@ 920 @@ -260,7 +260,7 @@
921 char *fn = NULL; 921 char *fn = NULL;
922 922
923 if (!strcmp(ext, "wav49")) 923 if (!strcmp(ext, "wav49"))
924 - ext = "WAV"; 924 - ext = "WAV";
925 + ext = "wav"; 925 + ext = "wav";
928 if (asprintf(&fn, "%s.%s", filename, ext) < 0) { 928 if (asprintf(&fn, "%s.%s", filename, ext) < 0) {
929 Index: main/Makefile 929 Index: main/Makefile
930 diff -Nau main/Makefile.orig main/Makefile 930 diff -Nau main/Makefile.orig main/Makefile
931 --- main/Makefile.orig 2011-09-19 22:27:03.000000000 +0200 931 --- main/Makefile.orig 2011-09-19 22:27:03.000000000 +0200
932 +++ main/Makefile 2012-03-18 17:47:07.898462166 +0100 932 +++ main/Makefile 2012-03-18 17:47:07.898462166 +0100
933 @@ -69,10 +69,7 @@ 933 @@ -66,10 +66,7 @@
934 endif 934 endif
935 935
936 ifeq ($(OSARCH),FreeBSD) 936 ifeq ($(OSARCH),FreeBSD)
937 - # -V is understood by BSD Make, not by GNU make. 937 - # -V is understood by BSD Make, not by GNU make.
938 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 938 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
944 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) 944 ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
945 Index: main/tcptls.c 945 Index: main/tcptls.c
946 diff -Nau main/tcptls.c.orig main/tcptls.c 946 diff -Nau main/tcptls.c.orig main/tcptls.c
947 --- main/tcptls.c.orig 2011-11-30 22:41:31.000000000 +0100 947 --- main/tcptls.c.orig 2011-11-30 22:41:31.000000000 +0100
948 +++ main/tcptls.c 2012-03-18 17:47:07.898462166 +0100 948 +++ main/tcptls.c 2012-03-18 17:47:07.898462166 +0100
949 @@ -372,6 +372,7 @@ 949 @@ -391,6 +391,7 @@
950 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { 950 if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) {
951 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) 951 if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0)
952 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); 952 ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath);
953 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); 953 + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL));
954 } 954 }
956 ast_verb(0, "SSL certificate ok\n"); 956 ast_verb(0, "SSL certificate ok\n");
957 Index: main/udptl.c 957 Index: main/udptl.c
958 diff -Nau main/udptl.c.orig main/udptl.c 958 diff -Nau main/udptl.c.orig main/udptl.c
959 --- main/udptl.c.orig 2011-10-06 19:49:38.000000000 +0200 959 --- main/udptl.c.orig 2011-10-06 19:49:38.000000000 +0200
960 +++ main/udptl.c 2012-03-18 17:47:07.898462166 +0100 960 +++ main/udptl.c 2012-03-18 17:47:07.898462166 +0100
961 @@ -98,6 +98,18 @@ 961 @@ -101,6 +101,18 @@
962 962
963 #define UDPTL_BUF_MASK 15 963 #define UDPTL_BUF_MASK 15
964 964
965 +/*! Copied from chan_oss.c, corrects link errors: 965 +/*! Copied from chan_oss.c, corrects link errors:
966 +udptl.o: In function `calculate_local_max_datagram': 966 +udptl.o: In function `calculate_local_max_datagram':
979 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM]; 979 uint8_t buf[LOCAL_FAX_MAX_DATAGRAM];
980 Index: Makefile 980 Index: Makefile
981 diff -Nau Makefile.orig Makefile 981 diff -Nau Makefile.orig Makefile
982 --- Makefile.orig 2011-10-05 00:54:15.000000000 +0200 982 --- Makefile.orig 2011-10-05 00:54:15.000000000 +0200
983 +++ Makefile 2012-03-18 17:47:07.898462166 +0100 983 +++ Makefile 2012-03-18 17:47:07.898462166 +0100
984 @@ -230,15 +230,6 @@ 984 @@ -186,12 +186,6 @@
985 _ASTCFLAGS+=-fsigned-char 985 _ASTCFLAGS+=-isystem /usr/local/include
986 endif 986 endif
987 987
988 -ifeq ($(OSARCH),FreeBSD) 988 -ifeq ($(OSARCH),FreeBSD)
989 - ifeq ($(PROC),i386)
990 - _ASTCFLAGS+=-march=i686
991 - endif
992 - # -V is understood by BSD Make, not by GNU make. 989 - # -V is understood by BSD Make, not by GNU make.
993 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) 990 - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk)
994 - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) 991 - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi)
995 -endif 992 -endif
996 - 993 -

mercurial