michael@310: Index: Makefile michael@310: --- Makefile.orig 2010-06-10 22:35:06.000000000 +0200 michael@310: +++ Makefile 2010-07-24 11:16:19.000000000 +0200 michael@310: @@ -126,40 +126,18 @@ michael@202: michael@310: # Define standard directories for various platforms michael@310: # These apply if they are not redefined in asterisk.conf michael@310: -ifeq ($(OSARCH),SunOS) michael@310: - ASTETCDIR=/var/etc/asterisk michael@310: - ASTLIBDIR=/opt/asterisk/lib michael@310: - ASTVARLIBDIR=/var/opt/asterisk michael@310: - ASTDBDIR=$(ASTVARLIBDIR) michael@310: - ASTKEYDIR=$(ASTVARLIBDIR) michael@310: - ASTSPOOLDIR=/var/spool/asterisk michael@310: - ASTLOGDIR=/var/log/asterisk michael@310: - ASTHEADERDIR=/opt/asterisk/include michael@310: - ASTSBINDIR=/opt/asterisk/sbin michael@310: - ASTVARRUNDIR=/var/run/asterisk michael@310: - ASTMANDIR=/opt/asterisk/man michael@310: -else michael@310: ASTETCDIR=$(sysconfdir)/asterisk michael@310: ASTLIBDIR=$(libdir)/asterisk michael@310: ASTHEADERDIR=$(includedir)/asterisk michael@310: ASTSBINDIR=$(sbindir) michael@310: - ASTSPOOLDIR=$(localstatedir)/spool/asterisk michael@310: - ASTLOGDIR=$(localstatedir)/log/asterisk michael@310: - ASTVARRUNDIR=$(localstatedir)/run/asterisk michael@310: + ASTSPOOLDIR=$(localstatedir)/spool michael@310: + ASTLOGDIR=$(localstatedir)/log michael@310: + ASTVARRUNDIR=$(localstatedir)/run michael@310: ASTMANDIR=$(mandir) michael@310: -ifneq ($(findstring BSD,$(OSARCH)),) michael@310: - ASTVARLIBDIR=$(prefix)/share/asterisk michael@310: - ASTVARRUNDIR=$(localstatedir)/run/asterisk michael@310: - ASTDBDIR=$(localstatedir)/db/asterisk michael@310: -else michael@310: - ASTVARLIBDIR=$(localstatedir)/lib/asterisk michael@310: - ASTDBDIR=$(ASTVARLIBDIR) michael@310: -endif michael@310: + ASTVARLIBDIR=$(localstatedir)/lib michael@310: + ASTDBDIR=$(localstatedir)/db michael@310: ASTKEYDIR=$(ASTVARLIBDIR) michael@310: -endif michael@310: -ifeq ($(ASTDATADIR),) michael@310: ASTDATADIR:=$(ASTVARLIBDIR) michael@310: -endif michael@202: michael@310: # Asterisk.conf is located in ASTETCDIR or by using the -C flag michael@310: # when starting Asterisk michael@310: @@ -259,12 +237,6 @@ michael@310: _ASTCFLAGS+=-fsigned-char michael@310: endif michael@202: michael@310: -ifeq ($(OSARCH),FreeBSD) michael@310: - # -V is understood by BSD Make, not by GNU make. michael@310: - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) michael@310: - _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) michael@310: -endif michael@202: - michael@310: ifeq ($(OSARCH),NetBSD) michael@310: _ASTCFLAGS+=-pthread -I/usr/pkg/include michael@310: endif michael@310: @@ -567,8 +539,7 @@ michael@310: fi michael@310: mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation michael@310: mkdir -p $(DESTDIR)$(ASTDATADIR)/documentation/thirdparty michael@310: - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv michael@310: - mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom michael@310: + mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr michael@310: mkdir -p $(DESTDIR)$(ASTDATADIR)/keys michael@310: mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware michael@310: mkdir -p $(DESTDIR)$(ASTDATADIR)/firmware/iax michael@310: Index: apps/app_backticks.c michael@310: --- apps/app_backticks.c.orig 2010-07-24 11:12:31.000000000 +0200 michael@310: +++ apps/app_backticks.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -0,0 +1,129 @@ michael@202: + michael@202: +#include "asterisk.h" michael@202: + michael@310: +ASTERISK_FILE_VERSION(__FILE__, "$Revision: 1.53 $") michael@202: + michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@310: +#include michael@202: + michael@310: +static char *app = "BackTicks"; michael@310: +static char *synopsis = "Execute a shell command and save the result as a variable."; michael@310: +static char *desc = " Backticks(|)\n\n" michael@310: + "Be sure to include a full path to the command!\n"; michael@202: + michael@310: +static char *do_backticks(char *command, char *buf, size_t len) michael@310: +{ michael@310: + int fds[2], pid = 0; michael@310: + char *ret = NULL; michael@202: + michael@310: + memset(buf, 0, len); michael@310: + if (pipe(fds)) { michael@310: + ast_log(LOG_WARNING, "Pipe/Exec failed\n"); michael@310: + } else { michael@310: + pid = fork(); michael@310: + if (pid < 0) { michael@310: + ast_log(LOG_WARNING, "Fork failed\n"); michael@310: + close(fds[0]); michael@310: + close(fds[1]); michael@310: + } else if (pid) { michael@310: + /* parent */ michael@310: + close(fds[1]); michael@310: + read(fds[0], buf, len); michael@310: + close(fds[0]); michael@310: + ret = buf; michael@310: + } else { michael@310: + /* child */ michael@310: + char *argv[255] = {0}; michael@310: + int argc = 0; michael@310: + char *p; michael@310: + char *mycmd = ast_strdupa(command); michael@310: + close(fds[0]); michael@310: + dup2(fds[1], STDOUT_FILENO); michael@310: + argv[argc++] = mycmd; michael@310: + do { michael@310: + if ((p = strchr(mycmd, ' '))) { michael@310: + *p = '\0'; michael@310: + mycmd = ++p; michael@310: + argv[argc++] = mycmd; michael@310: + } michael@310: + } while (p != NULL); michael@310: + close(fds[1]); michael@310: + execv(argv[0], argv); michael@310: + ast_log(LOG_ERROR, "exec of %s failed\n", argv[0]); michael@310: + exit(0); michael@310: + } michael@310: + } michael@310: + return ret; michael@202: +} michael@202: + michael@310: +static int backticks_exec(struct ast_channel *chan, void *data) michael@202: +{ michael@310: + int res = 0; michael@310: + const char *usage = "Usage: Backticks(|)"; michael@310: + char buf[1024], *argv[2], *mydata; michael@310: + int argc = 0; michael@310: + michael@310: + if (!data) { michael@310: + ast_log(LOG_WARNING, "%s\n", usage); michael@310: + return -1; michael@310: + } michael@310: + ast_autoservice_start(chan); michael@310: + if (!(mydata = ast_strdupa(data))) { michael@310: + ast_log(LOG_ERROR, "Memory Error!\n"); michael@310: + res = -1; michael@310: + } else { michael@310: + if((argc = ast_app_separate_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]))) < 2) { michael@310: + ast_log(LOG_WARNING, "%s\n", usage); michael@310: + res = -1; michael@310: + } michael@310: + if (do_backticks(argv[1], buf, sizeof(buf))) michael@310: + pbx_builtin_setvar_helper(chan, argv[0], buf); michael@310: + else { michael@310: + ast_log(LOG_WARNING, "No Data!\n"); michael@310: + res = -1; michael@310: + } michael@310: + } michael@310: + ast_autoservice_stop(chan); michael@310: + return res; michael@202: +} michael@202: + michael@310: +static int function_backticks(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) michael@202: +{ michael@310: + if (!do_backticks(data, buf, len)) { michael@310: + ast_log(LOG_WARNING, "No Data!\n"); michael@310: + return -1; michael@310: + } michael@310: + return 0; michael@202: +} michael@202: + michael@310: +static struct ast_custom_function backticks_function = { michael@310: + .name = "BACKTICKS", michael@310: + .desc = "Executes a shell command and evaluates to the result.", michael@310: + .syntax = "BACKTICKS()", michael@310: + .synopsis = "Executes a shell command.", michael@310: + .read = function_backticks michael@202: +}; michael@202: + michael@202: +static int unload_module(void) michael@202: +{ michael@310: + ast_custom_function_unregister(&backticks_function); michael@310: + return ast_unregister_application(app); michael@202: +} michael@202: + michael@202: +static int load_module(void) michael@202: +{ michael@310: + ast_custom_function_register(&backticks_function); michael@310: + return ast_register_application(app, backticks_exec, synopsis, desc); michael@202: +} michael@202: + michael@310: +AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "BACKTICKS() dialplan function"); michael@202: + michael@310: Index: apps/app_meetme.c michael@310: --- apps/app_meetme.c.orig 2010-06-23 23:15:53.000000000 +0200 michael@310: +++ apps/app_meetme.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -522,6 +522,7 @@ michael@310: CONFFLAG_DURATION_LIMIT = (1 << 30), michael@310: /*! Do not write any audio to this channel until the state is up. */ michael@310: CONFFLAG_NO_AUDIO_UNTIL_UP = (1 << 31), michael@310: + CONFFLAG_USERNAME = (1 << 31), michael@310: }; michael@310: michael@310: enum { michael@310: @@ -531,6 +532,7 @@ michael@310: OPT_ARG_DURATION_LIMIT = 3, michael@310: OPT_ARG_MOH_CLASS = 4, michael@310: OPT_ARG_ARRAY_SIZE = 5, michael@310: + OPT_ARG_USERNAME = 6, michael@310: }; michael@310: michael@310: AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS michael@310: @@ -563,6 +565,7 @@ michael@310: AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ), michael@310: AST_APP_OPTION_ARG('S', CONFFLAG_DURATION_STOP, OPT_ARG_DURATION_STOP), michael@310: AST_APP_OPTION_ARG('L', CONFFLAG_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT), michael@310: + AST_APP_OPTION_ARG('n', CONFFLAG_USERNAME, OPT_ARG_USERNAME), michael@310: END_OPTIONS ); michael@310: michael@310: static const char *app = "MeetMe"; michael@310: @@ -2243,6 +2246,12 @@ michael@310: if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) { michael@310: char destdir[PATH_MAX]; michael@310: michael@310: + if ( (confflags & CONFFLAG_USERNAME) michael@310: + && !ast_strlen_zero(optargs[OPT_ARG_USERNAME]) michael@310: + && ast_fileexists(optargs[OPT_ARG_USERNAME], NULL, NULL)) michael@310: + snprintf(destdir, sizeof(destdir), "%s", optargs[OPT_ARG_USERNAME]); michael@310: + else { michael@202: + michael@310: snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR); michael@310: michael@310: if (ast_mkdir(destdir, 0777) != 0) { michael@310: @@ -2259,6 +2268,7 @@ michael@310: res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL); michael@310: if (res == -1) michael@310: goto outrun; michael@310: + } michael@310: } michael@310: michael@310: ast_mutex_lock(&conf->playlock); michael@310: Index: build_tools/make_defaults_h michael@310: --- build_tools/make_defaults_h.orig 2008-01-24 23:58:10.000000000 +0100 michael@310: +++ build_tools/make_defaults_h 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -17,7 +17,7 @@ michael@310: #define DEFAULT_PID "${INSTALL_PATH}${ASTVARRUNDIR}/asterisk.pid" michael@310: michael@310: #define DEFAULT_VAR_DIR "${INSTALL_PATH}${ASTVARLIBDIR}" michael@310: -#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/astdb" michael@310: +#define DEFAULT_DB "${INSTALL_PATH}${ASTDBDIR}/asterisk.db" michael@310: michael@310: #define DEFAULT_DATA_DIR "${INSTALL_PATH}${ASTDATADIR}" michael@310: #define DEFAULT_KEY_DIR "${INSTALL_PATH}${ASTDATADIR}/keys" michael@310: Index: cdr/cdr_custom.c michael@310: --- cdr/cdr_custom.c.orig 2008-11-20 18:48:58.000000000 +0100 michael@310: +++ cdr/cdr_custom.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -83,7 +83,7 @@ michael@310: ast_log(LOG_WARNING, "Format string too long, will be truncated, at line %d\n", var->lineno); michael@310: ast_copy_string(format, var->value, sizeof(format) - 1); michael@310: strcat(format,"\n"); michael@310: - snprintf(master, sizeof(master),"%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name); michael@310: + snprintf(master, sizeof(master),"%s/cdr/%s", ast_config_AST_LOG_DIR, var->name); michael@310: if (var->next) { michael@310: ast_log(LOG_NOTICE, "Sorry, only one mapping is supported at this time, mapping '%s' will be ignored at line %d.\n", var->next->name, var->next->lineno); michael@310: break; michael@310: Index: cdr/cdr_sqlite3_custom.c michael@310: --- cdr/cdr_sqlite3_custom.c.orig 2010-04-13 18:38:41.000000000 +0200 michael@310: +++ cdr/cdr_sqlite3_custom.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -300,7 +300,7 @@ michael@310: } michael@310: michael@310: /* is the database there? */ michael@310: - snprintf(filename, sizeof(filename), "%s/master.db", ast_config_AST_LOG_DIR); michael@310: + snprintf(filename, sizeof(filename), "%s/cdr/master.db", ast_config_AST_LOG_DIR); michael@310: res = sqlite3_open(filename, &db); michael@310: if (res != SQLITE_OK) { michael@310: ast_log(LOG_ERROR, "Could not open database %s.\n", filename); michael@310: Index: chan_capi-1.1.5/Makefile michael@310: --- chan_capi-1.1.5/Makefile.orig 2010-04-06 19:33:25.000000000 +0200 michael@310: +++ chan_capi-1.1.5/Makefile 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -100,6 +100,9 @@ michael@310: CFLAGS+=-O2 michael@310: CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) michael@310: CFLAGS+=$(shell if uname -m | grep -q "ppc\|arm\|s390"; then echo "-fsigned-char"; fi) michael@310: +ifeq (${USE_OWN_LIBCAPI},yes) michael@310: +CFLAGS+=-DUSE_OWN_LIBCAPI michael@310: +endif michael@310: michael@310: LIBS=-ldl -lpthread -lm michael@310: CC=gcc michael@310: Index: chan_capi-1.1.5/chan_capi20.h michael@310: --- chan_capi-1.1.5/chan_capi20.h.orig 2005-09-20 20:33:40.000000000 +0200 michael@310: +++ chan_capi-1.1.5/chan_capi20.h 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -8,6 +8,8 @@ michael@310: michael@310: #undef CAPI_OS_HINT michael@310: michael@310: +#ifndef USE_OWN_LIBCAPI michael@310: + michael@310: #if (defined(__FreeBSD__) || defined(__OpenBSD__) || \ michael@310: defined(__NetBSD__) || defined(__APPLE__)) michael@310: michael@310: @@ -29,6 +31,8 @@ michael@310: #include michael@310: #endif /* BSD */ michael@310: michael@202: +#endif michael@202: + michael@310: #ifndef HEADER_CID michael@310: #define HEADER_CID(x) ((x)->adr.adrNCCI) michael@310: #endif michael@310: Index: chan_capi-1.1.5/chan_capi_utils.c michael@310: --- chan_capi-1.1.5/chan_capi_utils.c.orig 2010-04-06 19:33:25.000000000 +0200 michael@310: +++ chan_capi-1.1.5/chan_capi_utils.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -1087,6 +1087,9 @@ michael@310: { michael@310: MESSAGE_EXCHANGE_ERROR error; michael@310: int waitcount = 50; michael@310: +#ifndef CAPI_MANUFACTURER_LEN michael@310: +#define CAPI_MANUFACTURER_LEN 64 michael@310: +#endif michael@310: unsigned char manbuf[CAPI_MANUFACTURER_LEN]; michael@310: _cmsg CMSG; michael@310: michael@310: Index: chan_capi-1.1.5/libcapi20/capi20.c michael@310: --- chan_capi-1.1.5/libcapi20/capi20.c.orig 2010-04-06 19:33:25.000000000 +0200 michael@310: +++ chan_capi-1.1.5/libcapi20/capi20.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -19,8 +19,10 @@ michael@310: #include michael@310: #include michael@310: #include michael@310: +#ifdef __linux__ michael@310: #define _LINUX_LIST_H michael@310: #include michael@310: +#endif michael@310: michael@310: #include michael@310: #include michael@310: @@ -48,17 +50,23 @@ michael@310: michael@310: #define SEND_BUFSIZ (128+2048) michael@310: michael@202: +#if 0 michael@310: static char capidevname[] = "/dev/capi20"; michael@310: static char capidevnamenew[] = "/dev/isdn/capi20"; michael@310: +#endif michael@310: michael@310: static int capi_fd = -1; michael@310: +#if 0 michael@310: static capi_ioctl_struct ioctl_data; michael@310: +#endif michael@310: michael@310: static int remote_capi; michael@310: +#if 0 michael@310: static char *globalconfigfilename = "/etc/capi20.conf"; michael@310: static char *userconfigfilename = ".capi20rc"; michael@310: static unsigned short int port; michael@310: static char hostname[1024]; michael@310: +#endif michael@310: static int tracelevel; michael@310: static char *tracefile; michael@310: michael@310: @@ -77,17 +85,21 @@ michael@310: #define RCAPI_AUTH_USER_REQ CAPICMD(0xff, 0x00) michael@310: #define RCAPI_AUTH_USER_CONF CAPICMD(0xff, 0x01) michael@310: michael@310: +#if 0 michael@310: static char *skip_whitespace(char *s) michael@310: { michael@310: while (*s && isspace(*s)) s++; michael@310: return s; michael@310: } michael@310: +#endif michael@310: michael@310: +#if 0 michael@310: static char *skip_nonwhitespace(char *s) michael@310: { michael@310: while (*s && !isspace(*s)) s++; michael@310: return s; michael@310: } michael@310: +#endif michael@310: michael@310: static unsigned char get_byte(unsigned char **p) michael@310: { michael@310: @@ -95,10 +107,12 @@ michael@310: return((unsigned char)*(*p - 1)); michael@310: } michael@310: michael@310: +#if 0 michael@310: static unsigned short get_word(unsigned char **p) michael@310: { michael@310: return(get_byte(p) | (get_byte(p) << 8)); michael@310: } michael@310: +#endif michael@310: michael@310: static unsigned short get_netword(unsigned char **p) michael@310: { michael@310: @@ -144,6 +158,7 @@ michael@310: * read config file michael@310: */ michael@310: michael@310: +#if 0 michael@310: static int read_config(void) michael@310: { michael@310: FILE *fp = NULL; michael@310: @@ -197,11 +212,13 @@ michael@310: fclose(fp); michael@310: return(1); michael@310: } michael@310: +#endif michael@310: michael@310: /* michael@310: * socket function michael@310: */ michael@310: michael@310: +#if 0 michael@310: static int open_socket(void) michael@310: { michael@310: int fd; michael@310: @@ -225,6 +242,7 @@ michael@310: close(fd); michael@310: return(-1); michael@310: } michael@310: +#endif michael@310: michael@310: static int socket_read(int fd, unsigned char *buf, int l) michael@310: { michael@310: @@ -328,6 +346,8 @@ michael@310: if (likely(capi_fd >= 0)) michael@310: return CapiNoError; michael@310: michael@310: +#if 0 michael@310: + michael@310: /*----- open managment link -----*/ michael@310: if (read_config() && (remote_capi)) { michael@310: capi_fd = open_socket(); michael@310: @@ -347,6 +367,8 @@ michael@310: if (ioctl(capi_fd, CAPI_INSTALLED, 0) == 0) michael@310: return CapiNoError; michael@310: michael@202: +#endif michael@202: + michael@310: return CapiRegNotInstalled; michael@310: } michael@310: michael@310: @@ -421,6 +443,7 @@ michael@310: unsigned char *bufferstart; michael@310: }; michael@310: michael@310: +#if 0 michael@310: static struct applinfo *alloc_buffers( michael@310: unsigned MaxB3Connection, michael@310: unsigned MaxB3Blks, michael@310: @@ -459,6 +482,7 @@ michael@310: ap->lastfree->next = 0; michael@310: return ap; michael@310: } michael@202: +#endif michael@310: michael@310: static void free_buffers(struct applinfo *ap) michael@310: { michael@310: @@ -576,14 +600,17 @@ michael@310: unsigned MaxSizeB3, michael@310: unsigned *ApplID) michael@310: { michael@310: +#if 0 michael@310: int applid = 0; michael@310: char buf[PATH_MAX]; michael@310: int i, fd = -1; michael@310: michael@310: *ApplID = 0; michael@310: +#endif michael@310: michael@310: if (capi20_isinstalled() != CapiNoError) michael@310: return CapiRegNotInstalled; michael@310: +#if 0 michael@310: if ((!remote_capi) || ((remote_capi) && ((fd = open_socket()) < 0))) { michael@310: if ((fd = open(capidevname, O_RDWR|O_NONBLOCK, 0666)) < 0 && michael@310: (errno == ENOENT)) { michael@310: @@ -621,6 +648,8 @@ michael@310: close(fd); michael@310: return(errcode); michael@310: } michael@310: + } michael@310: +#if 0 michael@310: } else if ((applid = ioctl(fd, CAPI_REGISTER, &ioctl_data)) < 0) { michael@310: if (errno == EIO) { michael@310: if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { michael@310: @@ -666,6 +695,7 @@ michael@310: applid = alloc_applid(fd); michael@310: } // end old driver compatibility michael@310: } michael@310: +#endif michael@310: if (remember_applid(applid, fd) < 0) { michael@310: close(fd); michael@310: return CapiRegOSResourceErr; michael@310: @@ -676,6 +706,7 @@ michael@310: return CapiRegOSResourceErr; michael@310: } michael@310: *ApplID = applid; michael@310: +#endif michael@310: return CapiNoError; michael@310: } michael@310: michael@310: @@ -784,11 +815,15 @@ michael@310: ret = CapiIllAppNr; michael@310: break; michael@310: case EIO: michael@310: +#if 0 michael@310: if (ioctl(fd, CAPI_GET_ERRCODE, &ioctl_data) < 0) { michael@310: +#endif michael@310: ret = CapiMsgOSResourceErr; michael@310: +#if 0 michael@310: } else { michael@310: ret = (unsigned)ioctl_data.errcode; michael@310: } michael@310: +#endif michael@310: break; michael@310: default: michael@310: ret = CapiMsgOSResourceErr; michael@310: @@ -842,7 +877,7 @@ michael@310: rcvbuf[15] = (data >> 24) & 0xff; michael@310: } else { michael@310: u_int64_t data; michael@310: - ulong radr = (ulong)rcvbuf; michael@310: + unsigned long radr = (unsigned long)rcvbuf; michael@310: if (CAPIMSG_LEN(rcvbuf) < 30) { michael@310: /* michael@310: * grr, 64bit arch, but no data64 included, michael@310: @@ -899,6 +934,9 @@ michael@310: { michael@310: if (capi20_isinstalled() != CapiNoError) michael@310: return 0; michael@310: +#ifndef CAPI_MANUFACTURER_LEN michael@310: +#define CAPI_MANUFACTURER_LEN 64 michael@310: +#endif michael@310: michael@310: if (remote_capi) { michael@310: unsigned char buf[100]; michael@310: @@ -911,15 +949,19 @@ michael@310: return Buf; michael@310: } michael@310: michael@310: +#if 0 michael@310: ioctl_data.contr = Ctrl; michael@310: michael@310: if (ioctl(capi_fd, CAPI_GET_MANUFACTURER, &ioctl_data) < 0) michael@310: +#endif michael@310: return 0; michael@310: michael@310: +#if 0 michael@310: memcpy(Buf, ioctl_data.manufacturer, CAPI_MANUFACTURER_LEN); michael@310: Buf[CAPI_MANUFACTURER_LEN-1] = 0; michael@310: michael@310: return Buf; michael@310: +#endif michael@310: } michael@310: michael@310: unsigned char * michael@310: @@ -934,16 +976,20 @@ michael@310: set_rcapicmd_header(&p, 14, RCAPI_GET_VERSION_REQ, Ctrl); michael@310: if(!(remote_command(capi_fd, buf, 14, RCAPI_GET_VERSION_CONF))) michael@310: return 0; michael@310: - memcpy(Buf, buf + 1, sizeof(capi_version)); michael@310: + memcpy(Buf, buf + 1, 128 /* sizeof(capi_version) */); michael@310: return Buf; michael@310: } michael@310: michael@310: +#if 0 michael@310: ioctl_data.contr = Ctrl; michael@310: if (ioctl(capi_fd, CAPI_GET_VERSION, &ioctl_data) < 0) { michael@310: +#endif michael@310: return 0; michael@310: +#if 0 michael@310: } michael@310: memcpy(Buf, &ioctl_data.version, sizeof(capi_version)); michael@310: return Buf; michael@310: +#endif michael@310: } michael@310: michael@310: unsigned char * michael@310: @@ -952,6 +998,10 @@ michael@310: if (capi20_isinstalled() != CapiNoError) michael@310: return 0; michael@310: michael@310: +#ifndef CAPI_SERIAL_LEN michael@310: +#define CAPI_SERIAL_LEN 8 michael@202: +#endif michael@202: + michael@310: if (remote_capi) { michael@310: unsigned char buf[100]; michael@310: unsigned char *p = buf; michael@310: @@ -963,15 +1013,19 @@ michael@310: return Buf; michael@310: } michael@310: michael@310: +#if 0 michael@310: ioctl_data.contr = Ctrl; michael@310: michael@310: if (ioctl(capi_fd, CAPI_GET_SERIAL, &ioctl_data) < 0) michael@202: +#endif michael@310: return 0; michael@310: michael@202: +#if 0 michael@310: memcpy(Buf, &ioctl_data.serial, CAPI_SERIAL_LEN); michael@310: Buf[CAPI_SERIAL_LEN-1] = 0; michael@310: michael@310: return Buf; michael@202: +#endif michael@202: } michael@202: michael@310: unsigned michael@310: @@ -993,7 +1047,7 @@ michael@310: unsigned short* tmp = (unsigned short*)buf; michael@202: michael@310: if(*tmp == CapiNoError) { michael@310: - memcpy(Buf, buf + 2, (Ctrl) ? sizeof(struct capi_profile) : 2); michael@310: + memcpy(Buf, buf + 2, (Ctrl) ? 224 /* sizeof(struct capi_profile) */ : 2); michael@310: } michael@202: michael@310: fret = *tmp; michael@310: @@ -1002,6 +1056,9 @@ michael@310: return (fret); michael@202: } michael@202: michael@310: +#if 1 michael@310: + return CapiMsgOSResourceErr; michael@310: +#else michael@310: ioctl_data.contr = Ctrl; michael@202: michael@310: if (ioctl(capi_fd, CAPI_GET_PROFILE, &ioctl_data) < 0) { michael@310: @@ -1018,6 +1075,7 @@ michael@310: sizeof(ioctl_data.profile.ncontroller)); michael@202: } michael@310: return CapiNoError; michael@310: +#endif michael@310: } michael@310: /* michael@310: * functions added to the CAPI2.0 spec michael@310: Index: chan_capi-1.1.5/libcapi20/convert.c michael@310: --- chan_capi-1.1.5/libcapi20/convert.c.orig 2009-07-23 16:11:08.000000000 +0200 michael@310: +++ chan_capi-1.1.5/libcapi20/convert.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -11,7 +11,14 @@ michael@310: #include michael@310: #include michael@310: #include michael@310: +#ifdef __FreeBSD__ michael@310: +#include michael@310: +#define bswap_16 bswap16 michael@310: +#define bswap_32 bswap32 michael@310: +#define bswap_64 bswap64 michael@310: +#else michael@310: #include michael@310: +#endif michael@310: michael@310: #include "capi20.h" michael@310: michael@310: Index: channels/console_video.h michael@310: --- channels/console_video.h.orig 2008-06-30 17:45:15.000000000 +0200 michael@310: +++ channels/console_video.h 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -28,10 +28,7 @@ michael@310: "console {device}" michael@310: #else michael@310: michael@310: -#include michael@310: -#ifndef OLD_FFMPEG michael@310: -#include /* requires a recent ffmpeg */ michael@310: -#endif michael@310: +#include michael@310: michael@310: #define CONSOLE_VIDEO_CMDS \ michael@310: "console {videodevice|videocodec" \ michael@310: Index: configure michael@310: --- configure.orig 2010-06-24 01:40:16.000000000 +0200 michael@310: +++ configure 2010-07-24 11:14:22.000000000 +0200 michael@310: @@ -4530,11 +4530,6 @@ michael@310: # note- does not work on FreeBSD michael@310: michael@310: case "${host_os}" in michael@310: - freebsd*) michael@310: - michael@310: - CPPFLAGS=-I/usr/local/include michael@310: - LDFLAGS=-L/usr/local/lib michael@310: - ;; michael@310: openbsd*) michael@310: michael@310: if test ${prefix} = '/usr/local' || test ${prefix} = 'NONE'; then michael@310: Index: main/Makefile michael@310: --- main/Makefile.orig 2010-06-25 20:58:37.000000000 +0200 michael@310: +++ main/Makefile 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -78,10 +78,7 @@ michael@310: endif michael@310: michael@310: ifeq ($(OSARCH),FreeBSD) michael@310: - # -V is understood by BSD Make, not by GNU make. michael@310: - BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) michael@310: - AST_LIBS+=$(shell if test $(BSDVERSION) -lt 502102 ; then echo "-lc_r"; else echo "-pthread"; fi) michael@310: - AST_LIBS+=-lcrypto michael@310: + AST_LIBS+=-lpthread -lcrypto michael@310: endif michael@310: michael@310: ifneq ($(findstring $(OSARCH), mingw32 cygwin ),) michael@310: Index: main/file.c michael@310: --- main/file.c.orig 2010-03-25 17:26:13.000000000 +0100 michael@310: +++ main/file.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -254,7 +254,7 @@ michael@310: char *fn = NULL; michael@310: michael@310: if (!strcmp(ext, "wav49")) michael@310: - ext = "WAV"; michael@310: + ext = "wav"; michael@310: michael@310: if (filename[0] == '/') { michael@310: if (asprintf(&fn, "%s.%s", filename, ext) < 0) { michael@310: Index: main/tcptls.c michael@310: --- main/tcptls.c.orig 2010-03-20 18:33:03.000000000 +0100 michael@310: +++ main/tcptls.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -325,6 +325,7 @@ michael@310: if (!ast_strlen_zero(cfg->cafile) || !ast_strlen_zero(cfg->capath)) { michael@310: if (SSL_CTX_load_verify_locations(cfg->ssl_ctx, S_OR(cfg->cafile, NULL), S_OR(cfg->capath,NULL)) == 0) michael@310: ast_verb(0, "SSL CA file(%s)/path(%s) error\n", cfg->cafile, cfg->capath); michael@310: + SSL_CTX_set_client_CA_list(cfg->ssl_ctx, S_OR(cfg->cafile, NULL)); michael@202: } michael@202: michael@310: ast_verb(0, "SSL certificate ok\n"); michael@310: Index: menuselect-tree michael@310: --- menuselect-tree.orig 2010-07-22 21:20:17.000000000 +0200 michael@310: +++ menuselect-tree 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -153,6 +153,8 @@ michael@310: michael@310: michael@310: michael@310: + michael@310: + michael@310: michael@310: michael@310: michael@310: @@ -693,9 +695,9 @@ michael@310: michael@310: michael@310: michael@310: + yes michael@310: michael@310: michael@310: - yes michael@310: michael@310: michael@310: michael@310: @@ -771,6 +773,7 @@ michael@310: michael@310: michael@310: michael@310: + yes michael@310: michael@310: michael@310: michael@310: Index: res/res_http_post.c michael@310: --- res/res_http_post.c.orig 2009-10-27 18:12:09.000000000 +0100 michael@310: +++ res/res_http_post.c 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -122,14 +122,8 @@ michael@310: ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MESSAGE_PARTIAL\n"); michael@310: return; michael@310: } else if (GMIME_IS_MULTIPART(part)) { michael@310: - GList *l; michael@310: - michael@310: - ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); michael@310: - l = GMIME_MULTIPART(part)->subparts; michael@310: - while (l) { michael@310: - process_message_callback(l->data, cbinfo); michael@310: - l = l->next; michael@310: - } michael@310: + ast_log(LOG_WARNING, "Got unexpected GMIME_IS_MULTIPART, trying to process subparts\n"); michael@310: + g_mime_multipart_foreach(GMIME_MULTIPART(part), process_message_callback, cbinfo); michael@310: } else if (GMIME_IS_PART(part)) { michael@310: const char *filename; michael@310: michael@310: Index: sounds/sounds.xml michael@310: --- sounds/sounds.xml.orig 2009-08-18 22:31:40.000000000 +0200 michael@310: +++ sounds/sounds.xml 2010-07-24 11:12:31.000000000 +0200 michael@310: @@ -4,9 +4,9 @@ michael@310: michael@310: michael@310: michael@310: + yes michael@310: michael@310: michael@310: - yes michael@310: michael@310: michael@310: michael@310: @@ -82,6 +82,7 @@ michael@310: michael@310: michael@310: michael@310: + yes michael@310: michael@310: michael@310: