[Freeswitch-svn] [commit] r1595 - in freeswitch/branches/mishehu: . build conf docs libs libs/codec/gsm libs/codec/ilbc libs/iax libs/iax/src libs/libdingaling libs/libspeakup libs/libteletone libs/srtp libs/srtp/crypto libs/srtp/crypto/include libs/srtp/crypto/test libs/srtp/test scripts/rss src src/include src/mod src/mod/applications src/mod/applications/mod_bridgecall src/mod/applications/mod_commands src/mod/applications/mod_echo src/mod/applications/mod_ivrtest src/mod/applications/mod_playback src/mo
Author: mishehu Date: Sat Jun 10 17:47:13 2006 New Revision: 1595 Added: freeswitch/branches/mishehu/scripts/rss/ - copied from r1594, /freeswitch/trunk/scripts/rss/ freeswitch/branches/mishehu/scripts/rss/rss2ivr.pl - copied unchanged from r1594, /freeswitch/trunk/scripts/rss/rss2ivr.pl freeswitch/branches/mishehu/src/mod/applications/mod_rss/ (props changed) - copied from r1594, /freeswitch/trunk/src/mod/applications/mod_rss/ freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.c - copied unchanged from r1594, /freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c freeswitch/branches/mishehu/src/mod/applications/mod_rss/mod_rss.vcproj - copied unchanged from r1594, /freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.vcproj freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig.i - copied unchanged from r1594, /freeswitch/trunk/src/mod/languages/mod_perl/switch_swig.i Modified: freeswitch/branches/mishehu/ (props changed) freeswitch/branches/mishehu/aclocal.m4 freeswitch/branches/mishehu/build/ (props changed) freeswitch/branches/mishehu/conf/freeswitch.xml freeswitch/branches/mishehu/configure freeswitch/branches/mishehu/configure.in freeswitch/branches/mishehu/docs/ (props changed) freeswitch/branches/mishehu/libs/ (props changed) freeswitch/branches/mishehu/libs/codec/gsm/ (props changed) freeswitch/branches/mishehu/libs/codec/ilbc/ (props changed) freeswitch/branches/mishehu/libs/iax/ (props changed) freeswitch/branches/mishehu/libs/iax/src/ (props changed) freeswitch/branches/mishehu/libs/libdingaling/ (props changed) freeswitch/branches/mishehu/libs/libspeakup/ (props changed) freeswitch/branches/mishehu/libs/libteletone/ (props changed) freeswitch/branches/mishehu/libs/srtp/ (props changed) freeswitch/branches/mishehu/libs/srtp/crypto/ (props changed) freeswitch/branches/mishehu/libs/srtp/crypto/include/ (props changed) freeswitch/branches/mishehu/libs/srtp/crypto/test/ (props changed) freeswitch/branches/mishehu/libs/srtp/test/ (props changed) freeswitch/branches/mishehu/modules.conf.in freeswitch/branches/mishehu/src/include/ (props changed) freeswitch/branches/mishehu/src/include/switch.h freeswitch/branches/mishehu/src/include/switch_am_config.h.in freeswitch/branches/mishehu/src/include/switch_channel.h freeswitch/branches/mishehu/src/include/switch_core.h freeswitch/branches/mishehu/src/include/switch_ivr.h freeswitch/branches/mishehu/src/include/switch_module_interfaces.h freeswitch/branches/mishehu/src/include/switch_types.h freeswitch/branches/mishehu/src/mod/ (props changed) freeswitch/branches/mishehu/src/mod/applications/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_bridgecall/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_commands/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_echo/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.c freeswitch/branches/mishehu/src/mod/applications/mod_playback/ (props changed) freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c freeswitch/branches/mishehu/src/mod/applications/mod_skel/ (props changed) freeswitch/branches/mishehu/src/mod/asr_tts/ (props changed) freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/ (props changed) freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.c freeswitch/branches/mishehu/src/mod/codecs/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_g711/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_g729/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_gsm/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_ilbc/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_l16/ (props changed) freeswitch/branches/mishehu/src/mod/codecs/mod_speex/ (props changed) freeswitch/branches/mishehu/src/mod/dialplans/ (props changed) freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_directory/ (props changed) freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/ (props changed) freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c freeswitch/branches/mishehu/src/mod/directories/ (props changed) freeswitch/branches/mishehu/src/mod/directories/mod_ldap/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c freeswitch/branches/mishehu/src/mod/endpoints/mod_iax/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_portaudio.c freeswitch/branches/mishehu/src/mod/endpoints/mod_wanpipe/ (props changed) freeswitch/branches/mishehu/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c freeswitch/branches/mishehu/src/mod/endpoints/mod_woomera/ (props changed) freeswitch/branches/mishehu/src/mod/event_handlers/ (props changed) freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_multicast/ (props changed) freeswitch/branches/mishehu/src/mod/event_handlers/mod_event_test/ (props changed) freeswitch/branches/mishehu/src/mod/event_handlers/mod_xmpp_event/ (props changed) freeswitch/branches/mishehu/src/mod/event_handlers/mod_zeroconf/ (props changed) freeswitch/branches/mishehu/src/mod/formats/ (props changed) freeswitch/branches/mishehu/src/mod/formats/mod_sndfile/ (props changed) freeswitch/branches/mishehu/src/mod/languages/ (props changed) freeswitch/branches/mishehu/src/mod/languages/mod_perl/ (props changed) freeswitch/branches/mishehu/src/mod/languages/mod_perl/Makefile freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig.c freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig_wrap.c freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/ (props changed) freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c freeswitch/branches/mishehu/src/mod/loggers/ (props changed) freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h freeswitch/branches/mishehu/src/mod/loggers/mod_console/ (props changed) freeswitch/branches/mishehu/src/mod/loggers/mod_syslog/ (props changed) freeswitch/branches/mishehu/src/mod/timers/ (props changed) freeswitch/branches/mishehu/src/mod/timers/mod_softtimer/ (props changed) freeswitch/branches/mishehu/src/mod/xml_int/ (props changed) freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/ (props changed) freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c freeswitch/branches/mishehu/src/switch.c freeswitch/branches/mishehu/src/switch_channel.c freeswitch/branches/mishehu/src/switch_config.c freeswitch/branches/mishehu/src/switch_core.c freeswitch/branches/mishehu/src/switch_event.c freeswitch/branches/mishehu/src/switch_ivr.c freeswitch/branches/mishehu/src/switch_log.c freeswitch/branches/mishehu/src/switch_rtp.c freeswitch/branches/mishehu/src/switch_xml.c freeswitch/branches/mishehu/w32/Setup/ (props changed) freeswitch/branches/mishehu/w32/vsnet/ (props changed) freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln freeswitch/branches/mishehu/w32/vsnet/Tools/ (props changed) Log: Refactored for switch_channel_t:: objects with linked lists, added hangup cause logging in BaseCDR. Merged up to trunk r1594. Modified: freeswitch/branches/mishehu/aclocal.m4 ============================================================================== --- freeswitch/branches/mishehu/aclocal.m4 (original) +++ freeswitch/branches/mishehu/aclocal.m4 Sat Jun 10 17:47:13 2006 @@ -143,7 +143,7 @@ default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -359,8 +359,8 @@ # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -529,7 +529,7 @@ # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -611,7 +611,7 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -650,7 +650,7 @@ LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. @@ -725,7 +725,7 @@ elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` @@ -737,7 +737,7 @@ # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 - # + # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; @@ -854,7 +854,7 @@ }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; @@ -1003,7 +1003,7 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) @@ -1021,7 +1021,7 @@ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi - chmod u+w . + chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -1281,7 +1281,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -1334,7 +1335,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -1372,7 +1373,14 @@ freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -1417,7 +1425,7 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -1813,7 +1821,7 @@ # AC_LIBTOOL_WIN32_DLL # -------------------- -# declare package support for building win32 dll's +# declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL @@ -1987,7 +1995,7 @@ if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -2097,7 +2105,7 @@ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -2129,7 +2137,7 @@ AC_DEFUN([AC_PROG_LD_GNU], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +[# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -2243,7 +2251,7 @@ hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -2417,13 +2425,13 @@ # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will -# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with -# '${top_srcdir}/' (note the single quotes!). If your package is not -# flat and you're not using automake, define top_builddir and -# top_srcdir appropriately in the Makefiles. +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in @@ -2442,13 +2450,13 @@ # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds -# --enable-ltdl-install to the configure arguments. Note that LIBLTDL -# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If -# DIRECTORY is not provided and an installed libltdl is not found, it is -# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' -# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single -# quotes!). If your package is not flat and you're not using automake, -# define top_builddir and top_srcdir appropriately in the Makefiles. +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl @@ -2627,7 +2635,7 @@ # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -2694,7 +2702,7 @@ _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -2910,7 +2918,7 @@ # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -2949,7 +2957,7 @@ fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -2987,7 +2995,7 @@ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -3000,7 +3008,7 @@ output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -3080,7 +3088,7 @@ ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' @@ -3096,7 +3104,7 @@ ;; esac fi - case "$host_cpu" in + case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -3122,7 +3130,7 @@ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; @@ -3143,7 +3151,7 @@ *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in + case $host_cpu in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; @@ -3244,7 +3252,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -3476,10 +3484,11 @@ case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -3499,15 +3508,7 @@ esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -3664,7 +3665,7 @@ # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -3740,6 +3741,21 @@ $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + ;; + esac +esac +]) + case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac @@ -3809,7 +3825,7 @@ # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -4708,7 +4724,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -4777,7 +4793,7 @@ aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -4818,7 +4834,7 @@ # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ @@ -4982,7 +4998,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -5029,7 +5045,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -5059,12 +5075,12 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5147,7 +5163,7 @@ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= @@ -5243,7 +5259,7 @@ if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' - + # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. @@ -5264,7 +5280,7 @@ *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac - + # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) @@ -5338,11 +5354,11 @@ tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -5548,7 +5564,7 @@ # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -5588,7 +5604,7 @@ ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; @@ -5617,7 +5633,7 @@ output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -5626,7 +5642,7 @@ output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -5692,7 +5708,7 @@ hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -5701,7 +5717,7 @@ ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -5711,7 +5727,7 @@ esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' Modified: freeswitch/branches/mishehu/conf/freeswitch.xml ============================================================================== --- freeswitch/branches/mishehu/conf/freeswitch.xml (original) +++ freeswitch/branches/mishehu/conf/freeswitch.xml Sat Jun 10 17:47:13 2006 @@ -58,6 +58,7 @@ <!-- ASR /TTS --> <!-- <load module="mod_cepstral"/> --> + <!-- <load module="mod_rss"/> --> </modules> </configuration> @@ -110,6 +111,8 @@ <param name="rfc2833-pt" value="101"/> <!-- disable to trade async for more calls --> <param name="use-rtp-timer" value="true"/> + <!-- auto sense NAT issues and adjust accordingly --> + <param name="use-rtp-auto-adjust" value="true"/> <!-- pick one (default if not specified is 'guess'); --> <param name="rtp-ip" value="guess"/> <!-- <param name-"rtp-ip" value="10.0.0.1"/> --> @@ -253,6 +256,15 @@ <!-- <param name="gateway-url" value="http://www.server.com/gateway.cgi" bindings="configuration"/> --> </settings> </configuration> + + <configuration name="rss.conf" description="RSS Parser"> + <feeds> + <!-- Just download the files to wherever and refer to them here --> + <!-- <feed name="Slash Dot">/home/rss/rss.rss</feed> --> + <!-- <feed name="News Forge">/home/rss/newsforge.rss</feed> --> + </feeds> + </configuration> + </section> <section name="dialplan" description="Regex/XML Dialplan"> <!-- Valid fields in conditions: @@ -262,11 +274,17 @@ <!-- *NOTE* The special context name 'any' will match any context --> <context name="default"> - <extension name="devconf"> - <condition field="destination_number" expression="^888$"> - <action application="bridge" data="exosip/888@66.250.68.194"/> - </condition> - </extension> + <extension name="tollfree"> + <condition field="destination_number" expression="^(18[0{2}8{2}7{2}6{2}].*)$"> + <action application="bridge" data="exosip/$1-freeswitch@voip.trxtel.com"/> + </condition> + </extension> + + <extension name="devconf"> + <condition field="destination_number" expression="^888$"> + <action application="bridge" data="exosip/888@66.250.68.194"/> + </condition> + </extension> <!-- if the destination is an exact match on the extension name you do not need any regex in the condition --> Modified: freeswitch/branches/mishehu/configure ============================================================================== --- freeswitch/branches/mishehu/configure (original) +++ freeswitch/branches/mishehu/configure Sat Jun 10 17:47:13 2006 @@ -287,8 +287,8 @@ # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string="`eval $cmd`") 2>/dev/null && - echo_test_string="`eval $cmd`" && + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break @@ -3463,7 +3463,7 @@ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -3497,7 +3497,7 @@ if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -3667,7 +3667,7 @@ hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file - case "$host_cpu" in + case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so @@ -3856,7 +3856,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - case "`/usr/bin/file conftest.o`" in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) @@ -5589,7 +5589,7 @@ elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else - lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` @@ -5904,7 +5904,7 @@ default_ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" @@ -6225,7 +6225,7 @@ if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6287,7 +6287,7 @@ if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then @@ -6436,7 +6436,7 @@ LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The compiler can only warn and ignore the option if not recognized + # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. @@ -6487,7 +6487,7 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6493: $lt_compile\"" >&5) @@ -6577,7 +6577,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -6624,7 +6624,7 @@ lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -6654,12 +6654,12 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-static' + lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' @@ -6749,7 +6749,7 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6755: $lt_compile\"" >&5) @@ -6783,7 +6783,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= @@ -6811,7 +6811,7 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6817: $lt_compile\"" >&5) @@ -6829,7 +6829,7 @@ lt_cv_prog_compiler_c_o=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -7029,11 +7029,11 @@ tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -7341,7 +7341,7 @@ # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -7381,7 +7381,7 @@ ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; @@ -7410,7 +7410,7 @@ output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -7419,7 +7419,7 @@ output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -7485,7 +7485,7 @@ hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -7494,7 +7494,7 @@ ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -7504,7 +7504,7 @@ esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' @@ -7963,7 +7963,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -8016,7 +8017,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -8054,7 +8055,14 @@ freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -8099,7 +8107,7 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -9054,7 +9062,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9057 "configure" +#line 9065 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9120,7 +9128,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -9152,7 +9160,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9155 "configure" +#line 9163 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9218,7 +9226,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -9268,7 +9276,7 @@ # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -9871,7 +9879,7 @@ compiler_lib_search_path_CXX= # Source file extension for C++ test sources. -ac_ext=cc +ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o @@ -10007,7 +10015,7 @@ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. + # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) @@ -10041,7 +10049,7 @@ if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. + # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) lt_cv_prog_gnu_ld=yes @@ -10321,7 +10329,7 @@ # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -10360,7 +10368,7 @@ fi ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; @@ -10398,7 +10406,7 @@ archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -10411,7 +10419,7 @@ output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -10491,7 +10499,7 @@ ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' @@ -10507,7 +10515,7 @@ ;; esac fi - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no @@ -10533,7 +10541,7 @@ ld_shlibs_CXX=no ;; aCC*) - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; @@ -10554,7 +10562,7 @@ *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then - case "$host_cpu" in + case $host_cpu in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; @@ -10655,7 +10663,7 @@ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -10887,10 +10895,11 @@ case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -10910,15 +10919,7 @@ esac link_all_deplibs_CXX=yes - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -11022,7 +11023,7 @@ # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. - output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in @@ -11098,6 +11099,20 @@ $rm -f confest.$objext +# PORTME: override above test on systems where it is broken +case $host_os in +solaris*) + case $cc_basename in + CC*) + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + postdeps_CXX='-lCstd -lCrun' + ;; + esac +esac + + case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac @@ -11153,7 +11168,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) ;; *) @@ -11222,7 +11237,7 @@ aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -11263,7 +11278,7 @@ # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-static' + lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ @@ -11397,14 +11412,14 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11403: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11418: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11407: \$? = $ac_status" >&5 + echo "$as_me:11422: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11431,7 +11446,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= @@ -11459,14 +11474,14 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11465: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11480: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11469: \$? = $ac_status" >&5 + echo "$as_me:11484: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11477,7 +11492,7 @@ lt_cv_prog_compiler_c_o_CXX=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -11740,7 +11755,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -11793,7 +11809,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -11831,7 +11847,14 @@ freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -11876,7 +11899,7 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -12831,7 +12854,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12834 "configure" +#line 12857 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12897,7 +12920,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -12929,7 +12952,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 12932 "configure" +#line 12955 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12995,7 +13018,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -13551,7 +13574,7 @@ # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. -case "$host_os" in +case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then @@ -13639,7 +13662,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -13686,7 +13709,7 @@ lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -13716,12 +13739,12 @@ lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-static' + lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' @@ -13811,14 +13834,14 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13817: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13840: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13821: \$? = $ac_status" >&5 + echo "$as_me:13844: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13845,7 +13868,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= @@ -13873,14 +13896,14 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13879: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13902: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13883: \$? = $ac_status" >&5 + echo "$as_me:13906: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13891,7 +13914,7 @@ lt_cv_prog_compiler_c_o_F77=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -14091,11 +14114,11 @@ tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -14383,7 +14406,7 @@ # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -14423,7 +14446,7 @@ ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; @@ -14452,7 +14475,7 @@ output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -14461,7 +14484,7 @@ output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -14527,7 +14550,7 @@ hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -14536,7 +14559,7 @@ ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -14546,7 +14569,7 @@ esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' @@ -15005,7 +15028,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -15058,7 +15082,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -15096,7 +15120,14 @@ freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -15141,7 +15172,7 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -15995,14 +16026,14 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16001: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16032: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16005: \$? = $ac_status" >&5 + echo "$as_me:16036: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16085,7 +16116,7 @@ hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -16132,7 +16163,7 @@ lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) # +Z the default ;; @@ -16162,12 +16193,12 @@ lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; - pgcc* | pgf77* | pgf90*) + pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-static' + lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' @@ -16257,14 +16288,14 @@ # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16263: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16294: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16267: \$? = $ac_status" >&5 + echo "$as_me:16298: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16291,7 +16322,7 @@ fi fi -case "$host_os" in +case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= @@ -16319,14 +16350,14 @@ # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16325: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16356: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16329: \$? = $ac_status" >&5 + echo "$as_me:16360: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16337,7 +16368,7 @@ lt_cv_prog_compiler_c_o_GCJ=yes fi fi - chmod u+w . + chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation @@ -16537,11 +16568,11 @@ tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* ) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -16849,7 +16880,7 @@ # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds it's shared libraries. + # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi @@ -16889,7 +16920,7 @@ ;; darwin* | rhapsody*) - case "$host_os" in + case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; @@ -16918,7 +16949,7 @@ output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else @@ -16927,7 +16958,7 @@ output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' - # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; @@ -16993,7 +17024,7 @@ hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; @@ -17002,7 +17033,7 @@ ;; esac else - case "$host_cpu" in + case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; @@ -17012,7 +17043,7 @@ esac fi if test "$with_gnu_ld" = no; then - case "$host_cpu" in + case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' @@ -17471,7 +17502,8 @@ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' @@ -17524,7 +17556,7 @@ soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` @@ -17562,7 +17594,14 @@ freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[123]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) @@ -17607,7 +17646,7 @@ version_type=sunos need_lib_prefix=no need_version=no - case "$host_cpu" in + case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes @@ -18562,7 +18601,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 18565 "configure" +#line 18604 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18628,7 +18667,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; @@ -18660,7 +18699,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 18663 "configure" +#line 18702 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18726,7 +18765,7 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) 2>/dev/null + (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; @@ -21263,7 +21302,9 @@ -for ac_func in gethostname vasprintf mmap + + +for ac_func in gethostname vasprintf mmap mlock mlockall do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 Modified: freeswitch/branches/mishehu/configure.in ============================================================================== --- freeswitch/branches/mishehu/configure.in (original) +++ freeswitch/branches/mishehu/configure.in Sat Jun 10 17:47:13 2006 @@ -34,7 +34,7 @@ AC_FUNC_MALLOC AC_TYPE_SIGNAL AC_FUNC_STRFTIME -AC_CHECK_FUNCS([gethostname vasprintf mmap]) +AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall]) AC_C_BIGENDIAN(AC_DEFINE([__BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([__BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian])) AC_DEFINE([__LITTLE_ENDIAN],1234,[for the places where it is not defined]) Modified: freeswitch/branches/mishehu/modules.conf.in ============================================================================== --- freeswitch/branches/mishehu/modules.conf.in (original) +++ freeswitch/branches/mishehu/modules.conf.in Sat Jun 10 17:47:13 2006 @@ -6,6 +6,7 @@ applications/mod_ivrtest applications/mod_playback applications/mod_skel +#applications/mod_rss #asr_tts/mod_cepstral codecs/mod_g711 codecs/mod_ilbc Modified: freeswitch/branches/mishehu/src/include/switch.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch.h (original) +++ freeswitch/branches/mishehu/src/include/switch.h Sat Jun 10 17:47:13 2006 @@ -101,7 +101,6 @@ * Additionally, the experimental external modules make use of several external modules: * * mod_Exosip: - * - JRTPlib (http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html) * - eXoSIP (http://savannah.nongnu.org/projects/exosip/) * * mod_iaxchan: Modified: freeswitch/branches/mishehu/src/include/switch_am_config.h.in ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_am_config.h.in (original) +++ freeswitch/branches/mishehu/src/include/switch_am_config.h.in Sat Jun 10 17:47:13 2006 @@ -20,6 +20,12 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mlock' function. */ +#undef HAVE_MLOCK + +/* Define to 1 if you have the `mlockall' function. */ +#undef HAVE_MLOCKALL + /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP Modified: freeswitch/branches/mishehu/src/include/switch_channel.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_channel.h (original) +++ freeswitch/branches/mishehu/src/include/switch_channel.h Sat Jun 10 17:47:13 2006 @@ -363,6 +363,13 @@ SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t state); /*! + \brief Render the enum of the provided state name + \param name the name of the state + \return the enum value (numeric) +*/ +SWITCH_DECLARE(switch_channel_state_t) switch_channel_name_state(char *name); + +/*! \brief Add information about a given channel to an event object \param channel channel to add information about \param event event to add information to Modified: freeswitch/branches/mishehu/src/include/switch_core.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_core.h (original) +++ freeswitch/branches/mishehu/src/include/switch_core.h Sat Jun 10 17:47:13 2006 @@ -111,9 +111,10 @@ /*! \brief Initilize the core \param console optional FILE stream for output + \param a pointer to set any errors to \note to be called at application startup */ -SWITCH_DECLARE(switch_status_t) switch_core_init(char *console); +SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err); /*! \brief Destroy the core @@ -893,6 +894,36 @@ \return SWITCH_STATUS_SUCCESS with len adjusted to the bytes written if successful */ SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags); + +/*! + \brief Flush TTS audio on a given handle + \param sh the speech handle +*/ +SWITCH_DECLARE(void) switch_core_speech_flush_tts(switch_speech_handle_t *sh); + +/*! + \brief Set a text parameter on a TTS handle + \param sh the speech handle + \param param the parameter + \param val the value +*/ +SWITCH_DECLARE(void) switch_core_speech_text_param_tts(switch_speech_handle_t *sh, char *param, char *val); + +/*! + \brief Set a numeric parameter on a TTS handle + \param sh the speech handle + \param param the parameter + \param val the value +*/ +SWITCH_DECLARE(void) switch_core_speech_numeric_param_tts(switch_speech_handle_t *sh, char *param, int val); + +/*! + \brief Set a float parameter on a TTS handle + \param sh the speech handle + \param param the parameter + \param val the value +*/ +SWITCH_DECLARE(void) switch_core_speech_float_param_tts(switch_speech_handle_t *sh, char *param, double val); /*! \brief Read rendered audio from the TTS module Modified: freeswitch/branches/mishehu/src/include/switch_ivr.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_ivr.h (original) +++ freeswitch/branches/mishehu/src/include/switch_ivr.h Sat Jun 10 17:47:13 2006 @@ -104,17 +104,15 @@ \param terminators digits to end the collection \param terminator actual digit that caused the collection to end (if any) \param timeout timeout in ms - \param poll_channel flag to specify if you want the function to poll the channel while running \return SWITCH_STATUS_SUCCESS to keep the collection moving. */ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session, - char *buf, - unsigned int buflen, - unsigned int maxdigits, - const char *terminators, - char *terminator, - unsigned int timeout, - unsigned int poll_channel); + char *buf, + unsigned int buflen, + unsigned int maxdigits, + const char *terminators, + char *terminator, + unsigned int timeout); /*!
> .merge-right.r1490 @@ -171,6 +169,15 @@ unsigned int buflen);
+SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session, + switch_speech_handle_t *sh, + switch_codec_t *codec, + switch_timer_t *timer, + switch_dtmf_callback_function_t dtmf_callback, + char *text, + void *buf, + unsigned int buflen); + /*! \brief Speak given text with given tts engine \param session the session to speak on @@ -185,14 +192,15 @@ \return SWITCH_STATUS_SUCCESS if all is well */ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session, - char *tts_name, - char *voice_name, - char *timer_name, - uint32_t rate, - switch_dtmf_callback_function_t dtmf_callback, - char *text, - void *buf, - unsigned int buflen); + char *tts_name, + char *voice_name, + char *timer_name, + uint32_t rate, + switch_dtmf_callback_function_t dtmf_callback, + char *text, + void *buf, + unsigned int buflen); + /*! \brief Bridge Audio from one session to another Modified: freeswitch/branches/mishehu/src/include/switch_module_interfaces.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_module_interfaces.h (original) +++ freeswitch/branches/mishehu/src/include/switch_module_interfaces.h Sat Jun 10 17:47:13 2006 @@ -327,6 +327,10 @@ switch_size_t *datalen, uint32_t *rate, switch_speech_flag_t *flags); + void (*speech_flush_tts)(switch_speech_handle_t *sh); + void (*speech_text_param_tts)(switch_speech_handle_t *sh, char *param, char *val); + void (*speech_numeric_param_tts)(switch_speech_handle_t *sh, char *param, int val); + void (*speech_float_param_tts)(switch_speech_handle_t *sh, char *param, double val); const struct switch_speech_interface *next; }; @@ -338,7 +342,13 @@ const switch_speech_interface_t *speech_interface; /*! flags to control behaviour */ uint32_t flags; - + /*! The Name*/ + char *name; + /*! The Rate*/ + uint32_t rate; + uint32_t speed; + char voice[80]; + char engine[80]; /*! the handle's memory pool */ switch_memory_pool_t *memory_pool; /*! private data for the format module to store handle specific info */ Modified: freeswitch/branches/mishehu/src/include/switch_types.h ============================================================================== --- freeswitch/branches/mishehu/src/include/switch_types.h (original) +++ freeswitch/branches/mishehu/src/include/switch_types.h Sat Jun 10 17:47:13 2006 @@ -92,8 +92,8 @@ #define SWITCH_MAX_STATE_HANDLERS 30 #define SWITCH_TRUE 1 #define SWITCH_FALSE 0 +#define SWITCH_CORE_QUEUE_LEN 20000 - typedef enum { SWITCH_XML_SECTION_RESULT = 0, SWITCH_XML_SECTION_CONFIG = (1 << 0), @@ -231,6 +231,7 @@ SWITCH_STATUS_BREAK - A non-fatal break of an operation SWITCH_STATUS_SOCKERR - A socket error SWITCH_STATUS_MORE_DATA - Need More Data + SWITCH_STATUS_NOTFOUND - Not Found </pre> */ typedef enum { @@ -247,7 +248,8 @@ SWITCH_STATUS_INUSE, SWITCH_STATUS_BREAK, SWITCH_STATUS_SOCKERR, - SWITCH_STATUS_MORE_DATA + SWITCH_STATUS_MORE_DATA, + SWITCH_STATUS_NOTFOUND } switch_status_t; @@ -342,6 +344,7 @@ CF_LOCK_THREAD = (1 << 6) - Prevent the channel thread from exiting while this flag is set CF_BRIDGED = (1 << 7) - Channel in a bridge CF_HOLD = (1 << 8) - Channel is on hold +CF_SERVICE = (1 << 9) - Channel has a service thread </pre> */ @@ -354,7 +357,8 @@ CF_ACCEPT_CNG = (1 << 5), CF_LOCK_THREAD = (1 << 6), CF_BRIDGED = (1 << 7), - CF_HOLD = (1 << 8) + CF_HOLD = (1 << 8), + CF_SERVICE = (1 << 9) } switch_channel_flag_t; @@ -422,6 +426,7 @@ SWITCH_SPEECH_FLAG_PEEK = (1 << 3) - Read data but do not erase it. SWITCH_SPEECH_FLAG_FREE_POOL = (1 << 4) - Free interface's pool on destruction. SWITCH_SPEECH_FLAG_BLOCKING = (1 << 5) - Indicate that a blocking call is desired +SWITCH_SPEECH_FLAG_PAUSE = (1 << 6) - Pause toggle for playback </pre> */ typedef enum { @@ -431,6 +436,7 @@ SWITCH_SPEECH_FLAG_PEEK = (1 << 3), SWITCH_SPEECH_FLAG_FREE_POOL = (1 << 4), SWITCH_SPEECH_FLAG_BLOCKING = (1 << 5), + SWITCH_SPEECH_FLAG_PAUSE = (1 << 6) } switch_speech_flag_t; Modified: freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.c (original) +++ freeswitch/branches/mishehu/src/mod/applications/mod_ivrtest/mod_ivrtest.c Sat Jun 10 17:47:13 2006 @@ -183,7 +183,7 @@ } } - if (switch_ivr_collect_digits_count(session, buf, sizeof(buf), 10, "#*", &term, 10000, 1) != SWITCH_STATUS_SUCCESS) { + if (switch_ivr_collect_digits_count(session, buf, sizeof(buf), 10, "#*", &term, 10000) != SWITCH_STATUS_SUCCESS) { switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); break; } Modified: freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c (original) +++ freeswitch/branches/mishehu/src/mod/applications/mod_playback/mod_playback.c Sat Jun 10 17:47:13 2006 @@ -49,6 +49,43 @@ } +static void speak_function(switch_core_session_t *session, char *data) +{ + switch_channel_t *channel; + char buf[10]; + char *argv[4] = {0}; + int argc; + char *engine = NULL; + char *voice = NULL; + char *text = NULL; + char *timer_name = NULL; + char *mydata = NULL; + switch_codec_t *codec; + + codec = switch_core_session_get_read_codec(session); + assert(codec != NULL); + + channel = switch_core_session_get_channel(session); + assert(channel != NULL); + + mydata = switch_core_session_strdup(session, data); + argc = switch_separate_string(mydata, '|', argv, sizeof(argv)/sizeof(argv[0])); + + engine = argv[0]; + voice = argv[1]; + text = argv[2]; + timer_name = argv[3]; + + if (!(engine && voice && text)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Params!\n"); + switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); + } + + switch_channel_answer(channel); + switch_ivr_speak_text(session, engine, voice, timer_name, codec->implementation->samples_per_second, on_dtmf, text, buf, sizeof(buf)); + +} + static void playback_function(switch_core_session_t *session, char *data) { switch_channel_t *channel; @@ -85,9 +122,17 @@ } + +static const switch_application_interface_t speak_application_interface = { + /*.interface_name */ "speak", + /*.application_function */ speak_function +}; + static const switch_application_interface_t record_application_interface = { /*.interface_name */ "record", - /*.application_function */ record_function + /*.application_function */ record_function, + NULL,NULL,NULL, + &speak_application_interface }; static const switch_application_interface_t playback_application_interface = { Modified: freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.c (original) +++ freeswitch/branches/mishehu/src/mod/asr_tts/mod_cepstral/mod_cepstral.c Sat Jun 10 17:47:13 2006 @@ -36,6 +36,8 @@ #include <swift.h> #include <switch.h> +#define MY_BUF_LEN 1024 * 256 + static const char modname[] = "mod_cepstral"; static swift_engine *engine; @@ -59,23 +61,42 @@ cepstral_t *cepstral; swift_event_t rv = SWIFT_SUCCESS; void *buf = NULL; - int len = 0; + int len = 0, i = 0; cepstral = udata; assert(cepstral != NULL); + if (!cepstral->port || cepstral->done || cepstral->done_gen) { + return SWIFT_UNKNOWN_ERROR; + } + /* Only proceed when we have success */ if (!SWIFT_FAILED((rv = swift_event_get_audio(event, &buf, &len)))) { - switch_mutex_lock(cepstral->audio_lock); - - if (switch_buffer_write(cepstral->audio_buffer, buf, len) <= 0) { - rv = SWIFT_UNKNOWN_ERROR; + while(!cepstral->done) { + switch_mutex_lock(cepstral->audio_lock); + if (switch_buffer_write(cepstral->audio_buffer, buf, len) > 0) { + switch_mutex_unlock(cepstral->audio_lock); + break; + } + switch_mutex_unlock(cepstral->audio_lock); + if (!cepstral->done) { + for (i = 0; i < 10; i++) { + switch_yield(10000); + if (cepstral->done) { + break; + } + } + } + } - switch_mutex_unlock(cepstral->audio_lock); } else { cepstral->done = 1; } + if (cepstral->done) { + rv = SWIFT_UNKNOWN_ERROR; + } + return rv; } @@ -92,7 +113,7 @@ return SWITCH_STATUS_MEMERR; } - if (switch_buffer_create(sh->memory_pool, &cepstral->audio_buffer, 1024 * 256) != SWITCH_STATUS_SUCCESS) { + if (switch_buffer_create(sh->memory_pool, &cepstral->audio_buffer, MY_BUF_LEN) != SWITCH_STATUS_SUCCESS) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Write Buffer Failed!\n"); return SWITCH_STATUS_MEMERR; } @@ -131,8 +152,14 @@ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to set voice.\n"); goto all_done; } + + voice_name = (char *) swift_voice_get_attribute(cepstral->voice, "name"); } + if (voice_name) { + switch_copy_string(sh->voice, voice_name, sizeof(sh->voice)); + } + swift_port_set_callback(cepstral->port, &write_audio, SWIFT_EVENT_AUDIO, cepstral); sh->private_info = cepstral; @@ -151,6 +178,10 @@ cepstral = sh->private_info; assert(cepstral != NULL); + + cepstral->done = 1; + cepstral->done_gen = 1; + swift_port_stop(cepstral->port, SWIFT_ASYNC_ANY, SWIFT_EVENT_NOW); /* Close the Swift Port and Engine */ if (NULL != cepstral->port) swift_port_close(cepstral->port); //if (NULL != cepstral->engine) swift_engine_close(cepstral->engine); @@ -164,18 +195,45 @@ static switch_status_t cepstral_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags) { cepstral_t *cepstral; + const char *fp = "file:"; + int len = strlen(fp); assert(sh != NULL); cepstral = sh->private_info; assert(cepstral != NULL); - swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL); - //swift_port_speak_text(cepstral->port, text, 0, NULL, NULL, NULL); + cepstral->done_gen = 0; + cepstral->done = 0; + cepstral->tts_stream = NULL; + if (!strncasecmp(text, fp, len)) { + text += len; + swift_port_speak_file(cepstral->port, text, NULL, &cepstral->tts_stream, NULL); + } else { + swift_port_speak_text(cepstral->port, text, 0, NULL, &cepstral->tts_stream, NULL); + } + return SWITCH_STATUS_FALSE; } +static void cepstral_speech_flush_tts(switch_speech_handle_t *sh) +{ + cepstral_t *cepstral; + + cepstral = sh->private_info; + assert(cepstral != NULL); + + cepstral->done_gen = 1; + cepstral->done = 1; + if (cepstral->audio_buffer) { + switch_mutex_lock(cepstral->audio_lock); + switch_buffer_zero(cepstral->audio_buffer); + switch_mutex_unlock(cepstral->audio_lock); + } + swift_port_stop(cepstral->port, SWIFT_ASYNC_ANY, SWIFT_EVENT_NOW); +} + static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh, void *data, size_t *datalen, @@ -193,18 +251,23 @@ while(!cepstral->done) { if (!cepstral->done_gen) { - int check = (SWIFT_STATUS_RUNNING == swift_port_status(cepstral->port, cepstral->tts_stream)); - if (!check) { + int check = swift_port_status(cepstral->port, cepstral->tts_stream); + + if (!check == SWIFT_STATUS_RUNNING) { cepstral->done_gen = 1; } } + switch_mutex_lock(cepstral->audio_lock); used = switch_buffer_inuse(cepstral->audio_buffer); - + switch_mutex_unlock(cepstral->audio_lock); + + if (!used && cepstral->done_gen) { + + status = SWITCH_STATUS_BREAK; break; } - /* wait for the right amount of data (unless there is no blocking flag) */ if (used < desired) { @@ -243,6 +306,83 @@ return status; } +static void cepstral_text_param_tts(switch_speech_handle_t *sh, char *param, char *val) +{ + cepstral_t *cepstral; + + cepstral = sh->private_info; + assert(cepstral != NULL); + + if (!strcasecmp(param, "voice")) { + char *voice_name = val; + if (!strcasecmp(voice_name, "next")) { + if ((cepstral->voice = swift_port_find_next_voice(cepstral->port))) { + if ( SWIFT_FAILED(swift_port_set_voice(cepstral->port, cepstral->voice)) ) { + cepstral->done = cepstral->done_gen = 1; + return; + } + voice_name = (char *) swift_voice_get_attribute(cepstral->voice, "name"); + } else { + voice_name = NULL; + } + } else { + if (voice_name && SWIFT_FAILED(swift_port_set_voice_by_name(cepstral->port, voice_name))) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid voice %s!\n", voice_name); + voice_name = NULL; + } + } + + if (!voice_name) { + /* Find the first voice on the system */ + if ((cepstral->voice = swift_port_find_first_voice(cepstral->port, NULL, NULL)) == NULL) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to find any voices!\n"); + cepstral->done = cepstral->done_gen = 1; + return; + } + + /* Set the voice found by find_first_voice() as the port's current voice */ + if ( SWIFT_FAILED(swift_port_set_voice(cepstral->port, cepstral->voice)) ) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to set voice.\n"); + cepstral->done = cepstral->done_gen = 1; + return; + } + + voice_name = (char *) swift_voice_get_attribute(cepstral->voice, "name"); + } + + if (voice_name) { + switch_copy_string(sh->voice, voice_name, sizeof(sh->voice)); + } + + return; + } + + swift_port_set_param_string(cepstral->port, param, val, NULL); +} + +static void cepstral_numeric_param_tts(switch_speech_handle_t *sh, char *param, int val) +{ + cepstral_t *cepstral; + + cepstral = sh->private_info; + assert(cepstral != NULL); + + swift_port_set_param_int(cepstral->port, param, val, NULL); + +} + + +static void cepstral_float_param_tts(switch_speech_handle_t *sh, char *param, double val) +{ + cepstral_t *cepstral; + + cepstral = sh->private_info; + assert(cepstral != NULL); + + swift_port_set_param_float(cepstral->port, param, val, NULL); + +} + static const switch_speech_interface_t cepstral_speech_interface = { /*.interface_name*/ "cepstral", /*.speech_open*/ cepstral_speech_open, @@ -250,8 +390,11 @@ /*.speech_feed_asr*/ NULL, /*.speech_interpret_asr*/ NULL, /*.speech_feed_tts*/ cepstral_speech_feed_tts, - /*.speech_read_tts*/ cepstral_speech_read_tts - + /*.speech_read_tts*/ cepstral_speech_read_tts, + /*.speech_flush_tts*/ cepstral_speech_flush_tts, + /*.speech_text_param_tts*/ cepstral_text_param_tts, + /*.speech_numeric_param_tts*/ cepstral_numeric_param_tts, + /*.speech_numeric_param_tts*/ cepstral_float_param_tts }; static const switch_loadable_module_interface_t cepstral_module_interface = { Modified: freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original) +++ freeswitch/branches/mishehu/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Sat Jun 10 17:47:13 2006 @@ -236,8 +236,6 @@ proceed = parse_exten(session, xexten, &extension); - //printf("ASS %s %d\n", (char *) switch_xml_attr_soft(xexten, "name"), proceed); - if (proceed && !switch_true(cont)) { break; } Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original) +++ freeswitch/branches/mishehu/src/mod/endpoints/mod_dingaling/mod_dingaling.c Sat Jun 10 17:47:13 2006 @@ -1235,6 +1235,12 @@ static switch_status_t dl_logout(char *profile_name, switch_stream_handle_t *stream) { struct mdl_profile *profile; + + if (!profile_name) { + stream->write_function(stream, "NO PROFILE NAME SPECIFIED\n"); + return SWITCH_STATUS_SUCCESS; + } + if ((profile = switch_core_hash_find(globals.profile_hash, profile_name))) { ldl_handle_stop(profile->handle); stream->write_function(stream, "OK\n"); Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c (original) +++ freeswitch/branches/mishehu/src/mod/endpoints/mod_exosip/mod_exosip.c Sat Jun 10 17:47:13 2006 @@ -76,7 +76,8 @@ TFLAG_VAD_IN = ( 1 << 12), TFLAG_VAD_OUT = ( 1 << 13), TFLAG_VAD = ( 1 << 14), - TFLAG_TIMER = ( 1 << 15) + TFLAG_TIMER = ( 1 << 15), + TFLAG_AA = (1 << 16) } TFLAGS; @@ -539,6 +540,10 @@ flags |= SWITCH_RTP_FLAG_USE_TIMER; } + if (switch_test_flag(tech_pvt, TFLAG_AA)) { + flags |= SWITCH_RTP_FLAG_AUTOADJ; + } + tech_pvt->rtp_session = switch_rtp_new(tech_pvt->local_sdp_audio_ip, tech_pvt->local_sdp_audio_port, tech_pvt->remote_sdp_audio_ip, @@ -1570,8 +1575,11 @@ } - expires = get_header_value(je, "expires"); - exptime = time(NULL) + atoi(expires) + 20; + if ((expires = get_header_value(je, "expires"))) { + exptime = time(NULL) + atoi(expires) + 20; + } else { + exptime = time(NULL) + 3600; + } if (!find_reg_url(globals.db, je->request->from->url->username, sql, sizeof(sql))) { @@ -1933,6 +1941,8 @@ globals.debug = atoi(val); } else if (!strcmp(var, "use-rtp-timer") && switch_true(val)) { switch_set_flag(&globals, TFLAG_TIMER); + } else if (!strcmp(var, "use-rtp-auto-adjust") && switch_true(val)) { + switch_set_flag(&globals, TFLAG_AA); } else if (!strcmp(var, "port")) { globals.port = atoi(val); } else if (!strcmp(var, "rfc2833-pt")) { Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_portaudio.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original) +++ freeswitch/branches/mishehu/src/mod/endpoints/mod_portaudio/mod_portaudio.c Sat Jun 10 17:47:13 2006 @@ -409,7 +409,31 @@ return SWITCH_STATUS_SUCCESS; } +static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg) +{ + switch_channel_t *channel; + struct private_object *tech_pvt; + + channel = switch_core_session_get_channel(session); + assert(channel != NULL); + + tech_pvt = switch_core_session_get_private(session); + assert(tech_pvt != NULL); + + switch (msg->message_id) { + case SWITCH_MESSAGE_INDICATE_PROGRESS: + { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Engage Early Media\n"); + switch_set_flag(tech_pvt, TFLAG_IO); + } + default: + break; + } + return SWITCH_STATUS_SUCCESS; +} + + static switch_api_interface_t send_dtmf_interface = { /*.interface_name */ "padtmf", /*.desc */ "PortAudio Dial DTMF", @@ -462,7 +486,8 @@ /*.kill_channel */ channel_kill_channel, /*.waitfor_read */ channel_waitfor_read, /*.waitfor_write */ channel_waitfor_write, - /*.send_dtmf */ channel_send_dtmf + /*.send_dtmf */ channel_send_dtmf, + /*.receive_message*/ channel_receive_message }; static const switch_endpoint_interface_t channel_endpoint_interface = { Modified: freeswitch/branches/mishehu/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original) +++ freeswitch/branches/mishehu/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Sat Jun 10 17:47:13 2006 @@ -566,8 +566,8 @@ while (bytes > 0) { unsigned int towrite; -#if 0 - if (sangoma_socket_waitfor(tech_pvt->socket, -1, POLLOUT | POLLERR | POLLHUP) <= 0) { +#if 1 + if (sangoma_socket_waitfor(tech_pvt->socket, 1000, POLLOUT | POLLERR | POLLHUP) <= 0) { return SWITCH_STATUS_GENERR; } #endif @@ -577,11 +577,17 @@ #endif towrite = bytes >= globals.mtu ? globals.mtu : bytes; + if (towrite < globals.mtu) { + int diff = globals.mtu - towrite; + memset(bp + towrite, 0, diff); + towrite = globals.mtu; + } + result = sangoma_sendmsg_socket(tech_pvt->socket, &tech_pvt->hdrframe, sizeof(tech_pvt->hdrframe), bp, towrite, 0); if (result < 0) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, - "Bad Write frame len %u write %d bytes returned %d (%s)!\n", frame->datalen, + "Bad Write frame len %u write %d bytes returned %d (%s)!\n", towrite, globals.mtu, result, strerror(errno)); if (errno == EBUSY) { continue; Modified: freeswitch/branches/mishehu/src/mod/languages/mod_perl/Makefile ============================================================================== --- freeswitch/branches/mishehu/src/mod/languages/mod_perl/Makefile (original) +++ freeswitch/branches/mishehu/src/mod/languages/mod_perl/Makefile Sat Jun 10 17:47:13 2006 @@ -23,7 +23,7 @@ reswig: rm switch_swig_wrap.c - swig -DMULTIPLICITY -perl5 -module fs_perl switch_swig.c + swig -lswitch_swig.i -ignoremissing -DMULTIPLICITY -perl5 -module fs_perl switch_swig.c switch_swig_wrap.o: switch_swig_wrap.c $(CC) -w $(CFLAGS) -c $< -o $@ Modified: freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig.c (original) +++ freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig.c Sat Jun 10 17:47:13 2006 @@ -18,12 +18,13 @@ int fs_core_init(char *path) { switch_status_t status; + const char *err = NULL; if (switch_strlen_zero(path)) { path = NULL; } - status = switch_core_init(path); + status = switch_core_init(path, &err); return status == SWITCH_STATUS_SUCCESS ? 1 : 0; } @@ -81,10 +82,10 @@ switch_channel_pre_answer(channel); } -void fs_channel_hangup(switch_core_session_t *session) +void fs_channel_hangup(switch_core_session_t *session, char *cause) { switch_channel_t *channel = switch_core_session_get_channel(session); - switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + switch_channel_hangup(channel, switch_channel_str2cause(cause)); } void fs_channel_set_variable(switch_core_session_t *session, char *var, char *val) @@ -104,16 +105,17 @@ switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_state_t fs_state = switch_channel_get_state(channel); - if (!strcmp(state, "EXECUTE")) { - fs_state = CS_EXECUTE; - } else if (!strcmp(state, "TRANSMIT")) { - fs_state = CS_TRANSMIT; + if ((fs_state = switch_channel_name_state(state)) < CS_HANGUP) { + switch_channel_set_state(channel, fs_state); } - - switch_channel_set_state(channel, fs_state); } -int fs_ivr_play_file(switch_core_session_t *session, char *file, char *timer_name) +int fs_ivr_play_file(switch_core_session_t *session, + char *file, + char *timer_name, + switch_dtmf_callback_function_t dtmf_callback, + void *buf, + unsigned int buflen) { switch_status_t status; if (switch_strlen_zero(timer_name)) { Modified: freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig_wrap.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig_wrap.c (original) +++ freeswitch/branches/mishehu/src/mod/languages/mod_perl/switch_swig_wrap.c Sat Jun 10 17:47:13 2006 @@ -991,9 +991,10 @@ /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_switch_core_session swig_types[0] -static swig_type_info *swig_types[2]; -static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0}; +#define SWIGTYPE_p_switch_core_session_t swig_types[0] +#define SWIGTYPE_p_switch_dtmf_callback_function_t swig_types[1] +static swig_type_info *swig_types[3]; +static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1017,6 +1018,9 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); #endif + +#include <switch.h> + #ifdef PERL_OBJECT #define MAGIC_CLASS _wrap_fs_perl_var:: class _wrap_fs_perl_var : public CPerlObj { @@ -1044,6 +1048,9 @@ int argvi = 0; dXSARGS; + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fs_core_set_globals();"); + } fs_core_set_globals(); @@ -1085,6 +1092,9 @@ int argvi = 0; dXSARGS; + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fs_core_destroy();"); + } result = (int)fs_core_destroy(); ST(argvi) = sv_newmortal(); @@ -1103,6 +1113,9 @@ int argvi = 0; dXSARGS; + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fs_loadable_module_init();"); + } result = (int)fs_loadable_module_init(); ST(argvi) = sv_newmortal(); @@ -1121,6 +1134,9 @@ int argvi = 0; dXSARGS; + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fs_loadable_module_shutdown();"); + } result = (int)fs_loadable_module_shutdown(); ST(argvi) = sv_newmortal(); @@ -1139,7 +1155,9 @@ int argvi = 0; dXSARGS; - + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: fs_console_loop();"); + } result = (int)fs_console_loop(); ST(argvi) = sv_newmortal(); @@ -1199,7 +1217,7 @@ XS(_wrap_fs_core_session_locate) { { char *arg1 = (char *) 0 ; - struct switch_core_session *result; + switch_core_session_t *result; int argvi = 0; dXSARGS; @@ -1208,10 +1226,10 @@ } if (!SvOK((SV*) ST(0))) arg1 = 0; else arg1 = (char *) SvPV(ST(0), PL_na); - result = (struct switch_core_session *)fs_core_session_locate(arg1); + result = (switch_core_session_t *)fs_core_session_locate(arg1); ST(argvi) = sv_newmortal(); - SWIG_MakePtr(ST(argvi++), (void *) result, SWIGTYPE_p_switch_core_session, 0|0); + SWIG_MakePtr(ST(argvi++), (void *) result, SWIGTYPE_p_switch_core_session_t, 0|0); XSRETURN(argvi); fail: ; @@ -1222,7 +1240,7 @@ XS(_wrap_fs_channel_answer) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; int argvi = 0; dXSARGS; @@ -1230,8 +1248,8 @@ SWIG_croak("Usage: fs_channel_answer(session);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_answer. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_answer. Expected _p_switch_core_session_t"); } } fs_channel_answer(arg1); @@ -1247,7 +1265,7 @@ XS(_wrap_fs_channel_pre_answer) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; int argvi = 0; dXSARGS; @@ -1255,8 +1273,8 @@ SWIG_croak("Usage: fs_channel_pre_answer(session);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_pre_answer. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_pre_answer. Expected _p_switch_core_session_t"); } } fs_channel_pre_answer(arg1); @@ -1272,19 +1290,22 @@ XS(_wrap_fs_channel_hangup) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + char *arg2 = (char *) 0 ; int argvi = 0; dXSARGS; - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: fs_channel_hangup(session);"); + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: fs_channel_hangup(session,cause);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_hangup. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_hangup. Expected _p_switch_core_session_t"); } } - fs_channel_hangup(arg1); + if (!SvOK((SV*) ST(1))) arg2 = 0; + else arg2 = (char *) SvPV(ST(1), PL_na); + fs_channel_hangup(arg1,arg2); XSRETURN(argvi); @@ -1297,7 +1318,7 @@ XS(_wrap_fs_channel_set_variable) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; int argvi = 0; @@ -1307,8 +1328,8 @@ SWIG_croak("Usage: fs_channel_set_variable(session,var,val);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_set_variable. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_set_variable. Expected _p_switch_core_session_t"); } } if (!SvOK((SV*) ST(1))) arg2 = 0; @@ -1328,7 +1349,7 @@ XS(_wrap_fs_channel_get_variable) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; char *arg2 = (char *) 0 ; int argvi = 0; dXSARGS; @@ -1337,8 +1358,8 @@ SWIG_croak("Usage: fs_channel_get_variable(session,var);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_get_variable. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_get_variable. Expected _p_switch_core_session_t"); } } if (!SvOK((SV*) ST(1))) arg2 = 0; @@ -1356,7 +1377,7 @@ XS(_wrap_fs_channel_set_state) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; char *arg2 = (char *) 0 ; int argvi = 0; dXSARGS; @@ -1365,8 +1386,8 @@ SWIG_croak("Usage: fs_channel_set_state(session,state);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_channel_set_state. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_channel_set_state. Expected _p_switch_core_session_t"); } } if (!SvOK((SV*) ST(1))) arg2 = 0; @@ -1384,26 +1405,42 @@ XS(_wrap_fs_ivr_play_file) { { - struct switch_core_session *arg1 = (struct switch_core_session *) 0 ; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; + switch_dtmf_callback_function_t arg4 ; + void *arg5 = (void *) 0 ; + unsigned int arg6 ; int result; int argvi = 0; dXSARGS; - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: fs_ivr_play_file(session,file,timer_name_in);"); + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: fs_ivr_play_file(session,file,timer_name,dtmf_callback,buf,buflen);"); } { - if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session,0) < 0) { - SWIG_croak("Type error in argument 1 of fs_ivr_play_file. Expected _p_switch_core_session"); + if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) { + SWIG_croak("Type error in argument 1 of fs_ivr_play_file. Expected _p_switch_core_session_t"); } } if (!SvOK((SV*) ST(1))) arg2 = 0; else arg2 = (char *) SvPV(ST(1), PL_na); if (!SvOK((SV*) ST(2))) arg3 = 0; else arg3 = (char *) SvPV(ST(2), PL_na); - result = (int)fs_ivr_play_file(arg1,arg2,arg3); + { + switch_dtmf_callback_function_t * argp; + if (SWIG_ConvertPtr(ST(3),(void **) &argp, SWIGTYPE_p_switch_dtmf_callback_function_t,0) < 0) { + SWIG_croak("Type error in argument 4 of fs_ivr_play_file. Expected _p_switch_dtmf_callback_function_t"); + } + arg4 = *argp; + } + { + if (SWIG_ConvertPtr(ST(4), (void **) &arg5, 0,0) < 0) { + SWIG_croak("Type error in argument 5 of fs_ivr_play_file. Expected _p_void"); + } + } + arg6 = (unsigned int) SvUV(ST(5)); + result = (int)fs_ivr_play_file(arg1,arg2,arg3,arg4,arg5,arg6); ST(argvi) = sv_newmortal(); sv_setiv(ST(argvi++), (IV) result); @@ -1418,16 +1455,20 @@ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static swig_type_info _swigt__p_switch_core_session = {"_p_switch_core_session", "struct switch_core_session *", 0, 0, 0}; +static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, 0}; +static swig_type_info _swigt__p_switch_dtmf_callback_function_t = {"_p_switch_dtmf_callback_function_t", "switch_dtmf_callback_function_t *", 0, 0, 0}; static swig_type_info *swig_type_initial[] = { - &_swigt__p_switch_core_session, + &_swigt__p_switch_core_session_t, + &_swigt__p_switch_dtmf_callback_function_t, }; -static swig_cast_info _swigc__p_switch_core_session[] = { {&_swigt__p_switch_core_session, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_switch_dtmf_callback_function_t[] = { {&_swigt__p_switch_dtmf_callback_function_t, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { - _swigc__p_switch_core_session, + _swigc__p_switch_core_session_t, + _swigc__p_switch_dtmf_callback_function_t, }; Modified: freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original) +++ freeswitch/branches/mishehu/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Sat Jun 10 17:47:13 2006 @@ -559,9 +559,7 @@ char *buf; int digits; int32 timeout = 5000; - int32 poll_chan = 1; - if (argc > 0) { char term; digits = atoi(JS_GetStringBytes(JS_ValueToString(cx, argv[0]))); @@ -571,11 +569,9 @@ if (argc > 2) { JS_ValueToInt32(cx, argv[2], &timeout); } - if (argc > 3) { - JS_ValueToInt32(cx, argv[3], &poll_chan); - } + buf = switch_core_session_alloc(jss->session, digits); - switch_ivr_collect_digits_count(jss->session, buf, digits, digits, terminators, &term, timeout, poll_chan ? SWITCH_TRUE : SWITCH_FALSE); + switch_ivr_collect_digits_count(jss->session, buf, digits, digits, terminators, &term, timeout); *rval = STRING_TO_JSVAL ( JS_NewStringCopyZ(cx, buf) ); return JS_TRUE; } @@ -2003,7 +1999,7 @@ if (code[0] == '/') { script = JS_CompileFile(cx, obj, code); } else { - snprintf(path, sizeof(path), "%s/%s", SWITCH_GLOBAL_dirs.script_dir, code); + snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR, code); script = JS_CompileFile(cx, obj, path); } } Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp ============================================================================== --- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp (original) +++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.cpp Sat Jun 10 17:47:13 2006 @@ -20,7 +20,7 @@ errorstate = 0; } -BaseCDR::BaseCDR(switch_channel *channel) +BaseCDR::BaseCDR(switch_channel *channel,switch_channel_timetable_t *temptimes,switch_caller_extension_t *tempcallerextension,switch_caller_profile_t *tempcallerprofile, switch_caller_profile_t *temporiginateprofile,bool& temporiginate) { if(channel != 0) { @@ -29,6 +29,7 @@ memset(myuuid,0,37); memset(destuuid,0,37); memset(dialplan,0,80); + memset(&hangupcause,0,sizeof(hangupcause)); memset(src,0,80); memset(dst,0,80); memset(srcchannel,0,80); @@ -45,23 +46,10 @@ */ } - tempchannel = channel; -} - -BaseCDR::~BaseCDR() -{ - -} - -void BaseCDR::process_channel() -{ - switch_channel_timetable_t *temptimes; - temptimes = switch_channel_get_timetable(tempchannel); callstartdate= temptimes->created; callanswerdate = temptimes->answered; callenddate = temptimes->hungup; - switch_caller_profile *tempcallerprofile = switch_channel_get_caller_profile(tempchannel); strncpy(clid,tempcallerprofile->caller_id_name,strlen(tempcallerprofile->caller_id_name)); strncat(clid," ",1); strncat(clid,tempcallerprofile->caller_id_number,strlen(clid)+strlen(tempcallerprofile->caller_id_number)); @@ -80,37 +68,17 @@ switch_console_printf(SWITCH_CHANNEL_CONSOLE, "BaseCDR::BaseCDR(switch_channel*) - Channel caller_profile loaded.\n"); - //char channeluuid[] = switch_channel_get_uuid(channel); + originated = temporiginate; + + strncpy(destuuid,temporiginateprofile->uuid,strlen(temporiginateprofile->uuid)); + strncpy(dst,tempcallerprofile->caller_id_number,strlen(tempcallerprofile->caller_id_number)); + strncpy(src,tempcallerprofile->caller_id_number,strlen(tempcallerprofile->caller_id_number)); + strncpy(dstchannel,temporiginateprofile->chan_name,strlen(temporiginateprofile->chan_name)); - switch_caller_profile *temporiginateprofile; // This is a temp pointer for either originator_caller_profile or originatee_caller_profile - temporiginateprofile = switch_channel_get_originator_caller_profile(tempchannel); - - if(temporiginateprofile != 0) - { - // Then we are the dialed party - originated=0; - //strncpy(dst,temporiginateprofile->caller_id_number,strlen(temporiginateprofile->caller_id_number)); - strncpy(destuuid,temporiginateprofile->uuid,strlen(temporiginateprofile->uuid)); - strncpy(src,tempcallerprofile->destination_number,strlen(tempcallerprofile->destination_number)); - strncpy(dst,tempcallerprofile->caller_id_number,strlen(tempcallerprofile->caller_id_number)); - strncpy(dstchannel,temporiginateprofile->chan_name,strlen(temporiginateprofile->chan_name)); - } - else - { - // We are the calling party - temporiginateprofile = switch_channel_get_originatee_caller_profile(tempchannel); - originated=1; - //strncpy(dst,temporiginateprofile->caller_id_number,strlen(temporiginateprofile->caller_id_number)); - strncpy(destuuid,temporiginateprofile->uuid,strlen(temporiginateprofile->uuid)); - strncpy(src,tempcallerprofile->caller_id_number,strlen(tempcallerprofile->caller_id_number)); - strncpy(dst,tempcallerprofile->destination_number,strlen(tempcallerprofile->destination_number)); - strncpy(dstchannel,temporiginateprofile->chan_name,strlen(temporiginateprofile->chan_name)); - } - strncpy(myuuid,tempcallerprofile->uuid,strlen(tempcallerprofile->uuid)); strncpy(srcchannel,tempcallerprofile->chan_name,strlen(tempcallerprofile->chan_name)); - if(switch_channel_test_flag(tempchannel,CF_ANSWERED)) + if(switch_channel_test_flag(channel,CF_ANSWERED)) { disposition=1; billusec = temptimes->hungup - temptimes->answered; @@ -121,18 +89,20 @@ billusec = 0; } + // What was the hangup cause? + hangupcause = switch_channel_get_cause(channel); + hangupcause_text = switch_channel_cause2str(hangupcause); + switch_console_printf(SWITCH_CHANNEL_CONSOLE, "BaseCDR::BaseCDR(switch_channel*) - Call state & length calculated.\n"); - switch_caller_extension *tempcallerextension; - tempcallerextension = switch_channel_get_caller_extension(tempchannel); if(tempcallerextension != 0) if(tempcallerextension->last_application != 0) - { - if(tempcallerextension->last_application->application_name != 0) - strncpy(lastapp,tempcallerextension->last_application->application_name,strlen(tempcallerextension->last_application->application_name)); - if(tempcallerextension->last_application->application_data != 0) - strncpy(lastdata,tempcallerextension->last_application->application_data,strlen(tempcallerextension->last_application->application_data)); - } + { + if(tempcallerextension->last_application->application_name != 0) + strncpy(lastapp,tempcallerextension->last_application->application_name,strlen(tempcallerextension->last_application->application_name)); + if(tempcallerextension->last_application->application_data != 0) + strncpy(lastdata,tempcallerextension->last_application->application_data,strlen(tempcallerextension->last_application->application_data)); + } amaflags=0; // For future use I guess? I don't see anything in the docs about this /* @@ -141,9 +111,14 @@ strncpy(userfield," ",1); // So we can't add these yet */ switch_console_printf(SWITCH_CHANNEL_CONSOLE, "BaseCDR::BaseCDR(switch_channel*) - Processing completed.\n"); + } -void BaseCDR::process_channel_variables() +BaseCDR::~BaseCDR() { - // Need to implement -} \ No newline at end of file + +} + +void BaseCDR::process_channel() +{ +} Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h ============================================================================== --- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h (original) +++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/basecdr.h Sat Jun 10 17:47:13 2006 @@ -24,10 +24,8 @@ public: BaseCDR(); virtual ~BaseCDR(); - BaseCDR(switch_channel_t *channel); - BaseCDR(const BaseCDR& copyFrom); - void process_channel(switch_channel *channel); - void process_caller_profiles(switch_channel *channel); + BaseCDR(switch_channel_t *channel,switch_channel_timetable_t *temptimes,switch_caller_extension_t *tempcallerextension,switch_caller_profile_t *tempcallerprofile, switch_caller_profile_t *temporiginateprofile,bool& temporiginate); + //BaseCDR(const BaseCDR& copyFrom); virtual void connect(switch_xml_t *cfg, switch_xml_t *xml, switch_xml_t *settings, switch_xml_t *param) = 0; virtual void disconnect() = 0; virtual bool process_record() = 0; @@ -40,6 +38,8 @@ switch_time_t callstartdate; switch_time_t callanswerdate; switch_time_t callenddate; + switch_call_cause_t hangupcause; + char *hangupcause_text; char clid[80]; bool originated; // Did they originate this call? char dialplan[80]; Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h ============================================================================== --- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h (original) +++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/baseregistry.h Sat Jun 10 17:47:13 2006 @@ -6,12 +6,12 @@ #ifdef __cplusplus #include <vector> -template<class T> BaseCDR* basecdr_factory(channel) +template<class T> BaseCDR* basecdr_factory(channel,temptimes,tempcallerextension,tempcallerprofile, temporiginateprofile,temporiginate) { - return new T(channel); + return new T(channel,temptimes,tempcallerextension,tempcallerprofile,temporiginateprofile,temporiginate); } -typedef BaseCDR* (*basecdr_creator)(switch_channel *channel); +typedef BaseCDR* (*basecdr_creator)(switch_channel_t *channel,switch_channel_timetable_t *temptimes,switch_caller_extension_t *tempcallerextension,switch_caller_profile_t *tempcallerprofile, switch_caller_profile_t *temporiginateprofile,bool& temporiginate); class BaseRegistry { Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp ============================================================================== --- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp (original) +++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.cpp Sat Jun 10 17:47:13 2006 @@ -16,7 +16,20 @@ char *configfile = "mod_cdr.conf"; switch_xml_t cfg, xml, settings, param; - + + switch_channel_timetable_t *temptimetable = new switch_channel_timetable_t; + memset(0,temptimetable,sizeof(*temptimetable)); + + switch_channel_caller_extension_t *tempcallerextension = new switch_channel_caller_extension_t; + memset(0,tempcallerextension,sizeof(*tempcallerextension)); + + switch_channel_caller_profile_t *tempcallerprofile, *temporiginateprofile; + tempcallerprofile = new switch_channel_caller_profile; + temporiginateprofile = new switch_channel_caller_profile; + memset(0,tempcallerprofile,sizeof(*tempcallerprofile)); + memset(0,temporiginateprofile,sizeof(*temporiginateprofile)); + bool temporiginate = 0; + if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf); else @@ -25,13 +38,18 @@ for(BaseRegistry::iterator it = registry.begin(); it != registry.end(); ++it) { basecdr_creator func = *it; - BaseCDR* _ptr = func(channel); + BaseCDR* _ptr = func(channel,temptimes,tempcallerextension,tempcallerprofile,temporiginateprofile,temporiginate); std::auto_ptr<BaseCDR> ptr(_ptr); ptr->connect(&cfg,&xml,&settings,¶m); } } switch_xml_free(xml); + + delete temptimetable; + delete tempcallerextension; + delete tempcallerprofile; + delete temporiginateprofile; } CDRContainer::~CDRContainer() @@ -59,17 +77,57 @@ for(BaseRegistry::iterator it = registry.begin(); it != registry.end(); ++it) { // Since we are now tracking transfers, etc, a call may have additional records in it - do { - basecdr_creator func = *it; - BaseCDR* newloggerobject = func(channel); - newloggerobject->process_channel(); - newloggerobject->process_caller_profiles(); - switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding a new logger object to the queue.\n"); - switch_queue_push(cdrqueue,newloggerobject); - } while (increment_next()); + // Get out the channel stuff that is a linked list + switch_channel_timetable_t *temptimes; + temptimes = switch_channel_get_timetable(channel); + + switch_caller_extension *tempcallerextension; + tempcallerextension = switch_channel_get_caller_extension(channel); + + switch_caller_profile *tempcallerprofile = switch_channel_get_caller_profile(channel); + + switch_caller_profile *temporiginateprofile; // This is a temp pointer for either originator_caller_profile or originatee_caller_profile + temporiginateprofile = switch_channel_get_originator_caller_profile(channel); + + /* + First time it might be originator profile, or originatee. Second and + after is always going to be originatee profile. + */ + + bool temporiginate = 0; + if(temporiginateprofile != 0) + { + add_to_queue(channel,temptimes,tempcallerextension,tempcallerprofile,temporiginateprofile,temporiginate); + if(timetables->next != 0) + { + temporiginateprofile = switch_channel_get_originatee_profile(channel); + temporiginate = 1; + }; + } + else + { + temporiginateprofile = switch_channel_get_originatee_profile(channel); + temporiginate = 1; + add_to_queue(channel,temptimes,tempcallerextension,tempcallerprofile,temporiginateprofile,temporiginate); + } + + while (temptimes->next != 0 && tempcallerextension->next != 0 && tempcallerprofile->next != 0 && temporiginateprofile->next != 0 ) + { + temptimes = temptimes->next; + tempcallerprofile = tempcallerprofile->next; + + } } } +void CDRContainer::add_to_queue(switch_channel_t *channel,switch_channel_timetable_t *temptimes,switch_caller_extension_t *tempcallerextension,switch_caller_profile_t *tempcallerprofile, switch_caller_profile_t *temporiginateprofile,bool& temporiginate); +{ + basecdr_creator func = *it; + BaseCDR* newloggerobject = func(channel,temptimes,tempcallerextension,tempcallerprofile,temporiginateprofile,temporiginate); + switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding a new logger object to the queue.\n"); + switch_queue_push(cdrqueue,newloggerobject); +} + void CDRContainer::process_records() { BaseCDR *tempnewloggerobject = 0, *newloggerobject = 0; @@ -79,40 +137,4 @@ newloggerobject->process_record(); delete newloggerobject; } -} - -// Check if there's more profiles, timetables, etc. and if so increment to the next one -bool CDRContainer::increment_next(switch_channel_t *channel) -{ - bool retval=0; // This is the return value - //switch_channel_timetable_t *temptimes; - //temptimes = switch_channel_get_timetable(channel); - - /* - Here's the rub. - When you have more than one iteration of switch_timetable_t, then you know that - you have more than one caller_profile. But you don't know for sure what else you have. If originator_profile is set, then it is set only once at this time, so it should be handled first. After that, grab as many originatee_profiles as exist, w hich should add up to be the remaining timetable iterations. - */ - - if(channel->times->next != 0) - { - channel->times = channel->times->next; - - switch_caller_profile_t *tempcallerprofile = switch_channel_get_caller_profile(tempchannel); - - if(tempcallerprofile->next == 0) - switch_console_printf(SWITCH_CHANNEL_CONSOLE,"Error: There is a mismatched number of items in switch_channel_t::switch_caller_profile_t\n"); - else - switch_channel_set_caller_profile(channel,tempcallerprofile->next) - - switch_caller_profile_t *temporiginateprofile = switch_channel_get_originator_caller_profile(channel); - if(temporiginateprofile != 0) - switch_channel_set_originator_caller_profile(channel,temporiginateprofile->next); - else - { - temporiginateprofile = switch_channel_get_originateeprofile(channel); - - } - retval=1; - } -} \ No newline at end of file +} Modified: freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h ============================================================================== --- freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h (original) +++ freeswitch/branches/mishehu/src/mod/loggers/mod_cdr/cdrcontainer.h Sat Jun 10 17:47:13 2006 @@ -43,7 +43,7 @@ switch_queue_t *cdrqueue; //list<std::string> cdrformats; // What formats are we going to use? std::string tempfilepath; - bool increment_next(switch_channel *channel); + void add_to_queue(switch_channel_t *channel,switch_channel_timetable_t *temptimes,switch_caller_extension_t *tempcallerextension,switch_caller_profile_t *tempcallerprofile, switch_caller_profile_t *temporiginateprofile,bool& temporiginate); /* Old factory method, dirty and icky list<std::string>::iterator cdrformatsBeg, cdrformatsEnd, cdrformatsItr; // Iterators for cdrformats map<std::string,BaseCDR* (*)(switch_channel*) > logging_factory; // This is the factory for creation of objects Modified: freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c ============================================================================== --- freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original) +++ freeswitch/branches/mishehu/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Sat Jun 10 17:47:13 2006 @@ -323,7 +323,7 @@ MIMETypeInit(); MIMETypeAdd("text/html", "html"); - snprintf(logfile, sizeof(logfile), "%s/%s", SWITCH_GLOBAL_dirs.log_dir, "freeswitch_http.log"); + snprintf(logfile, sizeof(logfile), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, "freeswitch_http.log"); ServerCreate(&abyssServer, "XmlRpcServer", globals.port, SWITCH_GLOBAL_dirs.htdocs_dir, logfile); xmlrpc_server_abyss_set_handler(&env, &abyssServer, "/RPC2", registryP); Modified: freeswitch/branches/mishehu/src/switch.c ============================================================================== --- freeswitch/branches/mishehu/src/switch.c (original) +++ freeswitch/branches/mishehu/src/switch.c Sat Jun 10 17:47:13 2006 @@ -32,6 +32,9 @@ #include <switch.h> #include <switch_version.h> +#ifdef HAVE_MLOCKALL +#include <sys/mman.h> +#endif static int RUNNING = 0; @@ -70,7 +73,7 @@ char *pfile = "freeswitch.pid"; char path[256] = ""; char *ppath = NULL; - char *err = NULL; + const char *err = NULL; switch_event_t *event; int bg = 0; FILE *f; @@ -81,6 +84,10 @@ //nice(-20); #endif +#ifdef HAVE_MLOCKALL + mlockall(MCL_CURRENT|MCL_FUTURE); +#endif + #ifndef WIN32 if (argv[1] && !strcmp(argv[1], "-stop")) { pid_t pid = 0; @@ -124,8 +131,8 @@ } - if (switch_core_init(ppath) != SWITCH_STATUS_SUCCESS) { - fprintf(stderr, "Cannot Initilize\n"); + if (switch_core_init(ppath, &err) != SWITCH_STATUS_SUCCESS) { + fprintf(stderr, "Cannot Initilize [%s]\n", err); return 255; } @@ -156,8 +163,6 @@ fprintf(f, "%d", getpid()); fclose(f); - - if (!err) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n"); Modified: freeswitch/branches/mishehu/src/switch_channel.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_channel.c (original) +++ freeswitch/branches/mishehu/src/switch_channel.c Sat Jun 10 17:47:13 2006 @@ -370,7 +370,8 @@ "CS_LOOPBACK", "CS_HOLD", "CS_HANGUP", - "CS_DONE" + "CS_DONE", + NULL }; SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t state) @@ -378,6 +379,19 @@ return state_names[state]; } + +SWITCH_DECLARE(switch_channel_state_t) switch_channel_name_state(char *name) +{ + uint32_t x = 0; + for(x = 0; state_names[x]; x++) { + if (!strcasecmp(state_names[x], name)) { + return (switch_channel_state_t) x; + } + } + + return CS_DONE; +} + SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_channel_t *channel, const char *file, const char *func, @@ -841,6 +855,10 @@ if (channel->state >= CS_HANGUP) { return SWITCH_STATUS_FALSE; + } + + if (switch_channel_test_flag(channel, CF_ANSWERED)) { + return SWITCH_STATUS_SUCCESS; } if (switch_core_session_answer_channel(channel->session) == SWITCH_STATUS_SUCCESS) { Modified: freeswitch/branches/mishehu/src/switch_config.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_config.c (original) +++ freeswitch/branches/mishehu/src/switch_config.c Sat Jun 10 17:47:13 2006 @@ -41,7 +41,7 @@ if (file_path[0] == '/') { path = file_path; } else { - snprintf(path_buf, sizeof(path_buf), "%s/%s", SWITCH_GLOBAL_dirs.conf_dir, file_path); + snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, file_path); path = path_buf; } @@ -57,7 +57,7 @@ int last = -1; char *var, *val; - snprintf(path_buf, sizeof(path_buf), "%s/freeswitch.conf", SWITCH_GLOBAL_dirs.conf_dir); + snprintf(path_buf, sizeof(path_buf), "%s%sfreeswitch.conf", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR); path = path_buf; if ((f = fopen(path, "r")) == 0) { Modified: freeswitch/branches/mishehu/src/switch_core.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_core.c (original) +++ freeswitch/branches/mishehu/src/switch_core.c Sat Jun 10 17:47:13 2006 @@ -117,7 +117,7 @@ if (strchr(dbname, '/')) { strncpy(buf, dbname, size); } else { - snprintf(buf, size, "%s/%s.db", SWITCH_DB_DIR, dbname); + snprintf(buf, size, "%s%s%s.db", SWITCH_DB_DIR, SWITCH_PATH_SEPARATOR, dbname); } } @@ -565,11 +565,11 @@ } SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh, - char *module_name, - char *voice_name, - unsigned int rate, - switch_speech_flag_t *flags, - switch_memory_pool_t *pool) + char *module_name, + char *voice_name, + unsigned int rate, + switch_speech_flag_t *flags, + switch_memory_pool_t *pool) { switch_status_t status; @@ -578,6 +578,7 @@ return SWITCH_STATUS_GENERR; } + switch_copy_string(sh->engine, module_name, sizeof(sh->engine)); sh->flags = *flags; if (pool) { sh->memory_pool = pool; @@ -587,7 +588,8 @@ } switch_set_flag(sh, SWITCH_SPEECH_FLAG_FREE_POOL); } - + sh->rate = rate; + sh->name = switch_core_strdup(pool, module_name); return sh->speech_interface->speech_open(sh, voice_name, rate, flags); } @@ -612,6 +614,42 @@ return sh->speech_interface->speech_feed_tts(sh, text, flags); } +SWITCH_DECLARE(void) switch_core_speech_flush_tts(switch_speech_handle_t *sh) +{ + assert(sh != NULL); + + if (sh->speech_interface->speech_flush_tts) { + sh->speech_interface->speech_flush_tts(sh); + } +} + +SWITCH_DECLARE(void) switch_core_speech_text_param_tts(switch_speech_handle_t *sh, char *param, char *val) +{ + assert(sh != NULL); + + if (sh->speech_interface->speech_text_param_tts) { + sh->speech_interface->speech_text_param_tts(sh, param, val); + } +} + +SWITCH_DECLARE(void) switch_core_speech_numeric_param_tts(switch_speech_handle_t *sh, char *param, int val) +{ + assert(sh != NULL); + + if (sh->speech_interface->speech_numeric_param_tts) { + sh->speech_interface->speech_numeric_param_tts(sh, param, val); + } +} + +SWITCH_DECLARE(void) switch_core_speech_float_param_tts(switch_speech_handle_t *sh, char *param, double val) +{ + assert(sh != NULL); + + if (sh->speech_interface->speech_float_param_tts) { + sh->speech_interface->speech_float_param_tts(sh, param, val); + } +} + SWITCH_DECLARE(switch_status_t) switch_core_speech_read_tts(switch_speech_handle_t *sh, void *data, switch_size_t *datalen, @@ -705,20 +743,20 @@ channel = switch_core_session_get_channel(session); assert(channel != NULL); + switch_channel_set_flag(channel, CF_SERVICE); while (data->running > 0) { switch (switch_core_session_read_frame(session, &read_frame, -1, stream_id)) { case SWITCH_STATUS_SUCCESS: - break; case SWITCH_STATUS_TIMEOUT: + case SWITCH_STATUS_BREAK: break; default: data->running = -1; continue; } - - switch_yield(10000); } + switch_channel_clear_flag(channel, CF_SERVICE); data->running = 0; return NULL; } @@ -2758,9 +2796,8 @@ #endif } -SWITCH_DECLARE(switch_status_t) switch_core_init(char *console) +SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err) { - const char *err = NULL; memset(&runtime, 0, sizeof(runtime)); switch_core_set_globals(); @@ -2768,29 +2805,34 @@ /* INIT APR and Create the pool context */ if (apr_initialize() != SWITCH_STATUS_SUCCESS) { apr_terminate(); - fprintf(stderr, "FATAL ERROR! Could not initilize APR\n"); + *err = "FATAL ERROR! Could not initilize APR\n"; return SWITCH_STATUS_MEMERR; } if (apr_pool_create(&runtime.memory_pool, NULL) != SWITCH_STATUS_SUCCESS) { apr_terminate(); - fprintf(stderr, "FATAL ERROR! Could not allocate memory pool\n"); + *err = "FATAL ERROR! Could not allocate memory pool\n"; return SWITCH_STATUS_MEMERR; } - if (switch_xml_init(runtime.memory_pool, &err) != SWITCH_STATUS_SUCCESS) { + if (switch_xml_init(runtime.memory_pool, err) != SWITCH_STATUS_SUCCESS) { apr_terminate(); - fprintf(stderr, "FATAL ERROR! Could not open XML Registry %s\n", err); return SWITCH_STATUS_MEMERR; } + *err = NULL; + if(console) { if (*console != '/') { char path[265]; snprintf(path, sizeof(path), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, console); console = path; } - switch_core_set_console(console); + if (switch_core_set_console(console) != SWITCH_STATUS_SUCCESS) { + *err = "FATAL ERROR! Could not open console\n"; + apr_terminate(); + return SWITCH_STATUS_GENERR; + } } else { runtime.console = stdout; } Modified: freeswitch/branches/mishehu/src/switch_event.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_event.c (original) +++ freeswitch/branches/mishehu/src/switch_event.c Sat Jun 10 17:47:13 2006 @@ -40,7 +40,7 @@ //static switch_memory_pool_t *BPOOL = NULL; static switch_memory_pool_t *THRUNTIME_POOL = NULL; static switch_queue_t *EVENT_QUEUE[3] = {0,0,0}; -static int POOL_COUNT_MAX = 2000; +static int POOL_COUNT_MAX = SWITCH_CORE_QUEUE_LEN; static switch_hash_t *CUSTOM_HASH = NULL; static int THREAD_RUNNING = 0; Modified: freeswitch/branches/mishehu/src/switch_ivr.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_ivr.c (original) +++ freeswitch/branches/mishehu/src/switch_ivr.c Sat Jun 10 17:47:13 2006 @@ -63,7 +63,11 @@ break; } - status = switch_core_session_read_frame(session, &read_frame, -1, 0); + if (switch_channel_test_flag(channel, CF_SERVICE)) { + switch_yield(1000); + } else { + status = switch_core_session_read_frame(session, &read_frame, -1, 0); + } if (!SWITCH_READ_ACCEPTABLE(status)) { break; @@ -75,14 +79,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session, - char *buf, - unsigned int buflen, - unsigned int maxdigits, - const char *terminators, - char *terminator, - unsigned int timeout, - unsigned int poll_channel - ) + char *buf, + unsigned int buflen, + unsigned int maxdigits, + const char *terminators, + char *terminator, + unsigned int timeout) { unsigned int i = 0, x = (unsigned int) strlen(buf); switch_channel_t *channel; @@ -135,14 +137,14 @@ } } } - if (poll_channel) { + + if (switch_channel_test_flag(channel, CF_SERVICE)) { + switch_yield(1000); + } else { status = switch_core_session_read_frame(session, &read_frame, -1, 0); - if (!SWITCH_READ_ACCEPTABLE(status)) { break; } - } else { - switch_yield(1000); } } @@ -288,9 +290,8 @@ file, SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) { - switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); switch_core_session_reset(session); - return SWITCH_STATUS_GENERR; + return SWITCH_STATUS_NOTFOUND; } @@ -496,107 +497,55 @@ -SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session, - char *tts_name, - char *voice_name, - char *timer_name, - uint32_t rate, - switch_dtmf_callback_function_t dtmf_callback, - char *text, - void *buf, - unsigned int buflen) +SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session_t *session, + switch_speech_handle_t *sh, + switch_codec_t *codec, + switch_timer_t *timer, + switch_dtmf_callback_function_t dtmf_callback, + char *text, + void *buf, + unsigned int buflen) { switch_channel_t *channel; short abuf[960]; char dtmf[128]; - int interval = 0; - uint32_t samples = 0; uint32_t len = 0; switch_size_t ilen = 0; switch_frame_t write_frame = {0}; - switch_timer_t timer; - switch_core_thread_session_t thread_session; - switch_codec_t codec; - switch_memory_pool_t *pool = switch_core_session_get_pool(session); - char *codec_name; int x; int stream_id; int done = 0; int lead_in_out = 10; - switch_status_t status = SWITCH_STATUS_SUCCESS; - switch_speech_handle_t sh; switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_TTS; + uint32_t rate = 0, samples = 0; - - memset(&sh, 0, sizeof(sh)); - channel = switch_core_session_get_channel(session); assert(channel != NULL); - if (switch_core_speech_open(&sh, - tts_name, - voice_name, - (unsigned int)rate, - &flags, - switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module!\n"); - switch_core_session_reset(session); + if (!sh) { return SWITCH_STATUS_FALSE; } - + switch_channel_answer(channel); write_frame.data = abuf; write_frame.buflen = sizeof(abuf); + samples = (uint32_t)(sh->rate / 50); + len = samples * 2; - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OPEN TTS %s\n", tts_name); - - interval = 20; - samples = (uint32_t)(rate / 50); - len = samples * 2; - - codec_name = "L16"; - - if (switch_core_codec_init(&codec, - codec_name, - (int)rate, - interval, - 1, - SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, - NULL, pool) == SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n"); - write_frame.codec = &codec; - } else { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed %s@%uhz 1 channel %dms\n", - codec_name, rate, interval); - flags = 0; - switch_core_speech_close(&sh, &flags); - switch_core_session_reset(session); - return SWITCH_STATUS_GENERR; - } - - if (timer_name) { - if (switch_core_timer_init(&timer, timer_name, interval, (int)samples, pool) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n"); - switch_core_codec_destroy(&codec); - flags = 0; - switch_core_speech_close(&sh, &flags); - switch_core_session_reset(session); - return SWITCH_STATUS_GENERR; - } - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer success %u bytes per %d ms!\n", len, interval); - } - flags = 0; - switch_core_speech_feed_tts(&sh, text, &flags); - write_frame.rate = rate; + switch_sleep(200000); + switch_core_speech_feed_tts(sh, text, &flags); + write_frame.rate = sh->rate; + memset(write_frame.data, 0, len); write_frame.datalen = len; write_frame.samples = len / 2; - + write_frame.codec = codec; + for( x = 0; !done && x < lead_in_out; x++) { for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) { if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) { @@ -607,29 +556,25 @@ } } - if (timer_name) { - /* start a thread to absorb incoming audio */ - for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) { - switch_core_service_session(session, &thread_session, stream_id); - } - } - ilen = len; while(switch_channel_ready(channel)) { - if (dtmf_callback || buf) { - + if (dtmf_callback || buf) { /* dtmf handler function you can hook up to be executed when a digit is dialed during playback if you return anything but SWITCH_STATUS_SUCCESS the playback will stop. */ if (switch_channel_has_dtmf(channel)) { - switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf)); - if (dtmf_callback) { - status = dtmf_callback(session, dtmf, buf, buflen); - } else { - switch_copy_string((char *)buf, dtmf, buflen); + if (buf && !strcasecmp(buf, "_break_")) { status = SWITCH_STATUS_BREAK; + } else { + switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf)); + if (dtmf_callback) { + status = dtmf_callback(session, dtmf, buf, buflen); + } else { + switch_copy_string((char *)buf, dtmf, buflen); + status = SWITCH_STATUS_BREAK; + } } } @@ -638,9 +583,29 @@ break; } } + + if (switch_test_flag(sh, SWITCH_SPEECH_FLAG_PAUSE)) { + if (timer) { + if ((x = switch_core_timer_next(timer)) < 0) { + break; + } + } else { + switch_frame_t *read_frame; + switch_status_t status = switch_core_session_read_frame(session, &read_frame, -1, 0); + while (switch_channel_test_flag(channel, CF_HOLD)) { + switch_yield(10000); + } + + if (!SWITCH_READ_ACCEPTABLE(status)) { + break; + } + } + continue; + } + flags = SWITCH_SPEECH_FLAG_BLOCKING; - status = switch_core_speech_read_tts(&sh, + status = switch_core_speech_read_tts(sh, abuf, &ilen, &rate, @@ -656,10 +621,13 @@ } } } + if (status == SWITCH_STATUS_BREAK) { + status = SWITCH_STATUS_SUCCESS; + } done = 1; } - if (done || ilen <= 0) { + if (done) { break; } @@ -677,8 +645,9 @@ break; } } - if (timer_name) { - if ((x = switch_core_timer_next(&timer)) < 0) { + + if (timer) { + if ((x = switch_core_timer_next(timer)) < 0) { break; } } else { /* time off the channel (if you must) */ @@ -693,9 +662,105 @@ break; } } - } + } + + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done speaking text\n"); + flags = 0; + switch_core_speech_flush_tts(sh); + return status; +} + + +SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session, + char *tts_name, + char *voice_name, + char *timer_name, + uint32_t rate, + switch_dtmf_callback_function_t dtmf_callback, + char *text, + void *buf, + unsigned int buflen) +{ + switch_channel_t *channel; + int interval = 0; + uint32_t samples = 0; + uint32_t len = 0; + switch_frame_t write_frame = {0}; + switch_timer_t timer; + switch_core_thread_session_t thread_session; + switch_codec_t codec; + switch_memory_pool_t *pool = switch_core_session_get_pool(session); + char *codec_name; + int stream_id; + switch_status_t status = SWITCH_STATUS_SUCCESS; + switch_speech_handle_t sh; + switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_TTS; + + + channel = switch_core_session_get_channel(session); + assert(channel != NULL); + + + memset(&sh, 0, sizeof(sh)); + if (switch_core_speech_open(&sh, + tts_name, + voice_name, + (unsigned int)rate, + &flags, + switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid TTS module!\n"); + switch_core_session_reset(session); + return SWITCH_STATUS_FALSE; + } + + switch_channel_answer(channel); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "OPEN TTS %s\n", tts_name); + + interval = 20; + samples = (uint32_t)(rate / 50); + len = samples * 2; + + codec_name = "L16"; + + if (switch_core_codec_init(&codec, + codec_name, + (int)rate, + interval, + 1, + SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, + NULL, pool) == SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activated\n"); + write_frame.codec = &codec; + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Failed %s@%uhz 1 channel %dms\n", + codec_name, rate, interval); + flags = 0; + switch_core_speech_close(&sh, &flags); + switch_core_session_reset(session); + return SWITCH_STATUS_GENERR; + } + + if (timer_name) { + if (switch_core_timer_init(&timer, timer_name, interval, (int)samples, pool) != SWITCH_STATUS_SUCCESS) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n"); + switch_core_codec_destroy(&codec); + flags = 0; + switch_core_speech_close(&sh, &flags); + + switch_core_session_reset(session); + return SWITCH_STATUS_GENERR; + } + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer success %u bytes per %d ms!\n", len, interval); + + /* start a thread to absorb incoming audio */ + for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) { + switch_core_service_session(session, &thread_session, stream_id); + } + } + + switch_ivr_speak_text_handle(session, &sh, &codec, timer_name ? &timer : NULL, dtmf_callback, text, buf, buflen); flags = 0; switch_core_speech_close(&sh, &flags); switch_core_codec_destroy(&codec); Modified: freeswitch/branches/mishehu/src/switch_log.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_log.c (original) +++ freeswitch/branches/mishehu/src/switch_log.c Sat Jun 10 17:47:13 2006 @@ -263,7 +263,7 @@ switch_threadattr_detach_set(thd_attr, 1); - switch_queue_create(&LOG_QUEUE, 2000, LOG_POOL); + switch_queue_create(&LOG_QUEUE, SWITCH_CORE_QUEUE_LEN, LOG_POOL); switch_mutex_init(&BINDLOCK, SWITCH_MUTEX_NESTED, LOG_POOL); switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE); switch_thread_create(&thread, thd_attr, log_thread, NULL, LOG_POOL); Modified: freeswitch/branches/mishehu/src/switch_rtp.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_rtp.c (original) +++ freeswitch/branches/mishehu/src/switch_rtp.c Sat Jun 10 17:47:13 2006 @@ -787,19 +787,21 @@ if (rtp_session->recv_msg.header.version) { - if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port && - (rtp_session->from_addr->port != rtp_session->remote_port)) { - const char *err; - char *tx_host; - uint32_t old = rtp_session->remote_port; - char *old_host; + if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port) { + if ((rtp_session->from_addr->port != rtp_session->remote_port)) { + const char *err; + char *tx_host; + uint32_t old = rtp_session->remote_port; + char *old_host; - switch_sockaddr_ip_get(&tx_host, rtp_session->from_addr); - switch_sockaddr_ip_get(&old_host, rtp_session->remote_addr); - - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n", - old_host, old, tx_host, rtp_session->from_addr->port); - switch_rtp_set_remote_address(rtp_session, tx_host, rtp_session->from_addr->port, &err); + switch_sockaddr_ip_get(&tx_host, rtp_session->from_addr); + switch_sockaddr_ip_get(&old_host, rtp_session->remote_addr); + + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n", + old_host, old, tx_host, rtp_session->from_addr->port); + switch_rtp_set_remote_address(rtp_session, tx_host, rtp_session->from_addr->port, &err); + } + switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ); } } Modified: freeswitch/branches/mishehu/src/switch_xml.c ============================================================================== --- freeswitch/branches/mishehu/src/switch_xml.c (original) +++ freeswitch/branches/mishehu/src/switch_xml.c Sat Jun 10 17:47:13 2006 @@ -900,7 +900,7 @@ switch_xml_free(xml); } - snprintf(path_buf, sizeof(path_buf), "%s/%s", SWITCH_GLOBAL_dirs.conf_dir, "freeswitch.xml"); + snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "freeswitch.xml"); if ((MAIN_XML_ROOT = switch_xml_parse_file(path_buf))) { *err = switch_xml_error(MAIN_XML_ROOT); Modified: freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln ============================================================================== --- freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln (original) +++ freeswitch/branches/mishehu/w32/vsnet/Freeswitch.sln Sat Jun 10 17:47:13 2006 @@ -202,8 +202,10 @@ EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{99D6D74B-32A8-4441-A417-551B0E0A4510}" - ProjectSection(SolutionItems) = preProject - GetLibs.vbs = GetLibs.vbs +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rss", "..\..\src\mod\applications\mod_rss\mod_rss.vcproj", "{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}" + ProjectSection(ProjectDependencies) = postProject + {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} EndProjectSection EndProject Global @@ -348,6 +350,10 @@ {CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Debug|Win32.Build.0 = Debug|Win32 {CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Release|Win32.ActiveCfg = Release|Win32 {CBEC7225-0C21-4DA8-978E-1F158F8AD950}.Release|Win32.Build.0 = Release|Win32 + {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.ActiveCfg = Debug|Win32 + {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Debug|Win32.Build.0 = Debug|Win32 + {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.ActiveCfg = Release|Win32 + {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -369,6 +375,7 @@ {419AA391-5F3F-4BFE-A869-9D154D62A792} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {0E2C6395-13B9-46E5-9264-8859D346018D} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {30A5B29C-983E-4580-9FD0-D647CCDCC7EB} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} + {B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78} {3A5B9131-F20C-4A85-9447-6C1610941CEE} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} {5FD31A25-5D83-4794-8BEE-904DAD84CE71} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C} {FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
participants (1)
-
mishehuï¼ freeswitch.org