[asterisk-commits] rizzo: branch rizzo/astobj2 r46001 - in
/team/rizzo/astobj2: ./ cdr/ channels...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Oct 23 10:10:04 MST 2006
Author: rizzo
Date: Mon Oct 23 12:10:03 2006
New Revision: 46001
URL: http://svn.digium.com/view/asterisk?rev=46001&view=rev
Log:
merge back changes from trunk
Modified:
team/rizzo/astobj2/Makefile
team/rizzo/astobj2/cdr/cdr_odbc.c
team/rizzo/astobj2/channels/chan_misdn.c
team/rizzo/astobj2/configs/http.conf.sample
team/rizzo/astobj2/configure
team/rizzo/astobj2/configure.ac
team/rizzo/astobj2/include/asterisk/autoconfig.h.in
Modified: team/rizzo/astobj2/Makefile
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/Makefile?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/Makefile (original)
+++ team/rizzo/astobj2/Makefile Mon Oct 23 12:10:03 2006
@@ -325,15 +325,15 @@
fi
@rm -f $@.tmp
+include/asterisk/buildopts.h: menuselect.makeopts
+ @build_tools/make_buildopts_h > $@.tmp
+ @if cmp -s $@.tmp $@ ; then : ; else \
+ mv $@.tmp $@ ; \
+ fi
+ @rm -f $@.tmp
+
include/asterisk/build.h:
@build_tools/make_build_h > $@.tmp
- @if cmp -s $@.tmp $@ ; then : ; else \
- mv $@.tmp $@ ; \
- fi
- @rm -f $@.tmp
-
-include/asterisk/buildopts.h: menuselect.makeopts
- @build_tools/make_buildopts_h > $@.tmp
@if cmp -s $@.tmp $@ ; then : ; else \
mv $@.tmp $@ ; \
fi
Modified: team/rizzo/astobj2/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/cdr/cdr_odbc.c?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/cdr/cdr_odbc.c (original)
+++ team/rizzo/astobj2/cdr/cdr_odbc.c Mon Oct 23 12:10:03 2006
@@ -346,7 +346,6 @@
goto out;
}
- ast_config_destroy(cfg);
if (option_verbose > 2) {
ast_verbose( VERBOSE_PREFIX_3 "cdr_odbc: dsn is %s\n",dsn);
if (username)
@@ -371,6 +370,8 @@
ast_log(LOG_ERROR, "cdr_odbc: Unable to register ODBC CDR handling\n");
}
out:
+ if (cfg)
+ ast_config_destroy(cfg);
ast_mutex_unlock(&odbc_lock);
return res;
}
Modified: team/rizzo/astobj2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_misdn.c?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/channels/chan_misdn.c (original)
+++ team/rizzo/astobj2/channels/chan_misdn.c Mon Oct 23 12:10:03 2006
@@ -78,6 +78,7 @@
char global_tracefile[BUFFERSIZE+1];
+static int g_config_initialized=0;
struct misdn_jb{
int size;
@@ -955,6 +956,11 @@
static void reload_config(void)
{
int i, cfg_debug;
+
+ if (!g_config_initialized) {
+ ast_log(LOG_WARNING, "chan_misdn is not initialized properly, still reloading ?\n");
+ return ;
+ }
free_robin_list();
misdn_cfg_reload();
@@ -4536,7 +4542,6 @@
*******************************************/
-static int g_config_initialized=0;
static int unload_module(void)
{
Modified: team/rizzo/astobj2/configs/http.conf.sample
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/configs/http.conf.sample?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/configs/http.conf.sample (original)
+++ team/rizzo/astobj2/configs/http.conf.sample Mon Oct 23 12:10:03 2006
@@ -4,7 +4,8 @@
;
[general]
;
-; Whether HTTP interface is enabled or not. Default is no.
+; Whether HTTP/HTTPS interface is enabled or not. Default is no.
+; This also affects manager/rawman/mxml access (see manager.conf)
;
;enabled=yes
;
@@ -13,16 +14,26 @@
;
;enablestatic=yes
;
-; Address to bind to. Default is 0.0.0.0
+; Address to bind to, both for HTTP and HTTPS. Default is 0.0.0.0
;
bindaddr=127.0.0.1
;
-; Port to bind to (default is 8088)
+; Port to bind to for HTTP sessions (default is 8088)
;
-bindport=8088
+;bindport=8088
;
; Prefix allows you to specify a prefix for all requests
; to the server. The default is "asterisk" so that all
; requests must begin with /asterisk
;
;prefix=asterisk
+
+; HTTPS support: you need to enable it, define the port to use,
+; and have a certificate somewhere.
+; sslenable=yes ; enable ssl - default no.
+; sslbindport=4433 ; port to use - default is 8089
+; sslcert=/tmp/foo.pem ; path to the certificate
+;
+; To produce a certificate you can e.g. use openssl
+; openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem
+;
Modified: team/rizzo/astobj2/configure
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/configure?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/configure (original)
+++ team/rizzo/astobj2/configure Mon Oct 23 12:10:03 2006
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 45029 .
+# From configure.ac Revision: 45890 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -11699,8 +11699,115 @@
done
-
-for ac_func in funopen
+# https support (in main/http.c) uses funopen on BSD systems,
+# fopencookie on linux
+
+
+for ac_func in funopen fopencookie
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
+
+for ac_func in gethostbyname_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
Modified: team/rizzo/astobj2/configure.ac
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/configure.ac?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/configure.ac (original)
+++ team/rizzo/astobj2/configure.ac Mon Oct 23 12:10:03 2006
@@ -251,10 +251,12 @@
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf])
+# https support (in main/http.c) uses funopen on BSD systems,
+# fopencookie on linux
+AC_CHECK_FUNCS([funopen fopencookie])
+
+# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
AC_CHECK_FUNCS([gethostbyname_r])
-
-AC_CHECK_FUNCS([funopen])
-AC_CHECK_FUNCS([fopencookie])
AC_MSG_CHECKING(for compiler atomic operations)
AC_LINK_IFELSE(
Modified: team/rizzo/astobj2/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/include/asterisk/autoconfig.h.in?rev=46001&r1=46000&r2=46001&view=diff
==============================================================================
--- team/rizzo/astobj2/include/asterisk/autoconfig.h.in (original)
+++ team/rizzo/astobj2/include/asterisk/autoconfig.h.in Mon Oct 23 12:10:03 2006
@@ -102,6 +102,9 @@
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
+/* Define to 1 if you have the `fopencookie' function. */
+#undef HAVE_FOPENCOOKIE
+
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
@@ -128,6 +131,9 @@
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `gethostbyname_r' function. */
+#undef HAVE_GETHOSTBYNAME_R
/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
More information about the asterisk-commits
mailing list