summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES11
-rw-r--r--CREDITS4
-rw-r--r--Makefile1
-rw-r--r--Makefile.moddir_rules2
-rw-r--r--Makefile.rules4
-rw-r--r--README-SERIOUSLY.bestpractices.md4
-rw-r--r--README-addons.txt8
-rw-r--r--README.md7
-rw-r--r--UPGRADE-1.2.txt48
-rw-r--r--UPGRADE-1.4.txt77
-rw-r--r--UPGRADE-1.6.txt14
-rw-r--r--UPGRADE-1.8.txt15
-rw-r--r--UPGRADE-10.txt4
-rw-r--r--UPGRADE-11.txt6
-rw-r--r--UPGRADE-12.txt6
-rw-r--r--addons/app_mysql.c9
-rw-r--r--addons/cdr_mysql.c36
-rw-r--r--addons/chan_mobile.c6
-rw-r--r--addons/chan_ooh323.c223
-rw-r--r--addons/chan_ooh323.h14
-rw-r--r--addons/format_mp3.c1
-rw-r--r--addons/ooh323c/README35
-rw-r--r--addons/ooh323c/src/Makefile.in4
-rw-r--r--addons/ooh323c/src/context.c24
-rw-r--r--addons/ooh323c/src/decode.c118
-rw-r--r--addons/ooh323c/src/dlist.c27
-rw-r--r--addons/ooh323c/src/dlist.h62
-rw-r--r--addons/ooh323c/src/encode.c104
-rw-r--r--addons/ooh323c/src/errmgmt.c50
-rw-r--r--addons/ooh323c/src/eventHandler.c18
-rw-r--r--addons/ooh323c/src/eventHandler.h88
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h10
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c11
-rw-r--r--addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGES.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGES.h10
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGESDec.c11
-rw-r--r--addons/ooh323c/src/h323/H323-MESSAGESEnc.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h10
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c11
-rw-r--r--addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c11
-rw-r--r--addons/ooh323c/src/memheap.c335
-rw-r--r--addons/ooh323c/src/memheap.h10
-rw-r--r--addons/ooh323c/src/ooCalls.c153
-rw-r--r--addons/ooh323c/src/ooCalls.h222
-rw-r--r--addons/ooh323c/src/ooCapability.c646
-rw-r--r--addons/ooh323c/src/ooCapability.h230
-rw-r--r--addons/ooh323c/src/ooCmdChannel.c59
-rw-r--r--addons/ooh323c/src/ooCmdChannel.h30
-rw-r--r--addons/ooh323c/src/ooCommon.h20
-rw-r--r--addons/ooh323c/src/ooDateTime.c17
-rw-r--r--addons/ooh323c/src/ooDateTime.h18
-rw-r--r--addons/ooh323c/src/ooGkClient.c452
-rw-r--r--addons/ooh323c/src/ooGkClient.h90
-rw-r--r--addons/ooh323c/src/ooLogChan.c81
-rw-r--r--addons/ooh323c/src/ooLogChan.h60
-rw-r--r--addons/ooh323c/src/ooSocket.c148
-rw-r--r--addons/ooh323c/src/ooSocket.h65
-rw-r--r--addons/ooh323c/src/ooStackCmds.c45
-rw-r--r--addons/ooh323c/src/ooStackCmds.h32
-rw-r--r--addons/ooh323c/src/ooTimer.c24
-rw-r--r--addons/ooh323c/src/ooTimer.h26
-rw-r--r--addons/ooh323c/src/ooUtils.c12
-rw-r--r--addons/ooh323c/src/ooUtils.h20
-rw-r--r--addons/ooh323c/src/ooasn1.h200
-rw-r--r--addons/ooh323c/src/oochannels.c376
-rw-r--r--addons/ooh323c/src/oochannels.h59
-rw-r--r--addons/ooh323c/src/ooh245.c993
-rw-r--r--addons/ooh323c/src/ooh245.h164
-rw-r--r--addons/ooh323c/src/ooh323.c476
-rw-r--r--addons/ooh323c/src/ooh323.h37
-rw-r--r--addons/ooh323c/src/ooh323ep.c127
-rw-r--r--addons/ooh323c/src/ooh323ep.h126
-rw-r--r--addons/ooh323c/src/oohdr.h10
-rw-r--r--addons/ooh323c/src/ooper.h11
-rw-r--r--addons/ooh323c/src/ooports.c16
-rw-r--r--addons/ooh323c/src/ooports.h20
-rw-r--r--addons/ooh323c/src/ooq931.c819
-rw-r--r--addons/ooh323c/src/ooq931.h158
-rw-r--r--addons/ooh323c/src/ootrace.c35
-rw-r--r--addons/ooh323c/src/ootrace.h24
-rw-r--r--addons/ooh323c/src/ootypes.h155
-rw-r--r--addons/ooh323c/src/perutil.c51
-rw-r--r--addons/ooh323c/src/printHandler.c22
-rw-r--r--addons/ooh323c/src/printHandler.h16
-rw-r--r--addons/ooh323c/src/rtctype.c10
-rw-r--r--addons/ooh323c/src/rtctype.h15
-rw-r--r--addons/ooh323cDriver.c122
-rw-r--r--addons/ooh323cDriver.h12
-rw-r--r--addons/res_config_mysql.c7
-rw-r--r--agi/Makefile2
-rw-r--r--agi/eagi-sphinx-test.c4
-rw-r--r--agi/eagi-test.c4
-rwxr-xr-xagi/jukebox.agi4
-rw-r--r--apps/Makefile2
-rw-r--r--apps/app_adsiprog.c18
-rw-r--r--apps/app_agent_pool.c14
-rw-r--r--apps/app_amd.c16
-rw-r--r--apps/app_authenticate.c4
-rw-r--r--apps/app_chanisavail.c5
-rw-r--r--apps/app_chanspy.c28
-rw-r--r--apps/app_controlplayback.c2
-rw-r--r--apps/app_dahdiras.c14
-rw-r--r--apps/app_dial.c2
-rw-r--r--apps/app_dictate.c7
-rw-r--r--apps/app_directory.c12
-rw-r--r--apps/app_echo.c2
-rw-r--r--apps/app_externalivr.c47
-rw-r--r--apps/app_fax.c34
-rw-r--r--apps/app_festival.c31
-rw-r--r--apps/app_flash.c7
-rw-r--r--apps/app_followme.c42
-rw-r--r--apps/app_forkcdr.c2
-rw-r--r--apps/app_getcpeid.c4
-rw-r--r--apps/app_ices.c25
-rw-r--r--apps/app_image.c7
-rw-r--r--apps/app_ivrdemo.c13
-rw-r--r--apps/app_jack.c1
-rw-r--r--apps/app_macro.c16
-rw-r--r--apps/app_meetme.c243
-rw-r--r--apps/app_milliwatt.c2
-rw-r--r--apps/app_minivm.c148
-rw-r--r--apps/app_morsecode.c3
-rw-r--r--apps/app_mp3.c19
-rw-r--r--apps/app_nbscat.c15
-rw-r--r--apps/app_page.c1
-rw-r--r--apps/app_playback.c24
-rw-r--r--apps/app_queue.c21
-rw-r--r--apps/app_read.c10
-rw-r--r--apps/app_readexten.c4
-rw-r--r--apps/app_record.c6
-rw-r--r--apps/app_saycounted.c3
-rw-r--r--apps/app_sayunixtime.c12
-rw-r--r--apps/app_senddtmf.c2
-rw-r--r--apps/app_sendtext.c4
-rw-r--r--apps/app_setcallerid.c5
-rw-r--r--apps/app_skel.c28
-rw-r--r--apps/app_sms.c45
-rw-r--r--apps/app_softhangup.c10
-rw-r--r--apps/app_speech_utils.c14
-rw-r--r--apps/app_stack.c6
-rw-r--r--apps/app_system.c6
-rw-r--r--apps/app_talkdetect.c11
-rw-r--r--apps/app_test.c3
-rw-r--r--apps/app_transfer.c4
-rw-r--r--apps/app_url.c15
-rw-r--r--apps/app_userevent.c2
-rw-r--r--apps/app_voicemail.c482
-rw-r--r--apps/app_waitforring.c3
-rw-r--r--apps/app_while.c14
-rw-r--r--apps/app_zapateller.c15
-rw-r--r--apps/confbridge/conf_config_parser.c20
-rw-r--r--apps/enter.h548
-rw-r--r--apps/leave.h388
-rw-r--r--autoconf/ast_c_compile_check.m42
-rw-r--r--autoconf/ast_c_declare_check.m42
-rw-r--r--autoconf/ast_c_define_check.m42
-rw-r--r--autoconf/ast_check_osptk.m43
-rw-r--r--autoconf/ast_check_pwlib.m412
-rw-r--r--autoconf/ast_ext_lib.m42
-rw-r--r--autoconf/ast_pkgconfig.m41
-rw-r--r--bridges/Makefile2
-rw-r--r--bridges/bridge_holding.c1
-rw-r--r--bridges/bridge_native_rtp.c5
-rwxr-xr-xbuild_tools/make_buildopts_h2
-rwxr-xr-xbuild_tools/make_defaults_h2
-rwxr-xr-xbuild_tools/make_sample_voicemail6
-rwxr-xr-xbuild_tools/make_version6
-rwxr-xr-xbuild_tools/sha1sum-sh1
-rw-r--r--cdr/cdr_adaptive_odbc.c1
-rw-r--r--cdr/cdr_custom.c1
-rw-r--r--cdr/cdr_radius.c2
-rw-r--r--cel/Makefile2
-rw-r--r--cel/cel_custom.c1
-rw-r--r--cel/cel_odbc.c3
-rw-r--r--channels/Makefile1
-rw-r--r--channels/chan_alsa.c20
-rw-r--r--channels/chan_console.c74
-rw-r--r--channels/chan_dahdi.c2
-rw-r--r--channels/chan_iax2.c2
-rw-r--r--channels/chan_mgcp.c2
-rw-r--r--channels/chan_motif.c8
-rw-r--r--channels/chan_nbs.c11
-rw-r--r--channels/chan_oss.c15
-rw-r--r--channels/chan_phone.c55
-rw-r--r--channels/chan_phone.h478
-rw-r--r--channels/chan_pjsip.c53
-rw-r--r--channels/chan_sip.c55
-rw-r--r--channels/chan_skinny.c6
-rw-r--r--channels/chan_unistim.c12
-rw-r--r--channels/chan_vpb.cc170
-rw-r--r--channels/console_board.c6
-rw-r--r--channels/console_gui.c76
-rw-r--r--channels/console_video.c36
-rw-r--r--channels/console_video.h2
-rw-r--r--channels/iax2/include/iax2.h4
-rw-r--r--channels/iax2/include/parser.h4
-rw-r--r--channels/iax2/parser.c26
-rw-r--r--channels/iax2/provision.c22
-rw-r--r--channels/misdn/ie.c1
-rw-r--r--channels/misdn/isdn_lib.c2
-rw-r--r--channels/pjsip/dialplan_functions.c50
-rw-r--r--channels/sig_analog.h4
-rw-r--r--channels/sip/config_parser.c1
-rw-r--r--channels/sip/dialplan_functions.c3
-rw-r--r--channels/sip/include/config_parser.h2
-rw-r--r--channels/sip/include/globals.h1
-rw-r--r--channels/sip/include/reqresp_parser.h4
-rw-r--r--channels/sip/security_events.c1
-rw-r--r--channels/vcodecs.c14
-rw-r--r--channels/vgrabbers.c12
-rw-r--r--codecs/Makefile2
-rw-r--r--codecs/codec_adpcm.c10
-rw-r--r--codecs/codec_alaw.c6
-rw-r--r--codecs/codec_dahdi.c7
-rw-r--r--codecs/codec_g722.c6
-rw-r--r--codecs/codec_g726.c2
-rw-r--r--codecs/codec_gsm.c4
-rw-r--r--codecs/codec_lpc10.c4
-rw-r--r--codecs/codec_resample.c4
-rw-r--r--codecs/codec_speex.c22
-rw-r--r--codecs/codec_ulaw.c2
-rw-r--r--codecs/ex_ilbc.h8
-rw-r--r--codecs/g722/g722.h4
-rw-r--r--codecs/g722/g722_decode.c14
-rw-r--r--codecs/g722/g722_encode.c8
-rw-r--r--codecs/gsm/Makefile16
-rw-r--r--codecs/gsm/README2
-rw-r--r--codecs/gsm/inc/gsm.h2
-rw-r--r--codecs/gsm/inc/private.h14
-rw-r--r--codecs/gsm/inc/proto.h2
-rw-r--r--codecs/gsm/src/add.c8
-rw-r--r--codecs/gsm/src/code.c6
-rw-r--r--codecs/gsm/src/debug.c2
-rw-r--r--codecs/gsm/src/gsm_decode.c4
-rw-r--r--codecs/gsm/src/gsm_explode.c6
-rw-r--r--codecs/gsm/src/gsm_implode.c6
-rw-r--r--codecs/gsm/src/gsm_option.c2
-rw-r--r--codecs/gsm/src/k6opt.h12
-rw-r--r--codecs/gsm/src/long_term.c16
-rw-r--r--codecs/gsm/src/lpc.c10
-rw-r--r--codecs/gsm/src/preprocess.c12
-rw-r--r--codecs/gsm/src/rpe.c36
-rw-r--r--codecs/gsm/src/short_term.c20
-rw-r--r--codecs/gsm/src/table.c2
-rw-r--r--codecs/ilbc/FrameClassify.c1
-rw-r--r--codecs/ilbc/FrameClassify.h1
-rw-r--r--codecs/ilbc/LPCdecode.c6
-rw-r--r--codecs/ilbc/LPCdecode.h12
-rw-r--r--codecs/ilbc/LPCencode.c1
-rw-r--r--codecs/ilbc/LPCencode.h1
-rw-r--r--codecs/ilbc/StateConstructW.c12
-rw-r--r--codecs/ilbc/StateConstructW.h1
-rw-r--r--codecs/ilbc/StateSearchW.c11
-rw-r--r--codecs/ilbc/StateSearchW.h8
-rw-r--r--codecs/ilbc/anaFilter.c1
-rw-r--r--codecs/ilbc/anaFilter.h1
-rw-r--r--codecs/ilbc/constants.c1
-rw-r--r--codecs/ilbc/constants.h1
-rw-r--r--codecs/ilbc/createCB.c1
-rw-r--r--codecs/ilbc/createCB.h1
-rw-r--r--codecs/ilbc/doCPLC.c1
-rw-r--r--codecs/ilbc/doCPLC.h1
-rw-r--r--codecs/ilbc/enhancer.c1
-rw-r--r--codecs/ilbc/enhancer.h1
-rw-r--r--codecs/ilbc/extract-cfile.awk2
-rw-r--r--codecs/ilbc/filter.c1
-rw-r--r--codecs/ilbc/filter.h1
-rw-r--r--codecs/ilbc/gainquant.c6
-rw-r--r--codecs/ilbc/gainquant.h1
-rw-r--r--codecs/ilbc/getCBvec.c1
-rw-r--r--codecs/ilbc/getCBvec.h1
-rw-r--r--codecs/ilbc/helpfun.c1
-rw-r--r--codecs/ilbc/helpfun.h1
-rw-r--r--codecs/ilbc/hpInput.c1
-rw-r--r--codecs/ilbc/hpInput.h1
-rw-r--r--codecs/ilbc/hpOutput.c1
-rw-r--r--codecs/ilbc/hpOutput.h1
-rw-r--r--codecs/ilbc/iCBConstruct.c1
-rw-r--r--codecs/ilbc/iCBConstruct.h1
-rw-r--r--codecs/ilbc/iCBSearch.c9
-rw-r--r--codecs/ilbc/iCBSearch.h1
-rw-r--r--codecs/ilbc/iLBC_decode.c1
-rw-r--r--codecs/ilbc/iLBC_decode.h1
-rw-r--r--codecs/ilbc/iLBC_define.h1
-rw-r--r--codecs/ilbc/iLBC_encode.c1
-rw-r--r--codecs/ilbc/iLBC_encode.h6
-rw-r--r--codecs/ilbc/iLBC_test.c1
-rw-r--r--codecs/ilbc/lsf.c7
-rw-r--r--codecs/ilbc/lsf.h1
-rw-r--r--codecs/ilbc/packing.c1
-rw-r--r--codecs/ilbc/packing.h1
-rw-r--r--codecs/ilbc/rfc3951.txt387
-rw-r--r--codecs/ilbc/syntFilter.c14
-rw-r--r--codecs/ilbc/syntFilter.h1
-rw-r--r--codecs/log2comp.h8
-rw-r--r--codecs/lpc10/Makefile12
-rw-r--r--codecs/lpc10/analys.c68
-rw-r--r--codecs/lpc10/bsynz.c28
-rw-r--r--codecs/lpc10/chanwr.c8
-rw-r--r--codecs/lpc10/dcbias.c1
-rw-r--r--codecs/lpc10/decode.c34
-rw-r--r--codecs/lpc10/difmag.c3
-rw-r--r--codecs/lpc10/dyptrk.c38
-rw-r--r--codecs/lpc10/encode.c23
-rw-r--r--codecs/lpc10/energy.c1
-rw-r--r--codecs/lpc10/f2c.h6
-rw-r--r--codecs/lpc10/ham84.c1
-rw-r--r--codecs/lpc10/invert.c1
-rw-r--r--codecs/lpc10/irc2pc.c1
-rw-r--r--codecs/lpc10/ivfilt.c1
-rw-r--r--codecs/lpc10/lpc10.h4
-rw-r--r--codecs/lpc10/lpcdec.c26
-rw-r--r--codecs/lpc10/lpcenc.c8
-rw-r--r--codecs/lpc10/lpcini.c22
-rw-r--r--codecs/lpc10/lpfilt.c1
-rw-r--r--codecs/lpc10/median.c1
-rw-r--r--codecs/lpc10/mload.c13
-rw-r--r--codecs/lpc10/onset.c24
-rw-r--r--codecs/lpc10/pitsyn.c38
-rw-r--r--codecs/lpc10/placea.c9
-rw-r--r--codecs/lpc10/placev.c19
-rw-r--r--codecs/lpc10/preemp.c5
-rw-r--r--codecs/lpc10/random.c1
-rw-r--r--codecs/lpc10/rcchk.c3
-rw-r--r--codecs/lpc10/synths.c34
-rw-r--r--codecs/lpc10/tbdm.c7
-rw-r--r--codecs/lpc10/voicin.c60
-rw-r--r--codecs/lpc10/vparms.c5
-rw-r--r--codecs/speex/arch.h12
-rw-r--r--codecs/speex/fixed_generic.h8
-rw-r--r--codecs/speex/resample.c84
-rw-r--r--codecs/speex/resample_sse.h8
-rw-r--r--codecs/speex/speex_resampler.h116
-rw-r--r--codecs/speex/stack_alloc.h10
-rw-r--r--configs/basic-pbx/indications.conf1
-rw-r--r--configs/basic-pbx/pjsip.conf1
-rw-r--r--configs/basic-pbx/queues.conf1
-rw-r--r--configs/samples/alsa.conf.sample1
-rw-r--r--configs/samples/ari.conf.sample1
-rw-r--r--configs/samples/asterisk.adsi1
-rw-r--r--configs/samples/asterisk.conf.sample2
-rw-r--r--configs/samples/calendar.conf.sample2
-rw-r--r--configs/samples/cdr_adaptive_odbc.conf.sample1
-rw-r--r--configs/samples/cdr_mysql.conf.sample11
-rw-r--r--configs/samples/cdr_tds.conf.sample1
-rw-r--r--configs/samples/cel.conf.sample2
-rw-r--r--configs/samples/chan_dahdi.conf.sample12
-rw-r--r--configs/samples/chan_mobile.conf.sample4
-rw-r--r--configs/samples/codecs.conf.sample1
-rw-r--r--configs/samples/confbridge.conf.sample4
-rw-r--r--configs/samples/dbsep.conf.sample1
-rw-r--r--configs/samples/dsp.conf.sample1
-rw-r--r--configs/samples/extconfig.conf.sample1
-rw-r--r--configs/samples/extensions.lua.sample1
-rw-r--r--configs/samples/extensions_minivm.conf.sample1
-rw-r--r--configs/samples/festival.conf.sample1
-rw-r--r--configs/samples/followme.conf.sample2
-rw-r--r--configs/samples/func_odbc.conf.sample1
-rw-r--r--configs/samples/iax.conf.sample12
-rw-r--r--configs/samples/iaxprov.conf.sample1
-rw-r--r--configs/samples/manager.conf.sample3
-rw-r--r--configs/samples/mgcp.conf.sample34
-rw-r--r--configs/samples/ooh323.conf.sample5
-rw-r--r--configs/samples/oss.conf.sample1
-rw-r--r--configs/samples/phoneprov.conf.sample1
-rw-r--r--configs/samples/queuerules.conf.sample1
-rw-r--r--configs/samples/queues.conf.sample2
-rw-r--r--configs/samples/res_config_mysql.conf.sample2
-rw-r--r--configs/samples/res_config_sqlite3.conf.sample1
-rw-r--r--configs/samples/res_fax.conf.sample2
-rw-r--r--configs/samples/res_ldap.conf.sample7
-rw-r--r--configs/samples/res_pgsql.conf.sample2
-rw-r--r--configs/samples/res_snmp.conf.sample2
-rw-r--r--configs/samples/rtp.conf.sample14
-rw-r--r--configs/samples/say.conf.sample10
-rw-r--r--configs/samples/sip.conf.sample32
-rw-r--r--configs/samples/skinny.conf.sample1
-rw-r--r--configs/samples/sla.conf.sample3
-rw-r--r--configs/samples/users.conf.sample1
-rw-r--r--configs/samples/voicemail.conf.sample6
-rw-r--r--configs/samples/xmpp.conf.sample1
-rwxr-xr-xconfigure10
-rw-r--r--configure.ac6
-rw-r--r--contrib/README.festival18
-rw-r--r--contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py1
-rw-r--r--contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py1
-rw-r--r--contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py1
-rw-r--r--contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py1
-rw-r--r--contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py1
-rw-r--r--contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py1
-rw-r--r--contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py1
-rw-r--r--contrib/ast-db-manage/env.py1
-rw-r--r--contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py1
-rw-r--r--contrib/asterisk-ices.xml6
-rwxr-xr-xcontrib/init.d/rc.debian.asterisk2
-rwxr-xr-xcontrib/init.d/rc.mandriva.asterisk15
-rwxr-xr-xcontrib/init.d/rc.mandriva.zaptel1
-rwxr-xr-xcontrib/init.d/rc.redhat.asterisk2
-rwxr-xr-xcontrib/init.d/rc.slackware.asterisk1
-rwxr-xr-xcontrib/init.d/rc.suse.asterisk2
-rw-r--r--contrib/scripts/README.messages-expire6
-rwxr-xr-xcontrib/scripts/ast_tls_cert2
-rwxr-xr-xcontrib/scripts/astcli5
-rw-r--r--contrib/scripts/astgenkey.844
-rwxr-xr-xcontrib/scripts/autosupport52
-rw-r--r--contrib/scripts/autosupport.820
-rwxr-xr-xcontrib/scripts/dbsep.cgi1
-rw-r--r--contrib/scripts/managerproxy.pl11
-rw-r--r--contrib/scripts/messages-expire.pl6
-rw-r--r--contrib/scripts/retrieve_extensions_from_mysql.pl7
-rw-r--r--contrib/scripts/retrieve_extensions_from_sql.pl2
-rw-r--r--contrib/scripts/retrieve_sip_conf_from_mysql.pl5
-rw-r--r--contrib/scripts/safe_asterisk.838
-rwxr-xr-xcontrib/scripts/sip_nat_settings14
-rw-r--r--contrib/upstart/asterisk.user.conf1
-rw-r--r--contrib/utils/README.rawplayer9
-rw-r--r--contrib/utils/eagi_proxy.c40
-rw-r--r--contrib/utils/rawplayer.c5
-rw-r--r--contrib/utils/zones2indications.c16
-rw-r--r--doc/Makefile1
-rw-r--r--doc/README.txt2
-rw-r--r--doc/api-1.6.0-changes.odtbin44151 -> 0 bytes
-rw-r--r--doc/api-1.6.2-changes.txt6
-rw-r--r--doc/astdb2bdb.81
-rw-r--r--doc/astdb2sqlite3.81
-rw-r--r--doc/asterisk.874
-rw-r--r--doc/asterisk.sgml18
-rw-r--r--doc/lang/language-criteria.txt2
-rw-r--r--formats/Makefile2
-rw-r--r--formats/format_g719.c3
-rw-r--r--formats/format_g723.c12
-rw-r--r--formats/format_g726.c10
-rw-r--r--formats/format_g729.c6
-rw-r--r--formats/format_gsm.c2
-rw-r--r--formats/format_h263.c2
-rw-r--r--formats/format_h264.c2
-rw-r--r--formats/format_ilbc.c4
-rw-r--r--formats/format_jpeg.c4
-rw-r--r--formats/format_ogg_vorbis.c6
-rw-r--r--formats/format_pcm.c8
-rw-r--r--formats/format_siren14.c2
-rw-r--r--formats/format_siren7.c2
-rw-r--r--formats/format_sln.c2
-rw-r--r--formats/format_vox.c6
-rw-r--r--formats/format_wav.c18
-rw-r--r--formats/format_wav_gsm.c4
-rw-r--r--formats/msgsm.h4
-rw-r--r--funcs/Makefile2
-rw-r--r--funcs/func_audiohookinherit.c1
-rw-r--r--funcs/func_base64.c2
-rw-r--r--funcs/func_blacklist.c2
-rw-r--r--funcs/func_callerid.c18
-rw-r--r--funcs/func_channel.c7
-rw-r--r--funcs/func_config.c4
-rw-r--r--funcs/func_curl.c9
-rw-r--r--funcs/func_cut.c8
-rw-r--r--funcs/func_db.c4
-rw-r--r--funcs/func_devstate.c4
-rw-r--r--funcs/func_dialplan.c2
-rw-r--r--funcs/func_enum.c26
-rw-r--r--funcs/func_extstate.c8
-rw-r--r--funcs/func_frame_trace.c2
-rw-r--r--funcs/func_global.c2
-rw-r--r--funcs/func_groupcount.c12
-rw-r--r--funcs/func_iconv.c9
-rw-r--r--funcs/func_jitterbuffer.c1
-rw-r--r--funcs/func_lock.c8
-rw-r--r--funcs/func_logic.c8
-rw-r--r--funcs/func_md5.c4
-rw-r--r--funcs/func_odbc.c11
-rw-r--r--funcs/func_pitchshift.c1
-rw-r--r--funcs/func_presencestate.c7
-rw-r--r--funcs/func_rand.c8
-rw-r--r--funcs/func_sha1.c4
-rw-r--r--funcs/func_sorcery.c1
-rw-r--r--funcs/func_speex.c22
-rw-r--r--funcs/func_sprintf.c4
-rw-r--r--funcs/func_srv.c4
-rw-r--r--funcs/func_strings.c34
-rw-r--r--funcs/func_sysinfo.c5
-rw-r--r--funcs/func_timeout.c4
-rw-r--r--funcs/func_uri.c6
-rw-r--r--funcs/func_version.c2
-rw-r--r--funcs/func_vmcount.c6
-rw-r--r--funcs/func_volume.c18
-rw-r--r--include/asterisk/abstract_jb.h2
-rw-r--r--include/asterisk/adsi.h1
-rw-r--r--include/asterisk/ael_structs.h14
-rw-r--r--include/asterisk/agi.h2
-rw-r--r--include/asterisk/ast_expr.h4
-rw-r--r--include/asterisk/ast_version.h2
-rw-r--r--include/asterisk/astdb.h10
-rw-r--r--include/asterisk/astobj.h52
-rw-r--r--include/asterisk/astobj2.h108
-rw-r--r--include/asterisk/astosp.h2
-rw-r--r--include/asterisk/autochan.h2
-rw-r--r--include/asterisk/autoconfig.h.in1
-rw-r--r--include/asterisk/bridge_after.h2
-rw-r--r--include/asterisk/bridge_features.h2
-rw-r--r--include/asterisk/calendar.h4
-rw-r--r--include/asterisk/callerid.h2
-rw-r--r--include/asterisk/ccss.h4
-rw-r--r--include/asterisk/cel.h4
-rw-r--r--include/asterisk/cli.h20
-rw-r--r--include/asterisk/compat.h4
-rw-r--r--include/asterisk/config.h2
-rw-r--r--include/asterisk/config_options.h18
-rw-r--r--include/asterisk/core_unreal.h2
-rw-r--r--include/asterisk/doxygen/architecture.h1
-rw-r--r--include/asterisk/doxygen/licensing.h2
-rw-r--r--include/asterisk/doxyref.h98
-rw-r--r--include/asterisk/dundi.h12
-rw-r--r--include/asterisk/endian.h1
-rw-r--r--include/asterisk/event_defs.h2
-rw-r--r--include/asterisk/file.h92
-rw-r--r--include/asterisk/format.h2
-rw-r--r--include/asterisk/framehook.h6
-rw-r--r--include/asterisk/fskmodem.h1
-rw-r--r--include/asterisk/fskmodem_int.h4
-rw-r--r--include/asterisk/http.h2
-rw-r--r--include/asterisk/image.h20
-rw-r--r--include/asterisk/indications.h4
-rw-r--r--include/asterisk/io.h36
-rw-r--r--include/asterisk/manager.h20
-rw-r--r--include/asterisk/message.h2
-rw-r--r--include/asterisk/mod_format.h16
-rw-r--r--include/asterisk/module.h60
-rw-r--r--include/asterisk/netsock2.h2
-rw-r--r--include/asterisk/parking.h4
-rw-r--r--include/asterisk/paths.h2
-rw-r--r--include/asterisk/pbx.h4
-rw-r--r--include/asterisk/pktccops.h2
-rw-r--r--include/asterisk/presencestate.h1
-rw-r--r--include/asterisk/pval.h20
-rw-r--r--include/asterisk/res_fax.h2
-rw-r--r--include/asterisk/res_odbc.h10
-rw-r--r--include/asterisk/res_pjsip_session.h10
-rw-r--r--include/asterisk/rtp_engine.h10
-rw-r--r--include/asterisk/sched.h10
-rw-r--r--include/asterisk/select.h2
-rw-r--r--include/asterisk/smdi.h12
-rw-r--r--include/asterisk/speech.h2
-rw-r--r--include/asterisk/srv.h4
-rw-r--r--include/asterisk/statsd.h1
-rw-r--r--include/asterisk/stringfields.h12
-rw-r--r--include/asterisk/strings.h32
-rw-r--r--include/asterisk/tcptls.h6
-rw-r--r--include/asterisk/tdd.h10
-rw-r--r--include/asterisk/threadstorage.h6
-rw-r--r--include/asterisk/timing.h2
-rw-r--r--include/asterisk/translate.h14
-rw-r--r--include/asterisk/udptl.h14
-rw-r--r--include/asterisk/utils.h40
-rw-r--r--include/asterisk/xml.h1
-rw-r--r--include/jitterbuf.h18
-rw-r--r--include/solaris-compat/sys/queue.h5
-rwxr-xr-xinstall-sh16
-rw-r--r--main/acl.c1
-rw-r--r--main/alaw.c1
-rw-r--r--main/alertpipe.c13
-rw-r--r--main/app.c33
-rw-r--r--main/ast_expr2.c203
-rw-r--r--main/ast_expr2.h13
-rw-r--r--main/ast_expr2.y198
-rw-r--r--main/ast_expr2f.c73
-rw-r--r--main/asterisk.c129
-rw-r--r--main/astfd.c1
-rw-r--r--main/astmm.c2
-rw-r--r--main/astobj2_container.c1
-rw-r--r--main/astobj2_hash.c1
-rw-r--r--main/astobj2_rbtree.c1
-rw-r--r--main/bridge.c4
-rw-r--r--main/bridge_basic.c1
-rw-r--r--main/bucket.c60
-rw-r--r--main/ccss.c21
-rw-r--r--main/cdr.c83
-rw-r--r--main/cel.c213
-rw-r--r--main/channel.c1
-rw-r--r--main/cli.c15
-rw-r--r--main/codec.c22
-rw-r--r--main/config_options.c90
-rw-r--r--main/db.c125
-rw-r--r--main/dns.c1
-rw-r--r--main/editline/INSTALL4
-rw-r--r--main/editline/chared.c4
-rwxr-xr-xmain/editline/configure36
-rw-r--r--main/editline/configure.in15
-rwxr-xr-xmain/editline/install-sh16
-rw-r--r--main/editline/map.c2
-rw-r--r--main/editline/np/unvis.c34
-rw-r--r--main/editline/np/vis.c12
-rw-r--r--main/editline/read.h2
-rw-r--r--main/editline/readline.c4
-rw-r--r--main/editline/refresh.c6
-rw-r--r--main/editline/term.c4
-rw-r--r--main/endpoints.c57
-rw-r--r--main/features_config.c22
-rw-r--r--main/format.c53
-rw-r--r--main/format_cache.c1
-rw-r--r--main/format_compatibility.c1
-rw-r--r--main/fskmodem.c1
-rw-r--r--main/http.c4
-rw-r--r--main/indications.c1
-rw-r--r--main/jitterbuf.c2
-rw-r--r--main/loader.c425
-rw-r--r--main/manager.c51
-rw-r--r--main/manager_channels.c1
-rw-r--r--main/manager_endpoints.c1
-rw-r--r--main/manager_system.c9
-rw-r--r--main/media_index.c1
-rw-r--r--main/named_acl.c21
-rw-r--r--main/named_locks.c44
-rw-r--r--main/netsock2.c2
-rw-r--r--main/pbx.c14
-rw-r--r--main/plc.c2
-rw-r--r--main/poll.c2
-rw-r--r--main/rtp_engine.c81
-rw-r--r--main/sdp_srtp.c1
-rw-r--r--main/security_events.c4
-rw-r--r--main/smoother.c1
-rw-r--r--main/sorcery.c199
-rw-r--r--main/stasis.c9
-rw-r--r--main/stasis_cache.c1
-rw-r--r--main/stasis_cache_pattern.c1
-rw-r--r--main/stasis_channels.c324
-rw-r--r--main/stdtime/localtime.c51
-rw-r--r--main/tcptls.c13
-rw-r--r--main/tdd.c1
-rw-r--r--main/threadpool.c4
-rw-r--r--main/threadstorage.c5
-rw-r--r--main/translate.c19
-rw-r--r--main/udptl.c8
-rw-r--r--main/ulaw.c1
-rw-r--r--main/utils.c36
-rw-r--r--main/xml.c1
-rw-r--r--main/xmldoc.c8
-rw-r--r--menuselect/Makefile4
-rw-r--r--menuselect/README12
-rw-r--r--menuselect/autoconfig.h.in1
-rw-r--r--menuselect/configure.ac4
-rw-r--r--menuselect/contrib/Makefile-dummy1
-rwxr-xr-xmenuselect/contrib/menuselect-dummy58
-rw-r--r--menuselect/linkedlists.h2
-rwxr-xr-xmenuselect/make_version16
-rw-r--r--menuselect/makeopts.in1
-rw-r--r--menuselect/menuselect_curses.c22
-rw-r--r--menuselect/menuselect_gtk.c10
-rw-r--r--menuselect/menuselect_stub.c2
-rw-r--r--menuselect/strcompat.c4
-rw-r--r--pbx/Makefile2
-rw-r--r--pbx/ael/ael-test/ael-ntest12/extensions.ael4
-rw-r--r--pbx/ael/ael-test/ael-ntest22/extensions.ael2
-rw-r--r--pbx/ael/ael-test/ael-ntest22/t2/f.ael1
-rw-r--r--pbx/ael/ael-test/ael-ntest23/t2/f.ael1
-rw-r--r--pbx/ael/ael-test/ael-ntest24/extensions.ael2
-rwxr-xr-xpbx/ael/ael-test/ael-ntest9/extensions.ael1
-rw-r--r--pbx/ael/ael-test/ael-test1/extensions.ael20
-rw-r--r--pbx/ael/ael-test/ael-test11/extensions.ael2
-rw-r--r--pbx/ael/ael-test/ael-test16/extensions.ael1
-rw-r--r--pbx/ael/ael-test/ael-test18/extensions.ael1
-rw-r--r--pbx/ael/ael-test/ael-test19/extensions.ael12
-rw-r--r--pbx/ael/ael-test/ael-test2/extensions.ael3
-rw-r--r--pbx/ael/ael-test/ael-test20/extensions.ael1
-rwxr-xr-xpbx/ael/ael-test/ael-test3/extensions.ael398
-rwxr-xr-xpbx/ael/ael-test/ael-test3/telemarket_torture.ael250
-rw-r--r--pbx/ael/ael-test/ael-test4/extensions.ael3
-rw-r--r--pbx/ael/ael-test/ael-test7/extensions.ael9
-rw-r--r--pbx/ael/ael-test/ael-test8/extensions.ael1
-rwxr-xr-xpbx/ael/ael-test/ael-vtest13/extensions.ael398
-rwxr-xr-xpbx/ael/ael-test/ael-vtest13/telemarket_torture.ael250
-rw-r--r--pbx/ael/ael-test/ael-vtest17/extensions.ael6
-rw-r--r--pbx/ael/ael-test/ael-vtest21/extensions.ael1
-rwxr-xr-xpbx/ael/ael-test/runtests2
-rw-r--r--pbx/dundi-parser.c20
-rw-r--r--pbx/pbx_ael.c20
-rw-r--r--pbx/pbx_config.c46
-rw-r--r--pbx/pbx_dundi.c7
-rw-r--r--pbx/pbx_lua.c103
-rw-r--r--pbx/pbx_realtime.c7
-rw-r--r--pbx/pbx_spool.c4
-rw-r--r--res/Makefile2
-rw-r--r--res/ael/ael.flex28
-rw-r--r--res/ael/ael.tab.c18
-rw-r--r--res/ael/ael.tab.h13
-rw-r--r--res/ael/ael.y11
-rw-r--r--res/ael/ael_lex.c95
-rw-r--r--res/ael/pval.c845
-rw-r--r--res/ari/ari_model_validators.h2
-rw-r--r--res/ari/ari_websockets.c2
-rw-r--r--res/ari/config.c8
-rw-r--r--res/ari/resource_events.c3
-rw-r--r--res/parking/res_parking.h2
-rw-r--r--res/res_ael_share.c2
-rw-r--r--res/res_agi.c16
-rw-r--r--res/res_calendar.c8
-rw-r--r--res/res_calendar_caldav.c2
-rw-r--r--res/res_calendar_icalendar.c2
-rw-r--r--res/res_clialiases.c16
-rw-r--r--res/res_config_curl.c2
-rw-r--r--res/res_config_ldap.c52
-rw-r--r--res/res_config_odbc.c10
-rw-r--r--res/res_config_sqlite.c10
-rw-r--r--res/res_config_sqlite3.c8
-rw-r--r--res/res_convert.c20
-rw-r--r--res/res_corosync.c1
-rw-r--r--res/res_curl.c20
-rw-r--r--res/res_fax.c4
-rw-r--r--res/res_fax_spandsp.c4
-rw-r--r--res/res_format_attr_opus.c2
-rw-r--r--res/res_format_attr_silk.c2
-rw-r--r--res/res_hep.c6
-rw-r--r--res/res_http_post.c4
-rw-r--r--res/res_http_websocket.c27
-rw-r--r--res/res_limit.c3
-rw-r--r--res/res_monitor.c28
-rw-r--r--res/res_musiconhold.c61
-rw-r--r--res/res_mwi_external_ami.c1
-rw-r--r--res/res_odbc.c17
-rw-r--r--res/res_odbc_transaction.c2
-rw-r--r--res/res_parking.c8
-rw-r--r--res/res_phoneprov.c2
-rw-r--r--res/res_pjsip.c9
-rw-r--r--res/res_pjsip/config_transport.c10
-rw-r--r--res/res_pjsip/location.c1
-rw-r--r--res/res_pjsip/pjsip_cli.c24
-rw-r--r--res/res_pjsip/pjsip_configuration.c4
-rw-r--r--res/res_pjsip/pjsip_global_headers.c4
-rw-r--r--res/res_pjsip/pjsip_message_filter.c18
-rw-r--r--res/res_pjsip/pjsip_options.c55
-rw-r--r--res/res_pjsip/pjsip_session.c1
-rw-r--r--res/res_pjsip_dlg_options.c1
-rw-r--r--res/res_pjsip_endpoint_identifier_ip.c63
-rw-r--r--res/res_pjsip_history.c2
-rw-r--r--res/res_pjsip_notify.c8
-rw-r--r--res/res_pjsip_outbound_publish.c1
-rw-r--r--res/res_pjsip_phoneprov_provider.c1
-rw-r--r--res/res_pjsip_publish_asterisk.c1
-rw-r--r--res/res_pjsip_pubsub.c12
-rw-r--r--res/res_pjsip_sdp_rtp.c4
-rw-r--r--res/res_pjsip_session.c16
-rw-r--r--res/res_pktccops.c76
-rw-r--r--res/res_realtime.c10
-rw-r--r--res/res_rtp_asterisk.c55
-rw-r--r--res/res_rtp_multicast.c2
-rw-r--r--res/res_smdi.c84
-rw-r--r--res/res_snmp.c4
-rw-r--r--res/res_sorcery_astdb.c6
-rw-r--r--res/res_sorcery_realtime.c2
-rw-r--r--res/res_speech.c2
-rw-r--r--res/res_srtp.c4
-rw-r--r--res/res_stasis.c4
-rw-r--r--res/res_statsd.c4
-rw-r--r--res/res_timing_dahdi.c8
-rw-r--r--res/res_timing_pthread.c6
-rw-r--r--res/res_xmpp.c8
-rw-r--r--res/snmp/agent.c2
-rw-r--r--res/stasis/app.c18
-rw-r--r--rest-api-templates/ari_model_validators.h.mustache2
-rw-r--r--sample.call1
-rw-r--r--sounds/Makefile2
-rw-r--r--static-http/ajamdemo.html40
-rw-r--r--static-http/astman.css2
-rw-r--r--static-http/astman.js8
-rw-r--r--static-http/mantest.html6
-rw-r--r--tests/Makefile2
-rw-r--r--tests/test_acl.c2
-rwxr-xr-xtests/test_ami_security_events.sh1
-rw-r--r--tests/test_aoc.c2
-rw-r--r--tests/test_config.c15
-rw-r--r--tests/test_dlinklists.c28
-rw-r--r--tests/test_locale.c2
-rw-r--r--tests/test_skel.c4
-rw-r--r--tests/test_substitution.c2
-rw-r--r--tests/test_taskprocessor.c2
-rw-r--r--third-party/Makefile1
-rw-r--r--third-party/configure.m41
-rwxr-xr-xthird-party/pjproject/apply_patches1
-rw-r--r--third-party/pjproject/patches/0050-dont_terminate_session_early.patch71
-rw-r--r--third-party/pjproject/patches/asterisk_malloc_debug.c2
-rw-r--r--utils/Makefile8
-rw-r--r--utils/ael_main.c62
-rw-r--r--utils/astcanary.c1
-rw-r--r--utils/astman.134
-rw-r--r--utils/astman.c62
-rw-r--r--utils/check_expr.c42
-rw-r--r--utils/conf2ael.c88
-rw-r--r--utils/db1-ast/hash/README18
-rw-r--r--utils/db1-ast/hash/hash_page.c2
-rw-r--r--utils/db1-ast/include/db.h2
-rw-r--r--utils/db1-ast/recno/rec_search.c2
-rw-r--r--utils/db1-ast/recno/rec_seq.c2
-rw-r--r--utils/extconf.c283
-rw-r--r--utils/frame.c7
-rw-r--r--utils/frame.h2
-rw-r--r--utils/muted.c28
-rw-r--r--utils/smsq.c8
-rw-r--r--utils/stereorize.c2
-rw-r--r--utils/streamplayer.c20
800 files changed, 11027 insertions, 11297 deletions
diff --git a/CHANGES b/CHANGES
index 7dd1aac27..9cb80f1fd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,11 @@ Core
Asterisk is compiled with the LOW_MEMORY compile time option enabled because
the cache code does not exist.
+chan_sip
+------------------
+ * Calls to invalid extensions are now reported as an ACL failure security event
+ "no_extension_match".
+
res_pjsip
------------------
* The "identify_by" on endpoints can now be set to "ip" to restrict an endpoint
@@ -327,7 +332,7 @@ ARI
hasn't registered yet.
* 'ari set debug' now displays requests and responses as well as events.
-
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 13.12.0 to Asterisk 13.13.0 ----------
------------------------------------------------------------------------------
@@ -1209,7 +1214,7 @@ res_pjsip_endpoint_identifer_ip
------------------
* New CLI commands have been added: "pjsip show identif(y|ies)", which lists
all configured PJSIP identify objects
-
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 12 to Asterisk 13 --------------------
------------------------------------------------------------------------------
@@ -1477,7 +1482,7 @@ AMI
* AMI action PJSIPNotify may now send to a URI instead of only to a PJSIP
endpoint as long as a default outbound endpoint is set. This also applies
to the equivalent CLI command (pjsip send notify)
-
+
* The AMI action PJSIPShowEndpoint now includes ContactStatusDetail sections
that give information on Asterisk's attempts to qualify the endpoint.
diff --git a/CREDITS b/CREDITS
index 65609768b..2a5f5a5f4 100644
--- a/CREDITS
+++ b/CREDITS
@@ -22,7 +22,7 @@
* John Todd, TalkPlus, Inc. and JR Richardson, Ntegrated Solutions.
for funding the development of SIP Session Timers support.
- * Omnitor AB, Gunnar Hellstr�m, for funding work with videocaps,
+ * Omnitor AB, Gunnar Hellström, for funding work with videocaps,
T.140 RED, originate with video/text and many more
contributions.
@@ -252,7 +252,7 @@
cdr_tds rewrite, countless other improvements, fixes, and good
ideas. sean(AT)malleable.com
- * Jan Kal�b - Calendaring support for Exchange Server 2007+ via
+ * Jan Kaláb - Calendaring support for Exchange Server 2007+ via
Exchange Web Services.
* University of Oslo (uio.no), Norway - SIP Max-Forwards setting
diff --git a/Makefile b/Makefile
index 5dcbf0e52..e9972af33 100644
--- a/Makefile
+++ b/Makefile
@@ -1114,4 +1114,3 @@ FORCE:
# This only stops targets within the root Makefile from building in parallel.
.NOTPARALLEL:
-
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index 4878cc992..18b3ee7b3 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -38,7 +38,7 @@ ifneq ($(MODULE_PREFIX),)
ALL_C_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.c,%,$(wildcard $(p)_*.c)))
ALL_CC_MODS+=$(foreach p,$(MODULE_PREFIX),$(patsubst %.cc,%,$(wildcard $(p)_*.cc)))
endif
-
+
C_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_C_MODS))
CC_MODS:=$(filter-out $(MENUSELECT_$(MENUSELECT_CATEGORY)),$(ALL_CC_MODS))
diff --git a/Makefile.rules b/Makefile.rules
index ee8eabd6f..227364410 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile rules
#
# Copyright (C) 2006-2010, Digium, Inc.
@@ -55,7 +55,7 @@ ifeq ($(NOISY_BUILD),)
ECHO_PREFIX=@
CMD_PREFIX=@
else
- ECHO_PREFIX=@\#
+ ECHO_PREFIX=@\#
CMD_PREFIX=
endif
diff --git a/README-SERIOUSLY.bestpractices.md b/README-SERIOUSLY.bestpractices.md
index 7e18c4aa8..ec36fac98 100644
--- a/README-SERIOUSLY.bestpractices.md
+++ b/README-SERIOUSLY.bestpractices.md
@@ -17,7 +17,8 @@ change over time as best practices are defined.
Recognizing potential issues with certain classes of authorization
* [Avoid Privilege Escalations]:
Disable the ability to execute functions that may escalate privileges
-
+* [Important Security Considerations]:
+ More information on the Asterisk Wiki
## Additional Links
@@ -386,3 +387,4 @@ In Asterisk 12 and later, live_dangerously defaults to no.
[Reducing Pattern Match Typos]: #reducing-pattern-match-typos
[Manager Class Authorizations]: #manager-class-authorizations
[Avoid Privilege Escalations]: #avoid-privilege-escalations
+[Important Security Considerations]: https://wiki.asterisk.org/wiki/display/AST/Important+Security+Considerations
diff --git a/README-addons.txt b/README-addons.txt
index 4d5e1986f..99541155c 100644
--- a/README-addons.txt
+++ b/README-addons.txt
@@ -9,18 +9,18 @@ potential licensing and/or patent implications that has on your usage and
distribution of Asterisk.
Even though Asterisk is released as open source under the terms of the
-GPLv2 (see LICENSE for details), no core functionality in Asterisk has any
+GPLv2 (see LICENSE for details), no core functionality in Asterisk has any
dependencies on libraries that are licensed under the GPL. One reason a module
may be in the add-ons category is that it may have a GPL dependency. Since
these dependencies are not compatible with dual licensing of Asterisk, the
-dependant modules are set aside to make it clear that they may not be used
-with commercial versions of Asterisk, unless other licensing arrangements are
+dependant modules are set aside to make it clear that they may not be used
+with commercial versions of Asterisk, unless other licensing arrangements are
made with the copyright holders of those dependencies.
Another reason that modules may be set aside is that there may be
additional restrictions on the usage of the code imposed by the license or
related patents. The MySQL and MP3 modules are examples of this.
-
+
If you have any questions, contact your lawyer.
===============================================================================
diff --git a/README.md b/README.md
index b75d7295e..5ef68e9d8 100644
--- a/README.md
+++ b/README.md
@@ -9,10 +9,7 @@
the security information document before you attempt to configure and run
an Asterisk server.
- If you downloaded Asterisk as a tarball, see the security section in the PDF
-version of the documentation in doc/tex/asterisk.pdf. Alternatively, pull up
-the HTML version of the documentation in doc/tex/asterisk/index.html. The
-source for the security document is available in doc/tex/security.tex.
+See [Important Security Considerations] for more information.
## WHAT IS ASTERISK ?
@@ -269,4 +266,4 @@ Asterisk is a trademark of Digium, Inc.
[CHANGES]: CHANGES
[configs]: configs
[doc]: doc
-
+[Important Security Considerations]: https://wiki.asterisk.org/wiki/display/AST/Important+Security+Considerations
diff --git a/UPGRADE-1.2.txt b/UPGRADE-1.2.txt
index cd647c47b..cfbff945f 100644
--- a/UPGRADE-1.2.txt
+++ b/UPGRADE-1.2.txt
@@ -37,9 +37,9 @@ Dialplan Expressions:
Agents:
-* The default for ackcall has been changed to "no" instead of "yes"
+* The default for ackcall has been changed to "no" instead of "yes"
because of a bug which caused the "yes" behavior to generally act like
- "no". You may need to adjust the value if your agents behave
+ "no". You may need to adjust the value if your agents behave
differently than you expect with respect to acknowledgement.
* The AgentCallBackLogin application now requires a second '|' before
@@ -56,16 +56,16 @@ Parking:
Dialing:
-* The Caller*ID of the outbound leg is now the extension that was
- called, rather than the Caller*ID of the inbound leg of the call. The
- "o" flag for Dial can be used to restore the original behavior if
+* The Caller*ID of the outbound leg is now the extension that was
+ called, rather than the Caller*ID of the inbound leg of the call. The
+ "o" flag for Dial can be used to restore the original behavior if
desired. Note that if you are looking for the originating callerid
- from the manager event, there is a new manager event "Dial" which
+ from the manager event, there is a new manager event "Dial" which
provides the source and destination channels and callerid.
-IAX:
+IAX:
-* The naming convention for IAX channels has changed in two ways:
+* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
@@ -77,7 +77,7 @@ SIP:
the other channel drivers and to avoid confusion with the "port"
option for users/peers.
-* The "Registry" event now uses "Username" rather than "User" for
+* The "Registry" event now uses "Username" rather than "User" for
consistency with IAX.
Applications:
@@ -85,7 +85,7 @@ Applications:
* With the addition of dialplan functions (which operate similarly
to variables), the SetVar application has been renamed to Set.
-* The CallerPres application has been removed. Use SetCallerPres
+* The CallerPres application has been removed. Use SetCallerPres
instead. It accepts both numeric and symbolic names.
* The applications GetGroupCount, GetGroupMatchCount, SetGroup, and
@@ -145,7 +145,7 @@ Applications:
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
- none is specified in the arguments. (This was the previously
+ none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
@@ -153,7 +153,7 @@ Queues:
* A queue is now considered empty not only if there are no members but if
none of the members are available (e.g. agents not logged on). To
- restore the original behavior, use "leavewhenempty=strict" or
+ restore the original behavior, use "leavewhenempty=strict" or
"joinwhenempty=strict" instead of "=yes" for those options.
* It is now possible to use multi-digit extensions in the exit context
@@ -165,8 +165,8 @@ Queues:
Extensions:
* By default, there is a new option called "autofallthrough" in
- extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
- behavior was to wait for an extension to be dialed after there were no
+ extensions.conf that is set to yes. Asterisk 1.0 (and earlier)
+ behavior was to wait for an extension to be dialed after there were no
more extensions to execute. "autofallthrough" changes this behavior
so that the call will immediately be terminated with BUSY,
CONGESTION, or HANGUP based on Asterisk's best guess. If you are
@@ -175,9 +175,9 @@ Extensions:
AGI:
-* AGI scripts did not always get SIGHUP at the end, previously. That
- behavior has been fixed. If you do not want your script to terminate
- at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
+* AGI scripts did not always get SIGHUP at the end, previously. That
+ behavior has been fixed. If you do not want your script to terminate
+ at the end of AGI being called (e.g. on a hangup) then set SIGHUP to
be ignored within your application.
* CallerID is reported with agi_callerid and agi_calleridname instead
@@ -199,13 +199,13 @@ chan_modem:
MeetMe:
* The conference application now allows users to increase/decrease their
- speaking volume and listening volume (independently of each other and
- other users); the 'admin' and 'user' menus have changed, and new sound
- files are included with this release. However, if a user calling in
- over a Zaptel channel that does NOT have hardware DTMF detection
- increases their speaking volume, it is likely they will no longer be
- able to enter/exit the menu or make any further adjustments, as the
- software DTMF detector will not be able to recognize the DTMF coming
+ speaking volume and listening volume (independently of each other and
+ other users); the 'admin' and 'user' menus have changed, and new sound
+ files are included with this release. However, if a user calling in
+ over a Zaptel channel that does NOT have hardware DTMF detection
+ increases their speaking volume, it is likely they will no longer be
+ able to enter/exit the menu or make any further adjustments, as the
+ software DTMF detector will not be able to recognize the DTMF coming
from their device.
GetVar Manager Action:
diff --git a/UPGRADE-1.4.txt b/UPGRADE-1.4.txt
index f99f937b0..74cb1e5b4 100644
--- a/UPGRADE-1.4.txt
+++ b/UPGRADE-1.4.txt
@@ -34,7 +34,7 @@ users, that will result in a similar build to what they would have had before
the configure script was added to the build process (except for having to run
'make' again after the configure script is run). Note that the configure script
does NOT need to be re-run just to rebuild Asterisk; you only need to re-run it
-when your system configuration changes or you wish to build Asterisk with
+when your system configuration changes or you wish to build Asterisk with
different options.
Build Process (module selection):
@@ -42,7 +42,7 @@ Build Process (module selection):
The Asterisk source tree now includes a basic module selection and build option
selection tool called 'menuselect'. Run 'make menuselect' to make your choices.
In this tool, you can disable building of modules that you don't care about,
-turn on/off global options for the build and see which modules will not
+turn on/off global options for the build and see which modules will not
(and cannot) be built because your system does not have the required external
dependencies installed.
@@ -55,7 +55,7 @@ interface. In this case, the resulting file contains which CFLAGS are in use,
not which ones are not in use.
If you would like to save your choices and have them applied against all
-builds, the file can be copied to '~/.asterisk.makeopts' or
+builds, the file can be copied to '~/.asterisk.makeopts' or
'/etc/asterisk.makeopts'.
Build Process (Makefile targets):
@@ -105,10 +105,10 @@ PBX Core:
* The (very old and undocumented) ability to use BYEXTENSION for dialing
instead of ${EXTEN} has been removed.
-
+
* Builtin (res_features) transfer functionality attempts to use the context
defined in TRANSFER_CONTEXT variable of the transferer channel first. If
- not set, it uses the transferee variable. If not set in any channel, it will
+ not set, it uses the transferee variable. If not set in any channel, it will
attempt to use the last non macro context. If not possible, it will default
to the current context.
@@ -116,7 +116,7 @@ PBX Core:
if your dialplan relies on the ability to 'run off the end' of an extension
and wait for a new extension without using WaitExten() to accomplish that,
you will need set autofallthrough to 'no' in your extensions.conf file.
-
+
Command Line Interface:
* 'show channels concise', designed to be used by applications that will parse
@@ -155,10 +155,10 @@ Applications:
* OSPAuth is added to authenticate OSP tokens in in_bound call setup messages.
-* The CONNECT event in the queue_log from app_queue now has a second field
- in addition to the holdtime field. It contains the unique ID of the
- queue member channel that is taking the call. This is useful when trying
- to link recording filenames back to a particular call from the queue.
+* The CONNECT event in the queue_log from app_queue now has a second field
+ in addition to the holdtime field. It contains the unique ID of the
+ queue member channel that is taking the call. This is useful when trying
+ to link recording filenames back to a particular call from the queue.
* The old/current behavior of app_queue has a serial type behavior
in that the queue will make all waiting callers wait in the queue
@@ -170,14 +170,14 @@ Applications:
waits while this happens. This cycle continues until there are
no more available members or waiting callers, whichever comes first.
The new behavior, enabled by setting autofill=yes in queues.conf
- either at the [general] level to default for all queues or
- to set on a per-queue level, makes sure that when the waiting
- callers are connecting with available members in a parallel fashion
+ either at the [general] level to default for all queues or
+ to set on a per-queue level, makes sure that when the waiting
+ callers are connecting with available members in a parallel fashion
until there are no more available members or no more waiting callers,
whichever comes first. This is probably more along the lines of how
- one would expect a queue should work and in most cases, you will want
- to enable this new behavior. If you do not specify or comment out this
- option, it will default to "no" to keep backward compatability with the old
+ one would expect a queue should work and in most cases, you will want
+ to enable this new behavior. If you do not specify or comment out this
+ option, it will default to "no" to keep backward compatability with the old
behavior.
* Queues depend on the channel driver reporting the proper state
@@ -197,7 +197,7 @@ Applications:
call-limit=10
-* The app_queue application now has the ability to use MixMonitor to
+* The app_queue application now has the ability to use MixMonitor to
record conversations queue members are having with queue callers. Please
see configs/queues.conf.sample for more information on this option.
@@ -212,9 +212,9 @@ Applications:
other external program in order to mix the audio.
* app_meetme: The 'm' option (monitor) is renamed to 'l' (listen only), and
- the 'm' option now provides the functionality of "initially muted".
+ the 'm' option now provides the functionality of "initially muted".
In practice, most existing dialplans using the 'm' flag should not notice
- any difference, unless the keypad menu is enabled, allowing the user
+ any difference, unless the keypad menu is enabled, allowing the user
to unmute themsleves.
* ast_play_and_record would attempt to cancel the recording if a DTMF
@@ -255,10 +255,10 @@ Applications:
previously used only by EXTENDED_ODBC_STORAGE. This means that you will need to update
your table format using the schema provided in doc/odbcstorage.txt
-* app_waitforsilence: Fixes have been made to this application which changes the
+* app_waitforsilence: Fixes have been made to this application which changes the
default behavior with how quickly it returns. You can maintain "old-style" behavior
with the addition/use of a third "timeout" parameter.
- Please consult the application documentation and make changes to your dialplan
+ Please consult the application documentation and make changes to your dialplan
if appropriate.
Manager:
@@ -270,9 +270,9 @@ Manager:
until after the release of 1.4, when it will be removed. Please use the time
during the 1.4 release to make this transition.
-* The AgentConnect event now has an additional field called "BridgedChannel"
- which contains the unique ID of the queue member channel that is taking the
- call. This is useful when trying to link recording filenames back to
+* The AgentConnect event now has an additional field called "BridgedChannel"
+ which contains the unique ID of the queue member channel that is taking the
+ call. This is useful when trying to link recording filenames back to
a particular call from the queue.
* app_userevent has been modified to always send Event: UserEvent with the
@@ -298,17 +298,17 @@ Variables:
functions. You are encouraged to move towards the associated dialplan
function, as these variables will be removed in a future release.
-* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
+* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now
adjustable from cdr.conf, instead of recompiling.
* OSP applications exports several new variables, ${OSPINHANDLE},
${OSPOUTHANDLE}, ${OSPINTOKEN}, ${OSPOUTTOKEN}, ${OSPCALLING},
${OSPINTIMELIMIT}, and ${OSPOUTTIMELIMIT}
-
+
* Builtin transfer functionality sets the variable ${TRANSFERERNAME} in the new
created channel. This variables holds the channel name of the transferer.
-* The dial plan variable PRI_CAUSE will be removed from future versions
+* The dial plan variable PRI_CAUSE will be removed from future versions
of Asterisk.
It is replaced by adding a cause value to the hangup() application.
@@ -322,8 +322,8 @@ Functions:
modules.conf file then you will need to explicitly load the modules that
contain the functions you want to use.
-* The ENUMLOOKUP() function with the 'c' option (for counting the number of
- records), but the lookup fails to match any records, the returned value will
+* The ENUMLOOKUP() function with the 'c' option (for counting the number of
+ records), but the lookup fails to match any records, the returned value will
now be "0" instead of blank.
* The REALTIME() function is now available in version 1.4 and app_realtime has
@@ -345,7 +345,7 @@ The IAX2 channel:
which user you want based on host.
If you would like to go ahead and use the new behavior which doesn't use the
- order in the config file to influence matching order, then change the
+ order in the config file to influence matching order, then change the
MAX_PEER_BUCKETS define in chan_iax2.c to a value greater than one. An
example is provided there. By changing this, you will get *much* better
performance on systems that do a lot of peer and user lookups as they will be
@@ -360,12 +360,12 @@ The IAX2 channel:
The SIP channel:
-* The "incominglimit" setting is replaced by the "call-limit" setting in
+* The "incominglimit" setting is replaced by the "call-limit" setting in
sip.conf.
-* OSP support code is removed from SIP channel to OSP applications. ospauth
+* OSP support code is removed from SIP channel to OSP applications. ospauth
option in sip.conf is removed to osp.conf as authpolicy. allowguest option
- in sip.conf cannot be set as osp anymore.
+ in sip.conf cannot be set as osp anymore.
* The Asterisk RTP stack has been changed in regards to RFC2833 reception
and transmission. Packets will now be sent with proper duration instead of all
@@ -419,10 +419,10 @@ The G726-32 codec:
Installation:
* On BSD systems, the installation directories have changed to more "FreeBSDish"
- directories. On startup, Asterisk will look for the main configuration in
+ directories. On startup, Asterisk will look for the main configuration in
/usr/local/etc/asterisk/asterisk.conf
- If you have an old installation, you might want to remove the binaries and
- move the configuration files to the new locations. The following directories
+ If you have an old installation, you might want to remove the binaries and
+ move the configuration files to the new locations. The following directories
are now default:
ASTLIBDIR /usr/local/lib/asterisk
ASTVARLIBDIR /usr/local/share/asterisk
@@ -476,7 +476,7 @@ CDR Records:
set. When using the "callerid" option for various channel drivers, some
would set ANI and some would not. This has been cleared up so that all
channel drivers set ANI. If you would like to change the callerid number
- on the channel from the dialplan and have that change also show up in the
+ on the channel from the dialplan and have that change also show up in the
CDR, then you *must* set CALLERID(ANI) as well as CALLERID(num).
API:
@@ -492,7 +492,6 @@ Formats:
* format_wav: The GAIN preprocessor definition has been changed from 2 to 0
in Asterisk 1.4. This change was made in response to user complaints of
choppiness or the clipping of loud signal peaks. The GAIN preprocessor
- definition will be retained in Asterisk 1.4, but will be removed in a
+ definition will be retained in Asterisk 1.4, but will be removed in a
future release. The use of GAIN for the increasing of voicemail message
volume should use the 'volgain' option in voicemail.conf
-
diff --git a/UPGRADE-1.6.txt b/UPGRADE-1.6.txt
index d0fc82a24..4ae440147 100644
--- a/UPGRADE-1.6.txt
+++ b/UPGRADE-1.6.txt
@@ -39,7 +39,7 @@ Core:
sound file installer in the Makefile).
* The ast_expr2 stuff has been modified to handle floating-point numbers.
- Numbers of the format D.D are now acceptable input for the expr parser,
+ Numbers of the format D.D are now acceptable input for the expr parser,
Where D is a string of base-10 digits. All math is now done in "long double",
if it is available on your compiler/architecture. This was half-way between
a bug-fix (because the MATH func returns fp by default), and an enhancement.
@@ -48,7 +48,7 @@ Core:
of rounding/truncation, along with a set of common floating point operations,
like sin, cos, tan, log, pow, etc. The ability to call external functions
like CDR(), etc. was also added, without having to use the ${...} notation.
-
+
* The delimiter passed to applications has been changed to the comma (','), as
that is what people are used to using within extensions.conf. If you are
using realtime extensions, you will need to translate your existing dialplan
@@ -190,7 +190,7 @@ Formats:
Channel Drivers:
* SIP: a small upgrade to support the "Record" button on the SNOM360,
- which sends a sip INFO message with a "Record: on" or "Record: off"
+ which sends a sip INFO message with a "Record: on" or "Record: off"
header. If Asterisk is set up (via features.conf) to accept "One Touch Monitor"
requests (by default, via '*1'), then the user-configured dialpad sequence
is generated, and recording can be started and stopped via this button. The
@@ -204,9 +204,9 @@ Channel Drivers:
now renamed to "counteronpeer".
* SIP: The "username" option is now renamed to "defaultuser" to match "defaultip".
- These are used only before registration to call a peer with the uri
+ These are used only before registration to call a peer with the uri
sip:defaultuser@defaultip
- The "username" setting still work, but is deprecated and will not work in
+ The "username" setting still work, but is deprecated and will not work in
the next version of Asterisk.
* SIP: The old "insecure" options, deprecated in 1.4, have been removed.
@@ -241,7 +241,7 @@ Channel Drivers:
Configuration:
* pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,
- lowcost and other is not acceptable now. Look into qos.tex for description of
+ lowcost and other is not acceptable now. Look into qos.tex for description of
this parameter.
* queues.conf: the queue-lessthan sound file option is no longer available, and the
@@ -249,7 +249,7 @@ Configuration:
Manager:
-* Manager has been upgraded to version 1.1 with a lot of changes.
+* Manager has been upgraded to version 1.1 with a lot of changes.
Please check doc/manager_1_1.txt for information
* The IAXpeers command output has been changed to more closely resemble the
diff --git a/UPGRADE-1.8.txt b/UPGRADE-1.8.txt
index e23d5da7f..b01f762a5 100644
--- a/UPGRADE-1.8.txt
+++ b/UPGRADE-1.8.txt
@@ -73,9 +73,9 @@ From 1.6.2 to 1.8:
it is set to load. If not, then any module which uses RTP (such as chan_sip)
will not be able to send or receive calls.
-* The app_dahdiscan.c file has been removed, but the dialplan app DAHDIScan still
- remains. It now exists within app_chanspy.c and retains the exact same
- functionality as before.
+* The app_dahdiscan.c file has been removed, but the dialplan app DAHDIScan still
+ remains. It now exists within app_chanspy.c and retains the exact same
+ functionality as before.
* The default behavior for Set, AGI, and pbx_realtime has been changed to implement
1.6 behavior by default, if there is no [compat] section in asterisk.conf. In
@@ -111,7 +111,7 @@ From 1.6.2 to 1.8:
* ExternalIVR will now send Z events for invalid or missing files, T events
now include the interrupted file and bugs in argument parsing have been
fixed so there may be arguments specified in incorrect ways that were
- working that will no longer work. Please see
+ working that will no longer work. Please see
https://wiki.asterisk.org/wiki/display/AST/External+IVR+Interface for details.
* OSP lookup application changes following variable names:
@@ -185,7 +185,7 @@ From 1.6.1 to 1.6.2:
* SIP no longer sends the 183 progress message for early media by
default. Applications requiring early media should use the
- progress() dialplan app to generate the progress message.
+ progress() dialplan app to generate the progress message.
* The firmware for the IAXy has been removed from Asterisk. It can be
downloaded from http://downloads.digium.com/pub/iaxy/. To have Asterisk
@@ -269,8 +269,8 @@ From 1.6.1 to 1.6.2:
* DAHDISendCallreroutingFacility() parameters are now comma-separated,
instead of the old pipe.
-* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
- that would end up being interpreted as a bug once Asterisk started removing
+* res_jabber: autoprune has been disabled by default, to avoid misconfiguration
+ that would end up being interpreted as a bug once Asterisk started removing
the contacts from a user list.
* The cdr.conf file must exist and be configured correctly in order for CDR
@@ -341,4 +341,3 @@ From 1.6.0.x to 1.6.1:
* If you use ODBC storage for voicemail, there is a new field called "flag"
which should be a char(8) or larger. This field specifies whether or not a
message has been designated to be "Urgent", "PRIORITY", or not.
-
diff --git a/UPGRADE-10.txt b/UPGRADE-10.txt
index 35a9fcb2b..f4b2bec82 100644
--- a/UPGRADE-10.txt
+++ b/UPGRADE-10.txt
@@ -79,10 +79,10 @@ Asterisk Database:
convert an existing astdb to the SQLite3 version automatically at runtime.
Module Support Level
- - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
- More information is available on the Asterisk wiki at
+ More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
diff --git a/UPGRADE-11.txt b/UPGRADE-11.txt
index 311edc8e3..58b70b6c1 100644
--- a/UPGRADE-11.txt
+++ b/UPGRADE-11.txt
@@ -185,7 +185,7 @@ SIP
configuration option. Symptoms of this include one way media or no media flow.
chan_unistim
- - Due to massive update in chan_unistim phone keys functions and on-screen
+ - Due to massive update in chan_unistim phone keys functions and on-screen
information changed.
users.conf:
@@ -257,10 +257,10 @@ Manager:
unchanged.
Module Support Level
- - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
formats, funcs, pbx, and res have been updated to include MODULEINFO data
that includes <support_level> tags with a value of core, extended, or deprecated.
- More information is available on the Asterisk wiki at
+ More information is available on the Asterisk wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
Deprecated modules are now marked to not build by default and must be explicitly
diff --git a/UPGRADE-12.txt b/UPGRADE-12.txt
index 79cafa11f..665e0168a 100644
--- a/UPGRADE-12.txt
+++ b/UPGRADE-12.txt
@@ -427,12 +427,12 @@ Parking:
- Configuration is found in res_parking.conf. It is no longer supported in
features.conf
- - The arguments for the Park, ParkedCall, and ParkAndAnnounce applications
- have been modified significantly. See the application documents for
+ - The arguments for the Park, ParkedCall, and ParkAndAnnounce applications
+ have been modified significantly. See the application documents for
specific details.
- Numerous changes to Parking related applications, AMI and CLI commands and
- internal inter-workings have been made. Please read the CHANGES file for
+ internal inter-workings have been made. Please read the CHANGES file for
the detailed list.
Security Events Framework:
diff --git a/addons/app_mysql.c b/addons/app_mysql.c
index 298ed9d65..6a5f26299 100644
--- a/addons/app_mysql.c
+++ b/addons/app_mysql.c
@@ -27,7 +27,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page app_mysql.conf app_mysql.conf
* \verbinclude app_mysql.conf.sample
*/
@@ -335,7 +335,7 @@ static int aMYSQL_connect(struct ast_channel *chan, const char *data)
unsigned int port = 0;
char *port_str;
char *parse = ast_strdupa(data);
-
+
AST_NONSTANDARD_APP_ARGS(args, parse, ' ');
if (args.argc < 6) {
@@ -626,8 +626,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -665,4 +665,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Simple Mysql Interface");
-
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index ebe19ad95..53ea92359 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -128,7 +128,7 @@ static char *handle_cli_cdr_mysql_status(struct ast_cli_entry *e, int cmd, struc
else
snprintf(status, 255, "Connected to %s@%s", ast_str_buffer(dbname), ast_str_buffer(hostname));
- if (!ast_strlen_zero(ast_str_buffer(dbuser)))
+ if (ast_str_strlen(dbuser))
snprintf(status2, 99, " with username %s", ast_str_buffer(dbuser));
if (ast_str_strlen(dbtable))
snprintf(status2, 99, " using table %s", ast_str_buffer(dbtable));
@@ -158,6 +158,16 @@ static struct ast_cli_entry cdr_mysql_status_cli[] = {
AST_CLI_DEFINE(handle_cli_cdr_mysql_status, "Show connection status of cdr_mysql"),
};
+static void configure_connection_charset(void)
+{
+ if (ast_str_strlen(dbcharset)) {
+ const char *charset = ast_str_buffer(dbcharset);
+ if (mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, charset)) {
+ ast_log(LOG_WARNING, "Failed to set connection charset. Data inserted might be invalid.\n");
+ }
+ }
+}
+
static int mysql_log(struct ast_cdr *cdr)
{
struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024);
@@ -190,15 +200,13 @@ db_reconnect:
if (ssl_ca || ssl_cert || ssl_key) {
mysql_ssl_set(&mysql, ssl_key ? ast_str_buffer(ssl_key) : NULL, ssl_cert ? ast_str_buffer(ssl_cert) : NULL, ssl_ca ? ast_str_buffer(ssl_ca) : NULL, NULL, NULL);
}
+
+ configure_connection_charset();
+
if (mysql_real_connect(&mysql, ast_str_buffer(hostname), ast_str_buffer(dbuser), ast_str_buffer(password), ast_str_buffer(dbname), dbport, dbsock && ast_str_strlen(dbsock) ? ast_str_buffer(dbsock) : NULL, ssl_ca ? CLIENT_SSL : 0)) {
connected = 1;
connect_time = time(NULL);
records = 0;
- if (dbcharset) {
- ast_str_set(&sql1, 0, "SET NAMES '%s'", ast_str_buffer(dbcharset));
- mysql_real_query(&mysql, ast_str_buffer(sql1), ast_str_strlen(sql1));
- ast_debug(1, "SQL command as follows: %s\n", ast_str_buffer(sql1));
- }
} else {
ast_log(LOG_ERROR, "Cannot connect to database server %s: (%d) %s\n", ast_str_buffer(hostname), mysql_errno(&mysql), mysql_error(&mysql));
connected = 0;
@@ -500,7 +508,7 @@ static int my_load_module(int reload)
res |= my_load_config_string(cfg, "global", "ssl_cert", &ssl_cert, "");
res |= my_load_config_string(cfg, "global", "ssl_key", &ssl_key, "");
- res |= my_load_config_number(cfg, "global", "port", &dbport, 0);
+ res |= my_load_config_number(cfg, "global", "port", &dbport, MYSQL_PORT);
res |= my_load_config_number(cfg, "global", "timeout", &timeout, 0);
res |= my_load_config_string(cfg, "global", "compat", &compat, "no");
res |= my_load_config_string(cfg, "global", "cdrzone", &cdrzone, "");
@@ -540,15 +548,16 @@ static int my_load_module(int reload)
ast_debug(1, "Got hostname of %s\n", ast_str_buffer(hostname));
ast_debug(1, "Got port of %d\n", dbport);
ast_debug(1, "Got a timeout of %d\n", timeout);
- if (dbsock)
+ if (ast_str_strlen(dbsock)) {
ast_debug(1, "Got sock file of %s\n", ast_str_buffer(dbsock));
+ }
ast_debug(1, "Got user of %s\n", ast_str_buffer(dbuser));
ast_debug(1, "Got dbname of %s\n", ast_str_buffer(dbname));
ast_debug(1, "Got password of %s\n", ast_str_buffer(password));
ast_debug(1, "%sunning in calldate compatibility mode\n", calldate_compat ? "R" : "Not r");
ast_debug(1, "Dates and times are localized to %s\n", S_OR(ast_str_buffer(cdrzone), "local timezone"));
- if (dbcharset) {
+ if (ast_str_strlen(dbcharset)) {
ast_debug(1, "Got DB charset of %s\n", ast_str_buffer(dbcharset));
}
@@ -573,6 +582,9 @@ static int my_load_module(int reload)
NULL, NULL);
}
temp = dbsock && ast_str_strlen(dbsock) ? ast_str_buffer(dbsock) : NULL;
+
+ configure_connection_charset();
+
if (!mysql_real_connect(&mysql, ast_str_buffer(hostname), ast_str_buffer(dbuser), ast_str_buffer(password), ast_str_buffer(dbname), dbport, temp, ssl_ca && ast_str_strlen(ssl_ca) ? CLIENT_SSL : 0)) {
ast_log(LOG_ERROR, "Failed to connect to mysql database %s on %s.\n", ast_str_buffer(dbname), ast_str_buffer(hostname));
connected = 0;
@@ -582,11 +594,6 @@ static int my_load_module(int reload)
connected = 1;
records = 0;
connect_time = time(NULL);
- if (dbcharset) {
- snprintf(sqldesc, sizeof(sqldesc), "SET NAMES '%s'", ast_str_buffer(dbcharset));
- mysql_real_query(&mysql, sqldesc, strlen(sqldesc));
- ast_debug(1, "SQL command as follows: %s\n", sqldesc);
- }
/* Get table description */
snprintf(sqldesc, sizeof(sqldesc), "DESC %s", dbtable ? ast_str_buffer(dbtable) : "cdr");
@@ -725,4 +732,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "MySQL CDR Backend",
.unload = unload_module,
.reload = reload,
);
-
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
index f9fe9524b..04d404710 100644
--- a/addons/chan_mobile.c
+++ b/addons/chan_mobile.c
@@ -16,7 +16,7 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief Bluetooth Mobile Device channel driver
*
@@ -1774,7 +1774,7 @@ static int rfcomm_read_command(int rsock, char **buf, size_t count, size_t *in_c
* \verbatim
* \r\n<result code>\r\n
* <at command>\r
- * \r\n>
+ * \r\n>
* \endverbatim
*
* These formats correspond to AT result codes, AT commands, and the AT SMS
@@ -2256,7 +2256,7 @@ static int hfp_parse_cmti(struct hfp_pvt *hfp, char *buf)
int index = -1;
/* parse cmti info in the following format:
- * +CMTI: <mem>,<index>
+ * +CMTI: <mem>,<index>
*/
if (!sscanf(buf, "+CMTI: %*[^,],%d", &index)) {
ast_debug(2, "[%s] error parsing CMTI event '%s'\n", hfp->owner->id, buf);
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 44f339f2c..3afcecd96 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -135,7 +135,7 @@ static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char
static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp);
-static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
+static int ooh323_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *rtp,
struct ast_rtp_instance *vrtp, struct ast_rtp_instance *trtp, const struct ast_format_cap *codecs, int nat_active);
static void ooh323_get_codec(struct ast_channel *chan, struct ast_format_cap *result);
void setup_rtp_remote(ooCallData *call, const char *remoteIp, int remotePort);
@@ -218,7 +218,7 @@ static struct ooh323_pvt {
char callee_dialedDigits[AST_MAX_EXTENSION];
char callee_email[AST_MAX_EXTENSION];
char callee_url[AST_MAX_EXTENSION];
-
+
int port;
struct ast_format *readformat; /* negotiated read format */
struct ast_format *writeformat; /* negotiated write format */
@@ -394,7 +394,7 @@ static struct ooh323_config
static struct ast_sched_context *sched;
static struct io_context *io;
-/* Protect the monitoring thread, so only one process can kill or start it,
+/* Protect the monitoring thread, so only one process can kill or start it,
and not when it's doing something critical. */
AST_MUTEX_DEFINE_STATIC(monlock);
@@ -405,7 +405,7 @@ static pthread_t monitor_thread = AST_PTHREADT_NULL;
static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
- const char *host, struct ast_format_cap *cap,
+ const char *host, struct ast_format_cap *cap,
const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
struct ast_format_cap *caps = NULL;
@@ -422,12 +422,12 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
/* Don't hold a h323 pvt lock while we allocate a channel */
ast_mutex_unlock(&i->lock);
ast_mutex_lock(&ooh323c_cn_lock);
- ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
+ ch = ast_channel_alloc(1, state, i->callerid_num, i->callerid_name,
i->accountcode, i->exten, i->context, assignedids, requestor, i->amaflags,
"OOH323/%s-%ld", host, callnumber);
callnumber++;
ast_mutex_unlock(&ooh323c_cn_lock);
-
+
ast_mutex_lock(&i->lock);
if (ch && caps) {
@@ -497,17 +497,17 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
ast_channel_priority_set(ch, 1);
if(!ast_test_flag(i, H323_OUTGOING)) {
-
+
if (!ast_strlen_zero(i->caller_h323id)) {
pbx_builtin_setvar_helper(ch, "_CALLER_H323ID", i->caller_h323id);
}
if (!ast_strlen_zero(i->caller_dialedDigits)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323DIALEDDIGITS",
i->caller_dialedDigits);
}
if (!ast_strlen_zero(i->caller_email)) {
- pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
+ pbx_builtin_setvar_helper(ch, "_CALLER_H323EMAIL",
i->caller_email);
}
if (!ast_strlen_zero(i->caller_url)) {
@@ -517,7 +517,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
if (!ast_strlen_zero(i->accountcode))
ast_channel_accountcode_set(ch, i->accountcode);
-
+
if (i->amaflags)
ast_channel_amaflags_set(ch, i->amaflags);
@@ -528,7 +528,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
ast_channel_unlock(ch);
ast_hangup(ch);
ch = NULL;
- }
+ }
}
if (ch) {
@@ -552,7 +552,7 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
-static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
+static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
{
struct ooh323_pvt *pvt = NULL;
@@ -602,7 +602,7 @@ static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
pvt->aniasdni = gANIasDNI;
- ast_mutex_unlock(&pvt->lock);
+ ast_mutex_unlock(&pvt->lock);
/* Add to interface list */
ast_mutex_lock(&iflock);
pvt->next = iflist;
@@ -628,7 +628,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
struct ast_channel *chan = NULL;
struct ooh323_pvt *p = NULL;
struct ooh323_peer *peer = NULL;
- char *dest = NULL;
+ char *dest = NULL;
char *ext = NULL;
char tmp[256];
int port = 0;
@@ -658,7 +658,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
dest = strchr(tmp, '/');
- if (dest) {
+ if (dest) {
*dest = '\0';
dest++;
ext = dest;
@@ -769,7 +769,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
chan = ooh323_new(p, AST_STATE_DOWN, p->username, cap,
assignedids, requestor);
-
+
ast_mutex_unlock(&p->lock);
if (!chan) {
@@ -856,7 +856,7 @@ struct ooh323_user *find_user(const char * name, const char* ip)
struct ooh323_peer *find_friend(const char *name, int port)
{
- struct ooh323_peer *peer;
+ struct ooh323_peer *peer;
if (gH323Debug)
ast_verb(0, "--- find_friend \"%s\"\n", name);
@@ -882,7 +882,7 @@ struct ooh323_peer *find_friend(const char *name, int port)
ast_verb(0, "+++ find_friend \"%s\"\n", name);
}
- return peer;
+ return peer;
}
@@ -921,7 +921,7 @@ struct ooh323_peer *find_peer(const char * name, int port)
ast_verb(0, "+++ find_peer \"%s\"\n", name);
}
- return peer;
+ return peer;
}
static int ooh323_digit_begin(struct ast_channel *chan, char digit)
@@ -929,7 +929,7 @@ static int ooh323_digit_begin(struct ast_channel *chan, char digit)
char dtmf[2];
struct ooh323_pvt *p = (struct ooh323_pvt *) ast_channel_tech_pvt(chan);
int res = 0;
-
+
if (gH323Debug)
ast_verb(0, "--- ooh323_digit_begin\n");
@@ -1036,7 +1036,7 @@ static int ooh323_call(struct ast_channel *ast, const char *dest, int timeout)
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323ID"))) {
ast_copy_string(p->caller_h323id, val, sizeof(p->caller_h323id));
}
-
+
if ((val = pbx_builtin_getvar_helper(ast, "CALLER_H323DIALEDDIGITS"))) {
ast_copy_string(p->caller_dialedDigits, val, sizeof(p->caller_dialedDigits));
if(!p->callerid_num)
@@ -1117,13 +1117,13 @@ static int ooh323_hangup(struct ast_channel *ast)
if (gH323Debug)
ast_verb(0, " hanging %s with cause: %d\n", p->username, q931cause);
- ast_channel_tech_pvt_set(ast, NULL);
+ ast_channel_tech_pvt_set(ast, NULL);
if (!ast_test_flag(p, H323_ALREADYGONE)) {
- ooHangCall(p->callToken,
+ ooHangCall(p->callToken,
ooh323_convert_hangupcause_asteriskToH323(q931cause), q931cause);
ast_set_flag(p, H323_ALREADYGONE);
/* ast_mutex_unlock(&p->lock); */
- } else
+ } else
ast_set_flag(p, H323_NEEDDESTROY);
/* detach channel here */
if (p->owner) {
@@ -1139,11 +1139,11 @@ static int ooh323_hangup(struct ast_channel *ast)
/* Notify the module monitors that use count for resource has changed */
ast_update_use_count();
-
+
} else {
ast_debug(1, "No call to hangup\n" );
}
-
+
if (gH323Debug)
ast_verb(0, "+++ ooh323_hangup\n");
@@ -1166,7 +1166,7 @@ static int ooh323_answer(struct ast_channel *ast)
ast_channel_lock(ast);
if (!p->alertsent) {
if (gH323Debug) {
- ast_debug(1, "Sending forced ringback for %s, res = %u\n",
+ ast_debug(1, "Sending forced ringback for %s, res = %u\n",
callToken, ooManualRingback(callToken));
} else {
ooManualRingback(callToken);
@@ -1228,7 +1228,7 @@ static int ooh323_write(struct ast_channel *ast, struct ast_frame *f)
return res;
}
-
+
if (f->frametype == AST_FRAME_VOICE) {
/* sending progress for first */
if (!ast_test_flag(p, H323_OUTGOING) && !p->progsent &&
@@ -1266,7 +1266,7 @@ static int ooh323_write(struct ast_channel *ast, struct ast_frame *f)
ast_mutex_unlock(&p->lock);
return 0;
} else {
- ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
+ ast_log(LOG_WARNING, "Can't send %u type frames with OOH323 write\n",
f->frametype);
ast_mutex_unlock(&p->lock);
return 0;
@@ -1303,7 +1303,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d
if (gH323Debug) {
ast_verb(0, "----- ooh323_indicate %d on call %s\n", condition, callToken);
}
-
+
ast_mutex_lock(&p->lock);
switch (condition) {
case AST_CONTROL_INCOMPLETE:
@@ -1331,7 +1331,7 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d
if (!p->progsent) {
if (gH323Debug) {
ast_debug(1, "Sending manual progress for %s, res = %u\n", callToken,
- ooManualProgress(callToken));
+ ooManualProgress(callToken));
} else {
ooManualProgress(callToken);
}
@@ -1476,7 +1476,7 @@ static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, i
if (gH323Debug)
ast_verb(0, "----- ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
switch (option) {
case AST_OPTION_T38_STATE:
@@ -1516,7 +1516,7 @@ static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, i
if (gH323Debug)
ast_verb(0, "+++++ ooh323_queryoption %d on channel %s\n", option, ast_channel_name(ast));
-
+
ast_mutex_unlock(&p->lock);
return res;
@@ -1560,9 +1560,9 @@ void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txfra
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
+ ast_verb(0, "--- ooh323_update_writeformat %s/%d\n",
ast_format_get_name(fmt), txframes);
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1594,7 +1594,7 @@ void ooh323_set_write_format(ooCallData *call, struct ast_format *fmt, int txfra
}
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, "Writeformat before update %s/%s\n",
+ ast_verb(0, "Writeformat before update %s/%s\n",
ast_format_get_name(ast_channel_writeformat(p->owner)),
ast_format_cap_get_names(ast_channel_nativeformats(p->owner), &codec_buf));
}
@@ -1632,9 +1632,9 @@ void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt)
struct ooh323_pvt *p = NULL;
if (gH323Debug)
- ast_verb(0, "--- ooh323_update_readformat %s\n",
+ ast_verb(0, "--- ooh323_update_readformat %s\n",
ast_format_get_name(fmt));
-
+
p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "No matching call found for %s\n", call->callToken);
@@ -1666,7 +1666,7 @@ void ooh323_set_read_format(ooCallData *call, struct ast_format *fmt)
}
if (gH323Debug) {
- ast_verb(0, "Readformat before update %s\n",
+ ast_verb(0, "Readformat before update %s\n",
ast_format_get_name(ast_channel_readformat(p->owner)));
}
ast_format_cap_append(caps, fmt, 0);
@@ -1697,7 +1697,7 @@ int onAlerting(ooCallData *call)
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
@@ -1753,7 +1753,7 @@ int onProgress(ooCallData *call)
if(!p) {
ast_log(LOG_ERROR, "No matching call found\n");
return -1;
- }
+ }
ast_mutex_lock(&p->lock);
if (!p->owner) {
ast_mutex_unlock(&p->lock);
@@ -1861,7 +1861,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
}
ast_mutex_lock(&p->lock);
ast_clear_flag(p, H323_OUTGOING);
-
+
if (call->remoteDisplayName) {
p->callerid_name = strdup(call->remoteDisplayName);
@@ -1883,7 +1883,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
{
if(!p->callerid_num)
p->callerid_num = strdup(alias->value);
- ast_copy_string(p->caller_dialedDigits, alias->value,
+ ast_copy_string(p->caller_dialedDigits, alias->value,
sizeof(p->caller_dialedDigits));
}
else if(alias->type == T_H225AliasAddress_email_ID)
@@ -1955,7 +1955,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
if (user->rtpmask && user->rtpmaskstr[0]) {
p->rtpmask = user->rtpmask;
- ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
+ ast_copy_string(p->rtpmaskstr, user->rtpmaskstr,
sizeof(p->rtpmaskstr));
}
if (user->rtdrcount > 0 && user->rtdrinterval > 0) {
@@ -2050,7 +2050,7 @@ int onOutgoingCall(ooCallData *call)
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
@@ -2131,7 +2131,7 @@ int onNewCallCreated(ooCallData *call)
ooCallSetCallerId(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->caller_h323id))
ooCallAddAliasH323ID(call, p->caller_h323id);
@@ -2150,7 +2150,7 @@ int onNewCallCreated(ooCallData *call)
ooCallAddAliasH323ID(call, p->callerid_num);
}
}
-
+
if (!ast_strlen_zero(p->exten)) {
if (ooIsDailedDigit(p->exten)) {
@@ -2164,7 +2164,7 @@ int onNewCallCreated(ooCallData *call)
if (gH323Debug) {
struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);
- ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
+ ast_verb(0, " Outgoing call %s(%s) - Codec prefs - %s\n",
p->username?p->username:"NULL", call->callToken,
ast_format_cap_get_names(p->cap, &codec_buf));
}
@@ -2203,7 +2203,7 @@ int onCallEstablished(ooCallData *call)
ast_log(LOG_ERROR, "Channel has no owner\n");
return -1;
}
-
+
while (p->owner && ast_channel_trylock(p->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&p->lock);
@@ -2249,7 +2249,7 @@ int onCallCleared(ooCallData *call)
if ((p = find_call(call))) {
ast_mutex_lock(&p->lock);
-
+
while (p->owner) {
if (ast_channel_trylock(p->owner)) {
ooTrace(OOTRCLVLINFO, "Failed to grab lock, trying again\n");
@@ -2261,7 +2261,7 @@ int onCallCleared(ooCallData *call)
}
if (ownerLock) {
- if (!ast_test_flag(p, H323_ALREADYGONE)) {
+ if (!ast_test_flag(p, H323_ALREADYGONE)) {
ast_set_flag(p, H323_ALREADYGONE);
ast_channel_hangupcause_set(p->owner, call->q931cause);
@@ -2305,7 +2305,7 @@ int onCallCleared(ooCallData *call)
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_user\n");
- if (user) {
+ if (user) {
cur = userl.users;
ast_mutex_lock(&userl.lock);
while (cur) {
@@ -2323,7 +2323,7 @@ int onCallCleared(ooCallData *call)
ast_mutex_unlock(&userl.lock);
free(user);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_user\n");
@@ -2337,7 +2337,7 @@ void ooh323_delete_peer(struct ooh323_peer *peer)
if (gH323Debug)
ast_verb(0, "--- ooh323_delete_peer\n");
- if (peer) {
+ if (peer) {
cur = peerl.peers;
ast_mutex_lock(&peerl.lock);
while(cur) {
@@ -2361,7 +2361,7 @@ void ooh323_delete_peer(struct ooh323_peer *peer)
ao2_cleanup(peer->cap);
free(peer);
- }
+ }
if (gH323Debug)
ast_verb(0, "+++ ooh323_delete_peer\n");
@@ -2433,11 +2433,11 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
user->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((user->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&user->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&user->rtpmask->lock);
user->rtpmask->inuse = 1;
- ast_copy_string(user->rtpmaskstr, v->value,
+ ast_copy_string(user->rtpmaskstr, v->value,
sizeof(user->rtpmaskstr));
} else user->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
@@ -2454,7 +2454,7 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(user->mIP, ast_sockaddr_stringify_addr(&p), sizeof(user->mIP)-1);
- } else {
+ } else {
ast_copy_string(user->mIP, v->value, sizeof(user->mIP)-1);
}
user->mUseIP = 1;
@@ -2599,14 +2599,17 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
struct ast_sockaddr p;
if (!ast_parse_arg(v->value, PARSE_ADDR, &p)) {
ast_copy_string(peer->ip, ast_sockaddr_stringify_host(&p), sizeof(peer->ip));
- } else {
+ } else {
ast_copy_string(peer->ip, v->value, sizeof(peer->ip));
}
-
+
} else if (!strcasecmp(v->name, "outgoinglimit")) {
- peer->outgoinglimit = atoi(v->value);
- if (peer->outgoinglimit < 0)
+ int val = atoi(v->value);
+ if (val < 0) {
peer->outgoinglimit = 0;
+ } else {
+ peer->outgoinglimit = val;
+ }
} else if (!strcasecmp(v->name, "accountcode")) {
ast_copy_string(peer->accountcode, v->value, sizeof(peer->accountcode));
} else if (!strcasecmp(v->name, "faststart")) {
@@ -2628,11 +2631,11 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
peer->rtptimeout = gRTPTimeout;
} else if (!strcasecmp(v->name, "rtpmask")) {
if ((peer->rtpmask = ast_calloc(1, sizeof(struct OOH323Regex))) &&
- (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
+ (regcomp(&peer->rtpmask->regex, v->value, REG_EXTENDED)
== 0)) {
ast_mutex_init(&peer->rtpmask->lock);
peer->rtpmask->inuse = 1;
- ast_copy_string(peer->rtpmaskstr, v->value,
+ ast_copy_string(peer->rtpmaskstr, v->value,
sizeof(peer->rtpmaskstr));
} else peer->rtpmask = NULL;
} else if (!strcasecmp(v->name, "disallow")) {
@@ -2721,9 +2724,9 @@ static int ooh323_do_reload(void)
reload_config(1);
/* Gatekeeper */
- if (gRasGkMode == RasUseSpecificGatekeeper ||
+ if (gRasGkMode == RasUseSpecificGatekeeper ||
gRasGkMode == RasDiscoverGatekeeper) {
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
@@ -2738,10 +2741,10 @@ static int ooh323_do_reload(void)
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
@@ -2889,7 +2892,7 @@ int reload_config(int reload)
v = v->next;
continue;
}
-
+
if (!strcasecmp(v->name, "port")) {
gPort = (int)strtol(v->value, NULL, 10);
} else if (!strcasecmp(v->name, "bindaddr")) {
@@ -2928,7 +2931,7 @@ int reload_config(int reload)
gMediaWaitForConnect = ast_true(v->value);
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
} else if (!strcasecmp(v->name, "h245tunneling")) {
gTunneling = ast_true(v->value);
@@ -2949,7 +2952,7 @@ int reload_config(int reload)
gBeMaster = ast_true(v->value);
if (gBeMaster)
ooH323EpTryBeMaster(1);
- else
+ else
ooH323EpTryBeMaster(0);
} else if (!strcasecmp(v->name, "h323id")) {
pNewAlias = ast_calloc(1, sizeof(struct ooAliases));
@@ -3081,7 +3084,7 @@ int reload_config(int reload)
else if (!strcasecmp(v->value, "h245signal"))
gDTMFMode = H323_DTMF_H245SIGNAL;
else {
- ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
+ ast_log(LOG_WARNING, "Unknown dtmf mode '%s', using rfc2833\n",
v->value);
gDTMFMode = H323_DTMF_RFC2833;
}
@@ -3126,7 +3129,7 @@ int reload_config(int reload)
}
v = v->next;
}
-
+
for (cat = ast_category_browse(cfg, NULL); cat; cat = ast_category_browse(cfg, cat)) {
if (strcasecmp(cat, "general")) {
int friend_type = 0;
@@ -3183,7 +3186,7 @@ static char *handle_cli_ooh323_show_peer(struct ast_cli_entry *e, int cmd, struc
{
char ip_port[64];
struct ooh323_peer *prev = NULL, *peer = NULL;
-
+
switch (cmd) {
case CLI_INIT:
e->command = "ooh323 show peer";
@@ -3304,7 +3307,7 @@ static char *handle_cli_ooh323_show_peers(struct ast_cli_entry *e, int cmd, stru
while (peer) {
ast_mutex_lock(&peer->lock);
snprintf(ip_port, sizeof(ip_port), "%s:%hu", peer->ip, peer->port);
- ast_cli(a->fd, FORMAT, peer->name,
+ ast_cli(a->fd, FORMAT, peer->name,
peer->accountcode,
ip_port,
ast_format_cap_get_names(peer->cap, &codec_buf));
@@ -3443,7 +3446,7 @@ static char *handle_cli_ooh323_show_users(struct ast_cli_entry *e, int cmd, stru
while(user)
{
ast_mutex_lock(&user->lock);
- ast_cli(a->fd, FORMAT1, user->name,
+ ast_cli(a->fd, FORMAT1, user->name,
user->accountcode, user->context,
ast_format_cap_get_names(user->cap, &codec_buf));
prev = user;
@@ -3798,7 +3801,7 @@ static int load_module(void)
.onMediaChanged = (cb_OnMediaChanged) setup_rtp_remote,
};
if (!(gCap = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
- return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_DECLINE;
}
if (!(ooh323_tech.capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) {
ao2_ref(gCap, -1);
@@ -3816,8 +3819,8 @@ static int load_module(void)
ast_mutex_init(&userl.lock);
peerl.peers = NULL;
ast_mutex_init(&peerl.lock);
-
-#if 0
+
+#if 0
ast_register_atexit(&ast_ooh323c_exit);
#endif
@@ -3831,7 +3834,7 @@ static int load_module(void)
if (!reload_config(0)) {
- /* fire up the H.323 Endpoint */
+ /* fire up the H.323 Endpoint */
if (OO_OK != ooH323EpInitialize(OO_CALLMODE_AUDIOCALL, gLogFile)) {
ast_log(LOG_ERROR, "Failed to initialize OOH323 endpoint-"
"OOH323 Disabled\n");
@@ -3867,7 +3870,7 @@ static int load_module(void)
ast_debug(1, "OOH323 channel is in IP6 mode\n");
}
ooH323EpSetCallerID(gCallerID);
-
+
if(ooH323EpSetTCPPortRange(ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd) == OO_FAILED) {
ast_log(LOG_ERROR, "h225portrange: Failed to set range\n");
}
@@ -3878,10 +3881,10 @@ static int load_module(void)
case T_H225AliasAddress_h323_ID:
ooH323EpAddAliasH323ID(pNewAlias->value);
break;
- case T_H225AliasAddress_dialedDigits:
+ case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(pNewAlias->value);
break;
- case T_H225AliasAddress_email_ID:
+ case T_H225AliasAddress_email_ID:
ooH323EpAddAliasEmailID(pNewAlias->value);
break;
default:
@@ -3899,11 +3902,11 @@ static int load_module(void)
peer = peer->next;
}
ast_mutex_unlock(&peerl.lock);
-
+
if (gMediaWaitForConnect)
ooH323EpEnableMediaWaitForConnect();
- else
+ else
ooH323EpDisableMediaWaitForConnect();
/* Fast start and tunneling options */
@@ -3938,12 +3941,12 @@ static int load_module(void)
ooh323_tech.capabilities = NULL;
return 1;
}
-
+
/* Create H.323 listener */
if (ooCreateH323Listener() != OO_OK) {
ast_log(LOG_ERROR, "OOH323 Listener Creation failure. "
"OOH323 DISABLED\n");
-
+
ooH323EpDestroy();
ao2_ref(gCap, -1);
gCap = NULL;
@@ -4010,7 +4013,7 @@ static void *do_monitor(void *data)
if (gH323ep.gkClient && gH323ep.gkClient->state == GkClientStopped) {
ooGkClientDestroy();
ast_verb(0, "Restart stopped gatekeeper client\n");
- ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
+ ooGkClientInit(gRasGkMode, (gRasGkMode == RasUseSpecificGatekeeper) ?
gGatekeeper : 0, 0);
ooGkClientStart(gH323ep.gkClient);
}
@@ -4036,7 +4039,7 @@ static void *do_monitor(void *data)
ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", ast_channel_name(h323->owner), (long) (t - h323->lastrtprx));
ast_channel_unlock(h323->owner);
}
-
+
}
if (ast_test_flag(h323, H323_NEEDDESTROY)) {
@@ -4136,7 +4139,7 @@ int ooh323_destroy(struct ooh323_pvt *p)
iflist = cur->next;
if (cur->callToken) {
- if (gH323Debug)
+ if (gH323Debug)
ast_verb(0, " Destroying %s\n", cur->callToken);
ast_free(cur->callToken);
cur->callToken = 0;
@@ -4156,7 +4159,7 @@ int ooh323_destroy(struct ooh323_pvt *p)
free(cur->callerid_name);
cur->callerid_name = 0;
}
-
+
if (cur->callerid_num) {
free(cur->callerid_num);
cur->callerid_num = 0;
@@ -4172,20 +4175,20 @@ int ooh323_destroy(struct ooh323_pvt *p)
ast_udptl_destroy(cur->udptl);
cur->udptl = NULL;
}
-
+
/* Unlink us from the owner if we have one */
if (cur->owner) {
while(ast_channel_trylock(cur->owner)) {
ast_debug(1, "Failed to grab lock, trying again\n");
DEADLOCK_AVOIDANCE(&cur->lock);
- }
+ }
ast_debug(1, "Detaching from %s\n", ast_channel_name(cur->owner));
ast_channel_tech_pvt_set(cur->owner, NULL);
ast_channel_unlock(cur->owner);
cur->owner = NULL;
ast_module_unref(myself);
}
-
+
if (cur->vad) {
ast_dsp_free(cur->vad);
cur->vad = NULL;
@@ -4325,7 +4328,7 @@ static int unload_module(void)
if (gH323Debug) {
ast_verb(0, " unload_module - stopping monitor thread\n");
- }
+ }
if (monitor_thread != AST_PTHREADT_NULL) {
if (!ast_mutex_lock(&monlock)) {
if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
@@ -4368,7 +4371,7 @@ static int unload_module(void)
ast_log(LOG_WARNING, "Unable to lock the interface list\n");
return -1;
}
-
+
if (gH323Debug) {
ast_verb(0, " unload_module - deleting users\n");
@@ -4668,7 +4671,7 @@ int configure_local_rtp(struct ooh323_pvt *p, ooCallData *call)
ast_rtp_instance_set_timeout(p->rtp, p->rtptimeout);
}
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
-
+
}
if (p->rtdrcount) {
@@ -4830,7 +4833,7 @@ void close_rtp_connection(ooCallData *call)
udptl handling functions
*/
-void setup_udptl_connection(ooCallData *call, const char *remoteIp,
+void setup_udptl_connection(ooCallData *call, const char *remoteIp,
int remotePort)
{
struct ooh323_pvt *p = NULL;
@@ -4840,7 +4843,7 @@ void setup_udptl_connection(ooCallData *call, const char *remoteIp,
ast_verb(0, "--- setup_udptl_connection\n");
/* Find the call or allocate a private structure if call not found */
- p = find_call(call);
+ p = find_call(call);
if (!p) {
ast_log(LOG_ERROR, "Something is wrong: rtp\n");
@@ -4944,7 +4947,7 @@ int update_our_aliases(ooCallData *call, struct ooh323_pvt *p)
{
int updated = -1;
ooAliases *psAlias = NULL;
-
+
if (!call->ourAliases)
return updated;
for (psAlias = call->ourAliases; psAlias; psAlias = psAlias->next) {
@@ -4953,7 +4956,7 @@ int update_our_aliases(ooCallData *call, struct ooh323_pvt *p)
updated = 1;
}
if (psAlias->type == T_H225AliasAddress_dialedDigits) {
- ast_copy_string(p->callee_dialedDigits, psAlias->value,
+ ast_copy_string(p->callee_dialedDigits, psAlias->value,
sizeof(p->callee_dialedDigits));
updated = 1;
}
@@ -5145,7 +5148,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
}
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
&parameters, sizeof(parameters));
p->faxmode = 1;
@@ -5157,7 +5160,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
parameters.request_response = AST_T38_REQUEST_TERMINATE;
parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
parameters.rate = AST_T38_RATE_14400;
- ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS,
&parameters, sizeof(parameters));
}
p->faxmode = 0;
@@ -5204,7 +5207,7 @@ int ooh323_convert_hangupcause_h323ToAsterisk(int cause)
switch (cause) {
case OO_REASON_REMOTE_REJECTED:
return AST_CAUSE_CALL_REJECTED;
- case OO_REASON_NOUSER:
+ case OO_REASON_NOUSER:
return AST_CAUSE_UNALLOCATED;
case OO_REASON_REMOTE_BUSY:
case OO_REASON_LOCAL_BUSY:
@@ -5216,7 +5219,7 @@ int ooh323_convert_hangupcause_h323ToAsterisk(int cause)
return AST_CAUSE_CONGESTION;
case OO_REASON_REMOTE_NOANSWER:
return AST_CAUSE_NO_ANSWER;
- case OO_REASON_UNKNOWN:
+ case OO_REASON_UNKNOWN:
case OO_REASON_INVALIDMESSAGE:
case OO_REASON_TRANSPORTFAILURE:
return AST_CAUSE_FAILURE;
diff --git a/addons/chan_ooh323.h b/addons/chan_ooh323.h
index 89caaff63..0dde50b6a 100644
--- a/addons/chan_ooh323.h
+++ b/addons/chan_ooh323.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -86,7 +86,7 @@ struct ooh323_peer;
/* Helper functions */
struct ooh323_user *find_user(const char * name, const char *ip);
struct ooh323_peer *find_peer(const char * name, int port);
-void ooh323_delete_peer(struct ooh323_peer *peer);
+void ooh323_delete_peer(struct ooh323_peer *peer);
int delete_users(void);
int delete_peers(void);
@@ -96,7 +96,7 @@ int reload_config(int reload);
int restart_monitor(void);
int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
-void setup_rtp_connection(ooCallData *call, const char *remoteIp,
+void setup_rtp_connection(ooCallData *call, const char *remoteIp,
int remotePort);
void close_rtp_connection(ooCallData *call);
struct ast_frame *ooh323_rtp_read
diff --git a/addons/format_mp3.c b/addons/format_mp3.c
index 1373f3e92..154b0022d 100644
--- a/addons/format_mp3.c
+++ b/addons/format_mp3.c
@@ -329,4 +329,3 @@ static int unload_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "MP3 format [Any rate but 8000hz mono is optimal]");
-
diff --git a/addons/ooh323c/README b/addons/ooh323c/README
index e1a5b20e4..323174709 100644
--- a/addons/ooh323c/README
+++ b/addons/ooh323c/README
@@ -6,22 +6,22 @@ Introduction
Objective Open H.323 stack is a simple H.323 implementation in C. This
package contains the core stack code. For complete H.323 stack package with
examples or for more information visit www.obj-sys.com/open
- The ASN.1 messaging code was developed using the Objective Systems ASN1C
-compiler to implement the core H.323 specifications (H.225, H.235,
-and H.245). Additional code was then developed which makes use of
-the compiler generated code for presenting a comparatively high level
+ The ASN.1 messaging code was developed using the Objective Systems ASN1C
+compiler to implement the core H.323 specifications (H.225, H.235,
+and H.245). Additional code was then developed which makes use of
+the compiler generated code for presenting a comparatively high level
stack API.
Features
Features supported in this package include the following:
-* H.225/Q.931 - the following message types are supported (including
- support for FastStart and H.245 tunneling):
- - Setup
+* H.225/Q.931 - the following message types are supported (including
+ support for FastStart and H.245 tunneling):
+ - Setup
- Connect
- Call Proceeding
- - Alerting
+ - Alerting
- Facility
- ReleaseComplete
@@ -54,8 +54,8 @@ Features supported in this package include the following:
To run the stack test application chansetup
chansetup - This is a sample program developed for testing multiple calls.
This program allows stack testing by placing multiple calls. The number of
- calls, duration of each call and interval between successive calls are
- configurable.
+ calls, duration of each call and interval between successive calls are
+ configurable.
1. Two instances of this program have to be run. Can be run on same machine or
different machines.
@@ -64,19 +64,19 @@ To run the stack test application chansetup
cd tests/chansetup
-2. For running listener instance,
+2. For running listener instance,
./h323peer [--use-ip ip] [--use-port port]
- where local ip address and port can be specified for listening to incoming
+ where local ip address and port can be specified for listening to incoming
calls. By default, application determines ip address and uses default H323
port number 1720.
3. For running calling instance
-
+
./h323peer [--use-ip ip] -n <number of calls> -duration <call duration>
-interval <inetrval between successive calls> destination
-
+
where all times are in seconds. Interval of 0 means next call will be placed
after current call finishes. "destination" is the dotted ip address of the
endpoint running listener instance.
@@ -86,10 +86,9 @@ To run the stack test application chansetup
Reporting Problems:
-Report problems you encounter by sending E-mail to support@obj-sys.com.
+Report problems you encounter by sending E-mail to support@obj-sys.com.
If you have any further questions or comments on what you would like to
-see in the product or what is difficult to use or understand, please
+see in the product or what is difficult to use or understand, please
communicate them to us. Your feedback is important to us. Please let us
-know how it works out for you - either good or bad.
-
+know how it works out for you - either good or bad.
diff --git a/addons/ooh323c/src/Makefile.in b/addons/ooh323c/src/Makefile.in
index 15b14f7df..8e170dc6a 100644
--- a/addons/ooh323c/src/Makefile.in
+++ b/addons/ooh323c/src/Makefile.in
@@ -96,7 +96,7 @@ libooh323c_a_SOURCES = ooLogChan.h ooLogChan.c ooUtils.c ooUtils.h ooGkClient.h
INCLUDES = -Ih323
-#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
+#include_HEADERS = ooUtils.h memheap.h ooCommon.h ooDateTime.h ooGkClient.h ooasn1.h oochannels.h ootrace.h ooh245.h ooports.h ooq931.h oohdr.h ooper.h ooSocket.h ooTimer.h ootypes.h eventHandler.h ooCapability.h ooCalls.h ooStackCmds.h ooh323.h ooh323ep.h printHandler.h rtctype.h h323/H235-SECURITY-MESSAGES.h h323/H323-MESSAGES.h h323/MULTIMEDIA-SYSTEM-CONTROL.h
EXTRA_DIST = oostk.dsp
subdir = ooh323c/src
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -187,7 +187,7 @@ MULTIMEDIA-SYSTEM-CONTROLDec.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
MULTIMEDIA-SYSTEM-CONTROLEnc.$(OBJEXT): \
h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
-libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
+libooh323c.a: $(libooh323c_a_OBJECTS) $(libooh323c_a_DEPENDENCIES)
-rm -f libooh323c.a
$(libooh323c_a_AR) libooh323c.a $(libooh323c_a_OBJECTS) $(libooh323c_a_LIBADD)
$(RANLIB) libooh323c.a
diff --git a/addons/ooh323c/src/context.c b/addons/ooh323c/src/context.c
index 46f1fc8c0..d16340219 100644
--- a/addons/ooh323c/src/context.c
+++ b/addons/ooh323c/src/context.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -34,13 +34,13 @@ int initContext (OOCTXT* pctxt)
return ASN_OK;
}
-int initContextBuffer
+int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz)
{
if (bufaddr == 0) {
/* dynamic buffer */
if (bufsiz == 0) bufsiz = ASN_K_ENCBUFSIZ;
- pctxt->buffer.data = (ASN1OCTET*)
+ pctxt->buffer.data = (ASN1OCTET*)
memHeapAlloc (&pctxt->pMsgMemHeap, bufsiz);
if (!pctxt->buffer.data) return ASN_E_NOMEM;
pctxt->buffer.size = bufsiz;
@@ -59,7 +59,7 @@ int initContextBuffer
return ASN_OK;
}
-int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
+int initSubContext (OOCTXT* pctxt, OOCTXT* psrc)
{
/* ast_mutex_lock(&pctxt->pLock); */
int stat = ASN_OK;
@@ -84,7 +84,7 @@ void freeContext (OOCTXT* pctxt)
ASN1BOOL saveBuf;
ast_mutex_lock(&pctxt->pLock);
saveBuf = (pctxt->flags & ASN1SAVEBUF) != 0;
-
+
if (pctxt->buffer.dynamic && pctxt->buffer.data) {
if (saveBuf) {
memHeapMarkSaved (&pctxt->pMsgMemHeap, pctxt->buffer.data, TRUE);
@@ -129,7 +129,7 @@ int setPERBufferUsingCtxt (OOCTXT* pTarget, OOCTXT* pSource)
{
int stat;
ast_mutex_lock(&pTarget->pLock); ast_mutex_lock(&pSource->pLock);
- stat = initContextBuffer
+ stat = initContextBuffer
(pTarget, pSource->buffer.data, pSource->buffer.size);
if (ASN_OK == stat) {
@@ -150,11 +150,11 @@ int setPERBuffer (OOCTXT* pctxt,
ast_mutex_unlock(&pctxt->pLock);
if(stat != ASN_OK) return stat;
-
+
return ASN_OK;
}
-OOCTXT* newContext ()
+OOCTXT* newContext ()
{
/* OOCTXT* pctxt = (OOCTXT*) ASN1CRTMALLOC0 (sizeof(OOCTXT)); */
OOCTXT* pctxt = (OOCTXT*) malloc (sizeof(OOCTXT));
diff --git a/addons/ooh323c/src/decode.c b/addons/ooh323c/src/decode.c
index 3d7fc04c8..3ce74bfb8 100644
--- a/addons/ooh323c/src/decode.c
+++ b/addons/ooh323c/src/decode.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -19,16 +19,16 @@
#include "ooasn1.h"
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet);
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits);
static int getComponentLength (OOCTXT* pctxt, ASN1UINT itemBits);
int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
-{
+{
unsigned char mask;
if (nbits == 0) {
@@ -47,7 +47,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
pctxt->buffer.bitOffset -= nbits;
- *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset) & ((1 << nbits) - 1);
return ASN_OK;
@@ -62,7 +62,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* Check if buffer contains number of bits requested */
int nbytes = (((nbits - pctxt->buffer.bitOffset) + 7) / 8);
-
+
if ((pctxt->buffer.byteIndex + nbytes) >= pctxt->buffer.size) {
return LOG_ASN1ERR (pctxt, ASN_E_ENDOFBUF);
}
@@ -78,7 +78,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* second read bytes from next byteIndex */
while (nbits >= 8) {
- *pvalue = (*pvalue << 8) |
+ *pvalue = (*pvalue << 8) |
(pctxt->buffer.data[pctxt->buffer.byteIndex]);
pctxt->buffer.byteIndex++;
nbits -= 8;
@@ -87,8 +87,8 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
/* third read bits & set bitoffset of the byteIndex */
if (nbits > 0) {
pctxt->buffer.bitOffset = 8 - nbits;
- *pvalue = (*pvalue << nbits) |
- ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
+ *pvalue = (*pvalue << nbits) |
+ ((pctxt->buffer.data[pctxt->buffer.byteIndex]) >>
pctxt->buffer.bitOffset);
}
@@ -96,7 +96,7 @@ int decodeBits (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits)
}
}
-int decodeBitString
+int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT bitcnt;
@@ -111,7 +111,7 @@ int decodeBitString
if (bitcnt > 0) {
*numbits_p += bitcnt;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, bitcnt, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -133,7 +133,7 @@ int decodeBitString
return ASN_OK;
}
-int decodeBMPString
+int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -164,7 +164,7 @@ int decodeByteAlign (OOCTXT* pctxt)
return ASN_OK;
}
-int decodeConstrainedStringEx
+int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits)
{
@@ -227,9 +227,9 @@ int decodeConstrainedStringEx
return ASN_OK;
}
-int decodeConsInteger
+int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value = upper - lower;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -254,9 +254,9 @@ int decodeConsInteger
return stat;
}
-int decodeConsUInt8
+int decodeConsUInt8
(OOCTXT* pctxt, ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -299,9 +299,9 @@ int decodeConsUInt8
return stat;
}
-int decodeConsUInt16
+int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value, value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -328,9 +328,9 @@ int decodeConsUInt16
return stat;
}
-int decodeConsUnsigned
+int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat = ASN_OK;
@@ -354,9 +354,9 @@ int decodeConsUnsigned
return stat;
}
-int decodeConsWholeNumber
+int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt;
int stat;
@@ -419,9 +419,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
/* If "fast copy" option is not set (ASN1FATSCOPY) or if constructed,
* copy the bit string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
-
+
if (pctxt->flags & ASN1FASTCOPY) {
/* check is it possible to do optimized decoding */
@@ -433,7 +433,7 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -441,9 +441,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT bitcnt;
-
+
stat = decodeLength (pctxt, &bitcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -454,9 +454,9 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
stat = moveBitCursor (pctxt, bitcnt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pBitStr->data = 0;
-
+
return stat;
}
}
@@ -470,13 +470,13 @@ int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr)
}
nocts = (nbits + 7) / 8;
-
+
/* Allocate memory for the target string */
if (nocts > 0) {
ptmp = (ASN1OCTET*) ASN1MALLOC (pctxt, nocts);
if (0 == ptmp) return LOG_ASN1ERR (pctxt, ASN_E_NOMEM);
-
+
/* Call static bit string decode function */
stat = decodeBitString (pctxt, &pBitStr->numbits, ptmp, nocts);
@@ -493,7 +493,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* If "fast copy" option is not set (ASN1FASTCOPY) or if constructed,
* copy the octet string value into a dynamic memory buffer;
- * otherwise, store the pointer to the value in the decode
+ * otherwise, store the pointer to the value in the decode
* buffer in the data pointer argument. */
if (pctxt->flags & ASN1FASTCOPY) {
@@ -507,7 +507,7 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
stat = DECODEBIT (pctxt, &bit); /* read first bit of length determinant */
- if (bit == 1 && stat == ASN_OK)
+ if (bit == 1 && stat == ASN_OK)
stat = DECODEBIT (pctxt, &bit); /* read second bit */
pctxt->buffer.byteIndex = byteIndex; /* restore byte index */
@@ -515,9 +515,9 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
/* if either first or second bit != 0 - not fragmented */
- if (bit == 0 && stat == ASN_OK) {
+ if (bit == 0 && stat == ASN_OK) {
ASN1UINT octcnt;
-
+
stat = decodeLength (pctxt, &octcnt);
if (stat != 0) return LOG_ASN1ERR (pctxt, stat);
@@ -528,13 +528,13 @@ int decodeDynOctetString (OOCTXT* pctxt, ASN1DynOctStr* pOctStr)
stat = moveBitCursor (pctxt, octcnt * 8);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
- else
+ else
pOctStr->data = 0;
-
+
return stat;
}
}
-
+
nocts = getComponentLength (pctxt, 8);
if (nocts < 0) return LOG_ASN1ERR (pctxt, nocts);
@@ -671,14 +671,14 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (j == 0) {
subid = pvalue->subid[0];
pvalue->subid[0] = ((subid / 40) >= 2) ? 2 : subid / 40;
- pvalue->subid[1] = (pvalue->subid[0] == 2) ?
+ pvalue->subid[1] = (pvalue->subid[0] == 2) ?
subid - 80 : subid % 40;
j = 2;
}
else j++;
}
else
- stat = ASN_E_INVOBJID;
+ stat = ASN_E_INVOBJID;
}
pvalue->numids = j;
@@ -687,9 +687,9 @@ int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
return (stat);
}
-static int decodeOctets
+static int decodeOctets
(OOCTXT* pctxt, ASN1OCTET* pbuffer, ASN1UINT bufsiz, ASN1UINT nbits)
-{
+{
ASN1UINT nbytes = (nbits + 7) / 8 ;
ASN1UINT i = 0, j;
ASN1UINT rshift = pctxt->buffer.bitOffset;
@@ -740,20 +740,20 @@ static int decodeOctets
/* Copy last partial byte */
if (nbits >= rshift) {
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex++] << lshift;
nbitsInLastOctet = nbits - rshift;
if (nbitsInLastOctet > 0) {
- pbuffer[i] |=
+ pbuffer[i] |=
pctxt->buffer.data[pctxt->buffer.byteIndex] >> rshift;
}
pctxt->buffer.bitOffset = 8 - nbitsInLastOctet;
}
else if (nbits > 0) { /* nbits < rshift */
- pbuffer[i] =
+ pbuffer[i] =
pctxt->buffer.data[pctxt->buffer.byteIndex] << lshift;
pctxt->buffer.bitOffset = rshift - nbits;
}
@@ -773,7 +773,7 @@ static int decodeOctets
return ASN_OK;
}
-int decodeOctetString
+int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer, ASN1UINT bufsiz)
{
ASN1UINT octcnt;
@@ -790,7 +790,7 @@ int decodeOctetString
if (TRUE) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, octcnt, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -800,7 +800,7 @@ int decodeOctetString
}
}
- stat = decodeOctets (pctxt, &buffer[octidx],
+ stat = decodeOctets (pctxt, &buffer[octidx],
bufsiz - octidx, (octcnt * 8));
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -815,7 +815,7 @@ int decodeOctetString
return ASN_OK;
}
-int decodeOpenType
+int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p)
{
ASN1DynOctStr octStr;
@@ -883,7 +883,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
stat = decodeLength (pctxt, &nbytes);
if (stat < 0) return LOG_ASN1ERR (pctxt, stat);
-
+
if (nbytes > 0) {
stat = decodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -898,7 +898,7 @@ int decodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower)
}
int decodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT* pvalue)
-{
+{
ASN1BOOL bitValue;
ASN1UINT len;
int ret;
@@ -959,7 +959,7 @@ int decodeVarWidthCharString (OOCTXT* pctxt, const char** pvalue)
return ASN_OK;
}
-static int decode16BitConstrainedString
+static int decode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString* pString, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, idx, nbits = pCharSet->alignedBits;
@@ -985,7 +985,7 @@ static int decode16BitConstrainedString
stat = decodeBits (pctxt, &idx, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- pString->data[i] = (pCharSet->charSet.data == 0) ?
+ pString->data[i] = (pCharSet->charSet.data == 0) ?
idx + pCharSet->firstChar : pCharSet->charSet.data[idx];
}
}
@@ -1048,6 +1048,6 @@ int moveBitCursor (OOCTXT* pctxt, int bitOffset)
if (pctxt->buffer.byteIndex > pctxt->buffer.size) {
return (ASN_E_ENDOFBUF);
}
-
+
return ASN_OK;
}
diff --git a/addons/ooh323c/src/dlist.c b/addons/ooh323c/src/dlist.c
index 71dd9ee11..12b15b152 100644
--- a/addons/ooh323c/src/dlist.c
+++ b/addons/ooh323c/src/dlist.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -30,7 +30,7 @@ void dListInit (DList* pList)
DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode = (DListNode*)
+ DListNode* pListNode = (DListNode*)
memAlloc (pctxt, sizeof(DListNode));
if (0 != pListNode) {
@@ -53,7 +53,7 @@ DListNode* dListAppend (OOCTXT* pctxt, DList* pList, void* pData)
DListNode* dListAppendNode (OOCTXT* pctxt, DList* pList, void* pData)
{
- DListNode* pListNode =
+ DListNode* pListNode =
(DListNode*) (((char*)pData) - sizeof(DListNode));
if (0 != pListNode) {
@@ -109,7 +109,7 @@ void dListFreeAll (OOCTXT* pctxt, DList* pList)
for (pNode = pList->head; pNode != 0; pNode = pNextNode) {
pNextNode = pNode->next;
-
+
memFreePtr (pctxt, pNode->data);
memFreePtr (pctxt, pNode);
}
@@ -148,8 +148,8 @@ void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void *data)
memFreePtr(pctxt, pNode);
}
}
-
-DListNode* dListFindByIndex (DList* pList, int index)
+
+DListNode* dListFindByIndex (DList* pList, int index)
{
DListNode* curNode;
int i;
@@ -163,11 +163,11 @@ DListNode* dListFindByIndex (DList* pList, int index)
/* Insert item before given node */
-DListNode* dListInsertBefore
+DListNode* dListInsertBefore
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
-
+
if (0 != pListNode) {
pListNode->data = (void*)pData;
@@ -212,7 +212,7 @@ DListNode* dListInsertBefore
/* Insert item after given node */
-DListNode* dListInsertAfter
+DListNode* dListInsertAfter
(OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData)
{
DListNode* pListNode = (DListNode*) memAlloc (pctxt, sizeof(DListNode));
@@ -258,4 +258,3 @@ DListNode* dListInsertAfter
return pListNode;
}
-
diff --git a/addons/ooh323c/src/dlist.h b/addons/ooh323c/src/dlist.h
index 34a73c80d..9f735574e 100644
--- a/addons/ooh323c/src/dlist.h
+++ b/addons/ooh323c/src/dlist.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file dlist.h
+/**
+ * @file dlist.h
* Doubly-linked list structures and utility functions.
*/
#ifndef _OODLIST_H_
@@ -74,26 +74,26 @@ extern "C" {
* @param pData A pointer to a data item to be appended to the list.
* @return A pointer to an allocated node structure used to link
* the given data value into the list.
- */
-EXTERN DListNode* dListAppend
+ */
+EXTERN DListNode* dListAppend
(struct OOCTXT* pctxt, DList* pList, void* pData);
-EXTERN DListNode* dListAppendNode
+EXTERN DListNode* dListAppendNode
(struct OOCTXT* pctxt, DList* pList, void* pData);
/**
- * This function delete the head item from the list and returns a pointer
- * the data item stored in that node. The memory for the node structure
+ * This function delete the head item from the list and returns a pointer
+ * the data item stored in that node. The memory for the node structure
* is released.
*
* @param pctxt A pointer to a context structure. This provides a
* storage area for the function to store all working
* variables that must be maintained between function
* calls.
- * @param pList A pointer to the linked list structure from which
+ * @param pList A pointer to the linked list structure from which
* the node will be deleted.
* @return A pointer to the data item stored in the deleted node.
- */
+ */
EXTERN void* dListDeleteHead (struct OOCTXT* pctxt, DList* pList);
EXTERN DListNode* dListFindByIndex (DList* pList, int index);
@@ -101,7 +101,7 @@ EXTERN DListNode* dListFindByIndex (DList* pList, int index);
/**
* This function initializes a doubly linked list structure. It sets the number
* of elements to zero and sets all internal pointer values to NULL. A doubly
- * linked-list structure is described by the DList type. Nodes of the list
+ * linked-list structure is described by the DList type. Nodes of the list
* are of type DListNode.
*
* Memory for the structures is allocated using the memAlloc run-time
@@ -130,7 +130,7 @@ EXTERN void dListInit (DList* pList);
*/
EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
-/**
+/**
* This function removes all nodes from the linked list structure and releases
* the memory that was allocated for storing the node structures
* (DListNode) and for data. The memory for data in each node must have
@@ -146,37 +146,37 @@ EXTERN void dListFreeNodes (struct OOCTXT* pctxt, DList* pList);
EXTERN void dListFreeAll (struct OOCTXT* pctxt, DList* pList);
/**
- * This function inserts an item into the linked list structure before the
+ * This function inserts an item into the linked list structure before the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted before this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted before this
* node or appended to the list if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertBefore
+EXTERN DListNode* dListInsertBefore
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
- * This function inserts an item into the linked list structure after the
+ * This function inserts an item into the linked list structure after the
* specified element.
- *
+ *
* @param pctxt Pointer to a context structure.
- * @param pList A pointer to a linked list structure into which the
+ * @param pList A pointer to a linked list structure into which the
* data item is to be inserted.
- * @param node The position in the list where the item is to be
- * inserted. The item will be inserted after this
+ * @param node The position in the list where the item is to be
+ * inserted. The item will be inserted after this
* node or added as the head element if node is null.
* @param pData A pointer to the data item to be inserted to the list.
- * @return A pointer to an allocated node structure used to
+ * @return A pointer to an allocated node structure used to
* link the given data value into the list.
*/
-EXTERN DListNode* dListInsertAfter
+EXTERN DListNode* dListInsertAfter
(struct OOCTXT* pctxt, DList* pList, DListNode* node, const void* pData);
/**
@@ -194,7 +194,7 @@ EXTERN DListNode* dListInsertAfter
EXTERN void dListRemove (DList* pList, DListNode* node);
EXTERN void dListFindAndRemove(struct OOCTXT* pctxt, DList* pList, void* data);
-/**
+/**
* @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/encode.c b/addons/ooh323c/src/encode.c
index 22fc1f31d..b48733be8 100644
--- a/addons/ooh323c/src/encode.c
+++ b/addons/ooh323c/src/encode.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -20,7 +20,7 @@
#include "ooasn1.h"
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet);
static int encode2sCompBinInt (OOCTXT* pctxt, ASN1INT value);
@@ -34,7 +34,7 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident);
int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
-{
+{
int stat = ASN_OK;
/* If start of new byte, init to zero */
@@ -58,7 +58,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
/* Set single-bit value */
if (value) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( 1 << pctxt->buffer.bitOffset );
}
@@ -74,7 +74,7 @@ int encodeBit (OOCTXT* pctxt, ASN1BOOL value)
}
int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
-{
+{
int nbytes = (nbits + 7)/ 8, stat = ASN_OK;
if (nbits == 0) return stat;
@@ -94,7 +94,7 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
if (nbits < (unsigned)pctxt->buffer.bitOffset) {
pctxt->buffer.bitOffset -= nbits;
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
( value << pctxt->buffer.bitOffset );
return stat;
}
@@ -108,22 +108,22 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
/* to set bits in subsequent bytes.. */
nbits -= pctxt->buffer.bitOffset;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] |=
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
while (nbits >= 8) {
nbits -= 8;
- pctxt->buffer.data[pctxt->buffer.byteIndex++] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex++] =
(ASN1OCTET)( value >> nbits );
- pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
+ pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
}
/* copy final partial byte */
pctxt->buffer.bitOffset = 8 - nbits;
if (nbits > 0) {
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)((value & ((1 << nbits)-1)) << pctxt->buffer.bitOffset);
}
else
@@ -133,11 +133,11 @@ int encodeBits (OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits)
}
int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
- ASN1OCTET mask = 0x0;
+ ASN1OCTET mask = 0x0;
if (nbits == 0) return ASN_OK;
@@ -173,14 +173,14 @@ int encodeBitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -202,7 +202,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numbits, TRUE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -225,7 +225,7 @@ int encodeBitString (OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data)
return ASN_OK;
}
-int encodeBMPString
+int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet)
{
Asn116BitCharSet charSet;
@@ -278,9 +278,9 @@ int encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
return (stat);
}
-int encodeConsInteger
+int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -301,7 +301,7 @@ int encodeConsInteger
else {
range_value = upper + abs(lower);
adjusted_value = value + abs(lower);
- }
+ }
if (range_value != ASN1UINT_MAX) { range_value += 1; }
@@ -316,9 +316,9 @@ int encodeConsInteger
return stat;
}
-int encodeConsUnsigned
+int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper)
-{
+{
ASN1UINT range_value;
ASN1UINT adjusted_value;
int stat;
@@ -340,9 +340,9 @@ int encodeConsUnsigned
return stat;
}
-int encodeConsWholeNumber
+int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value)
-{
+{
ASN1UINT nocts, range_bitcnt = getUIntBitCount (range_value - 1);
int stat;
@@ -396,8 +396,8 @@ int encodeConsWholeNumber
}
}
-int encodeConstrainedStringEx (OOCTXT* pctxt,
- const char* string,
+int encodeConstrainedStringEx (OOCTXT* pctxt,
+ const char* string,
const char* charSet,
ASN1UINT abits, /* aligned char bits */
ASN1UINT ubits, /* unaligned char bits */
@@ -460,7 +460,7 @@ int encodeExpandBuffer (OOCTXT* pctxt, ASN1UINT nbytes)
pctxt->buffer.data = (ASN1OCTET*) memHeapRealloc
(&pctxt->pMsgMemHeap, pctxt->buffer.data, pctxt->buffer.size);
-
+
if (!pctxt->buffer.data) return (ASN_E_NOMEM);
return (ASN_OK);
@@ -481,7 +481,7 @@ ASN1OCTET* encodeGetMsgPtr (OOCTXT* pctxt, int* pLength)
return pctxt->buffer.data;
}
-int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
+int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
{
ASN1UINT mask;
int nshifts = 0, stat;
@@ -508,9 +508,9 @@ int encodeIdent (OOCTXT* pctxt, ASN1UINT ident)
}
int encodeLength (OOCTXT* pctxt, ASN1UINT value)
-{
+{
ASN1BOOL extendable;
- Asn1SizeCnst* pSize =
+ Asn1SizeCnst* pSize =
checkSize (pctxt->pSizeConstraint, value, &extendable);
ASN1UINT lower = (pSize) ? pSize->lower : 0;
ASN1UINT upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
@@ -520,7 +520,7 @@ int encodeLength (OOCTXT* pctxt, ASN1UINT value)
/* within the range of any of them, signal constraint violation */
/* error.. */
- if (pctxt->pSizeConstraint && !pSize)
+ if (pctxt->pSizeConstraint && !pSize)
return LOG_ASN1ERR (pctxt, ASN_E_CONSVIO);
/* Reset the size constraint in the context block structure */
@@ -578,11 +578,11 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
if (0 == pvalue) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (numids < 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
if (pvalue->subid[0] > 2) return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
- if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
+ if (pvalue->subid[0] != 2 && pvalue->subid[1] > 39)
return LOG_ASN1ERR (pctxt, ASN_E_INVOBJID);
/* Passed checks, encode object identifier */
-
+
/* Munge first two sub ID's and encode */
temp = ((pvalue->subid[0] * 40) + pvalue->subid[1]);
@@ -600,7 +600,7 @@ int encodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue)
}
int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
-{
+{
int lshift = pctxt->buffer.bitOffset;
int rshift = 8 - pctxt->buffer.bitOffset;
int stat = ASN_OK;
@@ -640,14 +640,14 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
/* possibly some bits in the following octet.. */
else {
- pctxt->buffer.data[pctxt->buffer.byteIndex] |=
+ pctxt->buffer.data[pctxt->buffer.byteIndex] |=
(ASN1OCTET)(value >> rshift);
pctxt->buffer.bitOffset -= nbits;
if (pctxt->buffer.bitOffset < 0) {
pctxt->buffer.byteIndex++;
- pctxt->buffer.data[pctxt->buffer.byteIndex] =
+ pctxt->buffer.data[pctxt->buffer.byteIndex] =
(ASN1OCTET)(value << lshift);
pctxt->buffer.bitOffset += 8;
}
@@ -657,7 +657,7 @@ int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits)
}
int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
-{
+{
int i = 0, stat;
int numFullOcts = nbits / 8;
@@ -675,7 +675,7 @@ int encodeOctets (OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits)
/* encode buffer.. */
if (pctxt->buffer.bitOffset == 8) {
- memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
+ memcpy (&pctxt->buffer.data[pctxt->buffer.byteIndex], pvalue,
numFullOcts);
pctxt->buffer.byteIndex += numFullOcts;
pctxt->buffer.data[pctxt->buffer.byteIndex] = 0;
@@ -714,7 +714,7 @@ int encodeOctetString (OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data)
if (enclen > 0) {
ASN1BOOL doAlign;
- stat = bitAndOctetStringAlignmentTest
+ stat = bitAndOctetStringAlignmentTest
(pSizeList, numocts, FALSE, &doAlign);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -793,7 +793,7 @@ int encodeOpenTypeExt (OOCTXT* pctxt, DList* pElemList)
stat = encodeByteAlign (pctxt);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
- stat = encodeOpenType
+ stat = encodeOpenType
(pctxt, pOpenType->numocts, pOpenType->data);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
@@ -833,7 +833,7 @@ int encodeSemiConsInteger (OOCTXT* pctxt, ASN1INT value, ASN1INT lower)
if (lower > ASN1INT_MIN)
value -= lower;
-
+
/* Calculate signed number value length */
for ( ; shift > 0; shift -= 8) {
@@ -889,10 +889,10 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
if ((stat = encodeLength (pctxt, nbytes)) < 0) {
return stat;
}
-
+
if ((stat = encodeByteAlign (pctxt)) != ASN_OK)
return stat;
-
+
/* Encode additional zero byte if necessary */
if (nbytes > sizeof(value)) {
@@ -908,7 +908,7 @@ int encodeSemiConsUnsigned (OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower)
}
int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value)
-{
+{
int stat;
if (value < 64) {
@@ -964,7 +964,7 @@ int encodeVarWidthCharString (OOCTXT* pctxt, const char* value)
return ASN_OK;
}
-static int encode16BitConstrainedString
+static int encode16BitConstrainedString
(OOCTXT* pctxt, Asn116BitCharString value, Asn116BitCharSet* pCharSet)
{
ASN1UINT i, pos;
@@ -985,7 +985,7 @@ static int encode16BitConstrainedString
for (i = 0; i < value.nchars; i++) {
if (pCharSet->charSet.data == 0) {
- stat = encodeBits
+ stat = encodeBits
(pctxt, value.data[i] - pCharSet->firstChar, nbits);
if (stat != ASN_OK) return LOG_ASN1ERR (pctxt, stat);
}
@@ -1051,7 +1051,7 @@ static int encodeNonNegBinInt (OOCTXT* pctxt, ASN1UINT value)
/* multiple of 8 bits and also satisifies the condition that the */
/* leading eight bits of the field shall not be zero unless the */
/* field is precisely 8 bits long. */
-
+
ASN1UINT bitcnt = (value == 0) ? 1 : getUIntBitCount (value);
/* round-up to nearest 8-bit boundary */
@@ -1093,7 +1093,7 @@ static int encodeUnconsLength (OOCTXT* pctxt, ASN1UINT value)
return enclen;
}
-static int getIdentByteCount (ASN1UINT ident)
+static int getIdentByteCount (ASN1UINT ident)
{
if (ident < (1u << 7)) { /* 7 */
return 1;
diff --git a/addons/ooh323c/src/errmgmt.c b/addons/ooh323c/src/errmgmt.c
index de660c5fd..59ec1ebf8 100644
--- a/addons/ooh323c/src/errmgmt.c
+++ b/addons/ooh323c/src/errmgmt.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -48,21 +48,21 @@ static const char* g_status_text[] = {
"Value constraint violation: field %s, value %s",
"Value range error: lower bound is greater than upper",
"Unexpected end of file detected",
- "Invalid UTF-8 character at index %d",
- "List error: concurrent modification attempt while iterating",
+ "Invalid UTF-8 character at index %d",
+ "List error: concurrent modification attempt while iterating",
"List error: illegal state for attempted operation",
"Array index out of bounds",
"Invalid parameter passed to function or method",
"Invalid time string format",
- "Context is not initialized",
- "ASN.1 value will not fit in target variable",
- "Character is not within the defined character set",
- "Invalid XML state for attempted operation",
- "Error condition returned from XML parser:\n%s",
+ "Context is not initialized",
+ "ASN.1 value will not fit in target variable",
+ "Character is not within the defined character set",
+ "Invalid XML state for attempted operation",
+ "Error condition returned from XML parser:\n%s",
"SEQUENCE elements not in correct order",
"Invalid index for table constraint identifier",
- "Invalid value for relational table constraint fixed type field",
- "File not found",
+ "Invalid value for relational table constraint fixed type field",
+ "File not found",
"File read error",
"File write error",
"Invalid Base64 string",
@@ -152,7 +152,7 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
j = pcnt = 0;
tp = g_status_text[i];
- while (*tp)
+ while (*tp)
{
if (*tp == '%' && *(tp+1) == 's')
{
@@ -176,14 +176,14 @@ char* errFmtMsg (ASN1ErrInfo* pErrInfo, char* bufp)
}
else
strcpy (bufp, "unrecognized completion status");
- }
+ }
else strcpy (bufp, "normal completion status");
return (bufp);
}
/* Get error text in a dynamic memory buffer. This allocates memory */
-/* using the 'memAlloc' function. This memory is automatically freed */
+/* using the 'memAlloc' function. This memory is automatically freed */
/* at the time the 'memFree' function is called. */
char* errGetText (OOCTXT* pctxt)
@@ -198,7 +198,7 @@ char* errGetText (OOCTXT* pctxt)
while (pctxt->errInfo.stkx > 0) {
pctxt->errInfo.stkx--;
- sprintf (lbuf, " Module: %s, Line %d\n",
+ sprintf (lbuf, " Module: %s, Line %d\n",
pctxt->errInfo.stack[pctxt->errInfo.stkx].module,
pctxt->errInfo.stack[pctxt->errInfo.stkx].lineno);
strcat(pBuf, lbuf);
@@ -219,7 +219,7 @@ void errPrint (ASN1ErrInfo* pErrInfo)
printf ("Stack trace:");
while (pErrInfo->stkx > 0) {
pErrInfo->stkx--;
- printf (" Module: %s, Line %d\n",
+ printf (" Module: %s, Line %d\n",
pErrInfo->stack[pErrInfo->stkx].module,
pErrInfo->stack[pErrInfo->stkx].lineno);
}
@@ -243,9 +243,9 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
for (i = 0; i < pSrcErrInfo->stkx; i++) {
if (pDestErrInfo->stkx < ASN_K_MAXERRSTK) {
- pDestErrInfo->stack[pDestErrInfo->stkx].module =
+ pDestErrInfo->stack[pDestErrInfo->stkx].module =
pSrcErrInfo->stack[i].module;
- pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
+ pDestErrInfo->stack[pDestErrInfo->stkx++].lineno =
pSrcErrInfo->stack[i].lineno;
}
}
@@ -254,12 +254,12 @@ int errCopyData (ASN1ErrInfo* pSrcErrInfo, ASN1ErrInfo* pDestErrInfo)
}
-int errSetData (ASN1ErrInfo* pErrInfo, int status,
- const char* module, int lno)
-{
+int errSetData (ASN1ErrInfo* pErrInfo, int status,
+ const char* module, int lno)
+{
if (pErrInfo->status == 0) {
pErrInfo->status = status;
}
ooLogAsn1Error(status, module, lno);
- return status;
+ return status;
}
diff --git a/addons/ooh323c/src/eventHandler.c b/addons/ooh323c/src/eventHandler.c
index 82e1eb435..ba25d0bef 100644
--- a/addons/ooh323c/src/eventHandler.c
+++ b/addons/ooh323c/src/eventHandler.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -64,7 +64,7 @@ void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value)
}
}
-void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
+void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -72,7 +72,7 @@ void invokeBitStrValue (OOCTXT* pctxt, ASN1UINT numbits,
}
}
-void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOctStrValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
@@ -87,7 +87,7 @@ void invokeCharStrValue (OOCTXT* pctxt, const char* value)
}
}
-void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
+void invokeCharStr16BitValue (OOCTXT* pctxt, ASN1UINT nchars,
ASN116BITCHAR* data)
{
if (0 != pctxt->pEventHandler) {
@@ -116,7 +116,7 @@ void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value)
}
}
-void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
+void invokeOpenTypeValue (OOCTXT* pctxt, ASN1UINT numocts,
const ASN1OCTET* data)
{
if (0 != pctxt->pEventHandler) {
diff --git a/addons/ooh323c/src/eventHandler.h b/addons/ooh323c/src/eventHandler.h
index e5eff605b..32719c58a 100644
--- a/addons/ooh323c/src/eventHandler.h
+++ b/addons/ooh323c/src/eventHandler.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file eventHandler.h
- * C event handler structure. This structure holds event handler function
+ * @file eventHandler.h
+ * C event handler structure. This structure holds event handler function
* callbacks for use by the generated code.
*/
/**
@@ -44,8 +44,8 @@ extern "C" {
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when an element of a SEQUENCE, SET,
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when an element of a SEQUENCE, SET,
* SEQUENCE OF, SET OF, or CHOICE construct is parsed.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
@@ -63,8 +63,8 @@ typedef void (*StartElement) (const char* name, int index) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when parsing is complete on an element of a
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when parsing is complete on an element of a
* SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
*
* @param name For SEQUENCE, SET, or CHOICE, this is the name of the
@@ -82,7 +82,7 @@ typedef void (*EndElement) (const char* name, int index) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -91,7 +91,7 @@ typedef void (*EndElement) (const char* name, int index) ;
typedef void (*BoolValue) (ASN1BOOL value);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the INTERGER ASN.1 type is parsed.
*
* @param value Parsed value.
@@ -100,9 +100,9 @@ typedef void (*BoolValue) (ASN1BOOL value);
typedef void (*IntValue) (ASN1INT value);
/**
- * This is a function pointer for a callback function which is invoked
- * from within a decode function when a value of the INTEGER ASN.1 type
- * is parsed. In this case, constraints on the integer value forced the
+ * This is a function pointer for a callback function which is invoked
+ * from within a decode function when a value of the INTEGER ASN.1 type
+ * is parsed. In this case, constraints on the integer value forced the
* use of unsigned integer C type to represent the value.
*
* @param value Parsed value.
@@ -111,19 +111,19 @@ typedef void (*IntValue) (ASN1INT value);
typedef void (*UIntValue) (ASN1UINT value);
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the BIT STRING ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the BIT STRING ASN.1 type is
* parsed.
*
- * @param numbits - Number of bits in the parsed value.
- * @param data - Pointer to a byte array that contains the bit
+ * @param numbits - Number of bits in the parsed value.
+ * @param data - Pointer to a byte array that contains the bit
* string data.
* @return - none
- */
+ */
typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of one of the OCTET STRING ASN.1 type
* is parsed.
*
@@ -135,8 +135,8 @@ typedef void (*BitStrValue) (ASN1UINT numbits, const ASN1OCTET* data);
typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 8-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 8-bit ASN.1 character
* string types is parsed.
*
* @param value Null terminated character string value.
@@ -145,8 +145,8 @@ typedef void (*OctStrValue) (ASN1UINT numocts, const ASN1OCTET* data) ;
typedef void (*CharStrValue) (const char* value) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of one of the 16-bit ASN.1 character
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of one of the 16-bit ASN.1 character
* string types is parsed.
*
* This is used for the ASN.1 BmpString type.
@@ -160,7 +160,7 @@ typedef void (*CharStrValue) (const char* value) ;
typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when a value of the NULL ASN.1 type is parsed.
*
* @param - none
@@ -169,8 +169,8 @@ typedef void (*CharStrValue16Bit) (ASN1UINT nchars, ASN116BITCHAR* data) ;
typedef void (*NullValue) (void) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is
* parsed.
*
* @param numSubIds Number of subidentifiers in the object identifier.
@@ -180,8 +180,8 @@ typedef void (*NullValue) (void) ;
typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
/**
- * This is a function pointer for a callback function which is invoked from
- * within a decode function when a value of the ENUMERATED ASN.1 type is
+ * This is a function pointer for a callback function which is invoked from
+ * within a decode function when a value of the ENUMERATED ASN.1 type is
* parsed.
*
* @param value - Parsed enumerated value
@@ -190,7 +190,7 @@ typedef void (*OidValue) (ASN1UINT numSubIds, ASN1UINT* pSubIds) ;
typedef void (*EnumValue) (ASN1UINT value) ;
/**
- * This is a function pointer for a callback function which is invoked from
+ * This is a function pointer for a callback function which is invoked from
* within a decode function when an ASN.1 open type is parsed.
*
* @param numocts Number of octets in the parsed value.
@@ -223,7 +223,7 @@ typedef struct EventHandler {
/**
- * This function sets the event handler object within the context. It
+ * This function sets the event handler object within the context. It
* will overwrite the definition of any handler that was set previously.
*
* @param pctxt Context to which event handler has to be added.
@@ -233,8 +233,8 @@ typedef struct EventHandler {
EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
/**
- * This function is called to remove the event handler current defined
- * in the context. This is done by setting the event handler object
+ * This function is called to remove the event handler current defined
+ * in the context. This is done by setting the event handler object
* pointer to NULL.
*
* @param pctxt Context from which event handler has to be removed.
@@ -243,7 +243,7 @@ EXTERN void setEventHandler (OOCTXT* pctxt, EventHandler* pHandler);
EXTERN void removeEventHandler (OOCTXT* pctxt);
/**
- * The following functions are invoked from within the generated
+ * The following functions are invoked from within the generated
* code to call the various user-defined event handler methods ..
*/
EXTERN void invokeStartElement (OOCTXT* pctxt, const char* name, int index);
@@ -252,33 +252,33 @@ EXTERN void invokeBoolValue (OOCTXT* pctxt, ASN1BOOL value);
EXTERN void invokeIntValue (OOCTXT* pctxt, ASN1INT value);
EXTERN void invokeUIntValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeBitStrValue
+EXTERN void invokeBitStrValue
(OOCTXT* pctxt, ASN1UINT numbits, const ASN1OCTET* data);
-EXTERN void invokeOctStrValue
+EXTERN void invokeOctStrValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
EXTERN void invokeCharStrValue (OOCTXT* pctxt, const char* value);
-EXTERN void invokeCharStr16BitValue
+EXTERN void invokeCharStr16BitValue
(OOCTXT* pctxt, ASN1UINT nchars, ASN116BITCHAR* data);
EXTERN void invokeNullValue (OOCTXT* pctxt);
-EXTERN void invokeOidValue
+EXTERN void invokeOidValue
(OOCTXT* pctxt, ASN1UINT numSubIds, ASN1UINT* pSubIds);
EXTERN void invokeEnumValue (OOCTXT* pctxt, ASN1UINT value);
-EXTERN void invokeOpenTypeValue
+EXTERN void invokeOpenTypeValue
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
-#endif
+#endif
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
index 2f401b39a..9884f8b23 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGES.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c
index 5ee406956..cf8e0a799 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESDec.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -1797,4 +1797,3 @@ EXTERN int asn1PD_H235CryptoToken (OOCTXT* pctxt, H235CryptoToken* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c
index 8530c5198..75f83f512 100644
--- a/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c
+++ b/addons/ooh323c/src/h323/H235-SECURITY-MESSAGESEnc.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -1266,4 +1266,3 @@ EXTERN int asn1PE_H235CryptoToken (OOCTXT* pctxt, H235CryptoToken* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGES.c b/addons/ooh323c/src/h323/H323-MESSAGES.c
index 2c27f3b93..8f750b9fb 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGES.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGES.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -109,4 +109,3 @@ EXTERN const char* gs_H323_MESSAGES_GSM_UIM_vplmn_CharSet =
EXTERN const char* gs_H323_MESSAGES_AliasAddress_dialedDigits_CharSet =
"#*,0123456789";
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGES.h b/addons/ooh323c/src/h323/H323-MESSAGES.h
index 733b58f86..eb32ad9c9 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGES.h
+++ b/addons/ooh323c/src/h323/H323-MESSAGES.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/H323-MESSAGESDec.c b/addons/ooh323c/src/h323/H323-MESSAGESDec.c
index 503d7965f..4a641e43b 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGESDec.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGESDec.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -27197,4 +27197,3 @@ EXTERN int asn1PD_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/H323-MESSAGESEnc.c b/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
index f818fb20c..20159008a 100644
--- a/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
+++ b/addons/ooh323c/src/h323/H323-MESSAGESEnc.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -22593,4 +22593,3 @@ EXTERN int asn1PE_H225RasMessage (OOCTXT* pctxt, H225RasMessage* pvalue)
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c
index ca69407a6..3771d1ab7 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -37,4 +37,3 @@ EXTERN const char* gs_MULTIMEDIA_SYSTEM_CONTROL_NetworkAccessParameters_networkA
EXTERN const char* gs_MULTIMEDIA_SYSTEM_CONTROL_UserInputIndication_signal_signalType_CharSet =
"!#*0123456789ABCD";
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
index 6923cba5a..240a800ae 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROL.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
index 0875f689d..7d6aecb51 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLDec.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -42167,4 +42167,3 @@ EXTERN int asn1PD_H245MultimediaSystemControlMessage (OOCTXT* pctxt, H245Multime
return (stat);
}
-
diff --git a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
index ac124d96d..65adf6f8c 100644
--- a/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
+++ b/addons/ooh323c/src/h323/MULTIMEDIA-SYSTEM-CONTROLEnc.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -26596,4 +26596,3 @@ EXTERN int asn1PE_H245MultimediaSystemControlMessage (OOCTXT* pctxt, H245Multime
return (stat);
}
-
diff --git a/addons/ooh323c/src/memheap.c b/addons/ooh323c/src/memheap.c
index c7aed04e5..ada601385 100644
--- a/addons/ooh323c/src/memheap.c
+++ b/addons/ooh323c/src/memheap.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2004 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -20,7 +20,7 @@
ASN1UINT g_defBlkSize = XM_K_MEMBLKSIZ;
-static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
+static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
void* pMemBlk, int blockType);
typedef void OSMemElemDescr;
@@ -109,39 +109,39 @@ pMemBlk->freeElemOff = (ASN1USINT)(QOFFSETOF (pElem, pMemBlk->data) + 1); \
#define SET_FREE_ELEM(pMemBlk, pElem) setLastElem (pMemBlk, pElem)
/* Memory debugging macros */
-#define RTMEMDIAG1(msg)
-#define RTMEMDIAG2(msg,a)
+#define RTMEMDIAG1(msg)
+#define RTMEMDIAG2(msg,a)
#define RTMEMDIAG3(msg,a,b)
#define RTMEMDIAG4(msg,a,b,c)
#define FILLFREEMEM(mem,size)
-#define FILLNEWMEM(mem,size)
+#define FILLNEWMEM(mem,size)
#define CHECKMEMELEM(memblk,elem)
#define CHECKMEMBLOCK(memheap,memblk)
-#define CHECKMEMHEAP(memheap)
+#define CHECKMEMHEAP(memheap)
#define TRACEMEMELEM(memblk, elem, name)
#define TRACEFREE(memlink,name)
-static void setLastElem (OSMemBlk* pMemBlk, OSMemElemDescr* pElem)
+static void setLastElem (OSMemBlk* pMemBlk, OSMemElemDescr* pElem)
{
- if (pElem == 0) {
- pMemBlk->freeElemOff = 0;
- return;
+ if (pElem == 0) {
+ pMemBlk->freeElemOff = 0;
+ return;
}
- else if (ISLAST (pElem))
- return;
+ else if (ISLAST (pElem))
+ return;
else if (pMemBlk->freeElemOff > QOFFSETOF (pElem, pMemBlk->data) + 1) {
- pElem_nextFreeOff (pElem) = QOFFSETOF (GET_FREE_ELEM (pMemBlk), pElem);
- FORCE_SET_FREE_ELEM (pMemBlk, pElem);
- }
- else if (pMemBlk->freeElemOff == 0) {
- pElem_nextFreeOff (pElem) = 0;
- FORCE_SET_FREE_ELEM (pMemBlk, pElem);
- }
- else {
- SET_FREE (pElem);
- pElem_nextFreeOff (pElem) = 0;
+ pElem_nextFreeOff (pElem) = QOFFSETOF (GET_FREE_ELEM (pMemBlk), pElem);
+ FORCE_SET_FREE_ELEM (pMemBlk, pElem);
+ }
+ else if (pMemBlk->freeElemOff == 0) {
+ pElem_nextFreeOff (pElem) = 0;
+ FORCE_SET_FREE_ELEM (pMemBlk, pElem);
+ }
+ else {
+ SET_FREE (pElem);
+ pElem_nextFreeOff (pElem) = 0;
}
}
@@ -170,7 +170,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
ppMemLink = &pMemHeap->phead;
/* if size is greater than 2**19, then allocate as RAW block */
-
+
if (nunits > (1<<16) - 2) {
void *data;
@@ -188,9 +188,9 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
/* save size of the RAW memory block behind the pMemLink */
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = nbytes;
ast_mutex_unlock(&pMemHeap->pLock);
- return data;
+ return data;
}
-
+
RTMEMDIAG2 ("memHeapAlloc: adjusted nbytes = %d\n", nbytes);
/* Try to allocate a slot from an existing block on the list */
@@ -216,26 +216,26 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pElem_flags (pElem) = 0;
if (pMemBlk->lastElemOff != 0)
- pElem_prevOff (pElem) =
+ pElem_prevOff (pElem) =
(ASN1USINT)(pMemBlk->free_x - pMemBlk->lastElemOff + 1);
- else
+ else
pElem_prevOff (pElem) = 0;
-
+
pPrevElem = GET_LAST_ELEM (pMemBlk);
if (pPrevElem != 0)
CLEAR_LAST (pPrevElem);
-
- pElem_nunits (pElem) = (ASN1USINT)nunits;
+
+ pElem_nunits (pElem) = (ASN1USINT)nunits;
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
pMemBlk->lastElemOff = (ASN1USINT)(pMemBlk->free_x + 1);
mem_p = (void*) (pElem_data (pElem));
-
+
/* sizeof (OSMemElemDescr) == 1 unit */
- pMemBlk->free_x += nunits + 1;
-
+ pMemBlk->free_x += nunits + 1;
+
SET_LAST_ELEM (pMemBlk, pElem);
-
+
FILLNEWMEM (mem_p, nunits * 8u);
TRACEMEMELEM(pMemBlk, pElem, "Allocated");
CHECKMEMELEM (pMemBlk, pElem);
@@ -249,54 +249,54 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
if (0 == mem_p) {
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnext) {
if (pMemLink->blockType & RTMEMRAW) continue;
-
+
pMemBlk = (OSMemBlk*) pMemLink->pMemBlk;
if (nunits <= (ASN1UINT)pMemBlk->freeMem) {
OSMemElemDescr* pElem = GET_FREE_ELEM(pMemBlk), *pPrevFree = 0;
- RTMEMDIAG2
- ("memHeapAlloc: try to reuse empty elems in pMemBlk = 0x%x...\n",
+ RTMEMDIAG2
+ ("memHeapAlloc: try to reuse empty elems in pMemBlk = 0x%x...\n",
pMemBlk);
while (pElem != 0) {
- if (ISFREE (pElem)) {
+ if (ISFREE (pElem)) {
if (nunits <= (ASN1UINT)pElem_nunits (pElem)) {
- RTMEMDIAG3
+ RTMEMDIAG3
("memHeapAlloc: "
- "found an exisiting free element 0x%x, size %d\n",
+ "found an exisiting free element 0x%x, size %d\n",
pElem, (pElem_nunits (pElem) * 8u));
-
- if (pMemBlk->freeElemOff ==
- QOFFSETOF (pElem, pMemBlk->data) + 1)
+
+ if (pMemBlk->freeElemOff ==
+ QOFFSETOF (pElem, pMemBlk->data) + 1)
{
-
+
/* modify the pMemBlk->freeElemOff value if necsry */
OSMemElemDescr* nextFree = GET_NEXT_FREE (pElem);
- FORCE_SET_FREE_ELEM (pMemBlk, nextFree);
+ FORCE_SET_FREE_ELEM (pMemBlk, nextFree);
}
else if (pPrevFree != 0) {
OSMemElemDescr* pNextFree = GET_NEXT_FREE (pElem);
if (pNextFree != 0)
- pElem_nextFreeOff (pPrevFree) = QOFFSETOF (pNextFree,
+ pElem_nextFreeOff (pPrevFree) = QOFFSETOF (pNextFree,
pPrevFree);
else
pElem_nextFreeOff (pPrevFree) = 0;
- }
+ }
CLEAR_FREE (pElem);
/* set beginOff value */
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
-
+
pMemBlk->freeMem -= pElem_nunits (pElem);
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
-
- mem_p = memHeapRealloc
+
+ mem_p = memHeapRealloc
(ppvMemHeap, pElem_data (pElem), nunits * 8u);
if (mem_p != 0) {
FILLNEWMEM (mem_p, nunits * 8u);
@@ -310,7 +310,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
}
if (mem_p != 0) break;
}
- }
+ }
}
/* If not successful, malloc a new block and alloc from it */
@@ -322,16 +322,16 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
RTMEMDIAG1 ("memHeapAlloc: alloc block..\n");
- allocSize = (ASN1UINT) ((((ASN1UINT)nunits) * 8u) +
+ allocSize = (ASN1UINT) ((((ASN1UINT)nunits) * 8u) +
sizeof (OSMemBlk) + sizeof_OSMemElemDescr);
- allocSize = (ASN1UINT) (allocSize < defBlkSize) ? defBlkSize :
+ allocSize = (ASN1UINT) (allocSize < defBlkSize) ? defBlkSize :
((allocSize + defBlkSize - 1) / defBlkSize * defBlkSize);
dataUnits = (ASN1UINT)((allocSize - sizeof (OSMemBlk)) >> 3u);
if (dataUnits >= (1u<<16)) {
dataUnits = (ASN1UINT)((1u<<16) - 1);
allocSize = (ASN1UINT)
((((ASN1UINT)dataUnits) * 8u) + sizeof (OSMemBlk));
- }
+ }
pmem = (ASN1OCTET*) malloc (allocSize + sizeof (OSMemLink));
if (0 != pmem) {
@@ -347,7 +347,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pElem_beginOff (pElem) = QOFFSETOF (pElem, pMemBlk->data);
/* sizeof (OSMemElemDescr) == 1 unit */
- pMemBlk->free_x = (ASN1USINT)(nunits + 1);
+ pMemBlk->free_x = (ASN1USINT)(nunits + 1);
pMemBlk->freeMem = 0;
pMemBlk->nunits = (ASN1USINT)dataUnits;
@@ -355,7 +355,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
pMemBlk->freeElemOff = 0;
pMemBlk->nsaved = 0;
- if (memHeapAddBlock (ppMemLink, pMemBlk, RTMEMSTD | RTMEMLINK) == 0)
+ if (memHeapAddBlock (ppMemLink, pMemBlk, RTMEMSTD | RTMEMLINK) == 0)
{
free (pmem);
ast_mutex_unlock(&pMemHeap->pLock);
@@ -378,7 +378,7 @@ void* memHeapAlloc (void** ppvMemHeap, int nbytes)
}
RTMEMDIAG2 ("memHeapAlloc: pMemBlk = 0x%x\n", pMemBlk);
RTMEMDIAG2 ("memHeapAlloc: pMemBlk->free_x = %d\n", pMemBlk->free_x);
- RTMEMDIAG2 ("memHeapAlloc: pMemBlk->size = %d\n",
+ RTMEMDIAG2 ("memHeapAlloc: pMemBlk->size = %d\n",
pMemBlk->nunits * 8u);
RTMEMDIAG2 ("memHeapAlloc: mem_p = 0x%x\n", mem_p);
RTMEMDIAG2 ("memHeapAlloc: sizeof (short) = %d\n", sizeof(short));
@@ -394,7 +394,7 @@ void* memHeapAllocZ (void** ppvMemHeap, int nbytes)
return ptr;
}
-void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
+void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
{
OSMemHeap* pMemHeap;
OSMemLink** ppMemLink;
@@ -416,7 +416,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
if(pMemLink->pnext != 0) {
pMemLink->pnext->pprev = pMemLink->pprev;
@@ -429,12 +429,12 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
if (pPrevMemLink != 0)
pPrevMemLink->pnextRaw = pMemLink->pnextRaw;
- else if (*ppMemLink != 0 && (*ppMemLink)->pnextRaw == 0 &&
+ else if (*ppMemLink != 0 && (*ppMemLink)->pnextRaw == 0 &&
*ppMemLink != pMemLink->pnextRaw)
{
(*ppMemLink)->pnextRaw = pMemLink->pnextRaw;
}
- if ((pMemLink->blockType & RTMEMLINK) &&
+ if ((pMemLink->blockType & RTMEMLINK) &&
(pMemLink->blockType & RTMEMMALLOC))
{
free (pMemLink);
@@ -460,7 +460,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
RTMEMDIAG2 ("memHeapFreePtr: "
"the element 0x%x is already freed!\n", pElem);
ast_mutex_unlock(&pMemHeap->pLock);
- return;
+ return;
}
if (ISSAVED (pElem)) {
@@ -474,17 +474,17 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
CHECKMEMBLOCK(pMemHeap, pMemBlk);
RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x\n", pMemBlk);
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->size = %d\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->size = %d\n",
pMemBlk->nunits * 8u);
if (ISLAST (pElem)) { /* is it the last? */
OSMemElemDescr* pPrevElem = GETPREV (pElem);
-
+
CHECKMEMELEM (pMemBlk, pPrevElem);
pMemBlk->free_x -= (pElem_nunits (pElem) + 1);
- FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
+ FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
(pElem_nunits (pElem) + 1) * 8u);
if (pPrevElem != 0 && ISFREE (pPrevElem)) {
@@ -493,10 +493,10 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
pMemBlk->free_x -= (pElem_nunits (pPrevElem) + 1);
pMemBlk->freeMem -= pElem_nunits (pPrevElem);
SET_LAST_ELEM (pMemBlk, GETPREV (pPrevElem));
-
+
/* wasn't it the last elem in block? */
- if (pMemBlk->lastElemOff != 0) {
-
+ if (pMemBlk->lastElemOff != 0) {
+
/* correct nextFreeOff for previous free element */
pFreeElem = GET_FREE_ELEM (pMemBlk);
@@ -505,7 +505,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
else {
OSMemElemDescr* pNextFree = 0;
-
+
while (pFreeElem < pPrevElem) {
pNextFree = pFreeElem;
pFreeElem = GET_NEXT_FREE (pFreeElem);
@@ -518,15 +518,15 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
SET_LAST_ELEM (pMemBlk, pPrevElem);
}
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->free_x = %d\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk->free_x = %d\n",
pMemBlk->free_x);
/* The question is: do we really want to get rid of the */
/* block or should we keep it around for reuse? */
if (pMemBlk->lastElemOff == 0) { /* was it the last elem in block? */
-
+
if ((pMemHeap->flags & RT_MH_DONTKEEPFREE) ||
- (pMemHeap->keepFreeUnits > 0 &&
+ (pMemHeap->keepFreeUnits > 0 &&
pMemHeap->freeUnits + pMemBlk->nunits > pMemHeap->keepFreeUnits))
{
ASN1OCTET blockType = pMemBlk->plink->blockType;
@@ -543,7 +543,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
pMemBlk->plink->pprev->pnext = pMemBlk->plink->pnext;
}
else { /* head */
- if (pMemBlk->plink->pnext != 0 &&
+ if (pMemBlk->plink->pnext != 0 &&
!(pMemBlk->plink->pnext->blockType & RTMEMRAW))
{
pMemBlk->plink->pnext->pnextRaw = (*ppMemLink)->pnextRaw;
@@ -552,14 +552,14 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
FILLFREEMEM (pMemBlk->plink, sizeof (*pMemBlk->plink));
FILLFREEMEM (pMemBlk->data, (pMemBlk->nunits * 8u));
-
+
free (pMemBlk->plink);
-
+
if (!(blockType & RTMEMLINK)) {
FILLFREEMEM (pMemBlk, sizeof (*pMemBlk));
free (pMemBlk);
}
- RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x was freed\n",
+ RTMEMDIAG2 ("memHeapFreePtr: pMemBlk = 0x%x was freed\n",
pMemBlk);
}
else {
@@ -575,7 +575,7 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
}
else {
SET_LAST (GET_LAST_ELEM (pMemBlk));
- FILLFREEMEM (((char*) &pMemBlk->data[0]) + (pMemBlk->free_x * 8u),
+ FILLFREEMEM (((char*) &pMemBlk->data[0]) + (pMemBlk->free_x * 8u),
(pMemBlk->nunits - pMemBlk->free_x) * 8u);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
}
@@ -586,25 +586,25 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
SET_FREE_ELEM(pMemBlk, pElem);
pMemBlk->freeMem += pElem_nunits (pElem);
- RTMEMDIAG2 ("memHeapFreePtr: element 0x%x marked as free.\n",
+ RTMEMDIAG2 ("memHeapFreePtr: element 0x%x marked as free.\n",
pElem);
/* try to unite free blocks, if possible */
if (!ISFIRST (pElem)) {
if (ISFREE (GETPREV (pElem))) {
OSMemElemDescr* prevelem_p = GETPREV (pElem);
-
+
/* +1 because the OSMemElemDescr has size ONE unit (8 bytes) */
- pElem_nunits (prevelem_p) += pElem_nunits (pElem) + 1;
+ pElem_nunits (prevelem_p) += pElem_nunits (pElem) + 1;
pElem = prevelem_p;
pMemBlk->freeMem ++; /* sizeof (OSMemElemDescr) == 1 unit */
}
else {
/* look for nearest previous free block to correct nextFreeOff */
-
+
OSMemElemDescr* prevelem_p = pElem;
-
+
do {
prevelem_p = GETPREV (prevelem_p);
}
@@ -612,32 +612,32 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
if (prevelem_p != 0) {
OSMemElemDescr* pNextFree = GET_NEXT_FREE (prevelem_p);
- if (pNextFree != 0)
+ if (pNextFree != 0)
pElem_nextFreeOff (pElem) = QOFFSETOF (pNextFree, pElem);
else
pElem_nextFreeOff (pElem) = 0;
pElem_nextFreeOff (prevelem_p) = QOFFSETOF (pElem, prevelem_p);
-
+
CHECKMEMELEM (pMemBlk, prevelem_p);
}
}
}
if (!ISLAST (pElem) && ISFREE (GETNEXT (pElem))) {
OSMemElemDescr* nextelem_p = GETNEXT (pElem);
-
+
/* +1 because the OSMemElemDescr has size ONE unit (8 bytes) */
- pElem_nunits (pElem) += pElem_nunits (nextelem_p) + 1;
+ pElem_nunits (pElem) += pElem_nunits (nextelem_p) + 1;
if (pElem_nextFreeOff (nextelem_p) == 0)
pElem_nextFreeOff (pElem) = 0;
else
- pElem_nextFreeOff (pElem) =
+ pElem_nextFreeOff (pElem) =
QOFFSETOF (GET_NEXT_FREE (nextelem_p), pElem);
pMemBlk->freeMem ++;
}
/* correct the prevOff field of next element */
- if (!ISLAST (pElem)) {
+ if (!ISLAST (pElem)) {
OSMemElemDescr* nextelem_p = GETNEXT (pElem);
pElem_prevOff (nextelem_p) = QOFFSETOF (nextelem_p, pElem);
}
@@ -648,10 +648,10 @@ void memHeapFreePtr (void** ppvMemHeap, void* mem_p)
CHECKMEMBLOCK (pMemHeap, pMemBlk);
}
ast_mutex_unlock(&pMemHeap->pLock);
-}
+}
-static void initNewFreeElement (OSMemBlk* pMemBlk,
- OSMemElemDescr* pNewElem, OSMemElemDescr* pElem)
+static void initNewFreeElement (OSMemBlk* pMemBlk,
+ OSMemElemDescr* pNewElem, OSMemElemDescr* pElem)
{
OSMemElemDescr *pNextElem, *pPrevElem = 0;
@@ -662,11 +662,11 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
pElem_prevOff (pNewElem) = QOFFSETOF (pNewElem, pElem);
- if (pMemBlk->freeElemOff != 0 &&
+ if (pMemBlk->freeElemOff != 0 &&
pMemBlk->freeElemOff < QOFFSETOF (pElem, pMemBlk->data) + 1)
{
/* look for nearest previous free block to correct its nextFreeOff */
-
+
pPrevElem = pElem;
do {
@@ -677,21 +677,21 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
if (pPrevElem != 0) { /* if it is not first free element... */
/* correct nextFreeOff for prev free element */
-
+
pElem_nextFreeOff (pPrevElem) = QOFFSETOF (pNewElem, pPrevElem);
}
else { /* if it is first free element in the block */
FORCE_SET_FREE_ELEM (pMemBlk, pNewElem);
}
-
+
pNextElem = GETNEXT (pNewElem);
if (ISFREE (pNextElem)) {
-
+
/* if the next elem is free, then unite them together */
pElem_nunits (pNewElem) += pElem_nunits (pNextElem) + 1;
if (pElem_nextFreeOff (pNextElem) != 0)
- pElem_nextFreeOff (pNewElem) = QOFFSETOF (GET_NEXT_FREE (pNextElem),
+ pElem_nextFreeOff (pNewElem) = QOFFSETOF (GET_NEXT_FREE (pNextElem),
pNewElem);
else
pElem_nextFreeOff (pNewElem) = 0;
@@ -709,7 +709,7 @@ static void initNewFreeElement (OSMemBlk* pMemBlk,
pNextElem = GETNEXT (pNextElem);
/* set nextFreeOff for new element */
-
+
if (pNextElem != 0)
pElem_nextFreeOff (pNewElem) = QOFFSETOF (pNextElem, pNewElem);
else
@@ -745,15 +745,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
for (pMemLink = *ppMemLink; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
if (pMemLink->blockType & RTMEMMALLOC) {
void *newMemBlk = realloc (pMemLink->pMemBlk, nbytes_);
- if (newMemBlk == 0)
+ if (newMemBlk == 0)
return 0;
pMemLink->pMemBlk = newMemBlk;
}
- else
+ else
return 0;
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = nbytes_;
return pMemLink->pMemBlk;
@@ -767,7 +767,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pElem = (OSMemElemDescr*) (((char*)mem_p) - sizeof_OSMemElemDescr);
- RTMEMDIAG3 ("memHeapRealloc: mem_p = 0x%x, old size = %d,", mem_p,
+ RTMEMDIAG3 ("memHeapRealloc: mem_p = 0x%x, old size = %d,", mem_p,
pElem_nunits (pElem) * 8u);
RTMEMDIAG2 (" new nbytes = %d\n", nbytes);
@@ -780,39 +780,39 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
CHECKMEMBLOCK(pMemHeap, pMemBlk);
if ((unsigned)pElem_nunits (pElem) < nunits) { /* expanding */
-
+
if (nunits - pElem_nunits (pElem) <= (unsigned)pMemBlk->nunits) {
/* Try to expand the existing element in the existing block */
if (ISLAST (pElem)) { /* if the last element in the block */
-
+
/* if the free space in the block is enough */
-
- if ((int)(nunits - pElem_nunits (pElem)) <=
- (int)(pMemBlk->nunits - pMemBlk->free_x))
- {
+
+ if ((int)(nunits - pElem_nunits (pElem)) <=
+ (int)(pMemBlk->nunits - pMemBlk->free_x))
+ {
pMemBlk->free_x += nunits - pElem_nunits (pElem);
pElem_nunits (pElem) = (ASN1USINT)nunits;
RTMEMDIAG1 ("memHeapRealloc: "
"memory element is expanded.\n");
-
- FILLNEWMEM (&pMemBlk->data [(pMemBlk->free_x -
- (nunits - pElem_nunits (pElem))) * 8u],
+
+ FILLNEWMEM (&pMemBlk->data [(pMemBlk->free_x -
+ (nunits - pElem_nunits (pElem))) * 8u],
(nunits - pElem_nunits (pElem)) * 8u);
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMBLOCK (pMemHeap, pMemBlk);
return (mem_p);
- }
+ }
}
else {
- OSMemElemDescr* pNextElem, *pFreeElem;
+ OSMemElemDescr* pNextElem, *pFreeElem;
unsigned sumSize = pElem_nunits (pElem), freeMem = 0;
-
+
RTMEMDIAG1 ("memHeapRealloc: look for free element after "
"current block.\n");
@@ -821,10 +821,10 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pNextElem = GETNEXT (pElem);
if (ISFREE (pNextElem)) {
/* +1 'cos sizeof (OSMemElemDescr) == 1 unit */
- sumSize += pElem_nunits (pNextElem) + 1;
+ sumSize += pElem_nunits (pNextElem) + 1;
freeMem++;
}
-
+
if (sumSize >= nunits) {
RTMEMDIAG1 ("memHeapRealloc: reuse free element.\n");
@@ -835,15 +835,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
FORCE_SET_FREE_ELEM (pMemBlk, GET_NEXT_FREE (pNextElem));
}
else if (pFreeElem < pElem) {
-
+
/* look for previous free elem to correct nextFreeOff */
for (; pFreeElem != 0 && pFreeElem < pNextElem;) {
- OSMemElemDescr* pNextFreeElem =
+ OSMemElemDescr* pNextFreeElem =
GET_NEXT_FREE (pFreeElem);
if (pNextFreeElem == pNextElem) {
if (pElem_nextFreeOff (pNextElem) != 0)
- pElem_nextFreeOff (pFreeElem) = QOFFSETOF
+ pElem_nextFreeOff (pFreeElem) = QOFFSETOF
(GET_NEXT_FREE (pNextElem), pFreeElem);
else
pElem_nextFreeOff (pFreeElem) = 0;
@@ -856,15 +856,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
}
/* reuse empty elements after the pElem */
-
+
pMemBlk->freeMem += freeMem;
-
+
if (sumSize - nunits > 1) {
OSMemElemDescr* pNewElem;
-
+
/* if sumSize is too large, then create new empty element */
- pNewElem = (OSMemElemDescr*)
+ pNewElem = (OSMemElemDescr*)
(pElem_data (pElem) + nbytes);
pElem_nunits (pNewElem) = (ASN1USINT)(sumSize - nunits - 1);
@@ -884,7 +884,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
if (pNextElem != 0)
pElem_prevOff (pNextElem) = QOFFSETOF (pNextElem, pElem);
}
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMELEM (pMemBlk, (!ISLAST (pElem)) ? GETNEXT (pElem) : 0);
@@ -901,14 +901,14 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
CHECKMEMHEAP (pMemHeap);
newMem_p = memHeapAlloc (ppvMemHeap, nbytes);
-
+
if (newMem_p == 0)
return 0;
/* if the old memory block is marked as saved then mark the new block
as saved as well. */
- if (ISSAVED (pElem))
+ if (ISSAVED (pElem))
memHeapMarkSaved (ppvMemHeap, newMem_p, TRUE);
CHECKMEMHEAP (pMemHeap);
@@ -927,7 +927,7 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
}
else { /* shrinking */
RTMEMDIAG1 ("memHeapRealloc: shrinking ...\n");
-
+
/* just free the pointer, if nbytes == 0 */
if (nbytes == 0) {
@@ -939,15 +939,15 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
/* do not shrink, if size diff is too small */
/* sizeof (OSMemElemDescr) == 1 unit */
- if (pElem_nunits (pElem) - nunits > 1) {
-
- /* if it is the last element in the block, then just change the size
+ if (pElem_nunits (pElem) - nunits > 1) {
+
+ /* if it is the last element in the block, then just change the size
and free_x. */
if (ISLAST (pElem)) {
pMemBlk->free_x -= (pElem_nunits (pElem) - nunits);
- FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
+ FILLFREEMEM (&pMemBlk->data [pMemBlk->free_x * 8u],
(pElem_nunits (pElem) - nunits) * 8u);
}
else {
@@ -958,14 +958,14 @@ void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_)
pNewElem = (OSMemElemDescr*) (pElem_data (pElem) + nbytes);
/* sizeof (OSMemElemDescr) == 1 unit */
- pElem_nunits (pNewElem) = (ASN1USINT)(pElem_nunits (pElem) - nunits - 1);
-
+ pElem_nunits (pNewElem) = (ASN1USINT)(pElem_nunits (pElem) - nunits - 1);
+
initNewFreeElement (pMemBlk, pNewElem, pElem);
-
+
pMemBlk->freeMem += (pElem_nunits (pElem) - nunits) - 1;
}
pElem_nunits (pElem) = (ASN1USINT)nunits;
-
+
TRACEMEMELEM (pMemBlk, pElem, "Reallocated");
CHECKMEMELEM (pMemBlk, pElem);
CHECKMEMELEM (pMemBlk, (!ISLAST (pElem)) ? GETNEXT (pElem) : pElem);
@@ -999,9 +999,9 @@ void memHeapFreeAll (void** ppvMemHeap)
pMemLink2 = pMemLink;
pMemLink = pMemLink2->pnext;
- RTMEMDIAG3 ("memHeapFreeAll: pMemLink2 = 0x%x, pMemLink = 0x%x\n",
+ RTMEMDIAG3 ("memHeapFreeAll: pMemLink2 = 0x%x, pMemLink = 0x%x\n",
pMemLink2, pMemLink);
-
+
#ifdef _MEMDEBUG
if (pMemLink2->blockType & RTMEMSTD) {
OSMemBlk* pMemBlk = (OSMemBlk*) pMemLink2->pMemBlk;
@@ -1035,9 +1035,9 @@ void memHeapFreeAll (void** ppvMemHeap)
/* free link and block */
- if (((pMemLink2->blockType & RTMEMSTD) ||
+ if (((pMemLink2->blockType & RTMEMSTD) ||
(pMemLink2->blockType & RTMEMMALLOC)) &&
- !(pMemLink2->blockType & RTMEMLINK))
+ !(pMemLink2->blockType & RTMEMLINK))
free (pMemLink2->pMemBlk);
free (pMemLink2);
}
@@ -1088,11 +1088,11 @@ void memHeapRelease (void** ppvMemHeap)
/* This function is used for marking memory block as "saved". It means
* that the memory block containing the specified memory pointer won't be
- * freed after calls to memHeapFreeAll/memHeapReset. User is responsible
+ * freed after calls to memHeapFreeAll/memHeapReset. User is responsible
* for freeing the marked memory block by call to memFreeBlock */
-void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
- ASN1BOOL saved)
+void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
+ ASN1BOOL saved)
{
OSMemHeap* pMemHeap;
OSMemLink* pMemLink;
@@ -1100,7 +1100,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
RTMEMDIAG2 ("memHeapMarkSaved: for mem_p = 0x%x\n", mem_p);
- if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
+ if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
return 0;
pMemHeap = *(OSMemHeap**)ppvMemHeap;
@@ -1113,7 +1113,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
for (; pMemLink != 0; pMemLink = pMemLink->pnextRaw) {
if ((pMemLink->blockType & RTMEMRAW) &&
- pMemLink->pMemBlk == mem_p)
+ pMemLink->pMemBlk == mem_p)
{
break;
}
@@ -1131,7 +1131,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
"already free!\n", pElem);
ast_mutex_unlock(&pMemHeap->pLock);
- return 0;
+ return 0;
}
if ((ISSAVED (pElem) && !saved) || (!ISSAVED (pElem) && saved)) {
@@ -1143,7 +1143,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
pMemLink = pMemBlk->plink;
- if (saved)
+ if (saved)
SET_SAVED (pMemBlk, pElem);
else
CLEAR_SAVED (pMemBlk, pElem);
@@ -1153,7 +1153,7 @@ void* memHeapMarkSaved (void** ppvMemHeap, const void* mem_p,
ast_mutex_unlock(&pMemHeap->pLock);
return 0;
}
- if (saved && nsaved > 0)
+ if (saved && nsaved > 0)
pMemLink->blockType |= RTMEMSAVED;
else if (nsaved == 0)
pMemLink->blockType &= (~RTMEMSAVED);
@@ -1203,16 +1203,16 @@ void memHeapReset (void** ppvMemHeap)
/* add memory block to list */
-static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
+static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
void* pMemBlk, int blockType)
{
OSMemLink* pMemLink;
- /* if pMemBlk has RTMEMLINK flags it means that it is allocated
+ /* if pMemBlk has RTMEMLINK flags it means that it is allocated
* cooperatively with OSMemLink, and we don't need to do additional
* allocations for it. Just use pointer's arithemtic. */
- if (blockType & RTMEMLINK)
+ if (blockType & RTMEMLINK)
pMemLink = (OSMemLink*) (((ASN1OCTET*)pMemBlk) - sizeof (OSMemLink));
else {
pMemLink = (OSMemLink*) malloc (
@@ -1222,7 +1222,7 @@ static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
to perform rtMemRealloc through malloc/memcpy/free */
*(int*)(((char*)pMemLink) + sizeof (OSMemLink)) = (int)-1;
}
- if (pMemLink == NULL)
+ if (pMemLink == NULL)
return NULL;
pMemLink->blockType = (ASN1OCTET)blockType;
pMemLink->pMemBlk = pMemBlk;
@@ -1241,15 +1241,15 @@ static OSMemLink* memHeapAddBlock (OSMemLink** ppMemLink,
pMemLink->pnextRaw = 0;
}
- *ppMemLink = pMemLink;
+ *ppMemLink = pMemLink;
if (pMemLink->pnext != 0)
pMemLink->pnext->pprev = pMemLink;
((OSMemBlk*)pMemBlk)->plink = pMemLink; /*!AB */
RTMEMDIAG2 ("memHeapAddBlock: pMemLink = 0x%x\n", pMemLink);
- RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pnext = 0x%x\n",
+ RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pnext = 0x%x\n",
pMemLink->pnext);
- RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pprev = 0x%x\n",
+ RTMEMDIAG2 ("memHeapAddBlock: pMemLink->pprev = 0x%x\n",
pMemLink->pprev);
return pMemLink;
@@ -1262,7 +1262,7 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
RTMEMDIAG2 ("memHeapCheckPtr: for mem_p = 0x%x\n", mem_p);
- if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
+ if (ppvMemHeap == 0 || *ppvMemHeap == 0 || mem_p == 0)
return 0;
pMemHeap = *(OSMemHeap**)ppvMemHeap;
@@ -1272,7 +1272,7 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
for (; pMemLink != 0; pMemLink = pMemLink->pnext) {
if (pMemLink->blockType & RTMEMRAW) {
-
+
/* if RAW block, the pointer should be stored in pMemBlk */
if (pMemLink->pMemBlk == mem_p) {
@@ -1282,17 +1282,17 @@ int memHeapCheckPtr (void** ppvMemHeap, void* mem_p)
}
else {
OSMemBlk* pMemBlk = (OSMemBlk*)pMemLink->pMemBlk;
-
+
/* Check, is the pointer inside this memory page */
- if (mem_p > pMemLink->pMemBlk &&
+ if (mem_p > pMemLink->pMemBlk &&
mem_p < (void*)(((ASN1OCTET*)pMemLink->pMemBlk) + pMemBlk->nunits * 8u))
{
/* Check, is the pointer a correct element of the mem page */
OSMemElemDescr* pElem = (OSMemElemDescr*) pMemBlk->data;
for (; pElem != 0; pElem = GETNEXT (pElem)) {
-
+
void* curMem_p = (void*) pElem_data (pElem);
if (curMem_p == mem_p && !ISFREE (pElem)) {
ast_mutex_unlock(&pMemHeap->pLock);
@@ -1311,7 +1311,7 @@ void memHeapSetProperty (void** ppvMemHeap, ASN1UINT propId, void* pProp)
{
OSMemHeap* pMemHeap;
- if (ppvMemHeap == 0)
+ if (ppvMemHeap == 0)
return;
if (*ppvMemHeap == 0)
@@ -1332,9 +1332,9 @@ void memHeapSetProperty (void** ppvMemHeap, ASN1UINT propId, void* pProp)
break;
}
ast_mutex_unlock(&pMemHeap->pLock);
-}
+}
-int memHeapCreate (void** ppvMemHeap)
+int memHeapCreate (void** ppvMemHeap)
{
OSMemHeap* pMemHeap;
if (ppvMemHeap == 0) return ASN_E_INVPARAM;
@@ -1349,4 +1349,3 @@ int memHeapCreate (void** ppvMemHeap)
*ppvMemHeap = (void*)pMemHeap;
return ASN_OK;
}
-
diff --git a/addons/ooh323c/src/memheap.h b/addons/ooh323c/src/memheap.h
index 8cc36d902..26e5f486b 100644
--- a/addons/ooh323c/src/memheap.h
+++ b/addons/ooh323c/src/memheap.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/ooCalls.c b/addons/ooh323c/src/ooCalls.c
index 528aa300c..050fe6558 100644
--- a/addons/ooh323c/src/ooCalls.c
+++ b/addons/ooh323c/src/ooCalls.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -61,7 +61,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
{
OOTRACEERR1("ERROR:Memory - ooCreateCall - call\n");
return NULL;
- }
+ }
memset(call, 0, sizeof(OOH323CallData));
ast_cond_init(&call->gkWait, NULL);
ast_mutex_init(&call->GkLock);
@@ -79,7 +79,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
else {
call->ourCallerId[0] = '\0';
}
-
+
memset(&call->callIdentifier, 0, sizeof(H225CallIdentifier));
memset(&call->confIdentifier, 0, sizeof(H225ConferenceIdentifier));
@@ -106,7 +106,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
// May 20090713. Fix it for Video session
OO_SETFLAG(call->flags, OO_M_AUDIOSESSION);
-
+
call->callState = OO_CALL_CREATED;
call->callEndReason = OO_REASON_UNKNOWN;
call->pCallFwdData = NULL;
@@ -115,13 +115,13 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
{
call->callingPartyNumber = NULL;
}
- else{
+ else{
if(ooUtilsIsStrEmpty(gH323ep.callingPartyNumber))
{
call->callingPartyNumber = NULL;
}
else{
- call->callingPartyNumber = (char*) memAlloc(call->pctxt,
+ call->callingPartyNumber = (char*) memAlloc(call->pctxt,
strlen(gH323ep.callingPartyNumber)+1);
if(call->callingPartyNumber)
{
@@ -155,14 +155,14 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
call->masterSlaveState = OO_MasterSlave_Idle;
call->statusDeterminationNumber = 0;
call->localTermCapState = OO_LocalTermCapExchange_Idle;
- call->remoteTermCapState = OO_RemoteTermCapExchange_Idle;
+ call->remoteTermCapState = OO_RemoteTermCapExchange_Idle;
call->ourCaps = NULL;
call->remoteCaps = NULL;
call->jointCaps = NULL;
dListInit(&call->remoteFastStartOLCs);
call->remoteTermCapSeqNo =0;
call->localTermCapSeqNo = 0;
- memcpy(&call->capPrefs, &gH323ep.capPrefs, sizeof(OOCapPrefs));
+ memcpy(&call->capPrefs, &gH323ep.capPrefs, sizeof(OOCapPrefs));
call->logicalChans = NULL;
call->noOfLogicalChannels = 0;
call->logicalChanNoBase = 1001;
@@ -174,7 +174,7 @@ OOH323CallData* ooCreateCall(char* type, char*callToken)
call->pFastStartRes = NULL;
call->usrData = NULL;
ooCreateCallCmdConnection(call);
- OOTRACEINFO3("Created a new call (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Created a new call (%s, %s)\n", call->callType,
call->callToken);
/* Add new call to calllist */
ooAddCallToList (call);
@@ -208,8 +208,8 @@ int ooAddCallToList(OOH323CallData *call)
int ooEndCall(OOH323CallData *call)
{
- OOTRACEDBGA4("In ooEndCall call state is - %s (%s, %s)\n",
- ooGetCallStateText(call->callState), call->callType,
+ OOTRACEDBGA4("In ooEndCall call state is - %s (%s, %s)\n",
+ ooGetCallStateText(call->callState), call->callType,
call->callToken);
if(call->callState == OO_CALL_REMOVED) {
@@ -228,7 +228,7 @@ int ooEndCall(OOH323CallData *call)
if(call->callState == OO_CALL_CLEARED || ((strcmp(call->callType, "incoming")) &&
call->callState == OO_CALL_CLEAR_RELEASESENT))
{
- ooCleanCall(call);
+ ooCleanCall(call);
call->callState = OO_CALL_REMOVED;
return OO_OK;
}
@@ -251,16 +251,16 @@ int ooEndCall(OOH323CallData *call)
}
- if(!OO_TESTFLAG(call->flags, OO_M_RELEASE_BUILT))
+ if(!OO_TESTFLAG(call->flags, OO_M_RELEASE_BUILT))
{
- if(call->callState == OO_CALL_CLEAR ||
+ if(call->callState == OO_CALL_CLEAR ||
call->callState == OO_CALL_CLEAR_RELEASERECVD)
{
ooSendReleaseComplete(call);
OO_SETFLAG(call->flags, OO_M_RELEASE_BUILT);
}
}
-
+
return OO_OK;
}
@@ -299,8 +299,8 @@ int ooCleanCall(OOH323CallData *call)
{
OOCTXT *pctxt;
- OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n",
- call->callType, call->callToken,
+ OOTRACEWARN4 ("Cleaning Call (%s, %s)- reason:%s\n",
+ call->callType, call->callToken,
ooGetReasonCodeText (call->callEndReason));
/* First clean all the logical channels, if not already cleaned. */
@@ -323,7 +323,7 @@ int ooCleanCall(OOH323CallData *call)
{
ooCloseH245Listener(call);
}
-
+
/* Close H225 connection, if not already closed. */
if (0 != call->pH225Channel && 0 != call->pH225Channel->sock)
{
@@ -342,7 +342,7 @@ int ooCleanCall(OOH323CallData *call)
}
ooRemoveCallFromList (call);
- OOTRACEINFO3("Removed call (%s, %s) from list\n", call->callType,
+ OOTRACEINFO3("Removed call (%s, %s) from list\n", call->callType,
call->callToken);
if(call->pCallFwdData && call->pCallFwdData->fwdedByRemote)
@@ -395,7 +395,7 @@ int ooCallSetCallerId(OOH323CallData* call, const char* callerid)
int ooCallSetCallingPartyNumber(OOH323CallData *call, const char *number)
{
- if(call->callingPartyNumber)
+ if(call->callingPartyNumber)
memFreePtr(call->pctxt, call->callingPartyNumber);
call->callingPartyNumber = (char*) memAlloc(call->pctxt, strlen(number)+1);
@@ -405,7 +405,7 @@ int ooCallSetCallingPartyNumber(OOH323CallData *call, const char *number)
}
else{
OOTRACEERR3("Error:Memory - ooCallSetCallingPartyNumber - "
- "callingPartyNumber.(%s, %s)\n", call->callType,
+ "callingPartyNumber.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -427,14 +427,14 @@ int ooCallGetCallingPartyNumber(OOH323CallData *call, char *buffer, int len)
return OO_OK;
}
}
-
+
return OO_FAILED;
}
int ooCallSetCalledPartyNumber(OOH323CallData *call, const char *number)
{
- if(call->calledPartyNumber)
+ if(call->calledPartyNumber)
memFreePtr(call->pctxt, call->calledPartyNumber);
call->calledPartyNumber = (char*) memAlloc(call->pctxt, strlen(number)+1);
@@ -444,7 +444,7 @@ int ooCallSetCalledPartyNumber(OOH323CallData *call, const char *number)
}
else{
OOTRACEERR3("Error:Memory - ooCallSetCalledPartyNumber - "
- "calledPartyNumber.(%s, %s)\n", call->callType,
+ "calledPartyNumber.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -461,7 +461,7 @@ int ooCallGetCalledPartyNumber(OOH323CallData *call, char *buffer, int len)
return OO_OK;
}
}
-
+
return OO_FAILED;
}
@@ -506,7 +506,7 @@ int ooCallAddAlias
call->remoteAliases = psNewAlias;
}
- OOTRACEDBGC5("Added %s alias %s to call. (%s, %s)\n",
+ OOTRACEDBGC5("Added %s alias %s to call. (%s, %s)\n",
local?"local":"remote", value, call->callType, call->callToken);
return OO_OK;
}
@@ -533,8 +533,8 @@ int ooCallAddAliasEmailID(OOH323CallData *call, const char* email)
int ooCallAddAliasURLID(OOH323CallData *call, const char* url)
{
return ooCallAddAlias(call, T_H225AliasAddress_url_ID, url, TRUE);
-}
-
+}
+
int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id)
{
@@ -550,63 +550,63 @@ int ooCallAddRemoteAliasDialedDigits
-/* Used to override global end point capabilities and add call specific
+/* Used to override global end point capabilities and add call specific
capabilities */
-int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddAMRNBCapability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddAMRNBCapability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddSpeexCapability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddSpeexCapability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -614,12 +614,12 @@ int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
/*
-int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -627,12 +627,12 @@ int ooCallAddG726Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
*/
-int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -640,11 +640,11 @@ int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
-int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
+int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -652,28 +652,28 @@ int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(call, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
int ooCallAddGSMCapability
- (OOH323CallData* call, int cap, ASN1USINT framesPerPkt,
+ (OOH323CallData* call, int cap, ASN1USINT framesPerPkt,
OOBOOL comfortNoise, OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddGSMCapability(call, cap, framesPerPkt, comfortNoise,
- scrambled, dir, startReceiveChannel,
+ return ooCapabilityAddGSMCapability(call, cap, framesPerPkt, comfortNoise,
+ scrambled, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
int ooCallAddH263VideoCapability
- (OOH323CallData *call, int cap, unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI, unsigned cif16MPI, unsigned maxBitRate,
+ (OOH323CallData *call, int cap, unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI, unsigned cif16MPI, unsigned maxBitRate,
int dir, cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -683,7 +683,7 @@ int ooCallAddH263VideoCapability
return ooCapabilityAddH263VideoCapability(call, sqcifMPI, qcifMPI, cifMPI,
cif4MPI, cif16MPI, maxBitRate,dir,
startReceiveChannel, startTransmitChannel,
- stopReceiveChannel, stopTransmitChannel,
+ stopReceiveChannel, stopTransmitChannel,
FALSE);
}
@@ -765,7 +765,7 @@ OOH323CallData* ooFindCallByToken(const char *callToken)
else
call = call->next;
}
-
+
if(!call)
{
OOTRACEERR2("ERROR:Call with token %s not found\n", callToken);
@@ -790,7 +790,7 @@ ASN1BOOL ooIsSessionEstablished(OOH323CallData *call, int sessionID, char* dir)
while(temp)
{
if(temp->sessionID == sessionID &&
- temp->state == OO_LOGICALCHAN_ESTABLISHED &&
+ temp->state == OO_LOGICALCHAN_ESTABLISHED &&
!strcmp(temp->dir, dir) )
return TRUE;
temp = temp->next;
@@ -818,7 +818,7 @@ int ooAddMediaInfo(OOH323CallData *call, OOMediaInfo mediaInfo)
memcpy (newMediaInfo, &mediaInfo, sizeof(OOMediaInfo));
- OOTRACEDBGC4("Configured mediainfo for cap %s (%s, %s)\n",
+ OOTRACEDBGC4("Configured mediainfo for cap %s (%s, %s)\n",
ooGetCapTypeText(mediaInfo.cap),
call->callType, call->callToken);
if(!call->mediaInfo) {
@@ -848,7 +848,7 @@ unsigned ooCallGenerateSessionID
sessionID = call->nextSessionID++;
else{
OOTRACEDBGC4("Session id for %s channel of type audio has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
sessionID = 0; /* Will be assigned by remote */
}
@@ -867,7 +867,7 @@ unsigned ooCallGenerateSessionID
else{
sessionID = 0; /* Will be assigned by remote */
OOTRACEDBGC4("Session id for %s channel of type video has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
}
}
@@ -884,7 +884,7 @@ unsigned ooCallGenerateSessionID
else{
sessionID = 0; /* Will be assigned by remote */
OOTRACEDBGC4("Session id for %s channel of type data has to be "
- "provided by remote.(%s, %s)\n", dir, call->callType,
+ "provided by remote.(%s, %s)\n", dir, call->callType,
call->callToken);
}
}
@@ -899,8 +899,8 @@ int ooCallH245ConnectionRetryTimerExpired(void *data)
ooTimerCallback *cbData = (ooTimerCallback*) data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("H245 connection retry timer expired. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEINFO3("H245 connection retry timer expired. (%s, %s)\n",
+ call->callType, call->callToken);
memFreePtr(call->pctxt, cbData);
call->h245ConnectionAttempts++;
@@ -913,9 +913,9 @@ int ooCallH245ConnectionRetryTimerExpired(void *data)
const char* ooGetReasonCodeText (OOUINT32 code)
{
static const char* reasonCodeText[] = {
- "OO_REASON_UNKNOWN",
+ "OO_REASON_UNKNOWN",
"OO_REASON_INVALIDMESSAGE",
- "OO_REASON_TRANSPORTFAILURE",
+ "OO_REASON_TRANSPORTFAILURE",
"OO_REASON_NOROUTE",
"OO_REASON_NOUSER",
"OO_REASON_NOBW",
@@ -925,10 +925,10 @@ const char* ooGetReasonCodeText (OOUINT32 code)
"OO_REASON_GK_UNREACHABLE",
"OO_REASON_GK_CLEARED",
"OO_REASON_NOCOMMON_CAPABILITIES",
- "OO_REASON_REMOTE_FWDED",
+ "OO_REASON_REMOTE_FWDED",
"OO_REASON_LOCAL_FWDED",
- "OO_REASON_REMOTE_CLEARED",
- "OO_REASON_LOCAL_CLEARED",
+ "OO_REASON_REMOTE_CLEARED",
+ "OO_REASON_LOCAL_CLEARED",
"OO_REASON_REMOTE_BUSY",
"OO_REASON_LOCAL_BUSY",
"OO_REASON_REMOTE_NOANSWER",
@@ -956,4 +956,3 @@ const char* ooGetCallStateText (OOCallState callState)
};
return ooUtilsGetText (callState, callStateText, OONUMBEROF(callStateText));
}
-
diff --git a/addons/ooh323c/src/ooCalls.h b/addons/ooh323c/src/ooCalls.h
index f9a93f113..d05ccf0b7 100644
--- a/addons/ooh323c/src/ooCalls.h
+++ b/addons/ooh323c/src/ooCalls.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooCalls.h
- * This file contains call management functions.
+ * @file ooCalls.h
+ * This file contains call management functions.
*/
#ifndef _OOCALLS_H_
#define _OOCALLS_H_
@@ -29,7 +29,7 @@ extern "C" {
#endif
-/**
+/**
* @defgroup callmgmt Call Management
* @{
*/
@@ -60,7 +60,7 @@ extern "C" {
#define OO_M_DATASESSION ASN1UINTCNT(0x00000200)
#define OO_M_T38SUPPORTED ASN1UINTCNT(0x00000400)
-/**
+/**
* Call states.
*/
typedef enum {
@@ -76,20 +76,20 @@ typedef enum {
OO_CALL_REMOVED /* call removed */
} OOCallState;
-/**
+/**
* H.245 session states.
*/
typedef enum {
OO_H245SESSION_IDLE,
OO_H245SESSION_PAUSED,
OO_H245SESSION_ACTIVE,
- OO_H245SESSION_ENDSENT,
+ OO_H245SESSION_ENDSENT,
OO_H245SESSION_ENDRECVD,
OO_H245SESSION_CLOSED
} OOH245SessionState;
/**
- * Structure to store local and remote media endpoint info for a
+ * Structure to store local and remote media endpoint info for a
* given media type.
*/
typedef struct OOMediaInfo{
@@ -115,10 +115,10 @@ typedef struct OOCallFwdData {
int port;
struct OOAliases *aliases;
OOBOOL fwdedByRemote; /*Set when we are being fwded by remote*/
-} OOCallFwdData;
+} OOCallFwdData;
/**
- * Structure to store information on an H.323 channel (H.225 or H.245) for
+ * Structure to store information on an H.323 channel (H.225 or H.245) for
* a particular call.
*/
typedef struct OOH323Channel {
@@ -128,7 +128,7 @@ typedef struct OOH323Channel {
} OOH323Channel;
/**
- * Structure to store information on fast start response (H.225) to
+ * Structure to store information on fast start response (H.225) to
* reply same answer in CALL PROCEEDING, ALERTING & CONNECT.
*/
typedef struct EXTERN FastStartResponse {
@@ -144,8 +144,8 @@ typedef struct OOH323Regex {
/**
- * This structure is used to maintain all information on an active call.
- * A list of these structures is maintained within the global endpoint
+ * This structure is used to maintain all information on an active call.
+ * A list of these structures is maintained within the global endpoint
* structure.
*/
typedef struct OOH323CallData {
@@ -166,10 +166,10 @@ typedef struct OOH323CallData {
int transfercap;
ASN1USINT callReference;
char ourCallerId[256];
- H225CallIdentifier callIdentifier;/* The call identifier for the active
+ H225CallIdentifier callIdentifier;/* The call identifier for the active
call. */
char *callingPartyNumber;
- char *calledPartyNumber;
+ char *calledPartyNumber;
H225ConferenceIdentifier confIdentifier;
ASN1UINT flags;
OOCallState callState;
@@ -207,8 +207,8 @@ typedef struct OOH323CallData {
DList remoteFastStartOLCs;
ASN1UINT8 remoteTermCapSeqNo;
ASN1UINT8 localTermCapSeqNo;
- OOCapPrefs capPrefs;
- OOLogicalChannel* logicalChans;
+ OOCapPrefs capPrefs;
+ OOLogicalChannel* logicalChans;
int noOfLogicalChannels;
int logicalChanNoBase;
int logicalChanNoMax;
@@ -237,7 +237,7 @@ typedef struct OOH323CallData {
#define ooCallData OOH323CallData
/**
- * This callback function is triggered when a new call structure is
+ * This callback function is triggered when a new call structure is
* created inside the stack for an incoming or outgoing call.
*
* @param call H.323 call data structure
@@ -246,8 +246,8 @@ typedef struct OOH323CallData {
typedef int (*cb_OnNewCallCreated)(OOH323CallData* call);
/**
- * This callback function is triggered when a Q.931 alerting message is
- * received for an outgoing call or when a Q.931 alerting message is sent
+ * This callback function is triggered when a Q.931 alerting message is
+ * received for an outgoing call or when a Q.931 alerting message is sent
* for an incoming call.
*
* @param call H.323 call data structure
@@ -256,8 +256,8 @@ typedef int (*cb_OnNewCallCreated)(OOH323CallData* call);
typedef int (*cb_OnAlerting)(OOH323CallData * call);
/**
- * This callback function is triggered when there is an incoming call.
- * In the case where a gatekeeper is in use, the call must first be
+ * This callback function is triggered when there is an incoming call.
+ * In the case where a gatekeeper is in use, the call must first be
* admitted by the gatekeeper before this callback is triggered.
*
* @param call H.323 call data structure
@@ -266,7 +266,7 @@ typedef int (*cb_OnAlerting)(OOH323CallData * call);
typedef int (*cb_OnIncomingCall)(OOH323CallData* call );
/**
- * This callback function is triggered after a Q.931 setup message
+ * This callback function is triggered after a Q.931 setup message
* is sent for an outgoing call.
*
* @param call H.323 call data structure
@@ -275,10 +275,10 @@ typedef int (*cb_OnIncomingCall)(OOH323CallData* call );
typedef int (*cb_OnOutgoingCall)(OOH323CallData* call );
/**
- * This callback function is triggered when a Q.931 connect message is
- * sent in case of incoming call. In case of outgoing call, this is invoked
- * when a Q.931 connect message is received. It is not invoked until after
- * fast start and H.245 tunneling messages within the connect message are
+ * This callback function is triggered when a Q.931 connect message is
+ * sent in case of incoming call. In case of outgoing call, this is invoked
+ * when a Q.931 connect message is received. It is not invoked until after
+ * fast start and H.245 tunneling messages within the connect message are
* processed.
*
* @param call H.323 call data structure
@@ -295,8 +295,8 @@ typedef int (*cb_OnCallEstablished)(struct OOH323CallData* call);
typedef int (*cb_OnCallCleared)(struct OOH323CallData* call);
/**
- * This callback function is triggered when master-slave determination
- * and capabilities negotiation procedures are successfully completed
+ * This callback function is triggered when master-slave determination
+ * and capabilities negotiation procedures are successfully completed
* for a call.
*
* @param call H.323 call data structure
@@ -332,7 +332,7 @@ typedef void (*cb_OnMediaChanged)
(struct OOH323CallData *call, char* remoteIP, int remotePort);
/**
- * This structure holds all of the H.323 signaling callback function
+ * This structure holds all of the H.323 signaling callback function
* addresses.
* @see ooH323EpSetH323Callbacks
*/
@@ -428,7 +428,7 @@ EXTERN int ooCallSetCalledPartyNumber
EXTERN int ooCallClearAliases(OOH323CallData *call);
/**
- * This function is used to add an H323ID alias to be used by local endpoint
+ * This function is used to add an H323ID alias to be used by local endpoint
* for a particular call.
* @param call Handle to the call
* @param h323id H323ID to add for the local endpoint for the call.
@@ -438,7 +438,7 @@ EXTERN int ooCallClearAliases(OOH323CallData *call);
EXTERN int ooCallAddAliasH323ID(OOH323CallData *call, const char* h323id);
/**
- * This function is used to add an dialedDigits alias to be used by local
+ * This function is used to add an dialedDigits alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param dialedDigits DialedDigits to add for the local endpoint for call.
@@ -449,7 +449,7 @@ EXTERN int ooCallAddAliasDialedDigits
(OOH323CallData *call, const char* dialedDigits);
/**
- * This function is used to add an email-id alias to be used by local
+ * This function is used to add an email-id alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param email Email-id to add for the local endpoint for call.
@@ -460,7 +460,7 @@ EXTERN int ooCallAddAliasEmailID(OOH323CallData *call, const char* email);
/**
- * This function is used to add an email-id alias to be used by local
+ * This function is used to add an email-id alias to be used by local
* endpoint for a particular call.
* @param call Handle to the call
* @param url URL-id to add for the local endpoint for call.
@@ -471,8 +471,8 @@ EXTERN int ooCallAddAliasURLID(OOH323CallData *call, const char* url);
/**
- * This is a helper function used by other call related add aliases functions
- * to add a particular alias. This function is not supposed to be called
+ * This is a helper function used by other call related add aliases functions
+ * to add a particular alias. This function is not supposed to be called
* directly.
* @param call Handle to the call
* @param aliasType Type of alias being added
@@ -486,7 +486,7 @@ int ooCallAddAlias
/**
- * This function is used to add an dialed digits alias for the remote endpoint
+ * This function is used to add an dialed digits alias for the remote endpoint
* involved in a particular call.
* @param call Handle to the call
* @param dialedDigits dialedDigits alias to add for the remote endpoint.
@@ -497,7 +497,7 @@ EXTERN int ooCallAddRemoteAliasDialedDigits
(OOH323CallData *call, const char* dialedDigits);
/**
- * This function is used to add an H323ID alias for the remote endpoint
+ * This function is used to add an H323ID alias for the remote endpoint
* involved in a particular call.
* @param call Handle to the call
* @param h323id H323ID to add for the remote endpoint.
@@ -508,12 +508,12 @@ EXTERN int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id);
/**
- * This function is used to add G7231 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G7231 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Indicates support for silenceSuppression.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
@@ -522,9 +522,9 @@ EXTERN int ooCallAddRemoteAliasH323ID(OOH323CallData *call, const char* h323id);
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -532,12 +532,12 @@ EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G728 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G728 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -545,9 +545,9 @@ EXTERN int ooCallAddG7231Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -555,12 +555,12 @@ EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G729 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G729 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -568,9 +568,9 @@ EXTERN int ooCallAddG728Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -578,12 +578,12 @@ EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
cb_StopTransmitChannel stopTransmitChannel);
/**
- * This function is used to add G711 capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add G711 capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -591,9 +591,9 @@ EXTERN int ooCallAddG729Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
+EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -602,13 +602,13 @@ EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
/**
- * This function is used to add GSM capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add GSM capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames pre packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames pre packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -616,10 +616,10 @@ EXTERN int ooCallAddG711Capability(OOH323CallData *call, int cap, int txframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
- ASN1USINT framesPerPkt, OOBOOL comfortNoise,
+EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
+ ASN1USINT framesPerPkt, OOBOOL comfortNoise,
OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -630,23 +630,23 @@ EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
/**
- * This function is used to add H263 video capability for the call. The
- * "ooCallAdd...Capability" functions allow to override the global endpoint
+ * This function is used to add H263 video capability for the call. The
+ * "ooCallAdd...Capability" functions allow to override the global endpoint
* capabilities and use specific capabilities for specific calls.
* @param call Call for which capability has to be added.
* @param cap Capability type - OO_H263VIDEO
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -654,13 +654,13 @@ EXTERN int ooCallAddGSMCapability(OOH323CallData* call, int cap,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCallAddH263VideoCapability(OOH323CallData *call, int cap,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate,
- int dir,
+EXTERN int ooCallAddH263VideoCapability(OOH323CallData *call, int cap,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate,
+ int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -682,9 +682,9 @@ EXTERN int ooCallEnableDTMFRFC2833
/**
- * This function is used to disable rfc 2833 capability for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
- * want to enable/disable dtmf for a specific call, then you can override
+ * This function is used to disable rfc 2833 capability for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
+ * want to enable/disable dtmf for a specific call, then you can override
* end-point settings using this function
* @param call Call for which rfc2833 has to be disabled.
*
@@ -694,9 +694,9 @@ EXTERN int ooCallDisableDTMFRFC2833(OOH323CallData *call);
/**
- * This function is used to enable H.245(alphanumeric) dtmf support for the
- * call. By default the stack uses the dtmf settings for the endpoint. But if
- * you want to enable H.245(alphanumeric) dtmf for a specific call, then you
+ * This function is used to enable H.245(alphanumeric) dtmf support for the
+ * call. By default the stack uses the dtmf settings for the endpoint. But if
+ * you want to enable H.245(alphanumeric) dtmf for a specific call, then you
* can override end-point settings using this function
* @param call Call for which H.245(alphanumeric) dtmf support
* has to be enabled.
@@ -706,9 +706,9 @@ EXTERN int ooCallDisableDTMFRFC2833(OOH323CallData *call);
EXTERN int ooCallEnableDTMFH245Alphanumeric(OOH323CallData *call);
/**
- * This function is used to disable H.245(alphanumeric) dtmf support for the
- * call. By default the stack uses the dtmf settings for the endpoint. But if
- * you want to disable H.245(alphanumeric) dtmf for a specific call, then you
+ * This function is used to disable H.245(alphanumeric) dtmf support for the
+ * call. By default the stack uses the dtmf settings for the endpoint. But if
+ * you want to disable H.245(alphanumeric) dtmf for a specific call, then you
* can override end-point settings using this function
* @param call Call for which H.245(alphanumeric) dtmf support
* has to be disabled.
@@ -718,8 +718,8 @@ EXTERN int ooCallEnableDTMFH245Alphanumeric(OOH323CallData *call);
EXTERN int ooCallDisableDTMFH245Alphanumeric(OOH323CallData *call);
/**
- * This function is used to enable H.245(signal) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * This function is used to enable H.245(signal) dtmf support for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to enable H.245(signal) dtmf for a specific call, then you can override
* end-point settings using this function
* @param call Call for which H.245(signal) dtmf support
@@ -731,9 +731,9 @@ EXTERN int ooCallEnableDTMFH245Signal(OOH323CallData *call);
/**
- * This function is used to disable H.245(signal) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
- * want to disable H.245(signal) dtmf for a specific call, then you can
+ * This function is used to disable H.245(signal) dtmf support for the call.
+ * By default the stack uses the dtmf settings for the endpoint. But if you
+ * want to disable H.245(signal) dtmf for a specific call, then you can
* override end-point settings using this function
* @param call Call for which H.245(signal) dtmf support
* has to be disabled.
@@ -745,7 +745,7 @@ EXTERN int ooCallDisableDTMFH245Signal(OOH323CallData *call);
/**
* This function is used to enable Q.931(keypad) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to enable Q.931(keypad) dtmf support for a specific call, then you can
* override end-point settings using this function
* @param call Call for which Q.931(keypad) dtmf support
@@ -757,7 +757,7 @@ EXTERN int ooCallEnableDTMFQ931Keypad(OOH323CallData *call);
/**
* This function is used to disable Q.931(keypad) dtmf support for the call.
- * By default the stack uses the dtmf settings for the endpoint. But if you
+ * By default the stack uses the dtmf settings for the endpoint. But if you
* want to disable Q.931(keypad) dtmf support for a specific call, then you can
* override end-point settings using this function
* @param call Call for which Q.931(keypad) dtmf support
@@ -787,14 +787,14 @@ EXTERN int ooEndCall(OOH323CallData *call);
/**
* This function is used to remove a call from the list of existing calls.
- *
+ *
* @param call Pointer to the call to be removed.
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooRemoveCallFromList (OOH323CallData *call);
/**
- * This function is used to clean up a call. It closes all associated sockets,
+ * This function is used to clean up a call. It closes all associated sockets,
* removes the call from the global list and frees up associated memory.
*
* @param call Pointer to the call to be cleared.
@@ -803,25 +803,25 @@ EXTERN int ooRemoveCallFromList (OOH323CallData *call);
EXTERN int ooCleanCall(OOH323CallData *call);
/**
- * This function is used to check whether a specified session in specified
+ * This function is used to check whether a specified session in specified
* direction is active for the call.
* @param call Handle to call for which session has to be queried.
- * @param sessionID Session id to identify the type of session(1 for audio,
+ * @param sessionID Session id to identify the type of session(1 for audio,
* 2 for voice and 3 for data)
* @param dir Direction of the session(transmit/receive)
*
- * @return 1, if session active. 0, otherwise.
+ * @return 1, if session active. 0, otherwise.
*/
EXTERN ASN1BOOL ooIsSessionEstablished
(OOH323CallData *call, int sessionID, char* dir);
/**
- * This function can be used by an application to specify media endpoint
+ * This function can be used by an application to specify media endpoint
* information for different types of media. The stack by default uses local IP
- * and port for media. An application can provide mediainfo if it wants to
+ * and port for media. An application can provide mediainfo if it wants to
* override default.
* @param call Handle to the call
- * @param mediaInfo Structure which defines the media endpoint to be
+ * @param mediaInfo Structure which defines the media endpoint to be
* used.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -829,7 +829,7 @@ EXTERN ASN1BOOL ooIsSessionEstablished
EXTERN int ooAddMediaInfo(OOH323CallData *call, OOMediaInfo mediaInfo);
/**
- * This function is used to generate a media session id for the new media
+ * This function is used to generate a media session id for the new media
* session for the call.
* @param call Handle to the call.
* @param type Type of media session.
@@ -841,7 +841,7 @@ EXTERN unsigned ooCallGenerateSessionID
(OOH323CallData *call, OOCapType type, char *dir);
/**
- * This is an handler for H245 connection retry timer. When remote end is not
+ * This is an handler for H245 connection retry timer. When remote end is not
* yet listening for H245 connections, this timer provides a wait and retry
* mechanism to establish H245 connection.
* @param data Timer callback data.
@@ -868,8 +868,8 @@ EXTERN const char* ooGetReasonCodeText (OOUINT32 code);
*/
EXTERN const char* ooGetCallStateText (OOCallState callState);
-/**
- * @}
+/**
+ * @}
*/
int isRunning(char *callToken);
diff --git a/addons/ooh323c/src/ooCapability.c b/addons/ooh323c/src/ooCapability.c
index c5b1f87e9..731478346 100644
--- a/addons/ooh323c/src/ooCapability.c
+++ b/addons/ooh323c/src/ooCapability.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -40,7 +40,7 @@ int ooCapabilityEnableDTMFRFC2833
}
else{
call->dtmfmode |= OO_CAP_DTMF_RFC2833;
- OOTRACEINFO3("Enabled RFC2833 DTMF capability for (%s, %s) \n",
+ OOTRACEINFO3("Enabled RFC2833 DTMF capability for (%s, %s) \n",
call->callType, call->callToken);
if(dynamicRTPPayloadType >= 96 && dynamicRTPPayloadType <= 127)
call->dtmfcodec = dynamicRTPPayloadType;
@@ -67,7 +67,7 @@ int ooCapabilityEnableDTMFCISCO
}
else{
call->dtmfmode |= OO_CAP_DTMF_CISCO;
- OOTRACEINFO3("Enabled RTP/CISCO DTMF capability for (%s, %s) \n",
+ OOTRACEINFO3("Enabled RTP/CISCO DTMF capability for (%s, %s) \n",
call->callType, call->callToken);
if(dynamicRTPPayloadType >= 96 && dynamicRTPPayloadType <= 127)
call->dtmfcodec = dynamicRTPPayloadType;
@@ -89,7 +89,7 @@ int ooCapabilityDisableDTMFRFC2833(OOH323CallData *call)
}
else{
call->dtmfmode ^= OO_CAP_DTMF_RFC2833;
- OOTRACEINFO3("Disabled RFC2833 DTMF capability for (%s, %s)\n",
+ OOTRACEINFO3("Disabled RFC2833 DTMF capability for (%s, %s)\n",
call->callType, call->callToken);
}
@@ -104,7 +104,7 @@ int ooCapabilityDisableDTMFCISCO(OOH323CallData *call)
}
else{
call->dtmfmode ^= OO_CAP_DTMF_CISCO;
- OOTRACEINFO3("Disabled RTP/CISCO DTMF capability for (%s, %s)\n",
+ OOTRACEINFO3("Disabled RTP/CISCO DTMF capability for (%s, %s)\n",
call->callType, call->callToken);
}
@@ -119,7 +119,7 @@ int ooCapabilityEnableDTMFH245Alphanumeric(OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_H245_alphanumeric;
- OOTRACEINFO3("Dtmf mode set to H.245(alphanumeric) for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to H.245(alphanumeric) for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -133,7 +133,7 @@ int ooCapabilityDisableDTMFH245Alphanumeric(OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_H245_alphanumeric;
- OOTRACEINFO3("Dtmf mode H.245(alphanumeric) disabled for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode H.245(alphanumeric) disabled for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -147,7 +147,7 @@ int ooCapabilityEnableDTMFH245Signal(OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_H245_signal;
- OOTRACEINFO3("Dtmf mode set to H.245(signal) for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to H.245(signal) for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -161,7 +161,7 @@ int ooCapabilityDisableDTMFH245Signal(OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_H245_signal;
- OOTRACEINFO3("Dtmf mode H.245(signal) disabled for (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode H.245(signal) disabled for (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -175,7 +175,7 @@ int ooCapabilityEnableDTMFQ931Keypad(struct OOH323CallData *call)
}
else {
call->dtmfmode |= OO_CAP_DTMF_Q931;
- OOTRACEINFO3("Dtmf mode set to Q.931(keypad) for the call (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode set to Q.931(keypad) for the call (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -189,26 +189,26 @@ int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call)
}
else {
call->dtmfmode ^= OO_CAP_DTMF_Q931;
- OOTRACEINFO3("Dtmf mode Q.931(keypad) disabled for the call (%s, %s)\n",
+ OOTRACEINFO3("Dtmf mode Q.931(keypad) disabled for the call (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
}
-int ooCapabilityAddH263VideoCapability(ooCallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+int ooCapabilityAddH263VideoCapability(ooCallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
int ret = OO_OK;
if(sqcifMPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, sqcifMPI, 0,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, sqcifMPI, 0,
0, 0, 0, maxBitRate, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -232,7 +232,7 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cifMPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, cifMPI,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, cifMPI,
0, 0, maxBitRate, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -244,8 +244,8 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cif4MPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, 0,
- cif4MPI, 0, maxBitRate, dir,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, 0, 0, 0,
+ cif4MPI, 0, maxBitRate, dir,
startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -257,7 +257,7 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
if(cif16MPI>0)
{
- ret = ooCapabilityAddH263VideoCapability_helper(call, dir, 0, 0, 0, 0,
+ ret = ooCapabilityAddH263VideoCapability_helper(call, dir, 0, 0, 0, 0,
cif16MPI, maxBitRate, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, remote);
@@ -272,18 +272,18 @@ int ooCapabilityAddH263VideoCapability(ooCallData *call,
}
int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOH263CapParams *params=NULL;
+ OOH263CapParams *params=NULL;
OOCTXT *pctxt=NULL;
char *pictureType = NULL;
int cap = OO_H263VIDEO;
@@ -299,7 +299,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
".\n");
return OO_FAILED;
}
-
+
if(sqcifMPI>0)
{
params->MPI = sqcifMPI;
@@ -341,7 +341,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
}
else
epCap->dir = dir;
-
+
epCap->cap = OO_H263VIDEO;
epCap->capType = OO_CAP_TYPE_VIDEO;
epCap->params = (void*)params;
@@ -349,7 +349,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
epCap->startTransmitChannel = startTransmitChannel;
epCap->stopReceiveChannel = stopReceiveChannel;
epCap->stopTransmitChannel = stopTransmitChannel;
-
+
epCap->next = NULL;
if(!call)
@@ -380,7 +380,7 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
else{
/*Add as our capability */
OOTRACEDBGC4("Adding call specific H263 video capability %s. "
- "(%s, %s)\n", pictureType, call->callType,
+ "(%s, %s)\n", pictureType, call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -399,8 +399,8 @@ int ooCapabilityAddH263VideoCapability_helper(ooCallData *call,
/* Used for g711 ulaw/alaw, g728, g729 and g7231 */
int ooCapabilityAddSimpleCapability
- (OOH323CallData *call, int cap, int txframes,
- int rxframes, OOBOOL silenceSuppression, int dir,
+ (OOH323CallData *call, int cap, int txframes,
+ int rxframes, OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -408,7 +408,7 @@ int ooCapabilityAddSimpleCapability
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOCapParams *params=NULL;
+ OOCapParams *params=NULL;
OOCTXT *pctxt=NULL;
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -438,7 +438,7 @@ int ooCapabilityAddSimpleCapability
else {
epCap->dir = dir;
}
-
+
epCap->cap = cap;
epCap->capType = OO_CAP_TYPE_AUDIO;
epCap->params = (void*)params;
@@ -451,7 +451,7 @@ int ooCapabilityAddSimpleCapability
if(!call)
{
/* Add as local capability */
- OOTRACEDBGC2("Adding endpoint capability %s. \n",
+ OOTRACEDBGC2("Adding endpoint capability %s. \n",
ooGetCapTypeText(epCap->cap));
if(!gH323ep.myCaps) {
gH323ep.myCaps = epCap;
@@ -479,8 +479,8 @@ int ooCapabilityAddSimpleCapability
}
else{
/* Add as our capability */
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -494,7 +494,7 @@ int ooCapabilityAddSimpleCapability
ooAppendCapToCapPrefs(call, cap);
}
}
-
+
return OO_OK;
}
@@ -513,20 +513,20 @@ int epCapIsPreferred(OOH323CallData *call, ooH323EpCapability *epCap)
return 0;
}
-int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
+int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
unsigned framesPerPkt, OOBOOL comfortNoise,
- OOBOOL scrambled, int dir,
+ OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOGSMCapParams *params=NULL;
+ OOGSMCapParams *params=NULL;
OOCTXT *pctxt = NULL;
-
+
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -559,7 +559,7 @@ int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
epCap->startTransmitChannel = startTransmitChannel;
epCap->stopReceiveChannel = stopReceiveChannel;
epCap->stopTransmitChannel = stopTransmitChannel;
-
+
epCap->next = NULL;
/* Add as local capability */
if(!call)
@@ -587,8 +587,8 @@ int ooCapabilityAddGSMCapability(OOH323CallData *call, int cap,
}
}
else{
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
/*Add as our capability */
if(!call->ourCaps){
@@ -617,7 +617,7 @@ int ooCapabilityAddT38Capability
OOBOOL remote)
{
ooH323EpCapability *epCap = NULL, *cur=NULL;
- OOCapParams *params=NULL;
+ OOCapParams *params=NULL;
OOCTXT *pctxt=NULL;
if(!call) pctxt = &gH323ep.ctxt;
else pctxt = call->pctxt;
@@ -639,7 +639,7 @@ int ooCapabilityAddT38Capability
else {
epCap->dir = dir;
}
-
+
epCap->cap = cap;
epCap->capType = OO_CAP_TYPE_DATA;
epCap->params = (void*)params;
@@ -652,7 +652,7 @@ int ooCapabilityAddT38Capability
if(!call)
{
/* Add as local capability */
- OOTRACEDBGC2("Adding endpoint capability %s. \n",
+ OOTRACEDBGC2("Adding endpoint capability %s. \n",
ooGetCapTypeText(epCap->cap));
if(!gH323ep.myCaps) {
gH323ep.myCaps = epCap;
@@ -681,8 +681,8 @@ int ooCapabilityAddT38Capability
}
else{
/* Add as our capability */
- OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Adding call specific capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(!call->ourCaps){
call->ourCaps = epCap;
@@ -697,7 +697,7 @@ int ooCapabilityAddT38Capability
call->t38sides |= 1;
}
}
-
+
return OO_OK;
}
@@ -714,7 +714,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
"ooCapabilityCreateVideoCapability.\n");
return NULL;
}
-
+
if(!(epCap->dir & dir))
{
OOTRACEERR1("Error:Failed to create capability due to direction "
@@ -741,7 +741,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
}
-
+
struct H245AudioCapability* ooCapabilityCreateAudioCapability
(ooH323EpCapability *epCap, OOCTXT *pctxt, int dir)
{
@@ -752,7 +752,7 @@ struct H245AudioCapability* ooCapabilityCreateAudioCapability
"ooCapabilityCreateAudioCapability.\n");
return NULL;
}
-
+
if(!(epCap->dir & dir))
{
OOTRACEERR1("Error:Failed to create capability due to direction "
@@ -799,7 +799,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
switch(cap)
{
case OO_CAP_DTMF_RFC2833:
- pATECap = (H245AudioTelephonyEventCapability*)memAlloc(pctxt,
+ pATECap = (H245AudioTelephonyEventCapability*)memAlloc(pctxt,
sizeof(H245AudioTelephonyEventCapability));
if(!pATECap)
{
@@ -820,7 +820,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
pATECap->audioTelephoneEvent = events;
return pATECap;
case OO_CAP_DTMF_CISCO:
- pCSDTMFCap = (H245DataApplicationCapability*)memAlloc(pctxt,
+ pCSDTMFCap = (H245DataApplicationCapability*)memAlloc(pctxt,
sizeof(H245DataApplicationCapability));
if(!pCSDTMFCap)
{
@@ -851,10 +851,10 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->t35CountryCode = 181;
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->t35Extension = 0;
pCSDTMFCap->application.u.nonStandard->nonStandardIdentifier.u.h221NonStandard->manufacturerCode = 18;
-
+
return pCSDTMFCap;
case OO_CAP_DTMF_H245_alphanumeric:
- userInput = (H245UserInputCapability*)memAllocZ(pctxt,
+ userInput = (H245UserInputCapability*)memAllocZ(pctxt,
sizeof(H245UserInputCapability));
if(!userInput)
{
@@ -865,7 +865,7 @@ void* ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt)
userInput->t = T_H245UserInputCapability_basicString;
return userInput;
case OO_CAP_DTMF_H245_signal:
- userInput = (H245UserInputCapability*)memAllocZ(pctxt,
+ userInput = (H245UserInputCapability*)memAllocZ(pctxt,
sizeof(H245UserInputCapability));
if(!userInput)
{
@@ -898,9 +898,9 @@ struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
}
params =(OOH263CapParams*)epCap->params;
- pVideo = (H245VideoCapability*)memAllocZ(pctxt,
+ pVideo = (H245VideoCapability*)memAllocZ(pctxt,
sizeof(H245VideoCapability));
- pH263Cap = (H245H263VideoCapability*) memAllocZ(pctxt,
+ pH263Cap = (H245H263VideoCapability*) memAllocZ(pctxt,
sizeof(H245H263VideoCapability));
if(!pVideo || !pH263Cap)
{
@@ -964,9 +964,9 @@ struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
return NULL;
}
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
- pGSMCap = (H245GSMAudioCapability*)memAlloc(pctxt,
+ pGSMCap = (H245GSMAudioCapability*)memAlloc(pctxt,
sizeof(H245GSMAudioCapability));
if(!pAudio || !pGSMCap)
{
@@ -989,7 +989,7 @@ struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
pGSMCap->audioUnitSize = ((OOGSMCapParams*)epCap->params)->rxframes*OO_GSMFRAMESIZE;
else
pGSMCap->audioUnitSize = ((OOGSMCapParams*)epCap->params)->txframes*OO_GSMFRAMESIZE;
-
+
pGSMCap->comfortNoise = ((OOGSMCapParams*)epCap->params)->comfortNoise;
pGSMCap->scrambled = ((OOGSMCapParams*)epCap->params)->scrambled;
@@ -1009,7 +1009,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return NULL;
}
params =(OOCapParams*)epCap->params;
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
if(!pAudio)
{
@@ -1017,7 +1017,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return NULL;
}
-
+
switch(epCap->cap)
{
case OO_G711ALAW64K:
@@ -1032,7 +1032,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
if(dir & OORX)
pAudio->u.g711Alaw56k = params->rxframes;
else
- pAudio->u.g711Alaw56k = params->txframes;
+ pAudio->u.g711Alaw56k = params->txframes;
return pAudio;
case OO_G711ULAW64K:
pAudio->t = T_H245AudioCapability_g711Ulaw64k;
@@ -1078,7 +1078,7 @@ struct H245AudioCapability* ooCapabilityCreateSimpleCapability
return pAudio;
case OO_G7231:
pAudio->t = T_H245AudioCapability_g7231;
- pAudio->u.g7231 = (H245AudioCapability_g7231*)memAlloc(pctxt,
+ pAudio->u.g7231 = (H245AudioCapability_g7231*)memAlloc(pctxt,
sizeof(H245AudioCapability_g7231));
if(!pAudio->u.g7231)
{
@@ -1112,7 +1112,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
return NULL;
}
- pAudio = (H245AudioCapability*)memAlloc(pctxt,
+ pAudio = (H245AudioCapability*)memAlloc(pctxt,
sizeof(H245AudioCapability));
if(!pAudio)
{
@@ -1120,7 +1120,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
return NULL;
}
-
+
switch(epCap->cap)
{
case OO_AMRNB:
@@ -1128,7 +1128,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
case OO_G726AAL2:
case OO_SPEEX:
pAudio->t = T_H245AudioCapability_nonStandard;
- pAudio->u.nonStandard = (H245NonStandardParameter*)memAlloc(pctxt,
+ pAudio->u.nonStandard = (H245NonStandardParameter*)memAlloc(pctxt,
sizeof(H245NonStandardParameter));
if(!pAudio->u.nonStandard)
{
@@ -1139,7 +1139,7 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
pAudio->u.nonStandard->nonStandardIdentifier.t=T_H245NonStandardIdentifier_h221NonStandard;
pAudio->u.nonStandard->nonStandardIdentifier.u.h221NonStandard =
- (H245NonStandardIdentifier_h221NonStandard *) memAlloc(pctxt,
+ (H245NonStandardIdentifier_h221NonStandard *) memAlloc(pctxt,
sizeof(H245NonStandardIdentifier_h221NonStandard));
if (!pAudio->u.nonStandard->nonStandardIdentifier.u.h221NonStandard) {
OOTRACEERR2("Error:Memory - ooCapabilityCreateSimpleCapability - %d\n", epCap->cap);
@@ -1199,7 +1199,7 @@ struct H245DataMode_application* ooCreateT38ApplicationData
{
app->t = T_H245DataApplicationCapability_application_t38fax;
app->u.t38fax =
- (H245DataMode_application_t38fax *) memAlloc(pctxt,
+ (H245DataMode_application_t38fax *) memAlloc(pctxt,
sizeof(H245DataMode_application_t38fax));
if (!app->u.t38fax) {
OOTRACEERR1("Error:Memory - ooCreateT38AppData\n");
@@ -1237,7 +1237,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
return NULL;
}
- pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
+ pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
sizeof(H245DataApplicationCapability));
if(!pT38)
{
@@ -1246,7 +1246,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
}
memset(pT38, 0, sizeof(H245DataApplicationCapability));
pT38app = (void *)&pT38->application;
-
+
switch(epCap->cap)
{
case OO_T38:
@@ -1268,7 +1268,7 @@ struct H245DataApplicationCapability* ooCapabilityCreateT38Capability
/* Used for g711 ulaw/alaw, g728, g729, g729a, g7231 */
ASN1BOOL ooCapabilityCheckCompatibility_Simple
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
int noofframes=0, cap;
@@ -1308,11 +1308,11 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
case T_H245AudioCapability_g729AnnexA:
cap = OO_G729A;
noofframes = audioCap->u.g729AnnexA;
- break;
+ break;
case T_H245AudioCapability_g729wAnnexB:
cap = OO_G729B;
noofframes = audioCap->u.g729wAnnexB;
- break;
+ break;
case T_H245AudioCapability_g7231:
cap = OO_G7231;
noofframes = audioCap->u.g7231->maxAl_sduAudioFrames;
@@ -1322,7 +1322,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
return FALSE;
}
- OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
+ OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
epCap->cap, cap);
if(cap != epCap->cap) { return FALSE; }
@@ -1359,7 +1359,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_Simple
}
/* Used for g726, AMRNB */
ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
int cap;
@@ -1368,7 +1368,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
if (audioCap->t == T_H245AudioCapability_nonStandard &&
audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard) {
switch (audioCap->u.nonStandard->data.numocts) {
case sizeof("G.726-32k")-1:
@@ -1386,10 +1386,10 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
return FALSE;
break;
case sizeof("AMRNB")-1: /* case sizeof("Speex")-1 */
- if (!strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
+ if (!strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
audioCap->u.nonStandard->data.numocts))
cap = OO_AMRNB;
- else if (!strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
+ else if (!strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
audioCap->u.nonStandard->data.numocts))
cap = OO_SPEEX;
else
@@ -1401,7 +1401,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
} else
return FALSE;
- OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
+ OOTRACEDBGC3("Comparing codecs: current=%d, requested=%d\n",
epCap->cap, cap);
if(cap != epCap->cap) { return FALSE; }
@@ -1411,7 +1411,7 @@ ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
OOBOOL ooCapabilityCheckCompatibility_GSM
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
unsigned noofframes=0, cap;
@@ -1447,8 +1447,8 @@ OOBOOL ooCapabilityCheckCompatibility_GSM
{
if(((OOGSMCapParams*)epCap->params)->txframes > noofframes){
OOTRACEDBGA5("Reducing txframes for GSM from %d to %d to match "
- "receive capability of remote end.(%s, %s)\n",
- ((OOGSMCapParams*)epCap->params)->txframes, noofframes,
+ "receive capability of remote end.(%s, %s)\n",
+ ((OOGSMCapParams*)epCap->params)->txframes, noofframes,
call->callType, call->callToken);
((OOGSMCapParams*)epCap->params)->txframes = noofframes;
}
@@ -1459,7 +1459,7 @@ OOBOOL ooCapabilityCheckCompatibility_GSM
}
OOBOOL ooCapabilityCheckCompatibility_T38
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245DataApplicationCapability* t38Cap, int dir)
{
unsigned cap = 0;
@@ -1479,20 +1479,20 @@ OOBOOL ooCapabilityCheckCompatibility_T38
OOBOOL ooCapabilityCheckCompatibility_H263Video
- (struct OOH323CallData *call, ooH323EpCapability *epCap,
+ (struct OOH323CallData *call, ooH323EpCapability *epCap,
H245VideoCapability *pVideoCap, int dir)
{
H245H263VideoCapability *pH263Cap = NULL;
OOH263CapParams *params = epCap->params;
- if(!pVideoCap->u.h263VideoCapability)
+ if(!pVideoCap->u.h263VideoCapability)
{
OOTRACEERR3("Error:No H263 video capability present in video capability"
"structure. (%s, %s)\n", call->callType, call->callToken);
return FALSE;
}
pH263Cap = pVideoCap->u.h263VideoCapability;
-
+
/* can we receive/transmit this capability */
if(OORX & dir)
{
@@ -1632,14 +1632,14 @@ OOBOOL ooCapabilityCheckCompatibility_H263Video
}
}
}
-
+
return FALSE;
}
OOBOOL ooCapabilityCheckCompatibility_Audio
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245AudioCapability* audioCap, int dir)
{
@@ -1666,17 +1666,17 @@ OOBOOL ooCapabilityCheckCompatibility_Audio
return FALSE;
}
- return FALSE;
+ return FALSE;
}
OOBOOL ooCapabilityCheckCompatibility_Video
- (OOH323CallData *call, ooH323EpCapability* epCap,
+ (OOH323CallData *call, ooH323EpCapability* epCap,
H245VideoCapability* videoCap, int dir)
{
switch(videoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
- return ooCapabilityCheckCompatibility_H263Video(call, epCap,
+ return ooCapabilityCheckCompatibility_H263Video(call, epCap,
videoCap, dir);
default:
OOTRACEDBGC3("ooCapabilityCheckCompatibility_Video - Unsupported video "
@@ -1689,19 +1689,19 @@ OOBOOL ooCapabilityCheckCompatibility_Video
can receive only y, then we can't reduce our transmit rate
*/
OOBOOL ooCapabilityCheckCompatibility
- (struct OOH323CallData *call, ooH323EpCapability* epCap,
+ (struct OOH323CallData *call, ooH323EpCapability* epCap,
H245DataType* dataType, int dir)
{
switch(dataType->t)
{
case T_H245DataType_audioData:
if(epCap->capType == OO_CAP_TYPE_AUDIO)
- return ooCapabilityCheckCompatibility_Audio(call, epCap,
+ return ooCapabilityCheckCompatibility_Audio(call, epCap,
dataType->u.audioData, dir);
break;
case T_H245DataType_videoData:
if(epCap->capType == OO_CAP_TYPE_VIDEO)
- return ooCapabilityCheckCompatibility_Video(call, epCap,
+ return ooCapabilityCheckCompatibility_Video(call, epCap,
dataType->u.videoData, dir);
break;
case T_H245DataType_data:
@@ -1729,11 +1729,11 @@ ASN1BOOL ooCheckCompatibility
if(txCap->cap != rxCap->cap) return FALSE;
if(!(txCap->dir & OOTX)) return FALSE;
-
+
if(!(rxCap->dir & OORX)) return FALSE;
switch(txCap->cap)
- {
+ {
case OO_G711ALAW64K:
case OO_G711ALAW56K:
case OO_G711ULAW64K:
@@ -1743,26 +1743,26 @@ ASN1BOOL ooCheckCompatibility
case OO_G729A:
case OO_G729B:
case OO_G7231:
- if(((OOCapParams*)txCap->params)->txframes <=
+ if(((OOCapParams*)txCap->params)->txframes <=
((OOCapParams*)rxCap->params)->rxframes)
return TRUE;
else{
- OOTRACEDBGA4("Simple caps %s are not compatible.(%s, %s)\n",
- ooGetCapTypeText(txCap->cap), call->callType,
+ OOTRACEDBGA4("Simple caps %s are not compatible.(%s, %s)\n",
+ ooGetCapTypeText(txCap->cap), call->callType,
call->callToken);
return FALSE;
}
case OO_GSMFULLRATE:
case OO_GSMHALFRATE:
case OO_GSMENHANCEDFULLRATE:
- if(((OOGSMCapParams*)txCap->params)->txframes <=
+ if(((OOGSMCapParams*)txCap->params)->txframes <=
((OOGSMCapParams*)rxCap->params)->rxframes)
return TRUE;
else{
OOTRACEDBGA3("GSM caps are not compatible. (%s, %s)\n", call->callType,
call->callToken);
return FALSE;
- }
+ }
default:
OOTRACEWARN3("WARN: Unsupported capabilities being compared. (%s, %s)\n",
call->callType, call->callToken);
@@ -1796,18 +1796,18 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
cap = OO_GSMENHANCEDFULLRATE;
break;
default:
- OOTRACEERR3("Error:Invalid GSM capability type.(%s, %s)\n",
+ OOTRACEERR3("Error:Invalid GSM capability type.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
}
OOTRACEDBGC4("Determined audio data type to be of type %d. Searching"
- " for matching capability.(%s, %s)\n", cap, call->callType,
+ " for matching capability.(%s, %s)\n", cap, call->callType,
call->callToken);
/* If we have call specific caps then we use them, otherwise we use
general endpoint caps*/
- if(call->ourCaps)
+ if(call->ourCaps)
cur = call->ourCaps;
else
cur = gH323ep.myCaps;
@@ -1816,31 +1816,31 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
{
OOTRACEDBGC4("Local cap being compared %d. (%s, %s)\n", cur->cap,
call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching audio capability type %d. Comparing"
- " other parameters. (%s, %s)\n", cap, call->callType,
+ " other parameters. (%s, %s)\n", cap, call->callType,
call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
if(((OOGSMCapParams*)cur->params)->rxframes < framesPerPkt)
return NULL;
else{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOGSMCapParams*)memAlloc(call->pctxt,sizeof(OOGSMCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeGSMSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -1861,13 +1861,13 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOGSMCapParams*)memAlloc(call->pctxt,sizeof(OOGSMCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeGSMSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -1885,7 +1885,7 @@ ooH323EpCapability* ooIsAudioDataTypeGSMSupported
{
OOTRACEINFO5("Reducing framesPerPkt for transmission of GSM "
"capability from %d to %d to match receive capability of"
- " remote endpoint.(%s, %s)\n", params->txframes,
+ " remote endpoint.(%s, %s)\n", params->txframes,
framesPerPkt, call->callType, call->callToken);
params->txframes = framesPerPkt;
}
@@ -1957,12 +1957,12 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
}
OOTRACEDBGC4("Determined Simple audio data type to be of type %s. Searching"
- " for matching capability.(%s, %s)\n",
+ " for matching capability.(%s, %s)\n",
ooGetCapTypeText(cap), call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -1970,38 +1970,38 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching simple audio capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
if(((OOCapParams*)cur->params)->rxframes < framesPerPkt)
return NULL;
- if(((OOCapParams*)cur->params)->rxframes > framesPerPkt)
+ if(((OOCapParams*)cur->params)->rxframes > framesPerPkt)
((OOCapParams*)cur->params)->rxframes = framesPerPkt;
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2016,8 +2016,8 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2025,16 +2025,16 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2052,13 +2052,13 @@ ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
{
OOTRACEINFO5("Reducing framesPerPkt for transmission of Simple "
"capability from %d to %d to match receive capability of"
- " remote endpoint.(%s, %s)\n", params->txframes,
+ " remote endpoint.(%s, %s)\n", params->txframes,
framesPerPkt, call->callType, call->callToken);
params->txframes = framesPerPkt;
}
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2074,8 +2074,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
OOCapParams * params= NULL;
if (audioCap->t == T_H245AudioCapability_nonStandard &&
- audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard) {
switch (audioCap->u.nonStandard->data.numocts) {
case sizeof("G.726-32k")-1:
@@ -2109,12 +2109,12 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
return NULL;
OOTRACEDBGC4("Determined Simple audio data type to be of type %s. Searching"
- " for matching capability.(%s, %s)\n",
+ " for matching capability.(%s, %s)\n",
ooGetCapTypeText(cap), call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -2122,33 +2122,33 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching simple audio capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2163,8 +2163,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2172,16 +2172,16 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2196,8 +2196,8 @@ ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2228,10 +2228,10 @@ ooH323EpCapability* ooIsAudioDataTypeSupported
case T_H245AudioCapability_gsmFullRate:
case T_H245AudioCapability_gsmHalfRate:
case T_H245AudioCapability_gsmEnhancedFullRate:
- return ooIsAudioDataTypeGSMSupported(call, audioCap, dir);
+ return ooIsAudioDataTypeGSMSupported(call, audioCap, dir);
default:
return NULL;
- }
+ }
}
ooH323EpCapability* ooIsT38Supported
@@ -2248,7 +2248,7 @@ ooH323EpCapability* ooIsT38Supported
break;
default:
return NULL;
- }
+ }
if(call->ourCaps)
cur = call->ourCaps;
@@ -2257,33 +2257,33 @@ ooH323EpCapability* ooIsT38Supported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
break;
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching t38 capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
call->callType, call->callToken);
-
+
/* can we receive this capability */
if(dir & OORX)
{
- OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can receive Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAllocZ(call->pctxt,
+ epCap = (ooH323EpCapability*)memAllocZ(call->pctxt,
sizeof(ooH323EpCapability));
params=(OOCapParams*)memAlloc(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsT38Supported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2298,8 +2298,8 @@ ooH323EpCapability* ooIsT38Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2307,16 +2307,16 @@ ooH323EpCapability* ooIsT38Supported
/* Can we transmit compatible stream */
if(dir & OOTX)
{
- OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ OOTRACEDBGC4("We can transmit Simple capability %s. (%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
params =(OOCapParams*)memAllocZ(call->pctxt,sizeof(OOCapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsAudioDataTypeSimpleSupported - "
- "epCap/params (%s, %s)\n", call->callType,
+ "epCap/params (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2331,8 +2331,8 @@ ooH323EpCapability* ooIsT38Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOCapParams));
OOTRACEDBGC4("Returning copy of matched transmit capability %s."
- "(%s, %s)\n",
- ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n",
+ ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2340,12 +2340,12 @@ ooH323EpCapability* ooIsT38Supported
}
ooH323EpCapability* ooIsVideoDataTypeH263Supported
- (OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
+ (OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
OOPictureFormat picFormat)
{
int cap;
ooH323EpCapability *cur=NULL, *epCap=NULL;
- OOH263CapParams *params= NULL;
+ OOH263CapParams *params= NULL;
char *pictureType=NULL;
unsigned mpi=0;
cap = OO_H263VIDEO;
@@ -2375,14 +2375,14 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
pictureType = "CIF16";
mpi = pH263Cap->cif16MPI;
}
-
- OOTRACEDBGA4("Looking for H263 video capability(%s). (%s, %s)\n",
+
+ OOTRACEDBGA4("Looking for H263 video capability(%s). (%s, %s)\n",
pictureType, call->callType, call->callToken);
/* If we have call specific caps, we use them; otherwise use general
endpoint caps
- */
+ */
if(call->ourCaps)
cur = call->ourCaps;
else
@@ -2390,9 +2390,9 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
while(cur)
{
- OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
+ OOTRACEDBGC4("Local cap being compared %s. (%s, %s)\n",
ooGetCapTypeText(cur->cap),call->callType, call->callToken);
-
+
if(cur->cap == cap && (cur->dir & dir))
{
if(((OOH263CapParams*)cur->params)->picFormat == picFormat)
@@ -2400,25 +2400,25 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
}
cur = cur->next;
}
-
+
if(!cur) return NULL;
-
+
OOTRACEDBGC4("Found matching H.263 video capability type %s. Comparing"
- " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
- call->callType, call->callToken);
+ " other parameters. (%s, %s)\n", ooGetCapTypeText(cap),
+ call->callType, call->callToken);
if(dir & OORX)
{
if(mpi < ((OOH263CapParams*)cur->params)->MPI)
return NULL;
else{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
- params = (OOH263CapParams*) memAlloc(call->pctxt,
+ params = (OOH263CapParams*) memAlloc(call->pctxt,
sizeof(OOH263CapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
- "epCap/params. (%s, %s)\n", call->callType,
+ "epCap/params. (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2433,21 +2433,21 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
epCap->next = NULL;
memcpy(epCap->params, cur->params, sizeof(OOH263CapParams));
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
}
if(dir & OOTX)
{
- epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
+ epCap = (ooH323EpCapability*)memAlloc(call->pctxt,
sizeof(ooH323EpCapability));
- params = (OOH263CapParams*) memAlloc(call->pctxt,
+ params = (OOH263CapParams*) memAlloc(call->pctxt,
sizeof(OOH263CapParams));
if(!epCap || !params)
{
OOTRACEERR3("Error:Memory - ooIsVideoDataTypeH263Supported - "
- "epCap/params. (%s, %s)\n", call->callType,
+ "epCap/params. (%s, %s)\n", call->callType,
call->callToken);
return NULL;
}
@@ -2465,12 +2465,12 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
{
OOTRACEINFO5("Increasing minimum picture interval for transmission of"
" H263 video capability from %d to %d to match receive "
- "capability of remote endpoint.(%s, %s)\n", params->MPI,
+ "capability of remote endpoint.(%s, %s)\n", params->MPI,
mpi, call->callType, call->callToken);
params->MPI = mpi;
}
OOTRACEDBGC4("Returning copy of matched receive capability %s. "
- "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
+ "(%s, %s)\n", ooGetCapTypeText(cur->cap), call->callType,
call->callToken);
return epCap;
}
@@ -2481,25 +2481,25 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
ooH323EpCapability* ooIsVideoDataTypeSupported
(OOH323CallData *call, H245VideoCapability* pVideoCap, int dir)
{
- switch(pVideoCap->t)
+ switch(pVideoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
if(pVideoCap->u.h263VideoCapability->m.sqcifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_SQCIF);
else if(pVideoCap->u.h263VideoCapability->m.qcifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_QCIF);
else if(pVideoCap->u.h263VideoCapability->m.cifMPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF);
else if(pVideoCap->u.h263VideoCapability->m.cif4MPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF4);
else if(pVideoCap->u.h263VideoCapability->m.cif16MPIPresent)
- return ooIsVideoDataTypeH263Supported(call,
+ return ooIsVideoDataTypeH263Supported(call,
pVideoCap->u.h263VideoCapability, dir, OO_PICFORMAT_CIF16);
- break;
+ break;
case T_H245VideoCapability_nonStandard:
case T_H245VideoCapability_h261VideoCapability:
case T_H245VideoCapability_h262VideoCapability:
@@ -2517,17 +2517,17 @@ ooH323EpCapability* ooIsVideoDataTypeSupported
ooH323EpCapability* ooIsDataTypeSupported
(OOH323CallData *call, H245DataType *data, int dir)
{
- OOTRACEDBGC3("Looking for data type support. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Looking for data type support. (%s, %s)\n", call->callType,
call->callToken);
-
+
switch(data->t)
{
case T_H245DataType_nonStandard:
- OOTRACEDBGC3("NonStandard data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("NonStandard data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_nullData:
- OOTRACEDBGC3("Null data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("Null data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_videoData:
@@ -2540,12 +2540,12 @@ ooH323EpCapability* ooIsDataTypeSupported
return ooIsAudioDataTypeSupported(call, data->u.audioData, dir);
case T_H245DataType_data:
- OOTRACEDBGC3("Looking for application data dataType support.(%s, %s)\n",
+ OOTRACEDBGC3("Looking for application data dataType support.(%s, %s)\n",
call->callType, call->callToken);
return ooIsT38Supported(call, data->u.data, dir);
case T_H245DataType_encryptionData:
- OOTRACEDBGC3("Encryption data type not supported.(%s, %s)\n",
+ OOTRACEDBGC3("Encryption data type not supported.(%s, %s)\n",
call->callType, call->callToken);
return NULL;
case T_H245DataType_h235Control:
@@ -2555,7 +2555,7 @@ ooH323EpCapability* ooIsDataTypeSupported
case T_H245DataType_multiplexedStream:
return NULL;
default:
- OOTRACEINFO3("Unknown data type (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Unknown data type (%s, %s)\n", call->callType,
call->callToken);
}
return NULL;
@@ -2584,15 +2584,15 @@ int ooRemoveCapFromCapPrefs(OOH323CallData *call, int cap)
memcpy(&oldPrefs, capPrefs, sizeof(OOCapPrefs));
memset(capPrefs, 0, sizeof(OOCapPrefs));
for(i=0; i<oldPrefs.index; i++)
- {
- if(oldPrefs.order[i] != cap)
+ {
+ if(oldPrefs.order[i] != cap)
capPrefs->order[j++] = oldPrefs.order[i];
}
capPrefs->index = j;
return OO_OK;
}
-
+
int ooAppendCapToCapPrefs(OOH323CallData *call, int cap)
{
OOCapPrefs *capPrefs=NULL;
@@ -2629,7 +2629,7 @@ int ooChangeCapPrefOrder(OOH323CallData *call, int cap, int pos)
/* Decrease Pref order */
if(i < pos)
{
- for( ; i<pos; i++)
+ for( ; i<pos; i++)
capPrefs->order[i] = capPrefs->order[i+1];
capPrefs->order[i]=cap;
return OO_OK;
@@ -2658,12 +2658,12 @@ int ooPreppendCapToCapPrefs(OOH323CallData *call, int cap)
memcpy(&oldPrefs, capPrefs, sizeof(OOCapPrefs));
-
+
capPrefs->order[j++] = cap;
for(i=0; i<oldPrefs.index; i++)
- {
- if(oldPrefs.order[i] != cap)
+ {
+ if(oldPrefs.order[i] != cap)
capPrefs->order[j++] = oldPrefs.order[i];
}
capPrefs->index = j;
@@ -2675,35 +2675,35 @@ int ooAddRemoteCapability(OOH323CallData *call, H245Capability *cap)
switch(cap->t)
{
case T_H245Capability_receiveAudioCapability:
- return ooAddRemoteAudioCapability(call, cap->u.receiveAudioCapability,
+ return ooAddRemoteAudioCapability(call, cap->u.receiveAudioCapability,
OORX);
case T_H245Capability_transmitAudioCapability:
- return ooAddRemoteAudioCapability(call, cap->u.transmitAudioCapability,
+ return ooAddRemoteAudioCapability(call, cap->u.transmitAudioCapability,
OOTX);
case T_H245Capability_receiveAndTransmitAudioCapability:
- return ooAddRemoteAudioCapability(call,
+ return ooAddRemoteAudioCapability(call,
cap->u.receiveAndTransmitAudioCapability, OORXTX);
case T_H245Capability_receiveDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call, cap->u.receiveDataApplicationCapability,
+ return ooAddRemoteDataApplicationCapability(call, cap->u.receiveDataApplicationCapability,
OORX);
case T_H245Capability_transmitDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call, cap->u.transmitDataApplicationCapability,
+ return ooAddRemoteDataApplicationCapability(call, cap->u.transmitDataApplicationCapability,
OOTX);
case T_H245Capability_receiveAndTransmitDataApplicationCapability:
- return ooAddRemoteDataApplicationCapability(call,
+ return ooAddRemoteDataApplicationCapability(call,
cap->u.receiveAndTransmitDataApplicationCapability, OORXTX);
default:
- OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
+ OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
}
-int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
+int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
H245DataApplicationCapability *dataCap,
int dir)
{
@@ -2720,177 +2720,177 @@ int ooAddRemoteDataApplicationCapability(OOH323CallData *call,
dir, NULL, NULL, NULL, NULL,TRUE);
default:
OOTRACEDBGA1("Unsupported data capability type\n");
-
+
}
return OO_OK;
}
-int ooAddRemoteAudioCapability(OOH323CallData *call,
+int ooAddRemoteAudioCapability(OOH323CallData *call,
H245AudioCapability *audioCap,
int dir)
{
int rxframes=0, txframes=0;
-
+
switch(audioCap->t)
{
case T_H245AudioCapability_g711Alaw64k:
if(dir&OOTX) txframes = audioCap->u.g711Alaw64k;
else if(dir&OORX) rxframes = audioCap->u.g711Alaw64k;
- else{
- txframes = audioCap->u.g711Alaw64k;
- rxframes = audioCap->u.g711Alaw64k;
+ else{
+ txframes = audioCap->u.g711Alaw64k;
+ rxframes = audioCap->u.g711Alaw64k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ALAW64K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ALAW64K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL,TRUE);
case T_H245AudioCapability_g711Alaw56k:
if(dir&OOTX) txframes = audioCap->u.g711Alaw56k;
else if(dir&OORX) rxframes = audioCap->u.g711Alaw56k;
- else{
- txframes = audioCap->u.g711Alaw56k;
- rxframes = audioCap->u.g711Alaw56k;
+ else{
+ txframes = audioCap->u.g711Alaw56k;
+ rxframes = audioCap->u.g711Alaw56k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ALAW56K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ALAW56K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g711Ulaw64k:
if(dir&OOTX) txframes = audioCap->u.g711Ulaw64k;
else if(dir&OORX) rxframes = audioCap->u.g711Ulaw64k;
- else{
- txframes = audioCap->u.g711Ulaw64k;
- rxframes = audioCap->u.g711Ulaw64k;
+ else{
+ txframes = audioCap->u.g711Ulaw64k;
+ rxframes = audioCap->u.g711Ulaw64k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ULAW64K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ULAW64K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g711Ulaw56k:
if(dir&OOTX) txframes = audioCap->u.g711Ulaw56k;
else if(dir&OORX) rxframes = audioCap->u.g711Ulaw56k;
- else{
- txframes = audioCap->u.g711Ulaw56k;
- rxframes = audioCap->u.g711Ulaw56k;
+ else{
+ txframes = audioCap->u.g711Ulaw56k;
+ rxframes = audioCap->u.g711Ulaw56k;
}
- return ooCapabilityAddSimpleCapability(call, OO_G711ULAW56K, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G711ULAW56K, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
/* case T_H245AudioCapability_g726:
if(dir&OOTX) txframes = audioCap->u.g726;
else if(dir&OORX) rxframes = audioCap->u.g726;
- else{
- txframes = audioCap->u.g726;
- rxframes = audioCap->u.g726;
+ else{
+ txframes = audioCap->u.g726;
+ rxframes = audioCap->u.g726;
}
- return ooCapabilityAddSimpleCapability(call, OO_G726, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G726, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
*/
case T_H245AudioCapability_nonStandard:
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("G.726-32k")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "G.726-32k",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "G.726-32k",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_G726, 20,
+ return ooCapabilityAddSimpleCapability(call, OO_G726, 20,
240, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("G726r32")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "G726r32",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "G726r32",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_G726AAL2, 20,
+ return ooCapabilityAddSimpleCapability(call, OO_G726AAL2, 20,
240, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("AMRNB")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "AMRNB",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_AMRNB, 4,
+ return ooCapabilityAddSimpleCapability(call, OO_AMRNB, 4,
4, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
- if (audioCap->u.nonStandard &&
- audioCap->u.nonStandard->nonStandardIdentifier.t ==
+ if (audioCap->u.nonStandard &&
+ audioCap->u.nonStandard->nonStandardIdentifier.t ==
T_H245NonStandardIdentifier_h221NonStandard &&
audioCap->u.nonStandard->data.numocts == sizeof("Speex")-1 &&
- !strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
+ !strncmp((char *)audioCap->u.nonStandard->data.data, "Speex",
audioCap->u.nonStandard->data.numocts))
- return ooCapabilityAddSimpleCapability(call, OO_SPEEX, 4,
+ return ooCapabilityAddSimpleCapability(call, OO_SPEEX, 4,
4, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
break;
case T_H245AudioCapability_g728:
if(dir&OOTX) txframes = audioCap->u.g728;
else if(dir&OORX) rxframes = audioCap->u.g728;
- else{
- txframes = audioCap->u.g728;
- rxframes = audioCap->u.g728;
+ else{
+ txframes = audioCap->u.g728;
+ rxframes = audioCap->u.g728;
}
- return ooCapabilityAddSimpleCapability(call, OO_G728, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G728, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729:
if(dir&OOTX) txframes = audioCap->u.g729;
else if(dir&OORX) rxframes = audioCap->u.g729;
- else{
- txframes = audioCap->u.g729;
- rxframes = audioCap->u.g729;
+ else{
+ txframes = audioCap->u.g729;
+ rxframes = audioCap->u.g729;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729AnnexA:
if(dir&OOTX) txframes = audioCap->u.g729AnnexA;
else if(dir&OORX) rxframes = audioCap->u.g729AnnexA;
- else{
- txframes = audioCap->u.g729AnnexA;
- rxframes = audioCap->u.g729AnnexA;
+ else{
+ txframes = audioCap->u.g729AnnexA;
+ rxframes = audioCap->u.g729AnnexA;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729A, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729A, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g729wAnnexB:
if(dir&OOTX) txframes = audioCap->u.g729wAnnexB;
else if(dir&OORX) rxframes = audioCap->u.g729wAnnexB;
- else{
- txframes = audioCap->u.g729wAnnexB;
- rxframes = audioCap->u.g729wAnnexB;
+ else{
+ txframes = audioCap->u.g729wAnnexB;
+ rxframes = audioCap->u.g729wAnnexB;
}
- return ooCapabilityAddSimpleCapability(call, OO_G729B, txframes,
+ return ooCapabilityAddSimpleCapability(call, OO_G729B, txframes,
rxframes, FALSE, dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_g7231:
if(dir&OOTX) txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
else if(dir&OORX) rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
- else{
- txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
- rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
+ else{
+ txframes = audioCap->u.g7231->maxAl_sduAudioFrames;
+ rxframes = audioCap->u.g7231->maxAl_sduAudioFrames;
}
return ooCapabilityAddSimpleCapability(call, OO_G7231, txframes,rxframes,
audioCap->u.g7231->silenceSuppression,
- dir, NULL, NULL, NULL, NULL, TRUE);
+ dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmFullRate:
- return ooCapabilityAddGSMCapability(call, OO_GSMFULLRATE,
+ return ooCapabilityAddGSMCapability(call, OO_GSMFULLRATE,
(unsigned)(audioCap->u.gsmFullRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmFullRate->comfortNoise,
- audioCap->u.gsmFullRate->scrambled,
+ audioCap->u.gsmFullRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmHalfRate:
return ooCapabilityAddGSMCapability(call, OO_GSMHALFRATE,
(unsigned)(audioCap->u.gsmHalfRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmHalfRate->comfortNoise,
- audioCap->u.gsmHalfRate->scrambled,
+ audioCap->u.gsmHalfRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
case T_H245AudioCapability_gsmEnhancedFullRate:
- return ooCapabilityAddGSMCapability(call, OO_GSMENHANCEDFULLRATE,
+ return ooCapabilityAddGSMCapability(call, OO_GSMENHANCEDFULLRATE,
(unsigned)(audioCap->u.gsmEnhancedFullRate->audioUnitSize/OO_GSMFRAMESIZE),
audioCap->u.gsmEnhancedFullRate->comfortNoise,
- audioCap->u.gsmEnhancedFullRate->scrambled,
+ audioCap->u.gsmEnhancedFullRate->scrambled,
dir, NULL, NULL, NULL, NULL, TRUE);
default:
OOTRACEDBGA1("Unsupported audio capability type\n");
-
+
}
return OO_OK;
@@ -2902,11 +2902,11 @@ int ooCapabilityUpdateJointCapabilities
ooH323EpCapability * epCap = NULL, *cur = NULL;
OOTRACEDBGC3("checking whether we need to add cap to joint capabilities"
"(%s, %s)\n", call->callType, call->callToken);
-
+
switch(cap->t)
{
case T_H245Capability_receiveAudioCapability:
- epCap= ooIsAudioDataTypeSupported(call, cap->u.receiveAudioCapability,
+ epCap= ooIsAudioDataTypeSupported(call, cap->u.receiveAudioCapability,
OOTX);
break;
case T_H245Capability_transmitAudioCapability:
@@ -2919,14 +2919,14 @@ int ooCapabilityUpdateJointCapabilities
epCap = ooIsAudioDataTypeSupported(call, cap->u.transmitAudioCapability, OORX);
break;
case T_H245Capability_receiveVideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideo(call,
+ return ooCapabilityUpdateJointCapabilitiesVideo(call,
cap->u.receiveVideoCapability, OOTX);
case T_H245Capability_transmitVideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideo(call,
+ return ooCapabilityUpdateJointCapabilitiesVideo(call,
cap->u.transmitVideoCapability, OORX);
case T_H245Capability_receiveDataApplicationCapability:
- epCap= ooIsT38Supported(call, cap->u.receiveDataApplicationCapability,
+ epCap= ooIsT38Supported(call, cap->u.receiveDataApplicationCapability,
OOTX);
break;
case T_H245Capability_transmitDataApplicationCapability:
@@ -2941,7 +2941,7 @@ int ooCapabilityUpdateJointCapabilities
case T_H245Capability_receiveAndTransmitUserInputCapability:
- if((cap->u.receiveAndTransmitUserInputCapability->t ==
+ if((cap->u.receiveAndTransmitUserInputCapability->t ==
T_H245UserInputCapability_basicString) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
@@ -2957,7 +2957,7 @@ int ooCapabilityUpdateJointCapabilities
}
case T_H245Capability_receiveUserInputCapability:
- if((cap->u.receiveUserInputCapability->t ==
+ if((cap->u.receiveUserInputCapability->t ==
T_H245UserInputCapability_basicString) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
@@ -2973,7 +2973,7 @@ int ooCapabilityUpdateJointCapabilities
}
//break;
default:
- OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
+ OOTRACEDBGA3("Unsupported cap type encountered. Ignoring. (%s, %s)\n",
call->callType, call->callToken);
}
@@ -3006,11 +3006,11 @@ int ooCapabilityUpdateJointCapabilitiesVideo
switch(videoCap->t)
{
case T_H245VideoCapability_h263VideoCapability:
- return ooCapabilityUpdateJointCapabilitiesVideoH263(call,
+ return ooCapabilityUpdateJointCapabilitiesVideoH263(call,
videoCap->u.h263VideoCapability, dir);
default:
OOTRACEDBGC3("ooCapabilityUpdateJointCapabilitiesVideo - Unsupported"
- "capability type. (%s, %s)\n", call->callType,
+ "capability type. (%s, %s)\n", call->callType,
call->callToken);
}
return OO_OK;
@@ -3023,7 +3023,7 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
ooH323EpCapability *epCap = NULL, *cur = NULL;
if(pH263Cap->m.sqcifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_SQCIF);
if(epCap)
{
@@ -3038,14 +3038,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.qcifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_QCIF);
if(epCap)
{
@@ -3060,14 +3060,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cifMPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF);
if(epCap)
{
@@ -3082,14 +3082,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cif4MPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF4);
if(epCap)
{
@@ -3103,14 +3103,14 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
while(cur->next) cur = cur->next;
cur->next = epCap;
}
- }
+ }
}
epCap = NULL;
if(pH263Cap->m.cif16MPIPresent)
{
- epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
+ epCap = ooIsVideoDataTypeH263Supported(call, pH263Cap, dir,
OO_PICFORMAT_CIF16);
if(epCap)
{
@@ -3125,7 +3125,7 @@ int ooCapabilityUpdateJointCapabilitiesVideoH263
cur->next = epCap;
}
- }
+ }
}
return OO_OK;
diff --git a/addons/ooh323c/src/ooCapability.h b/addons/ooh323c/src/ooCapability.h
index 4e108cfd8..ce9cc392f 100644
--- a/addons/ooh323c/src/ooCapability.h
+++ b/addons/ooh323c/src/ooCapability.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooCapability.h
- * This file contains Capability management functions.
+ * @file ooCapability.h
+ * This file contains Capability management functions.
*/
#ifndef OO_CAPABILITY_H_
#define OO_CAPABILITY_H_
@@ -29,7 +29,7 @@
#define OOTX (1<<1)
#define OORXANDTX (1<<2)
#define OORXTX (1<<3) /* For symmetric capabilities */
-/* Various types of caps. Note that not all
+/* Various types of caps. Note that not all
supported */
typedef enum OOCapabilities{
OO_CAP_AUDIO_BASE = 0,
@@ -89,7 +89,7 @@ typedef enum OOCapabilities{
/**
* This structure defines the preference order for capabilities.
- *
+ *
*/
typedef struct OOCapPrefs {
int order[20];
@@ -99,11 +99,11 @@ typedef struct OOCapPrefs {
typedef struct OOCapParams {
int txframes; /*!< Number of frames per packet for transmission */
int rxframes; /*!< Number of frames per packet for reception */
- OOBOOL silenceSuppression;
+ OOBOOL silenceSuppression;
} OOCapParams;
typedef struct OOGSMCapParams {
- unsigned txframes;
+ unsigned txframes;
unsigned rxframes;
OOBOOL scrambled;
OOBOOL comfortNoise;
@@ -130,7 +130,7 @@ struct OOLogicalChannel;
extern "C" {
#endif
-/**
+/**
* This callback is used for starting media receive channel. This callback
* function is triggered when receive media channel has to be started.
* @param call Call for which receive media channel has to be started.
@@ -143,7 +143,7 @@ typedef int (*cb_StartReceiveChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for starting media transmit channel. This callback
* function is triggered when transmit media channel has to be started.
* @param call Call for which transmit media channel has to be started.
@@ -155,7 +155,7 @@ typedef int (*cb_StartReceiveChannel)
typedef int (*cb_StartTransmitChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for stopping media receive channel. This callback
* function is triggered when receive media channel has to be stopped.
* @param call Call for which receive media channel has to be stopped.
@@ -167,7 +167,7 @@ typedef int (*cb_StartTransmitChannel)
typedef int (*cb_StopReceiveChannel)
(struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
-/**
+/**
* This callback is used for stopping media transmit channel. This callback
* function is triggered when transmit media channel has to be stopped.
* @param call Call for which transmit media channel has to be stopped.
@@ -190,7 +190,7 @@ typedef enum OOCapType {
* capability
*/
typedef struct ooH323EpCapability {
- int dir;
+ int dir;
int cap;
OOCapType capType;
void *params;
@@ -212,14 +212,14 @@ typedef struct ooH323EpCapability {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup capmgmt Capability Management
* @{
*/
/**
* This function is used to add rfc2833 based dtmf detection capability
- * @param call Call if enabling for call, else null for
+ * @param call Call if enabling for call, else null for
* endpoint.
* @param dynamicRTPPayloadType dynamicRTPPayloadType to be used.
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -237,7 +237,7 @@ EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
/**
- * This function is used to enable support for H.245 based alphanumeric dtmf
+ * This function is used to enable support for H.245 based alphanumeric dtmf
* capability.
* @param call Handle to call, if enabling for the call, else NULL
* for end-point.
@@ -246,7 +246,7 @@ EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
EXTERN int ooCapabilityEnableDTMFH245Alphanumeric(struct OOH323CallData *call);
/**
- * This function is used to disable support for H.245 based alphanumeric dtmf
+ * This function is used to disable support for H.245 based alphanumeric dtmf
* capability.
* @param call Handle to call, if disabling for the call, else NULL
* for end-point.
@@ -256,7 +256,7 @@ EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
(struct OOH323CallData *call);
/**
- * This function is used to enable support for H.245 based signal dtmf
+ * This function is used to enable support for H.245 based signal dtmf
* capability.
* @param call Handle to call, if enabling for the call, else NULL
* for end-point.
@@ -265,7 +265,7 @@ EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
EXTERN int ooCapabilityEnableDTMFH245Signal(struct OOH323CallData *call);
/**
- * This function is used to disable support for H.245 based signal dtmf
+ * This function is used to disable support for H.245 based signal dtmf
* capability.
* @param call Handle to call, if disabling for the call, else NULL
* for end-point.
@@ -291,14 +291,14 @@ EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
/**
* This function is used to add simple capabilities which have only rxframes
- * and txframes parameters to the endpoint or call.(ex. G711, G728, G723.1,
+ * and txframes parameters to the endpoint or call.(ex. G711, G728, G723.1,
* G729)
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
* @param cap Type of G711 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Indicates support for silence suppression.
* Used only in case of g7231, otherwise ignored.
@@ -312,8 +312,8 @@ EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCapabilityAddSimpleCapability
- (struct OOH323CallData *call, int cap, int txframes, int rxframes,
- OOBOOL silenceSuppression, int dir,
+ (struct OOH323CallData *call, int cap, int txframes, int rxframes,
+ OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -325,13 +325,13 @@ EXTERN int ooCapabilityAddSimpleCapability
* This is an internal helper function which is used to add a GSM capability
* to local endpoints capability list or to remote endpoints capability list or
* to a call's capability list.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames per packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames per packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -340,38 +340,38 @@ EXTERN int ooCapabilityAddSimpleCapability
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
+int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
unsigned framesPerPkt, OOBOOL comfortNoise,
- OOBOOL scrambled, int dir,
+ OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
- * This function is used to add H263 video capability to local endpoints
- * capability list or to remote endpoints capability list or to a call's
+ * This function is used to add H263 video capability to local endpoints
+ * capability list or to remote endpoints capability list or to a call's
* capability list.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -380,37 +380,37 @@ int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
+EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
* This function is an helper function to ooCapabilityAddH263VideoCapability.
- * @param call Handle to a call. If this is not Null, then
- * capability is added to call's remote enpoint
- * capability list, else it is added to local H323
+ * @param call Handle to a call. If this is not Null, then
+ * capability is added to call's remote enpoint
+ * capability list, else it is added to local H323
* endpoint list.
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -419,24 +419,24 @@ EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
* @param stopTransmitChannel Callback function to stop transmit channel.
* @param remote TRUE, if adding call's remote capabilities.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
- unsigned sqcifMPI, unsigned qcifMPI,
- unsigned cifMPI, unsigned cif4MPI,
- unsigned cif16MPI, unsigned maxBitRate, int dir,
+int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
+ unsigned sqcifMPI, unsigned qcifMPI,
+ unsigned cifMPI, unsigned cif4MPI,
+ unsigned cif16MPI, unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
- cb_StopTransmitChannel stopTransmitChannel,
+ cb_StopTransmitChannel stopTransmitChannel,
OOBOOL remote);
/**
- * This function is used to add a audio capability to calls remote
+ * This function is used to add a audio capability to calls remote
* capability list.
* @param call Handle to the call.
* @param audioCap Handle to the remote endpoint's audio capability.
- * @param dir Direction in which capability is supported by
+ * @param dir Direction in which capability is supported by
* remote endpoint.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -458,12 +458,12 @@ int ooAddRemoteCapability(struct OOH323CallData *call, H245Capability *cap);
/**
* This function is used to update joint capabilities for call. It checks
* whether remote capability can be supported by local capabilities for the
- * call and if supported makes entry into the joint capability list for the
+ * call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
* @param cap Remote cap which will be tested for compatibility.
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilities
(struct OOH323CallData* call, H245Capability *cap);
@@ -472,50 +472,50 @@ EXTERN int ooCapabilityUpdateJointCapabilities
/**
* This function is used to update joint video capabilities for call. It checks
* whether remote capability can be supported by local capabilities for the
- * call and if supported makes entry into the joint capability list for the
+ * call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
- * @param videoCap Remote video capability which will be tested for
+ * @param videoCap Remote video capability which will be tested for
* compatibility.
* @param dir Direction of the capability
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilitiesVideo
(struct OOH323CallData *call, H245VideoCapability *videoCap, int dir);
/**
- * This function is used to update joint video H263 capabilities for call. It
- * checks whether remote capability can be supported by local capabilities for
+ * This function is used to update joint video H263 capabilities for call. It
+ * checks whether remote capability can be supported by local capabilities for
* the call and if supported makes entry into the joint capability list for the
* call.
* @param call Handle to the call
- * @param pH263Cap Remote H263 video capability which will be tested for
+ * @param pH263Cap Remote H263 video capability which will be tested for
* compatibility.
* @param dir Direction of the H263 capability
*
- * @return returns OO_OK, if updated else OO_FAILED;
+ * @return returns OO_OK, if updated else OO_FAILED;
*/
EXTERN int ooCapabilityUpdateJointCapabilitiesVideoH263
(struct OOH323CallData *call, H245H263VideoCapability *pH263Cap, int dir);
/**
- * This function is used to test whether the endpoint capability in the
+ * This function is used to test whether the endpoint capability in the
* specified direction can be supported by the audio capability.
* @param call Handle to the call.
* @param epCap Endpoint capability.
- * @param dataType Data type with which compatibility has to
+ * @param dataType Data type with which compatibility has to
* be tested.
* @param dir Direction indicating whether endpoint capability
* will be used for transmission or reception.
*
- * @return TRUE, if compatible. FALSE, otherwise.
+ * @return TRUE, if compatible. FALSE, otherwise.
*/
-ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
- ooH323EpCapability *epCap,
+ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
+ ooH323EpCapability *epCap,
H245DataType *dataType, int dir);
@@ -523,27 +523,27 @@ ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
* This function is used to create a audio capability structure using the
* capability type.
* @param epCap Capability.
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new audio capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
-struct H245AudioCapability* ooCapabilityCreateAudioCapability
+struct H245AudioCapability* ooCapabilityCreateAudioCapability
(ooH323EpCapability* epCap, OOCTXT *pctxt, int dir);
/**
* This function is used to create a video capability structure using the
* capability type.
* @param epCap Capability.
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new video capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created video capability on success, NULL on
+ * @return Newly created video capability on success, NULL on
* failure.
*/
struct H245VideoCapability* ooCapabilityCreateVideoCapability
@@ -554,7 +554,7 @@ struct H245VideoCapability* ooCapabilityCreateVideoCapability
* This function is used to create a dtmf capability which can be added to
* a TCS message.
* @param cap Type of dtmf capability to be created.
- * @param pctxt Pointer to OOCTXT structure to be used for memory
+ * @param pctxt Pointer to OOCTXT structure to be used for memory
* allocation.
*
* @return Pointer to the created DTMF capability, NULL in case of
@@ -570,23 +570,23 @@ void * ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt);
* for new audio capability.
* @param dir Direction for the newly created capability.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
(ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
/**
- * This function is used to create a simple(g711, g728, g723.1, g729) audio
+ * This function is used to create a simple(g711, g728, g723.1, g729) audio
* capability structure.
*
* @param epCap Handle to the endpoint capability
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new audio capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created audio capability on success, NULL on
+ * @return Newly created audio capability on success, NULL on
* failure.
*/
struct H245AudioCapability* ooCapabilityCreateSimpleCapability
@@ -596,15 +596,15 @@ struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
/**
- * This function is used to create a H263 video capability
+ * This function is used to create a H263 video capability
* structure.
* @param epCap Handle to the endpoint capability
- * @param pctxt Handle to OOCTXT which will be used to allocate memory
+ * @param pctxt Handle to OOCTXT which will be used to allocate memory
* for new video capability.
- * @param dir Direction in which the newly created capability will be
+ * @param dir Direction in which the newly created capability will be
* used.
*
- * @return Newly created video capability on success, NULL on
+ * @return Newly created video capability on success, NULL on
* failure.
*/
struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
@@ -616,9 +616,9 @@ struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
* can be supported by the endpoint.
* @param call Handle to the call.
* @param audioCap Handle to the audio capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copyof capability which supports audioCap,
+ * @return Handle to the copyof capability which supports audioCap,
* Null if none found
*/
ooH323EpCapability* ooIsAudioDataTypeSupported
@@ -629,9 +629,9 @@ ooH323EpCapability* ooIsAudioDataTypeSupported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param pVideoCap Handle to the video capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copy of capability which supports video
+ * @return Handle to the copy of capability which supports video
* capability, Null if none found
*/
ooH323EpCapability* ooIsVideoDataTypeSupported
@@ -642,14 +642,14 @@ ooH323EpCapability* ooIsVideoDataTypeSupported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param pH263Cap Handle to the H263 video capability.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
* @param picFormat Picture type(cif, qcif etc.)
*
- * @return Handle to the copy of capability which supports H263
+ * @return Handle to the copy of capability which supports H263
* capability, Null if none found
*/
ooH323EpCapability* ooIsVideoDataTypeH263Supported
- (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
+ (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
OOPictureFormat picFormat);
/**
@@ -657,9 +657,9 @@ ooH323EpCapability* ooIsVideoDataTypeH263Supported
* can be supported by the endpoint.
* @param call Handle to the call.
* @param data Handle to the capability type.
- * @param dir Direction in which support is desired.
+ * @param dir Direction in which support is desired.
*
- * @return Handle to the copy of capability which supports specified
+ * @return Handle to the copy of capability which supports specified
* capability type, Null if none found
*/
ooH323EpCapability* ooIsDataTypeSupported
@@ -705,7 +705,7 @@ EXTERN int ooRemoveCapFromCapPrefs(struct OOH323CallData *call, int cap);
EXTERN int ooAppendCapToCapPrefs(struct OOH323CallData *call, int cap);
/**
- * This function is used to change preference order of a particular capability
+ * This function is used to change preference order of a particular capability
* in the preference list.
* @param call Handle to call, if call's preference list has to be modified
* else NULL, to modify endpoint's preference list.
@@ -786,13 +786,11 @@ int ooCapabilityAddT38Capability
/**/
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif
-
-
diff --git a/addons/ooh323c/src/ooCmdChannel.c b/addons/ooh323c/src/ooCmdChannel.c
index 50a75c2cf..7160d0da3 100644
--- a/addons/ooh323c/src/ooCmdChannel.c
+++ b/addons/ooh323c/src/ooCmdChannel.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -109,7 +109,7 @@ int ooWriteStackCommand(OOStackCommand *cmd)
return OO_FAILED;
}
ast_mutex_unlock(&gCmdChanLock);
-
+
return OO_OK;
}
int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd)
@@ -144,14 +144,14 @@ int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd)
return OO_FAILED;
}
ast_mutex_unlock(call->CmdChanLock);
-
+
return OO_OK;
}
int ooReadAndProcessStackCommand()
{
- OOH323CallData *pCall = NULL;
+ OOH323CallData *pCall = NULL;
unsigned char buffer[MAXMSGLEN];
int i, recvLen = 0;
OOStackCommand cmd;
@@ -174,10 +174,10 @@ int ooReadAndProcessStackCommand()
else {
switch(cmd.type) {
- case OO_CMD_MAKECALL:
- OOTRACEINFO2("Processing MakeCall command %s\n",
+ case OO_CMD_MAKECALL:
+ OOTRACEINFO2("Processing MakeCall command %s\n",
(char*)cmd.param2);
-
+
ooH323NewCall ((char*)cmd.param2);
break;
@@ -210,7 +210,7 @@ int ooReadAndProcessStackCommand()
}
}
break;
-
+
case OO_CMD_ANSCALL:
pCall = ooFindCallByToken((char*)cmd.param1);
if(!pCall) {
@@ -231,13 +231,13 @@ int ooReadAndProcessStackCommand()
ooH323ForwardCall((char*)cmd.param1, (char*)cmd.param2);
break;
- case OO_CMD_HANGCALL:
- OOTRACEINFO3("Processing Hang call command %s with q931 cause %d\n",
+ case OO_CMD_HANGCALL:
+ OOTRACEINFO3("Processing Hang call command %s with q931 cause %d\n",
(char*)cmd.param1, *(int *) cmd.param3);
- ooH323HangCall((char*)cmd.param1,
+ ooH323HangCall((char*)cmd.param1,
*(OOCallClearReason*)cmd.param2, *(int *) cmd.param3);
break;
-
+
case OO_CMD_SENDDIGIT:
pCall = ooFindCallByToken((char*)cmd.param1);
if(!pCall) {
@@ -259,7 +259,7 @@ int ooReadAndProcessStackCommand()
break;
- case OO_CMD_STOPMONITOR:
+ case OO_CMD_STOPMONITOR:
OOTRACEINFO1("Processing StopMonitor command\n");
ooStopMonitorCalls();
break;
@@ -303,7 +303,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen1 > 0) {
cmd.param1 = malloc(cmd.plen1 + 1);
- if (!cmd.param1)
+ if (!cmd.param1)
return OO_FAILED;
memset(cmd.param1, 0, cmd.plen1 + 1);
memcpy(cmd.param1, bPoint, cmd.plen1);
@@ -312,7 +312,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen2 > 0) {
cmd.param2 = malloc(cmd.plen2 + 1);
- if (!cmd.param2)
+ if (!cmd.param2)
return OO_FAILED;
memset(cmd.param2, 0, cmd.plen2 + 1);
memcpy(cmd.param2, bPoint, cmd.plen2);
@@ -321,7 +321,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
if (cmd.plen3 > 0) {
cmd.param3 = malloc(cmd.plen3 + 1);
- if (!cmd.param3)
+ if (!cmd.param3)
return OO_FAILED;
memset(cmd.param3, 0, cmd.plen3 + 1);
memcpy(cmd.param3, bPoint, cmd.plen3);
@@ -333,11 +333,11 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
else {
switch(cmd.type) {
- case OO_CMD_MAKECALL:
- OOTRACEINFO2("Processing MakeCall command %s\n",
+ case OO_CMD_MAKECALL:
+ OOTRACEINFO2("Processing MakeCall command %s\n",
(char*)cmd.param2);
-
- ooH323MakeCall ((char*)cmd.param1, (char*)cmd.param2,
+
+ ooH323MakeCall ((char*)cmd.param1, (char*)cmd.param2,
(ooCallOptions*)cmd.param3);
break;
@@ -354,7 +354,7 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
}
}
break;
-
+
case OO_CMD_ANSCALL:
ooSendConnect(call);
break;
@@ -365,13 +365,13 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
ooH323ForwardCall((char*)cmd.param1, (char*)cmd.param2);
break;
- case OO_CMD_HANGCALL:
- OOTRACEINFO2("Processing Hang call command %s with q931 cause %d\n",
+ case OO_CMD_HANGCALL:
+ OOTRACEINFO2("Processing Hang call command %s with q931 cause %d\n",
(char*)cmd.param1);
- ooH323HangCall((char*)cmd.param1,
+ ooH323HangCall((char*)cmd.param1,
*(OOCallClearReason*)cmd.param2, *(int *) cmd.param3);
break;
-
+
case OO_CMD_SENDDIGIT:
if(call->jointDtmfMode & OO_CAP_DTMF_H245_alphanumeric) {
ooSendH245UserInputIndication_alphanumeric(
@@ -427,4 +427,3 @@ int ooReadAndProcessCallStackCommand(OOH323CallData* call)
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooCmdChannel.h b/addons/ooh323c/src/ooCmdChannel.h
index b0767acc7..6627c9b4c 100644
--- a/addons/ooh323c/src/ooCmdChannel.h
+++ b/addons/ooh323c/src/ooCmdChannel.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooCmdChannel.h
+ * @file ooCmdChannel.h
* This file contains stack commands which an user application can use to make
- * call, hang call etc.
+ * call, hang call etc.
*/
#ifndef OO_CMDCHANNEL_H
@@ -40,13 +40,13 @@ extern "C" {
#define OO_DEFAULT_CMDLISTENER_PORT 7575
/**
- * @addtogroup channels
+ * @addtogroup channels
* @{
*/
/**
- * This function is used to setup a command connection with the main stack
- * thread. The application commands are sent over this connection to stack
+ * This function is used to setup a command connection with the main stack
+ * thread. The application commands are sent over this connection to stack
* thread.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -55,7 +55,7 @@ EXTERN int ooCreateCmdConnection(void);
EXTERN int ooCreateCallCmdConnection(OOH323CallData*);
/**
- * This function is used to close a command channel setup with the stack
+ * This function is used to close a command channel setup with the stack
* thread.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -65,7 +65,7 @@ EXTERN int ooCloseCallCmdConnection(OOH323CallData*);
/**
- * This function is used by stack api to write stack commands to command
+ * This function is used by stack api to write stack commands to command
* channel.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -74,7 +74,7 @@ EXTERN int ooWriteStackCommand(OOStackCommand *cmd);
EXTERN int ooWriteCallStackCommand(OOH323CallData* call, OOStackCommand *cmd);
/**
- * This function is used by stack thread to read and process stack commands
+ * This function is used by stack thread to read and process stack commands
* received over command channel.
*
* @return OO_OK, on success; OO_FAILED, on failure
@@ -83,8 +83,8 @@ EXTERN int ooReadAndProcessStackCommand(void);
EXTERN int ooReadAndProcessCallStackCommand(OOH323CallData*);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/ooCommon.h b/addons/ooh323c/src/ooCommon.h
index 91df7428f..e0d0b4338 100644
--- a/addons/ooh323c/src/ooCommon.h
+++ b/addons/ooh323c/src/ooCommon.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file ooCommon.h
+/**
+ * @file ooCommon.h
* Common runtime constant and type definitions.
*/
#ifndef _OOCOMMON_H_
@@ -43,7 +43,7 @@
#endif
#include <semaphore.h>
-/**
+/**
* @ingroup cruntime C Runtime Common Constant and Type Definitions.
* @{
*/
@@ -119,7 +119,7 @@ typedef struct _OOMsgBuf {
#endif /* _DLL */
#endif /* EXTERN */
-/**
- * @}
+/**
+ * @}
*/
#endif /* _OOCOMMON_H_ */
diff --git a/addons/ooh323c/src/ooDateTime.c b/addons/ooh323c/src/ooDateTime.c
index 0d7ee6811..7795b291e 100644
--- a/addons/ooh323c/src/ooDateTime.c
+++ b/addons/ooh323c/src/ooDateTime.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -69,7 +69,7 @@ static uint64 calcEpocOffset() {
// Gets high resolution by spinning up to 15ms. Don't call this often!!!
static uint64 getRawCurMsSpin() {
- FILETIME tm;
+ FILETIME tm;
uint64 t_now;
static uint64 epocOffset = 0;
@@ -121,7 +121,7 @@ int gettimeofday(struct timeval* tv, void* null) {
baselineMs = getRawCurMsSpin();
tickBaseline = timeGetTime();
}
-
+
uint64 now_ms = (baselineMs + (curTicks - tickBaseline));
*tv = oo_ms_to_tv(now_ms);
return 0;
@@ -170,7 +170,6 @@ int ooGetTimeOfDay (struct timeval *tv, struct timezone *tz)
long ooGetTimeDiff(struct timeval *tv1, struct timeval *tv2)
{
- return ( ((tv2->tv_sec-tv1->tv_sec)*1000) +
+ return ( ((tv2->tv_sec-tv1->tv_sec)*1000) +
((tv2->tv_usec-tv1->tv_usec)/1000) );
}
-
diff --git a/addons/ooh323c/src/ooDateTime.h b/addons/ooh323c/src/ooDateTime.h
index b49c87230..9067d18c3 100644
--- a/addons/ooh323c/src/ooDateTime.h
+++ b/addons/ooh323c/src/ooDateTime.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file ooDateTime.h
+/**
+ * @file ooDateTime.h
* Time functions that reconcile differences between Windows and UNIX.
*/
#ifndef _OOTIME_H_
@@ -28,10 +28,10 @@ extern "C" {
#endif
/**
- * This function provides an abstraction for the UNIX 'gettimeofday'
+ * This function provides an abstraction for the UNIX 'gettimeofday'
* function which is not available on Windows.
*
- * @param tv Pointer to time value structure to receive
+ * @param tv Pointer to time value structure to receive
* current time value.
* @param tz Point to time zone information.
* @return Completion status of operation: 0 = success,
diff --git a/addons/ooh323c/src/ooGkClient.c b/addons/ooh323c/src/ooGkClient.c
index 1262f2914..a307f4eef 100644
--- a/addons/ooh323c/src/ooGkClient.c
+++ b/addons/ooh323c/src/ooGkClient.c
@@ -2,22 +2,22 @@
* Copyright (C) 2005 by Page Iberica, S.A.
* Copyright (C) 2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooGkClient.c
- * This file contains functions to support RAS protocol.
+ * @file ooGkClient.c
+ * This file contains functions to support RAS protocol.
*
*/
#include "asterisk.h"
@@ -60,7 +60,7 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
OOTRACEERR1("Error: Failed to allocate memory to Gatekeeper Client.\n");
return OO_FAILED;
}
-
+
memset(pGkClient, 0, sizeof(ooGkClient));
ast_mutex_init(&pGkClient->Lock);
gH323ep.gkClient = pGkClient;
@@ -98,14 +98,14 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
return OO_FAILED;
}
}
-#endif
+#endif
if(OO_OK != ooGkClientSetGkMode(pGkClient, eGkMode, szGkAddr, iGkPort))
{
OOTRACEERR1("Error:Failed to set Gk mode\n");
memReset(&gH323ep.ctxt);
return OO_FAILED;
}
-
+
/* Create default parameter set */
pGkClient->grqTimeout = DEFAULT_GRQ_TIMEOUT;
pGkClient->rrqTimeout = DEFAULT_RRQ_TIMEOUT;
@@ -123,11 +123,11 @@ int ooGkClientInit(enum RasGatekeeperMode eGkMode,
int ooGkClientSetCallbacks
(ooGkClient *pGkClient, OOGKCLIENTCALLBACKS callbacks)
{
- pGkClient->callbacks.onReceivedRegistrationConfirm =
+ pGkClient->callbacks.onReceivedRegistrationConfirm =
callbacks.onReceivedRegistrationConfirm;
- pGkClient->callbacks.onReceivedUnregistrationConfirm =
+ pGkClient->callbacks.onReceivedUnregistrationConfirm =
callbacks.onReceivedUnregistrationConfirm;
- pGkClient->callbacks.onReceivedUnregistrationRequest =
+ pGkClient->callbacks.onReceivedUnregistrationRequest =
callbacks.onReceivedUnregistrationRequest;
return OO_OK;
}
@@ -143,7 +143,7 @@ int ooGkClientReInit(ooGkClient *pGkClient)
pGkClient->rrqRetries = 0;
pGkClient->grqRetries = 0;
pGkClient->requestSeqNum = 0;
-
+
dListFreeAll(&pGkClient->ctxt, &pGkClient->callsPendingList);
dListFreeAll(&pGkClient->ctxt, &pGkClient->callsAdmittedList);
dListFreeAll(&pGkClient->ctxt, &pGkClient->timerList);
@@ -157,7 +157,7 @@ void ooGkClientPrintConfig(ooGkClient *pGkClient)
if(pGkClient->gkMode == RasUseSpecificGatekeeper)
{
OOTRACEINFO1("\tGatekeeper mode - UseSpecificGatekeeper\n");
- OOTRACEINFO3("\tGatekeeper To Use - %s:%d\n", pGkClient->gkRasIP,
+ OOTRACEINFO3("\tGatekeeper To Use - %s:%d\n", pGkClient->gkRasIP,
pGkClient->gkRasPort);
}
else if(pGkClient->gkMode == RasDiscoverGatekeeper) {
@@ -203,7 +203,7 @@ int ooGkClientStart(ooGkClient *pGkClient)
OOTRACEERR1("Error: GkClient Channel Creation failed\n");
return OO_FAILED;
}
-
+
ast_mutex_lock(&pGkClient->Lock);
pGkClient->discoveryComplete = FALSE;
iRet = ooGkClientSendGRQ(pGkClient);
@@ -217,9 +217,9 @@ int ooGkClientStart(ooGkClient *pGkClient)
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
-
-int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
+
+int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
char *szGkAddr, int iGkPort )
{
pGkClient->gkMode = eGkMode;
@@ -229,7 +229,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
if(szGkAddr)
{
if(strlen(szGkAddr)>MAX_IP_LEN)
- {
+ {
OOTRACEERR2("Error:Invalid IP address specified - %s\n", szGkAddr);
return OO_FAILED;
}
@@ -240,7 +240,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
else
pGkClient->gkRasPort = DEFAULT_GKPORT;
- OOTRACEINFO3("Gatekeeper IP:port set to - %s:%d\n",
+ OOTRACEINFO3("Gatekeeper IP:port set to - %s:%d\n",
szGkAddr, pGkClient->gkRasPort);
}
else if(eGkMode == RasDiscoverGatekeeper) {
@@ -253,7 +253,7 @@ int ooGkClientSetGkMode(ooGkClient *pGkClient, enum RasGatekeeperMode eGkMode,
return OO_OK;
}
-
+
/**
* Create the RAS channel (socket).
*
@@ -273,8 +273,8 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
if(pGkClient->localRASPort)
{
inet_pton(AF_INET, pGkClient->localRASIP, &ipaddrs);
- if( (ret=ooSocketBind( pGkClient->rasSocket, ipaddrs,
- pGkClient->localRASPort))!=ASN_OK )
+ if( (ret=ooSocketBind( pGkClient->rasSocket, ipaddrs,
+ pGkClient->localRASPort))!=ASN_OK )
{
OOTRACEERR1("ERROR:Failed to create RAS channel\n");
pGkClient->state = GkClientFailed;
@@ -297,7 +297,7 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
{
OOTRACEDBGA1("Determining ip address for RAS channel "
"multihomed mode. \n");
- ret = ooSocketGetIpAndPort(pGkClient->rasSocket, pGkClient->localRASIP,
+ ret = ooSocketGetIpAndPort(pGkClient->rasSocket, pGkClient->localRASIP,
20, &pGkClient->localRASPort, NULL);
if(ret != ASN_OK)
{
@@ -307,7 +307,7 @@ int ooGkClientCreateChannel(ooGkClient *pGkClient)
return OO_FAILED;
}
OOTRACEDBGA3("Using local ip %s and port %d for RAS channel"
- "(multihomedMode).\n", pGkClient->localRASIP,
+ "(multihomedMode).\n", pGkClient->localRASIP,
pGkClient->localRASPort);
}
/* End of Test code */
@@ -349,20 +349,20 @@ void ooGkClientFillVendor
if(gH323ep.productID)
{
pVendor->m.productIdPresent = TRUE;
- pVendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ pVendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(pVendor->productId.data));
- memcpy(pVendor->productId.data, gH323ep.productID,
+ memcpy(pVendor->productId.data, gH323ep.productID,
pVendor->productId.numocts);
}
if(gH323ep.versionID)
{
pVendor->m.versionIdPresent = 1;
- pVendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ pVendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(pVendor->versionId.data));
- memcpy(pVendor->versionId.data, gH323ep.versionID,
- pVendor->versionId.numocts);
+ memcpy(pVendor->versionId.data, gH323ep.versionID,
+ pVendor->versionId.numocts);
}
-}
+}
int ooGkClientReceive(ooGkClient *pGkClient)
@@ -374,7 +374,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
OOCTXT *pctxt=NULL;
H225RasMessage *pRasMsg=NULL;
int iRet=OO_OK;
-
+
ast_mutex_lock(&pGkClient->Lock);
pctxt = &pGkClient->msgCtxt;
@@ -387,7 +387,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
return OO_FAILED;
}
OOTRACEDBGA1("GkClient Received RAS Message\n");
-
+
/* Verify the gk */
if(pGkClient->discoveryComplete)
{
@@ -408,7 +408,7 @@ int ooGkClientReceive(ooGkClient *pGkClient)
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
+ }
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -460,40 +460,40 @@ int ooGkClientReceive(ooGkClient *pGkClient)
int ooGkClientHandleRASMessage(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
{
- int iRet = OO_OK;
+ int iRet = OO_OK;
switch( pRasMsg->t)
{
case T_H225RasMessage_gatekeeperConfirm:
OOTRACEINFO1("Gatekeeper Confirmed (GCF) message received.\n");
- iRet = ooGkClientHandleGatekeeperConfirm(pGkClient,
+ iRet = ooGkClientHandleGatekeeperConfirm(pGkClient,
pRasMsg->u.gatekeeperConfirm);
break;
- case T_H225RasMessage_gatekeeperReject:
+ case T_H225RasMessage_gatekeeperReject:
OOTRACEINFO1("Gatekeeper Reject (GRJ) message received\n");
- iRet = ooGkClientHandleGatekeeperReject(pGkClient,
+ iRet = ooGkClientHandleGatekeeperReject(pGkClient,
pRasMsg->u.gatekeeperReject);
break;
- case T_H225RasMessage_registrationConfirm:
+ case T_H225RasMessage_registrationConfirm:
OOTRACEINFO1("Registration Confirm (RCF) message received\n");
- iRet = ooGkClientHandleRegistrationConfirm(pGkClient,
+ iRet = ooGkClientHandleRegistrationConfirm(pGkClient,
pRasMsg->u.registrationConfirm );
break;
case T_H225RasMessage_registrationReject:
OOTRACEINFO1("Registration Reject (RRJ) message received.\n");
- iRet = ooGkClientHandleRegistrationReject(pGkClient,
+ iRet = ooGkClientHandleRegistrationReject(pGkClient,
pRasMsg->u.registrationReject);
break;
- case T_H225RasMessage_infoRequest:
+ case T_H225RasMessage_infoRequest:
//ooRasSendIRR( psRasMsg->sMessage.u.infoRequest->requestSeqNum );
break;
case T_H225RasMessage_admissionConfirm:
OOTRACEINFO1("Admission Confirm (ACF) message received\n");
- iRet = ooGkClientHandleAdmissionConfirm(pGkClient,
+ iRet = ooGkClientHandleAdmissionConfirm(pGkClient,
pRasMsg->u.admissionConfirm);
break;
case T_H225RasMessage_unregistrationRequest:
OOTRACEINFO1("UnRegistration Request (URQ) message received.\n");
- iRet = ooGkClientHandleUnregistrationRequest(pGkClient,
+ iRet = ooGkClientHandleUnregistrationRequest(pGkClient,
pRasMsg->u.unregistrationRequest);
break;
case T_H225RasMessage_unregistrationConfirm:
@@ -504,11 +504,11 @@ int ooGkClientHandleRASMessage(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
break;
case T_H225RasMessage_admissionReject:
OOTRACEINFO1("Admission Reject (ARJ) message received.\n");
- iRet = ooGkClientHandleAdmissionReject(pGkClient,
+ iRet = ooGkClientHandleAdmissionReject(pGkClient,
pRasMsg->u.admissionReject);
break;
case T_H225RasMessage_disengageConfirm:
- iRet = ooGkClientHandleDisengageConfirm(pGkClient,
+ iRet = ooGkClientHandleDisengageConfirm(pGkClient,
pRasMsg->u.disengageConfirm);
break;
case T_H225RasMessage_disengageReject:
@@ -542,7 +542,7 @@ void ooGkClientPrintMessage
{
OOCTXT ctxt;
H225RasMessage rasMsg;
- int ret;
+ int ret;
initContext(&ctxt);
setPERBuffer(&ctxt, msg, len, TRUE);
@@ -582,26 +582,26 @@ int ooGkClientSendMsg(ooGkClient *pGkClient, H225RasMessage *pRasMsg)
msgPtr = encodeGetMsgPtr( pctxt, &iLen );
/* If gatekeeper specified or have been discovered */
- if(pGkClient->gkMode == RasUseSpecificGatekeeper ||
+ if(pGkClient->gkMode == RasUseSpecificGatekeeper ||
pGkClient->discoveryComplete)
{
- if(ASN_OK != ooSocketSendTo( pGkClient->rasSocket, msgPtr, iLen,
+ if(ASN_OK != ooSocketSendTo( pGkClient->rasSocket, msgPtr, iLen,
pGkClient->gkRasIP, pGkClient->gkRasPort))
{
OOTRACEERR1("Error sending RAS message\n");
return OO_FAILED;
}
}
- else if(pGkClient->gkMode == RasDiscoverGatekeeper &&
- !pGkClient->discoveryComplete) {
- if(ASN_OK != ooSocketSendTo(pGkClient->rasSocket, msgPtr, iLen,
+ else if(pGkClient->gkMode == RasDiscoverGatekeeper &&
+ !pGkClient->discoveryComplete) {
+ if(ASN_OK != ooSocketSendTo(pGkClient->rasSocket, msgPtr, iLen,
MULTICAST_GKADDRESS, MULTICAST_GKPORT))
{
OOTRACEERR1("Error sending multicast RAS message\n" );
return OO_FAILED;
}
}
- else {/* should never go here */
+ else {/* should never go here */
OOTRACEERR1("Error: GkClient in invalid state.\n");
return OO_FAILED;
}
@@ -634,7 +634,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
return OO_FAILED;
}
- pGkReq = (H225GatekeeperRequest*)memAlloc(pctxt,
+ pGkReq = (H225GatekeeperRequest*)memAlloc(pctxt,
sizeof(H225GatekeeperRequest));
if(!pGkReq)
{
@@ -656,7 +656,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
pGkReq->protocolIdentifier = gProtocolID;
pGkReq->m.nonStandardDataPresent=0;
pGkReq->rasAddress.t=T_H225TransportAddress_ipAddress; /* IPv4 address */
- pRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pRasAddress)
{
@@ -668,7 +668,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
return OO_FAILED;
}
-
+
inet_pton(AF_INET, pGkClient->localRASIP, pRasAddress->ip.data);
pRasAddress->ip.numocts = 4;
@@ -688,7 +688,7 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
pGkReq->m.endpointAliasPresent=TRUE;
- if(OO_OK != ooPopulateAliasList(&pGkClient->msgCtxt, gH323ep.aliases,
+ if(OO_OK != ooPopulateAliasList(&pGkClient->msgCtxt, gH323ep.aliases,
&pGkReq->endpointAlias, 0))
{
OOTRACEERR1("Error Failed to fill alias information for GRQ message\n");
@@ -718,9 +718,9 @@ int ooGkClientSendGRQ(ooGkClient *pGkClient)
}
cbData->timerType = OO_GRQ_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
- cbData, FALSE))
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientGRQTimerExpired, pGkClient->grqTimeout,
+ cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
@@ -754,7 +754,7 @@ int ooGkClientHandleGatekeeperReject
break;
}
}
-
+
pGkClient->state = GkClientGkErr;
switch(pGatekeeperReject->rejectReason.t)
{
@@ -809,7 +809,7 @@ int ooGkClientHandleGatekeeperConfirm
return OO_OK;
}
- if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent)
+ if(pGatekeeperConfirm->m.gatekeeperIdentifierPresent)
{
pGkClient->gkId.nchars = pGatekeeperConfirm->gatekeeperIdentifier.nchars;
if (pGkClient->gkId.data) {
@@ -824,7 +824,7 @@ int ooGkClientHandleGatekeeperConfirm
return OO_FAILED;
}
- memcpy(pGkClient->gkId.data,
+ memcpy(pGkClient->gkId.data,
pGatekeeperConfirm->gatekeeperIdentifier.data,
sizeof(ASN116BITCHAR)* pGkClient->gkId.nchars);
}
@@ -833,7 +833,7 @@ int ooGkClientHandleGatekeeperConfirm
"message\n");
pGkClient->gkId.nchars = 0;
}
-
+
/* Extract Gatekeeper's RAS address */
if(pGatekeeperConfirm->rasAddress.t != T_H225TransportAddress_ipAddress)
{
@@ -845,10 +845,10 @@ int ooGkClientHandleGatekeeperConfirm
pRasAddress = pGatekeeperConfirm->rasAddress.u.ipAddress;
sprintf(pGkClient->gkRasIP, "%d.%d.%d.%d", pRasAddress->ip.data[0],
pRasAddress->ip.data[1],
- pRasAddress->ip.data[2],
+ pRasAddress->ip.data[2],
pRasAddress->ip.data[3]);
pGkClient->gkRasPort = pRasAddress->port;
-
+
pGkClient->discoveryComplete = TRUE;
pGkClient->state = GkClientDiscovered;
OOTRACEINFO1("Gatekeeper Confirmed\n");
@@ -905,7 +905,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
return OO_FAILED;
}
- pRegReq = (H225RegistrationRequest*)memAlloc(pctxt,
+ pRegReq = (H225RegistrationRequest*)memAlloc(pctxt,
sizeof(H225RegistrationRequest));
if(!pRegReq)
{
@@ -918,11 +918,11 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
memset(pRegReq, 0, sizeof(H225RegistrationRequest));
pRasMsg->t = T_H225RasMessage_registrationRequest;
pRasMsg->u.registrationRequest = pRegReq;
-
+
pRegReq->protocolIdentifier = gProtocolID;
pRegReq->m.nonStandardDataPresent=0;
/* Populate CallSignal Address List*/
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -940,15 +940,15 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = gH323ep.listenPort;
-
+
dListInit(&pRegReq->callSignalAddress);
- dListAppend(pctxt, &pRegReq->callSignalAddress,
+ dListAppend(pctxt, &pRegReq->callSignalAddress,
(void*)pTransportAddress);
/* Populate RAS Address List*/
pTransportAddress = NULL;
pIpAddress = NULL;
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -964,16 +964,16 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
pTransportAddress->t = T_H225TransportAddress_ipAddress;
pTransportAddress->u.ipAddress = pIpAddress;
-
+
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = pGkClient->localRASPort;
-
+
dListInit(&pRegReq->rasAddress);
- dListAppend(pctxt, &pRegReq->rasAddress,
+ dListAppend(pctxt, &pRegReq->rasAddress,
(void*)pTransportAddress);
-
+
/* Pose as gateway or terminal as per config */
if(gH323ep.isGateway)
pRegReq->terminalType.m.gatewayPresent = TRUE;
@@ -1005,23 +1005,23 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
pProtocol->t = T_H225SupportedProtocols_voice;
pProtocol->u.voice = pVoiceCaps;
-
+
dListInit(&pRegReq->terminalType.gateway.protocol);
- dListAppend(pctxt, &pRegReq->terminalType.gateway.protocol,
+ dListAppend(pctxt, &pRegReq->terminalType.gateway.protocol,
(void*)pProtocol);
}
pRegReq->m.terminalAliasPresent=TRUE;
- if(OO_OK != ooPopulateAliasList(pctxt, gH323ep.aliases,
+ if(OO_OK != ooPopulateAliasList(pctxt, gH323ep.aliases,
&pRegReq->terminalAlias, 0)) {
OOTRACEERR1("Error filling alias for RRQ\n");
- memReset(pctxt);
+ memReset(pctxt);
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
if (pGkClient->gkId.nchars) {
pRegReq->m.gatekeeperIdentifierPresent=TRUE;
pRegReq->gatekeeperIdentifier.nchars = pGkClient->gkId.nchars;
@@ -1036,19 +1036,19 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy(pRegReq->gatekeeperIdentifier.data, pGkClient->gkId.data,
+ memcpy(pRegReq->gatekeeperIdentifier.data, pGkClient->gkId.data,
pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
}
-
+
ooGkClientFillVendor(pGkClient, &pRegReq->endpointVendor);
-
+
pRegReq->m.willSupplyUUIEsPresent=TRUE;
pRegReq->willSupplyUUIEs=FALSE;
pRegReq->requestSeqNum = pGkClient->requestSeqNum++;
if(!pRegReq->requestSeqNum)
pRegReq->requestSeqNum = pGkClient->requestSeqNum++;
-
+
pRegReq->discoveryComplete= pGkClient->discoveryComplete;
pRegReq->m.keepAlivePresent=TRUE;
pRegReq->keepAlive= keepAlive;
@@ -1067,7 +1067,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
/* KeepAlive, re-registration message...
allocate storage for endpoint-identifier, and populate it from what the
GK told us from the previous RCF. Only allocate on the first pass thru here */
- pRegReq->endpointIdentifier.data =
+ pRegReq->endpointIdentifier.data =
(ASN116BITCHAR*)memAlloc(pctxt, pGkClient->endpointId.nchars*sizeof(ASN116BITCHAR));
if (pRegReq->endpointIdentifier.data) {
pRegReq->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
@@ -1109,9 +1109,9 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
}
cbData->timerType = OO_RRQ_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientRRQTimerExpired, pGkClient->rrqTimeout,
- cbData, FALSE))
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientRRQTimerExpired, pGkClient->rrqTimeout,
+ cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create GRQ timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
@@ -1119,7 +1119,7 @@ int ooGkClientSendRRQ(ooGkClient *pGkClient, ASN1BOOL keepAlive)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
@@ -1143,7 +1143,7 @@ int ooGkClientHandleRegistrationConfirm
/* Extract Endpoint Id */
if (pGkClient->endpointId.data)
memFreePtr(&pGkClient->ctxt, pGkClient->endpointId.data);
- pGkClient->endpointId.nchars =
+ pGkClient->endpointId.nchars =
pRegistrationConfirm->endpointIdentifier.nchars;
pGkClient->endpointId.data = (ASN116BITCHAR*)memAlloc(&pGkClient->ctxt,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -1153,13 +1153,13 @@ int ooGkClientHandleRegistrationConfirm
pGkClient->state = GkClientFailed;
return OO_FAILED;
}
-
- memcpy(pGkClient->endpointId.data,
+
+ memcpy(pGkClient->endpointId.data,
pRegistrationConfirm->endpointIdentifier.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
/* Extract GK Identifier */
-
+
if(pRegistrationConfirm->m.gatekeeperIdentifierPresent && pGkClient->gkId.nchars == 0)
{
pGkClient->gkId.nchars = pRegistrationConfirm->gatekeeperIdentifier.nchars;
@@ -1172,7 +1172,7 @@ int ooGkClientHandleRegistrationConfirm
return OO_FAILED;
}
- memcpy(pGkClient->gkId.data,
+ memcpy(pGkClient->gkId.data,
pRegistrationConfirm->gatekeeperIdentifier.data,
sizeof(ASN116BITCHAR)* pGkClient->gkId.nchars);
}
@@ -1185,23 +1185,23 @@ int ooGkClientHandleRegistrationConfirm
{
OOTRACEERR1("Error:Invalid Registration confirmed message\n");
OOTRACEINFO1("Ignoring RCF, will retransmit RRQ after timeout\n");
- return OO_FAILED;
+ return OO_FAILED;
}
pCallSigAddr = (H225TransportAddress*)pNode->data;
if(pCallSigAddr->t != T_H225TransportAddress_ipAddress)
continue;
- sprintf(pGkClient->gkCallSignallingIP, "%d.%d.%d.%d",
+ sprintf(pGkClient->gkCallSignallingIP, "%d.%d.%d.%d",
pCallSigAddr->u.ipAddress->ip.data[0],
pCallSigAddr->u.ipAddress->ip.data[1],
pCallSigAddr->u.ipAddress->ip.data[2],
pCallSigAddr->u.ipAddress->ip.data[3]);
pGkClient->gkCallSignallingPort = pCallSigAddr->u.ipAddress->port;
}
-
+
/* Update list of registered aliases*/
if(pRegistrationConfirm->m.terminalAliasPresent)
{
- ooGkClientUpdateRegisteredAliases(pGkClient,
+ ooGkClientUpdateRegisteredAliases(pGkClient,
&pRegistrationConfirm->terminalAlias, TRUE);
}
else{/* Everything registered*/
@@ -1234,16 +1234,16 @@ int ooGkClientHandleRegistrationConfirm
}
cbData->timerType = OO_REG_TIMER;
cbData->pGkClient = pGkClient;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientREGTimerExpired, regTTL,
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientREGTimerExpired, regTTL,
cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create REG timer.\n ");
memFreePtr(&pGkClient->ctxt, cbData);
pGkClient->state = GkClientFailed;
return OO_FAILED;
- }
-
+ }
+
}
else{
pGkClient->regTimeout = 0;
@@ -1252,7 +1252,7 @@ int ooGkClientHandleRegistrationConfirm
/* Extract Pre-Granted ARQ */
if(pRegistrationConfirm->m.preGrantedARQPresent)
{
- memcpy(&pGkClient->gkInfo.preGrantedARQ,
+ memcpy(&pGkClient->gkInfo.preGrantedARQ,
&pRegistrationConfirm->preGrantedARQ,
sizeof(H225RegistrationConfirm_preGrantedARQ));
}
@@ -1437,7 +1437,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
return OO_FAILED;
}
- pUnregReq = (H225UnregistrationRequest*)memAlloc(pctxt,
+ pUnregReq = (H225UnregistrationRequest*)memAlloc(pctxt,
sizeof(H225UnregistrationRequest));
if(!pUnregReq)
{
@@ -1455,10 +1455,10 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
if(!pUnregReq->requestSeqNum)
pUnregReq->requestSeqNum = pGkClient->requestSeqNum++;
-
+
/* Populate CallSignal Address List*/
- pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
+ pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
pIpAddress = (H225TransportAddress_ipAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
@@ -1476,9 +1476,9 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
inet_pton(AF_INET, pGkClient->localRASIP, pIpAddress->ip.data);
pIpAddress->ip.numocts = 4;
pIpAddress->port = gH323ep.listenPort;
-
+
dListInit(&pUnregReq->callSignalAddress);
- dListAppend(pctxt, &pUnregReq->callSignalAddress,
+ dListAppend(pctxt, &pUnregReq->callSignalAddress,
(void*)pTransportAddress);
/* Populate Endpoint Identifier */
@@ -1495,7 +1495,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pUnregReq->endpointIdentifier.data,
+ memcpy((void*)pUnregReq->endpointIdentifier.data,
(void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -1513,9 +1513,9 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pUnregReq->gatekeeperIdentifier.data,
- (void*)pGkClient->gkId.data,
- sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
+ memcpy((void*)pUnregReq->gatekeeperIdentifier.data,
+ (void*)pGkClient->gkId.data,
+ sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
}
/* Check whether specific aliases are to be unregistered*/
@@ -1525,7 +1525,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ooPopulateAliasList(pctxt, aliases, &pUnregReq->endpointAlias, 0);
}
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1540,7 +1540,7 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
-}
+}
@@ -1550,15 +1550,15 @@ int ooGkClientHandleUnregistrationRequest
int iRet=0, x;
OOTimer *pTimer = NULL;
DListNode *pNode = NULL;
-
+
/* Lets first send unregistration confirm message back to gatekeeper*/
- ooGkClientSendUnregistrationConfirm(pGkClient,
+ ooGkClientSendUnregistrationConfirm(pGkClient,
punregistrationRequest->requestSeqNum);
if(punregistrationRequest->m.endpointAliasPresent)
{
OOTRACEINFO1("Gatekeeper requested a list of aliases be unregistered\n");
- ooGkClientUpdateRegisteredAliases(pGkClient,
+ ooGkClientUpdateRegisteredAliases(pGkClient,
&punregistrationRequest->endpointAlias, FALSE);
}
else{
@@ -1590,7 +1590,7 @@ int ooGkClientHandleUnregistrationRequest
}
}
- iRet = ooGkClientSendRRQ(pGkClient, 0);
+ iRet = ooGkClientSendRRQ(pGkClient, 0);
if(iRet != OO_OK)
{
OOTRACEERR1("Error: Failed to send RRQ message\n");
@@ -1608,14 +1608,14 @@ int ooGkClientHandleUnregistrationRequest
int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient, unsigned reqNo)
{
int iRet = OO_OK;
- OOCTXT *pctxt = &pGkClient->msgCtxt;
+ OOCTXT *pctxt = &pGkClient->msgCtxt;
H225RasMessage *pRasMsg=NULL;
H225UnregistrationConfirm *pUCF=NULL;
ast_mutex_lock(&pGkClient->Lock);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
- pUCF = (H225UnregistrationConfirm*)memAlloc(pctxt,
+ pUCF = (H225UnregistrationConfirm*)memAlloc(pctxt,
sizeof(H225UnregistrationConfirm));
if(!pRasMsg || !pUCF)
{
@@ -1627,9 +1627,9 @@ int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient, unsigned reqNo)
pRasMsg->t = T_H225RasMessage_unregistrationConfirm;
pRasMsg->u.unregistrationConfirm = pUCF;
memset(pUCF, 0, sizeof(H225UnregistrationConfirm));
-
+
pUCF->requestSeqNum = reqNo;
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1666,8 +1666,8 @@ int ooGkClientSendAdmissionRequest
ast_mutex_lock(&pGkClient->Lock);
- OOTRACEDBGA3("Building Admission Request for call (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGA3("Building Admission Request for call (%s, %s)\n",
+ call->callType, call->callToken);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -1678,7 +1678,7 @@ int ooGkClientSendAdmissionRequest
return OO_FAILED;
}
pRasMsg->t = T_H225RasMessage_admissionRequest;
- pAdmReq = (H225AdmissionRequest*) memAlloc(pctxt,
+ pAdmReq = (H225AdmissionRequest*) memAlloc(pctxt,
sizeof(H225AdmissionRequest));
if(!pAdmReq)
{
@@ -1691,12 +1691,12 @@ int ooGkClientSendAdmissionRequest
}
memset(pAdmReq, 0, sizeof(H225AdmissionRequest));
pRasMsg->u.admissionRequest = pAdmReq;
-
+
/* Populate call signalling addresses */
- pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!ooUtilsIsStrEmpty(call->remoteIP))
- pIpAddressRemote = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressRemote = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pIpAddressLocal || (!ooUtilsIsStrEmpty(call->remoteIP) && (!pIpAddressRemote)))
@@ -1751,7 +1751,7 @@ int ooGkClientSendAdmissionRequest
/* Populate call type - For now only PointToPoint supported*/
pAdmReq->callType.t = T_H225CallType_pointToPoint;
-
+
/* Add call model to message*/
pAdmReq->m.callModelPresent = 1;
if(OO_TESTFLAG(call->flags, OO_M_GKROUTED))
@@ -1766,32 +1766,32 @@ int ooGkClientSendAdmissionRequest
if(!pAdmReq->endpointIdentifier.data)
{
OOTRACEERR3("Error:Memory - ooGkClientSendAdmissionRequest - "
- "endpointIdentifier.data(%s, %s)\n", call->callType,
+ "endpointIdentifier.data(%s, %s)\n", call->callType,
call->callToken);
memReset(pctxt);
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pAdmReq->endpointIdentifier.data,
+ memcpy((void*)pAdmReq->endpointIdentifier.data,
(void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
/* Get Destination And source aliases for call - */
if(!strcmp(call->callType, "incoming"))
{
- if(call->ourAliases)
+ if(call->ourAliases)
destAliases = call->ourAliases;
else
- destAliases = gH323ep.aliases;
+ destAliases = gH323ep.aliases;
srcAliases = call->remoteAliases;
}
else {
- if(call->ourAliases)
+ if(call->ourAliases)
srcAliases = call->ourAliases;
else
- srcAliases = gH323ep.aliases;
+ srcAliases = gH323ep.aliases;
destAliases = call->remoteAliases;
}
@@ -1826,12 +1826,12 @@ int ooGkClientSendAdmissionRequest
return OO_FAILED;
}
}
-
+
/* Populate bandwidth*/
pAdmReq->bandWidth = DEFAULT_BW_REQUEST;
/* Populate call Reference */
pAdmReq->callReferenceValue = call->callReference;
-
+
/* populate conferenceID */
memcpy((void*)&pAdmReq->conferenceID, (void*)&call->confIdentifier,
sizeof(H225ConferenceIdentifier));
@@ -1864,8 +1864,8 @@ int ooGkClientSendAdmissionRequest
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pAdmReq->gatekeeperIdentifier.data,
- (void*)pGkClient->gkId.data,
+ memcpy((void*)pAdmReq->gatekeeperIdentifier.data,
+ (void*)pGkClient->gkId.data,
sizeof(ASN116BITCHAR)*pGkClient->gkId.nchars);
}
@@ -1875,7 +1875,7 @@ int ooGkClientSendAdmissionRequest
/* Create RasCallAdmissionInfo */
if(!retransmit)
{
- pCallAdmInfo = (RasCallAdmissionInfo*)memAlloc(&pGkClient->ctxt,
+ pCallAdmInfo = (RasCallAdmissionInfo*)memAlloc(&pGkClient->ctxt,
sizeof(RasCallAdmissionInfo));
if(!pCallAdmInfo)
{
@@ -1885,7 +1885,7 @@ int ooGkClientSendAdmissionRequest
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
+ }
pCallAdmInfo->call = call;
pCallAdmInfo->retries = 0;
@@ -1904,7 +1904,7 @@ int ooGkClientSendAdmissionRequest
}
}
}
-
+
iRet = ooGkClientSendMsg(pGkClient, pRasMsg);
if(iRet != OO_OK)
{
@@ -1914,10 +1914,10 @@ int ooGkClientSendAdmissionRequest
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- OOTRACEINFO3("Admission Request message sent for (%s, %s)\n",
+ OOTRACEINFO3("Admission Request message sent for (%s, %s)\n",
call->callType, call->callToken);
memReset(pctxt);
-
+
/* Add ARQ timer */
cbData = (ooGkClientTimerCb*) memAlloc
(&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
@@ -1932,8 +1932,8 @@ int ooGkClientSendAdmissionRequest
cbData->timerType = OO_ARQ_TIMER;
cbData->pGkClient = pGkClient;
cbData->pAdmInfo = pCallAdmInfo;
- if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
- &ooGkClientARQTimerExpired, pGkClient->arqTimeout,
+ if(!ooTimerCreate(&pGkClient->ctxt, &pGkClient->timerList,
+ &ooGkClientARQTimerExpired, pGkClient->arqTimeout,
cbData, FALSE))
{
OOTRACEERR1("Error:Unable to create ARQ timer.\n ");
@@ -1941,8 +1941,8 @@ int ooGkClientSendAdmissionRequest
pGkClient->state = GkClientFailed;
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
- }
-
+ }
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
@@ -1970,14 +1970,14 @@ int ooGkClientHandleAdmissionConfirm
pCallAdmInfo = (RasCallAdmissionInfo*) pNode->data;
if(pCallAdmInfo->requestSeqNum == pAdmissionConfirm->requestSeqNum)
{
- OOTRACEDBGC3("Found Pending call(%s, %s)\n",
- pCallAdmInfo->call->callType,
+ OOTRACEDBGC3("Found Pending call(%s, %s)\n",
+ pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
ast_mutex_lock(&pCallAdmInfo->call->GkLock);
/* Populate Remote IP */
- if(pAdmissionConfirm->destCallSignalAddress.t !=
+ if(pAdmissionConfirm->destCallSignalAddress.t !=
T_H225TransportAddress_ipAddress)
{
OOTRACEERR1("Error:Destination Call Signal Address provided by"
@@ -1990,7 +1990,7 @@ int ooGkClientHandleAdmissionConfirm
return OO_FAILED;
}
ipAddress = pAdmissionConfirm->destCallSignalAddress.u.ipAddress;
-
+
sprintf(ip, "%d.%d.%d.%d", ipAddress->ip.data[0],
ipAddress->ip.data[1],
ipAddress->ip.data[2],
@@ -2012,13 +2012,13 @@ int ooGkClientHandleAdmissionConfirm
OO_CLRFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED);
}
}
-
+
if(pAdmissionConfirm->callModel.t == T_H225CallModel_gatekeeperRouted)
{
if(!OO_TESTFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED))
{
OOTRACEINFO3("Gatekeeper changed call model from direct to "
- "GkRouted. (%s, %s)\n",
+ "GkRouted. (%s, %s)\n",
pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
OO_SETFLAG(pCallAdmInfo->call->flags, OO_M_GKROUTED);
@@ -2032,25 +2032,25 @@ int ooGkClientHandleAdmissionConfirm
pTimer = (OOTimer*)pNode1->data;
if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_ARQ_TIMER)
{
- if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
+ if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
pCallAdmInfo)
{
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
- ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
pTimer);
OOTRACEDBGA1("Deleted ARQ Timer.\n");
break;
}
}
- }
- OOTRACEINFO3("Admission Confirm message received for (%s, %s)\n",
- pCallAdmInfo->call->callType,
+ }
+ OOTRACEINFO3("Admission Confirm message received for (%s, %s)\n",
+ pCallAdmInfo->call->callType,
pCallAdmInfo->call->callToken);
pCallAdmInfo->call->callState = OO_CALL_CONNECTING;
dListRemove(&pGkClient->callsPendingList, pNode);
- dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
+ dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
pNode->data);
memFreePtr(&pGkClient->ctxt, pNode);
ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
@@ -2095,7 +2095,7 @@ int ooGkClientHandleAdmissionReject
if(!pCallAdmInfo)
{
OOTRACEWARN2("Received admission reject with request number %d can not"
- " be matched with any pending call.\n",
+ " be matched with any pending call.\n",
pAdmissionReject->requestSeqNum);
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
@@ -2115,21 +2115,21 @@ int ooGkClientHandleAdmissionReject
pTimer = (OOTimer*)pNode1->data;
if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_ARQ_TIMER)
{
- if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
+ if(((ooGkClientTimerCb*)pTimer->cbData)->pAdmInfo ==
pCallAdmInfo)
{
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
- ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList,
pTimer);
OOTRACEDBGA1("Deleted ARQ Timer.\n");
break;
}
}
- }
+ }
OOTRACEINFO4("Admission Reject message received with reason code %d for "
"(%s, %s)\n", pAdmissionReject->rejectReason.t, call->callType,
call->callToken);
-
+
call->callState = OO_CALL_CLEARED;
switch(pAdmissionReject->rejectReason.t)
@@ -2174,7 +2174,7 @@ int ooGkClientHandleAdmissionReject
ast_mutex_unlock(&pCallAdmInfo->call->GkLock);
ast_mutex_unlock(&pGkClient->Lock);
ast_cond_signal(&pCallAdmInfo->call->gkWait);
- return OO_OK;
+ return OO_OK;
}
@@ -2194,8 +2194,8 @@ int ooGkClientSendIRR
ast_mutex_lock(&pGkClient->Lock);
- OOTRACEDBGA3("Building Info Request Resp for call (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGA3("Building Info Request Resp for call (%s, %s)\n",
+ call->callType, call->callToken);
pRasMsg = (H225RasMessage*)memAlloc(pctxt, sizeof(H225RasMessage));
if(!pRasMsg)
{
@@ -2206,7 +2206,7 @@ int ooGkClientSendIRR
return OO_FAILED;
}
pRasMsg->t = T_H225RasMessage_infoRequestResponse;
- pIRR = (H225InfoRequestResponse*) memAlloc(pctxt,
+ pIRR = (H225InfoRequestResponse*) memAlloc(pctxt,
sizeof(H225InfoRequestResponse));
if(!pIRR)
{
@@ -2219,9 +2219,9 @@ int ooGkClientSendIRR
}
memset(pIRR, 0, sizeof(H225InfoRequestResponse));
pRasMsg->u.infoRequestResponse = pIRR;
-
+
/* Populate call signalling addresses */
- pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpAddressLocal = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
pTransportAddress = (H225TransportAddress*) memAlloc(pctxt,
sizeof(H225TransportAddress));
@@ -2251,7 +2251,7 @@ int ooGkClientSendIRR
if(!pIRR->requestSeqNum)
pIRR->requestSeqNum = pGkClient->requestSeqNum++;
- pIpRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
+ pIpRasAddress = (H225TransportAddress_ipAddress*)memAlloc(pctxt,
sizeof(H225TransportAddress_ipAddress));
if(!pIpRasAddress)
{
@@ -2300,10 +2300,10 @@ int ooGkClientSendIRR
/* Populate call aliases */
- if(call->ourAliases)
+ if(call->ourAliases)
srcAliases = call->ourAliases;
else
- srcAliases = gH323ep.aliases;
+ srcAliases = gH323ep.aliases;
/* Populate Source Info */
if(srcAliases)
@@ -2326,12 +2326,12 @@ int ooGkClientSendIRR
pIRR->m.needResponsePresent = TRUE;
pIRR->unsolicited = TRUE;
pIRR->m.unsolicitedPresent = TRUE;
-
+
/* Populate perCallInfo */
pIRR->m.perCallInfoPresent = TRUE;
- perCallInfo =
+ perCallInfo =
(H225InfoRequestResponse_perCallInfo_element *)memAlloc(pctxt,
sizeof(H225InfoRequestResponse_perCallInfo_element));
memset(perCallInfo, 0, sizeof(H225InfoRequestResponse_perCallInfo_element));
@@ -2372,9 +2372,9 @@ int ooGkClientSendIRR
pRemoteAddr->port = call->remotePort;
perCallInfo->callSignaling.m.sendAddressPresent = TRUE;
- perCallInfo->callSignaling.sendAddress.t = T_H225TransportAddress_ipAddress;
+ perCallInfo->callSignaling.sendAddress.t = T_H225TransportAddress_ipAddress;
perCallInfo->callSignaling.m.recvAddressPresent = TRUE;
- perCallInfo->callSignaling.recvAddress.t = T_H225TransportAddress_ipAddress;
+ perCallInfo->callSignaling.recvAddress.t = T_H225TransportAddress_ipAddress;
if (!strcmp(call->callType, "incoming")) {
// terminator
@@ -2414,7 +2414,7 @@ int ooGkClientSendIRR
}
perCallInfo->usageInformation.m.endTimePresent = FALSE;
perCallInfo->m.usageInformationPresent = TRUE;
-
+
dListInit(&pIRR->perCallInfo);
dListAppend(pctxt, &pIRR->perCallInfo,
(void*)perCallInfo);
@@ -2428,25 +2428,25 @@ int ooGkClientSendIRR
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- OOTRACEINFO3("IRR message sent for (%s, %s)\n",
+ OOTRACEINFO3("IRR message sent for (%s, %s)\n",
call->callType, call->callToken);
memReset(pctxt);
-
+
ast_mutex_unlock(&pGkClient->Lock);
return OO_OK;
}
/**
- * This function is invoked to request call disengage to gatekeeper.
- *
- * @param szCallToken Call token.
+ * This function is invoked to request call disengage to gatekeeper.
+ *
+ * @param szCallToken Call token.
*
* @return Completion status - 0 on success, -1 on failure
*/
int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
{
- int iRet = 0;
+ int iRet = 0;
unsigned int x;
H225RasMessage *pRasMsg=NULL;
OOCTXT *pctxt = NULL;
@@ -2470,7 +2470,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
}
pRasMsg->t = T_H225RasMessage_disengageRequest;
- pDRQ = (H225DisengageRequest*) memAlloc(pctxt,
+ pDRQ = (H225DisengageRequest*) memAlloc(pctxt,
sizeof(H225DisengageRequest));
if(!pDRQ)
{
@@ -2483,12 +2483,12 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
memset(pDRQ, 0, sizeof(H225DisengageRequest));
pRasMsg->u.disengageRequest = pDRQ;
-
+
pDRQ->requestSeqNum = pGkClient->requestSeqNum++;
if(!pDRQ->requestSeqNum )
pDRQ->requestSeqNum = pGkClient->requestSeqNum++;
-
-
+
+
pDRQ->endpointIdentifier.nchars = pGkClient->endpointId.nchars;
pDRQ->endpointIdentifier.data = (ASN116BITCHAR*)memAlloc(pctxt,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
@@ -2501,15 +2501,15 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy((void*)pDRQ->endpointIdentifier.data,
- (void*)pGkClient->endpointId.data,
+ memcpy((void*)pDRQ->endpointIdentifier.data,
+ (void*)pGkClient->endpointId.data,
sizeof(ASN116BITCHAR)*pGkClient->endpointId.nchars);
memcpy((void*)&pDRQ->conferenceID, (void*)&call->confIdentifier,
sizeof(H225ConferenceIdentifier));
pDRQ->callReferenceValue = call->callReference;
-
+
pDRQ->disengageReason.t = T_H225DisengageReason_normalDrop;
pDRQ->m.answeredCallPresent = 1;
@@ -2534,13 +2534,13 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- memcpy(pDRQ->gatekeeperIdentifier.data, pGkClient->gkId.data,
+ memcpy(pDRQ->gatekeeperIdentifier.data, pGkClient->gkId.data,
pGkClient->gkId.nchars*sizeof(ASN116BITCHAR));
}
pDRQ->m.terminationCausePresent = 1;
pDRQ->terminationCause.t = T_H225CallTerminationCause_releaseCompleteCauseIE;
- pDRQ->terminationCause.u.releaseCompleteCauseIE =
+ pDRQ->terminationCause.u.releaseCompleteCauseIE =
(H225CallTerminationCause_releaseCompleteCauseIE*)memAlloc(pctxt,
sizeof(H225CallTerminationCause_releaseCompleteCauseIE));
if(!pDRQ->terminationCause.u.releaseCompleteCauseIE)
@@ -2551,7 +2551,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
- pDRQ->terminationCause.u.releaseCompleteCauseIE->numocts =
+ pDRQ->terminationCause.u.releaseCompleteCauseIE->numocts =
strlen("Call Ended");
strcpy((char *)pDRQ->terminationCause.u.releaseCompleteCauseIE->data, "Call Ended");
@@ -2579,7 +2579,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
OOTRACEERR1("Error: Failed to send DRQ message\n");
pGkClient->state = GkClientGkErr;
}
-
+
/* Search call in admitted calls list */
@@ -2597,7 +2597,7 @@ int ooGkClientSendDisengageRequest(ooGkClient *pGkClient, OOH323CallData *call)
}
ast_mutex_unlock(&pGkClient->Lock);
return iRet;
-}
+}
int ooGkClientHandleDisengageConfirm
(ooGkClient *pGkClient, H225DisengageConfirm *pDCF)
@@ -2612,14 +2612,14 @@ int ooGkClientRRQTimerExpired(void*pdata)
ooGkClientTimerCb *cbData = (ooGkClientTimerCb*)pdata;
ooGkClient *pGkClient = cbData->pGkClient;
OOTRACEDBGA1("Gatekeeper client RRQ timer expired.\n");
-
+
if(pGkClient->rrqRetries < OO_MAX_RRQ_RETRIES)
{
- ret = ooGkClientSendRRQ(pGkClient, 0);
+ ret = ooGkClientSendRRQ(pGkClient, 0);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send RRQ message\n");
-
+
return OO_FAILED;
}
pGkClient->rrqRetries++;
@@ -2676,11 +2676,11 @@ int ooGkClientGRQTimerExpired(void* pdata)
OOTRACEDBGA1("Gatekeeper client GRQ timer expired.\n");
- memFreePtr(&pGkClient->ctxt, cbData);
+ memFreePtr(&pGkClient->ctxt, cbData);
if(pGkClient->grqRetries < OO_MAX_GRQ_RETRIES)
{
- ret = ooGkClientSendGRQ(pGkClient);
+ ret = ooGkClientSendGRQ(pGkClient);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send GRQ message\n");
@@ -2717,7 +2717,7 @@ int ooGkClientGRQTimerExpired(void* pdata)
ast_mutex_unlock(&pGkClient->Lock);
return OO_FAILED;
}
-
+
/* clear grq counter */
pGkClient->grqRetries = 0;
@@ -2725,15 +2725,15 @@ int ooGkClientGRQTimerExpired(void* pdata)
return OO_FAILED;
}
-
+
int ooGkClientREGTimerExpired(void *pdata)
{
int ret=0;
ooGkClientTimerCb *cbData = (ooGkClientTimerCb*)pdata;
ooGkClient *pGkClient = cbData->pGkClient;
OOTRACEDBGA1("Gatekeeper client additive registration timer expired\n");
- memFreePtr(&pGkClient->ctxt, cbData);
- ret = ooGkClientSendRRQ(pGkClient, TRUE);
+ memFreePtr(&pGkClient->ctxt, cbData);
+ ret = ooGkClientSendRRQ(pGkClient, TRUE);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send Additive RRQ message\n");
@@ -2751,14 +2751,14 @@ int ooGkClientARQTimerExpired(void* pdata)
RasCallAdmissionInfo *pAdmInfo = cbData->pAdmInfo;
OOTRACEDBGA1("Gatekeeper client ARQ timer expired.\n");
- memFreePtr(&pGkClient->ctxt, cbData);
+ memFreePtr(&pGkClient->ctxt, cbData);
if(!pAdmInfo)
return OO_OK;
if(pAdmInfo->retries < OO_MAX_ARQ_RETRIES)
{
- ret = ooGkClientSendAdmissionRequest(pGkClient, pAdmInfo->call, TRUE);
+ ret = ooGkClientSendAdmissionRequest(pGkClient, pAdmInfo->call, TRUE);
if(ret != OO_OK)
{
OOTRACEERR1("Error:Failed to send ARQ message\n");
@@ -2870,13 +2870,13 @@ int ooGkClientHandleClientOrGkFailure(ooGkClient *pGkClient)
* TODO: This fuction might not work properly in case of additive registrations
* For example we registrered 10 aliases and gatekeeper accepted 8 of them.
* Now we want to register another two new aliases(not out of those first 10).
- * Gk responds with RCF with empty terminalAlias field thus indicating both
+ * Gk responds with RCF with empty terminalAlias field thus indicating both
* the aliases were accepted. If this function is called, it will even mark
* the earlier two unregistered aliases as registered. We will have to
* maintain a separete list of aliases being sent in RRQ for this.
*/
int ooGkClientUpdateRegisteredAliases
- (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
+ (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
OOBOOL registered)
{
int i=0, j, k;
@@ -2891,7 +2891,7 @@ int ooGkClientUpdateRegisteredAliases
{
/* All aliases registered/unregistsred */
pAlias = gH323ep.aliases;
-
+
while(pAlias)
{
pAlias->registered = registered?TRUE:FALSE;
@@ -2914,7 +2914,7 @@ int ooGkClientUpdateRegisteredAliases
continue;
}
pAliasAddress = (H225AliasAddress*)pNode->data;
-
+
if(!pAliasAddress){
OOTRACEERR1("Error:Invalid alias list passed to "
"ooGkClientUpdateRegisteredAliases\n");
@@ -2924,8 +2924,8 @@ int ooGkClientUpdateRegisteredAliases
switch(pAliasAddress->t)
{
case T_H225AliasAddress_dialedDigits:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_dialedDigits,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_dialedDigits,
(char*)pAliasAddress->u.dialedDigits);
if(pAlias)
{
@@ -2944,8 +2944,8 @@ int ooGkClientUpdateRegisteredAliases
}
}
value[k] = '\0';
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_h323_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_h323_ID,
value);
if(pAlias)
{
@@ -2956,8 +2956,8 @@ int ooGkClientUpdateRegisteredAliases
}
break;
case T_H225AliasAddress_url_ID:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_url_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_url_ID,
(char*)pAliasAddress->u.url_ID);
if(pAlias)
{
@@ -2974,16 +2974,16 @@ int ooGkClientUpdateRegisteredAliases
OOTRACEERR1("Error:Alias transportID not IP address\n");
break;
}
-
- sprintf(value, "%d.%d.%d.%d:%d",
+
+ sprintf(value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
pTransportAddrss->u.ipAddress->ip.data[3],
pTransportAddrss->u.ipAddress->port);
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_transportID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_transportID,
value);
if(pAlias)
{
@@ -2994,8 +2994,8 @@ int ooGkClientUpdateRegisteredAliases
}
break;
case T_H225AliasAddress_email_ID:
- pAlias = ooH323GetAliasFromList(gH323ep.aliases,
- T_H225AliasAddress_email_ID,
+ pAlias = ooH323GetAliasFromList(gH323ep.aliases,
+ T_H225AliasAddress_email_ID,
(char*) pAliasAddress->u.email_ID);
if(pAlias)
{
@@ -3011,7 +3011,7 @@ int ooGkClientUpdateRegisteredAliases
}
if(bAdd)
{
- pAlias = ooH323AddAliasToList(&gH323ep.aliases,
+ pAlias = ooH323AddAliasToList(&gH323ep.aliases,
&gH323ep.ctxt, pAliasAddress);
if(pAlias){
pAlias->registered = registered?TRUE:FALSE;
diff --git a/addons/ooh323c/src/ooGkClient.h b/addons/ooh323c/src/ooGkClient.h
index 59230e953..017380b5f 100644
--- a/addons/ooh323c/src/ooGkClient.h
+++ b/addons/ooh323c/src/ooGkClient.h
@@ -2,22 +2,22 @@
* Copyright (C) 2005 by Page Iberica, S.A.
* Copyright (C) 2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooGkClient.h
- * This file contains functions to support RAS protocol.
+ * @file ooGkClient.h
+ * This file contains functions to support RAS protocol.
*
*
*/
@@ -73,7 +73,7 @@ extern "C" {
#define OO_ARQ_TIMER (1<<3)
#define OO_DRQ_TIMER (1<<4)
-/**
+/**
* @defgroup gkclient Gatekeeper client
* @{
*/
@@ -111,7 +111,7 @@ enum OOGkClientState {
GkClientFailed,
GkClientStopped
};
-
+
typedef struct RasGatekeeperInfo
{
@@ -136,9 +136,9 @@ struct OOAliases;
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when registration confirm
+ * This is a callback function which is triggered when registration confirm
* message is received from the gatekeeper. The first parameter is the message
- * received. The second parameter provides updated list of aliases after the
+ * received. The second parameter provides updated list of aliases after the
* message was processed by the stack.
* @param rcf Handle to the received registration confirm message
*/
@@ -148,9 +148,9 @@ typedef int (*cb_OnReceivedRegistrationConfirm)
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when unregistration confirm
+ * This is a callback function which is triggered when unregistration confirm
* message is received. The first parameter is the message received. The second
- * parameter provides updated list of aliases after the message was processed
+ * parameter provides updated list of aliases after the message was processed
* by the stack.
*/
typedef int (*cb_OnReceivedUnregistrationConfirm)
@@ -158,7 +158,7 @@ typedef int (*cb_OnReceivedUnregistrationConfirm)
/**
* NOTE- This functionality is not yet fully completed.
- * This is a callback function which is triggered when unregistration request
+ * This is a callback function which is triggered when unregistration request
* message is received. The first parameter is the message received. The second
* parameter provides the list of aliases requested to be unregistered.
*/
@@ -220,20 +220,20 @@ struct OOH323CallData;
* @param iGkPort Gk port.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- *
+ *
*/
EXTERN int ooGkClientInit
(enum RasGatekeeperMode eGkMode, char *szGkAddr, int iGkPort );
/**
- * This function is used to print the gatekeeper client configuration
+ * This function is used to print the gatekeeper client configuration
* information to log.
* @param pGkClient Handle to gatekeeper client.
*/
EXTERN void ooGkClientPrintConfig(ooGkClient *pGkClient);
/**
- * This function is used to destroy Gatekeeper client. It releases all the
+ * This function is used to destroy Gatekeeper client. It releases all the
* associated memory.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -243,17 +243,17 @@ EXTERN int ooGkClientDestroy(void);
/**
* This function is used to start the Gatekeeper client functionality.
* @param pGkClient Pointer to the Gatekeeper Client.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooGkClientStart(ooGkClient *pGkClient);
/**
- * This function is invoked to set a gatekeeper mode.
- * @param pGkClient Handle to gatekeeper client.
- * @param eGkMode Gatekeeper mode selected. One of the following:
- * - RasNoGatekeeper (DEFAULT), No Gatekeeper.
- * - RasDiscoverGatekeeper, to discover a gatekeeper
+ * This function is invoked to set a gatekeeper mode.
+ * @param pGkClient Handle to gatekeeper client.
+ * @param eGkMode Gatekeeper mode selected. One of the following:
+ * - RasNoGatekeeper (DEFAULT), No Gatekeeper.
+ * - RasDiscoverGatekeeper, to discover a gatekeeper
* automatically.
* - RasUseSpecificGatekeeper, to use a specific gatekeeper.
* @param szGkAddr Gatekeeper address (only when using specific gatekeeper).
@@ -261,8 +261,8 @@ EXTERN int ooGkClientStart(ooGkClient *pGkClient);
*
* @return Completion status - OO_OK on success, OO_FAILED on failure
*/
-EXTERN int ooGkClientSetGkMode(ooGkClient *pGkClient,
- enum RasGatekeeperMode eGkMode, char *szGkAddr,
+EXTERN int ooGkClientSetGkMode(ooGkClient *pGkClient,
+ enum RasGatekeeperMode eGkMode, char *szGkAddr,
int iGkPort );
/**
@@ -288,7 +288,7 @@ EXTERN int ooGkClientCloseChannel(ooGkClient *pGkClient);
* identifier.
* @param pGkClient Pointer to gatekeeper client.
* @param psVendor Pointer to vendor identifier to be filled.
- *
+ *
*/
EXTERN void ooGkClientRasFillVendor
(ooGkClient *pGkClient, H225VendorIdentifier *psVendor);
@@ -299,14 +299,14 @@ EXTERN void ooGkClientRasFillVendor
* @param pGkClient Handle to Gatekeeper client for which message has to be
* received.
*
- * @return Completion status - OO_OK on success, OO_FAILED on
+ * @return Completion status - OO_OK on success, OO_FAILED on
* failure
*/
EXTERN int ooGkClientReceive(ooGkClient *pGkClient);
/**
- * This function is used to handle a received RAS message by a gatekeeper
+ * This function is used to handle a received RAS message by a gatekeeper
* client.
* @param pGkClient Handle to gatekeeper client.
* @param pRasMsg Handle to received Ras message.
@@ -322,14 +322,14 @@ EXTERN int ooGkClientHandleRASMessage
* @param pGkClient Handle to the gatekeeper client.
* @param pRasMsg Handle to Ras message to be sent.
*
- * @return OO_OK, on success. OO_FAILED, otherwise.
+ * @return OO_OK, on success. OO_FAILED, otherwise.
*/
EXTERN int ooGkClientSendMsg(ooGkClient *pGkClient, H225RasMessage *pRasMsg);
/**
* This function is used to send Gatekeeper request message.
- * @param pGkClient Handle to gatekeeper client for which GRQ message has to
+ * @param pGkClient Handle to gatekeeper client for which GRQ message has to
* be sent.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -360,9 +360,9 @@ EXTERN int ooGkClientHandleGatekeeperConfirm
/**
* This function is used to send Registration request message.
- * @param pGkClient Handle to gatekeeper client for which RRQ message has to
+ * @param pGkClient Handle to gatekeeper client for which RRQ message has to
* be sent.
- * @param keepAlive Indicates whether keepalive lightweight registration has
+ * @param keepAlive Indicates whether keepalive lightweight registration has
* to be sent.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -392,9 +392,9 @@ EXTERN int ooGkClientHandleRegistrationReject
/**
* This function is used to send UnRegistration request message.
- * @param pGkClient Handle to gatekeeper client for which URQ message has to
+ * @param pGkClient Handle to gatekeeper client for which URQ message has to
* be sent.
- * @param aliases List of aliases to be unregistered. NULL, if all the
+ * @param aliases List of aliases to be unregistered. NULL, if all the
* aliases have to be unregistered.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -413,21 +413,21 @@ EXTERN int ooGkClientHandleUnregistrationRequest
/**
- * This function is used to send an unregistration confirm message to
+ * This function is used to send an unregistration confirm message to
* gatekeeper.
* @param pGkClient Handle to gatekeeper client.
* @param reqNo Request Sequence number for the confirm message.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient,
+EXTERN int ooGkClientSendUnregistrationConfirm(ooGkClient *pGkClient,
unsigned reqNo);
/**
- * This function is invoked to request bandwith admission for a call.
+ * This function is invoked to request bandwith admission for a call.
* @param pGkClient Gatekeeper client to be used
* @param call Handle to the call.
- * @param retransmit Indicates whether new call or retransmitting for
+ * @param retransmit Indicates whether new call or retransmitting for
* existing call.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -447,8 +447,8 @@ EXTERN int ooGkClientHandleAdmissionConfirm
/**
- * This function is used to handle a received Admission Reject message. It
- * finds the associated call and marks it for cleaning with appropriate
+ * This function is used to handle a received Admission Reject message. It
+ * finds the associated call and marks it for cleaning with appropriate
* call end reason code.
* @param pGkClient Handle to Gatekeeper client.
* @param pAdmissionReject Handle to received admission reject message.
@@ -459,7 +459,7 @@ EXTERN int ooGkClientHandleAdmissionReject
(ooGkClient *pGkClient, H225AdmissionReject *pAdmissionReject);
/**
- * This function is invoked to request call disengage to gatekeeper.
+ * This function is invoked to request call disengage to gatekeeper.
* @param pGkClient Gatekeeper client to be used.
* @param call Call Handle
*
@@ -520,7 +520,7 @@ EXTERN int ooGkClientARQTimerExpired(void* pdata);
EXTERN int ooGkClientCleanCall(ooGkClient *pGkClient, struct OOH323CallData *call);
/**
- * This function is used to handle gatekeeper client failure or gatekeeper
+ * This function is used to handle gatekeeper client failure or gatekeeper
* failure which can be detected by unresponsiveness of gk.
* @param pGkClient Handle to gatekeeper client.
*
@@ -538,7 +538,7 @@ EXTERN int ooGkClientHandleClientOrGkFailure(ooGkClient *pGkClient);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooGkClientUpdateRegisteredAliases
- (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
+ (ooGkClient *pGkClient, H225_SeqOfH225AliasAddress *pAddresses,
OOBOOL registered);
/**
@@ -551,8 +551,8 @@ EXTERN int ooGkClientUpdateRegisteredAliases
*/
int ooGkClientSetCallbacks
(ooGkClient *pGkClient, OOGKCLIENTCALLBACKS callbacks);
-/**
- * @}
+/**
+ * @}
*/
int ooGkClientReInit(ooGkClient *pGkClient);
diff --git a/addons/ooh323c/src/ooLogChan.c b/addons/ooh323c/src/ooLogChan.c
index bafb315e6..05b152a86 100644
--- a/addons/ooh323c/src/ooLogChan.c
+++ b/addons/ooh323c/src/ooLogChan.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -23,8 +23,8 @@
/** Global endpoint structure */
extern OOH323EndPoint gH323ep;
-OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
- int sessionID, char *dir,
+OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
+ int sessionID, char *dir,
ooH323EpCapability *epCap)
{
OOLogicalChannel *pNewChannel=NULL, *pChannel=NULL;
@@ -32,7 +32,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
OOTRACEDBGC5("Adding new media channel for cap %d dir %s (%s, %s)\n",
epCap->cap, dir, call->callType, call->callToken);
/* Create a new logical channel entry */
- pNewChannel = (OOLogicalChannel*)memAlloc(call->pctxt,
+ pNewChannel = (OOLogicalChannel*)memAlloc(call->pctxt,
sizeof(OOLogicalChannel));
if(!pNewChannel)
{
@@ -40,7 +40,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
"(%s, %s)\n", call->callType, call->callToken);
return NULL;
}
-
+
memset(pNewChannel, 0, sizeof(OOLogicalChannel));
pNewChannel->channelNo = channelNo;
pNewChannel->sessionID = sessionID;
@@ -51,12 +51,12 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->chanCap = epCap;
OOTRACEDBGC4("Adding new channel with cap %d (%s, %s)\n", epCap->cap,
- call->callType, call->callToken);
- /* As per standards, media control port should be same for all
+ call->callType, call->callToken);
+ /* As per standards, media control port should be same for all
proposed channels with same session ID. However, most applications
use same media port for transmit and receive of audio streams. Infact,
- testing of OpenH323 based asterisk assumed that same ports are used.
- Hence we first search for existing media ports for same session and use
+ testing of OpenH323 based asterisk assumed that same ports are used.
+ Hence we first search for existing media ports for same session and use
them. This should take care of all cases.
*/
if(call->mediaInfo)
@@ -72,7 +72,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pMediaInfo = pMediaInfo->next;
}
}
-
+
if(pMediaInfo)
{
OOTRACEDBGC3("Using configured media info (%s, %s)\n", call->callType,
@@ -80,7 +80,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->localRtpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirPort : pMediaInfo->lMediaPort;
/* check MediaRedirPort here because RedirCPort is ReditPort + 1 and can't be 0 ;) */
pNewChannel->localRtcpPort = pMediaInfo->lMediaRedirPort ? pMediaInfo->lMediaRedirCPort : pMediaInfo->lMediaCntrlPort;
- /* If user application has not specified a specific ip and is using
+ /* If user application has not specified a specific ip and is using
multihomed mode, substitute appropriate ip.
*/
if(!strcmp(pMediaInfo->lMediaIP, "0.0.0.0") || !strcmp(pMediaInfo->lMediaIP, "::"))
@@ -102,7 +102,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
pNewChannel->localRtcpPort = ooGetNextPort (OORTP);
strcpy(pNewChannel->localIP, call->localIP);
}
-
+
/* Add new channel to the list */
pNewChannel->next = NULL;
if(!call->logicalChans) {
@@ -113,7 +113,7 @@ OOLogicalChannel* ooAddNewLogicalChannel(OOH323CallData *call, int channelNo,
while(pChannel->next) pChannel = pChannel->next;
pChannel->next = pNewChannel;
}
-
+
/* increment logical channels */
call->noOfLogicalChannels++;
OOTRACEINFO3("Created new logical channel entry (%s, %s)\n", call->callType,
@@ -144,22 +144,22 @@ OOLogicalChannel* ooFindLogicalChannelByLogicalChannelNo(OOH323CallData *call,
return pLogicalChannel;
}
-OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
+OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
H245OpenLogicalChannel *olc)
{
H245DataType * psDataType=NULL;
H245H2250LogicalChannelParameters * pslcp=NULL;
- OOTRACEDBGC4("ooFindLogicalChannel by olc %d (%s, %s)\n",
+ OOTRACEDBGC4("ooFindLogicalChannel by olc %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
if(olc->m.reverseLogicalChannelParametersPresent)
{
- OOTRACEDBGC3("Finding receive channel (%s,%s)\n", call->callType,
+ OOTRACEDBGC3("Finding receive channel (%s,%s)\n", call->callType,
call->callToken);
psDataType = &olc->reverseLogicalChannelParameters.dataType;
/* Only H2250LogicalChannelParameters are supported */
if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters){
- OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
+ OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
return NULL;
}
@@ -168,14 +168,14 @@ OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
return ooFindLogicalChannel(call, pslcp->sessionID, "receive", psDataType);
}
else{
- OOTRACEDBGC3("Finding transmit channel (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Finding transmit channel (%s, %s)\n", call->callType,
call->callToken);
psDataType = &olc->forwardLogicalChannelParameters.dataType;
/* Only H2250LogicalChannelParameters are supported */
- if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
- OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
+ OOTRACEERR4("Error:Invalid olc %d received (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType, call->callToken);
return NULL;
}
@@ -184,7 +184,7 @@ OOLogicalChannel * ooFindLogicalChannelByOLC(OOH323CallData *call,
}
}
-OOLogicalChannel * ooFindLogicalChannel(OOH323CallData *call, int sessionID,
+OOLogicalChannel * ooFindLogicalChannel(OOH323CallData *call, int sessionID,
char *dir, H245DataType * dataType)
{
OOLogicalChannel * pChannel = NULL;
@@ -246,7 +246,7 @@ OOLogicalChannel* ooGetTransmitLogicalChannel
while(pChannel)
{
OOTRACEINFO6("Listing logical channel %d cap %d state %d for (%s, %s)\n",
- pChannel->channelNo, pChannel->chanCap->cap, pChannel->state,
+ pChannel->channelNo, pChannel->chanCap->cap, pChannel->state,
call->callType, call->callToken);
if(!strcmp(pChannel->dir, "transmit") && pChannel->state != OO_LOGICALCHAN_IDLE &&
pChannel->state != OO_LOGICALCHAN_PROPOSEDFS)
@@ -283,14 +283,14 @@ int ooClearAllLogicalChannels(OOH323CallData *call)
OOTRACEINFO3("Clearing all logical channels (%s, %s)\n", call->callType,
call->callToken);
-
+
temp = call->logicalChans;
while(temp)
{
prev = temp;
temp = temp->next;
- ooClearLogicalChannel(call, prev->channelNo);/* TODO: efficiency - This causes re-search
- of of logical channel in the list. Can be
+ ooClearLogicalChannel(call, prev->channelNo);/* TODO: efficiency - This causes re-search
+ of logical channel in the list. Can be
easily improved.*/
}
call->logicalChans = NULL;
@@ -321,7 +321,7 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
if(epCap->stopReceiveChannel)
{
epCap->stopReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO4("Stopped Receive channel %d (%s, %s)\n",
+ OOTRACEINFO4("Stopped Receive channel %d (%s, %s)\n",
channelNo, call->callType, call->callToken);
}
else{
@@ -336,12 +336,12 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
if(epCap->stopTransmitChannel)
{
epCap->stopTransmitChannel(call, pLogicalChannel);
- OOTRACEINFO4("Stopped Transmit channel %d (%s, %s)\n",
+ OOTRACEINFO4("Stopped Transmit channel %d (%s, %s)\n",
channelNo, call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered for stopTransmitChannel"
- " %d (%s, %s)\n", channelNo, call->callType,
+ " %d (%s, %s)\n", channelNo, call->callType,
call->callToken);
}
}
@@ -355,11 +355,11 @@ int ooClearLogicalChannel(OOH323CallData *call, int channelNo)
int ooRemoveLogicalChannel(OOH323CallData *call, int ChannelNo)
{
- OOLogicalChannel * temp = NULL, *prev=NULL;
+ OOLogicalChannel * temp = NULL, *prev=NULL;
if(!call->logicalChans)
{
OOTRACEERR4("ERROR:Remove Logical Channel - Channel %d not found "
- "Empty channel List(%s, %s)\n", ChannelNo, call->callType,
+ "Empty channel List(%s, %s)\n", ChannelNo, call->callType,
call->callToken);
return OO_FAILED;
}
@@ -381,23 +381,23 @@ int ooRemoveLogicalChannel(OOH323CallData *call, int ChannelNo)
prev = temp;
temp = temp->next;
}
-
+
OOTRACEERR4("ERROR:Remove Logical Channel - Channel %d not found "
"(%s, %s)\n", ChannelNo, call->callType, call->callToken);
return OO_FAILED;
}
-/*
-Change the state of the channel as established and close all other
-channels with same session IDs. This is useful for handling fastStart,
+/*
+Change the state of the channel as established and close all other
+channels with same session IDs. This is useful for handling fastStart,
as the endpoint can open multiple logical channels for same sessionID.
-Once the remote endpoint confirms it's selection, all other channels for
+Once the remote endpoint confirms it's selection, all other channels for
the same sessionID must be closed.
*/
int ooOnLogicalChannelEstablished
(OOH323CallData *call, OOLogicalChannel * pChannel)
{
- OOLogicalChannel * temp = NULL, *prev=NULL;
+ OOLogicalChannel * temp = NULL, *prev=NULL;
OOTRACEDBGC3("In ooOnLogicalChannelEstablished (%s, %s)\n",
call->callType, call->callToken);
pChannel->state = OO_LOGICALCHAN_ESTABLISHED;
@@ -417,4 +417,3 @@ int ooOnLogicalChannelEstablished
}
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooLogChan.h b/addons/ooh323c/src/ooLogChan.h
index c52e9a73d..cf9a05368 100644
--- a/addons/ooh323c/src/ooLogChan.h
+++ b/addons/ooh323c/src/ooLogChan.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooLogChan.h
+ * @file ooLogChan.h
* This file contains structures and functions for maintaining information
* on logical channels within the stack.
*/
@@ -34,13 +34,13 @@ extern "C" {
struct ooH323EpCapability;
struct OOH323CallData;
-/**
+/**
* Logical channel states.
*/
typedef enum {
- OO_LOGICAL_CHAN_UNKNOWN,
- OO_LOGICALCHAN_IDLE,
- OO_LOGICALCHAN_PROPOSED,
+ OO_LOGICAL_CHAN_UNKNOWN,
+ OO_LOGICALCHAN_IDLE,
+ OO_LOGICALCHAN_PROPOSED,
OO_LOGICALCHAN_ESTABLISHED,
OO_LOGICALCHAN_PROPOSEDFS,
OO_LOGICALCHAN_CLOSEPENDING
@@ -60,7 +60,7 @@ typedef struct OOLogicalChannel {
int localRtpPort;
int localRtcpPort;
char localIP[2+8*4+7];
- OOLogicalChannelState state;
+ OOLogicalChannelState state;
struct ooH323EpCapability *chanCap;
struct OOLogicalChannel *next;
} OOLogicalChannel;
@@ -70,7 +70,7 @@ typedef struct OOLogicalChannel {
/**
* This function is used to add a new logical channel entry into the list
* of currently active logical channels.
- * @param call Pointer to the call for which new logical channel
+ * @param call Pointer to the call for which new logical channel
* entry has to be created.
* @param channelNo Channel number for the new channel entry.
* @param sessionID Session identifier for the new channel.
@@ -80,26 +80,26 @@ typedef struct OOLogicalChannel {
* @return Pointer to logical channel, on success. NULL, on failure
*/
EXTERN ooLogicalChannel* ooAddNewLogicalChannel
- (struct OOH323CallData *call, int channelNo, int sessionID,
+ (struct OOH323CallData *call, int channelNo, int sessionID,
char *dir, ooH323EpCapability *epCap);
/**
- * This function is used to find a logical channel using the logical
+ * This function is used to find a logical channel using the logical
* channel number as a key.
- * @param call Pointer to the call for which logical channel is
+ * @param call Pointer to the call for which logical channel is
* required.
* @param channelNo Forward Logical Channel number for the logical channel
*
- * @return Pointer to the logical channel if found, NULL
- * otherwise.
+ * @return Pointer to the logical channel if found, NULL
+ * otherwise.
*/
EXTERN ooLogicalChannel* ooFindLogicalChannelByLogicalChannelNo
(struct OOH323CallData *call, int channelNo);
/**
- * This function is called when a new logical channel is established. It is
- * particularly useful in case of faststart. When the remote endpoint selects
- * one of the proposed alternatives, other channels for the same session type
+ * This function is called when a new logical channel is established. It is
+ * particularly useful in case of faststart. When the remote endpoint selects
+ * one of the proposed alternatives, other channels for the same session type
* need to be closed. This function is used for that.
*
* @param call Handle to the call which owns the logical channel.
@@ -110,24 +110,24 @@ EXTERN int ooOnLogicalChannelEstablished
(struct OOH323CallData *call, OOLogicalChannel * pChannel);
/**
- * This function is used to retrieve a logical channel with a particular
- * sessionID. Note that there can be two entries of logical channel, one in
- * each direction. This function will return the first channel which has the
+ * This function is used to retrieve a logical channel with a particular
+ * sessionID. Note that there can be two entries of logical channel, one in
+ * each direction. This function will return the first channel which has the
* same session ID.
* @param call Handle to the call which owns the channels to be searched.
* @param sessionID Session id of the session which is to be searched for.
* @param dir Direction of the channel.(transmit/receive)
*
- * @return Returns a pointer to the logical channel if found, NULL
+ * @return Returns a pointer to the logical channel if found, NULL
* otherwise.
*/
EXTERN ooLogicalChannel* ooGetLogicalChannel
(struct OOH323CallData *call, int sessionID, char *dir);
/**
- * This function is used to remove a logical channel from the list of
+ * This function is used to remove a logical channel from the list of
* channels within the call structure.
- * @param call Pointer to the call from which logical channel has
+ * @param call Pointer to the call from which logical channel has
* to be removed.
* @param ChannelNo Forward logical channel number of the channel to be
* removed.
@@ -137,7 +137,7 @@ EXTERN int ooRemoveLogicalChannel (struct OOH323CallData *call, int ChannelNo);
/**
* This function is used to cleanup a logical channel. It first stops media if
- * it is still active and then removes the channel from the list, freeing up
+ * it is still active and then removes the channel from the list, freeing up
* all the associated memory.
* @param call Handle to the call which owns the logical channel.
* @param channelNo Channel number identifying the channel.
@@ -147,7 +147,7 @@ EXTERN int ooRemoveLogicalChannel (struct OOH323CallData *call, int ChannelNo);
EXTERN int ooClearLogicalChannel (struct OOH323CallData *call, int channelNo);
/**
- * This function is used to cleanup all the logical channels associated with
+ * This function is used to cleanup all the logical channels associated with
* the call.
* @param call Handle to the call which owns the channels.
*
@@ -184,8 +184,8 @@ EXTERN OOLogicalChannel * ooFindLogicalChannel
EXTERN OOLogicalChannel* ooGetTransmitLogicalChannel(struct OOH323CallData *call);
EXTERN OOLogicalChannel* ooGetReceiveLogicalChannel(struct OOH323CallData *call);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
diff --git a/addons/ooh323c/src/ooSocket.c b/addons/ooh323c/src/ooSocket.c
index cbef6bea8..9a3420521 100644
--- a/addons/ooh323c/src/ooSocket.c
+++ b/addons/ooh323c/src/ooSocket.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -81,10 +81,10 @@ int ooSocketsInit ()
WSADATA wsaData;
int err;
- if (inited) return ASN_OK;
+ if (inited) return ASN_OK;
wVersionRequested = MAKEWORD( 1, 1 );
-
+
err = WSAStartup (wVersionRequested, &wsaData);
if ( err != 0 ) {
/* Tell the user that we could not find a usable */
@@ -102,58 +102,58 @@ int ooSocketsInit ()
// ws32 = LoadLibrary ("WSOCK32.DLL");
ws32 = LoadLibrary ("WS2_32.DLL");
if (ws32 == NULL) return ASN_E_NOTINIT;
-
+
wsaStartup = (LPFN_WSASTARTUP) GetProcAddress (ws32, "WSAStartup");
if (wsaStartup == NULL) return ASN_E_NOTINIT;
-
+
send = (LPFN_SEND) GetProcAddress (ws32, "send");
if (send == NULL) return ASN_E_NOTINIT;
-
+
socket = (LPFN_SOCKET) GetProcAddress (ws32, "socket");
if (socket == NULL) return ASN_E_NOTINIT;
-
+
setsockopt = (LPFN_SETSOCKOPT) GetProcAddress (ws32, "setsockopt");
if (setsockopt == NULL) return ASN_E_NOTINIT;
-
+
bind = (LPFN_BIND) GetProcAddress (ws32, "bind");
if (bind == NULL) return ASN_E_NOTINIT;
-
+
htonl = (LPFN_HTONL) GetProcAddress (ws32, "htonl");
if (htonl == NULL) return ASN_E_NOTINIT;
-
+
htons = (LPFN_HTONS) GetProcAddress (ws32, "htons");
if (htons == NULL) return ASN_E_NOTINIT;
-
+
connect = (LPFN_CONNECT) GetProcAddress (ws32, "connect");
if (connect == NULL) return ASN_E_NOTINIT;
-
+
listen = (LPFN_LISTEN) GetProcAddress (ws32, "listen");
if (listen == NULL) return ASN_E_NOTINIT;
-
+
accept = (LPFN_ACCEPT) GetProcAddress (ws32, "accept");
if (accept == NULL) return ASN_E_NOTINIT;
-
+
inet_addr = (LPFN_INET_ADDR) GetProcAddress (ws32, "inet_addr");
if (inet_addr == NULL) return ASN_E_NOTINIT;
-
+
ntohl = (LPFN_NTOHL) GetProcAddress (ws32, "ntohl");
if (ntohl == NULL) return ASN_E_NOTINIT;
-
+
ntohs = (LPFN_NTOHS) GetProcAddress (ws32, "ntohs");
if (ntohs == NULL) return ASN_E_NOTINIT;
-
+
recv = (LPFN_RECV) GetProcAddress (ws32, "recv");
if (recv == NULL) return ASN_E_NOTINIT;
-
+
shutdown = (LPFN_SHUTDOWN) GetProcAddress (ws32, "shutdown");
if (shutdown == NULL) return ASN_E_NOTINIT;
-
+
closesocket = (LPFN_CLOSESOCKET) GetProcAddress (ws32, "closesocket");
if (closesocket == NULL) return ASN_E_NOTINIT;
getsockname = (LPFN_GETSOCKNAME) GetProcAddress (ws32, "getsockname");
if (getsockname == NULL) return ASN_E_NOTINIT;
-
+
ioctlsocket = (LPFN_IOCTLSOCKET) GetProcAddress(ws32, "ioctlsocket");
if(ioctlsocket == NULL) return ASN_E_NOTINIT;
@@ -174,15 +174,15 @@ int ooSocketsInit ()
gethostbyname = (LPFN_GETHOSTBYNAME) GetProcAddress (ws32, "gethostbyname");
if (gethostbyname == NULL) return ASN_E_NOTINIT;
-
- WSAGetLastError = (LPFN_WSAGETLASTERROR) GetProcAddress (ws32,
+
+ WSAGetLastError = (LPFN_WSAGETLASTERROR) GetProcAddress (ws32,
"WSAGetLastError");
if (WSAGetLastError == NULL) return ASN_E_NOTINIT;
WSACleanup = (LPFN_WSACLEANUP) GetProcAddress (ws32, "WSACleanup");
if (WSACleanup == NULL) return ASN_E_NOTINIT;
-
-
+
+
if (wsaStartup (MAKEWORD(1, 1), &wsaData) == -1) return ASN_E_NOTINIT;
#endif
return ASN_OK;
@@ -195,7 +195,7 @@ typedef int OOSOCKLEN;
typedef socklen_t OOSOCKLEN;
#endif
-int ooSocketCreate (OOSOCKET* psocket, int family)
+int ooSocketCreate (OOSOCKET* psocket, int family)
{
int on;
OOSOCKET sock;
@@ -214,14 +214,14 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
SOCK_STREAM,
0);
}
-
+
if (sock == OOSOCKET_INVALID){
OOTRACEERR1("Error:Failed to create TCP socket\n");
return ASN_E_INVSOCKET;
}
on = 1;
- if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
(const char* ) &on, sizeof (on)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option SO_REUSEADDR\n");
@@ -229,7 +229,7 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
}
linger.l_onoff = 1;
linger.l_linger = 0;
- if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
+ if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
(const char* ) &linger, sizeof (linger)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option linger\n");
@@ -246,7 +246,7 @@ int ooSocketCreate (OOSOCKET* psocket, int family)
return ASN_OK;
}
-int ooSocketCreateUDP (OOSOCKET* psocket, int family)
+int ooSocketCreateUDP (OOSOCKET* psocket, int family)
{
int on;
OOSOCKET sock;
@@ -266,7 +266,7 @@ int ooSocketCreateUDP (OOSOCKET* psocket, int family)
}
on = 1;
- if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
+ if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR,
(const char* ) &on, sizeof (on)) == -1)
{
OOTRACEERR1("Error:Failed to set socket option SO_REUSEADDR\n");
@@ -276,7 +276,7 @@ int ooSocketCreateUDP (OOSOCKET* psocket, int family)
/*
linger.l_onoff = 1;
linger.l_linger = 0;
- if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
+ if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
(const char* ) &linger, sizeof (linger)) == -1)
return ASN_E_INVSOCKET;
*/
@@ -292,7 +292,7 @@ int ooSocketClose (OOSOCKET socket)
return ASN_OK;
}
-int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
+int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
{
struct ast_sockaddr m_addr;
@@ -300,7 +300,7 @@ int ooSocketBind (OOSOCKET socket, OOIPADDR addr, int port)
if (socket == OOSOCKET_INVALID)
- {
+ {
OOTRACEERR1("Error:Invalid socket passed to bind\n");
return ASN_E_INVSOCKET;
}
@@ -345,7 +345,7 @@ int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *fam
host = ast_sockaddr_stringify_addr(&addr);
if(host && strlen(host) < (unsigned)len)
- strcpy(ip, host);
+ strcpy(ip, host);
else{
OOTRACEERR1("Error:Insufficient buffer for ip address - "
"ooSocketGetIpAndPort\n");
@@ -363,7 +363,7 @@ int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, int *fam
return ASN_OK;
}
-int ooSocketListen (OOSOCKET socket, int maxConnection)
+int ooSocketListen (OOSOCKET socket, int maxConnection)
{
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
@@ -373,8 +373,8 @@ int ooSocketListen (OOSOCKET socket, int maxConnection)
return ASN_OK;
}
-int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
- char* destAddr, int* destPort)
+int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
+ char* destAddr, int* destPort)
{
struct ast_sockaddr addr;
char* host = NULL;
@@ -395,15 +395,15 @@ int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
return ASN_OK;
}
-int ooSocketConnect (OOSOCKET socket, const char* host, int port)
+int ooSocketConnect (OOSOCKET socket, const char* host, int port)
{
struct ast_sockaddr m_addr;
if (socket == OOSOCKET_INVALID)
- {
+ {
return ASN_E_INVSOCKET;
}
-
+
memset (&m_addr, 0, sizeof (m_addr));
ast_parse_arg(host, PARSE_ADDR, &m_addr);
ast_sockaddr_set_port(&m_addr, port);
@@ -416,13 +416,13 @@ int ooSocketConnect (OOSOCKET socket, const char* host, int port)
}
/*
// **Need to add check whether complete data was sent by checking the return
-// **value of send and if complete data is not sent then add mechanism to
+// **value of send and if complete data is not sent then add mechanism to
// **send remaining bytes. This will make ooSocketSend call atomic.
*/
int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata, ASN1UINT size)
{
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
-
+
if (send (socket, (const char*) pdata, size, SEND_FLAGS) == -1)
return ASN_E_INVSOCKET;
return ASN_OK;
@@ -433,14 +433,14 @@ int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata, ASN1UINT size,
{
struct sockaddr_in m_addr;
if (socket == OOSOCKET_INVALID) return ASN_E_INVSOCKET;
-
+
memset (&m_addr, 0, sizeof (m_addr));
m_addr.sin_family = AF_INET;
m_addr.sin_port = htons ((unsigned short)port);
m_addr.sin_addr.s_addr = inet_addr (host);
- if (sendto (socket, (const char*) pdata, size, SEND_FLAGS,
- (const struct sockaddr*)&m_addr,
+ if (sendto (socket, (const char*) pdata, size, SEND_FLAGS,
+ (const struct sockaddr*)&m_addr,
sizeof(m_addr)) == -1)
return ASN_E_INVSOCKET;
return ASN_OK;
@@ -478,8 +478,8 @@ int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf, ASN1UINT bufsize,
addrlen = sizeof(m_addr);
memset (&m_addr, 0, sizeof (m_addr));
-
- if ((len = recvfrom (socket, (char*) pbuf, bufsize, 0,
+
+ if ((len = recvfrom (socket, (char*) pbuf, bufsize, 0,
(struct sockaddr*)&m_addr, (socklen_t *) &addrlen)) == -1)
return ASN_E_INVSOCKET;
@@ -496,12 +496,12 @@ int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf, ASN1UINT bufsize,
return len;
}
-int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
+int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval * timeout)
{
- int ret;
+ int ret;
#if defined (_WIN32)
- ret = select(nfds, readfds, writefds, exceptfds,
+ ret = select(nfds, readfds, writefds, exceptfds,
(const struct timeval *) timeout);
#else
ret = select(nfds, readfds, writefds, exceptfds, timeout);
@@ -517,7 +517,7 @@ int ooSocketPoll(struct pollfd *pfds, int nfds, int timeout)
int ooPDRead(struct pollfd *pfds, int nfds, int fd)
{
int i;
- for (i=0;i<nfds;i++)
+ for (i=0;i<nfds;i++)
if (pfds[i].fd == fd && (pfds[i].revents & POLLIN))
return 1;
return 0;
@@ -548,8 +548,8 @@ int ooGetLocalIPAddress(char * pIPAddrs)
if (hp->h_addrtype == AF_INET6) {
struct in6_addr i;
memcpy(&i, hp->h_addr, sizeof(i));
- strcpy(pIPAddrs, (inet_ntop(AF_INET6, &i,
- hostname, sizeof(hostname))) == NULL ? "::1" :
+ strcpy(pIPAddrs, (inet_ntop(AF_INET6, &i,
+ hostname, sizeof(hostname))) == NULL ? "::1" :
inet_ntop(AF_INET6, &i, hostname, sizeof(hostname)));
} else {
struct in_addr i;
@@ -566,7 +566,7 @@ int ooGetLocalIPAddress(char * pIPAddrs)
return ASN_OK;
}
-/* int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr)
+/* int ooSocketStrToAddr (const char* pIPAddrStr, OOIPADDR* pIPAddr)
{
int b1, b2, b3, b4;
int rv = sscanf (pIPAddrStr, "%d.%d.%d.%d", &b1, &b2, &b3, &b4);
@@ -574,7 +574,7 @@ int ooGetLocalIPAddress(char * pIPAddrs)
(b1 < 0 || b1 > 256) || (b2 < 0 || b2 > 256) ||
(b3 < 0 || b3 > 256) || (b4 < 0 || b4 > 256))
return ASN_E_INVPARAM;
- *pIPAddr = ((b1 & 0xFF) << 24) | ((b2 & 0xFF) << 16) |
+ *pIPAddr = ((b1 & 0xFF) << 24) | ((b2 & 0xFF) << 16) |
((b3 & 0xFF) << 8) | (b4 & 0xFF);
return ASN_OK;
}
@@ -596,9 +596,9 @@ int ooSocketConvertIpToNwAddr(char *inetIp, unsigned char *netIp)
OOTRACEERR1("Error:Failed to convert address\n");
return -1;
}
-
+
#endif
-
+
memcpy(netIp, (char*)&sin.sin_addr.s_addr, sizeof(unsigned long));
return ASN_OK;
}
@@ -608,7 +608,7 @@ int ooSocketAddrToStr (OOIPADDR ipAddr, char* pbuf, int bufsize)
char buf1[5], buf2[5], buf3[5], buf4[5];
int cnt = 0;
- if (bufsize < 8)
+ if (bufsize < 8)
return ASN_E_BUFOVFLW;
cnt += sprintf (buf1, "%lu", (ipAddr >> 24) & 0xFF);
@@ -656,7 +656,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
if(ooSocketCreateUDP(&sock, 4)!= ASN_OK)
{
OOTRACEERR1("Error:Failed to create udp socket - "
- "ooSocketGetInterfaceList\n");
+ "ooSocketGetInterfaceList\n");
return -1;
}
#ifdef SIOCGIFNUM
@@ -668,7 +668,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
#else
ifNum = 50;
#endif
-
+
ifc.ifc_len = ifNum * sizeof(struct ifreq);
ifc.ifc_req = (struct ifreq *)memAlloc(pctxt, ifNum *sizeof(struct ifreq));
if(!ifc.ifc_req)
@@ -688,7 +688,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
#ifdef ifr_netmask
char mask[50];
#endif
-
+
pIf = (struct OOInterface*)memAlloc(pctxt, sizeof(struct OOInterface));
pName = (char*)memAlloc(pctxt, strlen(ifName->ifr_name)+1);
if(!pIf)
@@ -698,15 +698,15 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
return -1;
}
OOTRACEDBGA2("\tInterface name: %s\n", ifName->ifr_name);
-
-
+
+
strcpy(ifReq.ifr_name, ifName->ifr_name);
strcpy(pName, ifName->ifr_name);
pIf->name = pName;
/* Check whether the interface is up*/
if (ioctl(sock, SIOCGIFFLAGS, &ifReq) < 0) {
- OOTRACEERR2("Error:Unable to determine status of interface %s\n",
+ OOTRACEERR2("Error:Unable to determine status of interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf);
@@ -721,9 +721,9 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
}
/* Retrieve interface address */
- if (ioctl(sock, SIOCGIFADDR, &ifReq) < 0)
+ if (ioctl(sock, SIOCGIFADDR, &ifReq) < 0)
{
- OOTRACEWARN2("Warn:Unable to determine address of interface %s\n",
+ OOTRACEWARN2("Warn:Unable to determine address of interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf);
@@ -742,11 +742,11 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
return -1;
}
strcpy(pIf->addr, addr);
-
+
#ifdef ifr_netmask
- if (ioctl(sock, SIOCGIFNETMASK, &ifReq) < 0)
+ if (ioctl(sock, SIOCGIFNETMASK, &ifReq) < 0)
{
- OOTRACEWARN2("Warn:Unable to determine mask for interface %s\n",
+ OOTRACEWARN2("Warn:Unable to determine mask for interface %s\n",
pName);
memFreePtr(pctxt, pIf->name);
memFreePtr(pctxt, pIf->addr);
@@ -795,7 +795,7 @@ int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList)
*/
}
- }
+ }
return ASN_OK;
}
#endif
diff --git a/addons/ooh323c/src/ooSocket.h b/addons/ooh323c/src/ooSocket.h
index dca390ffa..b4cbf881b 100644
--- a/addons/ooh323c/src/ooSocket.h
+++ b/addons/ooh323c/src/ooSocket.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file ooSocket.h
+/**
+ * @file ooSocket.h
* Common runtime constants, data structure definitions, and run-time functions
* to support the sockets' operations.
*/
@@ -60,7 +60,7 @@ extern "C" {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup sockets Socket Layer
* @{
*/
@@ -75,7 +75,7 @@ typedef int OOSOCKET; /**< Socket's handle */
#define OOSOCKET_INVALID ((OOSOCKET)-1)
-/**
+/**
* The IP address represented as unsigned long value. The most significant 8
* bits in this unsigned long value represent the first number of the IP
* address. The least significant 8 bits represent the last number of the IP
@@ -115,7 +115,7 @@ typedef struct OOInterface{
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
+EXTERN int ooSocketAccept (OOSOCKET socket, OOSOCKET *pNewSocket,
char* destAddr, int* destPort);
/**
@@ -185,7 +185,7 @@ EXTERN int ooSocketConnect (OOSOCKET socket, const char* host, int port);
EXTERN int ooSocketCreate (OOSOCKET* psocket, int family);
/**
- * This function creates a UDP datagram socket.
+ * This function creates a UDP datagram socket.
*
* @param psocket The pointer to the socket's handle variable to receive
* the handle of new socket.
@@ -204,7 +204,7 @@ EXTERN int ooSocketCreateUDP (OOSOCKET* psocket, int family);
EXTERN int ooSocketsInit (void);
/**
- * This function terminates use of sockets by an application. This function
+ * This function terminates use of sockets by an application. This function
* must be called after done with sockets.
*
* @return Completion status of operation: 0 (ASN_OK) = success,
@@ -256,17 +256,17 @@ EXTERN int ooSocketRecvPeek
* @return If no error occurs, returns the number of bytes
* received. Otherwise, the negative value is error code.
*/
-EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
+EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
ASN1UINT bufsize);
/**
* This function receives data from a connected/unconnected socket. It is used
- * to read incoming data on sockets. It populates the remotehost and
- * remoteport parameters with information of remote host. See description of
+ * to read incoming data on sockets. It populates the remotehost and
+ * remoteport parameters with information of remote host. See description of
* 'recvfrom' socket function for further details.
*
* @param socket The socket's handle created by call to ooSocketCreate
- *
+ *
* @param pbuf Pointer to the buffer for the incoming data.
* @param bufsize Length of the buffer.
* @param remotehost Pointer to a buffer in which remote ip address
@@ -279,7 +279,7 @@ EXTERN int ooSocketRecv (OOSOCKET socket, ASN1OCTET* pbuf,
* received. Otherwise, negative value.
*/
EXTERN int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf,
- ASN1UINT bufsize, char * remotehost,
+ ASN1UINT bufsize, char * remotehost,
ASN1UINT hostBufLen, int * remoteport);
/**
* This function sends data on a connected socket. It is used to write outgoing
@@ -293,47 +293,47 @@ EXTERN int ooSocketRecvFrom (OOSOCKET socket, ASN1OCTET* pbuf,
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata,
+EXTERN int ooSocketSend (OOSOCKET socket, const ASN1OCTET* pdata,
ASN1UINT size);
/**
- * This function sends data on a connected or unconnected socket. See
+ * This function sends data on a connected or unconnected socket. See
* description of 'sendto' socket function for further details.
*
* @param socket The socket's handle created by call to ::rtSocketCreate
* or ::rtSocketAccept function.
* @param pdata Buffer containing the data to be transmitted.
* @param size Length of the data in pdata.
- * @param remotehost Remote host ip address to which data has to
+ * @param remotehost Remote host ip address to which data has to
* be sent.
- * @param remoteport Remote port ip address to which data has to
+ * @param remoteport Remote port ip address to which data has to
* be sent.
*
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata,
+EXTERN int ooSocketSendTo(OOSOCKET socket, const ASN1OCTET* pdata,
ASN1UINT size, const char* remotehost,
int remoteport);
/**
* This function is used for synchronous monitoring of multiple sockets.
- * For more information refer to documnetation of "select" system call.
+ * For more information refer to documnetation of "select" system call.
*
- * @param nfds The highest numbered descriptor to be monitored
+ * @param nfds The highest numbered descriptor to be monitored
* plus one.
- * @param readfds The descriptors listed in readfds will be watched for
+ * @param readfds The descriptors listed in readfds will be watched for
* whether read would block on them.
* @param writefds The descriptors listed in writefds will be watched for
* whether write would block on them.
* @param exceptfds The descriptors listed in exceptfds will be watched for
* exceptions.
- * @param timeout Upper bound on amout of time elapsed before select
- * returns.
+ * @param timeout Upper bound on amout of time elapsed before select
+ * returns.
* @return Completion status of operation: 0 (ASN_OK) = success,
* negative return value is error.
*/
-EXTERN int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
+EXTERN int ooSocketSelect(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval * timeout) attribute_deprecated;
EXTERN int ooSocketPoll(struct pollfd *pfds, int nfds, int timeout);
@@ -379,7 +379,7 @@ EXTERN int ooPDWrite(struct pollfd *pfds, int nfds, int fd);
EXTERN int ooGetLocalIPAddress(char * pIPAddrs);
-EXTERN int ooSocketGetSockName(OOSOCKET socket, struct sockaddr_in *name,
+EXTERN int ooSocketGetSockName(OOSOCKET socket, struct sockaddr_in *name,
socklen_t *size);
@@ -389,7 +389,7 @@ EXTERN short ooSocketHTONS(short val);
/**
* This function is used to retrieve the ip and port number used by the socket
- * passed as parameter. It internally uses getsockname system call for this
+ * passed as parameter. It internally uses getsockname system call for this
* purpose.
* @param socket Socket for which ip and port has to be determined.
* @param ip Buffer in which ip address will be returned.
@@ -403,12 +403,11 @@ EXTERN int ooSocketGetIpAndPort(OOSOCKET socket, char *ip, int len, int *port, i
EXTERN int ooSocketGetInterfaceList(OOCTXT *pctxt, OOInterface **ifList);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif /* _OOSOCKET_H_ */
-
diff --git a/addons/ooh323c/src/ooStackCmds.c b/addons/ooh323c/src/ooStackCmds.c
index f2c26a525..0d2638b84 100644
--- a/addons/ooh323c/src/ooStackCmds.c
+++ b/addons/ooh323c/src/ooStackCmds.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -57,14 +57,14 @@ int isRunning(char *callToken) {
return 0;
}
-OOStkCmdStat ooMakeCall
+OOStkCmdStat ooMakeCall
(const char* dest, char* callToken, size_t bufsiz, ooCallOptions *opts)
{
OOStackCommand cmd;
if(!callToken)
return OO_STKCMD_INVALIDPARAM;
-
+
/* Generate call token*/
if (ooGenerateOutgoingCallToken (callToken, bufsiz) != OO_OK){
@@ -86,14 +86,14 @@ OOStkCmdStat ooMakeCall
}
strcpy((char*)cmd.param1, dest);
-
+
cmd.param2 = (void*) malloc(strlen(callToken)+1);
if(!cmd.param2)
{
free(cmd.param1);
return OO_STKCMD_MEMERR;
}
-
+
strcpy((char*)cmd.param2, callToken);
if(!opts)
@@ -122,7 +122,7 @@ OOStkCmdStat ooMakeCall
return OO_STKCMD_SUCCESS;
}
-OOStkCmdStat ooRunCall
+OOStkCmdStat ooRunCall
(const char* dest, char* callToken, size_t bufsiz, ooCallOptions *opts)
{
OOStackCommand cmd;
@@ -145,7 +145,7 @@ OOStkCmdStat ooRunCall
if(!callToken)
return OO_STKCMD_INVALIDPARAM;
-
+
memset(&cmd, 0, sizeof(OOStackCommand));
cmd.type = OO_CMD_MAKECALL;
@@ -157,14 +157,14 @@ OOStkCmdStat ooRunCall
strcpy((char*)cmd.param1, dest);
cmd.plen1 = strlen(dest);
-
+
cmd.param2 = (void*) malloc(strlen(callToken)+1);
if(!cmd.param2)
{
free(cmd.param1);
return OO_STKCMD_MEMERR;
}
-
+
strcpy((char*)cmd.param2, callToken);
cmd.plen2 = strlen(callToken);
@@ -230,7 +230,7 @@ OOStkCmdStat ooManualRingback(const char *callToken)
}
strcpy((char*)cmd.param1, callToken);
cmd.plen1 = strlen(callToken);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
free(cmd.param1);
@@ -274,7 +274,7 @@ OOStkCmdStat ooManualProgress(const char *callToken)
}
strcpy((char*)cmd.param1, callToken);
cmd.plen1 = strlen(callToken);
-
+
if(ooWriteCallStackCommand(call, &cmd) != OO_OK)
{
free(cmd.param1);
@@ -315,7 +315,7 @@ OOStkCmdStat ooAnswerCall(const char *callToken)
return OO_STKCMD_MEMERR;
}
strcpy((char*)cmd.param1, callToken);
- cmd.plen1 = strlen(callToken);
+ cmd.plen1 = strlen(callToken);
if(ooWriteCallStackCommand(call, &cmd) != OO_OK)
{
@@ -426,7 +426,7 @@ OOStkCmdStat ooHangCall(const char* callToken, OOCallClearReason reason, int q93
free(cmd.param1);
free(cmd.param2);
free(cmd.param3);
-
+
return OO_STKCMD_SUCCESS;
}
@@ -443,7 +443,7 @@ OOStkCmdStat ooStopMonitor()
memset(&cmd, 0, sizeof(OOStackCommand));
cmd.type = OO_CMD_STOPMONITOR;
-
+
if(ooWriteStackCommand(&cmd) != OO_OK)
return OO_STKCMD_WRITEERR;
@@ -485,7 +485,7 @@ OOStkCmdStat ooSendDTMFDigit(const char *callToken, const char* dtmf)
cmd.plen1 = strlen(callToken);
strcpy((char*)cmd.param2, dtmf);
cmd.plen2 = strlen(dtmf);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
free(cmd.param1);
@@ -533,7 +533,7 @@ OOStkCmdStat ooSetANI(const char *callToken, const char* ani)
cmd.plen1 = strlen(callToken);
strcpy((char*)cmd.param2, ani);
cmd.plen2 = strlen(ani);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
free(cmd.param1);
@@ -643,7 +643,7 @@ OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode)
cmd.plen1 = strlen(callToken);
*((int *) cmd.param2) = isT38Mode;
cmd.plen2 = sizeof(int);
-
+
if(ooWriteCallStackCommand(call,&cmd) != OO_OK)
{
free(cmd.param1);
@@ -672,11 +672,10 @@ const char* ooGetStkCmdStatusCodeTxt(OOStkCmdStat stat)
case OO_STKCMD_WRITEERR:
return "Stack command - write error";
- case OO_STKCMD_CONNECTIONERR:
+ case OO_STKCMD_CONNECTIONERR:
return "Stack command - Failed to create command channel";
default:
return "Invalid status code";
}
}
-
diff --git a/addons/ooh323c/src/ooStackCmds.h b/addons/ooh323c/src/ooStackCmds.h
index df7767ce9..6b9cb88be 100644
--- a/addons/ooh323c/src/ooStackCmds.h
+++ b/addons/ooh323c/src/ooStackCmds.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooStackCmds.h
+ * @file ooStackCmds.h
* This file contains stack commands which an user application can use to make
- * call, hang call etc.
+ * call, hang call etc.
*/
#ifndef OO_STACKCMDS_H
@@ -38,7 +38,7 @@ extern "C" {
-/**
+/**
* @defgroup stackcmds Stack Control Commands
* @{
*/
@@ -70,11 +70,11 @@ typedef enum OOStackCmdID {
OO_CMD_REQMODE, /*!< Request new mode */
OO_CMD_SETANI, /*! <Set conncted info */
OO_CMD_UPDLC /*! <Update Logical channels */
-
+
} OOStackCmdID;
/**
- * This structure is used to queue a stack command for processing in
+ * This structure is used to queue a stack command for processing in
* the event handler loop.
*/
typedef struct OOStackCommand {
@@ -99,7 +99,7 @@ typedef struct OOStackCommand {
*
* @return Returns OOStkCmdStat value indication success or failure.
*/
-EXTERN OOStkCmdStat ooMakeCall
+EXTERN OOStkCmdStat ooMakeCall
(const char* dest, char *callToken, size_t bufsiz, ooCallOptions *opts);
@@ -108,7 +108,7 @@ EXTERN OOStkCmdStat ooMakeCall
* This function is used to send a manual ringback message (alerting message)
* for a call. Effective only when manual-ringback is enabled.
* @param callToken Unique token for the call.
- *
+ *
* @return Returns OOStkCmdStat value indication success or failure.
*/
EXTERN OOStkCmdStat ooManualRingback(const char *callToken);
@@ -117,7 +117,7 @@ EXTERN OOStkCmdStat ooManualProgress(const char *callToken);
/**
* This function is used to answer a call
* @param callToken Unique token for the call
- *
+ *
* @return Returns OOStkCmdStat value indication success or failure.
*/
EXTERN OOStkCmdStat ooAnswerCall(const char *callToken);
@@ -142,7 +142,7 @@ EXTERN OOStkCmdStat ooForwardCall(const char* callToken, char *dest);
EXTERN OOStkCmdStat ooHangCall(const char* callToken, OOCallClearReason reason, int q931cause);
/**
- * This command function can be used by an user application to send a DTMF
+ * This command function can be used by an user application to send a DTMF
* sequence using H.245 UserInputIndication message.
* @param callToken Unique token for the call
* @param alpha Alphanumeric string reperesenting dtmf sequence
@@ -168,8 +168,8 @@ EXTERN OOStkCmdStat ooStopMonitor(void);
* @return Text description corresponding to the code.
*/
EXTERN const char* ooGetStkCmdStatusCodeTxt(OOStkCmdStat stat);
-/**
- * @}
+/**
+ * @}
*/
EXTERN OOStkCmdStat ooRequestChangeMode(const char *callToken, int isT38Mode);
diff --git a/addons/ooh323c/src/ooTimer.c b/addons/ooh323c/src/ooTimer.c
index efb863ef4..226ec9130 100644
--- a/addons/ooh323c/src/ooTimer.c
+++ b/addons/ooh323c/src/ooTimer.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -29,13 +29,13 @@
#endif
/**
- * This is a timer list used by test application chansetup only.
+ * This is a timer list used by test application chansetup only.
*/
DList g_TimerList;
-OOTimer* ooTimerCreate
-(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
+OOTimer* ooTimerCreate
+(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
OOBOOL reRegister)
{
OOTimer* pTimer = (OOTimer*) memAlloc (pctxt, sizeof(OOTimer));
@@ -108,7 +108,7 @@ void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
if (ooTimerExpired (pTimer)) {
/*
* Re-register before calling callback function in case it is
- * a long duration callback.
+ * a long duration callback.
*/
if (pTimer->reRegister) ooTimerReset (pctxt, pList, pTimer);
@@ -150,8 +150,8 @@ struct timeval* ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
ooGetTimeOfDay (&tvstr, 0);
- ptimeout->tv_sec =
- OOMAX ((int) 0, (int) (ptimer->expireTime.tv_sec - tvstr.tv_sec));
+ ptimeout->tv_sec =
+ OOMAX ((int) 0, (int) (ptimer->expireTime.tv_sec - tvstr.tv_sec));
ptimeout->tv_usec = ptimer->expireTime.tv_usec - tvstr.tv_usec;
@@ -166,7 +166,7 @@ struct timeval* ooTimerNextTimeout (DList *pList, struct timeval* ptimeout)
return (ptimeout);
}
-/*
+/*
* Reregister a timer entry. This function is responsible for moving
* the current pointer in the timer list to the next element to be
* processed..
diff --git a/addons/ooh323c/src/ooTimer.h b/addons/ooh323c/src/ooTimer.h
index 2283ba4d9..66d9f6faf 100644
--- a/addons/ooh323c/src/ooTimer.h
+++ b/addons/ooh323c/src/ooTimer.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the LICENSE.txt file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the LICENSE.txt file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file ooTimer.h
+/**
+ * @file ooTimer.h
* Timer structures and functions.
*/
#ifndef _OOTIMER_H_
@@ -41,7 +41,7 @@ extern "C" {
#endif
/**
- * This function computes the relative expiration time from the current
+ * This function computes the relative expiration time from the current
* time for the given timer object.
*
* @param pTimer Pointer to timer object.
@@ -59,7 +59,7 @@ EXTERN void ooTimerComputeExpireTime (OOTimer* pTimer);
* @param reRegister Should timer be re-registered after it expires?
* @return Pointer to created timer object.
*/
-EXTERN OOTimer* ooTimerCreate
+EXTERN OOTimer* ooTimerCreate
(OOCTXT* pctxt, DList *pList, OOTimerCbFunc cb, OOUINT32 deltaSecs, void *data,
OOBOOL reRegister);
@@ -80,13 +80,13 @@ EXTERN void ooTimerDelete (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
EXTERN OOBOOL ooTimerExpired (OOTimer* pTimer);
/**
- * This function loops through the global timer list and fires all
+ * This function loops through the global timer list and fires all
* expired timers by calling the registered callback functions.
*/
EXTERN void ooTimerFireExpired (OOCTXT* pctxt, DList* pList);
/**
- * This function inserts the given timer object into the correct
+ * This function inserts the given timer object into the correct
* chronological position in the global timer list.
* @param pctxt Pointer to OOCTXT structure used for memory allocation.
* @param pList List in which timer has to be inserted.
@@ -96,7 +96,7 @@ EXTERN void ooTimerFireExpired (OOCTXT* pctxt, DList* pList);
EXTERN int ooTimerInsertEntry (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
/**
- * This function calculates the relative time from the current time
+ * This function calculates the relative time from the current time
* that the first timer in global timer list will expire.
* @param pList Handle to timer list
* @param ptimeout timeval structure to receive timeout value.
@@ -105,7 +105,7 @@ EXTERN int ooTimerInsertEntry (OOCTXT* pctxt, DList* pList, OOTimer* pTimer);
EXTERN struct timeval* ooTimerNextTimeout (DList* pList, struct timeval* ptimeout);
/**
- * This function resets the given timer object if its reregister flag
+ * This function resets the given timer object if its reregister flag
* is set. Otherwise, it is deleted.
* @param pctxt Pointer to OOCTXT structre used for memory allocation.
* @param pList Pointer to timer list.
diff --git a/addons/ooh323c/src/ooUtils.c b/addons/ooh323c/src/ooUtils.c
index 7b5321b6d..c71933cb7 100644
--- a/addons/ooh323c/src/ooUtils.c
+++ b/addons/ooh323c/src/ooUtils.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -30,7 +30,7 @@ OOBOOL ooUtilsIsStrEmpty (const char* str)
}
-OOBOOL ooIsDailedDigit(const char* str)
+OOBOOL ooIsDailedDigit(const char* str)
{
if(str == NULL || *str =='\0') { return FALSE; }
while(*str != '\0')
diff --git a/addons/ooh323c/src/ooUtils.h b/addons/ooh323c/src/ooUtils.h
index 1a84dd42e..78aee325c 100644
--- a/addons/ooh323c/src/ooUtils.h
+++ b/addons/ooh323c/src/ooUtils.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooUtils.h
- * This file contains general utility functions.
+ * @file ooUtils.h
+ * This file contains general utility functions.
*/
#ifndef _OOUTILS_H_
#define _OOUTILS_H_
@@ -29,11 +29,11 @@
* @param tabsiz Number of items in the table
* @return Text for item or '?' if idx outside bounds of table
*/
-EXTERN const char* ooUtilsGetText
+EXTERN const char* ooUtilsGetText
(OOUINT32 idx, const char** table, size_t tabsiz);
/**
- * Test if given string value is empty. String is considered to empty
+ * Test if given string value is empty. String is considered to empty
* if value is NULL or there are no characters in string (strlen == 0).
*
* @param str String to test
@@ -43,7 +43,7 @@ EXTERN OOBOOL ooUtilsIsStrEmpty (const char * str);
/**
- * Test if given string value is digit string.
+ * Test if given string value is digit string.
*
* @param str String to test
* @return TRUE if string contains all digits; FALSE otherwise
diff --git a/addons/ooh323c/src/ooasn1.h b/addons/ooh323c/src/ooasn1.h
index e7b585eb1..8355c54d0 100644
--- a/addons/ooh323c/src/ooasn1.h
+++ b/addons/ooh323c/src/ooasn1.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file ooasn1.h
+/**
+ * @file ooasn1.h
* Common ASN.1 runtime constants, data structure definitions, and run-time
- * functions to support ASN.1 PER encoding/decoding as defined in the
+ * functions to support ASN.1 PER encoding/decoding as defined in the
* ITU-T standards.
*/
#ifndef _OOASN1_H_
@@ -31,8 +31,8 @@
#include <stddef.h>
#include "dlist.h"
#include "ootrace.h"
-/**
- * @defgroup cruntime C Runtime Common Functions
+/**
+ * @defgroup cruntime C Runtime Common Functions
* @{
*/
@@ -237,7 +237,7 @@ defined(_WIN32)
#elif defined(__IBMC__) || defined(__GNUC__) || defined(__SUNPRO_C) || \
defined(__SUNPRO_CC) || defined(__CC_ARM) || \
-defined(__HPUX_CC__) || defined(__HP_aCC)
+defined(__HPUX_CC__) || defined(__HP_aCC)
#define ASN1INT64 long long
#else /* !MSC_VER && !__IBMC__ etc */
@@ -423,7 +423,7 @@ typedef struct OOCTXT { /* context block */
#endif
/**
- * @defgroup mem Memory Allocation Macros and Functions
+ * @defgroup mem Memory Allocation Macros and Functions
* @ingroup cruntime
*
* Memory allocation functions and macros handle memory management for the
@@ -570,7 +570,7 @@ decodeConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
/* Context management functions */
/**
- * @defgroup cmfun Context Management Functions
+ * @defgroup cmfun Context Management Functions
* @{
*
* Context initialization functions handle the allocation, initialization, and
@@ -601,7 +601,7 @@ decodeConstrainedStringEx (pctxt, pvalue, permCharSet, 8, 7, 7)
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int initContextBuffer
+EXTERN int initContextBuffer
(OOCTXT* pctxt, const ASN1OCTET* bufaddr, ASN1UINT bufsiz);
/**
@@ -643,17 +643,17 @@ EXTERN int initSubContext (OOCTXT* pctxt, OOCTXT* psrc);
EXTERN void setCtxtFlag (OOCTXT* pctxt, ASN1USINT mask);
EXTERN void clearCtxtFlag (OOCTXT* pctxt, ASN1USINT mask);
-EXTERN int setPERBuffer
+EXTERN int setPERBuffer
(OOCTXT* pctxt, ASN1OCTET* bufaddr, ASN1UINT bufsiz, ASN1BOOL aligned);
EXTERN int setPERBufferUsingCtxt (OOCTXT* pTarget, OOCTXT* pSource);
#define ZEROCONTEXT(pctxt) memset(pctxt,0,sizeof(OOCTXT))
-/**
+/**
* @} cmfun
*/
/**
- * @defgroup errfp Error Formatting and Print Functions
+ * @defgroup errfp Error Formatting and Print Functions
* @{
*
* Error formatting and print functions allow information about the
@@ -691,7 +691,7 @@ EXTERN int errAddIntParm (ASN1ErrInfo* pErrInfo, int errParm);
* @param errprm_p The typed error parameter.
* @return The status of the operation.
*/
-EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
+EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
const char* errprm_p);
/**
@@ -711,7 +711,7 @@ EXTERN int errAddStrParm (ASN1ErrInfo* pErrInfo,
EXTERN int errAddUIntParm (ASN1ErrInfo* pErrInfo, unsigned int errParm);
-EXTERN int errCopyData (ASN1ErrInfo* pSrcErrInfo,
+EXTERN int errCopyData (ASN1ErrInfo* pSrcErrInfo,
ASN1ErrInfo* pDestErrInfo);
/**
@@ -719,8 +719,8 @@ EXTERN int errCopyData (ASN1ErrInfo* pSrcErrInfo,
* associated with an error message. These parameters are maintained on an
* internal linked list maintained within the error information structure. The
* list memory must be freed when error processing is complete. This function
- * is called from within errPrint after teh error has been printed out. It is
- * also called in teh freeContext function.
+ * is called from within errPrint after the error has been printed out. It is
+ * also called in the freeContext function.
*
* @param pErrInfo A pointer to a structure containing information on the
* error to be printed. Typically, the error info
@@ -764,7 +764,7 @@ EXTERN void errPrint (ASN1ErrInfo* pErrInfo);
*/
EXTERN int errReset (ASN1ErrInfo* pErrInfo);
-/**
+/**
* This function sets error information in an error information structure. The
* information set includes status code, module name, and line number. Location
* information (i.e. module name and line number) is pushed onto a stack within
@@ -787,7 +787,7 @@ EXTERN int errReset (ASN1ErrInfo* pErrInfo);
* information and return the status value in one line of
* code.
*/
-EXTERN int errSetData (ASN1ErrInfo* pErrInfo, int status,
+EXTERN int errSetData (ASN1ErrInfo* pErrInfo, int status,
const char* module, int lno);
#ifndef _COMPACT
@@ -802,8 +802,8 @@ errSetData(&(ctxt)->errInfo,stat,__FILE__,__LINE__)
#define LOG_ASN1ERR_AND_FREE(pctxt,stat,lctxt) \
freeContext ((lctxt)), LOG_ASN1ERR(pctxt, stat)
-/**
- * @}
+/**
+ * @}
*/
#define RT_MH_DONTKEEPFREE 0x1
@@ -819,12 +819,12 @@ freeContext ((lctxt)), LOG_ASN1ERR(pctxt, stat)
* @{
*/
/**
- * Allocate memory. This macro allocates the given number of bytes. It is
+ * Allocate memory. This macro allocates the given number of bytes. It is
* similar to the C \c malloc run-time function.
- *
+ *
* @param pctxt - Pointer to a context block
* @param nbytes - Number of bytes of memory to allocate
- * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
* was available to fulfill the request.
*/
#define memAlloc(pctxt,nbytes) \
@@ -833,41 +833,41 @@ memHeapAlloc(&(pctxt)->pTypeMemHeap,nbytes)
/**
* Allocate and zero memory. This macro allocates the given number of bytes
* and then initializes the memory block to zero.
- *
+ *
* @param pctxt - Pointer to a context block
* @param nbytes - Number of bytes of memory to allocate
- * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
* was available to fulfill the request.
*/
#define memAllocZ(pctxt,nbytes) \
memHeapAllocZ(&(pctxt)->pTypeMemHeap,nbytes)
/**
- * Reallocate memory. This macro reallocates a memory block (either
- * expands or contracts) to the given number of bytes. It is
+ * Reallocate memory. This macro reallocates a memory block (either
+ * expands or contracts) to the given number of bytes. It is
* similar to the C \c realloc run-time function.
- *
+ *
* @param pctxt - Pointer to a context block
- * @param mem_p - Pointer to memory block to reallocate. This must have been
+ * @param mem_p - Pointer to memory block to reallocate. This must have been
* allocated using the memHeapAlloc macro or the memHeapAlloc function.
- * @param nbytes - Number of bytes of memory to which the block is to be
+ * @param nbytes - Number of bytes of memory to which the block is to be
* resized.
- * @return - Void pointer to allocated memory or NULL if insufficient memory
- * was available to fulfill the request. This may be the same as the pmem
+ * @return - Void pointer to allocated memory or NULL if insufficient memory
+ * was available to fulfill the request. This may be the same as the pmem
* pointer that was passed in if the block did not need to be relocated.
*/
#define memRealloc(pctxt,mem_p,nbytes) \
memHeapRealloc(&(pctxt)->pTypeMemHeap, (void*)mem_p, nbytes)
/**
- * Free memory pointer. This macro frees memory at the given pointer.
- * The memory must have been allocated using the memHeapAlloc (or similar)
- * macros or the mem memory allocation macros. This macro is
+ * Free memory pointer. This macro frees memory at the given pointer.
+ * The memory must have been allocated using the memHeapAlloc (or similar)
+ * macros or the mem memory allocation macros. This macro is
* similar to the C \c free function.
- *
+ *
* @param pctxt - Pointer to a context block
- * @param mem_p - Pointer to memory block to free. This must have
- * been allocated using the memHeapAlloc or memAlloc macro or the
+ * @param mem_p - Pointer to memory block to free. This must have
+ * been allocated using the memHeapAlloc or memAlloc macro or the
* memHeapAlloc function.
*/
#define memFreePtr(pctxt,mem_p) \
@@ -875,34 +875,34 @@ if (memHeapCheckPtr (&(pctxt)->pTypeMemHeap, (void*)mem_p)) \
memHeapFreePtr(&(pctxt)->pTypeMemHeap, (void*)mem_p)
/**
- * Free memory associated with a context. This macro frees all memory
- * held within a context. This is all memory allocated using the
- * memHeapAlloc (and similar macros) and the mem memory allocation
+ * Free memory associated with a context. This macro frees all memory
+ * held within a context. This is all memory allocated using the
+ * memHeapAlloc (and similar macros) and the mem memory allocation
* functions using the given context variable.
- *
+ *
* @param pctxt - Pointer to a context block
*/
#define memFree(pctxt) \
memHeapFreeAll(&(pctxt)->pTypeMemHeap)
/**
- * Reset memory associated with a context. This macro resets all memory
- * held within a context. This is all memory allocated using the memHeapAlloc
- * (and similar macros) and the mem memory allocation functions using the
+ * Reset memory associated with a context. This macro resets all memory
+ * held within a context. This is all memory allocated using the memHeapAlloc
+ * (and similar macros) and the mem memory allocation functions using the
* given context variable.
*
- * <p>The difference between this and the ASN1MEMFREE macro is that the
- * memory blocks held within the context are not actually freed. Internal
- * pointers are reset so the existing blocks can be reused. This can
- * provide a performace improvement for repetitive tasks such as decoding
+ * <p>The difference between this and the ASN1MEMFREE macro is that the
+ * memory blocks held within the context are not actually freed. Internal
+ * pointers are reset so the existing blocks can be reused. This can
+ * provide a performace improvement for repetitive tasks such as decoding
* messages in a loop.
- *
+ *
* @param pctxt - Pointer to a context block
*/
#define memReset(pctxt) \
memHeapReset(&(pctxt)->pTypeMemHeap)
-/* Alias for __cdecl modifier; if __cdecl keyword is not supported,
+/* Alias for __cdecl modifier; if __cdecl keyword is not supported,
* redefine it as empty macro. */
#if !defined(OSCDECL)
@@ -931,10 +931,10 @@ EXTERN void* memHeapRealloc (void** ppvMemHeap, void* mem_p, int nbytes_);
EXTERN void memHeapRelease (void** ppvMemHeap);
EXTERN void memHeapReset (void** ppvMemHeap);
-EXTERN void* memHeapMarkSaved
+EXTERN void* memHeapMarkSaved
(void** ppvMemHeap, const void* mem_p, ASN1BOOL saved);
-EXTERN void memHeapSetProperty
+EXTERN void memHeapSetProperty
(void** ppvMemHeap, ASN1UINT propId, void* pProp);
@@ -1049,7 +1049,7 @@ csetvar.charSetAlignedBits = abits;
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBits
+EXTERN int decodeBits
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT nbits);
/**
@@ -1072,7 +1072,7 @@ EXTERN int decodeBits
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBitString
+EXTERN int decodeBitString
(OOCTXT* pctxt, ASN1UINT* numbits_p, ASN1OCTET* buffer,
ASN1UINT bufsiz);
@@ -1100,7 +1100,7 @@ EXTERN int decodeBitString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeBMPString
+EXTERN int decodeBMPString
(OOCTXT* pctxt, ASN1BMPString* pvalue, Asn116BitCharSet* permCharSet);
/**
@@ -1128,7 +1128,7 @@ EXTERN int decodeByteAlign (OOCTXT* pctxt);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsInteger
+EXTERN int decodeConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower, ASN1INT upper);
/**
@@ -1144,7 +1144,7 @@ EXTERN int decodeConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUnsigned
+EXTERN int decodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1160,7 +1160,7 @@ EXTERN int decodeConsUnsigned
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
+EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
ASN1UINT8* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1176,7 +1176,7 @@ EXTERN int decodeConsUInt8 (OOCTXT* pctxt,
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsUInt16
+EXTERN int decodeConsUInt16
(OOCTXT* pctxt, ASN1USINT* pvalue, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1196,7 +1196,7 @@ EXTERN int decodeConsUInt16
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConsWholeNumber
+EXTERN int decodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT* padjusted_value, ASN1UINT range_value);
/**
@@ -1218,7 +1218,7 @@ EXTERN int decodeConsWholeNumber
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeConstrainedStringEx
+EXTERN int decodeConstrainedStringEx
(OOCTXT* pctxt, const char** string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits);
@@ -1262,7 +1262,7 @@ EXTERN int decodeDynBitString (OOCTXT* pctxt, ASN1DynBitStr* pBitStr);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeDynOctetString
+EXTERN int decodeDynOctetString
(OOCTXT* pctxt, ASN1DynOctStr* pOctStr);
/**
@@ -1321,14 +1321,14 @@ EXTERN int decodeObjectIdentifier (OOCTXT* pctxt, ASN1OBJID* pvalue);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeOctetString
+EXTERN int decodeOctetString
(OOCTXT* pctxt, ASN1UINT* numocts_p, ASN1OCTET* buffer,
ASN1UINT bufsiz);
/**
* This function will decode an ASN.1 open type. This used to be the ASN.1 ANY
- * type, but now is used in a variety of applications requiring an encoding
- * that can be interpreted by a decoder without prior knowledge of the type
+ * type, but now is used in a variety of applications requiring an encoding
+ * that can be interpreted by a decoder without prior knowledge of the type
* of the variable.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1342,7 +1342,7 @@ EXTERN int decodeOctetString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeOpenType
+EXTERN int decodeOpenType
(OOCTXT* pctxt, const ASN1OCTET** object_p2, ASN1UINT* numocts_p);
/**
@@ -1360,7 +1360,7 @@ EXTERN int decodeOpenType
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSmallNonNegWholeNumber
+EXTERN int decodeSmallNonNegWholeNumber
(OOCTXT* pctxt, ASN1UINT* pvalue);
/**
@@ -1374,7 +1374,7 @@ EXTERN int decodeSmallNonNegWholeNumber
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSemiConsInteger
+EXTERN int decodeSemiConsInteger
(OOCTXT* pctxt, ASN1INT* pvalue, ASN1INT lower);
/**
@@ -1389,7 +1389,7 @@ EXTERN int decodeSemiConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int decodeSemiConsUnsigned
+EXTERN int decodeSemiConsUnsigned
(OOCTXT* pctxt, ASN1UINT* pvalue, ASN1UINT lower);
/**
@@ -1420,7 +1420,7 @@ decodeSemiConsUnsigned(pctxt, pvalue, 0U)
EXTERN int decodeVarWidthCharString (OOCTXT* pctxt, const char** pvalue);
/**
- * This function will encode a variable of the ASN.1 BOOLEAN type in
+ * This function will encode a variable of the ASN.1 BOOLEAN type in
* a single bit.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1440,7 +1440,7 @@ EXTERN int encodeBit (OOCTXT* pctxt, ASN1BOOL value);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBits
+EXTERN int encodeBits
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT nbits);
/**
@@ -1456,7 +1456,7 @@ EXTERN int encodeBits
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBitString
+EXTERN int encodeBitString
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1482,7 +1482,7 @@ EXTERN int encodeBitString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeBMPString
+EXTERN int encodeBMPString
(OOCTXT* pctxt, ASN1BMPString value, Asn116BitCharSet* permCharSet);
/**
@@ -1532,7 +1532,7 @@ EXTERN int encodeCheckBuffer (OOCTXT* pctxt, ASN1UINT nbytes);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConstrainedStringEx
+EXTERN int encodeConstrainedStringEx
(OOCTXT* pctxt, const char* string, const char* charSet,
ASN1UINT abits, ASN1UINT ubits, ASN1UINT canSetBits);
@@ -1548,7 +1548,7 @@ EXTERN int encodeConstrainedStringEx
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsInteger
+EXTERN int encodeConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower, ASN1INT upper);
/**
@@ -1566,7 +1566,7 @@ EXTERN int encodeConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsUnsigned
+EXTERN int encodeConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower, ASN1UINT upper);
/**
@@ -1584,7 +1584,7 @@ EXTERN int encodeConsUnsigned
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeConsWholeNumber
+EXTERN int encodeConsWholeNumber
(OOCTXT* pctxt, ASN1UINT adjusted_value, ASN1UINT range_value);
/**
@@ -1608,7 +1608,7 @@ EXTERN int encodeExpandBuffer (OOCTXT* pctxt, ASN1UINT nbytes);
* to get the pointer and length of the message. It is normally used when
* dynamic encoding is specified because the message pointer is not known until
* encoding is complete. If static encoding is used, the message starts at the
- * beginning of the specified buffer adn the encodeGetMsgLen function can be
+ * beginning of the specified buffer adn the encodeGetMsgLen function can be
* used to obtain the lenght of the message.
*
* @param pctxt Pointer to a context structure. This provides a storage
@@ -1675,7 +1675,7 @@ EXTERN int encodebitsFromOctet (OOCTXT* pctxt, ASN1OCTET value, ASN1UINT nbits);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOctets
+EXTERN int encodeOctets
(OOCTXT* pctxt, const ASN1OCTET* pvalue, ASN1UINT nbits);
/**
@@ -1690,7 +1690,7 @@ EXTERN int encodeOctets
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOctetString
+EXTERN int encodeOctetString
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1708,7 +1708,7 @@ EXTERN int encodeOctetString
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOpenType
+EXTERN int encodeOpenType
(OOCTXT* pctxt, ASN1UINT numocts, const ASN1OCTET* data);
/**
@@ -1729,15 +1729,15 @@ EXTERN int encodeOpenType
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeOpenTypeExt
+EXTERN int encodeOpenTypeExt
(OOCTXT* pctxt, DList* pElemList);
-EXTERN int encodeOpenTypeExtBits
+EXTERN int encodeOpenTypeExtBits
(OOCTXT* pctxt, DList* pElemList);
/**
* This function will endcode a small, non-negative whole number as specified
- * in Section 10.6 of teh X.691 standard. This is a number that is expected to
+ * in Section 10.6 of the X.691 standard. This is a number that is expected to
* be small, but whose size is potentially unlimited due to the presence of an
* extension marker.
*
@@ -1762,7 +1762,7 @@ EXTERN int encodeSmallNonNegWholeNumber (OOCTXT* pctxt, ASN1UINT value);
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeSemiConsInteger
+EXTERN int encodeSemiConsInteger
(OOCTXT* pctxt, ASN1INT value, ASN1INT lower);
/**
@@ -1776,7 +1776,7 @@ EXTERN int encodeSemiConsInteger
* - 0 (ASN_OK) = success,
* - negative return value is error.
*/
-EXTERN int encodeSemiConsUnsigned
+EXTERN int encodeSemiConsUnsigned
(OOCTXT* pctxt, ASN1UINT value, ASN1UINT lower);
/**
@@ -1791,15 +1791,15 @@ EXTERN int encodeSemiConsUnsigned
#define encodeUnconsInteger(pctxt,value) \
encodeSemiConsInteger(pctxt,value,ASN1INT_MIN)
-EXTERN int encodeVarWidthCharString (OOCTXT* pctxt, const char* value);
+EXTERN int encodeVarWidthCharString (OOCTXT* pctxt, const char* value);
EXTERN int addSizeConstraint (OOCTXT* pctxt, Asn1SizeCnst* pSize);
-EXTERN ASN1BOOL alignCharStr
+EXTERN ASN1BOOL alignCharStr
(OOCTXT* pctxt, ASN1UINT len, ASN1UINT nbits, Asn1SizeCnst* pSize);
-EXTERN int bitAndOctetStringAlignmentTest
-(Asn1SizeCnst* pSizeList, ASN1UINT itemCount,
+EXTERN int bitAndOctetStringAlignmentTest
+(Asn1SizeCnst* pSizeList, ASN1UINT itemCount,
ASN1BOOL bitStrFlag, ASN1BOOL* pAlignFlag);
EXTERN int getPERMsgLen (OOCTXT* pctxt);
@@ -1811,20 +1811,20 @@ EXTERN Asn1SizeCnst* getSizeConstraint (OOCTXT* pctxt, ASN1BOOL extbit);
EXTERN int checkSizeConstraint(OOCTXT* pctxt, int size);
EXTERN ASN1UINT getUIntBitCount (ASN1UINT value);
-EXTERN Asn1SizeCnst* checkSize
+EXTERN Asn1SizeCnst* checkSize
(Asn1SizeCnst* pSizeList, ASN1UINT value, ASN1BOOL* pExtendable);
-EXTERN void init16BitCharSet
+EXTERN void init16BitCharSet
(Asn116BitCharSet* pCharSet, ASN116BITCHAR first,
ASN116BITCHAR last, ASN1UINT abits, ASN1UINT ubits);
EXTERN ASN1BOOL isExtendableSize (Asn1SizeCnst* pSizeList);
-EXTERN void set16BitCharSet
+EXTERN void set16BitCharSet
(OOCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet);
#ifdef __cplusplus
}
#endif
-#endif
+#endif
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 0b0acd2a2..f7dd7c5e6 100644
--- a/addons/ooh323c/src/oochannels.c
+++ b/addons/ooh323c/src/oochannels.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -19,7 +19,7 @@
#include "asterisk/config.h"
#include "asterisk/netsock2.h"
-#include "ooports.h"
+#include "ooports.h"
#include "oochannels.h"
#include "ootrace.h"
#include "ooq931.h"
@@ -69,7 +69,7 @@ int ooCreateH245Listener(OOH323CallData *call)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- ret = ooBindPort (OOTCP, channelSocket, call->localIP);
+ ret = ooBindPort (OOTCP, channelSocket, call->localIP);
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Unable to bind to a TCP port - H245 listener creation"
@@ -83,12 +83,12 @@ int ooCreateH245Listener(OOH323CallData *call)
ret = ooSocketListen(*(call->h245listener), 4096);
if(ret != ASN_OK)
{
- OOTRACEERR3("Error:Unable to listen on H.245 socket (%s, %s)\n",
+ OOTRACEERR3("Error:Unable to listen on H.245 socket (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
-
- OOTRACEINFO4("H245 listener creation - successful(port %d) (%s, %s)\n",
+
+ OOTRACEINFO4("H245 listener creation - successful(port %d) (%s, %s)\n",
*(call->h245listenport),call->callType, call->callToken);
return OO_OK;
}
@@ -109,7 +109,7 @@ int ooCreateH245Connection(OOH323CallData *call)
else
{
if (0 == call->pH245Channel) {
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
@@ -117,7 +117,7 @@ int ooCreateH245Connection(OOH323CallData *call)
bind socket to a port before connecting. Thus avoiding
implicit bind done by a connect call.
*/
- ret = ooBindPort(OOTCP, channelSocket, call->localIP);
+ ret = ooBindPort(OOTCP, channelSocket, call->localIP);
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Unable to bind to a TCP port - h245 connection "
@@ -125,13 +125,13 @@ int ooCreateH245Connection(OOH323CallData *call)
return OO_FAILED;
}
call->pH245Channel->port = ret;
- OOTRACEDBGC4("Local H.245 port is %d (%s, %s)\n",
+ OOTRACEDBGC4("Local H.245 port is %d (%s, %s)\n",
call->pH245Channel->port,
call->callType, call->callToken);
OOTRACEINFO5("Trying to connect to remote endpoint to setup H245 "
- "connection %s:%d(%s, %s)\n", call->remoteIP,
+ "connection %s:%d(%s, %s)\n", call->remoteIP,
call->remoteH245Port, call->callType, call->callToken);
-
+
if((ret=ooSocketConnect(channelSocket, call->remoteIP,
call->remoteH245Port))==ASN_OK)
{
@@ -155,7 +155,7 @@ int ooCreateH245Connection(OOH323CallData *call)
if(call->h245ConnectionAttempts >= 3)
{
OOTRACEERR3("Error:Failed to setup an H245 connection with remote "
- "destination. (%s, %s)\n", call->callType,
+ "destination. (%s, %s)\n", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -170,20 +170,20 @@ int ooCreateH245Connection(OOH323CallData *call)
"(%s, %s)\n", DEFAULT_H245CONNECTION_RETRYTIMEOUT,
call->callType, call->callToken);
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
OOTRACEERR3("Error:Unable to allocate memory for timer "
- "callback.(%s, %s)\n", call->callType,
+ "callback.(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
cbData->call = call;
cbData->timerType = OO_H245CONNECT_TIMER;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooCallH245ConnectionRetryTimerExpired,
- DEFAULT_H245CONNECTION_RETRYTIMEOUT, cbData,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooCallH245ConnectionRetryTimerExpired,
+ DEFAULT_H245CONNECTION_RETRYTIMEOUT, cbData,
FALSE))
{
OOTRACEERR3("Error:Unable to create H245 connection retry timer"
@@ -215,14 +215,14 @@ int ooSendH225Msg(OOH323CallData *call, Q931Message *msg)
iRet = ooEncodeH225Message(call, msg, (char *)encodebuf, MAXMSGLEN);
if(iRet != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode H225 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed to encode H225 message. (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, encodebuf);
return OO_FAILED;
}
/* If high priority messages, send immediately.*/
- if(encodebuf[0] == OOReleaseComplete ||
+ if(encodebuf[0] == OOReleaseComplete ||
(encodebuf[0]==OOFacility && encodebuf[1]==OOEndSessionCommand))
{
dListFreeAll(call->pctxt, &call->pH225Channel->outQueue);
@@ -231,10 +231,10 @@ int ooSendH225Msg(OOH323CallData *call, Q931Message *msg)
}
else{
dListAppend (call->pctxt, &call->pH225Channel->outQueue, encodebuf);
-
- OOTRACEDBGC4("Queued H225 messages %d. (%s, %s)\n",
- call->pH225Channel->outQueue.count,
- call->callType, call->callToken);
+
+ OOTRACEDBGC4("Queued H225 messages %d. (%s, %s)\n",
+ call->pH225Channel->outQueue.count,
+ call->callType, call->callToken);
}
return OO_OK;
}
@@ -259,20 +259,20 @@ int ooCreateH225Connection(OOH323CallData *call)
{
/*
bind socket to a port before connecting. Thus avoiding
- implicit bind done by a connect call. Avoided on windows as
+ implicit bind done by a connect call. Avoided on windows as
windows sockets have problem in reusing the addresses even after
setting SO_REUSEADDR, hence in windows we just allow os to bind
to any random port.
*/
#ifndef _WIN32
- ret = ooBindPort(OOTCP,channelSocket, call->localIP);
+ ret = ooBindPort(OOTCP,channelSocket, call->localIP);
#else
ret = ooBindOSAllocatedPort(channelSocket, call->localIP);
#endif
-
+
if(ret == OO_FAILED)
{
- OOTRACEERR3("Error:Unable to bind to a TCP port (%s, %s)\n",
+ OOTRACEERR3("Error:Unable to bind to a TCP port (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -283,13 +283,13 @@ int ooCreateH225Connection(OOH323CallData *call)
}
if (0 == call->pH225Channel) {
- call->pH225Channel =
+ call->pH225Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
call->pH225Channel->port = ret;
OOTRACEINFO6("Trying to connect to remote endpoint(%s:%d) (IPv%d) to setup "
- "H2250 channel (%s, %s)\n", call->remoteIP,
+ "H2250 channel (%s, %s)\n", call->remoteIP,
call->remotePort, call->versionIP, call->callType, call->callToken);
if((ret=ooSocketConnect(channelSocket, call->remoteIP,
@@ -304,14 +304,14 @@ int ooCreateH225Connection(OOH323CallData *call)
if(!strcmp(call->localIP, "0.0.0.0") || !strcmp(call->localIP, "::"))
{
OOTRACEDBGA3("Determining IP address for outgoing call in "
- "multihomed mode. (%s, %s)\n", call->callType,
+ "multihomed mode. (%s, %s)\n", call->callType,
call->callToken);
- ret = ooSocketGetIpAndPort(channelSocket, call->localIP, 2+8*4+7,
+ ret = ooSocketGetIpAndPort(channelSocket, call->localIP, 2+8*4+7,
&call->pH225Channel->port, NULL);
if(ret != ASN_OK)
{
OOTRACEERR3("ERROR:Failed to retrieve local ip and port from "
- "socket for multihomed mode.(%s, %s)\n",
+ "socket for multihomed mode.(%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{ /* transport failure */
@@ -321,7 +321,7 @@ int ooCreateH225Connection(OOH323CallData *call)
return OO_FAILED;
}
OOTRACEDBGA4("Using local ip %s for outgoing call(multihomedMode)."
- " (%s, %s)\n", call->localIP, call->callType,
+ " (%s, %s)\n", call->localIP, call->callType,
call->callToken);
}
return OO_OK;
@@ -377,12 +377,12 @@ int ooCreateH323Listener()
OOTRACEERR1("Failed to create socket for H323 Listener\n");
return OO_FAILED;
}
- if((ret=ooSocketBind (channelSocket, ipaddrs,
- gH323ep.listenPort))==ASN_OK)
+ if((ret=ooSocketBind (channelSocket, ipaddrs,
+ gH323ep.listenPort))==ASN_OK)
{
gH323ep.listener = (OOSOCKET*)memAlloc(&gH323ep.ctxt,sizeof(OOSOCKET));
*(gH323ep.listener) = channelSocket;
-
+
ooSocketListen(channelSocket,2048); /*listen on socket*/
OOTRACEINFO1("H323 listener creation - successful\n");
return OO_OK;
@@ -396,7 +396,7 @@ int ooCreateH323Listener()
-int ooAcceptH225Connection()
+int ooAcceptH225Connection()
{
OOH323CallData * call;
int ret;
@@ -405,7 +405,7 @@ int ooAcceptH225Connection()
OOSOCKET h225Channel=0;
memset(remoteIP, 0, sizeof(remoteIP));
- ret = ooSocketAccept (*(gH323ep.listener), &h225Channel,
+ ret = ooSocketAccept (*(gH323ep.listener), &h225Channel,
remoteIP, NULL);
if(ret != ASN_OK)
{
@@ -422,7 +422,7 @@ int ooAcceptH225Connection()
}
ast_mutex_lock(&call->Lock);
- call->pH225Channel = (OOH323Channel*)
+ call->pH225Channel = (OOH323Channel*)
memAllocZ (call->pctxt, sizeof(OOH323Channel));
call->pH225Channel->sock = h225Channel;
@@ -434,12 +434,12 @@ int ooAcceptH225Connection()
"mode (%s, %s)\n", call->callType, call->callToken);
}
- ret = ooSocketGetIpAndPort(h225Channel, call->localIP, 2+8*4+7,
+ ret = ooSocketGetIpAndPort(h225Channel, call->localIP, 2+8*4+7,
&call->pH225Channel->port, &call->versionIP);
if(ret != ASN_OK)
{
OOTRACEERR3("Error:Failed to retrieve local ip and port from "
- "socket for multihomed mode.(%s, %s)\n",
+ "socket for multihomed mode.(%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{ /* transport failure */
@@ -450,13 +450,13 @@ int ooAcceptH225Connection()
return OO_FAILED;
}
OOTRACEDBGA5("Using Local IP address %s (IPv%d) for incoming call "
- "(%s, %s)\n", call->localIP, call->versionIP, call->callType,
+ "(%s, %s)\n", call->localIP, call->versionIP, call->callType,
call->callToken);
if (remoteIP[0]) {
strncpy(call->remoteIP, remoteIP, strlen(remoteIP));
}
-
+
ast_mutex_unlock(&call->Lock);
return OO_OK;
}
@@ -465,7 +465,7 @@ int ooAcceptH245Connection(OOH323CallData *call)
{
int ret;
OOSOCKET h245Channel=0;
- ret = ooSocketAccept (*(call->h245listener), &h245Channel,
+ ret = ooSocketAccept (*(call->h245listener), &h245Channel,
NULL, NULL);
if(ret != ASN_OK)
{
@@ -474,14 +474,14 @@ int ooAcceptH245Connection(OOH323CallData *call)
}
if (0 == call->pH245Channel) {
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
}
- call->pH245Channel->sock = h245Channel;
+ call->pH245Channel->sock = h245Channel;
call->h245SessionState = OO_H245SESSION_ACTIVE;
- OOTRACEINFO3("H.245 connection established (%s, %s)\n",
+ OOTRACEINFO3("H.245 connection established (%s, %s)\n",
call->callType, call->callToken);
return OO_OK;
@@ -553,14 +553,14 @@ int ooSetCallFDSETs(OOH323CallData* call, struct pollfd* pfds, int *nfds)
pfds[*nfds].events = POLLIN;
if (call->pH225Channel->outQueue.count > 0 ||
- (OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
- 0 != call->pH245Channel &&
+ (OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
+ 0 != call->pH245Channel &&
call->pH245Channel->outQueue.count>0))
pfds[*nfds].events |= POLLOUT;
(*nfds)++;
}
-
+
if (0 != call->pH245Channel && call->pH245Channel->sock != 0) {
pfds[*nfds].fd = call->pH245Channel->sock;
pfds[*nfds].events = POLLIN;
@@ -581,7 +581,7 @@ int ooSetCallFDSETs(OOH323CallData* call, struct pollfd* pfds, int *nfds)
return OO_OK;
}
-
+
int ooProcessFDSETsAndTimers
(struct pollfd* pfds, int nfds, struct timeval *pToMin)
{
@@ -589,8 +589,8 @@ int ooProcessFDSETsAndTimers
/* Process gatekeeper client timers */
if(gH323ep.gkClient)
- {
- ooTimerFireExpired(&gH323ep.gkClient->ctxt,
+ {
+ ooTimerFireExpired(&gH323ep.gkClient->ctxt,
&gH323ep.gkClient->timerList);
if(ooTimerNextTimeout(&gH323ep.gkClient->timerList, &toNext))
{
@@ -627,10 +627,10 @@ int ooProcessFDSETsAndTimers
{
OOTRACEDBGA1("New connection at H225 receiver\n");
ooAcceptH225Connection();
- }
+ }
}
-
-
+
+
return OO_OK;
}
@@ -692,7 +692,7 @@ int ooProcessCallFDSETsAndTimers
OOTRACEDBGC3("Incoming H.245 connection (%s, %s)\n",
call->callType, call->callToken);
ooAcceptH245Connection(call);
- }
+ }
}
if (0 != call->pH225Channel && 0 != call->pH225Channel->sock)
@@ -701,21 +701,21 @@ int ooProcessCallFDSETsAndTimers
{
if (call->pH225Channel->outQueue.count>0)
{
- OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
+ OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
call->callType, call->callToken);
if (ooSendMsg(call, OOQ931MSG) != OO_OK)
OOTRACEERR1("Error in sending h225 message\n");
}
- if(call->pH245Channel &&
- call->pH245Channel->outQueue.count>0 &&
+ if(call->pH245Channel &&
+ call->pH245Channel->outQueue.count>0 &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OOTRACEDBGC3("H245 message needs to be tunneled. "
- "(%s, %s)\n", call->callType,
+ "(%s, %s)\n", call->callType,
call->callToken);
if (ooSendMsg(call, OOH245MSG) != OO_OK)
OOTRACEERR1("Error in sending h245 message\n");
}
- }
+ }
}
if(ooTimerNextTimeout(&call->timerList, &toNext))
@@ -743,7 +743,7 @@ int ooProcessCallFDSETsAndTimers
return OO_OK;
}
-
+
int ooMonitorCmdChannels()
{
int ret=0, nfds=0;
@@ -754,7 +754,7 @@ int ooMonitorCmdChannels()
toMin.tv_sec = 3;
toMin.tv_usec = 0;
-
+
while(1)
{
nfds = 0;
@@ -765,7 +765,7 @@ int ooMonitorCmdChannels()
break;
}
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -778,12 +778,12 @@ int ooMonitorCmdChannels()
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR1("Error in poll ...exiting\n");
- exit(-1);
+ exit(-1);
continue;
}
@@ -814,7 +814,7 @@ int ooMonitorChannels()
toMin.tv_sec = 3;
toMin.tv_usec = 0;
ooH323EpPrintConfig();
-
+
if(gH323ep.gkClient) {
ooGkClientPrintConfig(gH323ep.gkClient);
if(OO_OK != ooGkClientStart(gH323ep.gkClient))
@@ -824,7 +824,7 @@ int ooMonitorChannels()
// ooGkClientDestroy();
}
}
-
+
while(1)
{
nfds = 0;
@@ -835,7 +835,7 @@ int ooMonitorChannels()
break;
}
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -848,10 +848,10 @@ int ooMonitorChannels()
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR1("Error in poll ...exiting\n");
exit(-1);
}
@@ -859,7 +859,7 @@ int ooMonitorChannels()
toMin.tv_sec = 2; /* 2 sec */
toMin.tv_usec = 100000; /* 100ms*/
/*This is for test application. Not part of actual stack */
-
+
ast_mutex_lock(&monitorLock);
ooTimerFireExpired(&gH323ep.ctxt, &g_TimerList);
if(ooTimerNextTimeout(&g_TimerList, &toNext))
@@ -895,7 +895,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
toMin.tv_sec = 3;
toMin.tv_usec = 0;
-
+
while(1)
{
if(!call->Monitor) {
@@ -906,7 +906,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
nfds = 0;
ooSetCallFDSETs(call, pfds, &nfds);
-
+
if(nfds == 0)
#ifdef _WIN32
Sleep(10);
@@ -924,10 +924,10 @@ int ooMonitorCallChannels(OOH323CallData *call)
#endif
else
ret = ooSocketPoll(pfds, nfds, toMin.tv_sec * 1000 + toMin.tv_usec / 1000);
-
+
if(ret == -1)
{
-
+
OOTRACEERR2("Error in poll %d ...exiting\n", errno);
call->callEndReason = OO_REASON_INVALIDMESSAGE;
call->callState = OO_CALL_CLEARED;
@@ -940,7 +940,7 @@ int ooMonitorCallChannels(OOH323CallData *call)
toMin.tv_sec = 2; /* 2 sec */
toMin.tv_usec = 100000; /* 100ms*/
/*This is for test application. Not part of actual stack */
-
+
if(ooProcessCallFDSETsAndTimers(call, pfds, nfds, &toMin) != OO_OK)
{
ooStopMonitorCallChannels(call);
@@ -971,10 +971,10 @@ int ooH2250Receive(OOH323CallData *call)
int len;
Q931Message *pmsg;
OOCTXT *pctxt = call->msgctxt;
-
+
struct timeval timeout;
-
+
pmsg = (Q931Message*)memAlloc(pctxt, sizeof(Q931Message));
if(!pmsg)
{
@@ -1002,13 +1002,13 @@ int ooH2250Receive(OOH323CallData *call)
if(call->callState < OO_CALL_CLEAR)
call->callEndReason = OO_REASON_TRANSPORTFAILURE;
call->callState = OO_CALL_CLEARED;
-
+
}
ooFreeQ931Message(pctxt, pmsg);
return OO_OK;
}
OOTRACEDBGC3("Receiving H.2250 message (%s, %s)\n",
- call->callType, call->callToken);
+ call->callType, call->callToken);
/* Since we are working with TCP, need to determine the
message boundary. Has to be done at channel level, as channels
know the message formats and can determine boundaries
@@ -1016,7 +1016,7 @@ int ooH2250Receive(OOH323CallData *call)
if(recvLen != 4)
{
OOTRACEERR4("Error: Reading TPKT header for H225 message "
- "recvLen= %d (%s, %s)\n", recvLen, call->callType,
+ "recvLen= %d (%s, %s)\n", recvLen, call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1027,7 +1027,7 @@ int ooH2250Receive(OOH323CallData *call)
return OO_FAILED;
}
-
+
len = message[2];
len = len<<8;
len = len | message[3];
@@ -1037,7 +1037,7 @@ int ooH2250Receive(OOH323CallData *call)
if(len > MAXMSGLEN - 4)
{
OOTRACEERR4("Error: Invalid TPKT header for H225 message "
- "Len = %d (%s, %s)\n", len, call->callType,
+ "Len = %d (%s, %s)\n", len, call->callType,
call->callToken);
ooCloseH225Connection(call);
ooFreeQ931Message(pctxt, pmsg);
@@ -1050,7 +1050,7 @@ int ooH2250Receive(OOH323CallData *call)
}
/* Now read actual Q931 message body. We should make sure that we
- receive complete message as indicated by len. If we don't then there
+ receive complete message as indicated by len. If we don't then there
is something wrong. The loop below receives message, then checks whether
complete message is received. If not received, then uses select to peek
for remaining bytes of the message. If message is not received in 3
@@ -1059,7 +1059,7 @@ int ooH2250Receive(OOH323CallData *call)
while(total < len)
{
struct pollfd pfds;
-
+
pfds.fd = call->pH225Channel->sock;
pfds.events = POLLIN;
timeout.tv_sec = 3;
@@ -1068,7 +1068,7 @@ int ooH2250Receive(OOH323CallData *call)
if(ret == -1)
{
OOTRACEERR3("Error in select while receiving H.2250 message - "
- "clearing call (%s, %s)\n", call->callType,
+ "clearing call (%s, %s)\n", call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1088,7 +1088,7 @@ int ooH2250Receive(OOH323CallData *call)
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
{
- call->callEndReason = OO_REASON_INVALIDMESSAGE;
+ call->callEndReason = OO_REASON_INVALIDMESSAGE;
call->callState = OO_CALL_CLEAR;
}
return OO_FAILED;
@@ -1097,7 +1097,7 @@ int ooH2250Receive(OOH323CallData *call)
recvLen = ooSocketRecv (call->pH225Channel->sock, message1, len-total);
if (recvLen == 0) {
OOTRACEERR3("Error in read while receiving H.2250 message - "
- "clearing call (%s, %s)\n", call->callType,
+ "clearing call (%s, %s)\n", call->callType,
call->callToken);
ooFreeQ931Message(pctxt, pmsg);
if(call->callState < OO_CALL_CLEAR)
@@ -1112,7 +1112,7 @@ int ooH2250Receive(OOH323CallData *call)
}
- OOTRACEDBGC3("Received Q.931 message: (%s, %s)\n",
+ OOTRACEDBGC3("Received Q.931 message: (%s, %s)\n",
call->callType, call->callToken);
initializePrintHandler(&printHandler, "Received H.2250 Message");
@@ -1123,7 +1123,7 @@ int ooH2250Receive(OOH323CallData *call)
OOTRACEERR3("Error:Failed to decode received H.2250 message. (%s, %s)\n",
call->callType, call->callToken);
}
- OOTRACEDBGC3("Decoded Q931 message (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Decoded Q931 message (%s, %s)\n", call->callType,
call->callToken);
finishPrint();
removeEventHandler(pctxt);
@@ -1144,7 +1144,7 @@ int ooH245Receive(OOH323CallData *call)
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->pctxt;
struct timeval timeout;
-
+
pmsg = (H245Message*)memAlloc(pctxt, sizeof(H245Message));
/* First read just TPKT header which is four bytes */
@@ -1171,7 +1171,7 @@ int ooH245Receive(OOH323CallData *call)
}
return OO_FAILED;
}
- if(call->h245SessionState == OO_H245SESSION_PAUSED)
+ if(call->h245SessionState == OO_H245SESSION_PAUSED)
{
ooLogicalChannel *temp;
@@ -1218,7 +1218,7 @@ int ooH245Receive(OOH323CallData *call)
/* Remaining message length is length - tpkt length */
len = len - 4;
/* Now read actual H245 message body. We should make sure that we
- receive complete message as indicated by len. If we don't then there
+ receive complete message as indicated by len. If we don't then there
is something wrong. The loop below receives message, then checks whether
complete message is received. If not received, then uses select to peek
for remaining bytes of the message. If message is not received in 3
@@ -1263,7 +1263,7 @@ int ooH245Receive(OOH323CallData *call)
}
return OO_FAILED;
}
- /* If remaining part of the message is not received in 3 seconds
+ /* If remaining part of the message is not received in 3 seconds
exit */
if(!ooPDRead(&pfds, 1, call->pH245Channel->sock))
{
@@ -1279,7 +1279,7 @@ int ooH245Receive(OOH323CallData *call)
}
}
- OOTRACEDBGC3("Complete H245 message received (%s, %s)\n",
+ OOTRACEDBGC3("Complete H245 message received (%s, %s)\n",
call->callType, call->callToken);
setPERBuffer(pctxt, message, recvLen, aligned);
initializePrintHandler(&printHandler, "Received H.245 Message");
@@ -1290,45 +1290,45 @@ int ooH245Receive(OOH323CallData *call)
ret = asn1PD_H245MultimediaSystemControlMessage(pctxt, &(pmsg->h245Msg));
if(ret != ASN_OK)
{
- OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
+ OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
call->callType, call->callToken);
ooFreeH245Message(call, pmsg);
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
ooHandleH245Message(call, pmsg);
return OO_OK;
}
/* Generic Send Message functionality. Based on type of message to be sent,
- it calls the corresponding function to retrieve the message buffer and
+ it calls the corresponding function to retrieve the message buffer and
then transmits on the associated channel
Interpreting msgptr:
Q931 messages except facility
1st octet - msgType, next 4 octets - tpkt header,
followed by encoded msg
Q931 message facility
- 1st octect - OOFacility, 2nd octet - tunneled msg
- type(in case no tunneled msg - OOFacility),
- 3rd and 4th octet - associated logical channel
- of the tunneled msg(0 when no channel is
- associated. ex. in case of MSD, TCS), next
- 4 octets - tpkt header, followed by encoded
+ 1st octect - OOFacility, 2nd octet - tunneled msg
+ type(in case no tunneled msg - OOFacility),
+ 3rd and 4th octet - associated logical channel
+ of the tunneled msg(0 when no channel is
+ associated. ex. in case of MSD, TCS), next
+ 4 octets - tpkt header, followed by encoded
message.
H.245 messages no tunneling
- 1st octet - msg type, next two octets - logical
+ 1st octet - msg type, next two octets - logical
channel number(0, when no channel is associated),
next two octets - total length of the message
(including tpkt header)
H.245 messages - tunneling.
- 1st octet - msg type, next two octets - logical
+ 1st octet - msg type, next two octets - logical
channel number(0, when no channel is associated),
- next two octets - total length of the message.
+ next two octets - total length of the message.
Note, no tpkt header is present in this case.
-
+
*/
int ooSendMsg(OOH323CallData *call, int type)
{
@@ -1336,7 +1336,7 @@ int ooSendMsg(OOH323CallData *call, int type)
int len=0, ret=0, msgType=0, tunneledMsgType=0, logicalChannelNo = 0;
DListNode * p_msgNode=NULL;
ASN1OCTET *msgptr, *msgToSend=NULL;
-
+
if(call->callState == OO_CALL_CLEARED)
@@ -1350,12 +1350,12 @@ int ooSendMsg(OOH323CallData *call, int type)
{
if(call->pH225Channel->outQueue.count == 0)
{
- OOTRACEWARN3("WARN:No H.2250 message to send. (%s, %s)\n",
+ OOTRACEWARN3("WARN:No H.2250 message to send. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Sending Q931 message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Sending Q931 message (%s, %s)\n", call->callType,
call->callToken);
p_msgNode = call->pH225Channel->outQueue.head;
msgptr = (ASN1OCTET*) p_msgNode->data;
@@ -1383,10 +1383,10 @@ int ooSendMsg(OOH323CallData *call, int type)
dListRemove(&(call->pH225Channel->outQueue), p_msgNode);
if(p_msgNode)
memFreePtr(call->pctxt, p_msgNode);
-
+
/*TODO: This is not required ideally. We will see for some time and if
we don't face any problems we will delete this code */
-#if 0
+#if 0
/* Check whether connection with remote is alright */
if(!ooChannelsIsConnectionOK(call, call->pH225Channel->sock))
{
@@ -1398,19 +1398,19 @@ int ooSendMsg(OOH323CallData *call, int type)
call->callState = OO_CALL_CLEARED;
return OO_OK;
}
-#endif
- /* Send message out via TCP */
+#endif
+ /* Send message out via TCP */
ret = ooSocketSend(call->pH225Channel->sock, msgToSend, len);
if(ret == ASN_OK)
{
memFreePtr (call->pctxt, msgptr);
- OOTRACEDBGC3("H2250/Q931 Message sent successfully (%s, %s)\n",
+ OOTRACEDBGC3("H2250/Q931 Message sent successfully (%s, %s)\n",
call->callType, call->callToken);
ooOnSendMsg(call, msgType, tunneledMsgType, logicalChannelNo);
return OO_OK;
}
else{
- OOTRACEERR3("H2250Q931 Message send failed (%s, %s)\n",
+ OOTRACEERR3("H2250Q931 Message send failed (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, msgptr);
if(call->callState < OO_CALL_CLEAR)
@@ -1426,11 +1426,11 @@ int ooSendMsg(OOH323CallData *call, int type)
{
if(call->pH245Channel->outQueue.count == 0)
{
- OOTRACEWARN3("WARN:No H.245 message to send. (%s, %s)\n",
+ OOTRACEWARN3("WARN:No H.245 message to send. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Sending H245 message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Sending H245 message (%s, %s)\n", call->callType,
call->callToken);
p_msgNode = call->pH245Channel->outQueue.head;
msgptr = (ASN1OCTET*) p_msgNode->data;
@@ -1462,25 +1462,25 @@ int ooSendMsg(OOH323CallData *call, int type)
}
return OO_OK;
}
-
+
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
{
OOTRACEDBGC4("Sending %s H245 message over H.245 channel. "
- "(%s, %s)\n", ooGetMsgTypeText(msgType),
+ "(%s, %s)\n", ooGetMsgTypeText(msgType),
call->callType, call->callToken);
ret = ooSocketSend(call->pH245Channel->sock, msgptr+5, len);
if(ret == ASN_OK)
{
memFreePtr (call->pctxt, msgptr);
- OOTRACEDBGA3("H245 Message sent successfully (%s, %s)\n",
+ OOTRACEDBGA3("H245 Message sent successfully (%s, %s)\n",
call->callType, call->callToken);
ooOnSendMsg(call, msgType, tunneledMsgType, logicalChannelNo);
return OO_OK;
}
else{
memFreePtr (call->pctxt, msgptr);
- OOTRACEERR3("ERROR:H245 Message send failed (%s, %s)\n",
+ OOTRACEERR3("ERROR:H245 Message send failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -1492,7 +1492,7 @@ int ooSendMsg(OOH323CallData *call, int type)
}
else if(OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OOTRACEDBGC4("Sending %s H245 message as a tunneled message."
- "(%s, %s)\n", ooGetMsgTypeText(msgType),
+ "(%s, %s)\n", ooGetMsgTypeText(msgType),
call->callType, call->callToken);
ret = ooSendAsTunneledMessage
@@ -1518,11 +1518,11 @@ int ooSendMsg(OOH323CallData *call, int type)
OOTRACEWARN3("ERROR:Unknown message type - message not Sent (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
-}
+}
int ooCloseH245Connection(OOH323CallData *call)
{
- OOTRACEINFO3("Closing H.245 connection (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Closing H.245 connection (%s, %s)\n", call->callType,
call->callToken);
if (0 != call->pH245Channel)
@@ -1533,7 +1533,7 @@ int ooCloseH245Connection(OOH323CallData *call)
dListFreeAll(call->pctxt, &(call->pH245Channel->outQueue));
memFreePtr (call->pctxt, call->pH245Channel);
call->pH245Channel = NULL;
- OOTRACEDBGC3("Closed H245 connection. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Closed H245 connection. (%s, %s)\n", call->callType,
call->callToken);
}
call->h245SessionState = OO_H245SESSION_CLOSED;
@@ -1543,7 +1543,7 @@ int ooCloseH245Connection(OOH323CallData *call)
int ooCloseH245Listener(OOH323CallData *call)
{
- OOTRACEINFO3("Closing H.245 Listener (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Closing H.245 Listener (%s, %s)\n", call->callType,
call->callToken);
if(call->h245listener)
{
@@ -1561,10 +1561,10 @@ int ooOnSendMsg
switch(msgType)
{
case OOSetup:
- OOTRACEINFO3("Sent Message - Setup (%s, %s)\n", call->callType,
+ OOTRACEINFO3("Sent Message - Setup (%s, %s)\n", call->callType,
call->callToken);
/* Start call establishment timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1614,7 +1614,7 @@ int ooOnSendMsg
call->callState = OO_CALL_CLEARED;
else{
call->callState = OO_CALL_CLEAR_RELEASESENT;
- if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK) &&
+ if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK) &&
gH323ep.gkClient->state == GkClientRegistered){
OOTRACEDBGA3("Sending DRQ after sending ReleaseComplete."
"(%s, %s)\n", call->callType, call->callToken);
@@ -1624,10 +1624,10 @@ int ooOnSendMsg
}
}
- if(call->callState == OO_CALL_CLEAR_RELEASESENT &&
+ if(call->callState == OO_CALL_CLEAR_RELEASESENT &&
call->h245SessionState == OO_H245SESSION_IDLE)
{
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1638,11 +1638,11 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_SESSION_TIMER;
cbData->channelNumber = 0;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
&ooSessionTimerExpired, gH323ep.sessionTimeout, cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create EndSession timer- "
- "ReleaseComplete.(%s, %s)\n", call->callType,
+ "ReleaseComplete.(%s, %s)\n", call->callType,
call->callToken);
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
@@ -1658,12 +1658,12 @@ int ooOnSendMsg
case OOFacility:
if(tunneledMsgType == OOFacility)
{
- OOTRACEINFO3("Sent Message - Facility. (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - Facility. (%s, %s)\n",
call->callType, call->callToken);
}
else{
- OOTRACEINFO4("Sent Message - Facility(%s) (%s, %s)\n",
- ooGetMsgTypeText(tunneledMsgType),
+ OOTRACEINFO4("Sent Message - Facility(%s) (%s, %s)\n",
+ ooGetMsgTypeText(tunneledMsgType),
call->callType, call->callToken);
ooOnSendMsg(call, tunneledMsgType, 0, associatedChan);
@@ -1672,13 +1672,13 @@ int ooOnSendMsg
case OOMasterSlaveDetermination:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - MasterSlaveDetermination (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - MasterSlaveDetermination (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - MasterSlaveDetermination (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - MasterSlaveDetermination (%s, %s)\n",
call->callType, call->callToken);
/* Start MSD timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1703,7 +1703,7 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - MasterSlaveDeterminationAck (%s, %s)"
"\n", call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - MasterSlaveDeterminationAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - MasterSlaveDeterminationAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OOMasterSlaveReject:
@@ -1724,21 +1724,21 @@ int ooOnSendMsg
break;
case OOTerminalCapabilitySet:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- /* If session isn't marked active yet, do it. possible in case of
+ /* If session isn't marked active yet, do it. possible in case of
tunneling */
if(call->h245SessionState == OO_H245SESSION_IDLE ||
call->h245SessionState == OO_H245SESSION_PAUSED) {
call->h245SessionState = OO_H245SESSION_ACTIVE;
}
- OOTRACEINFO3("Tunneled Message - TerminalCapabilitySet (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - TerminalCapabilitySet (%s, %s)\n",
call->callType, call->callToken);
}
else {
- OOTRACEINFO3("Sent Message - TerminalCapabilitySet (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySet (%s, %s)\n",
call->callType, call->callToken);
}
/* Start TCS timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1764,7 +1764,7 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - TerminalCapabilitySetAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - TerminalCapabilitySetAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySetAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OOTerminalCapabilitySetReject:
@@ -1772,18 +1772,18 @@ int ooOnSendMsg
OOTRACEINFO3("Tunneled Message - TerminalCapabilitySetReject "
"(%s, %s)\n", call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - TerminalCapabilitySetReject (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - TerminalCapabilitySetReject (%s, %s)\n",
call->callType, call->callToken);
break;
case OOOpenLogicalChannel:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO4("Tunneled Message - OpenLogicalChannel(%d). (%s, %s)\n",
+ OOTRACEINFO4("Tunneled Message - OpenLogicalChannel(%d). (%s, %s)\n",
associatedChan, call->callType, call->callToken);
else
- OOTRACEINFO4("Sent Message - OpenLogicalChannel(%d). (%s, %s)\n",
+ OOTRACEINFO4("Sent Message - OpenLogicalChannel(%d). (%s, %s)\n",
associatedChan, call->callType, call->callToken);
/* Start LogicalChannel timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1794,8 +1794,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_OLC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooOpenLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooOpenLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create OpenLogicalChannel timer. "
@@ -1803,20 +1803,20 @@ int ooOnSendMsg
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
}
-
+
break;
case OOOpenLogicalChannelAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
OOTRACEINFO4("Tunneled Message - OpenLogicalChannelAck(%d) (%s,%s)\n",
associatedChan, call->callType, call->callToken);
else
- OOTRACEINFO4("Sent Message - OpenLogicalChannelAck(%d) (%s, %s)\n",
+ OOTRACEINFO4("Sent Message - OpenLogicalChannelAck(%d) (%s, %s)\n",
associatedChan, call->callType, call->callToken);
break;
case OOOpenLogicalChannelReject:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
OOTRACEINFO4("Tunneled Message - OpenLogicalChannelReject(%d)"
- "(%s, %s)\n", associatedChan, call->callType,
+ "(%s, %s)\n", associatedChan, call->callType,
call->callToken);
else
OOTRACEINFO4("Sent Message - OpenLogicalChannelReject(%d) (%s, %s)\n",
@@ -1824,16 +1824,16 @@ int ooOnSendMsg
break;
case OOEndSessionCommand:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - EndSessionCommand(%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - EndSessionCommand(%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - EndSessionCommand (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - EndSessionCommand (%s, %s)\n",
call->callType, call->callToken);
if((call->h245SessionState == OO_H245SESSION_ACTIVE))
- {
+ {
/* Start EndSession timer */
call->h245SessionState = OO_H245SESSION_ENDSENT;
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1844,7 +1844,7 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_SESSION_TIMER;
cbData->channelNumber = 0;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
&ooSessionTimerExpired, gH323ep.sessionTimeout, cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create EndSession timer. "
@@ -1861,13 +1861,13 @@ int ooOnSendMsg
break;
case OOCloseLogicalChannel:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - CloseLogicalChannel (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - CloseLogicalChannel (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - CloseLogicalChannel (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - CloseLogicalChannel (%s, %s)\n",
call->callType, call->callToken);
/* Start LogicalChannel timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1878,8 +1878,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_CLC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooCloseLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooCloseLogicalChannelTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create CloseLogicalChannel timer. "
@@ -1887,25 +1887,25 @@ int ooOnSendMsg
memFreePtr(call->pctxt, cbData);
return OO_FAILED;
}
-
+
break;
case OOCloseLogicalChannelAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - CloseLogicalChannelAck (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - CloseLogicalChannelAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - CloseLogicalChannelAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - CloseLogicalChannelAck (%s, %s)\n",
call->callType, call->callToken);
break;
case OORequestChannelClose:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - RequestChannelClose (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - RequestChannelClose (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - RequestChannelClose (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - RequestChannelClose (%s, %s)\n",
call->callType, call->callToken);
/* Start RequestChannelClose timer */
- cbData = (ooTimerCallback*) memAlloc(call->pctxt,
+ cbData = (ooTimerCallback*) memAlloc(call->pctxt,
sizeof(ooTimerCallback));
if(!cbData)
{
@@ -1916,8 +1916,8 @@ int ooOnSendMsg
cbData->call = call;
cbData->timerType = OO_RCC_TIMER;
cbData->channelNumber = associatedChan;
- if(!ooTimerCreate(call->pctxt, &call->timerList,
- &ooRequestChannelCloseTimerExpired, gH323ep.logicalChannelTimeout,
+ if(!ooTimerCreate(call->pctxt, &call->timerList,
+ &ooRequestChannelCloseTimerExpired, gH323ep.logicalChannelTimeout,
cbData, FALSE))
{
OOTRACEERR3("Error:Unable to create RequestChannelClose timer. "
@@ -1928,13 +1928,13 @@ int ooOnSendMsg
break;
case OORequestChannelCloseAck:
if(OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- OOTRACEINFO3("Tunneled Message - RequestChannelCloseAck (%s, %s)\n",
+ OOTRACEINFO3("Tunneled Message - RequestChannelCloseAck (%s, %s)\n",
call->callType, call->callToken);
else
- OOTRACEINFO3("Sent Message - RequestChannelCloseAck (%s, %s)\n",
+ OOTRACEINFO3("Sent Message - RequestChannelCloseAck (%s, %s)\n",
call->callType, call->callToken);
break;
-
+
default:
;
}
@@ -1965,7 +1965,7 @@ int ooStopMonitorCalls()
call = gH323ep.callList;
while(call)
{
- OOTRACEWARN3("Clearing call (%s, %s)\n", call->callType,
+ OOTRACEWARN3("Clearing call (%s, %s)\n", call->callType,
call->callToken);
call->callEndReason = OO_REASON_LOCAL_CLEARED;
ooCleanCall(call);
@@ -1974,7 +1974,7 @@ int ooStopMonitorCalls()
}
gH323ep.callList = NULL;
}
- OOTRACEINFO1("Stopping listener for incoming calls\n");
+ OOTRACEINFO1("Stopping listener for incoming calls\n");
if(gH323ep.listener)
{
ooSocketClose(*(gH323ep.listener));
@@ -2007,7 +2007,7 @@ OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock)
char buf[2];
if(ooSocketRecvPeek(sock, (ASN1OCTET*) buf, 2) == 0)
{
- OOTRACEWARN3("Broken pipe detected. (%s, %s)", call->callType,
+ OOTRACEWARN3("Broken pipe detected. (%s, %s)", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
call->callEndReason = OO_REASON_TRANSPORTFAILURE;
@@ -2016,4 +2016,4 @@ OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock)
}
}
return TRUE;
-}
+}
diff --git a/addons/ooh323c/src/oochannels.h b/addons/ooh323c/src/oochannels.h
index 76ce8ef30..9d3ecd58b 100644
--- a/addons/ooh323c/src/oochannels.h
+++ b/addons/ooh323c/src/oochannels.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file oochannels.h
- * This file contains functions to create and use channels.
+ * @file oochannels.h
+ * This file contains functions to create and use channels.
*/
#ifndef _OOCHANNELS_H_
#define _OOCHANNELS_H_
@@ -46,7 +46,7 @@ extern "C" {
struct OOH323CallData;
struct Q931Message;
-/**
+/**
* @defgroup channels Channel Management
* @{
*/
@@ -60,7 +60,7 @@ EXTERN int ooCreateH323Listener(void);
/**
* This function is used to create a listener for incoming H.245 connections.
* @param call Pointer to call for which H.245 listener has to be created
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCreateH245Listener(struct OOH323CallData *call);
@@ -75,7 +75,7 @@ EXTERN int ooCloseH245Listener(struct OOH323CallData *call);
/**
* This function is used to accept incoming H.225 connections.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooAcceptH225Connection(void);
@@ -84,16 +84,16 @@ EXTERN int ooAcceptH225Connection(void);
* This function is used to accept an incoming H.245 connection.
* @param call Pointer to a call for which H.245 connection request has
* arrived.
- *
+ *
* @return OO_OK, on succes. OO_FAILED, on failure.
*/
EXTERN int ooAcceptH245Connection(struct OOH323CallData *call);
/**
* This function is used to create an H.225 connection to the remote end point.
- * @param call Pointer to the call for which H.225 connection has to be
+ * @param call Pointer to the call for which H.225 connection has to be
* setup.
- * @return OO_OK, on succes. OO_FAILED, on failure.
+ * @return OO_OK, on succes. OO_FAILED, on failure.
*/
EXTERN int ooCreateH225Connection(struct OOH323CallData *call);
@@ -108,17 +108,17 @@ EXTERN int ooCreateH245Connection(struct OOH323CallData *call);
/**
* This function is used to close an H.225 connection
- * @param call Pointer to the call for which H.225 connection has to be
+ * @param call Pointer to the call for which H.225 connection has to be
* closed.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooCloseH225Connection(struct OOH323CallData *call);
/**
- * This function is used to close an H.245 connection for a call.
+ * This function is used to close an H.245 connection for a call.
*
- * @param call Pointer to call for which H.245 connection has
+ * @param call Pointer to call for which H.245 connection has
* to be closed.
* @return OO_OK, on success. OO_FAILED, on failure.
*/
@@ -127,7 +127,7 @@ EXTERN int ooCloseH245Connection(struct OOH323CallData *call);
/**
* This function is used to start monitoring channels for the calls. It has
* an infinite loop which uses select to monitor various channels.
- *
+ *
*/
EXTERN int ooMonitorChannels(void);
EXTERN int ooMonitorCmdChannels(void);
@@ -144,22 +144,22 @@ EXTERN void ooStopMonitorCallChannels(OOH323CallData *);
/**
* This function is used to receive an H.2250 message received on a calls
- * H.225 channel. It receives the message, decodes it and calls
+ * H.225 channel. It receives the message, decodes it and calls
* 'ooHandleH2250Message' to process the message.
- * @param call Pointer to the call for which the message has to be
+ * @param call Pointer to the call for which the message has to be
* received.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH2250Receive(struct OOH323CallData *call);
/**
* This function is used to receive an H.245 message received on a calls
- * H.245 channel. It receives the message, decodes it and calls
+ * H.245 channel. It receives the message, decodes it and calls
* 'ooHandleH245Message' to process it.
- * @param call Pointer to the call for which the message has to be
+ * @param call Pointer to the call for which the message has to be
* received.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH245Receive(struct OOH323CallData *call);
@@ -175,7 +175,7 @@ EXTERN int ooH245Receive(struct OOH323CallData *call);
EXTERN int ooSendH225Msg(struct OOH323CallData *call, struct Q931Message *msg);
/**
- * This function is used to Send a message on the channel, when channel is
+ * This function is used to Send a message on the channel, when channel is
* available for write.
* @param call Pointer to call for which message has to be sent.
* @param type Type of the message.
@@ -197,11 +197,11 @@ EXTERN int ooSendMsg(struct OOH323CallData *call, int type);
* @return OO_OK, on success. OO_FAILED, on failure
*/
EXTERN int ooOnSendMsg
- (struct OOH323CallData *call, int msgType, int tunneledMsgType,
+ (struct OOH323CallData *call, int msgType, int tunneledMsgType,
int associatedChan);
/**
- * This function is used to check the status of tcp connection.
+ * This function is used to check the status of tcp connection.
* @param call Handle to the call to which connection belongs.
* @param sock Connected socket.
*
@@ -209,11 +209,10 @@ EXTERN int ooOnSendMsg
*/
EXTERN OOBOOL ooChannelsIsConnectionOK(OOH323CallData *call, OOSOCKET sock);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
#endif
#endif
-
diff --git a/addons/ooh323c/src/ooh245.c b/addons/ooh323c/src/ooh245.c
index 39b399452..adff91790 100644
--- a/addons/ooh323c/src/ooh245.c
+++ b/addons/ooh323c/src/ooh245.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -55,7 +55,7 @@ int ooCreateH245Message(OOH323CallData* call, H245Message **pph245msg, int type)
switch(type)
{
case T_H245MultimediaSystemControlMessage_request:
- (*pph245msg)->h245Msg.u.request = (H245RequestMessage*)
+ (*pph245msg)->h245Msg.u.request = (H245RequestMessage*)
memAllocZ (pctxt, sizeof(H245RequestMessage));
/*Check for successful mem allocation, and if successful initialize
@@ -135,7 +135,7 @@ int ooFreeH245Message(OOH323CallData *call, H245Message *pmsg)
}
#ifndef _COMPACT
-static void ooPrintH245Message
+static void ooPrintH245Message
(OOH323CallData* call, ASN1OCTET* msgbuf, ASN1UINT msglen)
{
OOCTXT ctxt;
@@ -154,12 +154,12 @@ static void ooPrintH245Message
ret = asn1PD_H245MultimediaSystemControlMessage(&ctxt, &mmMsg);
if(ret != ASN_OK)
{
- OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
+ OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
call->callType, call->callToken);
OOTRACEERR1 (errGetText (&ctxt));
}
finishPrint();
- freeContext(&ctxt);
+ freeContext(&ctxt);
}
#endif
@@ -177,7 +177,7 @@ int ooEncodeH245Message
if(!msgbuf || size<200)
{
OOTRACEERR3("Error: Invalid message buffer/size for "
- "ooEncodeH245Message. (%s, %s)\n",
+ "ooEncodeH245Message. (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -188,7 +188,7 @@ int ooEncodeH245Message
/* This will contain the total length of the encoded message */
msgbuf[i++] = 0;
msgbuf[i++] = 0;
-
+
if(!OO_TESTFLAG (call->flags, OO_M_TUNNELING))
{
/* Populate message buffer to be returned */
@@ -196,25 +196,25 @@ int ooEncodeH245Message
msgbuf[i++] = 3; /* TPKT version */
msgbuf[i++] = 0; /* TPKT resevred */
/* 1st octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* 2nd octet of length, will be populated once len is determined */
msgbuf[i++] = 0;
}
-
+
setPERBuffer (pctxt, (unsigned char*) msgbuf+i, (size-i), TRUE);
/* stat = asn1PE_H245MultimediaSystemControlMessage (&gH323ep.msgctxt, */
- stat = asn1PE_H245MultimediaSystemControlMessage (call->msgctxt,
+ stat = asn1PE_H245MultimediaSystemControlMessage (call->msgctxt,
multimediaMsg);
if (stat != ASN_OK) {
- OOTRACEERR3 ("ERROR: H245 Message encoding failed (%s, %s)\n",
+ OOTRACEERR3 ("ERROR: H245 Message encoding failed (%s, %s)\n",
call->callType, call->callToken);
/* OOTRACEERR1 (errGetText (&gH323ep.msgctxt)); */
OOTRACEERR1 (errGetText (call->msgctxt));
return OO_FAILED;
}
-
+
encodePtr = encodeGetMsgPtr(pctxt, &encodeLen);
len +=encodeLen;
msgbuf[3] = (len>>8);
@@ -250,14 +250,14 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
if(iRet != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode H245 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed to encode H245 message. (%s, %s)\n",
call->callType, call->callToken);
memFreePtr (call->pctxt, encodebuf);
return OO_FAILED;
}
if(!call->pH245Channel)
{
- call->pH245Channel =
+ call->pH245Channel =
(OOH323Channel*) memAllocZ (call->pctxt, sizeof(OOH323Channel));
if(!call->pH245Channel)
{
@@ -268,7 +268,7 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
}
}
- /* We need to send EndSessionCommand immediately.*/
+ /* We need to send EndSessionCommand immediately.*/
if(!OO_TESTFLAG(call->flags, OO_M_TUNNELING)){
if(encodebuf[0]== OOEndSessionCommand) /* High priority message */
{
@@ -278,9 +278,9 @@ int ooSendH245Msg(OOH323CallData *call, H245Message *msg)
}
else{
dListAppend (call->pctxt, &call->pH245Channel->outQueue, encodebuf);
- OOTRACEDBGC4("Queued H245 messages %d. (%s, %s)\n",
- call->pH245Channel->outQueue.count,
- call->callType, call->callToken);
+ OOTRACEDBGC4("Queued H245 messages %d. (%s, %s)\n",
+ call->pH245Channel->outQueue.count,
+ call->callType, call->callToken);
}
}
else{
@@ -340,10 +340,10 @@ int ooSendTermCapMsg(OOH323CallData *call)
"progress. (%s, %s)\n", call->callType, call->callToken);
return OO_OK;
}
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
-
+
if(ret == OO_FAILED)
{
OOTRACEERR3("Error:Failed to create H245 message for Terminal "
@@ -363,16 +363,16 @@ int ooSendTermCapMsg(OOH323CallData *call)
call->callType, call->callToken);
return OO_FAILED;
}
-
+
request->t = T_H245RequestMessage_terminalCapabilitySet;
request->u.terminalCapabilitySet = (H245TerminalCapabilitySet*)
- memAlloc(pctxt, sizeof(H245TerminalCapabilitySet));
+ memAlloc(pctxt, sizeof(H245TerminalCapabilitySet));
termCap = request->u.terminalCapabilitySet;
memset(termCap, 0, sizeof(H245TerminalCapabilitySet));
termCap->m.multiplexCapabilityPresent = 0;
termCap->m.capabilityTablePresent = 1;
termCap->m.capabilityDescriptorsPresent = 1;
- termCap->sequenceNumber = ++(call->localTermCapSeqNo);
+ termCap->sequenceNumber = ++(call->localTermCapSeqNo);
termCap->protocolIdentifier = gh245ProtocolID; /* protocol id */
/* Initialize alternate sets */
@@ -394,7 +394,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
/* Add audio Capabilities */
-
+
dListInit(&(termCap->capabilityTable));
for(k=0; k<(int)call->capPrefs.index; k++)
{
@@ -402,8 +402,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
epCap = call->ourCaps;
else
epCap = gH323ep.myCaps;
- while(epCap) {
- if(epCap->cap == call->capPrefs.order[k])
+ while(epCap) {
+ if(epCap->cap == call->capPrefs.order[k])
break;
epCap = epCap->next;
}
@@ -417,8 +417,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(epCap->capType == OO_CAP_TYPE_AUDIO)
{
- /* Create audio capability. If capability supports receive, we only
- add it as receive capability in TCS. However, if it supports only
+ /* Create audio capability. If capability supports receive, we only
+ add it as receive capability in TCS. However, if it supports only
transmit, we add it as transmit capability in TCS.
*/
if((epCap->dir & OORX))
@@ -431,7 +431,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!audioCap)
{
OOTRACEWARN4("WARN:Failed to create audio capability %s "
- "(%s, %s)\n", ooGetCapTypeText(epCap->cap),
+ "(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
}
@@ -447,11 +447,11 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEWARN3("Warn:Capability is not RX/TX/RXANDTX. Symmetric "
- "capabilities are not supported.(%s, %s)\n",
+ "capabilities are not supported.(%s, %s)\n",
call->callType, call->callToken);
continue;
}
@@ -484,8 +484,8 @@ int ooSendTermCapMsg(OOH323CallData *call)
else if(epCap->capType == OO_CAP_TYPE_DATA)
{
- /* Create t.38 capability. If capability supports receive, we only
- add it as receive capability in TCS. However, if it supports only
+ /* Create t.38 capability. If capability supports receive, we only
+ add it as receive capability in TCS. However, if it supports only
transmit, we add it as transmit capability in TCS.
*/
if((epCap->dir & OORX) && !(epCap->dir & OOTX))
@@ -514,7 +514,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n",
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEDBGC3("Sending transmit&recevie capability t38 in TCS.(%s, %s)\n",
@@ -526,7 +526,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n",
call->callType, call->callToken);
continue;
- }
+ }
}
/* Add Capabilities to Capability Table */
entry = (H245CapabilityTableEntry*) memAlloc(pctxt,
@@ -581,11 +581,11 @@ int ooSendTermCapMsg(OOH323CallData *call)
"(%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
continue;
- }
+ }
}
else{
OOTRACEWARN3("Warn:Capability is not RX/TX/RXANDTX. Symmetric "
- "capabilities are not supported.(%s, %s)\n",
+ "capabilities are not supported.(%s, %s)\n",
call->callType, call->callToken);
continue;
}
@@ -632,18 +632,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveRTPAudioTelephonyEventCapability;
entry->capability.u.receiveRTPAudioTelephonyEventCapability = ateCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -668,18 +668,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveDataApplicationCapability;
entry->capability.u.receiveDataApplicationCapability = rtdCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -704,18 +704,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -740,18 +740,18 @@ int ooSendTermCapMsg(OOH323CallData *call)
if(!entry)
{
OOTRACEERR3("Error:Failed to allocate memory for new capability "
- "table entry. (%s, %s)\n", call->callType,
+ "table entry. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
memset(entry, 0, sizeof(H245CapabilityTableEntry));
entry->m.capabilityPresent = 1;
entry->capability.t = T_H245Capability_receiveAndTransmitUserInputCapability;
entry->capability.u.receiveAndTransmitUserInputCapability = userInputCap;
-
+
entry->capabilityTableEntryNumber = i+1;
dListAppend(pctxt , &(termCap->capabilityTable), entry);
altSetDtmf->elem[altSetDtmf->n] = i+1;
@@ -761,7 +761,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
}
}
-
+
/*TODO:Add Video and Data capabilities, if required*/
if(i==0)
{
@@ -770,7 +770,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
ooFreeH245Message(call,ph245msg);
return OO_FAILED;
}
-
+
/* Define capability descriptior */
capDesc = (H245CapabilityDescriptor*)
memAlloc(pctxt, sizeof(H245CapabilityDescriptor));
@@ -790,7 +790,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
memset(altSet, 0, sizeof(H245AlternativeCapabilitySet));
altSet->n = 1;
altSet->elem[0] = j+1;
-
+
dListAppend(pctxt, &(capDesc->simultaneousCapabilities), altSet);
} */
@@ -801,7 +801,7 @@ int ooSendTermCapMsg(OOH323CallData *call)
dListInit(&(termCap->capabilityDescriptors));
dListAppend(pctxt, &(termCap->capabilityDescriptors), capDesc);
- OOTRACEDBGA3("Built terminal capability set message (%s, %s)\n",
+ OOTRACEDBGA3("Built terminal capability set message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -882,11 +882,11 @@ ASN1UINT ooGenerateStatusDeterminationNumber()
statusDeterminationNumber = rand()%16777215;
return statusDeterminationNumber;
}
-/* TODO: Should Send MasterSlave Release when no response from
+/* TODO: Should Send MasterSlave Release when no response from
Remote endpoint after MasterSlaveDetermination sent within
timeout.
*/
-int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
+int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
int msgType)
{
H245MasterSlaveDetermination *masterSlave;
@@ -898,10 +898,10 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
case OOMasterSlaveDetermination:
OOTRACEINFO3("Master Slave Determination received (%s, %s)\n",
call->callType, call->callToken);
-
+
masterSlave = (H245MasterSlaveDetermination*)pmsg;
- if(call->masterSlaveState != OO_MasterSlave_DetermineSent &&
+ if(call->masterSlaveState != OO_MasterSlave_DetermineSent &&
OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
{
ooSendMasterSlaveDeterminationAck(call, "slave");
@@ -929,21 +929,21 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
/* Since term types are same, master slave determination will
be done based on statusdetermination number
*/
-
+
OOTRACEDBGA3("Determining master-slave based on StatusDetermination"
"Number (%s, %s)\n", call->callType, call->callToken);
if(call->masterSlaveState == OO_MasterSlave_DetermineSent)
statusDeterminationNumber = call->statusDeterminationNumber;
else
- if (OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
+ if (OO_TESTFLAG(gH323ep.flags, OO_M_TRYBEMASTER))
statusDeterminationNumber = masterSlave->statusDeterminationNumber - 1;
else
statusDeterminationNumber = ooGenerateStatusDeterminationNumber();
moduloDiff = (masterSlave->statusDeterminationNumber - statusDeterminationNumber)
&0xffffff;
-
- /* if(masterSlave->statusDeterminationNumber >
+
+ /* if(masterSlave->statusDeterminationNumber >
statusDeterminationNumber) */
if (moduloDiff < 0x800000 && moduloDiff != 0)
{
@@ -953,7 +953,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
call->callType, call->callToken);
return OO_OK;
}
- /* if(masterSlave->statusDeterminationNumber <
+ /* if(masterSlave->statusDeterminationNumber <
statusDeterminationNumber) */
if (moduloDiff > 0x800000)
{
@@ -963,7 +963,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
call->callType, call->callToken);
return OO_OK;
}
- /* if(masterSlave->statusDeterminationNumber ==
+ /* if(masterSlave->statusDeterminationNumber ==
statusDeterminationNumber) */
if (moduloDiff == 0 || moduloDiff == 0x800000)
{
@@ -978,7 +978,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
masterSlaveAck = (H245MasterSlaveDeterminationAck*)pmsg;
if(call->masterSlaveState == OO_MasterSlave_DetermineSent)
{
- if(masterSlaveAck->decision.t ==
+ if(masterSlaveAck->decision.t ==
T_H245MasterSlaveDeterminationAck_decision_master)
{
ooSendMasterSlaveDeterminationAck(call, "slave");
@@ -996,7 +996,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
}
call->msAckStatus = OO_msAck_remoteReceived;
-
+
if(call->localTermCapState == OO_LocalTermCapSetAckRecvd &&
call->remoteTermCapState == OO_RemoteTermCapSetAckSent)
{
@@ -1025,7 +1025,7 @@ int ooHandleMasterSlave(OOH323CallData *call, void * pmsg,
OOTRACEWARN3("Warn:Unhandled Master Slave message received - %s - "
"%s\n", call->callType, call->callToken);
}
- return OO_OK;
+ return OO_OK;
}
int ooSendMasterSlaveDetermination(OOH323CallData *call)
@@ -1059,27 +1059,27 @@ int ooSendMasterSlaveDetermination(OOH323CallData *call)
request->u.masterSlaveDetermination = (H245MasterSlaveDetermination*)
ASN1MALLOC(pctxt, sizeof(H245MasterSlaveDetermination));
-
+
pMasterSlave = request->u.masterSlaveDetermination;
- memset(pMasterSlave, 0, sizeof(H245MasterSlaveDetermination));
- pMasterSlave->terminalType = gH323ep.termType;
- pMasterSlave->statusDeterminationNumber =
+ memset(pMasterSlave, 0, sizeof(H245MasterSlaveDetermination));
+ pMasterSlave->terminalType = gH323ep.termType;
+ pMasterSlave->statusDeterminationNumber =
ooGenerateStatusDeterminationNumber();
call->statusDeterminationNumber = pMasterSlave->statusDeterminationNumber;
OOTRACEDBGA3("Built MasterSlave Determination (%s, %s)\n", call->callType,
- call->callToken);
+ call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue MasterSlaveDetermination message to"
- " outbound queue. (%s, %s)\n", call->callType,
+ " outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
else
call->masterSlaveState = OO_MasterSlave_DetermineSent;
-
+
ooFreeH245Message(call, ph245msg);
return ret;
@@ -1094,12 +1094,12 @@ int ooSendMasterSlaveDeterminationAck(OOH323CallData* call,
/* OOCTXT *pctxt=&gH323ep.msgctxt; */
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Ack (%s, %s)\n",call->callType,
+ "Determination Ack (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1109,25 +1109,25 @@ int ooSendMasterSlaveDeterminationAck(OOH323CallData* call,
response->t = T_H245ResponseMessage_masterSlaveDeterminationAck;
response->u.masterSlaveDeterminationAck = (H245MasterSlaveDeterminationAck*)
ASN1MALLOC(pctxt, sizeof(H245MasterSlaveDeterminationAck));
- memset(response->u.masterSlaveDeterminationAck, 0,
+ memset(response->u.masterSlaveDeterminationAck, 0,
sizeof(H245MasterSlaveDeterminationAck));
if(!strcmp("master", status))
- response->u.masterSlaveDeterminationAck->decision.t =
+ response->u.masterSlaveDeterminationAck->decision.t =
T_H245MasterSlaveDeterminationAck_decision_master;
else
- response->u.masterSlaveDeterminationAck->decision.t =
+ response->u.masterSlaveDeterminationAck->decision.t =
T_H245MasterSlaveDeterminationAck_decision_slave;
-
- OOTRACEDBGA3("Built MasterSlave determination Ack (%s, %s)\n",
+
+ OOTRACEDBGA3("Built MasterSlave determination Ack (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue MasterSlaveDeterminationAck message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
call->msAckStatus = OO_msAck_localSent;
return ret;
@@ -1146,7 +1146,7 @@ int ooSendMasterSlaveDeterminationReject (OOH323CallData* call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Reject (%s, %s)\n",call->callType,
+ "Determination Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1155,25 +1155,25 @@ int ooSendMasterSlaveDeterminationReject (OOH323CallData* call)
response->t = T_H245ResponseMessage_masterSlaveDeterminationReject;
- response->u.masterSlaveDeterminationReject =
+ response->u.masterSlaveDeterminationReject =
(H245MasterSlaveDeterminationReject*)
memAlloc (pctxt, sizeof(H245MasterSlaveDeterminationReject));
response->u.masterSlaveDeterminationReject->cause.t =
T_H245MasterSlaveDeterminationReject_cause_identicalNumbers;
- OOTRACEDBGA3 ("Built MasterSlave determination reject (%s, %s)\n",
+ OOTRACEDBGA3 ("Built MasterSlave determination reject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue MasterSlaveDeterminationReject "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
@@ -1192,7 +1192,7 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - MasterSlave "
- "Determination Release (%s, %s)\n",call->callType,
+ "Determination Release (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1201,7 +1201,7 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
indication->t = T_H245IndicationMessage_masterSlaveDeterminationRelease;
- indication->u.masterSlaveDeterminationRelease =
+ indication->u.masterSlaveDeterminationRelease =
(H245MasterSlaveDeterminationRelease*)
memAlloc (pctxt, sizeof(H245MasterSlaveDeterminationRelease));
@@ -1212,18 +1212,18 @@ int ooSendMasterSlaveDeterminationRelease(OOH323CallData * call)
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- OOTRACEDBGA3 ("Built MasterSlave determination Release (%s, %s)\n",
+ OOTRACEDBGA3 ("Built MasterSlave determination Release (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue MasterSlaveDeterminationRelease "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -1234,7 +1234,7 @@ int ooHandleMasterSlaveReject
if(call->msdRetries < DEFAULT_MAX_RETRIES)
{
call->msdRetries++;
- OOTRACEDBGA3("Retrying MasterSlaveDetermination. (%s, %s)\n",
+ OOTRACEDBGA3("Retrying MasterSlaveDetermination. (%s, %s)\n",
call->callType, call->callToken);
call->masterSlaveState = OO_MasterSlave_Idle;
ooSendMasterSlaveDetermination(call);
@@ -1260,12 +1260,12 @@ int ooSendRequestModeAck(OOH323CallData* call,
H245Message *ph245msg=NULL;
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequestMode "
- "Ack (%s, %s)\n",call->callType,
+ "Ack (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1275,23 +1275,23 @@ int ooSendRequestModeAck(OOH323CallData* call,
response->t = T_H245ResponseMessage_requestModeAck;
response->u.requestModeAck = (H245RequestModeAck *)
ASN1MALLOC(pctxt, sizeof(H245RequestModeAck));
- memset(response->u.requestModeAck, 0,
+ memset(response->u.requestModeAck, 0,
sizeof(H245RequestModeAck));
response->u.requestModeAck->sequenceNumber = sequenceNumber;
- response->u.requestModeAck->response.t =
+ response->u.requestModeAck->response.t =
T_H245RequestModeAck_response_willTransmitMostPreferredMode;
- OOTRACEDBGA3("Built RequestModeAck (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestModeAck (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestModeAck message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1304,12 +1304,12 @@ int ooSendRequestModeReject(OOH323CallData* call,
H245Message *ph245msg=NULL;
OOCTXT *pctxt=call->msgctxt;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequstMode "
- "Reject (%s, %s)\n",call->callType,
+ "Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1319,23 +1319,23 @@ int ooSendRequestModeReject(OOH323CallData* call,
response->t = T_H245ResponseMessage_requestModeReject;
response->u.requestModeReject = (H245RequestModeReject *)
ASN1MALLOC(pctxt, sizeof(H245RequestModeReject));
- memset(response->u.requestModeReject, 0,
+ memset(response->u.requestModeReject, 0,
sizeof(H245RequestModeReject));
response->u.requestModeReject->sequenceNumber = sequenceNumber;
- response->u.requestModeReject->cause.t =
+ response->u.requestModeReject->cause.t =
T_H245RequestModeReject_cause_modeUnavailable;
- OOTRACEDBGA3("Built RequestModeReject (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestModeReject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestModeReject message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1355,12 +1355,12 @@ int ooSendRequestMode(OOH323CallData* call,
if (isT38Mode && !OO_TESTFLAG(call->flags, OO_M_T38SUPPORTED)) /* t38 req but we dont support */
return OO_OK;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR3("Error:H245 message creation failed for - RequstMode "
- "(%s, %s)\n",call->callType,
+ "(%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1371,7 +1371,7 @@ int ooSendRequestMode(OOH323CallData* call,
request->u.requestMode = (H245RequestMode *)
ASN1MALLOC(pctxt, sizeof(H245RequestMode));
- memset(request->u.requestMode, 0,
+ memset(request->u.requestMode, 0,
sizeof(H245RequestMode));
call->requestSequence++;
@@ -1390,7 +1390,7 @@ int ooSendRequestMode(OOH323CallData* call,
pModeElem.type.u.dataMode->bitRate = 144;
if (!ooCreateT38ApplicationData(pctxt,&(pModeElem.type.u.dataMode->application))) {
OOTRACEERR3("Error:Memory - ooCapabilityCreateT38Capability - (%s, %s)\n",
- call->callType,
+ call->callType,
call->callToken);
}
} else {
@@ -1414,10 +1414,10 @@ int ooSendRequestMode(OOH323CallData* call,
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue RequestMode message"
- " to outbound queue. (%s, %s)\n", call->callType,
+ " to outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message(call, ph245msg);
return ret;
}
@@ -1451,7 +1451,7 @@ void ooOnReceivedRequestModeAck(OOH323CallData* call, H245RequestModeAck * reque
int ooHandleRequestMode(OOH323CallData* call,
H245RequestMode *requestMode)
{
-
+
H245ModeDescription** pModeRef;
H245ModeElement** pModeElem;
H245ModeElementType* pMode;
@@ -1461,7 +1461,7 @@ int ooHandleRequestMode(OOH323CallData* call,
pMode = &((*pModeElem)->type);
OOTRACEDBGA5("Handle RequestMode: "
" modetype: %d/%d for (%s, %s)\n", pMode->t, pMode->u.dataMode->application.t,
- call->callType,
+ call->callType,
call->callToken);
switch (pMode->t) {
case T_H245ModeElementType_dataMode:
@@ -1483,7 +1483,7 @@ int ooHandleRequestMode(OOH323CallData* call,
}
break;
case T_H245ModeElementType_audioMode:
- if (ooSendRequestModeAck(call, requestMode->sequenceNumber) == OO_OK &&
+ if (ooSendRequestModeAck(call, requestMode->sequenceNumber) == OO_OK &&
OO_TESTFLAG(call->flags, OO_M_DATASESSION)) {
OO_CLRFLAG(call->flags, OO_M_DATASESSION);
@@ -1499,22 +1499,22 @@ int ooHandleRequestMode(OOH323CallData* call,
;
}
return OO_OK;
-
+
}
-int ooHandleOpenLogicalChannel(OOH323CallData* call,
+int ooHandleOpenLogicalChannel(OOH323CallData* call,
H245OpenLogicalChannel *olc)
{
H245OpenLogicalChannel_forwardLogicalChannelParameters *flcp =
&(olc->forwardLogicalChannelParameters);
-
+
#if 0
if(!call->logicalChans)
ooOpenLogicalChannels(call);
#endif
- /* Check whether channel type is supported. Only supported channel
+ /* Check whether channel type is supported. Only supported channel
type for now is g711ulaw audio channel.
*/
switch(flcp->dataType.t)
@@ -1587,17 +1587,17 @@ int ooHandleOpenLogicalChannel(OOH323CallData* call,
T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported);
break;
default:
- OOTRACEERR3("ERROR:Unknown media channel data type (%s, %s)\n",
+ OOTRACEERR3("ERROR:Unknown media channel data type (%s, %s)\n",
call->callType, call->callToken);
ooSendOpenLogicalChannelReject(call, olc->forwardLogicalChannelNumber,
T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported);
}
-
+
return OO_OK;
-}
+}
/*TODO: Need to clean logical channel in case of failure after creating one */
-int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
+int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
H245OpenLogicalChannel*olc)
{
int ret=0;
@@ -1618,7 +1618,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(!flcp || flcp->multiplexParameters.t != T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR3("Error:ooHandleOpenLogicalChannel_helper - invalid forward "
- "logical channel parameters. (%s, %s)\n", call->callType,
+ "logical channel parameters. (%s, %s)\n", call->callType,
call->callToken);
ooSendOpenLogicalChannelReject(call, olc->forwardLogicalChannelNumber,
T_H245OpenLogicalChannelReject_cause_unspecified);
@@ -1641,7 +1641,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(ret != OO_OK)
{
OOTRACEERR3("Error: H245 message creation failed for - "
- "OpenLogicalChannel Ack (%s, %s)\n", call->callType,
+ "OpenLogicalChannel Ack (%s, %s)\n", call->callType,
call->callToken);
memFreePtr(call->pctxt, epCap);
epCap = NULL;
@@ -1656,18 +1656,18 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
memset(response, 0, sizeof(H245ResponseMessage));
response->t = T_H245ResponseMessage_openLogicalChannelAck;
response->u.openLogicalChannelAck = (H245OpenLogicalChannelAck*)
- memAlloc(pctxt, sizeof(H245OpenLogicalChannelAck));
+ memAlloc(pctxt, sizeof(H245OpenLogicalChannelAck));
olcAck = response->u.openLogicalChannelAck;
memset(olcAck, 0, sizeof(H245OpenLogicalChannelAck));
olcAck->forwardLogicalChannelNumber = olc->forwardLogicalChannelNumber;
olcAck->m.forwardMultiplexAckParametersPresent = 1;
- olcAck->forwardMultiplexAckParameters.t =
+ olcAck->forwardMultiplexAckParameters.t =
T_H245OpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters;
- olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters =
- (H245H2250LogicalChannelAckParameters*)ASN1MALLOC(pctxt,
+ olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters =
+ (H245H2250LogicalChannelAckParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelAckParameters));
- h2250lcap =
+ h2250lcap =
olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters;
memset(h2250lcap, 0, sizeof(H245H2250LogicalChannelAckParameters));
@@ -1679,8 +1679,8 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
h2250lcap->sessionID = ooCallGenerateSessionID(call, epCap->capType, "receive");
else
h2250lcap->sessionID = h2250lcp->sessionID;
-
- h2250lcap->mediaChannel.t =
+
+ h2250lcap->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcap->mediaChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -1702,12 +1702,12 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
memset(iPAddress, 0, sizeof(H245UnicastAddress_iPAddress));
}
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, h2250lcap->sessionID,
"receive", epCap);
if(!pLogicalChannel)
{
- OOTRACEERR3("ERROR:Failed to add new logical channel entry to call "
+ OOTRACEERR3("ERROR:Failed to add new logical channel entry to call "
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
@@ -1723,7 +1723,7 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
}
/* media contrcol channel */
- h2250lcap->mediaControlChannel.t =
+ h2250lcap->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcap->mediaControlChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -1752,13 +1752,13 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
iPAddress1->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
- OOTRACEDBGA3("Built OpenLogicalChannelAck (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Built OpenLogicalChannelAck (%s, %s)\n", call->callType,
call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to enqueue OpenLogicalChannelAck message to "
- "outbound queue. (%s, %s)\n", call->callType,
+ "outbound queue. (%s, %s)\n", call->callType,
call->callToken);
}
ooFreeH245Message(call, ph245msg);
@@ -1766,10 +1766,10 @@ int ooHandleOpenLogicalChannel_helper(OOH323CallData *call,
if(epCap->startReceiveChannel)
{
- epCap->startReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO6("Receive channel of type %s started at %s:%d(%s, %s)\n",
+ epCap->startReceiveChannel(call, pLogicalChannel);
+ OOTRACEINFO6("Receive channel of type %s started at %s:%d(%s, %s)\n",
ooGetCapTypeText(epCap->cap), pLogicalChannel->localIP,
- pLogicalChannel->localRtpPort, call->callType,
+ pLogicalChannel->localRtpPort, call->callType,
call->callToken);
}
else{
@@ -1795,7 +1795,7 @@ int ooSendOpenLogicalChannelReject
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - OpenLogicalChannel"
- "Reject (%s, %s)\n",call->callType,
+ "Reject (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1804,34 +1804,34 @@ int ooSendOpenLogicalChannelReject
response->t = T_H245ResponseMessage_openLogicalChannelReject;
- response->u.openLogicalChannelReject =
+ response->u.openLogicalChannelReject =
(H245OpenLogicalChannelReject*)
memAlloc (pctxt, sizeof(H245OpenLogicalChannelReject));
if(!response->u.openLogicalChannelReject)
{
OOTRACEERR3("Error: Failed to allocate memory for OpenLogicalChannel"
- "Reject message. (%s, %s)\n", call->callType,
+ "Reject message. (%s, %s)\n", call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- response->u.openLogicalChannelReject->forwardLogicalChannelNumber =
+ response->u.openLogicalChannelReject->forwardLogicalChannelNumber =
channelNum;
response->u.openLogicalChannelReject->cause.t = cause;
- OOTRACEDBGA3 ("Built OpenLogicalChannelReject (%s, %s)\n",
+ OOTRACEDBGA3 ("Built OpenLogicalChannelReject (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue OpenLogicalChannelReject "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
@@ -1853,20 +1853,20 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
H245UnicastAddress_iP6Address *iP6Address1 = NULL;
if(!((olcAck->m.forwardMultiplexAckParametersPresent == 1) &&
- (olcAck->forwardMultiplexAckParameters.t ==
+ (olcAck->forwardMultiplexAckParameters.t ==
T_H245OpenLogicalChannelAck_forwardMultiplexAckParameters_h2250LogicalChannelAckParameters)))
{
OOTRACEERR3("Error: Processing open logical channel ack - LogicalChannel"
- "Ack parameters absent (%s, %s)\n", call->callType,
+ "Ack parameters absent (%s, %s)\n", call->callType,
call->callToken);
return OO_OK; /* should send CloseLogicalChannel request */
}
- h2250lcap =
+ h2250lcap =
olcAck->forwardMultiplexAckParameters.u.h2250LogicalChannelAckParameters;
/* Extract media channel address */
if(h2250lcap->m.mediaChannelPresent != 1)
- {
+ {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
"absent (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
@@ -1874,51 +1874,51 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
if(h2250lcap->mediaChannel.t != T_H245TransportAddress_unicastAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not unicast (%s, %s)\n", call->callType,
+ "address type is not unicast (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
unicastAddr = h2250lcap->mediaChannel.u.unicastAddress;
if (call->versionIP == 6) {
if(unicastAddr->t != T_H245UnicastAddress_iP6Address)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not IP6 (%s, %s)\n", call->callType,
+ "address type is not IP6 (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
iP6Address = unicastAddr->u.iP6Address;
inet_ntop(AF_INET6, iP6Address->network.data, remoteip, sizeof(remoteip));
-
+
} else {
if(unicastAddr->t != T_H245UnicastAddress_iPAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media channel "
- "address type is not IP (%s, %s)\n", call->callType,
+ "address type is not IP (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
iPAddress = unicastAddr->u.iPAddress;
inet_ntop(AF_INET, iPAddress->network.data, remoteip, sizeof(remoteip));
}
-
+
/* Extract media control channel address */
if(h2250lcap->m.mediaControlChannelPresent == 1) {
- if(h2250lcap->mediaControlChannel.t !=
+ if(h2250lcap->mediaControlChannel.t !=
T_H245TransportAddress_unicastAddress)
{
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not unicast (%s, %s)\n",
+ "channel address type is not unicast (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
-
+
unicastAddr1 = h2250lcap->mediaControlChannel.u.unicastAddress;
if (call->versionIP == 6) {
if(unicastAddr1->t != T_H245UnicastAddress_iP6Address) {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not IP6 (%s, %s)\n", call->callType,
+ "channel address type is not IP6 (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1926,7 +1926,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
} else {
if(unicastAddr1->t != T_H245UnicastAddress_iPAddress) {
OOTRACEERR3("Error: Processing OpenLogicalChannelAck - media control "
- "channel address type is not IP (%s, %s)\n", call->callType,
+ "channel address type is not IP (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -1939,21 +1939,21 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
/* Set remote destination address for rtp session */
// strcpy(call->remoteIP, remoteip);
-
+
/* Start channel here */
pLogicalChannel = ooFindLogicalChannelByLogicalChannelNo(call,olcAck->forwardLogicalChannelNumber);
if(!pLogicalChannel)
{
OOTRACEERR4("ERROR:Logical channel %d not found in the channel list for "
- "call (%s, %s)\n", olcAck->forwardLogicalChannelNumber,
+ "call (%s, %s)\n", olcAck->forwardLogicalChannelNumber,
call->callType, call->callToken);
return OO_FAILED;
}
- /* Update session id if we were waiting for remote to assign one and remote
+ /* Update session id if we were waiting for remote to assign one and remote
did assign one. */
if(pLogicalChannel->sessionID == 0 && h2250lcap->m.sessionIDPresent)
- pLogicalChannel->sessionID = h2250lcap->sessionID;
+ pLogicalChannel->sessionID = h2250lcap->sessionID;
/* Populate ports &ip for channel */
@@ -1965,7 +1965,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
}
}
- strcpy(pLogicalChannel->remoteIP, remoteip);
+ strcpy(pLogicalChannel->remoteIP, remoteip);
if (call->versionIP == 6) {
pLogicalChannel->remoteMediaPort = iP6Address->tsapIdentifier;
if (iP6Address1)
@@ -1978,7 +1978,7 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
if(pLogicalChannel->chanCap->startTransmitChannel)
{
pLogicalChannel->chanCap->startTransmitChannel(call, pLogicalChannel);
- OOTRACEINFO4("TransmitLogical Channel of type %s started (%s, %s)\n",
+ OOTRACEINFO4("TransmitLogical Channel of type %s started (%s, %s)\n",
ooGetCapTypeText(pLogicalChannel->chanCap->cap),
call->callType, call->callToken);
}
@@ -1991,94 +1991,94 @@ int ooOnReceivedOpenLogicalChannelAck(OOH323CallData *call,
return OO_OK;
}
-int ooOnReceivedOpenLogicalChannelRejected(OOH323CallData *call,
+int ooOnReceivedOpenLogicalChannelRejected(OOH323CallData *call,
H245OpenLogicalChannelReject *olcReject)
{
switch(olcReject->cause.t)
{
case T_H245OpenLogicalChannelReject_cause_unspecified:
OOTRACEINFO4("Open logical channel %d rejected - unspecified (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber, call->callType,
+ olcReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_unsuitableReverseParameters:
OOTRACEINFO4("Open logical channel %d rejected - "
- "unsuitableReverseParameters (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber, call->callType,
+ "unsuitableReverseParameters (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeNotSupported:
OOTRACEINFO4("Open logical channel %d rejected - dataTypeNotSupported"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeNotAvailable:
OOTRACEINFO4("Open logical channel %d rejected - dataTypeNotAvailable"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_unknownDataType:
OOTRACEINFO4("Open logical channel %d rejected - unknownDataType"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_dataTypeALCombinationNotSupported:
OOTRACEINFO4("Open logical channel %d rejected - "
- "dataTypeALCombinationNotSupported(%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "dataTypeALCombinationNotSupported(%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_multicastChannelNotAllowed:
OOTRACEINFO4("Open logical channel %d rejected - "
- "multicastChannelNotAllowed (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "multicastChannelNotAllowed (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_insufficientBandwidth:
OOTRACEINFO4("Open logical channel %d rejected - insufficientBandwidth"
- "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
+ "(%s, %s)\n", olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_separateStackEstablishmentFailed:
OOTRACEINFO4("Open logical channel %d rejected - "
- "separateStackEstablishmentFailed (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "separateStackEstablishmentFailed (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_invalidSessionID:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidSessionID (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidSessionID (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_masterSlaveConflict:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidSessionID (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidSessionID (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_waitForCommunicationMode:
OOTRACEINFO4("Open logical channel %d rejected - "
- "waitForCommunicationMode (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "waitForCommunicationMode (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_invalidDependentChannel:
OOTRACEINFO4("Open logical channel %d rejected - "
- "invalidDependentChannel (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "invalidDependentChannel (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
case T_H245OpenLogicalChannelReject_cause_replacementForRejected:
OOTRACEINFO4("Open logical channel %d rejected - "
- "replacementForRejected (%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ "replacementForRejected (%s, %s)\n",
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
break;
default:
OOTRACEERR4("Error: OpenLogicalChannel %d rejected - "
"invalid cause(%s, %s)\n",
- olcReject->forwardLogicalChannelNumber,
+ olcReject->forwardLogicalChannelNumber,
call->callType, call->callToken);
}
if(call->callState < OO_CALL_CLEAR)
@@ -2098,7 +2098,7 @@ int ooSendEndSessionCommand(OOH323CallData *call)
H245CommandMessage * command;
OOCTXT *pctxt;
H245Message *ph245msg=NULL;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_command);
if(ret != OO_OK)
{
@@ -2130,7 +2130,7 @@ int ooSendEndSessionCommand(OOH323CallData *call)
}
-int ooHandleH245Command(OOH323CallData *call,
+int ooHandleH245Command(OOH323CallData *call,
H245CommandMessage *command)
{
ASN1UINT i;
@@ -2141,7 +2141,7 @@ int ooHandleH245Command(OOH323CallData *call,
switch(command->t)
{
case T_H245CommandMessage_endSessionCommand:
- OOTRACEINFO3("Received EndSession command (%s, %s)\n",
+ OOTRACEINFO3("Received EndSession command (%s, %s)\n",
call->callType, call->callToken);
if(call->h245SessionState == OO_H245SESSION_ENDSENT)
{
@@ -2150,12 +2150,12 @@ int ooHandleH245Command(OOH323CallData *call,
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_SESSION_TIMER)
{
ASN1MEMFREEPTR(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
@@ -2170,7 +2170,7 @@ int ooHandleH245Command(OOH323CallData *call,
if(call->logicalChans)
{
OOTRACEINFO3("In response to received EndSessionCommand - "
- "Clearing all logical channels. (%s, %s)\n",
+ "Clearing all logical channels. (%s, %s)\n",
call->callType, call->callToken);
ooClearAllLogicalChannels(call);
}
@@ -2178,12 +2178,12 @@ int ooHandleH245Command(OOH323CallData *call,
if (call->callState < OO_CALL_CLEAR)
call->callState = OO_CALL_CLEAR;
}
-
-
+
+
break;
case T_H245CommandMessage_sendTerminalCapabilitySet:
OOTRACEWARN3("Warning: Received command Send terminal capability set "
- "- Not handled (%s, %s)\n", call->callType,
+ "- Not handled (%s, %s)\n", call->callType,
call->callToken);
break;
case T_H245CommandMessage_flowControlCommand:
@@ -2194,8 +2194,8 @@ int ooHandleH245Command(OOH323CallData *call,
OOTRACEWARN3("Warning: Unhandled H245 command message received "
"(%s, %s)\n", call->callType, call->callToken);
}
- OOTRACEDBGC3("Handling H.245 command message done. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEDBGC3("Handling H.245 command message done. (%s, %s)\n",
+ call->callType, call->callToken);
return OO_OK;
}
@@ -2206,7 +2206,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
call->localTermCapState = OO_LocalTermCapSetAckRecvd;
if(call->remoteTermCapState != OO_RemoteTermCapSetAckSent)
return OO_OK;
-
+
if(call->masterSlaveState == OO_MasterSlave_Idle) {
ret = ooSendMasterSlaveDetermination(call);
if(ret != OO_OK) {
@@ -2214,7 +2214,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
"(%s, %s)\n", call->callType, call->callToken);
return ret;
}
- }
+ }
if((call->masterSlaveState == OO_MasterSlave_Master ||
call->masterSlaveState == OO_MasterSlave_Slave) &&
@@ -2224,7 +2224,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
gH323ep.h323Callbacks.openLogicalChannels(call);
/* ooSendStatusInquiry(call); */
-
+
if(!ooGetTransmitLogicalChannel(call))
ooOpenLogicalChannels(call);
#if 0
@@ -2236,7 +2236,7 @@ int ooOnReceivedTerminalCapabilitySetAck(OOH323CallData* call)
}
#endif
}
-
+
return OO_OK;
}
@@ -2247,7 +2247,7 @@ int ooCloseAllLogicalChannels(OOH323CallData *call, char* dir)
temp = call->logicalChans;
while(temp)
{
- if(temp->state == OO_LOGICALCHAN_ESTABLISHED &&
+ if(temp->state == OO_LOGICALCHAN_ESTABLISHED &&
(dir == NULL || !strcmp(temp->dir,dir)))
{
/* Sending closelogicalchannel only for outgoing channels*/
@@ -2328,8 +2328,8 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
OOCTXT *pctxt;
H245RequestMessage *request;
H245CloseLogicalChannel* clc;
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
@@ -2361,7 +2361,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
clc->m.reasonPresent = 1;
clc->reason.t = T_H245CloseLogicalChannel_reason_unknown;
- OOTRACEDBGA4("Built close logical channel for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built close logical channel for %d (%s, %s)\n",
logicalChan->channelNo, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2371,7 +2371,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
error++;
}
ooFreeH245Message(call, ph245msg);
-
+
/* Stop the media transmission */
/* Moved to OnReceivedClosedChannelAck */
logicalChan->state = OO_LOGICALCHAN_CLOSEPENDING;
@@ -2382,7 +2382,7 @@ int ooSendCloseLogicalChannel(OOH323CallData *call, ooLogicalChannel *logicalCha
}
/*TODO: Need to pass reason as a parameter */
-int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
+int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
ooLogicalChannel *logicalChan)
{
int ret = OO_OK;
@@ -2391,12 +2391,12 @@ int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
H245RequestMessage *request;
H245RequestChannelClose *rclc;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "requestCloseLogicalChannel message (%s, %s)\n",
+ "requestCloseLogicalChannel message (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -2420,11 +2420,11 @@ int ooSendRequestCloseLogicalChannel(OOH323CallData *call,
rclc = request->u.requestChannelClose;
memset(rclc, 0, sizeof(H245RequestChannelClose));
rclc->forwardLogicalChannelNumber = logicalChan->channelNo;
-
+
rclc->m.reasonPresent = 1;
rclc->reason.t = T_H245RequestChannelClose_reason_unknown;
- OOTRACEDBGA4("Built RequestCloseChannel for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built RequestCloseChannel for %d (%s, %s)\n",
logicalChan->channelNo, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2445,12 +2445,12 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
OOCTXT *pctxt;
H245IndicationMessage *indication;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_indication);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "RequestChannelCloseRelease message (%s, %s)\n",
+ "RequestChannelCloseRelease message (%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -2465,15 +2465,15 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
if(!indication->u.requestChannelCloseRelease)
{
OOTRACEERR3("Error:Failed to allocate memory for "
- "RequestChannelCloseRelease message. (%s, %s)\n",
+ "RequestChannelCloseRelease message. (%s, %s)\n",
call->callType, call->callToken);
ooFreeH245Message(call, ph245msg);
}
- indication->u.requestChannelCloseRelease->forwardLogicalChannelNumber =
+ indication->u.requestChannelCloseRelease->forwardLogicalChannelNumber =
channelNum;
- OOTRACEDBGA4("Built RequestChannelCloseRelease for %d (%s, %s)\n",
+ OOTRACEDBGA4("Built RequestChannelCloseRelease for %d (%s, %s)\n",
channelNum, call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2487,8 +2487,8 @@ int ooSendRequestChannelCloseRelease(OOH323CallData *call, int channelNum)
}
-
-int ooOnReceivedRequestChannelClose(OOH323CallData *call,
+
+int ooOnReceivedRequestChannelClose(OOH323CallData *call,
H245RequestChannelClose *rclc)
{
int ret=0, error=0;
@@ -2499,7 +2499,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
ooLogicalChannel * lChannel=NULL;
/* Send Ack: TODO: Need to send reject, if doesn't exist
*/
- lChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+ lChannel = ooFindLogicalChannelByLogicalChannelNo(call,
rclc->forwardLogicalChannelNumber);
if(!lChannel)
{
@@ -2517,7 +2517,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
return OO_FAILED;
}
}
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -2543,7 +2543,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
memset(rclcAck, 0, sizeof(H245RequestChannelCloseAck));
rclcAck->forwardLogicalChannelNumber = rclc->forwardLogicalChannelNumber;
- OOTRACEDBGA3("Built RequestCloseChannelAck message (%s, %s)\n",
+ OOTRACEDBGA3("Built RequestCloseChannelAck message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2554,7 +2554,7 @@ int ooOnReceivedRequestChannelClose(OOH323CallData *call,
}
ooFreeH245Message(call, ph245msg);
-
+
/* Send Close Logical Channel if LogChan is established */
if (lChannel->state == OO_LOGICALCHAN_ESTABLISHED) {
ret = ooSendCloseLogicalChannel(call, lChannel);
@@ -2587,8 +2587,8 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
}
return OO_FAILED;
}
-
- ret = ooCreateH245Message(call, &ph245msg,
+
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
@@ -2613,7 +2613,7 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
memset(rtdr, 0, sizeof(H245RoundTripDelayRequest));
rtdr->sequenceNumber = ++call->rtdrSend;
- OOTRACEDBGA3("Built RoundTripDelayRequest message (%s, %s)\n",
+ OOTRACEDBGA3("Built RoundTripDelayRequest message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2648,7 +2648,7 @@ int ooSendRoundTripDelayRequest(OOH323CallData *call)
return ret;
}
-int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
+int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
H245SequenceNumber sequenceNumber)
{
int ret=0;
@@ -2657,7 +2657,7 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
OOCTXT *pctxt=NULL;
H245RoundTripDelayResponse *rtdr;
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -2682,7 +2682,7 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
memset(rtdr, 0, sizeof(H245RoundTripDelayResponse));
rtdr->sequenceNumber = sequenceNumber;
- OOTRACEDBGA3("Built RoundTripDelayResponse message (%s, %s)\n",
+ OOTRACEDBGA3("Built RoundTripDelayResponse message (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -2692,19 +2692,19 @@ int ooOnReceivedRoundTripDelayRequest(OOH323CallData *call,
}
ooFreeH245Message(call, ph245msg);
-
+
return ret;
}
/*
- We clear channel here. Ideally the remote endpoint should send
+ We clear channel here. Ideally the remote endpoint should send
CloseLogicalChannel and then the channel should be cleared. But there's no
timer for this and if remote endpoint misbehaves, the call will keep waiting
for CloseLogicalChannel and hence, wouldn't be cleared. In case when remote
endpoint sends CloseLogicalChannel, we call ooClearLogicalChannel again,
which simply returns OO_OK as channel was already cleared. Other option is
- to start a timer for call cleanup and if call is not cleaned up within
- timeout, we clean call forcefully. Note, no such timer is defined in
+ to start a timer for call cleanup and if call is not cleaned up within
+ timeout, we clean call forcefully. Note, no such timer is defined in
standards.
*/
int ooOnReceivedRequestChannelCloseAck
@@ -2715,8 +2715,8 @@ int ooOnReceivedRequestChannelCloseAck
ret = ooClearLogicalChannel(call, rccAck->forwardLogicalChannelNumber);
if(ret != OO_OK)
{
- OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
- rccAck->forwardLogicalChannelNumber, call->callType,
+ OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
+ rccAck->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
@@ -2731,37 +2731,37 @@ int ooOnReceivedRequestChannelCloseReject
{
case T_H245RequestChannelCloseReject_cause_unspecified:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause unspecified. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ "channel %d - cause unspecified. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
break;
case T_H245RequestChannelCloseReject_cause_extElem1:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause propriatory. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
- call->callToken);
+ "channel %d - cause propriatory. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
+ call->callToken);
break;
default:
OOTRACEDBGA4("Remote endpoint has rejected request to close logical "
- "channel %d - cause INVALID. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ "channel %d - cause INVALID. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
- OOTRACEDBGA4("Clearing logical channel %d. (%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ OOTRACEDBGA4("Clearing logical channel %d. (%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
ret = ooClearLogicalChannel(call, rccReject->forwardLogicalChannelNumber);
if(ret != OO_OK)
{
- OOTRACEERR4("Error: failed to clear logical channel %d.(%s, %s)\n",
- rccReject->forwardLogicalChannelNumber, call->callType,
+ OOTRACEERR4("Error: failed to clear logical channel %d.(%s, %s)\n",
+ rccReject->forwardLogicalChannelNumber, call->callType,
call->callToken);
}
return ret;
}
/****/
-int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
+int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
H245CloseLogicalChannel* clc)
{
int ret=0;
@@ -2769,10 +2769,10 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
OOCTXT *pctxt = NULL;
H245CloseLogicalChannelAck * clcAck;
H245ResponseMessage *response;
-
+
OOTRACEINFO4("Closing logical channel number %d (%s, %s)\n",
clc->forwardLogicalChannelNumber, call->callType, call->callToken);
-
+
ret = ooClearLogicalChannel(call, clc->forwardLogicalChannelNumber);
if (ret != OO_OK) {
OOTRACEERR4("ERROR:Failed to close logical channel %d (%s, %s)\n",
@@ -2780,12 +2780,12 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
return OO_FAILED;
}
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
OOTRACEERR3("ERROR:Failed to create H245 message for "
- "closeLogicalChannelAck (%s, %s)\n", call->callType,
+ "closeLogicalChannelAck (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2820,7 +2820,7 @@ int ooOnReceivedCloseLogicalChannel(OOH323CallData *call,
return ret;
}
-int ooOnReceivedCloseChannelAck(OOH323CallData* call,
+int ooOnReceivedCloseChannelAck(OOH323CallData* call,
H245CloseLogicalChannelAck* clcAck)
{
int ret = OO_OK;
@@ -2844,17 +2844,17 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
OOTimer *pTimer = NULL;
H245Message *pH245 = (H245Message*)pmsg;
/* There are four major types of H.245 messages that can be received.
- Request/Response/Command/Indication. Each one of them need to be
+ Request/Response/Command/Indication. Each one of them need to be
handled separately.
- */
+ */
H245RequestMessage *request = NULL;
H245ResponseMessage *response = NULL;
H245CommandMessage *command = NULL;
H245IndicationMessage *indication = NULL;
-
- OOTRACEDBGC3("Handling H245 message. (%s, %s)\n", call->callType,
+
+ OOTRACEDBGC3("Handling H245 message. (%s, %s)\n", call->callType,
call->callToken);
-
+
switch(pH245->h245Msg.t)
{
/* H.245 Request message is received */
@@ -2863,22 +2863,22 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
switch(request->t)
{
case T_H245RequestMessage_terminalCapabilitySet:
- /* If session isn't marked active yet, do it. possible in case of
+ /* If session isn't marked active yet, do it. possible in case of
tunneling */
if(call->h245SessionState == OO_H245SESSION_IDLE)
- call->h245SessionState = OO_H245SESSION_ACTIVE;
+ call->h245SessionState = OO_H245SESSION_ACTIVE;
ooOnReceivedTerminalCapabilitySet(call, pH245);
if(call->localTermCapState == OO_LocalTermCapExchange_Idle)
ooSendTermCapMsg(call);
break;
case T_H245RequestMessage_masterSlaveDetermination:
- ooHandleMasterSlave(call,
- request->u.masterSlaveDetermination,
+ ooHandleMasterSlave(call,
+ request->u.masterSlaveDetermination,
OOMasterSlaveDetermination);
break;
case T_H245RequestMessage_openLogicalChannel:
- ooHandleOpenLogicalChannel(call,
+ ooHandleOpenLogicalChannel(call,
request->u.openLogicalChannel);
if(!ooGetTransmitLogicalChannel(call))
ooOpenLogicalChannels(call);
@@ -2886,14 +2886,14 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
case T_H245RequestMessage_requestMode:
OOTRACEINFO4("Received request mode - %d (%s, %s)\n",
request->u.requestMode->sequenceNumber, call->callType, call->callToken);
- ooHandleRequestMode(call,
+ ooHandleRequestMode(call,
request->u.requestMode);
break;
case T_H245RequestMessage_closeLogicalChannel:
OOTRACEINFO4("Received close logical Channel - %d (%s, %s)\n",
- request->u.closeLogicalChannel->forwardLogicalChannelNumber,
+ request->u.closeLogicalChannel->forwardLogicalChannelNumber,
call->callType, call->callToken);
- if (ooOnReceivedCloseLogicalChannel(call,
+ if (ooOnReceivedCloseLogicalChannel(call,
request->u.closeLogicalChannel) == OO_OK) {
if (call->TCSPending && !ooGetTransmitLogicalChannel(call)) {
call->TCSPending = FALSE;
@@ -2906,9 +2906,9 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
case T_H245RequestMessage_requestChannelClose:
OOTRACEINFO4("Received RequestChannelClose - %d (%s, %s)\n",
- request->u.requestChannelClose->forwardLogicalChannelNumber,
+ request->u.requestChannelClose->forwardLogicalChannelNumber,
call->callType, call->callToken);
- ooOnReceivedRequestChannelClose(call,
+ ooOnReceivedRequestChannelClose(call,
request->u.requestChannelClose);
break;
case T_H245RequestMessage_roundTripDelayRequest:
@@ -2920,7 +2920,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
;
} /* End of Request Message */
break;
- /* H.245 Response message is received */
+ /* H.245 Response message is received */
case (T_H245MultimediaSystemControlMessage_response):
response = pH245->h245Msg.u.response;
switch(response->t)
@@ -2941,8 +2941,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
}
}
- ooHandleMasterSlave(call,
- response->u.masterSlaveDeterminationAck,
+ ooHandleMasterSlave(call,
+ response->u.masterSlaveDeterminationAck,
OOMasterSlaveAck);
break;
case T_H245ResponseMessage_masterSlaveDeterminationReject:
@@ -2960,7 +2960,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooHandleMasterSlaveReject(call,
+ ooHandleMasterSlaveReject(call,
response->u.masterSlaveDeterminationReject);
break;
case T_H245ResponseMessage_terminalCapabilitySetAck:
@@ -2983,11 +2983,11 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
case T_H245ResponseMessage_terminalCapabilitySetReject:
OOTRACEINFO3("TerminalCapabilitySetReject message received."
" (%s, %s)\n", call->callType, call->callToken);
- if(response->u.terminalCapabilitySetReject->sequenceNumber !=
+ if(response->u.terminalCapabilitySetReject->sequenceNumber !=
call->localTermCapSeqNo)
{
OOTRACEINFO5("Ignoring TCSReject with mismatched seqno %d "
- "(local - %d). (%s, %s)\n",
+ "(local - %d). (%s, %s)\n",
response->u.terminalCapabilitySetReject->sequenceNumber,
call->localTermCapSeqNo, call->callType, call->callToken);
break;
@@ -3032,19 +3032,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.openLogicalChannelAck->forwardLogicalChannelNumber)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
- ooOnReceivedOpenLogicalChannelAck(call,
+ ooOnReceivedOpenLogicalChannelAck(call,
response->u.openLogicalChannelAck);
break;
case T_H245ResponseMessage_openLogicalChannelReject:
@@ -3054,19 +3054,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_OLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.openLogicalChannelAck->forwardLogicalChannelNumber)
{
ASN1MEMFREEPTR(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted OpenLogicalChannel Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
- ooOnReceivedOpenLogicalChannelRejected(call,
+ ooOnReceivedOpenLogicalChannelRejected(call,
response->u.openLogicalChannelReject);
break;
case T_H245ResponseMessage_closeLogicalChannelAck:
@@ -3077,8 +3077,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_CLC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_CLC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.closeLogicalChannelAck->forwardLogicalChannelNumber)
{
@@ -3089,7 +3089,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooOnReceivedCloseChannelAck(call,
+ ooOnReceivedCloseChannelAck(call,
response->u.closeLogicalChannelAck);
if (call->TCSPending && !ooGetReceiveLogicalChannel(call)) {
call->TCSPending = FALSE;
@@ -3107,8 +3107,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.requestChannelCloseAck->forwardLogicalChannelNumber)
{
@@ -3129,8 +3129,8 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
- ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
+ if((((ooTimerCallback*)pTimer->cbData)->timerType & OO_RCC_TIMER) &&
+ ((ooTimerCallback*)pTimer->cbData)->channelNumber ==
response->u.requestChannelCloseReject->forwardLogicalChannelNumber)
{
@@ -3141,7 +3141,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
break;
}
}
- ooOnReceivedRequestChannelCloseReject(call,
+ ooOnReceivedRequestChannelCloseReject(call,
response->u.requestChannelCloseReject);
break;
case T_H245ResponseMessage_roundTripDelayResponse:
@@ -3174,7 +3174,7 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
default:
;
}
- OOTRACEDBGC3("Finished handling H245 message. (%s, %s)\n",
+ OOTRACEDBGC3("Finished handling H245 message. (%s, %s)\n",
call->callType, call->callToken);
return OO_OK;
}
@@ -3183,19 +3183,19 @@ int ooHandleH245Message(OOH323CallData *call, H245Message * pmsg)
int ooOnReceivedUserInputIndication
(OOH323CallData *call, H245UserInputIndication *indication)
{
- if((indication->t == T_H245UserInputIndication_alphanumeric) &&
+ if((indication->t == T_H245UserInputIndication_alphanumeric) &&
(call->dtmfmode & OO_CAP_DTMF_H245_alphanumeric))
{
if(gH323ep.h323Callbacks.onReceivedDTMF)
gH323ep.h323Callbacks.onReceivedDTMF(call,indication->u.alphanumeric);
}
- else if((indication->t == T_H245UserInputIndication_signal) &&
+ else if((indication->t == T_H245UserInputIndication_signal) &&
(call->dtmfmode & OO_CAP_DTMF_H245_signal)) {
if(call->lastDTMF && indication->u.signal->signalType[0] == call->lastDTMF &&
- call->nextDTMFstamp && indication->u.signal->m.rtpPresent &&
+ call->nextDTMFstamp && indication->u.signal->m.rtpPresent &&
indication->u.signal->rtp.m.timestampPresent) {
if(call->nextDTMFstamp > indication->u.signal->rtp.timestamp) {
- OOTRACEERR4("ERROR:Duplicate dtmf %c on ((%s, %s)\n", call->lastDTMF, call->callType,
+ OOTRACEERR4("ERROR:Duplicate dtmf %c on ((%s, %s)\n", call->lastDTMF, call->callType,
call->callToken);
return OO_OK;
}
@@ -3210,7 +3210,7 @@ int ooOnReceivedUserInputIndication
call->lastDTMF = 0;
}
if(gH323ep.h323Callbacks.onReceivedDTMF)
- gH323ep.h323Callbacks.onReceivedDTMF(call,
+ gH323ep.h323Callbacks.onReceivedDTMF(call,
indication->u.signal->signalType);
}
else {
@@ -3232,9 +3232,9 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
if(call->remoteTermCapSeqNo > tcs->sequenceNumber)
{
OOTRACEINFO4("Rejecting TermCapSet message with SeqNo %d, as already "
- "acknowledged message with this SeqNo (%s, %s)\n",
+ "acknowledged message with this SeqNo (%s, %s)\n",
call->remoteTermCapSeqNo, call->callType, call->callToken);
- ooSendTerminalCapabilitySetReject(call, tcs->sequenceNumber,
+ ooSendTerminalCapabilitySetReject(call, tcs->sequenceNumber,
T_H245TerminalCapabilitySetReject_cause_unspecified);
return OO_OK;
@@ -3247,7 +3247,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
*/
/* 20111103 */
-/* for addition for previous we must check repeated tcs if it's not first
+/* for addition for previous we must check repeated tcs if it's not first
tcs i.e. SeqNo is not null */
if(call->remoteTermCapSeqNo && call->remoteTermCapSeqNo == tcs->sequenceNumber)
@@ -3286,7 +3286,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
pNode = dListFindByIndex(&tcs->capabilityTable, k);
if(pNode)
{
- OOTRACEDBGC4("Processing CapabilityTable Entry %d (%s, %s)\n",
+ OOTRACEDBGC4("Processing CapabilityTable Entry %d (%s, %s)\n",
k, call->callType, call->callToken);
capEntry = (H245CapabilityTableEntry*) pNode->data;
if(capEntry->m.capabilityPresent){
@@ -3294,7 +3294,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
if(ret != OO_OK)
{
OOTRACEERR4("Error:Failed to process remote capability in "
- "capability table at index %d. (%s, %s)\n",
+ "capability table at index %d. (%s, %s)\n",
k, call->callType, call->callToken);
}
ooCapabilityUpdateJointCapabilities(call, &capEntry->capability);
@@ -3309,11 +3309,11 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
OO_SETFLAG(call->flags, OO_M_T38SUPPORTED);
else
OO_CLRFLAG(call->flags, OO_M_T38SUPPORTED);
-
+
/* Update remoteTermCapSetState */
call->remoteTermCapState = OO_RemoteTermCapSetRecvd;
- ooH245AcknowledgeTerminalCapabilitySet(call);
+ ooH245AcknowledgeTerminalCapabilitySet(call);
/* If we haven't yet send TCS then send it now */
if(call->localTermCapState == OO_LocalTermCapExchange_Idle)
@@ -3338,7 +3338,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
"(%s, %s)\n", call->callType, call->callToken);
return ret;
}
- }
+ }
/* Check MasterSlave procedure has finished */
@@ -3348,7 +3348,7 @@ int ooOnReceivedTerminalCapabilitySet(OOH323CallData *call, H245Message *pmsg)
/* As both MasterSlave and TerminalCapabilitySet procedures have finished,
OpenLogicalChannels */
-
+
if(gH323ep.h323Callbacks.openLogicalChannels)
gH323ep.h323Callbacks.openLogicalChannels(call);
@@ -3373,7 +3373,7 @@ int ooSendTerminalCapabilitySetReject
H245Message *ph245msg=NULL;
H245ResponseMessage * response=NULL;
OOCTXT *pctxt=NULL;
- int ret = ooCreateH245Message(call, &ph245msg,
+ int ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -3387,18 +3387,18 @@ int ooSendTerminalCapabilitySetReject
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
response->t = T_H245ResponseMessage_terminalCapabilitySetReject;
-
+
response->u.terminalCapabilitySetReject = (H245TerminalCapabilitySetReject*)
ASN1MALLOC(pctxt, sizeof(H245TerminalCapabilitySetReject));
- memset(response->u.terminalCapabilitySetReject, 0,
+ memset(response->u.terminalCapabilitySetReject, 0,
sizeof(H245TerminalCapabilitySetReject));
response->u.terminalCapabilitySetReject->sequenceNumber = seqNo;
response->u.terminalCapabilitySetReject->cause.t = cause;
- OOTRACEDBGA3("Built TerminalCapabilitySetReject (%s, %s)\n",
+ OOTRACEDBGA3("Built TerminalCapabilitySetReject (%s, %s)\n",
call->callType, call->callToken);
-
+
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
{
@@ -3417,7 +3417,7 @@ int ooH245AcknowledgeTerminalCapabilitySet(OOH323CallData *call)
H245Message *ph245msg=NULL;
H245ResponseMessage * response=NULL;
OOCTXT *pctxt=NULL;
- int ret = ooCreateH245Message(call, &ph245msg,
+ int ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_response);
if(ret != OO_OK)
{
@@ -3431,15 +3431,15 @@ int ooH245AcknowledgeTerminalCapabilitySet(OOH323CallData *call)
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
response->t = T_H245ResponseMessage_terminalCapabilitySetAck;
-
+
response->u.terminalCapabilitySetAck = (H245TerminalCapabilitySetAck*)
ASN1MALLOC(pctxt, sizeof(H245TerminalCapabilitySetAck));
- memset(response->u.terminalCapabilitySetAck, 0,
+ memset(response->u.terminalCapabilitySetAck, 0,
sizeof(H245TerminalCapabilitySetAck));
response->u.terminalCapabilitySetAck->sequenceNumber = call->remoteTermCapSeqNo;
- OOTRACEDBGA3("Built TerminalCapabilitySet Ack (%s, %s)\n",
+ OOTRACEDBGA3("Built TerminalCapabilitySet Ack (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg(call, ph245msg);
@@ -3468,7 +3468,7 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - Terminal"
- "CapabilitySetRelease (%s, %s)\n",call->callType,
+ "CapabilitySetRelease (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3477,7 +3477,7 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
indication->t = T_H245IndicationMessage_terminalCapabilitySetRelease;
- indication->u.terminalCapabilitySetRelease =
+ indication->u.terminalCapabilitySetRelease =
(H245TerminalCapabilitySetRelease*)
memAlloc (pctxt, sizeof(H245TerminalCapabilitySetRelease));
@@ -3488,18 +3488,18 @@ int ooSendTerminalCapabilitySetRelease(OOH323CallData * call)
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
- OOTRACEDBGA3 ("Built TerminalCapabilitySetRelease (%s, %s)\n",
+ OOTRACEDBGA3 ("Built TerminalCapabilitySetRelease (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue TerminalCapabilitySetRelease "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3519,7 +3519,7 @@ int ooSendH245UserInputIndication_alphanumeric
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - H245UserInput"
- "Indication_alphanumeric (%s, %s)\n",call->callType,
+ "Indication_alphanumeric (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3527,7 +3527,7 @@ int ooSendH245UserInputIndication_alphanumeric
indication = ph245msg->h245Msg.u.indication;
indication->t = T_H245IndicationMessage_userInput;
- indication->u.userInput =
+ indication->u.userInput =
(H245UserInputIndication*)
memAllocZ (pctxt, sizeof(H245UserInputIndication));
@@ -3549,18 +3549,18 @@ int ooSendH245UserInputIndication_alphanumeric
return OO_FAILED;
}
strcpy(*(char**)&indication->u.userInput->u.alphanumeric, data);
- OOTRACEDBGA3 ("Built UserInputIndication_alphanumeric (%s, %s)\n",
+ OOTRACEDBGA3 ("Built UserInputIndication_alphanumeric (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue UserInputIndication_alphanumeric "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3579,7 +3579,7 @@ int ooSendH245UserInputIndication_signal
if (ret != OO_OK) {
OOTRACEERR3("Error:H245 message creation failed for - H245UserInput"
- "Indication_signal (%s, %s)\n",call->callType,
+ "Indication_signal (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3587,7 +3587,7 @@ int ooSendH245UserInputIndication_signal
indication = ph245msg->h245Msg.u.indication;
indication->t = T_H245IndicationMessage_userInput;
- indication->u.userInput =
+ indication->u.userInput =
(H245UserInputIndication*)
memAllocZ (pctxt, sizeof(H245UserInputIndication));
@@ -3612,18 +3612,18 @@ int ooSendH245UserInputIndication_signal
return OO_FAILED;
}
strcpy(*(char**)&indication->u.userInput->u.signal->signalType, data);
- OOTRACEDBGA3 ("Built UserInputIndication_signal (%s, %s)\n",
+ OOTRACEDBGA3 ("Built UserInputIndication_signal (%s, %s)\n",
call->callType, call->callToken);
ret = ooSendH245Msg (call, ph245msg);
if (ret != OO_OK) {
- OOTRACEERR3
+ OOTRACEERR3
("Error:Failed to enqueue UserInputIndication_signal "
- "message to outbound queue.(%s, %s)\n", call->callType,
+ "message to outbound queue.(%s, %s)\n", call->callType,
call->callToken);
}
-
+
ooFreeH245Message (call, ph245msg);
return ret;
}
@@ -3632,8 +3632,8 @@ int ooSendH245UserInputIndication_signal
int ooOpenLogicalChannels(OOH323CallData *call)
{
int ret=0;
- OOTRACEINFO3("Opening logical channels (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEINFO3("Opening logical channels (%s, %s)\n", call->callType,
+ call->callToken);
/* Audio channels */
if(gH323ep.callMode == OO_CALLMODE_AUDIOCALL ||
@@ -3654,7 +3654,7 @@ int ooOpenLogicalChannels(OOH323CallData *call)
return ret;
}
}
-
+
if(gH323ep.callMode == OO_CALLMODE_VIDEOCALL)
{
/* if (!OO_TESTFLAG (call->flags, OO_M_AUDIOSESSION))
@@ -3704,11 +3704,11 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
" (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
/* Go through local endpoints capabilities sequentially, and find out the
first one which has a match in the remote endpoints receive capabilities.
*/
- OOTRACEINFO3("Looking for matching capabilities. (%s, %s)\n",
+ OOTRACEINFO3("Looking for matching capabilities. (%s, %s)\n",
call->callType, call->callToken);
/* May */
if(call->masterSlaveState == OO_MasterSlave_Master)
@@ -3716,11 +3716,11 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
for(k=0; k<call->capPrefs.index; k++)
{
/*Search for audio caps only */
- if(capType == OO_CAP_TYPE_AUDIO &&
+ if(capType == OO_CAP_TYPE_AUDIO &&
call->capPrefs.order[k] > OO_CAP_VIDEO_BASE)
continue;
/* Search for video caps only */
- if(capType == OO_CAP_TYPE_VIDEO &&
+ if(capType == OO_CAP_TYPE_VIDEO &&
call->capPrefs.order[k] <= OO_CAP_VIDEO_BASE)
continue;
@@ -3743,7 +3743,7 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
if(!epCap)
{
OOTRACEERR4("ERROR:Incompatible capabilities - Can not open "
- "%s channel (%s, %s)\n",
+ "%s channel (%s, %s)\n",
(capType==OO_CAP_TYPE_AUDIO)?"audio":"video", call->callType,
call->callToken);
return OO_FAILED;
@@ -3761,12 +3761,12 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
if(!epCap)
{
OOTRACEERR4("ERROR:Incompatible audio capabilities - Can not open "
- "%s channel (%s, %s)\n",
+ "%s channel (%s, %s)\n",
(capType==OO_CAP_TYPE_AUDIO)?"audio":"video", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
}
switch(epCap->cap)
@@ -3792,9 +3792,9 @@ int ooOpenLogicalChannel(OOH323CallData *call, enum OOCapType capType )
ooOpenChannel(call, epCap);
break;
-
+
default:
- OOTRACEERR3("ERROR:Unknown Audio Capability type (%s, %s)\n",
+ OOTRACEERR3("ERROR:Unknown Audio Capability type (%s, %s)\n",
call->callType, call->callToken);
}
return OO_OK;
@@ -3816,17 +3816,17 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
H245UnicastAddress_iP6Address *iP6Address = NULL;
unsigned session_id=0;
ooLogicalChannel *pLogicalChannel = NULL;
-
- OOTRACEDBGC4("Doing Open Channel for %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+
+ OOTRACEDBGC4("Doing Open Channel for %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
- ret = ooCreateH245Message(call, &ph245msg,
+ ret = ooCreateH245Message(call, &ph245msg,
T_H245MultimediaSystemControlMessage_request);
if(ret != OO_OK)
{
OOTRACEERR4("Error: H245 message creation failed for - Open %s"
- "channel (%s, %s)\n", ooGetCapTypeText(epCap->cap),
+ "channel (%s, %s)\n", ooGetCapTypeText(epCap->cap),
call->callType, call->callToken);
return OO_FAILED;
}
@@ -3835,7 +3835,7 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
ph245msg->logicalChannelNo = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
- call->logicalChanNoCur = call->logicalChanNoBase;
+ call->logicalChanNoCur = call->logicalChanNoBase;
request = ph245msg->h245Msg.u.request;
/* pctxt = &gH323ep.msgctxt; */
@@ -3852,19 +3852,19 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
return OO_FAILED;
}
- memset(request->u.openLogicalChannel, 0,
+ memset(request->u.openLogicalChannel, 0,
sizeof(H245OpenLogicalChannel));
- request->u.openLogicalChannel->forwardLogicalChannelNumber =
+ request->u.openLogicalChannel->forwardLogicalChannelNumber =
ph245msg->logicalChannelNo;
-
+
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
request->u.openLogicalChannel->forwardLogicalChannelNumber,
session_id, "transmit", epCap);
-
+
if(!pLogicalChannel)
{
OOTRACEERR3("ERROR:Failed to add new logical channel entry (%s, %s)\n",
@@ -3887,29 +3887,29 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
if(!audioCap)
{
OOTRACEERR4("Error:Failed to create duplicate audio capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.audioData = audioCap;
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO)
{
- flcp->dataType.t = T_H245DataType_videoData;
+ flcp->dataType.t = T_H245DataType_videoData;
videoCap = ooCapabilityCreateVideoCapability(epCap, pctxt, OOTX);
if(!videoCap)
{
OOTRACEERR4("Error:Failed to create duplicate video capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.videoData = videoCap;
}
else if(epCap->capType == OO_CAP_TYPE_DATA)
@@ -3920,13 +3920,13 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
if(!t38Cap)
{
OOTRACEERR4("Error:Failed to create duplicate T38 capability in "
- "ooOpenChannel- %s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ "ooOpenChannel- %s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ooFreeH245Message(call, ph245msg);
return OO_FAILED;
}
-
+
flcp->dataType.u.data = t38Cap;
}
else{
@@ -3934,11 +3934,11 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
return OO_FAILED;
}
-
- flcp->multiplexParameters.t =
+
+ flcp->multiplexParameters.t =
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
- flcp->multiplexParameters.u.h2250LogicalChannelParameters =
- (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
+ flcp->multiplexParameters.u.h2250LogicalChannelParameters =
+ (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelParameters));
h2250lcp = flcp->multiplexParameters.u.h2250LogicalChannelParameters;
@@ -3949,8 +3949,8 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
h2250lcp->mediaGuaranteedDelivery = 0;
h2250lcp->silenceSuppression = 0;
h2250lcp->m.mediaControlChannelPresent = 1;
-
- h2250lcp->mediaControlChannel.t =
+
+ h2250lcp->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
h2250lcp->mediaControlChannel.u.unicastAddress = (H245UnicastAddress*)
ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
@@ -3978,9 +3978,9 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
iPAddress->network.numocts = 4;
iPAddress->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
- pLogicalChannel->state = OO_LOGICALCHAN_PROPOSED;
- OOTRACEDBGA4("Built OpenLogicalChannel-%s (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ pLogicalChannel->state = OO_LOGICALCHAN_PROPOSED;
+ OOTRACEDBGA4("Built OpenLogicalChannel-%s (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
ret = ooSendH245Msg(call, ph245msg);
if(ret != OO_OK)
@@ -3990,17 +3990,17 @@ int ooOpenChannel(OOH323CallData* call, ooH323EpCapability *epCap)
call->callToken);
}
ooFreeH245Message(call, ph245msg);
-
+
return ret;
}
-/* Used to build OLCs for fast connect. Keep in mind that forward and
- reverse
- are always with respect to the endpoint which proposes channels
+/* Used to build OLCs for fast connect. Keep in mind that forward and
+ reverse
+ are always with respect to the endpoint which proposes channels
TODO: Need to clean logical channel in case of failure. */
int ooBuildFastStartOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir)
{
OOBOOL reverse=FALSE, forward=FALSE;
@@ -4015,16 +4015,16 @@ int ooBuildFastStartOLC
ooLogicalChannel *pLogicalChannel = NULL;
int outgoing=FALSE;
- if(!strcmp(call->callType, "outgoing"))
+ if(!strcmp(call->callType, "outgoing"))
outgoing = TRUE;
-
+
if(dir & OORX)
{
OOTRACEDBGA3("Building OpenLogicalChannel for Receive Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "receive");
- pLogicalChannel = ooAddNewLogicalChannel(call,
- olc->forwardLogicalChannelNumber, session_id,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
+ olc->forwardLogicalChannelNumber, session_id,
"receive", epCap);
if(outgoing)
reverse = TRUE;
@@ -4036,7 +4036,7 @@ int ooBuildFastStartOLC
OOTRACEDBGA3("Building OpenLogicalChannel for transmit Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, session_id,
"transmit", epCap);
if(outgoing)
@@ -4057,16 +4057,16 @@ int ooBuildFastStartOLC
if(forward)
{
- OOTRACEDBGC3("Building forward olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building forward olc. (%s, %s)\n", call->callType,
call->callToken);
flcp = &(olc->forwardLogicalChannelParameters);
- memset(flcp, 0,
+ memset(flcp, 0,
sizeof(H245OpenLogicalChannel_forwardLogicalChannelParameters));
if(epCap->capType == OO_CAP_TYPE_AUDIO) {
sessionID =1;
flcp->dataType.t = T_H245DataType_audioData;
- flcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
+ flcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
pctxt, dir);
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO) {
@@ -4076,41 +4076,41 @@ int ooBuildFastStartOLC
pctxt, dir);
}
flcp->multiplexParameters.t = T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
- pH2250lcp1 = (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
+ pH2250lcp1 = (H245H2250LogicalChannelParameters*)ASN1MALLOC(pctxt,
sizeof(H245H2250LogicalChannelParameters));
memset(pH2250lcp1, 0, sizeof(H245H2250LogicalChannelParameters));
flcp->multiplexParameters.t = T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters;
-
+
flcp->multiplexParameters.u.h2250LogicalChannelParameters = pH2250lcp1;
-
+
pH2250lcp1->sessionID = sessionID;
if(!outgoing)
{
pH2250lcp1->m.mediaChannelPresent = 1;
- pH2250lcp1->mediaChannel.t =
+ pH2250lcp1->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
+ pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress));
memset(pUniAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp1->mediaChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pUniIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUniAddrs->u.iP6Address = pUniIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pUniIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUniAddrs->u.iPAddress = pUniIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
@@ -4118,30 +4118,30 @@ int ooBuildFastStartOLC
}
}
pH2250lcp1->m.mediaControlChannelPresent = 1;
- pH2250lcp1->mediaControlChannel.t =
+ pH2250lcp1->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress));
memset(pUnicastAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp1->mediaControlChannel.u.unicastAddress = pUnicastAddrs;
if (call->versionIP == 6) {
pUnicastAddrs->t = T_H245UnicastAddress_iP6Address;
- pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUnicastAddrs->u.iP6Address = pIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pIp6Addrs->network.data);
pIp6Addrs->network.numocts = 16;
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
pUnicastAddrs->t = T_H245UnicastAddress_iPAddress;
- pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUnicastAddrs->u.iPAddress = pIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pIpAddrs->network.data);
pIpAddrs->network.numocts = 4;
@@ -4151,16 +4151,16 @@ int ooBuildFastStartOLC
if(!outgoing)
{
if(epCap->startReceiveChannel)
- {
- epCap->startReceiveChannel(call, pLogicalChannel);
- OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
+ {
+ epCap->startReceiveChannel(call, pLogicalChannel);
+ OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s"
- " channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ " channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -4169,11 +4169,11 @@ int ooBuildFastStartOLC
if(reverse)
{
- OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
call->callToken);
- olc->forwardLogicalChannelParameters.dataType.t =
+ olc->forwardLogicalChannelParameters.dataType.t =
T_H245DataType_nullData;
- olc->forwardLogicalChannelParameters.multiplexParameters.t =
+ olc->forwardLogicalChannelParameters.multiplexParameters.t =
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_none;
olc->m.reverseLogicalChannelParametersPresent = 1;
rlcp = &(olc->reverseLogicalChannelParameters);
@@ -4181,15 +4181,15 @@ int ooBuildFastStartOLC
if(epCap->capType == OO_CAP_TYPE_AUDIO) {
sessionID = 1;
rlcp->dataType.t = T_H245DataType_audioData;
-
- rlcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
+
+ rlcp->dataType.u.audioData = ooCapabilityCreateAudioCapability(epCap,
pctxt, dir);
}
else if(epCap->capType == OO_CAP_TYPE_VIDEO) {
sessionID = 2;
rlcp->dataType.t = T_H245DataType_videoData;
-
- rlcp->dataType.u.videoData = ooCapabilityCreateVideoCapability(epCap,
+
+ rlcp->dataType.u.videoData = ooCapabilityCreateVideoCapability(epCap,
pctxt, dir);
}
@@ -4204,33 +4204,33 @@ int ooBuildFastStartOLC
{
pH2250lcp2->m.mediaChannelPresent = 1;
- pH2250lcp2->mediaChannel.t =
+ pH2250lcp2->mediaChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) memAlloc(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress));
memset(pUnicastAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp2->mediaChannel.u.unicastAddress = pUnicastAddrs;
/* May 20101022 */
-
+
if (call->versionIP == 6) {
pUnicastAddrs->t = T_H245UnicastAddress_iP6Address;
- pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUnicastAddrs->u.iP6Address = pIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pIp6Addrs->network.data);
pIp6Addrs->network.numocts = 16;
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
pUnicastAddrs->t = T_H245UnicastAddress_iPAddress;
- pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUnicastAddrs->u.iPAddress = pIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pIpAddrs->network.data);
pIpAddrs->network.numocts = 4;
@@ -4239,33 +4239,33 @@ int ooBuildFastStartOLC
}
pH2250lcp2->m.mediaControlChannelPresent = 1;
- pH2250lcp2->mediaControlChannel.t =
+ pH2250lcp2->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
pUniAddrs = (H245UnicastAddress*) ASN1MALLOC(pctxt, sizeof(H245UnicastAddress));
-
+
memset(pUniAddrs, 0, sizeof(H245UnicastAddress));
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
/* May 20101023 */
-
+
if (call->versionIP == 6) {
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iP6Address));
memset(pUniIp6Addrs, 0, sizeof(H245UnicastAddress_iP6Address));
pUniAddrs->u.iP6Address = pUniIp6Addrs;
-
+
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) ASN1MALLOC(pctxt,
sizeof(H245UnicastAddress_iPAddress));
memset(pUniIpAddrs, 0, sizeof(H245UnicastAddress_iPAddress));
pUniAddrs->u.iPAddress = pUniIpAddrs;
-
+
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
@@ -4281,23 +4281,23 @@ int ooBuildFastStartOLC
{
if(epCap->startReceiveChannel)
{
- epCap->startReceiveChannel(call, pLogicalChannel);
+ epCap->startReceiveChannel(call, pLogicalChannel);
OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s "
- "channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ "channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
call->callType, call->callToken);
return OO_FAILED;
}
}
}
- /* State of logical channel. for out going calls, as we are sending setup,
- state of all channels are proposed, for incoming calls, state is
+ /* State of logical channel. for out going calls, as we are sending setup,
+ state of all channels are proposed, for incoming calls, state is
established. */
if(!outgoing) {
pLogicalChannel->state = OO_LOGICALCHAN_ESTABLISHED;
@@ -4307,7 +4307,7 @@ int ooBuildFastStartOLC
/* Call is "outgoing */
pLogicalChannel->state = OO_LOGICALCHAN_PROPOSEDFS;
}
-
+
return OO_OK;
}
@@ -4329,12 +4329,12 @@ int ooMSDTimerExpired(void *data)
return OO_OK;
}
-
+
int ooTCSTimerExpired(void *data)
{
ooTimerCallback *cbData = (ooTimerCallback*)data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("TerminalCapabilityExchange timeout. (%s, %s)\n",
+ OOTRACEINFO3("TerminalCapabilityExchange timeout. (%s, %s)\n",
call->callType, call->callToken);
ASN1MEMFREEPTR(call->pctxt, cbData);
ooSendTerminalCapabilitySetRelease(call);
@@ -4366,11 +4366,11 @@ int ooOpenLogicalChannelTimerExpired(void *pdata)
ooLogicalChannel *pChannel = NULL;
OOTRACEINFO3("OpenLogicalChannelTimer expired. (%s, %s)\n", call->callType,
call->callToken);
- pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+ pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
cbData->channelNumber);
if(pChannel)
ooSendCloseLogicalChannel(call, pChannel);
-
+
if(call->callState < OO_CALL_CLEAR)
{
call->callState = OO_CALL_CLEAR;
@@ -4389,7 +4389,7 @@ int ooCloseLogicalChannelTimerExpired(void *pdata)
call->callToken);
ooClearLogicalChannel(call, cbData->channelNumber);
-
+
if(call->callState < OO_CALL_CLEAR)
{
call->callState = OO_CALL_CLEAR;
@@ -4408,21 +4408,21 @@ int ooRequestChannelCloseTimerExpired(void *pdata)
OOTRACEINFO3("CloseLogicalChannelTimer expired. (%s, %s)\n", call->callType,
call->callToken);
-
- pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
+
+ pChannel = ooFindLogicalChannelByLogicalChannelNo(call,
cbData->channelNumber);
if(pChannel)
ooSendRequestChannelCloseRelease(call, cbData->channelNumber);
else
return OO_OK;
-
+
ret = ooClearLogicalChannel(call, cbData->channelNumber);
if(ret != OO_OK)
{
OOTRACEERR4("Error:Failed to clear logical channel %d. (%s, %s)\n",
cbData->channelNumber, call->callType, call->callToken);
- }
+ }
if(call->callState < OO_CALL_CLEAR)
{
@@ -4442,29 +4442,29 @@ int ooSessionTimerExpired(void *pdata)
OOTRACEINFO3("SessionTimer expired. (%s, %s)\n", call->callType,
call->callToken);
- if(call->h245SessionState != OO_H245SESSION_IDLE &&
+ if(call->h245SessionState != OO_H245SESSION_IDLE &&
call->h245SessionState != OO_H245SESSION_CLOSED &&
call->h245SessionState != OO_H245SESSION_PAUSED) {
ret = ooCloseH245Connection(call);
-
+
if(ret != OO_OK) {
OOTRACEERR3("Error:Failed to close H.245 connection (%s, %s)\n",
call->callType, call->callToken);
- }
+ }
}
memFreePtr(call->pctxt, cbData);
if(call->callState == OO_CALL_CLEAR_RELEASESENT)
call->callState = OO_CALL_CLEARED;
-
+
return OO_OK;
}
int ooGetIpPortFromH245TransportAddress
- (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
+ (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
int *port)
{
H245UnicastAddress *unicastAddress = NULL;
@@ -4477,8 +4477,8 @@ int ooGetIpPortFromH245TransportAddress
OOTRACEERR3("ERROR:Unsupported H245 address type "
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
- }
-
+ }
+
unicastAddress = h245Address->u.unicastAddress;
if (call->versionIP == 6) {
if (unicastAddress->t != T_H245UnicastAddress_iP6Address) {
@@ -4513,7 +4513,7 @@ int ooGetIpPortFromH245TransportAddress
int ooPrepareFastStartResponseOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir)
{
OOBOOL reverse=FALSE, forward=FALSE;
@@ -4525,14 +4525,14 @@ int ooPrepareFastStartResponseOLC
H245UnicastAddress_iP6Address *pIp6Addrs=NULL, *pUniIp6Addrs=NULL;
unsigned session_id = 0;
ooLogicalChannel *pLogicalChannel = NULL;
-
+
if(dir & OORX)
{
OOTRACEDBGA3("ooPrepareFastStartResponseOLC for Receive Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "receive");
- pLogicalChannel = ooAddNewLogicalChannel(call,
- olc->forwardLogicalChannelNumber, session_id,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
+ olc->forwardLogicalChannelNumber, session_id,
"receive", epCap);
forward = TRUE;
}
@@ -4541,7 +4541,7 @@ int ooPrepareFastStartResponseOLC
OOTRACEDBGA3("ooPrepareFastStartResponseOLC for transmit Capability "
"(%s, %s)\n", call->callType, call->callToken);
session_id = ooCallGenerateSessionID(call, epCap->capType, "transmit");
- pLogicalChannel = ooAddNewLogicalChannel(call,
+ pLogicalChannel = ooAddNewLogicalChannel(call,
olc->forwardLogicalChannelNumber, session_id,
"transmit", epCap);
reverse = TRUE;
@@ -4559,24 +4559,24 @@ int ooPrepareFastStartResponseOLC
if(forward)
{
- OOTRACEDBGC3("Preparing olc for receive channel. (%s, %s)\n",
+ OOTRACEDBGC3("Preparing olc for receive channel. (%s, %s)\n",
call->callType, call->callToken);
flcp = &(olc->forwardLogicalChannelParameters);
pH2250lcp1 = flcp->multiplexParameters.u.h2250LogicalChannelParameters;
-
+
pH2250lcp1->m.mediaChannelPresent = 1;
pH2250lcp1->mediaChannel.t = T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
+ pUniAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp1->mediaChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - pUniAddrs"
- "/pUniIpAddrs (%s, %s)\n", call->callType,
+ "/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4589,11 +4589,11 @@ int ooPrepareFastStartResponseOLC
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtpPort;
} else {
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - pUniAddrs"
- "/pUniIpAddrs (%s, %s)\n", call->callType,
+ "/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4601,25 +4601,25 @@ int ooPrepareFastStartResponseOLC
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
pUniAddrs->u.iPAddress = pUniIpAddrs;
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
-
+
pUniIpAddrs->network.numocts = 4;
pUniIpAddrs->tsapIdentifier = pLogicalChannel->localRtpPort;
}
pH2250lcp1->m.mediaControlChannelPresent = 1;
- pH2250lcp1->mediaControlChannel.t =
+ pH2250lcp1->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUnicastAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
+ pUnicastAddrs = (H245UnicastAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp1->mediaControlChannel.u.unicastAddress = pUnicastAddrs;
if (call->versionIP == 6) {
- pIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
+ pIp6Addrs = (H245UnicastAddress_iP6Address*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUnicastAddrs || !pIp6Addrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
+ "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4630,11 +4630,11 @@ int ooPrepareFastStartResponseOLC
pIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
- pIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
+ pIpAddrs = (H245UnicastAddress_iPAddress*) memAllocZ(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUnicastAddrs || !pIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
+ "pUnicastAddrs/pIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -4648,7 +4648,7 @@ int ooPrepareFastStartResponseOLC
if(reverse)
{
- OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building reverse olc. (%s, %s)\n", call->callType,
call->callToken);
rlcp = &(olc->reverseLogicalChannelParameters);
@@ -4658,53 +4658,50 @@ int ooPrepareFastStartResponseOLC
memset(&pH2250lcp2->mediaChannel, 0, sizeof(H245TransportAddress));
pH2250lcp2->m.mediaControlChannelPresent = 1;
- pH2250lcp2->mediaControlChannel.t =
+ pH2250lcp2->mediaControlChannel.t =
T_H245TransportAddress_unicastAddress;
- pUniAddrs = (H245UnicastAddress*) memAlloc(pctxt,
+ pUniAddrs = (H245UnicastAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress));
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
if (call->versionIP == 6) {
- pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAlloc(pctxt,
+ pUniIp6Addrs = (H245UnicastAddress_iP6Address*) memAlloc(pctxt,
sizeof(H245UnicastAddress_iP6Address));
if(!pUniAddrs || !pUniIp6Addrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
+ "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
pUniAddrs->t = T_H245UnicastAddress_iP6Address;
- pUniAddrs->u.iP6Address = pUniIp6Addrs;
+ pUniAddrs->u.iP6Address = pUniIp6Addrs;
inet_pton(AF_INET6, pLogicalChannel->localIP, pUniIp6Addrs->network.data);
pUniIp6Addrs->network.numocts = 16;
pUniIp6Addrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
} else {
- pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAlloc(pctxt,
+ pUniIpAddrs = (H245UnicastAddress_iPAddress*) memAlloc(pctxt,
sizeof(H245UnicastAddress_iPAddress));
if(!pUniAddrs || !pUniIpAddrs) {
OOTRACEERR3("Error:Memory - ooPrepareFastStartResponseOLC - "
- "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
+ "pUniAddrs/pUniIpAddrs (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
pH2250lcp2->mediaControlChannel.u.unicastAddress = pUniAddrs;
-
+
pUniAddrs->t = T_H245UnicastAddress_iPAddress;
- pUniAddrs->u.iPAddress = pUniIpAddrs;
+ pUniAddrs->u.iPAddress = pUniIpAddrs;
inet_pton(AF_INET, pLogicalChannel->localIP, pUniIpAddrs->network.data);
pUniIpAddrs->network.numocts = 4;
pUniIpAddrs->tsapIdentifier = pLogicalChannel->localRtcpPort;
}
-
+
}
pLogicalChannel->state = OO_LOGICALCHAN_ESTABLISHED;
return OO_OK;
}
-
-
-
diff --git a/addons/ooh323c/src/ooh245.h b/addons/ooh323c/src/ooh245.h
index a2df67056..9635a4e10 100644
--- a/addons/ooh323c/src/ooh245.h
+++ b/addons/ooh323c/src/ooh245.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooh245.h
- * This file contains functions to support H245 negotiations.
+ * @file ooh245.h
+ * This file contains functions to support H245 negotiations.
*/
#ifndef _OOH245HDR_H_
#define _OOH245HDR_H_
@@ -43,7 +43,7 @@ extern "C" {
struct OOH323CallData;
-/**
+/**
* @defgroup h245 H.245 Message Handling
* @{
*/
@@ -59,15 +59,15 @@ typedef struct H245Message {
/**
* Creates an outgoing H245 message of the type specified by the type
- * argument for the Application context.
+ * argument for the Application context.
*
- * @param msg A pointer to pointer to message which will be assigned to
+ * @param msg A pointer to pointer to message which will be assigned to
* allocated memory.
* @param type Type of the message to be created.
* (Request/Response/Command/Indication)
*
* @return Completion status of operation: 0 (OO_OK) = success,
- * negative return value is error.
+ * negative return value is error.
*/
EXTERN int ooCreateH245Message(OOH323CallData* call, H245Message **msg, int type);
@@ -77,7 +77,7 @@ EXTERN int ooCreateH245Message(OOH323CallData* call, H245Message **msg, int type
* @param call Handle to the call
* @param pmsg Pointer to an H245 message structure.
*
- * @return OO_OK, on success. OO_FAILED, on failure
+ * @return OO_OK, on success. OO_FAILED, on failure
*/
EXTERN int ooFreeH245Message(struct OOH323CallData *call, H245Message *pmsg);
@@ -92,8 +92,8 @@ EXTERN int ooFreeH245Message(struct OOH323CallData *call, H245Message *pmsg);
EXTERN int ooSendH245Msg(struct OOH323CallData *call, H245Message *msg);
/**
- * This function is used to retrieve an H.245 message enqueued in the outgoing
- * queue.
+ * This function is used to retrieve an H.245 message enqueued in the outgoing
+ * queue.
* @param call Pointer to the call for which message has to be retrieved.
* @param msgbuf Pointer to a buffer in which the message will be returned.
* @param len Pointer to an int variable which will contain length of
@@ -103,17 +103,17 @@ EXTERN int ooSendH245Msg(struct OOH323CallData *call, H245Message *msg);
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooGetOutgoingH245Msgbuf(struct OOH323CallData *call,
- ASN1OCTET *msgbuf,
+EXTERN int ooGetOutgoingH245Msgbuf(struct OOH323CallData *call,
+ ASN1OCTET *msgbuf,
int *len, int *msgType);
/**
- * This function is used to send out a terminal capability set message.
+ * This function is used to send out a terminal capability set message.
*
* @param call Pointer to a call for which TerminalCapabilitySet message
* will be sent.
- *
- * @return OO_OK, on success. OO_FAILED, on failure.
+ *
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooSendTermCapMsg(struct OOH323CallData *call);
EXTERN int ooSendEmptyTermCapMsg(struct OOH323CallData *call);
@@ -128,10 +128,10 @@ EXTERN ASN1UINT ooGenerateStatusDeterminationNumber(void);
/**
* This fuction is used to handle received MasterSlaveDetermination procedure
- * messages.
+ * messages.
* @param call Pointer to the call for which a message is received.
* @param pmsg Pointer to MSD message
- * @param msgType Message type indicating whether received message is MSD,
+ * @param msgType Message type indicating whether received message is MSD,
* MSDAck, MSDReject etc...
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -152,11 +152,11 @@ EXTERN int ooSendMasterSlaveDetermination(struct OOH323CallData *call);
* This function is used to send a MasterSlaveDeterminationAck message.
* @param call Pointer to call for which MasterSlaveDeterminationAck has
* to be sent.
- * @param status Result of the determination process(Master/Slave as it
+ * @param status Result of the determination process(Master/Slave as it
* applies to remote endpoint)
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooSendMasterSlaveDeterminationAck
(struct OOH323CallData* call, char * status);
@@ -164,19 +164,19 @@ EXTERN int ooSendMasterSlaveDeterminationAck
* This function is used to send a MasterSlaveDeterminationReject message.
* @param call Pointer to call for which message is to be sent.
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooSendMasterSlaveDeterminationReject (struct OOH323CallData* call);
/**
* This function is used to handle MasterSlaveReject message. If number of
- * retries is less than max allowed, then it restarts the
+ * retries is less than max allowed, then it restarts the
* MasterSlaveDetermination procedure.
- * @param call Handle to the call for which MasterSlaveReject is
+ * @param call Handle to the call for which MasterSlaveReject is
* received.
* @param reject Poinetr to the received reject message.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooHandleMasterSlaveReject
(struct OOH323CallData *call, H245MasterSlaveDeterminationReject* reject);
@@ -193,13 +193,13 @@ EXTERN int ooHandleOpenLogicalChannel
(struct OOH323CallData* call, H245OpenLogicalChannel *olc);
/**
- * This is a helper function used to handle a received OpenLogicalChannel
+ * This is a helper function used to handle a received OpenLogicalChannel
* message. It builds an OpenLogicalChannelAck message and sends it.
*
* @param call Pointer to cll for which OLC was received.
* @param olc The received OpenLogicalChannel message.
- *
- * @return OO_OK, on success. OO_FAILED, on failure.
+ *
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooHandleOpenLogicalChannel_helper
(struct OOH323CallData *call, H245OpenLogicalChannel*olc);
@@ -222,22 +222,22 @@ int ooSendOpenLogicalChannelReject
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedOpenLogicalChannelAck(struct OOH323CallData *call,
+EXTERN int ooOnReceivedOpenLogicalChannelAck(struct OOH323CallData *call,
H245OpenLogicalChannelAck *olcAck);
/**
- * This function is used to handle the received OpenLogicalChannelReject
+ * This function is used to handle the received OpenLogicalChannelReject
* message.
* @param call Handle to the call for which the message is received.
* @param olcRejected Pointer to received OpenLogicalChannelReject message.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
+int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
H245OpenLogicalChannelReject *olcRejected);
/**
- * This message is used to send an EndSession command. It builds a EndSession
+ * This message is used to send an EndSession command. It builds a EndSession
* command message and queues it into the calls outgoing queue.
* @param call Pointer to call for which EndSession command has to be
* sent.
@@ -246,7 +246,7 @@ int ooOnReceivedOpenLogicalChannelRejected(struct OOH323CallData *call,
EXTERN int ooSendEndSessionCommand(struct OOH323CallData *call);
/**
- * This function is used to handle a received H245Command message.
+ * This function is used to handle a received H245Command message.
* @param call Pointer to call for which an H245Command is received.
* @param command Pointer to a command message.
*
@@ -259,7 +259,7 @@ EXTERN int ooHandleH245Command
/**
* This function is used to handle a received UserInput Indication message.
* It extracts the dtmf received through user-input message and calls endpoints
- * onReceivedDTMF callback function, if such a function is registered by the
+ * onReceivedDTMF callback function, if such a function is registered by the
* endpoint.
* @param call Handle to the call for which user-input indication
* message is received.
@@ -272,7 +272,7 @@ EXTERN int ooOnReceivedUserInputIndication
/**
* This function is called on receiving a TreminalCapabilitySetAck message.
- * If the MasterSlaveDetermination process is also over, this function
+ * If the MasterSlaveDetermination process is also over, this function
* initiates the process of opening logical channels.
* @param call Pointer to call for which TCSAck is received.
*
@@ -282,9 +282,9 @@ EXTERN int ooOnReceivedTerminalCapabilitySetAck(struct OOH323CallData* call);
/**
* This function is called to close all the open logical channels. It sends
- * CloseLogicalChannel message for all the forward channels and sends
+ * CloseLogicalChannel message for all the forward channels and sends
* RequestCloseLogicalChannel message for all the reverse channels.
- * @param call Pointer to call for which logical channels have to be
+ * @param call Pointer to call for which logical channels have to be
* closed.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -311,10 +311,10 @@ EXTERN int ooSendCloseLogicalChannel
* closeLogicalChannelAck message to the remote endpoint.
* @param call Pointer to call for which CloseLogicalChannel message is received.
* @param clc Pointer to received CloseLogicalChannel message.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
H245CloseLogicalChannel* clc);
/**
@@ -322,10 +322,10 @@ EXTERN int ooOnReceivedCloseLogicalChannel(struct OOH323CallData *call,
* channel and removes it from the list of active logical channels.
* @param call Pointer to call for which CLCAck message is received.
* @param clcAck Pointer to the received CloseLogicalChannelAck message.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure
*/
-EXTERN int ooOnReceivedCloseChannelAck(struct OOH323CallData* call,
+EXTERN int ooOnReceivedCloseChannelAck(struct OOH323CallData* call,
H245CloseLogicalChannelAck* clcAck);
/**
@@ -365,27 +365,27 @@ EXTERN int ooH245AcknowledgeTerminalCapabilitySet(struct OOH323CallData *call);
* @param call Pointer to call for which logical channels have to be opened.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooOpenLogicalChannels(struct OOH323CallData *call);
/**
- * This function is used to send OpenLogicalChannel message for audio/video
+ * This function is used to send OpenLogicalChannel message for audio/video
* channel.
* @param call Pointer to call for which channel has to be opened.
* @param capType Type of media channel.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOpenLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooOpenLogicalChannel(struct OOH323CallData *call,
enum OOCapType capType);
/**
* This function is used to build and send OpenLogicalChannel message using
* capability passed as parameter.
- * @param call Pointer to call for which OpenLogicalChannel message
+ * @param call Pointer to call for which OpenLogicalChannel message
* has to be built.
* @param epCap Pointer to capability
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooOpenChannel
@@ -415,7 +415,7 @@ EXTERN int ooSendH245UserInputIndication_signal
/**
* This function is used to request a remote end point to close a logical
- * channel.
+ * channel.
* @param call Pointer to call for which the logical channel has to
* be closed.
* @param logicalChan Pointer to the logical channel structure which needs
@@ -423,7 +423,7 @@ EXTERN int ooSendH245UserInputIndication_signal
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooSendRequestCloseLogicalChannel(struct OOH323CallData *call,
+EXTERN int ooSendRequestCloseLogicalChannel(struct OOH323CallData *call,
ooLogicalChannel *logicalChan);
/**
@@ -447,11 +447,11 @@ int ooSendRequestChannelCloseRelease
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooOnReceivedRequestChannelClose(struct OOH323CallData *call,
+EXTERN int ooOnReceivedRequestChannelClose(struct OOH323CallData *call,
H245RequestChannelClose *rclc);
/**
- * This function is used to handle a received RequestChannelCloseReject
+ * This function is used to handle a received RequestChannelCloseReject
* response message.
* @param call Handle to the call.
* @param rccReject Pointer to the received reject response message.
@@ -462,7 +462,7 @@ int ooOnReceivedRequestChannelCloseReject
(struct OOH323CallData *call, H245RequestChannelCloseReject *rccReject);
/**
- * This function is used to handle a received RequestChannelCloseAck
+ * This function is used to handle a received RequestChannelCloseAck
* response message.
* @param call Handle to the call.
* @param rccAck Pointer to the received ack response message.
@@ -473,21 +473,21 @@ int ooOnReceivedRequestChannelCloseAck
(struct OOH323CallData *call, H245RequestChannelCloseAck *rccAck);
/**
- * Builds an OLC for faststart with an audio/video capability passed as
+ * Builds an OLC for faststart with an audio/video capability passed as
* parameter.
* @param call Handle to call for which OLC has to be built.
* @param olc Pointer to an OLC structure which will be populated.
- * @param epCap Pointer to the capability which will be used to
+ * @param epCap Pointer to the capability which will be used to
* build OLC.
- * @param pctxt Pointer to an OOCTXT structure which will be used
+ * @param pctxt Pointer to an OOCTXT structure which will be used
* to allocate additional memory for OLC.
* @param dir Direction of OLC
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
- H245OpenLogicalChannel *olc,
- ooH323EpCapability *epCap,
+EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
+ H245OpenLogicalChannel *olc,
+ ooH323EpCapability *epCap,
OOCTXT*pctxt, int dir);
/**
@@ -496,16 +496,16 @@ EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,
* of the olc received in SETUP.
* @param call Handle to call for which OLC has to be built.
* @param olc Pointer to an received OLC structure.
- * @param epCap Pointer to the capability which will be used for
+ * @param epCap Pointer to the capability which will be used for
* this channel.
- * @param pctxt Pointer to an OOCTXT structure which will be used
+ * @param pctxt Pointer to an OOCTXT structure which will be used
* to allocate additional memory for OLC.
* @param dir Direction of channel OORX, OOTX etc.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooPrepareFastStartResponseOLC
- (OOH323CallData *call, H245OpenLogicalChannel *olc,
+ (OOH323CallData *call, H245OpenLogicalChannel *olc,
ooH323EpCapability *epCap, OOCTXT*pctxt, int dir);
/**
@@ -533,7 +533,7 @@ int ooSendMasterSlaveDeterminationRelease(struct OOH323CallData * call);
/**
* This function is used to send a terminal capability set reject message
* to the remote endpoint.
- * @param call Handle to the call for which reject message has to
+ * @param call Handle to the call for which reject message has to
* be sent.
* @param seqNo Sequence number of the TCS message to be rejected.
* @param cause Cause for rejecting a TCS message.
@@ -546,7 +546,7 @@ int ooSendTerminalCapabilitySetReject
/**
* This function is used to send a TerminalCapabilitySetRelease message after
* capability exchange timer has expired.
- * @param call Handle to call for which release message has to be
+ * @param call Handle to call for which release message has to be
* sent.
*
* @return OO_OK, on success; OO_FAILED, on failure.
@@ -557,26 +557,26 @@ int ooSendRequestMode(OOH323CallData* call, int isT38Mode);
/**
- * This is an helper function used to extract ip address and port info from
+ * This is an helper function used to extract ip address and port info from
* H245TransportAddress structure.
* @param call Handle to associated call.
- * @param h245Address Handle to H245TransportAddress structure from which
+ * @param h245Address Handle to H245TransportAddress structure from which
* information has to be extracted.
- * @param ip Pointer to buffer in which ip address will be
+ * @param ip Pointer to buffer in which ip address will be
* returned. Make sure that buffer has sufficient length.
- * @param port Pointer to integer in which port number will be
+ * @param port Pointer to integer in which port number will be
* returned.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
int ooGetIpPortFromH245TransportAddress
- (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
+ (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,
int *port);
/**
- * This is a callback function for handling an expired master-slave
+ * This is a callback function for handling an expired master-slave
* determination timer.
- * @param data Callback data registered at the time of creation of
+ * @param data Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -584,9 +584,9 @@ int ooGetIpPortFromH245TransportAddress
int ooMSDTimerExpired(void *data);
/**
- * This is a callback function for handling an expired capability exchange
+ * This is a callback function for handling an expired capability exchange
* timer.
- * @param data Callback data registered at the time of creation of
+ * @param data Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -594,9 +594,9 @@ int ooMSDTimerExpired(void *data);
int ooTCSTimerExpired(void *data);
/**
- * This is a callback function for handling an expired OpenLogicalChannel
+ * This is a callback function for handling an expired OpenLogicalChannel
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -604,9 +604,9 @@ int ooTCSTimerExpired(void *data);
int ooOpenLogicalChannelTimerExpired(void *pdata);
/**
- * This is a callback function for handling an expired CloseLogicalChannel
+ * This is a callback function for handling an expired CloseLogicalChannel
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -614,9 +614,9 @@ int ooOpenLogicalChannelTimerExpired(void *pdata);
int ooCloseLogicalChannelTimerExpired(void *pdata);
/**
- * This is a callback function for handling an expired RequestChannelClose
+ * This is a callback function for handling an expired RequestChannelClose
* timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
@@ -625,14 +625,14 @@ int ooRequestChannelCloseTimerExpired(void *pdata);
/**
* This is a callback function for handling an expired EndSession timer.
- * @param pdata Callback data registered at the time of creation of
+ * @param pdata Callback data registered at the time of creation of
* the timer.
*
* @return OO_OK, on success. OO_FAILED, otherwise.
*/
int ooSessionTimerExpired(void *pdata);
-/**
- * @}
+/**
+ * @}
*/
int ooRTDTimerExpired(void *pdata);
diff --git a/addons/ooh323c/src/ooh323.c b/addons/ooh323c/src/ooh323.c
index b04a954ed..be02f8f88 100644
--- a/addons/ooh323c/src/ooh323.c
+++ b/addons/ooh323c/src/ooh323.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -50,7 +50,7 @@ int ooHandleDisplayIE(OOH323CallData *call, Q931Message *q931Msg) {
if(pDisplayIE) {
if (call->remoteDisplayName)
memFreePtr(call->pctxt, call->remoteDisplayName);
- call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
+ call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
pDisplayIE->length*sizeof(ASN1OCTET)+1);
strncpy(call->remoteDisplayName, (char *)pDisplayIE->data, pDisplayIE->length*sizeof(ASN1OCTET));
}
@@ -62,7 +62,7 @@ int ooHandleH2250ID (OOH323CallData *call, H225ProtocolIdentifier* protocolIdent
if (!call->h225version && (protocolIdentifier->numids >= 6) &&
(protocolIdentifier->subid[3] == 2250)) {
call->h225version = protocolIdentifier->subid[5];
- OOTRACEDBGC4("Extract H.225 remote version, it's %d, (%s, %s)\n", call->h225version,
+ OOTRACEDBGC4("Extract H.225 remote version, it's %d, (%s, %s)\n", call->h225version,
call->callType, call->callToken);
}
@@ -74,7 +74,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
/* Handle fast-start */
@@ -92,7 +92,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -109,9 +109,9 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, facility->fastStart.elem[i].data,
+ memcpy(msgbuf, facility->fastStart.elem[i].data,
facility->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
facility->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -136,7 +136,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -145,9 +145,9 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -158,12 +158,12 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -182,10 +182,10 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -199,17 +199,17 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
return OO_FAILED;
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -218,7 +218,7 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
if(facility->m.h245AddressPresent)
@@ -227,16 +227,16 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in facility message (%s, %s)\n",
+ "provided in facility message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&facility->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Facility message (%s, %s)", call->callType,
+ "Facility message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -247,11 +247,11 @@ int ooHandleFastStart(OOH323CallData *call, H225Facility_UUIE *facility)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -286,8 +286,8 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
{
cause = q931Msg->causeIE->data[1];
/* Get rid of the extension bit.For more info, check ooQ931SetCauseIE */
- cause = cause & 0x7f;
- OOTRACEDBGA4("Cause of Release Complete is %x. (%s, %s)\n", cause,
+ cause = cause & 0x7f;
+ OOTRACEDBGA4("Cause of Release Complete is %x. (%s, %s)\n", cause,
call->callType, call->callToken);
}
@@ -296,18 +296,18 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_SESSION_TIMER)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted Session Timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
}
-
+
if(!q931Msg->userInfo)
{
OOTRACEERR3("ERROR:No User-User IE in received ReleaseComplete message "
@@ -326,14 +326,14 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
if(releaseComplete->m.reasonPresent)
{
- OOTRACEINFO4("Release complete reason code %d. (%s, %s)\n",
+ OOTRACEINFO4("Release complete reason code %d. (%s, %s)\n",
releaseComplete->reason.t, call->callType, call->callToken);
reasonCode = releaseComplete->reason.t;
}
}
if(call->callEndReason == OO_REASON_UNKNOWN)
- call->callEndReason = ooGetCallClearReasonFromCauseAndReasonCode(cause,
+ call->callEndReason = ooGetCallClearReasonFromCauseAndReasonCode(cause,
reasonCode);
call->q931cause = cause;
#if 0
@@ -349,7 +349,7 @@ int ooOnReceivedReleaseComplete(OOH323CallData *call, Q931Message *q931Msg)
" (%s, %s)\n", call->callType, call->callToken);
}
#endif
- if(call->h245SessionState != OO_H245SESSION_IDLE &&
+ if(call->h245SessionState != OO_H245SESSION_IDLE &&
call->h245SessionState != OO_H245SESSION_CLOSED)
{
ooCloseH245Connection(call);
@@ -384,7 +384,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
char remoteIP[2+8*4+7] = "";
call->callReference = q931Msg->callReference;
-
+
if(!q931Msg->userInfo)
{
OOTRACEERR3("ERROR:No User-User IE in received SETUP message (%s, %s)\n",
@@ -399,10 +399,10 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
ooHandleH2250ID(call, &setup->protocolIdentifier);
- memcpy(call->callIdentifier.guid.data, setup->callIdentifier.guid.data,
+ memcpy(call->callIdentifier.guid.data, setup->callIdentifier.guid.data,
setup->callIdentifier.guid.numocts);
call->callIdentifier.guid.numocts = setup->callIdentifier.guid.numocts;
-
+
memcpy(call->confIdentifier.data, setup->conferenceID.data,
setup->conferenceID.numocts);
call->confIdentifier.numocts = setup->conferenceID.numocts;
@@ -411,7 +411,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
pDisplayIE = ooQ931GetIE(q931Msg, Q931DisplayIE);
if(pDisplayIE)
{
- call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
+ call->remoteDisplayName = (char *) memAllocZ(call->pctxt,
pDisplayIE->length*sizeof(ASN1OCTET)+1);
strncpy(call->remoteDisplayName, (char *)pDisplayIE->data, pDisplayIE->length*sizeof(ASN1OCTET));
}
@@ -420,7 +420,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
{
if(setup->sourceAddress.count>0)
{
- ooH323RetrieveAliases(call, &setup->sourceAddress,
+ ooH323RetrieveAliases(call, &setup->sourceAddress,
&call->remoteAliases);
pAlias = call->remoteAliases;
while(pAlias)
@@ -444,13 +444,13 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
/* Extract, aliases used for us, if present. Also,
Populate calledPartyNumber from dialedDigits, if not yet populated using
- calledPartyNumber Q931 IE.
- */
+ calledPartyNumber Q931 IE.
+ */
if(setup->m.destinationAddressPresent)
{
if(setup->destinationAddress.count>0)
{
- ooH323RetrieveAliases(call, &setup->destinationAddress,
+ ooH323RetrieveAliases(call, &setup->destinationAddress,
&call->ourAliases);
pAlias = call->ourAliases;
while(pAlias)
@@ -468,7 +468,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
break;
}
- pAlias = pAlias->next;
+ pAlias = pAlias->next;
}
}
}
@@ -511,7 +511,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
}
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
}
-
+
/* Extract Remote IP address */
if(!setup->m.sourceCallSignalAddressPresent)
{
@@ -525,7 +525,7 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
call->remotePort = setup->sourceCallSignalAddress.u.ip6Address->port;
} else if(setup->sourceCallSignalAddress.t == T_H225TransportAddress_ipAddress) {
ip = &setup->sourceCallSignalAddress.u.ipAddress->ip;
- sprintf(remoteIP, "%d.%d.%d.%d", ip->data[0], ip->data[1],
+ sprintf(remoteIP, "%d.%d.%d.%d", ip->data[0], ip->data[1],
ip->data[2], ip->data[3]);
call->remotePort = setup->sourceCallSignalAddress.u.ipAddress->port;
} else {
@@ -543,9 +543,9 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
}
-
+
/* check for fast start */
-
+
if(setup->m.fastStartPresent)
{
if(!OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
@@ -579,11 +579,11 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
/* memset(msgbuf, 0, sizeof(msgbuf));*/
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
- OOTRACEERR3("ERROR:Memory - ooOnReceivedSetup - olc (%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooOnReceivedSetup - olc (%s, %s)\n",
call->callType, call->callToken);
/*Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -596,10 +596,10 @@ int ooOnReceivedSetup(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, setup->fastStart.elem[i].data,
+ memcpy(msgbuf, setup->fastStart.elem[i].data,
setup->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
setup->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -635,7 +635,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
if(!q931Msg->userInfo)
@@ -644,12 +644,12 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
" (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- callProceeding =
+ callProceeding =
q931Msg->userInfo->h323_uu_pdu.h323_message_body.u.callProceeding;
if(callProceeding == NULL)
{
OOTRACEERR3("Error: Received CallProceeding message does not have "
- "CallProceeding UUIE (%s, %s)\n", call->callType,
+ "CallProceeding UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -676,7 +676,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -693,9 +693,9 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, callProceeding->fastStart.elem[i].data,
+ memcpy(msgbuf, callProceeding->fastStart.elem[i].data,
callProceeding->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
callProceeding->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -720,7 +720,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -729,9 +729,9 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -741,12 +741,12 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -767,10 +767,10 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -784,11 +784,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -796,7 +796,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -805,11 +805,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -822,7 +822,7 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
callProceeding->m.h245AddressPresent) {
OOTRACEINFO3("Tunneling and h245address provided."
- "Using Tunneling for H.245 messages (%s, %s)\n",
+ "Using Tunneling for H.245 messages (%s, %s)\n",
call->callType, call->callToken);
}
else if(callProceeding->m.h245AddressPresent)
@@ -831,16 +831,16 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in callProceeding message (%s, %s)\n",
+ "provided in callProceeding message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&callProceeding->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "CallProceeding message (%s, %s)", call->callType,
+ "CallProceeding message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -851,11 +851,11 @@ int ooOnReceivedCallProceeding(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -878,7 +878,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
ooHandleDisplayIE(call, q931Msg);
@@ -893,7 +893,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(alerting == NULL)
{
OOTRACEERR3("Error: Received Alerting message does not have "
- "alerting UUIE (%s, %s)\n", call->callType,
+ "alerting UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -920,7 +920,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -937,9 +937,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, alerting->fastStart.elem[i].data,
+ memcpy(msgbuf, alerting->fastStart.elem[i].data,
alerting->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
alerting->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -964,7 +964,7 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -973,9 +973,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -985,12 +985,12 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1011,10 +1011,10 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -1026,18 +1026,18 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
return OO_FAILED;
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1046,12 +1046,12 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
finishPrint();
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
- }
+ }
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1062,9 +1062,9 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
q931Msg->userInfo->h323_uu_pdu.h245Tunneling &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- if (alerting->m.h245AddressPresent)
+ if (alerting->m.h245AddressPresent)
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
if (call->h225version >= 4) {
ret =ooSendTCSandMSD(call);
@@ -1077,16 +1077,16 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in Alerting message (%s, %s)\n",
+ "provided in Alerting message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&alerting->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Alerting message (%s, %s)", call->callType,
+ "Alerting message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1097,11 +1097,11 @@ int ooOnReceivedAlerting(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1127,7 +1127,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
int i=0, ret=0;
ooHandleDisplayIE(call, q931Msg);
@@ -1142,7 +1142,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(progress == NULL)
{
OOTRACEERR3("Error: Received Progress message does not have "
- "progress UUIE (%s, %s)\n", call->callType,
+ "progress UUIE (%s, %s)\n", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1169,7 +1169,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
olc = NULL;
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -1186,9 +1186,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, progress->fastStart.elem[i].data,
+ memcpy(msgbuf, progress->fastStart.elem[i].data,
progress->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
progress->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -1213,7 +1213,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fast start. "
"(%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1222,9 +1222,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(pChannel->channelNo != olc->forwardLogicalChannelNumber)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannel"
- "Number from %d to %d (%s, %s)\n",
- pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ "Number from %d to %d (%s, %s)\n",
+ pChannel->channelNo,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
@@ -1234,12 +1234,12 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
+ "channel %d (%s, %s)\n",
olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1260,10 +1260,10 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
-
+
if(ret != OO_OK)
{
if(call->callState < OO_CALL_CLEAR)
@@ -1277,11 +1277,11 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
return OO_FAILED;
}
-
+
if(!pChannel->chanCap->startTransmitChannel)
{
OOTRACEERR3("ERROR:No callback registered to start transmit "
- "channel (%s, %s)\n",call->callType,
+ "channel (%s, %s)\n",call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1289,7 +1289,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1298,12 +1298,12 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
removeEventHandler(call->pctxt);
OO_SETFLAG(call->flags, OO_M_FASTSTARTANSWERED);
}
-
+
}
/* Retrieve the H.245 control channel address from the connect msg */
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1314,9 +1314,9 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
q931Msg->userInfo->h323_uu_pdu.h245Tunneling &&
OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
- if (progress->m.h245AddressPresent)
+ if (progress->m.h245AddressPresent)
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
if (call->h225version >= 4) {
ret =ooSendTCSandMSD(call);
@@ -1328,16 +1328,16 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in Progress message (%s, %s)\n",
+ "provided in Progress message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&progress->h245Address, call->remoteIP,
&call->remoteH245Port);
if(ret != OO_OK)
{
OOTRACEERR3("Error: Unknown H245 address type in received "
- "Progress message (%s, %s)", call->callType,
+ "Progress message (%s, %s)", call->callType,
call->callToken);
/* Mark call for clearing */
if(call->callState < OO_CALL_CLEAR)
@@ -1348,11 +1348,11 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_FAILED;
}
if(call->remoteH245Port != 0 && !call->pH245Channel) {
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1371,7 +1371,7 @@ int ooOnReceivedProgress(OOH323CallData *call, Q931Message *q931Msg)
return OO_OK;
}
-
+
int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
@@ -1380,7 +1380,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
H245OpenLogicalChannel* olc;
ASN1OCTET msgbuf[MAXMSGLEN];
ooLogicalChannel * pChannel = NULL;
- H245H2250LogicalChannelParameters * h2250lcp = NULL;
+ H245H2250LogicalChannelParameters * h2250lcp = NULL;
ooHandleDisplayIE(call, q931Msg);
@@ -1412,7 +1412,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
ooHandleH2250ID(call, &connect->protocolIdentifier);
/*Handle fast-start */
- if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
+ if(OO_TESTFLAG (call->flags, OO_M_FASTSTART) &&
!OO_TESTFLAG (call->flags, OO_M_FASTSTARTANSWERED))
{
if(!connect->m.fastStartPresent)
@@ -1423,7 +1423,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
}
- if (connect->m.fastStartPresent &&
+ if (connect->m.fastStartPresent &&
!OO_TESTFLAG(call->flags, OO_M_FASTSTARTANSWERED))
{
/* For printing the decoded message to log, initialize handler. */
@@ -1436,7 +1436,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
olc = NULL;
/* memset(msgbuf, 0, sizeof(msgbuf));*/
- olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(call->pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -1453,9 +1453,9 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- memcpy(msgbuf, connect->fastStart.elem[i].data,
+ memcpy(msgbuf, connect->fastStart.elem[i].data,
connect->fastStart.elem[i].numocts);
- setPERBuffer(call->pctxt, msgbuf,
+ setPERBuffer(call->pctxt, msgbuf,
connect->fastStart.elem[i].numocts, 1);
ret = asn1PD_H245OpenLogicalChannel(call->pctxt, olc);
if(ret != ASN_OK)
@@ -1480,7 +1480,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OOTRACEERR4("ERROR: Logical Channel %d not found, fasts start "
"answered. (%s, %s)\n",
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
finishPrint();
removeEventHandler(call->pctxt);
@@ -1490,21 +1490,21 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OOTRACEINFO5("Remote endpoint changed forwardLogicalChannelNumber"
"from %d to %d (%s, %s)\n", pChannel->channelNo,
- olc->forwardLogicalChannelNumber, call->callType,
+ olc->forwardLogicalChannelNumber, call->callType,
call->callToken);
pChannel->channelNo = olc->forwardLogicalChannelNumber;
}
if(!strcmp(pChannel->dir, "transmit"))
{
- if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->forwardLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for channel"
- " %d (%s, %s)\n", olc->forwardLogicalChannelNumber,
+ " %d (%s, %s)\n", olc->forwardLogicalChannelNumber,
call->callType, call->callToken);
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1526,7 +1526,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
return OO_FAILED;
}
- ret = ooGetIpPortFromH245TransportAddress(call,
+ ret = ooGetIpPortFromH245TransportAddress(call,
&h2250lcp->mediaChannel, pChannel->remoteIP,
&pChannel->remoteMediaPort);
if(ret != OO_OK)
@@ -1552,7 +1552,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
pChannel->chanCap->startTransmitChannel(call, pChannel);
}
- /* Mark the current channel as established and close all other
+ /* Mark the current channel as established and close all other
logical channels with same session id and in same direction.
*/
ooOnLogicalChannelEstablished(call, pChannel);
@@ -1563,7 +1563,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
/* Retrieve tunneling info/H.245 control channel address from the connect msg */
- if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
+ if(q931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent &&
!q931Msg->userInfo->h323_uu_pdu.h245Tunneling) {
if (OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
@@ -1576,7 +1576,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
connect->m.h245AddressPresent) {
OOTRACEINFO3("Tunneling and h245address provided."
- "Giving preference to Tunneling (%s, %s)\n",
+ "Giving preference to Tunneling (%s, %s)\n",
call->callType, call->callToken);
}
else if(connect->m.h245AddressPresent)
@@ -1585,10 +1585,10 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
{
OO_CLRFLAG (call->flags, OO_M_TUNNELING);
OOTRACEINFO3("Tunneling is disabled for call as H245 address is "
- "provided in connect message (%s, %s)\n",
+ "provided in connect message (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooH323GetIpPortFromH225TransportAddress(call,
+ ret = ooH323GetIpPortFromH225TransportAddress(call,
&connect->h245Address, call->remoteIP, &call->remoteH245Port);
if(ret != OO_OK)
{
@@ -1606,11 +1606,11 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
if(call->remoteH245Port != 0 && !call->pH245Channel)
{
- /* Create an H.245 connection.
+ /* Create an H.245 connection.
*/
if(ooCreateH245Connection(call)== OO_FAILED)
{
- OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
+ OOTRACEERR3("Error: H.245 channel creation failed (%s, %s)\n",
call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -1645,7 +1645,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
}
/*
- Send TCS as call established and no capability exchange has yet
+ Send TCS as call established and no capability exchange has yet
started. This will be true only when separate h245 connection is not
established and tunneling is being used.
*/
@@ -1665,7 +1665,7 @@ int ooOnReceivedSignalConnect(OOH323CallData* call, Q931Message *q931Msg)
if (call->rtdrCount > 0 && call->rtdrInterval > 0) {
return ooSendRoundTripDelayRequest(call);
}
- return OO_OK;
+ return OO_OK;
}
int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
@@ -1697,21 +1697,21 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
if (ret != OO_OK) {
call->callState = OO_CALL_CLEAR;
} else {
-
+
/* H225 message callback */
if(gH323ep.h225Callbacks.onReceivedSetup)
ret = gH323ep.h225Callbacks.onReceivedSetup(call, q931Msg);
}
- /* Free up the mem used by the received message, as it's processing
- is done.
+ /* Free up the mem used by the received message, as it's processing
+ is done.
*/
if (ret == OO_OK) {
ooFreeQ931Message(call->msgctxt, q931Msg);
-
- /* DISABLEGK is used to selectively disable gatekeeper use. For
- incoming calls DISABLEGK can be set in onReceivedSetup callback by
- application. Very useful in pbx applications where gk is used only
+
+ /* DISABLEGK is used to selectively disable gatekeeper use. For
+ incoming calls DISABLEGK can be set in onReceivedSetup callback by
+ application. Very useful in pbx applications where gk is used only
when call is to or from outside pbx domian
*/
if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK))
@@ -1720,7 +1720,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
{
call->callState = OO_CALL_WAITING_ADMISSION;
ast_mutex_lock(&call->GkLock);
- ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call,
+ ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient, call,
FALSE);
tv = ast_tvnow();
ts.tv_sec = tv.tv_sec + 24;
@@ -1761,7 +1761,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
case Q931AlertingMsg:/* ALERTING message received */
- OOTRACEINFO3("H.225 Alerting message received (%s, %s)\n",
+ OOTRACEINFO3("H.225 Alerting message received (%s, %s)\n",
call->callType, call->callToken);
call->alertingTime = (H235TimeStamp) time(NULL);
@@ -1774,7 +1774,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
case Q931ProgressMsg:/* PROGRESS message received */
- OOTRACEINFO3("H.225 Progress message received (%s, %s)\n",
+ OOTRACEINFO3("H.225 Progress message received (%s, %s)\n",
call->callType, call->callToken);
ooOnReceivedProgress(call, q931Msg);
@@ -1796,12 +1796,12 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
{
pNode = dListFindByIndex(&call->timerList, i);
pTimer = (OOTimer*)pNode->data;
- if(((ooTimerCallback*)pTimer->cbData)->timerType &
+ if(((ooTimerCallback*)pTimer->cbData)->timerType &
OO_CALLESTB_TIMER)
{
memFreePtr(call->pctxt, pTimer->cbData);
ooTimerDelete(call->pctxt, &call->timerList, pTimer);
- OOTRACEDBGC3("Deleted CallESTB timer. (%s, %s)\n",
+ OOTRACEDBGC3("Deleted CallESTB timer. (%s, %s)\n",
call->callType, call->callToken);
break;
}
@@ -1840,14 +1840,14 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
call->endTime = (H235TimeStamp) time(NULL);
ooOnReceivedReleaseComplete(call, q931Msg);
-
+
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
- case Q931FacilityMsg:
+ case Q931FacilityMsg:
OOTRACEINFO3("H.225 Facility message Received (%s, %s)\n",
call->callType, call->callToken);
- ooOnReceivedFacility(call, q931Msg);
+ ooOnReceivedFacility(call, q931Msg);
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
case Q931StatusMsg:
@@ -1866,7 +1866,7 @@ int ooHandleH2250Message(OOH323CallData *call, Q931Message *q931Msg)
call->callType, call->callToken);
ooFreeQ931Message(call->msgctxt, q931Msg);
break;
- case Q931NotifyMsg:
+ case Q931NotifyMsg:
OOTRACEINFO3("H.225 Notify message Received (%s, %s)\n",
call->callType, call->callToken);
ooFreeQ931Message(call->msgctxt, q931Msg);
@@ -1886,7 +1886,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
int ret;
H225TransportAddress_ipAddress_ip *ip = NULL;
H225TransportAddress_ip6Address_ip *ip6 = NULL;
- OOTRACEDBGC3("Received Facility Message.(%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Received Facility Message.(%s, %s)\n", call->callType,
call->callToken);
ooHandleDisplayIE(call, pQ931Msg);
@@ -1945,11 +1945,11 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
{
OOTRACEINFO3("Call Forward Facility message received. (%s, %s)\n",
call->callType, call->callToken);
- if(!facility->m.alternativeAddressPresent &&
+ if(!facility->m.alternativeAddressPresent &&
!facility->m.alternativeAliasAddressPresent)
{
OOTRACEERR3("Error:No alternative address provided in call forward"
- "facility message.(%s, %s)\n", call->callType,
+ "facility message.(%s, %s)\n", call->callType,
call->callToken);
if(call->callState < OO_CALL_CLEAR)
{
@@ -1958,7 +1958,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
}
return OO_OK;
}
- call->pCallFwdData = (OOCallFwdData *) memAlloc(call->pctxt,
+ call->pCallFwdData = (OOCallFwdData *) memAlloc(call->pctxt,
sizeof(OOCallFwdData));
if(!call->pCallFwdData)
{
@@ -1972,40 +1972,40 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
if(facility->m.alternativeAddressPresent)
{
if (call->versionIP == 6) {
- if(facility->alternativeAddress.t !=
+ if(facility->alternativeAddress.t !=
T_H225TransportAddress_ip6Address)
{
OOTRACEERR3("ERROR: Source call signalling address type not ip6 "
"(%s, %s)\n", call->callType, call->callToken);
-
+
return OO_FAILED;
}
ip6 = &facility->alternativeAddress.u.ip6Address->ip;
inet_ntop(AF_INET6, ip6->data, call->pCallFwdData->ip, INET6_ADDRSTRLEN);
- call->pCallFwdData->port =
+ call->pCallFwdData->port =
facility->alternativeAddress.u.ip6Address->port;
} else {
- if(facility->alternativeAddress.t !=
+ if(facility->alternativeAddress.t !=
T_H225TransportAddress_ipAddress)
{
OOTRACEERR3("ERROR: Source call signalling address type not ip "
"(%s, %s)\n", call->callType, call->callToken);
-
+
return OO_FAILED;
}
ip = &facility->alternativeAddress.u.ipAddress->ip;
- sprintf(call->pCallFwdData->ip, "%d.%d.%d.%d", ip->data[0],
+ sprintf(call->pCallFwdData->ip, "%d.%d.%d.%d", ip->data[0],
ip->data[1], ip->data[2], ip->data[3]);
- call->pCallFwdData->port =
+ call->pCallFwdData->port =
facility->alternativeAddress.u.ipAddress->port;
}
}
if(facility->m.alternativeAliasAddressPresent)
{
- ooH323RetrieveAliases(call, &facility->alternativeAliasAddress,
+ ooH323RetrieveAliases(call, &facility->alternativeAliasAddress,
&call->pCallFwdData->aliases);
}
/* Now we have to clear the current call and make a new call to
@@ -2035,12 +2035,12 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
}
}
else{
- OOTRACEINFO3("Unhandled Facility reason type received (%s, %s)\n",
+ OOTRACEINFO3("Unhandled Facility reason type received (%s, %s)\n",
call->callType, call->callToken);
}
}
else{ /* Empty facility message Check for tunneling */
- if (pH323UUPdu->h323_message_body.t ==
+ if (pH323UUPdu->h323_message_body.t ==
T_H225H323_UU_PDU_h323_message_body_empty) {
OOTRACEDBGB3("Handling tunneled messages in empty Facility message."
" (%s, %s)\n", call->callType, call->callToken);
@@ -2049,7 +2049,7 @@ int ooOnReceivedFacility(OOH323CallData *call, Q931Message * pQ931Msg)
"message. (%s, %s)\n", call->callType, call->callToken);
}
}
-
+
return OO_OK;
}
@@ -2059,7 +2059,7 @@ int ooHandleStartH245FacilityMessage
H225TransportAddress_ipAddress *ipAddress = NULL;
H225TransportAddress_ip6Address *ip6Address = NULL;
int ret;
-
+
/* Extract H245 address */
if(!facility->m.h245AddressPresent)
{
@@ -2097,7 +2097,7 @@ int ooHandleStartH245FacilityMessage
"address found. (%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
-
+
sprintf(call->remoteIP, "%d.%d.%d.%d", ipAddress->ip.data[0],
ipAddress->ip.data[1],
ipAddress->ip.data[2],
@@ -2131,17 +2131,17 @@ int ooHandleTunneledH245Messages
H245Message *pmsg;
OOCTXT *pctxt = call->msgctxt;
int ret=0,i=0;
-
- OOTRACEDBGC3("Checking for tunneled H.245 messages (%s, %s)\n",
+
+ OOTRACEDBGC3("Checking for tunneled H.245 messages (%s, %s)\n",
call->callType, call->callToken);
- /* Check whether there are tunneled messages */
+ /* Check whether there are tunneled messages */
if(pH323UUPdu->m.h245TunnelingPresent)
{
if(pH323UUPdu->h245Tunneling)
{
OOTRACEDBGB4("Total number of tunneled H245 messages are %d.(%s, %s)"
- "\n", (int)pH323UUPdu->h245Control.n, call->callType,
+ "\n", (int)pH323UUPdu->h245Control.n, call->callType,
call->callToken);
for(i=0; i< (int)pH323UUPdu->h245Control.n; i++)
{
@@ -2156,21 +2156,21 @@ int ooHandleTunneledH245Messages
return OO_FAILED;
}
- setPERBuffer(pctxt,
+ setPERBuffer(pctxt,
(ASN1OCTET*)pH323UUPdu->h245Control.elem[i].data,
- pH323UUPdu->h245Control.elem[i].numocts, 1);
+ pH323UUPdu->h245Control.elem[i].numocts, 1);
initializePrintHandler(&printHandler, "Tunneled H.245 Message");
memset(pmsg, 0, sizeof(H245Message));
/* Set event handler */
setEventHandler (pctxt, &printHandler);
- OOTRACEDBGC4("Decoding %d tunneled H245 message. (%s, %s)\n",
+ OOTRACEDBGC4("Decoding %d tunneled H245 message. (%s, %s)\n",
i+1, call->callType, call->callToken);
- ret = asn1PD_H245MultimediaSystemControlMessage(pctxt,
+ ret = asn1PD_H245MultimediaSystemControlMessage(pctxt,
&(pmsg->h245Msg));
if(ret != ASN_OK)
{
- OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
+ OOTRACEERR3("Error decoding H245 message (%s, %s)\n",
call->callType, call->callToken);
ooFreeH245Message(call,pmsg);
return OO_FAILED;
@@ -2187,7 +2187,7 @@ int ooHandleTunneledH245Messages
}
int ooH323RetrieveAliases
- (OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
+ (OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
OOAliases **aliasList)
{
int i=0,j=0,k=0;
@@ -2198,14 +2198,14 @@ int ooH323RetrieveAliases
if(!pAddresses)
{
- OOTRACEWARN3("Warn:No Aliases present (%s, %s)\n", call->callType,
+ OOTRACEWARN3("Warn:No Aliases present (%s, %s)\n", call->callType,
call->callToken);
return OO_OK;
}
/* check for aliases */
if(pAddresses->count<=0)
return OO_OK;
-
+
for(i=0; i<(int)pAddresses->count; i++)
{
pNode = dListFindByIndex (pAddresses, i);
@@ -2230,14 +2230,14 @@ int ooH323RetrieveAliases
{
case T_H225AliasAddress_dialedDigits:
newAlias->type = T_H225AliasAddress_dialedDigits;
- newAlias->value = (char*) memAlloc(call->pctxt,
+ newAlias->value = (char*) memAlloc(call->pctxt,
strlen(pAliasAddress->u.dialedDigits)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(dialedDigits) (%s, %s)\n",
+ "newAlias->value(dialedDigits) (%s, %s)\n",
call->callType, call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2247,14 +2247,14 @@ int ooH323RetrieveAliases
break;
case T_H225AliasAddress_h323_ID:
newAlias->type = T_H225AliasAddress_h323_ID;
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
(pAliasAddress->u.h323_ID.nchars+1)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(h323id) (%s, %s)\n", call->callType,
+ "newAlias->value(h323id) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2266,7 +2266,7 @@ int ooH323RetrieveAliases
}
}
newAlias->value[k] = '\0';
- break;
+ break;
case T_H225AliasAddress_url_ID:
newAlias->type = T_H225AliasAddress_url_ID;
newAlias->value = (char*)memAlloc(call->pctxt,
@@ -2274,9 +2274,9 @@ int ooH323RetrieveAliases
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(urlid) (%s, %s)\n", call->callType,
+ "newAlias->value(urlid) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2288,18 +2288,18 @@ int ooH323RetrieveAliases
newAlias->type = T_H225AliasAddress_transportID;
pTransportAddrss = pAliasAddress->u.transportID;
if(pTransportAddrss->t == T_H225TransportAddress_ip6Address) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
INET6_ADDRSTRLEN*sizeof(char)*2);
inet_ntop(AF_INET6, pTransportAddrss->u.ip6Address->ip.data, newAlias->value, INET6_ADDRSTRLEN);
sprintf(newAlias->value+strlen(newAlias->value), ":%d", pTransportAddrss->u.ip6Address->port);
} else if(pTransportAddrss->t == T_H225TransportAddress_ipAddress) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
30*sizeof(char));
- sprintf(newAlias->value, "%d.%d.%d.%d:%d",
+ sprintf(newAlias->value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
@@ -2313,14 +2313,14 @@ int ooH323RetrieveAliases
break;
case T_H225AliasAddress_email_ID:
newAlias->type = T_H225AliasAddress_email_ID;
- newAlias->value = (char*)memAlloc(call->pctxt,
+ newAlias->value = (char*)memAlloc(call->pctxt,
strlen(pAliasAddress->u.email_ID)*sizeof(char)+1);
if(!newAlias->value)
{
OOTRACEERR3("ERROR:Memory - ooH323RetrieveAliases - "
- "newAlias->value(emailid) (%s, %s)\n", call->callType,
+ "newAlias->value(emailid) (%s, %s)\n", call->callType,
call->callToken);
- memFreePtr(call->pctxt, newAlias);
+ memFreePtr(call->pctxt, newAlias);
return OO_FAILED;
}
@@ -2329,7 +2329,7 @@ int ooH323RetrieveAliases
newAlias->value[strlen(pAliasAddress->u.email_ID)*sizeof(char)]='\0';
break;
default:
- OOTRACEERR3("Error:Unhandled Alias type (%s, %s)\n",
+ OOTRACEERR3("Error:Unhandled Alias type (%s, %s)\n",
call->callType, call->callToken);
memFreePtr(call->pctxt, newAlias);
continue;
@@ -2339,7 +2339,7 @@ int ooH323RetrieveAliases
*aliasList = newAlias;
newAlias = NULL;
-
+
pAliasAddress = NULL;
pNode = NULL;
}/* endof: for */
@@ -2364,7 +2364,7 @@ int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
switch(pAlias->type)
{
case T_H225AliasAddress_dialedDigits:
- pPrefixEntry = (H225SupportedPrefix *)memAlloc(pctxt,
+ pPrefixEntry = (H225SupportedPrefix *)memAlloc(pctxt,
sizeof(H225SupportedPrefix));
if(!pPrefixEntry) {
OOTRACEERR1("ERROR:Memory - ooPopulatePrefixList - pAliasEntry\n");
@@ -2383,12 +2383,12 @@ int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
bValid = TRUE;
break;
default:
- bValid = FALSE;
+ bValid = FALSE;
}
-
+
if(bValid)
dListAppend( pctxt, pPrefixList, (void*)pPrefixEntry );
-
+
pAlias = pAlias->next;
}
}
@@ -2412,7 +2412,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
pAlias = pAlias->next;
continue;
}
- pAliasEntry = (H225AliasAddress*)memAlloc(pctxt,
+ pAliasEntry = (H225AliasAddress*)memAlloc(pctxt,
sizeof(H225AliasAddress));
if(!pAliasEntry)
{
@@ -2445,7 +2445,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
pAliasEntry->u.h323_ID.nchars = strlen(pAlias->value);
pAliasEntry->u.h323_ID.data = (ASN116BITCHAR*)memAllocZ
(pctxt, strlen(pAlias->value)*sizeof(ASN116BITCHAR));
-
+
if(!pAliasEntry->u.h323_ID.data)
{
OOTRACEERR1("ERROR:Memory - ooPopulateAliasList - h323_id\n");
@@ -2458,12 +2458,12 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
case T_H225AliasAddress_url_ID:
pAliasEntry->t = T_H225AliasAddress_url_ID;
- pAliasEntry->u.url_ID = (ASN1IA5String)memAlloc(pctxt,
+ pAliasEntry->u.url_ID = (ASN1IA5String)memAlloc(pctxt,
strlen(pAlias->value)+1);
if(!pAliasEntry->u.url_ID)
{
OOTRACEERR1("ERROR:Memory - ooPopulateAliasList - url_id\n");
- memFreePtr(pctxt, pAliasEntry);
+ memFreePtr(pctxt, pAliasEntry);
return OO_FAILED;
}
strcpy(*(char**)&pAliasEntry->u.url_ID, pAlias->value);
@@ -2471,7 +2471,7 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
case T_H225AliasAddress_email_ID:
pAliasEntry->t = T_H225AliasAddress_email_ID;
- pAliasEntry->u.email_ID = (ASN1IA5String)memAlloc(pctxt,
+ pAliasEntry->u.email_ID = (ASN1IA5String)memAlloc(pctxt,
strlen(pAlias->value)+1);
if(!pAliasEntry->u.email_ID)
{
@@ -2484,14 +2484,14 @@ int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
break;
default:
OOTRACEERR1("ERROR: Unhandled alias type\n");
- bValid = FALSE;
+ bValid = FALSE;
}
-
+
if(bValid)
dListAppend( pctxt, pAliasList, (void*)pAliasEntry );
else
memFreePtr(pctxt, pAliasEntry);
-
+
pAlias = pAlias->next;
}
}
@@ -2544,7 +2544,7 @@ OOAliases* ooH323AddAliasToList
int j=0,k=0;
OOAliases *newAlias=NULL;
H225TransportAddress *pTransportAddrss=NULL;
-
+
newAlias = (OOAliases*) memAlloc(pctxt, sizeof(OOAliases));
if(!newAlias)
{
@@ -2562,7 +2562,7 @@ OOAliases* ooH323AddAliasToList
break;
case T_H225AliasAddress_h323_ID:
newAlias->type = T_H225AliasAddress_h323_ID;
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
(pAliasAddress->u.h323_ID.nchars+1)*sizeof(char)+1);
for(j=0, k=0; j<(int)pAliasAddress->u.h323_ID.nchars; j++)
@@ -2573,7 +2573,7 @@ OOAliases* ooH323AddAliasToList
}
}
newAlias->value[k] = '\0';
- break;
+ break;
case T_H225AliasAddress_url_ID:
newAlias->type = T_H225AliasAddress_url_ID;
newAlias->value = (char*)memAlloc(pctxt,
@@ -2585,18 +2585,18 @@ OOAliases* ooH323AddAliasToList
newAlias->type = T_H225AliasAddress_transportID;
pTransportAddrss = pAliasAddress->u.transportID;
if(pTransportAddrss->t == T_H225TransportAddress_ip6Address) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
INET6_ADDRSTRLEN*sizeof(char)*2);
inet_ntop(AF_INET6, pTransportAddrss->u.ip6Address->ip.data, newAlias->value, INET6_ADDRSTRLEN);
sprintf(newAlias->value+strlen(newAlias->value), ":%d", pTransportAddrss->u.ip6Address->port);
} else if(pTransportAddrss->t == T_H225TransportAddress_ipAddress) {
- /* hopefully ip:port value can't exceed more than 30
+ /* hopefully ip:port value can't exceed more than 30
characters */
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
30*sizeof(char));
- sprintf(newAlias->value, "%d.%d.%d.%d:%d",
+ sprintf(newAlias->value, "%d.%d.%d.%d:%d",
pTransportAddrss->u.ipAddress->ip.data[0],
pTransportAddrss->u.ipAddress->ip.data[1],
pTransportAddrss->u.ipAddress->ip.data[2],
@@ -2610,7 +2610,7 @@ OOAliases* ooH323AddAliasToList
break;
case T_H225AliasAddress_email_ID:
newAlias->type = T_H225AliasAddress_email_ID;
- newAlias->value = (char*)memAlloc(pctxt,
+ newAlias->value = (char*)memAlloc(pctxt,
strlen(pAliasAddress->u.email_ID)*sizeof(char)+1);
strcpy(newAlias->value, pAliasAddress->u.email_ID);
@@ -2626,7 +2626,7 @@ OOAliases* ooH323AddAliasToList
return newAlias;
}
-int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
+int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
H225TransportAddress *h225Address, char *ip, int *port)
{
if (call->versionIP == 6) {
@@ -2646,8 +2646,8 @@ int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
call->callToken);
return OO_FAILED;
}
- sprintf(ip, "%d.%d.%d.%d",
- h225Address->u.ipAddress->ip.data[0],
+ sprintf(ip, "%d.%d.%d.%d",
+ h225Address->u.ipAddress->ip.data[0],
h225Address->u.ipAddress->ip.data[1],
h225Address->u.ipAddress->ip.data[2],
h225Address->u.ipAddress->ip.data[3]);
diff --git a/addons/ooh323c/src/ooh323.h b/addons/ooh323c/src/ooh323.h
index 6b7edc21f..3877772af 100644
--- a/addons/ooh323c/src/ooh323.h
+++ b/addons/ooh323c/src/ooh323.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooh323.h
- * This file contains functions to support H.225 messages.
+ * @file ooh323.h
+ * This file contains functions to support H.225 messages.
*/
#ifndef _OOH323HDR_H_
#define _OOH323HDR_H_
@@ -81,7 +81,7 @@ EXTERN int ooHandleH2250Message
/**
* This function is used to process a received Facility message.
* @param call Handle to the call for which message has been received.
- * @param pQ931Msg Pointer the the received Facility message.
+ * @param pQ931Msg Pointer the received Facility message.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
@@ -95,7 +95,7 @@ EXTERN int ooOnReceivedFacility
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
+EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
H225H323_UU_PDU * pH323UUPdu);
/**
@@ -103,7 +103,7 @@ EXTERN int ooHandleTunneledH245Messages(struct OOH323CallData *call,
* @param call Handle to the call
* @param facility Pointer to the facility message.
*/
-EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
+EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
H225Facility_UUIE *facility);
/**
@@ -112,13 +112,13 @@ EXTERN int ooHandleStartH245FacilityMessage(struct OOH323CallData *call,
* @param call Handle to the call.Null when retrieving registered
* aliases.
* @param pAddresses Pointer to the sequence of alias addresses.
- * @param aliasList Handle to alias list to be populated with retrieved
+ * @param aliasList Handle to alias list to be populated with retrieved
* aliases.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323RetrieveAliases
- (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
+ (struct OOH323CallData *call, H225_SeqOfH225AliasAddress *pAddresses,
OOAliases **aliasList);
/**
@@ -133,16 +133,16 @@ EXTERN int ooPopulatePrefixList(OOCTXT *pctxt, OOAliases *pAliases,
* @param pAliases Pointer to aliases to be used for populating list.
* @param pAliasList Pointer to alias list to be populated.
*
- * @return OO_OK, on success. OO_FAILED, otherwise.
+ * @return OO_OK, on success. OO_FAILED, otherwise.
*/
EXTERN int ooPopulateAliasList(OOCTXT *pctxt, OOAliases *pAliases,
- H225_SeqOfH225AliasAddress *pAliasList, int pAliasType);
+ H225_SeqOfH225AliasAddress *pAliasList, int pAliasType);
/**
* This function is used to search a particular alias in the alias list. The
* search can be on the basis of alias type or value or both.
* @param aliasList Handle to the alias list to be searched.
- * @param type Type of the alias, if search has to consider type as
+ * @param type Type of the alias, if search has to consider type as
* criterion, otherwise 0.
* @param value Value of the alias, if the search has to consider value as
* criterion, NULL otherwise.
@@ -153,7 +153,7 @@ EXTERN OOAliases* ooH323GetAliasFromList
/**
* This function is used to add a new alias to alias list.
* @param pAliasList Pointer to Alias list.
- * @param pctxt Pointer to OOCTXT structure to be used for memory
+ * @param pctxt Pointer to OOCTXT structure to be used for memory
* allocation.
* @param pAliasAddress New alias address to be added.
*
@@ -169,12 +169,12 @@ EXTERN OOAliases* ooH323AddAliasToList
* @param h225Address Pointer to H225TransportAddress structure
* @param ip Pointer to the buffer in which dotted ip address will
* be returned.
- * @param port Pointer to the integer in which port value will be
+ * @param port Pointer to the integer in which port value will be
* returned.
*
* @return OO_OK, on success; OO_FAILED, on failure.
*/
-int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
+int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
H225TransportAddress *h225Address, char *ip, int *port);
/**
* @}
@@ -184,4 +184,3 @@ int ooH323GetIpPortFromH225TransportAddress(struct OOH323CallData *call,
#endif
#endif
-
diff --git a/addons/ooh323c/src/ooh323ep.c b/addons/ooh323c/src/ooh323ep.c
index 92e6a2479..1dedecdb8 100644
--- a/addons/ooh323c/src/ooh323ep.c
+++ b/addons/ooh323c/src/ooh323ep.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -36,7 +36,7 @@ extern DList g_TimerList;
int ooH323EpInitialize
(enum OOCallMode callMode, const char* tracefile)
{
-
+
memset(&gH323ep, 0, sizeof(ooEndPoint));
initContext(&(gH323ep.ctxt));
@@ -46,25 +46,25 @@ int ooH323EpInitialize
{
if(strlen(tracefile)>= MAXFILENAME)
{
- printf("Error:File name longer than allowed maximum %d\n",
+ printf("Error:File name longer than allowed maximum %d\n",
MAXFILENAME-1);
return OO_FAILED;
}
strcpy(gH323ep.traceFile, tracefile);
}
else{
- strcpy(gH323ep.traceFile, DEFAULT_TRACEFILE);
+ strcpy(gH323ep.traceFile, DEFAULT_TRACEFILE);
}
gH323ep.fptraceFile = fopen(gH323ep.traceFile, "a");
if(gH323ep.fptraceFile == NULL)
{
- printf("Error:Failed to open trace file %s for write.\n",
+ printf("Error:Failed to open trace file %s for write.\n",
gH323ep.traceFile);
return OO_FAILED;
}
- /* Initialize default port ranges that will be used by stack.
+ /* Initialize default port ranges that will be used by stack.
Apps can override these by explicitely setting port ranges
*/
@@ -79,12 +79,12 @@ int ooH323EpInitialize
gH323ep.rtpPorts.start = RTPPORTSSTART;
gH323ep.rtpPorts.max = RTPPORTSEND;
gH323ep.rtpPorts.current = RTPPORTSSTART;
-
+
OO_SETFLAG(gH323ep.flags, OO_M_FASTSTART);
OO_SETFLAG(gH323ep.flags, OO_M_TUNNELING);
OO_SETFLAG(gH323ep.flags, OO_M_AUTOANSWER);
OO_CLRFLAG(gH323ep.flags, OO_M_GKROUTED);
-
+
gH323ep.aliases = NULL;
gH323ep.termType = DEFAULT_TERMTYPE;
@@ -107,7 +107,7 @@ int ooH323EpInitialize
ooH323EpSetCallerID(DEFAULT_CALLERID);
-
+
gH323ep.myCaps = NULL;
gH323ep.noOfCaps = 0;
gH323ep.callList = NULL;
@@ -116,7 +116,7 @@ int ooH323EpInitialize
ast_mutex_init(&newCallLock);
ast_mutex_init(&bindPortLock);
gH323ep.dtmfmode = 0;
- gH323ep.callingPartyNumber[0]='\0';
+ gH323ep.callingPartyNumber[0]='\0';
gH323ep.callMode = callMode;
gH323ep.isGateway = FALSE;
@@ -164,7 +164,7 @@ int ooH323EpSetLocalAddress(const char* localip, int listenport)
strcpy(gH323ep.signallingIP, localip);
OOTRACEINFO2("Signalling IP address is set to %s\n", localip);
}
-
+
if(listenport)
{
gH323ep.listenPort = listenport;
@@ -332,7 +332,7 @@ int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks)
return OO_OK;
}
-
+
int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks)
{
gH323ep.h323Callbacks.onNewCallCreated = h323Callbacks.onNewCallCreated;
@@ -376,10 +376,10 @@ int ooH323EpDestroy(void)
if(gH323ep.listener)
{
ooSocketClose(*(gH323ep.listener));
- gH323ep.listener = NULL;
+ gH323ep.listener = NULL;
}
- ooGkClientDestroy();
+ ooGkClientDestroy();
if(gH323ep.fptraceFile)
{
@@ -461,7 +461,7 @@ int ooH323EpEnableH245Tunneling(void)
OO_SETFLAG(gH323ep.flags, OO_M_TUNNELING);
return OO_OK;
}
-
+
int ooH323EpDisableH245Tunneling(void)
{
OO_CLRFLAG(gH323ep.flags, OO_M_TUNNELING);
@@ -527,7 +527,7 @@ int ooH323EpSetCallingPartyNumber(const char* number)
int ret=OO_OK;
if(number)
{
- strncpy(gH323ep.callingPartyNumber, number,
+ strncpy(gH323ep.callingPartyNumber, number,
sizeof(gH323ep.callingPartyNumber)-1);
ret = ooH323EpAddAliasDialedDigits((char*)number);
return ret;
@@ -544,7 +544,7 @@ int ooH323EpSetTraceLevel(int traceLevel)
void ooH323EpPrintConfig(void)
{
OOTRACEINFO1("H.323 Endpoint Configuration is as follows:\n");
-
+
OOTRACEINFO2("\tTrace File: %s\n", gH323ep.traceFile);
if(!OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART))
@@ -575,7 +575,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO1("\tAutoAnswer - enabled\n");
else
OOTRACEINFO1("\tAutoAnswer - disabled\n");
-
+
OOTRACEINFO2("\tTerminal Type - %d\n", gH323ep.termType);
OOTRACEINFO2("\tT35 CountryCode - %d\n", gH323ep.t35CountryCode);
@@ -585,7 +585,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tManufacturer Code - %d\n", gH323ep.manufacturerCode);
OOTRACEINFO2("\tProductID - %s\n", gH323ep.productID);
-
+
OOTRACEINFO2("\tVersionID - %s\n", gH323ep.versionID);
OOTRACEINFO2("\tLocal signalling IP address - %s\n", gH323ep.signallingIP);
@@ -595,8 +595,8 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tCallerID - %s\n", gH323ep.callerid);
- OOTRACEINFO2("\tCall Establishment Timeout - %d seconds\n",
- gH323ep.callEstablishmentTimeout);
+ OOTRACEINFO2("\tCall Establishment Timeout - %d seconds\n",
+ gH323ep.callEstablishmentTimeout);
OOTRACEINFO2("\tMasterSlaveDetermination Timeout - %d seconds\n",
gH323ep.msdTimeout);
@@ -609,7 +609,7 @@ void ooH323EpPrintConfig(void)
OOTRACEINFO2("\tSession Timeout - %d seconds\n", gH323ep.sessionTimeout);
- return;
+ return;
}
@@ -620,7 +620,7 @@ int ooH323EpAddG711Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
@@ -631,7 +631,7 @@ int ooH323EpAddG728Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
@@ -642,89 +642,89 @@ int ooH323EpAddG729Capability(int cap, int txframes, int rxframes, int dir,
cb_StopTransmitChannel stopTransmitChannel)
{
return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes, FALSE,
- dir, startReceiveChannel, startTransmitChannel,
+ dir, startReceiveChannel, startTransmitChannel,
stopReceiveChannel, stopTransmitChannel, FALSE);
}
-int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
+int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddG726Capability(int cap, int txframes, int rxframes,
+int ooH323EpAddG726Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddAMRNBCapability(int cap, int txframes, int rxframes,
+int ooH323EpAddAMRNBCapability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddSpeexCapability(int cap, int txframes, int rxframes,
+int ooH323EpAddSpeexCapability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
- silenceSuppression, dir, startReceiveChannel,
- startTransmitChannel, stopReceiveChannel,
+ return ooCapabilityAddSimpleCapability(NULL, cap, txframes, rxframes,
+ silenceSuppression, dir, startReceiveChannel,
+ startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
+int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
OOBOOL comfortNoise, OOBOOL scrambled, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddGSMCapability(NULL, cap, framesPerPkt, comfortNoise,
- scrambled, dir, startReceiveChannel,
+ return ooCapabilityAddGSMCapability(NULL, cap, framesPerPkt, comfortNoise,
+ scrambled, dir, startReceiveChannel,
startTransmitChannel, stopReceiveChannel,
stopTransmitChannel, FALSE);
}
-int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
- unsigned qcifMPI, unsigned cifMPI,
- unsigned cif4MPI, unsigned cif16MPI,
- unsigned maxBitRate, int dir,
+int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
+ unsigned qcifMPI, unsigned cifMPI,
+ unsigned cif4MPI, unsigned cif16MPI,
+ unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
cb_StopTransmitChannel stopTransmitChannel)
{
- return ooCapabilityAddH263VideoCapability(NULL, sqcifMPI, qcifMPI, cifMPI,
+ return ooCapabilityAddH263VideoCapability(NULL, sqcifMPI, qcifMPI, cifMPI,
cif4MPI, cif16MPI, maxBitRate,dir,
startReceiveChannel, startTransmitChannel,
- stopReceiveChannel, stopTransmitChannel,
+ stopReceiveChannel, stopTransmitChannel,
FALSE);
}
@@ -805,7 +805,7 @@ int ooH323EpSetTCPPortRange(int base, int max)
gH323ep.tcpPorts.start = base;
if(max > 65500)
gH323ep.tcpPorts.max = 65500;
- else
+ else
gH323ep.tcpPorts.max = max;
if(gH323ep.tcpPorts.max<gH323ep.tcpPorts.start)
@@ -815,7 +815,7 @@ int ooH323EpSetTCPPortRange(int base, int max)
return OO_FAILED;
}
gH323ep.tcpPorts.current = gH323ep.tcpPorts.start;
-
+
OOTRACEINFO1("TCP port range initialize - successful\n");
return OO_OK;
}
@@ -828,18 +828,18 @@ int ooH323EpSetUDPPortRange(int base, int max)
gH323ep.udpPorts.start = base;
if(max > 65500)
gH323ep.udpPorts.max = 65500;
- else
+ else
gH323ep.udpPorts.max = max;
-
+
if(gH323ep.udpPorts.max<gH323ep.udpPorts.start)
{
OOTRACEERR1("Error: Failed to set udp ports- Max port number"
" less than Start port number\n");
return OO_FAILED;
}
-
+
gH323ep.udpPorts.current = gH323ep.udpPorts.start;
-
+
OOTRACEINFO1("UDP port range initialize - successful\n");
return OO_OK;
@@ -853,18 +853,17 @@ int ooH323EpSetRTPPortRange(int base, int max)
gH323ep.rtpPorts.start = base;
if(max > 65500)
gH323ep.rtpPorts.max = 65500;
- else
+ else
gH323ep.rtpPorts.max = max;
-
+
if(gH323ep.rtpPorts.max<gH323ep.rtpPorts.start)
{
OOTRACEERR1("Error: Failed to set rtp ports- Max port number"
" less than Start port number\n");
return OO_FAILED;
}
-
+
gH323ep.rtpPorts.current = gH323ep.rtpPorts.start;
OOTRACEINFO1("RTP port range initialize - successful\n");
return OO_OK;
}
-
diff --git a/addons/ooh323c/src/ooh323ep.h b/addons/ooh323c/src/ooh323ep.h
index 50ac29dc6..a77b9e38a 100644
--- a/addons/ooh323c/src/ooh323ep.h
+++ b/addons/ooh323c/src/ooh323ep.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooh323ep.h
- * This file contains H323 endpoint related functions.
+ * @file ooh323ep.h
+ * This file contains H323 endpoint related functions.
*/
#ifndef OO_H323EP_H_
#define OO_H323EP_H_
@@ -53,7 +53,7 @@ extern "C" {
#endif /* EXTERN */
struct OOCapPrefs;
-/**
+/**
* @defgroup h323ep H323 Endpoint management functions
* @{
*/
@@ -67,7 +67,7 @@ struct OOCapPrefs;
-
+
/**
* This structure is used to define the port ranges to be used
* by the application.
@@ -78,19 +78,19 @@ typedef struct OOH323Ports {
int current; /*!< Current port number. */
} OOH323Ports;
-/**
+/**
* Structure to store all configuration information related to the
- * endpoint created by an application
+ * endpoint created by an application
*/
typedef struct OOH323EndPoint {
-
- /**
+
+ /**
* This context should be used for allocation of memory for
* items within the endpoint structure.
*/
OOCTXT ctxt;
- /**
+ /**
* This context should be used for allocation of memory for
* message structures.
*/
@@ -107,11 +107,11 @@ typedef struct OOH323EndPoint {
/** Range of port numbers to be used for RTP connections */
OOH323Ports rtpPorts;
-
+
ASN1UINT flags;
- int termType; /* 50 - Terminal entity with No MC,
- 60 - Gateway entity with no MC,
+ int termType; /* 50 - Terminal entity with No MC,
+ 60 - Gateway entity with no MC,
70 - Terminal Entity with MC, but no MP etc.*/
int t35CountryCode;
int t35Extension;
@@ -166,14 +166,14 @@ EXTERN int ooH323EpInitialize
(enum OOCallMode callMode, const char* tracefile);
/**
- * This function is used to represent the H.323 application endpoint as
+ * This function is used to represent the H.323 application endpoint as
* gateway, instead of an H.323 phone endpoint.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetAsGateway(void);
-EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int manufacturer,
+EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int manufacturer,
char* vendor, char* version);
/**
@@ -183,7 +183,7 @@ EXTERN void ooH323EpSetVersionInfo(int t35countrycode, int t35extensions, int ma
* @param listenport Port to be used for listening for incoming calls.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
/**
@@ -192,7 +192,7 @@ EXTERN int ooH323EpSetLocalAddress(const char* localip, int listenport);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetTCPPortRange(int base, int max);
@@ -202,7 +202,7 @@ EXTERN int ooH323EpSetTCPPortRange(int base, int max);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetUDPPortRange(int base, int max);
@@ -212,7 +212,7 @@ EXTERN int ooH323EpSetUDPPortRange(int base, int max);
* @param base Starting port number for the range
* @param max Ending port number for the range.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpSetRTPPortRange(int base, int max);
@@ -252,7 +252,7 @@ EXTERN int ooH323EpAddAliasURLID(const char* url);
/**
* This function is used to add an email id as an alias for the endpoint.
* @param email Email id to be set as an alias.
- *
+ *
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddAliasEmailID(const char* email);
@@ -266,7 +266,7 @@ EXTERN int ooH323EpAddAliasEmailID(const char* email);
EXTERN int ooH323EpAddAliasTransportID(const char* ipaddress);
/**
- * This function is used to clear all the aliases used by the
+ * This function is used to clear all the aliases used by the
* H323 endpoint.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -284,9 +284,9 @@ EXTERN int ooH323EpSetH225MsgCallbacks(OOH225MsgCallbacks h225Callbacks);
/**
* This function is used to set high level H.323 callbacks for the endpoint.
- * Make sure all unused callbacks in the structure are set to NULL before
+ * Make sure all unused callbacks in the structure are set to NULL before
* calling this function.
- * @param h323Callbacks Callback structure containing various high level
+ * @param h323Callbacks Callback structure containing various high level
* callbacks.
* @return OO_OK, on success. OO_FAILED, on failure
*/
@@ -294,8 +294,8 @@ EXTERN int ooH323EpSetH323Callbacks(OOH323CALLBACKS h323Callbacks);
/**
- * This function is the last function to be invoked after done using the
- * stack. It closes the H323 Endpoint for an application, releasing all
+ * This function is the last function to be invoked after done using the
+ * stack. It closes the H323 Endpoint for an application, releasing all
* the associated memory.
*
* @return OO_OK on success
@@ -321,8 +321,8 @@ EXTERN int ooH323EpEnableAutoAnswer(void);
EXTERN int ooH323EpDisableAutoAnswer(void);
/**
- * This function is used to enable manual ringback. By default the stack sends
- * alerting message automatically on behalf of the endpoint application.
+ * This function is used to enable manual ringback. By default the stack sends
+ * alerting message automatically on behalf of the endpoint application.
* However, if endpoint application wants to do alerting user part first before
* sending out alerting message, it can enable this feature.
*
@@ -331,7 +331,7 @@ EXTERN int ooH323EpDisableAutoAnswer(void);
EXTERN int ooH323EpEnableManualRingback(void);
/**
- * This function is used to disable manual ringback. By default the
+ * This function is used to disable manual ringback. By default the
* manual ringback feature is disabled, i.e, the stack sends alerting on behalf
* of the application automatically.
*
@@ -407,7 +407,7 @@ EXTERN int ooH323EpDisableGkRouted(void);
* @param productID New value for the product id.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooH323EpSetProductID (const char * productID);
/**
@@ -429,7 +429,7 @@ EXTERN int ooH323EpSetCallerID (const char * callerID);
/**
* This function is used to set calling party number to be used for outbound
- * calls.Note, you can override it for a specific call by using
+ * calls.Note, you can override it for a specific call by using
* ooCallSetCallingPartyNumber function.
* @param number e164 number to be used as calling party number.
*
@@ -438,7 +438,7 @@ EXTERN int ooH323EpSetCallerID (const char * callerID);
EXTERN int ooH323EpSetCallingPartyNumber(const char * number);
/**
- * This function is used to print the current configuration information of
+ * This function is used to print the current configuration information of
* the H323 endpoint to log file.
*/
void ooH323EpPrintConfig(void);
@@ -447,7 +447,7 @@ void ooH323EpPrintConfig(void);
/**
* This function is used to add G728 capability to the H323 endpoint.
* @param cap Type of G728 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -455,10 +455,10 @@ void ooH323EpPrintConfig(void);
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG728Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -467,7 +467,7 @@ EXTERN int ooH323EpAddG728Capability
/**
* This function is used to add G729 capability to the H323 endpoint.
* @param cap Type of G729 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -475,10 +475,10 @@ EXTERN int ooH323EpAddG728Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG729Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -488,7 +488,7 @@ EXTERN int ooH323EpAddG729Capability
/**
* This function is used to add G7231 capability to the H323 endpoint.
* @param cap Type of G7231 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param silenceSuppression Silence Suppression support
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
@@ -497,9 +497,9 @@ EXTERN int ooH323EpAddG729Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
+EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
OOBOOL silenceSuppression, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
@@ -509,7 +509,7 @@ EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
/**
* This function is used to add G711 capability to the H323 endpoint.
* @param cap Type of G711 capability to be added.
- * @param txframes Number of frames per packet for transmission.
+ * @param txframes Number of frames per packet for transmission.
* @param rxframes Number of frames per packet for reception.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -517,10 +517,10 @@ EXTERN int ooH323EpAddG7231Capability(int cap, int txframes, int rxframes,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooH323EpAddG711Capability
- (int cap, int txframes, int rxframes, int dir,
+ (int cap, int txframes, int rxframes, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -530,8 +530,8 @@ EXTERN int ooH323EpAddG711Capability
/**
* This function is used to add a new GSM capability to the endpoint.
* @param cap Type of GSM capability to be added.
- * @param framesPerPkt Number of GSM frames pre packet.
- * @param comfortNoise Comfort noise spec for the capability.
+ * @param framesPerPkt Number of GSM frames pre packet.
+ * @param comfortNoise Comfort noise spec for the capability.
* @param scrambled Scrambled enabled/disabled for the capability.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -539,10 +539,10 @@ EXTERN int ooH323EpAddG711Capability
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
- OOBOOL comfortNoise,OOBOOL scrambled,int dir,
+EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
+ OOBOOL comfortNoise,OOBOOL scrambled,int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
@@ -550,18 +550,18 @@ EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
/**
* This function is used to add H263 video capability to the H323 endpoint.
* @param cap Capability type - OO_H263VIDEO
- * @param sqcifMPI Minimum picture interval for encoding/decoding
+ * @param sqcifMPI Minimum picture interval for encoding/decoding
* of SQCIF pictures.
- * @param qcifMPI Minimum picture interval for encoding/decoding
+ * @param qcifMPI Minimum picture interval for encoding/decoding
* of QCIF pictures.
- * @param cifMPI Minimum picture interval for encoding/decoding
+ * @param cifMPI Minimum picture interval for encoding/decoding
* of CIF pictures.
- * @param cif4MPI Minimum picture interval for encoding/decoding
+ * @param cif4MPI Minimum picture interval for encoding/decoding
* of CIF4 pictures.
- * @param cif16MPI Minimum picture interval for encoding/decoding
+ * @param cif16MPI Minimum picture interval for encoding/decoding
* of CIF16 pictures.
* @param maxBitRate Maximum bit rate in units of 100 bits/s at
- * which a transmitter can transmit video or a
+ * which a transmitter can transmit video or a
* receiver can receive video.
* @param dir Direction of capability.OORX, OOTX, OORXANDTX
* @param startReceiveChannel Callback function to start receive channel.
@@ -569,12 +569,12 @@ EXTERN int ooH323EpAddGSMCapability(int cap, ASN1USINT framesPerPkt,
* @param stopReceiveChannel Callback function to stop receive channel.
* @param stopTransmitChannel Callback function to stop transmit channel.
*
- * @return OO_OK, on success. OO_FAILED, on failure.
+ * @return OO_OK, on success. OO_FAILED, on failure.
*/
-EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
- unsigned qcifMPI, unsigned cifMPI,
- unsigned cif4MPI, unsigned cif16MPI,
- unsigned maxBitRate, int dir,
+EXTERN int ooH323EpAddH263VideoCapability(int cap, unsigned sqcifMPI,
+ unsigned qcifMPI, unsigned cifMPI,
+ unsigned cif4MPI, unsigned cif16MPI,
+ unsigned maxBitRate, int dir,
cb_StartReceiveChannel startReceiveChannel,
cb_StartTransmitChannel startTransmitChannel,
cb_StopReceiveChannel stopReceiveChannel,
diff --git a/addons/ooh323c/src/oohdr.h b/addons/ooh323c/src/oohdr.h
index b7f9590c9..36d319d94 100644
--- a/addons/ooh323c/src/oohdr.h
+++ b/addons/ooh323c/src/oohdr.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/ooper.h b/addons/ooh323c/src/ooper.h
index 6a1174a2b..0c6895dca 100644
--- a/addons/ooh323c/src/ooper.h
+++ b/addons/ooh323c/src/ooper.h
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -19,4 +19,3 @@
#endif
-
diff --git a/addons/ooh323c/src/ooports.c b/addons/ooh323c/src/ooports.c
index 6ff9b4c0b..7b0a85033 100644
--- a/addons/ooh323c/src/ooports.c
+++ b/addons/ooh323c/src/ooports.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -90,7 +90,7 @@ int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip)
}
}
-#ifdef _WIN32
+#ifdef _WIN32
int ooBindOSAllocatedPort(OOSOCKET socket, char *ip)
{
OOIPADDR ipAddrs;
@@ -98,14 +98,14 @@ int ooBindOSAllocatedPort(OOSOCKET socket, char *ip)
struct sockaddr_in name;
size = sizeof(struct sockaddr_in);
ret= ooSocketStrToAddr (ip, &ipAddrs);
- if((ret=ooSocketBind(socket, ipAddrs,
+ if((ret=ooSocketBind(socket, ipAddrs,
0))==ASN_OK)
{
ret = ooSocketGetSockName(socket, &name, &size);
if(ret == ASN_OK)
{
return name.sin_port;
-
+
}
}
diff --git a/addons/ooh323c/src/ooports.h b/addons/ooh323c/src/ooports.h
index 0b53e8af8..56770013e 100644
--- a/addons/ooh323c/src/ooports.h
+++ b/addons/ooh323c/src/ooports.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooports.h
- * This file contains functions to manage ports used by the stack.
+ * @file ooports.h
+ * This file contains functions to manage ports used by the stack.
*/
#ifndef _OOPORTS_H_
@@ -43,7 +43,7 @@ extern "C" {
/**
* Get the next port of type TCP/UDP/RTP from the corresponding range.
- * When max value for the range is reached, it starts again from the
+ * When max value for the range is reached, it starts again from the
* first port number of the range.
*
* @param ep Reference to the H323 Endpoint structure.
@@ -69,7 +69,7 @@ EXTERN int ooGetNextPort (OOH323PortType type);
EXTERN int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip);
/**
- * This function is supported for windows version only.
+ * This function is supported for windows version only.
* Windows sockets have problem in reusing the addresses even after
* setting SO_REUSEADDR, hence in windows we just allow os to bind
* to any random port.
@@ -80,7 +80,7 @@ EXTERN int ooBindPort (OOH323PortType type, OOSOCKET socket, char *ip);
* socket is bound and in case of failure just returns
* a negative value.
*/
-#ifdef _WIN32
+#ifdef _WIN32
EXTERN int ooBindOSAllocatedPort(OOSOCKET socket, char *ip);
#endif
diff --git a/addons/ooh323c/src/ooq931.c b/addons/ooh323c/src/ooq931.c
index 4d6d99368..1ca361c2c 100644
--- a/addons/ooh323c/src/ooq931.c
+++ b/addons/ooh323c/src/ooq931.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -49,7 +49,7 @@ static ASN1OBJID gProtocolID = {
6, { 0, 0, 8, 2250, 0, 4 }
};
-EXTERN int ooQ931Decode
+EXTERN int ooQ931Decode
(OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks)
{
int offset, x;
@@ -77,13 +77,13 @@ EXTERN int ooQ931Decode
if(msg->fromDestination)
OOTRACEDBGB1(" from = destination\n");
else
- OOTRACEDBGB1(" from = originator\n");
+ OOTRACEDBGB1(" from = originator\n");
msg->messageType = data[4];
OOTRACEDBGB2(" messageType = %x\n", msg->messageType);
-
+
/* Have preamble, start getting the informationElements into buffers */
offset = 5;
while (offset < length) {
@@ -101,10 +101,10 @@ EXTERN int ooQ931Decode
the Q931 documentation claims the length is a single byte,
unfortunately all H.323 based apps have a 16 bit length here, so
we allow for said longer length. There is presumably an addendum
- to Q931 which describes this, and provides a means to
- discriminate between the old 1 byte and the new 2 byte systems.
+ to Q931 which describes this, and provides a means to
+ discriminate between the old 1 byte and the new 2 byte systems.
However, at present we assume it is always 2 bytes until we find
- something that breaks it.
+ something that breaks it.
*/
len <<= 8;
len |= data[offset++];
@@ -125,27 +125,27 @@ EXTERN int ooQ931Decode
}
else alen = len;
- ie = (Q931InformationElement*)
+ ie = (Q931InformationElement*)
memAlloc (pctxt, sizeof(*ie) - sizeof(ie->data) + alen);
if(!ie)
{
- OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
+ OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
ie->discriminator = discriminator;
ie->offset = ieOff;
ie->length = len;
- if (alen != 0)
+ if (alen != 0)
memcpy(ie->data, data + offset, alen);
offset += len;
}
else {
- ie = (Q931InformationElement*) memAlloc (pctxt,
+ ie = (Q931InformationElement*) memAlloc (pctxt,
sizeof(*ie));
if(!ie)
{
- OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
+ OOTRACEERR3("Error:Memory - ooQ931Decode - ie(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
@@ -188,14 +188,14 @@ EXTERN int ooQ931Decode
gH323ep.h323Callbacks.onReceivedDTMF(call, (char *)ie->data);
}
}
- /* Extract calling party number TODO:Give respect to presentation and
+ /* Extract calling party number TODO:Give respect to presentation and
screening indicators ;-) */
if(ie->discriminator == Q931CallingPartyNumberIE)
{
OOTRACEDBGB1(" CallingPartyNumber IE = {\n");
if(ie->length < OO_MAX_NUMBER_LENGTH)
{
- int numoffset=1;
+ int numoffset=1;
if(!(0x80 & ie->data[0])) numoffset = 2;
memcpy(number, ie->data+numoffset,ie->length-numoffset);
number[ie->length-numoffset]='\0';
@@ -204,7 +204,7 @@ EXTERN int ooQ931Decode
ooCallSetCallingPartyNumber(call, number);
}
else{
- OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
+ OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
call->callType, call->callToken);
}
OOTRACEDBGB1(" }\n");
@@ -223,7 +223,7 @@ EXTERN int ooQ931Decode
ooCallSetCalledPartyNumber(call, number);
}
else{
- OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
+ OOTRACEERR3("Error:Calling party number too long. (%s, %s)\n",
call->callType, call->callToken);
}
OOTRACEDBGB1(" }\n");
@@ -252,8 +252,8 @@ EXTERN int ooQ931Decode
if (rv != ASN_OK)
return rv;
}
-
- /*cisco router sends Q931Notify without UU ie,
+
+ /*cisco router sends Q931Notify without UU ie,
we just ignore notify message as of now as handling is optional for
end point*/
if(msg->messageType != Q931NotifyMsg && msg->messageType != Q931StatusMsg)
@@ -261,7 +261,7 @@ EXTERN int ooQ931Decode
return rv;
}
-EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
+EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
int ieCode)
{
DListNode* curNode;
@@ -373,20 +373,20 @@ EXTERN void ooQ931Print (const Q931Message* q931msg) {
printf("Q.931 Message:\n");
printf(" protocolDiscriminator: %u\n", q931msg->protocolDiscriminator);
printf(" callReference: %u\n", q931msg->callReference);
- printf(" from: %s\n", (q931msg->fromDestination ?
+ printf(" from: %s\n", (q931msg->fromDestination ?
"destination" : "originator"));
- printf(" messageType: %s (0x%X)\n\n",
- ooQ931GetMessageTypeName(q931msg->messageType, buf),
+ printf(" messageType: %s (0x%X)\n\n",
+ ooQ931GetMessageTypeName(q931msg->messageType, buf),
q931msg->messageType);
for(i = 0, curNode = q931msg->ies.head; i < q931msg->ies.count; i++) {
Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
int length = (ie->length >= 0) ? ie->length : -ie->length;
printf(" IE[%u] (offset 0x%X):\n", i, (unsigned)ie->offset);
- printf(" discriminator: %s (0x%X)\n",
+ printf(" discriminator: %s (0x%X)\n",
ooQ931GetIEName(ie->discriminator, buf), (unsigned)ie->discriminator);
printf(" data length: %i\n", length);
-
+
curNode = curNode->next;
printf("\n");
}
@@ -395,9 +395,9 @@ EXTERN void ooQ931Print (const Q931Message* q931msg) {
int ooCreateQ931Message(OOCTXT* pctxt, Q931Message **q931msg, int msgType)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
-
+
*q931msg = (Q931Message*)memAllocZ(pctxt, sizeof(Q931Message));
-
+
if(!*q931msg)
{
OOTRACEERR1("Error:Memory - ooCreateQ931Message - q931msg\n");
@@ -483,7 +483,7 @@ int ooGenerateCallIdentifier(H225CallIdentifier *callid)
ASN1INT64 timestamp;
int i=0;
#ifdef _WIN32
-
+
SYSTEMTIME systemTime;
GetLocalTime(&systemTime);
SystemTimeToFileTime(&systemTime, (LPFILETIME)&timestamp);
@@ -534,7 +534,7 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
OOTRACEERR1("ERROR: Invalid Q931 message in add user-user IE\n");
return OO_FAILED;
}
-
+
if(!q931msg->userInfo)
{
OOTRACEERR1("ERROR: No User-User IE to encode\n");
@@ -542,8 +542,8 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
}
setPERBuffer(pctxt, msgbuf, sizeof(msgbuf), aligned);
-
- if(asn1PE_H225H323_UserInformation (pctxt,
+
+ if(asn1PE_H225H323_UserInformation (pctxt,
q931msg->userInfo)==ASN_OK)
{
OOTRACEDBGC1("UserInfo encoding - successful\n");
@@ -565,11 +565,11 @@ int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg)
ie->discriminator = Q931UserUserIE;
ie->length = len;
memcpy(ie->data, msgptr, len);
- /* Add the user to user IE NOTE: ALL IEs SHOULD BE IN ASCENDING ORDER OF
- THEIR DISCRIMINATOR AS PER SPEC.
+ /* Add the user to user IE NOTE: ALL IEs SHOULD BE IN ASCENDING ORDER OF
+ THEIR DISCRIMINATOR AS PER SPEC.
*/
dListInit (&(q931msg->ies));
- if((dListAppend (pctxt,
+ if((dListAppend (pctxt,
&(q931msg->ies), ie)) == NULL)
{
OOTRACEERR1("Error: Failed to add UUIE in outgoing message\n");
@@ -592,10 +592,10 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
OOTRACEERR1("Error: ooDecodeUUIE failed - NULL q931 message\n");
return OO_FAILED;
}
-
+
/* Search for UserUser IE */
- for(i = 0, curNode = q931Msg->ies.head; i < q931Msg->ies.count;
- i++, curNode = curNode->next)
+ for(i = 0, curNode = q931Msg->ies.head; i < q931Msg->ies.count;
+ i++, curNode = curNode->next)
{
ie = (Q931InformationElement*) curNode->data;
if(ie && ie->discriminator == Q931UserUserIE)
@@ -606,7 +606,7 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
OOTRACEERR1("No UserUser IE found in ooDecodeUUIE\n");
return OO_FAILED;
}
-
+
/* Decode user-user ie */
q931Msg->userInfo = (H225H323_UserInformation *) memAlloc(pctxt,
sizeof(H225H323_UserInformation));
@@ -630,7 +630,7 @@ int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg)
}
#ifndef _COMPACT
-static void ooQ931PrintMessage
+static void ooQ931PrintMessage
(OOH323CallData* call, ASN1OCTET *msgbuf, ASN1UINT msglen)
{
@@ -649,7 +649,7 @@ static void ooQ931PrintMessage
ret = ooQ931Decode (call, &q931Msg, msglen, msgbuf, 0);
if(ret != OO_OK)
{
- OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n",
+ OOTRACEERR3("Error:Failed decoding Q931 message. (%s, %s)\n",
call->callType, call->callToken);
}
finishPrint();
@@ -660,7 +660,7 @@ static void ooQ931PrintMessage
-int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
+int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
char *msgbuf, int size)
{
int len=0, i=0, j=0, ieLen=0;
@@ -683,7 +683,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
else if(pq931Msg->messageType == Q931CallProceedingMsg){
msgbuf[i++] = OOCallProceeding;
}
- else if(pq931Msg->messageType == Q931AlertingMsg ||
+ else if(pq931Msg->messageType == Q931AlertingMsg ||
pq931Msg->messageType == Q931ProgressMsg){
msgbuf[i++] = OOAlert;
}
@@ -712,17 +712,17 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
stat = ooEncodeUUIE(call->msgctxt, pq931Msg);
if(stat != OO_OK)
{
- OOTRACEERR3("Error:Failed to encode uuie. (%s, %s)\n", call->callType,
+ OOTRACEERR3("Error:Failed to encode uuie. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
-
+
msgbuf[i++] = 3; /* TPKT version */
msgbuf[i++] = 0; /* TPKT resevred */
/* 1st octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* 2nd octet of length, will be populated once len is determined */
- msgbuf[i++] = 0;
+ msgbuf[i++] = 0;
/* Q931 protocol discriminator */
msgbuf[i++] = pq931Msg->protocolDiscriminator;
msgbuf[i++] = 2; /* length of call ref is two octets */
@@ -732,22 +732,22 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
else
i++; /* fromOriginator*/
-
+
msgbuf[i++] = pq931Msg->callReference; /* populate 2nd octet */
msgbuf[i++] = pq931Msg->messageType; /* type of q931 message */
/* Note: the order in which ies are added is important. It is in the
- ascending order of ie codes.
+ ascending order of ie codes.
*/
/* Add bearer IE */
if(pq931Msg->bearerCapabilityIE)
- {
+ {
msgbuf[i++] = Q931BearerCapabilityIE; /* ie discriminator */
msgbuf[i++] = pq931Msg->bearerCapabilityIE->length;
- memcpy(msgbuf+i, pq931Msg->bearerCapabilityIE->data,
+ memcpy(msgbuf+i, pq931Msg->bearerCapabilityIE->data,
pq931Msg->bearerCapabilityIE->length);
i += pq931Msg->bearerCapabilityIE->length;
- }
+ }
/* Add cause IE */
if(pq931Msg->causeIE)
@@ -756,8 +756,8 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
msgbuf[i++] = pq931Msg->causeIE->length;
memcpy(msgbuf+i, pq931Msg->causeIE->data, pq931Msg->causeIE->length);
i += pq931Msg->causeIE->length;
- }
-
+ }
+
/* Add progress indicator IE */
if(pq931Msg->messageType == Q931AlertingMsg || pq931Msg->messageType == Q931ProgressMsg)
{
@@ -797,7 +797,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
pq931Msg->calledPartyNumberIE->length);
i += pq931Msg->calledPartyNumberIE->length;
}
-
+
/* Add keypad ie */
if(pq931Msg->keypadIE)
{
@@ -814,19 +814,19 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
i += pq931Msg->callstateIE->length;
}
- /* Note: Have to fix this, though it works. Need to get rid of ie list.
+ /* Note: Have to fix this, though it works. Need to get rid of ie list.
Right now we only put UUIE in ie list. Can be easily removed.
*/
- for(j = 0, curNode = pq931Msg->ies.head; j < (int)pq931Msg->ies.count; j++)
+ for(j = 0, curNode = pq931Msg->ies.head; j < (int)pq931Msg->ies.count; j++)
{
Q931InformationElement *ie = (Q931InformationElement*) curNode->data;
-
+
ieLen = ie->length;
/* Add the ie discriminator in message buffer */
- msgbuf[i++] = ie->discriminator;
-
+ msgbuf[i++] = ie->discriminator;
+
/* For user-user IE, we have to add protocol discriminator */
if (ie->discriminator == Q931UserUserIE)
{
@@ -838,7 +838,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
memcpy((msgbuf + i), ie->data, ieLen);
i += ieLen;
-
+
}
else
{
@@ -847,13 +847,13 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
}
}
// len = i+1-4; /* complete message length */
-
+
/* Tpkt length octets populated with total length of the message */
if(msgbuf[0] != OOFacility)
{
len = i-1;
- msgbuf[3] = (len >> 8);
+ msgbuf[3] = (len >> 8);
msgbuf[4] = len; /* including tpkt header */
}
else{
@@ -861,7 +861,7 @@ int ooEncodeH225Message(OOH323CallData *call, Q931Message *pq931Msg,
msgbuf[6] = (len >> 8);
msgbuf[7] = len;
}
-
+
#ifndef _COMPACT
if(msgbuf[0] != OOFacility)
ooQ931PrintMessage (call, (unsigned char *)msgbuf+5, len-4);
@@ -977,18 +977,18 @@ int ooHandleFastStartChannels(OOH323CallData *pCall)
}
-int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
+int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ASN1UINT *fsCount, ASN1DynOctStr **fsElem)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
- OOCTXT *pctxt = pCall->msgctxt;
+ OOCTXT *pctxt = pCall->msgctxt;
int ret = 0, i=0, j=0, remoteMediaPort=0, remoteMediaControlPort = 0, dir=0;
char remoteMediaIP[2+8*4+7], remoteMediaControlIP[2+8*4+7];
DListNode *pNode = NULL;
H245OpenLogicalChannel *olc = NULL, printOlc;
ooH323EpCapability *epCap = NULL;
ASN1DynOctStr *pFS=NULL;
- H245H2250LogicalChannelParameters *h2250lcp = NULL;
+ H245H2250LogicalChannelParameters *h2250lcp = NULL;
ooLogicalChannel* pChannel;
@@ -1005,26 +1005,26 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
(*fsElem)[k].numocts = pCall->pFastStartRes->elem[k].numocts;
pData = (ASN1OCTET*) memAlloc(
pctxt, (*fsElem)[k].numocts * sizeof(ASN1OCTET));
- memcpy(pData,
- pCall->pFastStartRes->elem[k].data,
+ memcpy(pData,
+ pCall->pFastStartRes->elem[k].data,
pCall->pFastStartRes->elem[k].numocts);
(*fsElem)[k].data = pData;
}
return ASN_OK;
}
-
-
+
+
/* If fast start supported and remote endpoint has sent faststart element */
- if(OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) &&
+ if(OO_TESTFLAG(pCall->flags, OO_M_FASTSTART) &&
pCall->remoteFastStartOLCs.count>0)
{
- pFS = (ASN1DynOctStr*)memAlloc(pctxt,
+ pFS = (ASN1DynOctStr*)memAlloc(pctxt,
pCall->remoteFastStartOLCs.count*sizeof(ASN1DynOctStr));
if(!pFS)
{
- OOTRACEERR3("Error:Memory - ooSetFastStartResponse - pFS (%s, %s)\n",
- pCall->callType, pCall->callToken);
+ OOTRACEERR3("Error:Memory - ooSetFastStartResponse - pFS (%s, %s)\n",
+ pCall->callType, pCall->callToken);
return OO_FAILED;
}
memset(pFS, 0, pCall->remoteFastStartOLCs.count*sizeof(ASN1DynOctStr));
@@ -1037,7 +1037,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
olc = (H245OpenLogicalChannel*)pNode->data;
/* Don't support both direction channel */
- if(olc->forwardLogicalChannelParameters.dataType.t !=
+ if(olc->forwardLogicalChannelParameters.dataType.t !=
T_H245DataType_nullData &&
olc->m.reverseLogicalChannelParametersPresent)
{
@@ -1047,18 +1047,18 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
/* Check forward logic channel */
- if(olc->forwardLogicalChannelParameters.dataType.t !=
+ if(olc->forwardLogicalChannelParameters.dataType.t !=
T_H245DataType_nullData)
{
/* Forward Channel - remote transmits - local receives */
- OOTRACEDBGC4("Processing received forward olc %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber, pCall->callType,
+ OOTRACEDBGC4("Processing received forward olc %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber, pCall->callType,
pCall->callToken);
dir = OORX;
- epCap = ooIsDataTypeSupported(pCall,
+ epCap = ooIsDataTypeSupported(pCall,
&olc->forwardLogicalChannelParameters.dataType,
OORX);
-
+
if(!epCap) { continue; } /* Not Supported Channel */
OOTRACEINFO1("Receive Channel data type supported\n");
@@ -1066,8 +1066,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
T_H245OpenLogicalChannel_forwardLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber,
+ "channel %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1080,7 +1080,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
{
OOTRACEINFO4("Receive channel with sessionID %d already "
- "established.(%s, %s)\n", olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID,
+ "established.(%s, %s)\n", olc->forwardLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters->sessionID,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1090,8 +1090,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
/* Extract mediaControlChannel info, if supplied */
if(h2250lcp->m.mediaControlChannelPresent)
{
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaControlChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaControlChannel,
remoteMediaControlIP, &remoteMediaControlPort))
{
OOTRACEERR3("Error: Invalid media control channel address "
@@ -1106,11 +1106,11 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
else if(olc->m.reverseLogicalChannelParametersPresent)
{
/* Reverse channel - remote receives - local transmits */
- OOTRACEDBGC4("Processing received reverse olc %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber, pCall->callType,
+ OOTRACEDBGC4("Processing received reverse olc %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber, pCall->callType,
pCall->callToken);
dir = OOTX;
- epCap = ooIsDataTypeSupported(pCall,
+ epCap = ooIsDataTypeSupported(pCall,
&olc->reverseLogicalChannelParameters.dataType,
OOTX);
@@ -1118,12 +1118,12 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
OOTRACEINFO1("Transmit Channel data type supported\n");
- if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
+ if(olc->reverseLogicalChannelParameters.multiplexParameters.t !=
T_H245OpenLogicalChannel_reverseLogicalChannelParameters_multiplexParameters_h2250LogicalChannelParameters)
{
OOTRACEERR4("ERROR:Unknown multiplex parameter type for "
- "channel %d (%s, %s)\n",
- olc->forwardLogicalChannelNumber,
+ "channel %d (%s, %s)\n",
+ olc->forwardLogicalChannelNumber,
pCall->callType, pCall->callToken);
memFreePtr(pCall->pctxt, epCap);
epCap = NULL;
@@ -1141,7 +1141,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
epCap = NULL;
continue;
}
-
+
/* Extract the remote media endpoint address */
h2250lcp = olc->reverseLogicalChannelParameters.multiplexParameters.u.h2250LogicalChannelParameters;
if(!h2250lcp)
@@ -1153,7 +1153,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
epCap = NULL;
return OO_FAILED;
}
-
+
/* Reverse Channel info will be always present, crash proof */
if(!h2250lcp->m.mediaChannelPresent)
{
@@ -1166,8 +1166,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
/* Get IP, PORT of reverse channel */
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaChannel,
remoteMediaIP, &remoteMediaPort))
{
OOTRACEERR3("Error: Invalid media channel address "
@@ -1180,8 +1180,8 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
/* Extract mediaControlChannel info, if supplied */
if(h2250lcp->m.mediaControlChannelPresent)
{
- if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
- &h2250lcp->mediaControlChannel,
+ if(OO_OK != ooGetIpPortFromH245TransportAddress(pCall,
+ &h2250lcp->mediaControlChannel,
remoteMediaControlIP, &remoteMediaControlPort))
{
OOTRACEERR3("Error: Invalid media control channel address "
@@ -1194,7 +1194,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
if(dir & OOTX)
- {
+ {
/* According to the spec if we are accepting olc for transmission
from called endpoint to calling endpoint, called endpoint should
insert a unqiue forwardLogicalChannelNumber into olc
@@ -1204,28 +1204,28 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
pCall->logicalChanNoCur = pCall->logicalChanNoBase;
}
-
+
ooBuildFastStartOLC(pCall, olc, epCap, pctxt, dir);
-
+
pChannel = ooFindLogicalChannelByLogicalChannelNo
(pCall, olc->forwardLogicalChannelNumber);
-
+
/* start receive and tramsmit channel listening */
if(dir & OORX)
{
strcpy(pChannel->remoteIP, remoteMediaControlIP);
pChannel->remoteMediaControlPort = remoteMediaControlPort;
if(epCap->startReceiveChannel)
- {
- epCap->startReceiveChannel(pCall, pChannel);
- OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
+ {
+ epCap->startReceiveChannel(pCall, pChannel);
+ OOTRACEINFO4("Receive channel of type %s started (%s, %s)\n",
(epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
pCall->callType, pCall->callToken);
}
else{
OOTRACEERR4("ERROR:No callback registered to start receive %s"
- " channel (%s, %s)\n",
- (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
+ " channel (%s, %s)\n",
+ (epCap->capType == OO_CAP_TYPE_AUDIO)?"audio":"video",
pCall->callType, pCall->callToken);
return OO_FAILED;
}
@@ -1237,15 +1237,15 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
pChannel->remoteMediaControlPort = remoteMediaControlPort;
if(epCap->startTransmitChannel)
- {
- epCap->startTransmitChannel(pCall, pChannel);
+ {
+ epCap->startTransmitChannel(pCall, pChannel);
OOTRACEINFO3("Transmit channel of type audio started "
"(%s, %s)\n", pCall->callType, pCall->callToken);
/*OO_SETFLAG (pCall->flags, OO_M_AUDIO);*/
}
else{
OOTRACEERR3("ERROR:No callback registered to start transmit"
- " audio channel (%s, %s)\n", pCall->callType,
+ " audio channel (%s, %s)\n", pCall->callType,
pCall->callToken);
return OO_FAILED;
}
@@ -1276,7 +1276,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ret = asn1PD_H245OpenLogicalChannel(pctxt, &(printOlc));
if(ret != ASN_OK)
{
- OOTRACEERR3("Error: Failed decoding FastStart Element (%s, %s)\n",
+ OOTRACEERR3("Error: Failed decoding FastStart Element (%s, %s)\n",
pCall->callType, pCall->callToken);
ooFreeQ931Message(pctxt, pQ931msg);
if(pCall->callState < OO_CALL_CLEAR)
@@ -1287,7 +1287,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
/* end print call */
olc = NULL;
@@ -1302,18 +1302,18 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
ASN1OCTET* pData;
//*fsPresent = TRUE;
*fsCount = j;
- *fsElem = pFS;
+ *fsElem = pFS;
/* save the fast start response for later use in ALERTING, CONNECT */
pCall->pFastStartRes = (FastStartResponse*)
memAlloc(pCall->pctxt, sizeof(FastStartResponse));
pCall->pFastStartRes->n = j;
- pCall->pFastStartRes->elem = (ASN1DynOctStr*) memAlloc(pCall->pctxt,
+ pCall->pFastStartRes->elem = (ASN1DynOctStr*) memAlloc(pCall->pctxt,
pCall->pFastStartRes->n * sizeof(ASN1DynOctStr));
for(k = 0; k < pCall->pFastStartRes->n; k ++) {
pCall->pFastStartRes->elem[k].numocts = (*fsElem)[k].numocts;
- pData = (ASN1OCTET*) memAlloc(pCall->pctxt,
+ pData = (ASN1OCTET*) memAlloc(pCall->pctxt,
pCall->pFastStartRes->elem[k].numocts * sizeof(ASN1OCTET));
memcpy(pData, (*fsElem)[k].data, (*fsElem)[k].numocts);
pCall->pFastStartRes->elem[k].data = pData;
@@ -1321,7 +1321,7 @@ int ooSetFastStartResponse(OOH323CallData *pCall, Q931Message *pQ931msg,
}
else{
OOTRACEINFO3("None of the faststart elements received in setup can be"
- " supported, rejecting faststart.(%s, %s)\n",
+ " supported, rejecting faststart.(%s, %s)\n",
pCall->callType, pCall->callToken);
//*fsPresent = FALSE;
OO_CLRFLAG(pCall->flags, OO_M_FASTSTART);
@@ -1360,23 +1360,23 @@ int ooSendTCSandMSD(OOH323CallData *call)
int ooSendCallProceeding(OOH323CallData *call)
{
- int ret;
+ int ret;
H225VendorIdentifier *vendor;
H225CallProceeding_UUIE *callProceeding;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building CallProceeding (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building CallProceeding (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931CallProceedingMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Call "
"Proceeding message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAlloc(pctxt,
@@ -1387,12 +1387,12 @@ int ooSendCallProceeding(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_callProceeding;
-
+
callProceeding = (H225CallProceeding_UUIE*)memAlloc(pctxt,
sizeof(H225CallProceeding_UUIE));
if(!callProceeding)
@@ -1408,12 +1408,12 @@ int ooSendCallProceeding(OOH323CallData *call)
callProceeding->maintainConnection = FALSE;
callProceeding->m.callIdentifierPresent = 1;
- callProceeding->callIdentifier.guid.numocts =
+ callProceeding->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(callProceeding->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(callProceeding->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- callProceeding->protocolIdentifier = gProtocolID;
+ callProceeding->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1426,26 +1426,26 @@ int ooSendCallProceeding(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
- OOTRACEDBGA3("Built Call Proceeding(%s, %s)\n", call->callType,
- call->callToken);
+
+ OOTRACEDBGA3("Built Call Proceeding(%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1460,7 +1460,7 @@ int ooSendCallProceeding(OOH323CallData *call)
int ooSendAlerting(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Alerting_UUIE *alerting;
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
@@ -1469,7 +1469,7 @@ int ooSendAlerting(OOH323CallData *call)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931AlertingMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Alerting message\n");
return OO_FAILED;
@@ -1487,13 +1487,13 @@ int ooSendAlerting(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_alerting;
-
- alerting = (H225Alerting_UUIE*)memAlloc(pctxt,
+
+ alerting = (H225Alerting_UUIE*)memAlloc(pctxt,
sizeof(H225Alerting_UUIE));
if(!alerting)
{
@@ -1510,7 +1510,7 @@ int ooSendAlerting(OOH323CallData *call)
/*Populate aliases */
alerting->m.alertingAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&alerting->alertingAddress, 0);
else
ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
@@ -1522,7 +1522,7 @@ int ooSendAlerting(OOH323CallData *call)
return OO_FAILED;
}
alerting->m.presentationIndicatorPresent = TRUE;
- alerting->presentationIndicator.t =
+ alerting->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
alerting->m.screeningIndicatorPresent = TRUE;
alerting->screeningIndicator = userProvidedNotScreened;
@@ -1530,12 +1530,12 @@ int ooSendAlerting(OOH323CallData *call)
alerting->m.callIdentifierPresent = 1;
- alerting->callIdentifier.guid.numocts =
+ alerting->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(alerting->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(alerting->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- alerting->protocolIdentifier = gProtocolID;
+ alerting->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1548,26 +1548,26 @@ int ooSendAlerting(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
+
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&alerting->fastStart.n, &alerting->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(alerting->fastStart.n > 0) {
@@ -1580,7 +1580,7 @@ int ooSendAlerting(OOH323CallData *call)
}
OOTRACEDBGA3("Built Alerting (%s, %s)\n", call->callType, call->callToken);
-
+
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1597,7 +1597,7 @@ int ooSendAlerting(OOH323CallData *call)
int ooSendProgress(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Progress_UUIE *progress;
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
@@ -1607,7 +1607,7 @@ int ooSendProgress(OOH323CallData *call)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ProgressMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Alerting message\n");
return OO_FAILED;
@@ -1623,13 +1623,13 @@ int ooSendProgress(OOH323CallData *call)
return OO_FAILED;
}
memset (q931msg->userInfo, 0, sizeof(H225H323_UserInformation));
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_progress;
-
- progress = (H225Progress_UUIE*)memAlloc(pctxt,
+
+ progress = (H225Progress_UUIE*)memAlloc(pctxt,
sizeof(H225Progress_UUIE));
if(!progress)
{
@@ -1643,12 +1643,12 @@ int ooSendProgress(OOH323CallData *call)
progress->multipleCalls = FALSE;
progress->maintainConnection = FALSE;
- progress->callIdentifier.guid.numocts =
+ progress->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(progress->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(progress->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- progress->protocolIdentifier = gProtocolID;
+ progress->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -1661,26 +1661,26 @@ int ooSendProgress(OOH323CallData *call)
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
-
+
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&progress->fastStart.n, &progress->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(progress->fastStart.n > 0) {
@@ -1694,7 +1694,7 @@ int ooSendProgress(OOH323CallData *call)
/* Add h245 listener address. Do not add H245 listener address in case
of tunneling. */
- if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
+ if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
call->remoteFastStartOLCs.count == 0) && */
!OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
!call->h245listener && ooCreateH245Listener(call) == OO_OK)
@@ -1702,7 +1702,7 @@ int ooSendProgress(OOH323CallData *call)
if (call->versionIP == 6) {
progress->m.h245AddressPresent = TRUE;
progress->h245Address.t = T_H225TransportAddress_ip6Address;
-
+
h245Ip6Addr = (H225TransportAddress_ip6Address*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ip6Address));
if(!h245Ip6Addr)
@@ -1718,7 +1718,7 @@ int ooSendProgress(OOH323CallData *call)
} else {
progress->m.h245AddressPresent = TRUE;
progress->h245Address.t = T_H225TransportAddress_ipAddress;
-
+
h245IpAddr = (H225TransportAddress_ipAddress*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ipAddress));
if(!h245IpAddr)
@@ -1735,7 +1735,7 @@ int ooSendProgress(OOH323CallData *call)
}
OOTRACEDBGA3("Built Progress (%s, %s)\n", call->callType, call->callToken);
-
+
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -1860,20 +1860,20 @@ int ooSendStartH245Facility(OOH323CallData *call)
sizeof(H225H323_UserInformation));
if(!pQ931Msg->userInfo)
{
- OOTRACEERR3("ERROR:Memory - ooSendFacility - userInfo(%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooSendFacility - userInfo(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
- facility = (H225Facility_UUIE*)
+
+ facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
if(!facility)
@@ -1886,12 +1886,12 @@ int ooSendStartH245Facility(OOH323CallData *call)
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
/* Populate Facility UUIE */
- facility->protocolIdentifier = gProtocolID;
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_startH245;
@@ -1953,22 +1953,22 @@ int ooSendStartH245Facility(OOH323CallData *call)
int ooSendStatus(OOH323CallData *call)
{
- int ret;
+ int ret;
H225Status_UUIE *status;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building StatusMsg (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931StatusMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Status "
"message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAllocZ(pctxt,
@@ -1978,12 +1978,12 @@ int ooSendStatus(OOH323CallData *call)
OOTRACEERR1("ERROR:Memory - ooSendStatus - userInfo\n");
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_status;
-
+
status = (H225Status_UUIE*)memAllocZ(pctxt,
sizeof(H225Status_UUIE));
if(!status)
@@ -1993,18 +1993,18 @@ int ooSendStatus(OOH323CallData *call)
}
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.status = status;
- status->callIdentifier.guid.numocts =
+ status->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(status->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(status->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- status->protocolIdentifier = gProtocolID;
+ status->protocolIdentifier = gProtocolID;
ooQ931SetCauseIE(pctxt, q931msg, Q931StatusEnquiryResponse, 0, 0);
ooQ931SetCallStateIE(pctxt, q931msg, 10);
- OOTRACEDBGA3("Built Status (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEDBGA3("Built Status (%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2019,22 +2019,22 @@ int ooSendStatus(OOH323CallData *call)
int ooSendStatusInquiry(OOH323CallData *call)
{
- int ret;
+ int ret;
H225StatusInquiry_UUIE *statusInq;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGC3("Building StatusInquryMsg (%s, %s)\n", call->callType,
+ OOTRACEDBGC3("Building StatusInquryMsg (%s, %s)\n", call->callType,
call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931StatusEnquiryMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 Status "
"message\n");
return OO_FAILED;
}
-
+
q931msg->callReference = call->callReference;
q931msg->userInfo = (H225H323_UserInformation*)memAllocZ(pctxt,
@@ -2044,12 +2044,12 @@ int ooSendStatusInquiry(OOH323CallData *call)
OOTRACEERR1("ERROR:Memory - ooSendStatus - userInfo\n");
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG(call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG(call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_statusInquiry;
-
+
statusInq = (H225StatusInquiry_UUIE*)memAllocZ(pctxt,
sizeof(H225StatusInquiry_UUIE));
if(!statusInq)
@@ -2059,15 +2059,15 @@ int ooSendStatusInquiry(OOH323CallData *call)
}
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.statusInquiry = statusInq;
- statusInq->callIdentifier.guid.numocts =
+ statusInq->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(statusInq->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(statusInq->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
- statusInq->protocolIdentifier = gProtocolID;
+ statusInq->protocolIdentifier = gProtocolID;
- OOTRACEDBGA3("Built StatusInquiry (%s, %s)\n", call->callType,
- call->callToken);
+ OOTRACEDBGA3("Built StatusInquiry (%s, %s)\n", call->callType,
+ call->callToken);
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2081,7 +2081,7 @@ int ooSendStatusInquiry(OOH323CallData *call)
}
int ooSendReleaseComplete(OOH323CallData *call)
{
- int ret;
+ int ret;
Q931Message *q931msg=NULL;
H225ReleaseComplete_UUIE *releaseComplete;
enum Q931CauseValues cause = Q931ErrorInCauseIE;
@@ -2093,7 +2093,7 @@ int ooSendReleaseComplete(OOH323CallData *call)
call->callType, call->callToken);
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ReleaseCompleteMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR3("Error: In ooCreateQ931Message - H225 Release Complete "
"message(%s, %s)\n", call->callType, call->callToken);
if(call->callState < OO_CALL_CLEAR)
@@ -2124,38 +2124,38 @@ int ooSendReleaseComplete(OOH323CallData *call)
return OO_FAILED;
}
memset(releaseComplete, 0, sizeof(H225ReleaseComplete_UUIE));
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_releaseComplete;
-
+
/* Get cause value and h225 reason code corresponding to OOCallClearReason*/
- ooQ931GetCauseAndReasonCodeFromCallClearReason(call->callEndReason,
+ ooQ931GetCauseAndReasonCodeFromCallClearReason(call->callEndReason,
&cause, &h225ReasonCode);
if (call->q931cause == 0)
call->q931cause = cause;
/* Set Cause IE */
ooQ931SetCauseIE(pctxt, q931msg, call->q931cause, 0, 0);
-
+
/* Set H225 releaseComplete reasonCode */
releaseComplete->m.reasonPresent = TRUE;
releaseComplete->reason.t = h225ReasonCode;
/* Add user-user ie */
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_releaseComplete;
-
- q931msg->userInfo->h323_uu_pdu.h323_message_body.u.releaseComplete =
+
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.u.releaseComplete =
releaseComplete;
releaseComplete->m.callIdentifierPresent = 1;
releaseComplete->protocolIdentifier = gProtocolID;
- releaseComplete->callIdentifier.guid.numocts =
+ releaseComplete->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(releaseComplete->callIdentifier.guid.data,
+ memcpy(releaseComplete->callIdentifier.guid.data,
call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
OOTRACEDBGA3("Built Release Complete message (%s, %s)\n",
call->callType, call->callToken);
- /* Send H225 message */
+ /* Send H225 message */
ret = ooSendH225Msg(call, q931msg);
if(ret != OO_OK)
{
@@ -2193,11 +2193,11 @@ int ooAcceptCall(OOH323CallData *call)
H225VendorIdentifier *vendor;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
- OOCTXT *pctxt = call->msgctxt;
+ OOCTXT *pctxt = call->msgctxt;
ret = ooCreateQ931Message(pctxt, &q931msg, Q931ConnectMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR1("Error: In allocating memory for - H225 "
"Connect message\n");
return OO_FAILED;
@@ -2205,7 +2205,7 @@ int ooAcceptCall(OOH323CallData *call)
q931msg->callReference = call->callReference;
/* Set bearer capability */
- if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
+ if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
// Q931TransferUnrestrictedDigital, Q931TransferPacketMode,
// Q931TransferRatePacketMode, Q931UserInfoLayer1G722G725))
Q931TransferSpeech, Q931TransferCircuitMode,
@@ -2223,16 +2223,16 @@ int ooAcceptCall(OOH323CallData *call)
{
OOTRACEERR1("ERROR:Memory - ooAcceptCall - userInfo\n");
return OO_FAILED;
- }
+ }
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=TRUE;
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=TRUE;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_connect;
-
+
connect = (H225Connect_UUIE*)
memAllocZ (pctxt, sizeof(H225Connect_UUIE));
@@ -2248,28 +2248,28 @@ int ooAcceptCall(OOH323CallData *call)
connect->m.maintainConnectionPresent = 1;
connect->multipleCalls = FALSE;
connect->maintainConnection = FALSE;
-
-
+
+
connect->conferenceID.numocts = 16;
for (i = 0; i < 16; i++)
connect->conferenceID.data[i] = i + 1;
connect->m.callIdentifierPresent = 1;
- connect->callIdentifier.guid.numocts =
+ connect->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(connect->callIdentifier.guid.data, call->callIdentifier.guid.data,
+ memcpy(connect->callIdentifier.guid.data, call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
-
+
connect->conferenceID.numocts = call->confIdentifier.numocts;
memcpy(connect->conferenceID.data, call->confIdentifier.data,
call->confIdentifier.numocts);
/* Populate alias addresses */
connect->m.connectedAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&connect->connectedAddress, 0);
else
- ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
+ ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
&connect->connectedAddress, 0);
if(OO_OK != ret)
{
@@ -2278,12 +2278,12 @@ int ooAcceptCall(OOH323CallData *call)
return OO_FAILED;
}
connect->m.presentationIndicatorPresent = TRUE;
- connect->presentationIndicator.t =
+ connect->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
connect->m.screeningIndicatorPresent = TRUE;
connect->screeningIndicator = userProvidedNotScreened;
- connect->protocolIdentifier = gProtocolID;
+ connect->protocolIdentifier = gProtocolID;
/* Pose as Terminal or Gateway */
if(gH323ep.isGateway)
@@ -2291,32 +2291,32 @@ int ooAcceptCall(OOH323CallData *call)
else
connect->destinationInfo.m.terminalPresent = TRUE;
-
+
connect->destinationInfo.m.vendorPresent = 1;
vendor = &connect->destinationInfo.vendor;
-
+
vendor->vendor.t35CountryCode = gH323ep.t35CountryCode;
vendor->vendor.t35Extension = gH323ep.t35Extension;
vendor->vendor.manufacturerCode = gH323ep.manufacturerCode;
if(gH323ep.productID)
{
vendor->m.productIdPresent = 1;
- vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
+ vendor->productId.numocts = ASN1MIN(strlen(gH323ep.productID),
sizeof(vendor->productId.data));
- strncpy((char *)vendor->productId.data, gH323ep.productID,
+ strncpy((char *)vendor->productId.data, gH323ep.productID,
vendor->productId.numocts);
}
if(gH323ep.versionID)
{
vendor->m.versionIdPresent = 1;
- vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
+ vendor->versionId.numocts = ASN1MIN(strlen(gH323ep.versionID),
sizeof(vendor->versionId.data));
- strncpy((char *)vendor->versionId.data, gH323ep.versionID,
- vendor->versionId.numocts);
+ strncpy((char *)vendor->versionId.data, gH323ep.versionID,
+ vendor->versionId.numocts);
}
if (!call->fsSent) {
- ret = ooSetFastStartResponse(call, q931msg,
+ ret = ooSetFastStartResponse(call, q931msg,
&connect->fastStart.n, &connect->fastStart.elem);
if(ret != ASN_OK) { return ret; }
if(connect->fastStart.n > 0) {
@@ -2345,7 +2345,7 @@ int ooAcceptCall(OOH323CallData *call)
of fast-start. why? */
/* May 20110205 */
/* Send h245 listener addr any case if H245 connection isn't established */
- if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
+ if (/* (!OO_TESTFLAG(call->flags, OO_M_FASTSTART) ||
call->remoteFastStartOLCs.count == 0) && */
!OO_TESTFLAG (call->flags, OO_M_TUNNELING) &&
( (!call->h245listener && ooCreateH245Listener(call) == OO_OK) ||
@@ -2354,7 +2354,7 @@ int ooAcceptCall(OOH323CallData *call)
connect->m.h245AddressPresent = TRUE;
if (call->versionIP == 6) {
connect->h245Address.t = T_H225TransportAddress_ip6Address;
-
+
h245Ip6Addr = (H225TransportAddress_ip6Address*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ip6Address));
if(!h245Ip6Addr)
@@ -2369,7 +2369,7 @@ int ooAcceptCall(OOH323CallData *call)
connect->h245Address.u.ip6Address = h245Ip6Addr;
} else {
connect->h245Address.t = T_H225TransportAddress_ipAddress;
-
+
h245IpAddr = (H225TransportAddress_ipAddress*)
memAllocZ (pctxt, sizeof(H225TransportAddress_ipAddress));
if(!h245IpAddr)
@@ -2405,7 +2405,7 @@ int ooAcceptCall(OOH323CallData *call)
memReset(call->msgctxt);
call->callState = OO_CALL_CONNECTED;
-
+
if (call->rtdrCount > 0 && call->rtdrInterval > 0) {
return ooSendRoundTripDelayRequest(call);
}
@@ -2433,7 +2433,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
strcpy(fwdedCall->remoteIP, call->pCallFwdData->ip);
}
fwdedCall->remotePort = call->pCallFwdData->port;
-
+
if(call->pCallFwdData->aliases)
{
alias = call->pCallFwdData->aliases;
@@ -2465,7 +2465,7 @@ int ooH323HandleCallFwdRequest(OOH323CallData *call)
for (i = 0; i < 16; i++) {
fwdedCall->confIdentifier.data[i] = irand++;
}
-
+
if(gH323ep.gkClient && !OO_TESTFLAG(fwdedCall->flags, OO_M_DISABLEGK))
{
@@ -2569,7 +2569,7 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
ooCleanCall(call);
return OO_FAILED;
}
-
+
/* Check whether we have ip address */
if(!ooUtilsIsStrEmpty(tmp)) {
ip = tmp;
@@ -2593,7 +2593,7 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
for (i = 0; i < 16; i++) {
call->confIdentifier.data[i] = irand++;
}
-
+
if(gH323ep.gkClient && !OO_TESTFLAG(call->flags, OO_M_DISABLEGK))
{
@@ -2635,19 +2635,19 @@ int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
int ooH323CallAdmitted(OOH323CallData *call)
{
int ret=0;
-
+
if(!call)
{
/* Call not supplied. Must locate it in list */
OOTRACEERR1("ERROR: Invalid call parameter to ooH323CallAdmitted");
- return OO_FAILED;
+ return OO_FAILED;
}
if(!strcmp(call->callType, "outgoing")) {
ret = ooCreateH225Connection(call);
if(ret != OO_OK)
{
- OOTRACEERR3("ERROR:Failed to create H225 connection to %s:%d\n",
+ OOTRACEERR3("ERROR:Failed to create H225 connection to %s:%d\n",
call->remoteIP, call->remotePort);
if(call->callState< OO_CALL_CLEAR)
{
@@ -2660,7 +2660,7 @@ int ooH323CallAdmitted(OOH323CallData *call)
if(gH323ep.h323Callbacks.onOutgoingCall) {
/* Outgoing call callback function */
if (gH323ep.h323Callbacks.onOutgoingCall(call) != OO_OK) {
- OOTRACEERR3("ERROR:Failed to setup media to (%s,%d)\n",
+ OOTRACEERR3("ERROR:Failed to setup media to (%s,%d)\n",
call->callType, call->callToken);
if(call->callState< OO_CALL_CLEAR)
{
@@ -2670,10 +2670,10 @@ int ooH323CallAdmitted(OOH323CallData *call)
return OO_FAILED;
}
}
-
+
ret = ooH323MakeCall_helper(call);
- }
- else {
+ }
+ else {
/* incoming call */
if(gH323ep.h323Callbacks.onIncomingCall) {
/* Incoming call callback function */
@@ -2690,7 +2690,7 @@ int ooH323CallAdmitted(OOH323CallData *call)
}
}
}
-
+
return OO_OK;
}
@@ -2711,7 +2711,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
/* pctxt = &gH323ep.msgctxt; */
pctxt = call->msgctxt;
-
+
ret = ooCreateQ931Message(pctxt, &q931msg, Q931SetupMsg);
if(ret != OO_OK)
{
@@ -2722,7 +2722,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
q931msg->callReference = call->callReference;
/* Set bearer capability */
- if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
+ if(OO_OK != ooSetBearerCapabilityIE(pctxt, q931msg, Q931CCITTStd,
// Q931TransferUnrestrictedDigital, Q931TransferPacketMode,
call->transfercap, Q931TransferCircuitMode,
// Q931TransferRatePacketMode, Q931UserInfoLayer1G722G725))
@@ -2737,11 +2737,11 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(call->callingPartyNumber && call->callingPartyNumber[0])
ooQ931SetCallingPartyNumberIE(pctxt, q931msg,
(const char*)call->callingPartyNumber, 1, 0, 0, 0);
-
+
/* Set called party number Q931 IE */
if(call->calledPartyNumber)
- ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
+ ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
(const char*)call->calledPartyNumber, 1, 0);
else if(call->remoteAliases) {
pAlias = call->remoteAliases;
@@ -2752,17 +2752,17 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
if(pAlias)
{
- call->calledPartyNumber = (char*)memAlloc(call->pctxt,
+ call->calledPartyNumber = (char*)memAlloc(call->pctxt,
strlen(pAlias->value)+1);
if(!call->calledPartyNumber)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "calledPartyNumber(%s, %s)\n", call->callType,
+ "calledPartyNumber(%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
strcpy(call->calledPartyNumber, pAlias->value);
- ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
+ ooQ931SetCalledPartyNumberIE(pctxt, q931msg,
(const char*)call->calledPartyNumber, 1, 0);
}
@@ -2786,17 +2786,17 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
memset (setup, 0, sizeof(H225Setup_UUIE));
setup->protocolIdentifier = gProtocolID;
-
+
/* Populate Alias Address.*/
if(call->ourAliases || gH323ep.aliases)
- {
+ {
setup->m.sourceAddressPresent = TRUE;
if(call->ourAliases)
- ret = ooPopulateAliasList(pctxt, call->ourAliases,
+ ret = ooPopulateAliasList(pctxt, call->ourAliases,
&setup->sourceAddress, 0);
else if(gH323ep.aliases)
- ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
+ ret = ooPopulateAliasList(pctxt, gH323ep.aliases,
&setup->sourceAddress, 0);
if(OO_OK != ret)
{
@@ -2807,7 +2807,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
}
setup->m.presentationIndicatorPresent = TRUE;
- setup->presentationIndicator.t =
+ setup->presentationIndicator.t =
T_H225PresentationIndicator_presentationAllowed;
setup->m.screeningIndicatorPresent = TRUE;
setup->screeningIndicator = userProvidedNotScreened;
@@ -2821,7 +2821,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(call->remoteAliases)
{
setup->m.destinationAddressPresent = TRUE;
- ret = ooPopulateAliasList(pctxt, call->remoteAliases,
+ ret = ooPopulateAliasList(pctxt, call->remoteAliases,
&setup->destinationAddress, 0);
if(OO_OK != ret)
{
@@ -2842,31 +2842,31 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->sourceInfo.vendor.vendor.t35CountryCode = gH323ep.t35CountryCode;
setup->sourceInfo.vendor.vendor.t35Extension = gH323ep.t35Extension;
setup->sourceInfo.vendor.vendor.manufacturerCode= gH323ep.manufacturerCode;
-
+
if(gH323ep.productID)
{
setup->sourceInfo.vendor.m.productIdPresent=TRUE;
setup->sourceInfo.vendor.productId.numocts = ASN1MIN(
- strlen(gH323ep.productID),
+ strlen(gH323ep.productID),
sizeof(setup->sourceInfo.vendor.productId.data));
- strncpy((char*)setup->sourceInfo.vendor.productId.data,
+ strncpy((char*)setup->sourceInfo.vendor.productId.data,
gH323ep.productID, setup->sourceInfo.vendor.productId.numocts);
}
else
setup->sourceInfo.vendor.m.productIdPresent=FALSE;
-
+
if(gH323ep.versionID)
{
setup->sourceInfo.vendor.m.versionIdPresent=TRUE;
setup->sourceInfo.vendor.versionId.numocts = ASN1MIN(
- strlen(gH323ep.versionID),
+ strlen(gH323ep.versionID),
sizeof(setup->sourceInfo.vendor.versionId.data));
- strncpy((char*)setup->sourceInfo.vendor.versionId.data,
+ strncpy((char*)setup->sourceInfo.vendor.versionId.data,
gH323ep.versionID, setup->sourceInfo.vendor.versionId.numocts);
}
else
setup->sourceInfo.vendor.m.versionIdPresent=FALSE;
-
+
setup->sourceInfo.mc = FALSE;
setup->sourceInfo.undefinedNode = FALSE;
@@ -2880,7 +2880,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!destCallSignalIp6Address)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "destCallSignal6Address. (%s, %s)\n", call->callType,
+ "destCallSignal6Address. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2897,7 +2897,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!destCallSignalIpAddress)
{
OOTRACEERR3("Error:Memory - ooH323MakeCall_helper - "
- "destCallSignalAddress. (%s, %s)\n", call->callType,
+ "destCallSignalAddress. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -2963,19 +2963,19 @@ int ooH323MakeCall_helper(OOH323CallData *call)
for(k=0; k< call->capPrefs.index; k++)
{
OOTRACEDBGC5("Preffered capability at index %d is %s. (%s, %s)\n",
- k, ooGetCapTypeText(call->capPrefs.order[k]),
+ k, ooGetCapTypeText(call->capPrefs.order[k]),
call->callType, call->callToken);
if(call->ourCaps) {
epCap = call->ourCaps;
OOTRACEDBGC3("Using call specific capabilities in faststart of "
- "setup message. (%s, %s)\n", call->callType,
+ "setup message. (%s, %s)\n", call->callType,
call->callToken);
}
else{
epCap = gH323ep.myCaps;
OOTRACEDBGC3("Using end-point capabilities for faststart of setup"
- "message. (%s, %s)\n", call->callType,
+ "message. (%s, %s)\n", call->callType,
call->callToken);
}
@@ -2986,8 +2986,8 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if(!epCap)
{
OOTRACEWARN4("Warn:Preferred capability %s is abscent in "
- "capability list. (%s, %s)\n",
- ooGetCapTypeText(call->capPrefs.order[k]),
+ "capability list. (%s, %s)\n",
+ ooGetCapTypeText(call->capPrefs.order[k]),
call->callType, call->callToken);
continue;
}
@@ -2997,12 +2997,12 @@ int ooH323MakeCall_helper(OOH323CallData *call)
if (epCap->capType == OO_CAP_TYPE_DATA)
continue;
- OOTRACEDBGC4("Building olcs with capability %s. (%s, %s)\n",
- ooGetCapTypeText(epCap->cap), call->callType,
+ OOTRACEDBGC4("Building olcs with capability %s. (%s, %s)\n",
+ ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
if(epCap->dir & OORX)
{
- olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -3017,10 +3017,10 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
+ olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
call->logicalChanNoCur = call->logicalChanNoBase;
-
+
ooBuildFastStartOLC(call, olc, epCap, pctxt, OORX);
/* Do not specify msg buffer let automatic allocation work */
setPERBuffer(pctxt, NULL, 0, aligned);
@@ -3058,19 +3058,19 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
olc = NULL;
i++;
OOTRACEDBGC5("Added RX fs element %d with capability %s(%s, %s)\n",
- i, ooGetCapTypeText(epCap->cap), call->callType,
+ i, ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
}
if(epCap->dir & OOTX)
{
- olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
+ olc = (H245OpenLogicalChannel*)memAlloc(pctxt,
sizeof(H245OpenLogicalChannel));
if(!olc)
{
@@ -3085,10 +3085,10 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
memset(olc, 0, sizeof(H245OpenLogicalChannel));
- olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
+ olc->forwardLogicalChannelNumber = call->logicalChanNoCur++;
if(call->logicalChanNoCur > call->logicalChanNoMax)
call->logicalChanNoCur = call->logicalChanNoBase;
-
+
ooBuildFastStartOLC(call, olc, epCap, pctxt, OOTX);
/* Do not specify msg buffer let automatic allocation work */
setPERBuffer(pctxt, NULL, 0, aligned);
@@ -3125,13 +3125,13 @@ int ooH323MakeCall_helper(OOH323CallData *call)
return OO_FAILED;
}
finishPrint();
- removeEventHandler(pctxt);
+ removeEventHandler(pctxt);
olc = NULL;
i++;
OOTRACEDBGC5("Added TX fs element %d with capability %s(%s, %s)\n",
- i, ooGetCapTypeText(epCap->cap), call->callType,
+ i, ooGetCapTypeText(epCap->cap), call->callType,
call->callToken);
}
@@ -3139,7 +3139,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
OOTRACEDBGA4("Added %d fast start elements to SETUP message (%s, %s)\n",
i, call->callType, call->callToken);
setup->fastStart.n = i;
- setup->fastStart.elem = pFS;
+ setup->fastStart.elem = pFS;
}
setup->conferenceID.numocts= call->confIdentifier.numocts;
@@ -3149,14 +3149,14 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->conferenceGoal.t = T_H225Setup_UUIE_conferenceGoal_create;
/* H.225 point to point call */
setup->callType.t = T_H225CallType_pointToPoint;
-
+
/* Populate optional fields */
setup->m.callIdentifierPresent = TRUE;
/*ooGenerateCallIdentifier(&setup->callIdentifier);*/
setup->callIdentifier.guid.numocts = call->callIdentifier.guid.numocts;
- memcpy(setup->callIdentifier.guid.data, call->callIdentifier.guid.data,
+ memcpy(setup->callIdentifier.guid.data, call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
-
+
setup->m.mediaWaitForConnectPresent = TRUE;
if(OO_TESTFLAG(call->flags, OO_M_MEDIAWAITFORCONN)) {
setup->mediaWaitForConnect = TRUE;
@@ -3167,24 +3167,24 @@ int ooH323MakeCall_helper(OOH323CallData *call)
setup->m.canOverlapSendPresent = TRUE;
setup->canOverlapSend = FALSE;
- /* Populate the userInfo structure with the setup UUIE */
-
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ /* Populate the userInfo structure with the setup UUIE */
+
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_setup;
q931msg->userInfo->h323_uu_pdu.h323_message_body.u.setup = setup;
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
-
- q931msg->userInfo->h323_uu_pdu.h245Tunneling =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling =
OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- /* For H.323 version 4 and higher, if fast connect, tunneling should be
+ /* For H.323 version 4 and higher, if fast connect, tunneling should be
supported.
why?
*/
- OOTRACEDBGA3("Built SETUP message (%s, %s)\n", call->callType,
+ OOTRACEDBGA3("Built SETUP message (%s, %s)\n", call->callType,
call->callToken);
-
+
/* H225 message callback */
if(gH323ep.h225Callbacks.onBuiltSetup)
gH323ep.h225Callbacks.onBuiltSetup(call, q931msg);
@@ -3204,7 +3204,7 @@ int ooH323MakeCall_helper(OOH323CallData *call)
int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
{
- int ret;
+ int ret;
H225Information_UUIE *information=NULL;
Q931Message *q931msg=NULL;
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
@@ -3212,7 +3212,7 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
ret = ooCreateQ931Message(pctxt, &q931msg, Q931InformationMsg);
if(ret != OO_OK)
- {
+ {
OOTRACEERR3("Error: In allocating memory for - H225 Information message."
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
@@ -3230,13 +3230,13 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
memReset(call->msgctxt);
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
- OO_M_TUNNELING);
- q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ q931msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ q931msg->userInfo->h323_uu_pdu.h245Tunneling = OO_TESTFLAG(call->flags,
+ OO_M_TUNNELING);
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_information;
-
- information = (H225Information_UUIE*)memAllocZ(pctxt,
+
+ information = (H225Information_UUIE*)memAllocZ(pctxt,
sizeof(H225Information_UUIE));
if(!information)
{
@@ -3246,21 +3246,21 @@ int ooQ931SendDTMFAsKeyPadIE(OOH323CallData *call, const char* data)
memReset(call->msgctxt);
return OO_FAILED;
}
- q931msg->userInfo->h323_uu_pdu.h323_message_body.u.information =
- information;
+ q931msg->userInfo->h323_uu_pdu.h323_message_body.u.information =
+ information;
information->m.callIdentifierPresent = 1;
- information->callIdentifier.guid.numocts =
+ information->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(information->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(information->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
information->protocolIdentifier = gProtocolID;
-
+
/*Add keypad IE*/
ret = ooQ931SetKeypadIE(pctxt, q931msg, data);
if(ret != OO_OK)
{
- OOTRACEERR3("Error:Creating keypad IE for (%s, %s)\n", call->callType,
+ OOTRACEERR3("Error:Creating keypad IE for (%s, %s)\n", call->callType,
call->callToken);
/* memReset(&gH323ep.msgctxt); */
memReset(call->msgctxt);
@@ -3297,9 +3297,9 @@ int ooH323ForwardCall(char* callToken, char *dest)
OOTRACEERR2("ERROR: Invalid call token for forward - %s\n", callToken);
return OO_FAILED;
}
- OOTRACEDBGA3("Building Facility message for call forward (%s, %s)\n",
+ OOTRACEDBGA3("Building Facility message for call forward (%s, %s)\n",
call->callType, call->callToken);
- call->pCallFwdData = (OOCallFwdData*)memAllocZ(call->pctxt,
+ call->pCallFwdData = (OOCallFwdData*)memAllocZ(call->pctxt,
sizeof(OOCallFwdData));
if(!call->pCallFwdData)
{
@@ -3308,7 +3308,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
return OO_FAILED;
}
- ret = ooParseDestination(call, dest, ip, 2+8*4+7,
+ ret = ooParseDestination(call, dest, ip, 2+8*4+7,
&call->pCallFwdData->aliases);
if(ret != OO_OK)
{
@@ -3345,20 +3345,20 @@ int ooH323ForwardCall(char* callToken, char *dest)
sizeof(H225H323_UserInformation));
if(!pQ931Msg->userInfo)
{
- OOTRACEERR3("ERROR:Memory - ooH323ForwardCall - userInfo(%s, %s)\n",
+ OOTRACEERR3("ERROR:Memory - ooH323ForwardCall - userInfo(%s, %s)\n",
call->callType, call->callToken);
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
- OO_TESTFLAG (call->flags, OO_M_TUNNELING);
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
- facility = (H225Facility_UUIE*)
+
+ facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
if(!facility)
@@ -3369,18 +3369,18 @@ int ooH323ForwardCall(char* callToken, char *dest)
}
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
-
- facility->protocolIdentifier = gProtocolID;
+
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_callForwarded;
-
+
if(!ooUtilsIsStrEmpty(call->pCallFwdData->ip))
{
facility->m.alternativeAddressPresent = TRUE;
@@ -3394,7 +3394,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- inet_pton(AF_INET6, call->pCallFwdData->ip,
+ inet_pton(AF_INET6, call->pCallFwdData->ip,
fwdCallSignalIp6Address->ip.data);
fwdCallSignalIp6Address->ip.numocts=16;
@@ -3410,7 +3410,7 @@ int ooH323ForwardCall(char* callToken, char *dest)
"(%s, %s)\n", call->callType, call->callToken);
return OO_FAILED;
}
- inet_pton(AF_INET, call->pCallFwdData->ip,
+ inet_pton(AF_INET, call->pCallFwdData->ip,
fwdCallSignalIpAddress->ip.data);
fwdCallSignalIpAddress->ip.numocts=4;
@@ -3420,14 +3420,14 @@ int ooH323ForwardCall(char* callToken, char *dest)
}
if(call->pCallFwdData->aliases)
- {
+ {
facility->m.alternativeAliasAddressPresent = TRUE;
- ret = ooPopulateAliasList(pctxt, call->pCallFwdData->aliases,
+ ret = ooPopulateAliasList(pctxt, call->pCallFwdData->aliases,
&facility->alternativeAliasAddress, 0);
if(ret != OO_OK)
{
OOTRACEERR3("Error:Failed to populate alternate aliases in "
- "ooH323ForwardCall. (%s, %s)\n", call->callType,
+ "ooH323ForwardCall. (%s, %s)\n", call->callType,
call->callToken);
return OO_FAILED;
}
@@ -3452,7 +3452,7 @@ int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931cause)
call= ooFindCallByToken(callToken);
if(!call)
{
- OOTRACEWARN2("WARN: Call hangup failed - Call %s not present\n",
+ OOTRACEWARN2("WARN: Call hangup failed - Call %s not present\n",
callToken);
return OO_FAILED;
}
@@ -3467,8 +3467,8 @@ int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931cause)
}
int ooSetBearerCapabilityIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
- enum Q931InformationTransferCapability capability,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
+ enum Q931InformationTransferCapability capability,
enum Q931TransferMode transferMode, enum Q931TransferRate transferRate,
enum Q931UserInfoLayer1Protocol userInfoLayer1)
{
@@ -3481,7 +3481,7 @@ int ooSetBearerCapabilityIE
pmsg->bearerCapabilityIE = NULL;
}
- pmsg->bearerCapabilityIE = (Q931InformationElement*)
+ pmsg->bearerCapabilityIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+size-1);
if(!pmsg->bearerCapabilityIE)
{
@@ -3495,7 +3495,7 @@ int ooSetBearerCapabilityIE
pmsg->bearerCapabilityIE->data[0] = (ASN1OCTET)(0x80 | ((codingStandard&3) << 5) | (capability&31));
pmsg->bearerCapabilityIE->data[1] = (0x80 | ((transferMode & 3) << 5) | (transferRate & 31));
-
+
pmsg->bearerCapabilityIE->data[2] = (0x80 | (1<<5) | userInfoLayer1);
return OO_OK;
@@ -3507,7 +3507,7 @@ int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
len = strlen(data);
- pmsg->keypadIE = (Q931InformationElement*)
+ pmsg->keypadIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len-1);
if(!pmsg->keypadIE)
{
@@ -3525,7 +3525,7 @@ int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
int ooQ931SetCallingPartyNumberIE
- (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
+ (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
unsigned presentation, unsigned screening)
{
unsigned len = 0;
@@ -3538,7 +3538,7 @@ int ooQ931SetCallingPartyNumberIE
}
len = strlen(number);
- pmsg->callingPartyNumberIE = (Q931InformationElement*)
+ pmsg->callingPartyNumberIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len+2-1);
if(!pmsg->callingPartyNumberIE)
{
@@ -3568,7 +3568,7 @@ int ooQ931SetCalledPartyNumberIE
}
len = strlen(number);
- pmsg->calledPartyNumberIE = (Q931InformationElement*)
+ pmsg->calledPartyNumberIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+len+1-1);
if(!pmsg->calledPartyNumberIE)
{
@@ -3592,7 +3592,7 @@ int ooQ931SetCallStateIE
pmsg->callstateIE = NULL;
}
- pmsg->callstateIE = (Q931InformationElement*)
+ pmsg->callstateIE = (Q931InformationElement*)
memAllocZ(pctxt, sizeof(Q931InformationElement));
if(!pmsg->callstateIE)
{
@@ -3602,12 +3602,12 @@ int ooQ931SetCallStateIE
pmsg->callstateIE->discriminator = Q931CallStateIE;
pmsg->callstateIE->length = 1;
pmsg->callstateIE->data[0] = callstate;
-
+
return OO_OK;
}
int ooQ931SetCauseIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CauseValues cause, unsigned coding,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CauseValues cause, unsigned coding,
unsigned location)
{
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
@@ -3617,7 +3617,7 @@ int ooQ931SetCauseIE
pmsg->causeIE = NULL;
}
- pmsg->causeIE = (Q931InformationElement*)
+ pmsg->causeIE = (Q931InformationElement*)
memAlloc(pctxt, sizeof(Q931InformationElement)+1);
if(!pmsg->causeIE)
{
@@ -3629,13 +3629,13 @@ int ooQ931SetCauseIE
pmsg->causeIE->data[0] = (0x80 | ((coding & 0x03) <<5) | (location & 0x0F));
pmsg->causeIE->data[1] = (0x80 | cause);
-
+
return OO_OK;
}
/* Build a Facility message and tunnel H.245 message through it */
-int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
+int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
int h245Len, int h245MsgType, int associatedChan)
{
Q931Message *pQ931Msg = NULL;
@@ -3647,7 +3647,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
/* OOCTXT *pctxt = &gH323ep.msgctxt; */
OOCTXT *pctxt = call->msgctxt;
- OOTRACEDBGA4("Building Facility message for tunneling %s (%s, %s)\n",
+ OOTRACEDBGA4("Building Facility message for tunneling %s (%s, %s)\n",
ooGetMsgTypeText(h245MsgType), call->callType, call->callToken);
ret = ooCreateQ931Message(pctxt, &pQ931Msg, Q931FacilityMsg);
@@ -3671,14 +3671,14 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
return OO_FAILED;
}
memset (pQ931Msg->userInfo, 0, sizeof(H225H323_UserInformation));
- pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
+ pQ931Msg->userInfo->h323_uu_pdu.m.h245TunnelingPresent=1;
- pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
+ pQ931Msg->userInfo->h323_uu_pdu.h245Tunneling =
OO_TESTFLAG (call->flags, OO_M_TUNNELING);
- pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
+ pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.t =
T_H225H323_UU_PDU_h323_message_body_facility;
-
+
facility = (H225Facility_UUIE*)
memAllocZ (pctxt, sizeof(H225Facility_UUIE));
@@ -3693,13 +3693,13 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pQ931Msg->userInfo->h323_uu_pdu.h323_message_body.u.facility = facility;
/* Populate Facility UUIE */
- facility->protocolIdentifier = gProtocolID;
+ facility->protocolIdentifier = gProtocolID;
facility->m.callIdentifierPresent = 1;
- facility->callIdentifier.guid.numocts =
+ facility->callIdentifier.guid.numocts =
call->callIdentifier.guid.numocts;
- memcpy(facility->callIdentifier.guid.data,
- call->callIdentifier.guid.data,
+ memcpy(facility->callIdentifier.guid.data,
+ call->callIdentifier.guid.data,
call->callIdentifier.guid.numocts);
facility->reason.t = T_H225FacilityReason_transportedInformation;
@@ -3711,7 +3711,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pH245Control = (H225H323_UU_PDU_h245Control*)
&pH323UUPDU->h245Control;
- elem = (ASN1DynOctStr*) memAlloc(pctxt,
+ elem = (ASN1DynOctStr*) memAlloc(pctxt,
sizeof(ASN1DynOctStr));
if(!elem)
{
@@ -3726,7 +3726,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
pQ931Msg->tunneledMsgType = h245MsgType;
pQ931Msg->logicalChannelNo = associatedChan;
-
+
ret = ooSendH225Msg(call, pQ931Msg);
if(ret != OO_OK)
{
@@ -3734,7 +3734,7 @@ int ooSendAsTunneledMessage(OOH323CallData *call, ASN1OCTET* msgbuf,
"outbound queue.(%s, %s)\n", call->callType, call->callToken);
}
- /* Can't do memReset here because if we are sending H.245 message as a
+ /* Can't do memReset here because if we are sending H.245 message as a
response to received tunneled h.245 message, we can't reset unless the \
main received H225 message processing is finished. Rule. No reset when
tunneling
@@ -3749,12 +3749,12 @@ int ooCallEstbTimerExpired(void *data)
ooTimerCallback *cbData = (ooTimerCallback*) data;
OOH323CallData *call = cbData->call;
- OOTRACEINFO3("Call Establishment timer expired. (%s, %s)\n",
- call->callType, call->callToken);
+ OOTRACEINFO3("Call Establishment timer expired. (%s, %s)\n",
+ call->callType, call->callToken);
memFreePtr(call->pctxt, cbData);
if(call->callState < OO_CALL_CLEAR){
call->callState = OO_CALL_CLEAR;
- call->callEndReason = OO_REASON_LOCAL_CLEARED;
+ call->callEndReason = OO_REASON_LOCAL_CLEARED;
}
return OO_OK;
@@ -3762,7 +3762,7 @@ int ooCallEstbTimerExpired(void *data)
int ooQ931GetCauseAndReasonCodeFromCallClearReason
- (OOCallClearReason clearReason, enum Q931CauseValues *cause,
+ (OOCallClearReason clearReason, enum Q931CauseValues *cause,
unsigned *reasonCode)
{
switch(clearReason)
@@ -3782,7 +3782,7 @@ int ooQ931GetCauseAndReasonCodeFromCallClearReason
break;
case OO_REASON_GK_NOCALLERUSER:
*reasonCode = T_H225ReleaseCompleteReason_callerNotRegistered;
- *cause = Q931SubscriberAbsent;
+ *cause = Q931SubscriberAbsent;
break;
case OO_REASON_GK_UNREACHABLE:
*reasonCode = T_H225ReleaseCompleteReason_unreachableGatekeeper;
@@ -3832,7 +3832,7 @@ int ooQ931GetCauseAndReasonCodeFromCallClearReason
*cause = Q931NoRouteToDestination;
break;
case OO_REASON_NOUSER:
- *reasonCode = T_H225ReleaseCompleteReason_undefinedReason;
+ *reasonCode = T_H225ReleaseCompleteReason_undefinedReason;
*cause = Q931SubscriberAbsent;
break;
case OO_REASON_UNKNOWN:
@@ -3956,10 +3956,10 @@ int ooParseDestination
parsedIP[0] = '\0';
OOTRACEINFO2("Parsing destination %s\n", dest);
-
+
/* Test for an IP address:Note that only supports dotted IPv4.
IPv6 won't pass the test and so will numeric IP representation*/
-
+
sscanf(dest, "%d.%d.%d.%d:%d", &iEk, &iDon, &iTeen, &iChaar, &iPort);
if((iEk > 0 && iEk <= 255) &&
(iDon >= 0 && iDon <= 255) &&
@@ -3977,7 +3977,7 @@ int ooParseDestination
"ooParseDestination\n");
return OO_FAILED;
}
-
+
strcpy(parsedIP, buf);
return OO_OK;
}
@@ -4084,13 +4084,13 @@ int ooParseDestination
}
}
-
+
/* e-164 */
/* strspn(dest, "1234567890*#,") == strlen(dest)*/
/* Dialed digits test*/
for(i=0; *(alias+i) != '\0'; i++)
{
- if(!isdigit(alias[i]) && alias[i] != '#' && alias[i] != '*' &&
+ if(!isdigit(alias[i]) && alias[i] != '#' && alias[i] != '*' &&
alias[i] != ',')
break;
}
@@ -4198,13 +4198,13 @@ const char* ooGetQ931CauseValueText(int val)
{
switch(val)
{
- case Q931UnallocatedNumber:
+ case Q931UnallocatedNumber:
return "Q931UnallocatedNumber";
case Q931NoRouteToNetwork:
return "Q931NoRouteToNetwork";
case Q931NoRouteToDestination:
return "Q931NoRouteToDestination";
- case Q931ChannelUnacceptable:
+ case Q931ChannelUnacceptable:
return "Q931ChannelUnacceptable";
case Q931NormalCallClearing:
return "Q931NormalCallClearing";
@@ -4255,4 +4255,3 @@ const char* ooGetQ931CauseValueText(int val)
}
return "Unsupported Cause Type";
}
-
diff --git a/addons/ooh323c/src/ooq931.h b/addons/ooh323c/src/ooq931.h
index 8da389328..31e53e929 100644
--- a/addons/ooh323c/src/ooq931.h
+++ b/addons/ooh323c/src/ooq931.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ooq931.h
- * This file contains functions to support call signalling.
+ * @file ooq931.h
+ * This file contains functions to support call signalling.
*/
#ifndef _OOQ931HDR_H_
@@ -37,7 +37,7 @@ extern "C" {
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup q931 Q.931/H.2250 Message Handling
* @{
*/
@@ -48,11 +48,11 @@ extern "C" {
#define OO_MAX_CALL_TOKEN 999999
/* Q.931 packet must be at least 5 bytes long */
-#define Q931_E_TOOSHORT (-1001)
+#define Q931_E_TOOSHORT (-1001)
/* callReference field must be 2 bytes long */
-#define Q931_E_INVCALLREF (-1002)
+#define Q931_E_INVCALLREF (-1002)
/* invalid length of message */
-#define Q931_E_INVLENGTH (-1003)
+#define Q931_E_INVLENGTH (-1003)
enum Q931MsgTypes {
Q931NationalEscapeMsg = 0x00,
@@ -217,8 +217,8 @@ enum Q931UserInfoLayer1Protocol{
/*
Structure to build store outgoing encoded UUIE
- The different fields in the structure have octet lengths
- as specified in the spec.
+ The different fields in the structure have octet lengths
+ as specified in the spec.
*/
typedef struct Q931InformationElement {
int discriminator;
@@ -228,8 +228,8 @@ typedef struct Q931InformationElement {
} Q931InformationElement;
/**
- * Q.931 message structure. Contains context for memory allocation,
- * protocol discriminator, call reference, meesage type and list of
+ * Q.931 message structure. Contains context for memory allocation,
+ * protocol discriminator, call reference, meesage type and list of
* user-user information elements (IEs).
*/
typedef struct Q931Message {
@@ -240,7 +240,7 @@ typedef struct Q931Message {
ASN1UINT tunneledMsgType; /* The H245 message this message is tunneling*/
ASN1INT logicalChannelNo; /* channel number associated with tunneled */
/* message, 0 if no channel */
- DList ies;
+ DList ies;
Q931InformationElement *bearerCapabilityIE;
Q931InformationElement *callingPartyNumberIE;
Q931InformationElement *calledPartyNumberIE;
@@ -266,13 +266,13 @@ struct OOH323CallData;
/*
* These are message callbacks which can be used by user applications
- * to perform application specific things on receiving a particular
+ * to perform application specific things on receiving a particular
* message or before sending a particular message. For ex. user application
* can change values of some parameters of setup message before it is actually
* sent out.
*/
/**
- * This callback is triggered when an H.225 SETUP message is received by
+ * This callback is triggered when an H.225 SETUP message is received by
* the application.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -282,7 +282,7 @@ typedef int (*cb_OnReceivedSetup)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered when an H.225 CONNECT message is received by
+ * This callback is triggered when an H.225 CONNECT message is received by
* the application.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -292,8 +292,8 @@ typedef int (*cb_OnReceivedConnect)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered after an H.225 SETUP message has been
- * constructed and is ready to be sent out. It provides the application
+ * This callback is triggered after an H.225 SETUP message has been
+ * constructed and is ready to be sent out. It provides the application
* with an opportunity to add additional non-standard information.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -303,8 +303,8 @@ typedef int (*cb_OnBuiltSetup)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This callback is triggered after an H.225 CONNECT message has been
- * constructed and is ready to be sent out. It provides the application
+ * This callback is triggered after an H.225 CONNECT message has been
+ * constructed and is ready to be sent out. It provides the application
* with an opportunity to add additional non-standard information.
* @param call The call the message is associated with.
* @param pmsg Q.931 message structure.
@@ -314,7 +314,7 @@ typedef int (*cb_OnBuiltConnect)
(struct OOH323CallData *call, struct Q931Message *pmsg);
/**
- * This structure holds the various callback functions that are
+ * This structure holds the various callback functions that are
* triggered when H.225 messages are received or constructed.
* @see ooH323EpSetH225MsgCallbacks
*/
@@ -326,8 +326,8 @@ typedef struct OOH225MsgCallbacks {
} OOH225MsgCallbacks;
/**
- * This function is invoked to decode a Q931 message.
- *
+ * This function is invoked to decode a Q931 message.
+ *
* @param call Handle to call which owns the message.
* @param msg Pointer to the Q931 message
* @param length Length of the encoded data
@@ -335,18 +335,18 @@ typedef struct OOH225MsgCallbacks {
*
* @return Completion status - 0 on success, -1 on failure
*/
-EXTERN int ooQ931Decode
+EXTERN int ooQ931Decode
(struct OOH323CallData *call, Q931Message* msg, int length, ASN1OCTET *data, int docallbacks);
/**
* This function is used to decode the UUIE of the message from the list of
* ies. It decodes the User-User ie and populates the userInfo field of the
* message.
- * @param q931Msg Pointer to the message whose User-User ie has to be
- * decoded.
+ * @param q931Msg Pointer to the message whose User-User ie has to be
+ * decoded.
*
* @return OO_OK, on success. OO_FAILED, on failure.
- */
+ */
EXTERN int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg);
/**
@@ -360,20 +360,20 @@ EXTERN int ooDecodeUUIE(OOCTXT* pctxt, Q931Message *q931Msg);
EXTERN int ooEncodeUUIE(OOCTXT* pctxt, Q931Message *q931msg);
/**
- * This function is invoked to retrieve an IE element from a Q931 message.
- *
+ * This function is invoked to retrieve an IE element from a Q931 message.
+ *
* @param q931msg Pointer to the Q931 message
* @param ieCode IE code for the IE element to be retrieved
*
- * @return Pointer to a Q931InformationElement contating
+ * @return Pointer to a Q931InformationElement contating
* the IE element.
*/
-EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
+EXTERN Q931InformationElement* ooQ931GetIE (const Q931Message* q931msg,
int ieCode);
/**
- * This function is invoked to print a Q931 message.
- *
+ * This function is invoked to print a Q931 message.
+ *
* @param q931msg Pointer to the Q931 message
*
* @return - none
@@ -382,8 +382,8 @@ EXTERN void ooQ931Print (const Q931Message* q931msg);
/**
- * This function is invoked to create an outgoing Q931 message.
- *
+ * This function is invoked to create an outgoing Q931 message.
+ *
* @param msg Reference to the pointer of type Q931 message.
* @param msgType Type of Q931 message to be created
*
@@ -392,7 +392,7 @@ EXTERN void ooQ931Print (const Q931Message* q931msg);
EXTERN int ooCreateQ931Message(OOCTXT* pctxt, Q931Message **msg, int msgType);
/**
- * This function is invoked to generate a unique call reference number.
+ * This function is invoked to generate a unique call reference number.
*
* @return - call reference number
*/
@@ -409,8 +409,8 @@ EXTERN ASN1USINT ooGenerateCallReference(void);
EXTERN int ooGenerateCallIdentifier(H225CallIdentifier *callid);
/**
- * This function is invoked to release the memory used up by a Q931 message
- *
+ * This function is invoked to release the memory used up by a Q931 message
+ *
* @param q931Msg Pointer to a Q931 message which has to be freed.
*
* @return Completion status - 0 on success, -1 on failure
@@ -418,10 +418,10 @@ EXTERN int ooGenerateCallIdentifier(H225CallIdentifier *callid);
EXTERN int ooFreeQ931Message(OOCTXT* pctxt, Q931Message *q931Msg);
/**
- * This function is invoked to retrive the outgoing message buffer for
+ * This function is invoked to retrive the outgoing message buffer for
* Q931 message
*
- * @param call Pointer to call for which outgoing Q931 message has to be
+ * @param call Pointer to call for which outgoing Q931 message has to be
* retrieved.
* @param msgbuf Pointer to a buffer in which retrieved message will
* be returned.
@@ -436,11 +436,11 @@ EXTERN int ooGetOutgoingQ931Msgbuf
(struct OOH323CallData *call, ASN1OCTET * msgbuf, int* len, int *msgType);
/**
- * This function is invoked to send a ReleaseComplete message for
+ * This function is invoked to send a ReleaseComplete message for
* the currently active call.
*
- * @param call Pointer to the call for which ReleaseComplete message have
- * to be sent.
+ * @param call Pointer to the call for which ReleaseComplete message have
+ * to be sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -451,18 +451,18 @@ EXTERN int ooSendReleaseComplete(struct OOH323CallData *call);
* received setup message.
*
* @param call Pointer to the call for which CallProceeding message have to
- * be sent.
+ * be sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
EXTERN int ooSendCallProceeding(struct OOH323CallData *call);
/**
- * This function is invoked to send alerting message in response to received
- * setup message.
+ * This function is invoked to send alerting message in response to received
+ * setup message.
*
- * @param call Pointer to the call for which Alerting message have to be
- * sent.
+ * @param call Pointer to the call for which Alerting message have to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -477,8 +477,8 @@ EXTERN int ooSendStatusInquiry(struct OOH323CallData *call);
/**
* This function is invoked to send Facility message.
*
- * @param call Pointer to the call for which Facility message have to be
- * sent.
+ * @param call Pointer to the call for which Facility message have to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -497,11 +497,11 @@ EXTERN int ooQ931SendDTMFAsKeyPadIE
(struct OOH323CallData *call, const char* data);
/**
- * This function is invoked to send a Connect message in response to received
- * setup message.
+ * This function is invoked to send a Connect message in response to received
+ * setup message.
*
- * @param call Pointer to the call for which connect message has to be
- * sent.
+ * @param call Pointer to the call for which connect message has to be
+ * sent.
*
* @return Completion status - 0 on success, -1 on failure
*/
@@ -509,7 +509,7 @@ EXTERN int ooSendConnect(struct OOH323CallData *call);
/**
* This function is used to send a SETUP message for outgoing call. It first
- * creates an H.225 TCP connection with the remote end point and then sends
+ * creates an H.225 TCP connection with the remote end point and then sends
* SETUP message over this connection.
* @param dest Destination - IP:Port/alias.
* @param callToken Unique token for the new call.
@@ -541,7 +541,7 @@ EXTERN int ooH323HandleCallFwdRequest(struct OOH323CallData *call);
/**
* This function is used for forwarding/redirecting a call to third party.
* @param callToken callToken for the call which has to be redirected.
- * @param dest Address to which call has to be forwarded. Can be
+ * @param dest Address to which call has to be forwarded. Can be
* IP:Port or alias.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -559,7 +559,7 @@ EXTERN int ooH323ForwardCall(char* callToken, char *dest);
EXTERN int ooH323HangCall(char * callToken, OOCallClearReason reason, int q931);
-/**
+/**
* Function to accept a call by sending connect. This function is used
* as a helper function to ooSendConnect.
* @param call Pointer to the call for which connect has to be sent
@@ -602,7 +602,7 @@ int ooGenerateCallToken (char *callToken, size_t size);
/**
- * This function sends an encoded H.245 message buffer as a tunneled
+ * This function sends an encoded H.245 message buffer as a tunneled
* H.245 Facility message.
* @param call Pointer to the call for which H.245 message has to
* be tunneled.
@@ -617,28 +617,28 @@ int ooGenerateCallToken (char *callToken, size_t size);
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooSendAsTunneledMessage
-(struct OOH323CallData *call, ASN1OCTET* msgbuf,
- int h245Len, int h245MsgType, int associatedChan);
-
+(struct OOH323CallData *call, ASN1OCTET* msgbuf,
+ int h245Len, int h245MsgType, int associatedChan);
+
/**
* This function is used to encode an H.225 message.
* @param call Handle to the call.
* @param pq931Msg Pointer to the message to be encoded.
- * @param msgbuf Pointer to the buffer in which encoded message will
+ * @param msgbuf Pointer to the buffer in which encoded message will
* be returned.
* @param size Size of the buffer passed.
*
* @return OO_OK, on success. OO_FAILED, on failure.
*/
-int ooEncodeH225Message(struct OOH323CallData *call, Q931Message *pq931Msg,
+int ooEncodeH225Message(struct OOH323CallData *call, Q931Message *pq931Msg,
char *msgbuf, int size);
/**
- * This is a callback function which is called when there is no CONNECT
+ * This is a callback function which is called when there is no CONNECT
* response from the remote endpoint after the SETUP has been sent and timeout
* period has passed.
- * @param data The callback data registered at the time of timer
+ * @param data The callback data registered at the time of timer
* creation.
*
* @return OO_OK, on success. OO_FAILED, on failure.
@@ -670,8 +670,8 @@ EXTERN int ooQ931SetKeypadIE(OOCTXT* pctxt, Q931Message *pmsg, const char* data)
* @return OO_OK on success, OO_FAILED, on failure.
*/
EXTERN int ooSetBearerCapabilityIE
- (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
- enum Q931InformationTransferCapability capability,
+ (OOCTXT* pctxt, Q931Message *pmsg, enum Q931CodingStandard codingStandard,
+ enum Q931InformationTransferCapability capability,
enum Q931TransferMode transferMode, enum Q931TransferRate transferRate,
enum Q931UserInfoLayer1Protocol userInfoLayer1);
@@ -703,10 +703,10 @@ EXTERN int ooQ931SetCalledPartyNumberIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931SetCallingPartyNumberIE
- (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
+ (OOCTXT* pctxt, Q931Message *pmsg, const char *number, unsigned plan, unsigned type,
unsigned presentation, unsigned screening);
-/**
+/**
* This function is used to set a cause ie for a q931 message.
* @param pmsg Valid Q931 Message
* @param cause Q931 Cause Value
@@ -716,15 +716,15 @@ EXTERN int ooQ931SetCallingPartyNumberIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931SetCauseIE
- (OOCTXT *pctxt, Q931Message *pmsg,enum Q931CauseValues cause, unsigned coding,
+ (OOCTXT *pctxt, Q931Message *pmsg,enum Q931CauseValues cause, unsigned coding,
unsigned location);
EXTERN int ooQ931SetCallStateIE
(OOCTXT *pctxt, Q931Message *pmsg, unsigned char callstate);
/**
- * This function is used to convert a call clear reason to cause and
- * reason code. It is used when local user is endoing the call and
+ * This function is used to convert a call clear reason to cause and
+ * reason code. It is used when local user is endoing the call and
* sending releaseComplete.
* @param clearReason Reason for ending call.
* @param cause Pointer to Q931CauseVaules enum in which cause
@@ -735,7 +735,7 @@ EXTERN int ooQ931SetCallStateIE
* @return OO_OK, on success. OO_FAILED, on failure.
*/
EXTERN int ooQ931GetCauseAndReasonCodeFromCallClearReason
- (OOCallClearReason clearReason, enum Q931CauseValues *cause,
+ (OOCallClearReason clearReason, enum Q931CauseValues *cause,
unsigned *reasonCode);
/**
@@ -750,7 +750,7 @@ EXTERN OOCallClearReason ooGetCallClearReasonFromCauseAndReasonCode
(enum Q931CauseValues cause, unsigned reasonCode);
/**
- * This function is used to retrieve the description text for a
+ * This function is used to retrieve the description text for a
* message type.
*
* @param msgType Message type.
@@ -775,8 +775,8 @@ EXTERN int ooSendStartH245Facility(struct OOH323CallData *call);
EXTERN int ooSendFSUpdate(struct OOH323CallData *call);
EXTERN int ooHandleFastStartChannels(struct OOH323CallData *pCall);
-/**
- * @}
+/**
+ * @}
*/
#ifdef __cplusplus
}
diff --git a/addons/ooh323c/src/ootrace.c b/addons/ooh323c/src/ootrace.c
index ba77e7fd1..3e097faa5 100644
--- a/addons/ooh323c/src/ootrace.c
+++ b/addons/ooh323c/src/ootrace.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -47,7 +47,7 @@ void ooTrace(OOUINT32 traceLevel, const char * fmtspec, ...) {
if(traceLevel > gs_traceLevel) return;
va_start (arglist, fmtspec);
/* memset(logMessage, 0, MAXLOGMSGLEN);*/
- vsprintf(logMessage, fmtspec, arglist);
+ vsprintf(logMessage, fmtspec, arglist);
va_end(arglist);
ooTraceLogMessage(logMessage);
}
@@ -59,18 +59,18 @@ void ooTraceLogMessage(const char * logMessage)
static int lasttime=25;
int printDate =0;
static int printTime=1;
-
+
#ifdef _WIN32
-
+
SYSTEMTIME systemTime;
GetLocalTime(&systemTime);
- GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
+ GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "HH':'mm':'ss",
timeString, 100);
GetTimeFormat(LOCALE_SYSTEM_DEFAULT,0, &systemTime, "H", currtime, 3);
if(lasttime> atoi(currtime))
printDate=1;
lasttime = atoi(currtime);
-
+
#else
struct tm *ptime;
char dateString[10];
@@ -80,10 +80,10 @@ void ooTraceLogMessage(const char * logMessage)
strftime(currtime, 3, "%H", ptime);
if(lasttime>atoi(currtime))
printDate = 1;
- lasttime = atoi(currtime);
+ lasttime = atoi(currtime);
#endif
-
+
#ifdef _WIN32
if(printDate)
{
@@ -92,25 +92,25 @@ void ooTraceLogMessage(const char * logMessage)
systemTime.wMonth, systemTime.wDay, systemTime.wYear);
}
if(printTime) {
- fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03d %s", timeString,
systemTime.wMilliseconds, logMessage);
}
else
fprintf(gH323ep.fptraceFile, "%s", logMessage);
-
+
fflush(gH323ep.fptraceFile);
#else
if(printDate)
{
printDate = 0;
strftime(dateString, 10, "%d", ptime);
- fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
+ fprintf(gH323ep.fptraceFile, "---------Date %s---------\n",
dateString);
}
if(printTime) {
struct timeval systemTime;
gettimeofday(&systemTime, NULL);
- fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
+ fprintf(gH323ep.fptraceFile, "%s:%03ld %s", timeString,
(long) systemTime.tv_usec/1000, logMessage);
}
else
@@ -118,7 +118,7 @@ void ooTraceLogMessage(const char * logMessage)
fflush(gH323ep.fptraceFile);
#endif
-
+
if(strchr(logMessage, '\n'))
printTime = 1;
else
@@ -131,4 +131,3 @@ int ooLogAsn1Error(int stat, const char * fname, int lno)
OOTRACEERR4("Asn1Error: %d at %s:%d\n", stat, fname, lno);
return stat;
}
-
diff --git a/addons/ooh323c/src/ootrace.h b/addons/ooh323c/src/ootrace.h
index 1f4e6c570..72b211913 100644
--- a/addons/ooh323c/src/ootrace.h
+++ b/addons/ooh323c/src/ootrace.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- * @file ootrace.h
+ * @file ootrace.h
* This file defines the trace functionality
*/
#include "ooCommon.h"
@@ -67,7 +67,7 @@
#define OOTRACEINFO4(a,b,c,d) ooTrace(OOTRCLVLINFO,a,b,c,d)
#define OOTRACEINFO5(a,b,c,d,e) ooTrace(OOTRCLVLINFO,a,b,c,d,e)
#define OOTRACEINFO6(a,b,c,d,e,f) ooTrace(OOTRCLVLINFO,a,b,c,d,e, f)
-#ifndef _COMPACT
+#ifndef _COMPACT
#define OOTRACEDBGA1(a) ooTrace(OOTRCLVLDBGA,a)
#define OOTRACEDBGA2(a,b) ooTrace(OOTRCLVLDBGA,a,b)
#define OOTRACEDBGA3(a,b,c) ooTrace(OOTRCLVLDBGA,a,b,c)
@@ -83,13 +83,13 @@
#define OOTRACEDBGC4(a,b,c,d) ooTrace(OOTRCLVLDBGC,a,b,c,d)
#define OOTRACEDBGC5(a,b,c,d,e) ooTrace(OOTRCLVLDBGC,a,b,c,d,e)
#else
-#define OOTRACEDBGA1(a)
+#define OOTRACEDBGA1(a)
#define OOTRACEDBGA2(a,b)
#define OOTRACEDBGA3(a,b,c)
#define OOTRACEDBGA4(a,b,c,d)
#define OOTRACEDBGA5(a,b,c,d,e)
#define OOTRACEDBGB1(a)
-#define OOTRACEDBGB2(a,b)
+#define OOTRACEDBGB2(a,b)
#define OOTRACEDBGB3(a,b,c)
#define OOTRACEDBGB4(a,b,c,d)
#define OOTRACEDBGC1(a)
@@ -113,11 +113,11 @@ extern "C" {
/**
* This function is used to set the trace level.
- * @param traceLevel New trace level. Various values are: OOTRCLVLERR,
+ * @param traceLevel New trace level. Various values are: OOTRCLVLERR,
* OOTRCLVLWARN, OOTRCLVLINFO, OOTRCLVLDBGA, OOTRCLVLDBGB,
* OOTRCLVLDBGC
*
- * @return None
+ * @return None
*/
EXTERN void ooSetTraceThreshold(OOUINT32 traceLevel);
@@ -126,7 +126,7 @@ EXTERN void ooSetTraceThreshold(OOUINT32 traceLevel);
*
* @param traceLevel Trace level for the message.
* @param fmtspec Printf style format spec.
- * @param ... Printf style variable list of arguments
+ * @param ... Printf style variable list of arguments
*
* @return - none
*/
diff --git a/addons/ooh323c/src/ootypes.h b/addons/ooh323c/src/ootypes.h
index 9583e9e1b..71a7219a6 100644
--- a/addons/ooh323c/src/ootypes.h
+++ b/addons/ooh323c/src/ootypes.h
@@ -1,50 +1,50 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/*! \mainpage
+/*! \mainpage
* <H1>ooH323c Stack Functions</H1>
*
- * The <B>Objective Open H.323 for C (ooH323c)</B> protocol stack is an
- * open source applications program interface (API) for building H.323 based
- * applications. The stack implements Q.931/H.225 call signaling procedures,
- * H.245 logical channel operations, and Registration, Admission, and Status
+ * The <B>Objective Open H.323 for C (ooH323c)</B> protocol stack is an
+ * open source applications program interface (API) for building H.323 based
+ * applications. The stack implements Q.931/H.225 call signaling procedures,
+ * H.245 logical channel operations, and Registration, Admission, and Status
* (RAS) messaging for Gatekeeper communications.
*
* The categories of user functions provided are as follows:
* <UL>
- * <LI>Stack command functions. These are high level functions used to
- * initiate common H.323 telephony operations (for example, to make a
+ * <LI>Stack command functions. These are high level functions used to
+ * initiate common H.323 telephony operations (for example, to make a
* call).</LI>
- * <LI>Gatekeeper functions. These are high level functions for
+ * <LI>Gatekeeper functions. These are high level functions for
* managing communications with a gatekeeper using RAS messages.</LI>
- * <LI>H.323 endpoint management functions. These are function for
+ * <LI>H.323 endpoint management functions. These are function for
* used for managing the global H.323 endpoint.</LI>
- * <LI>Call management functions. These are functions used to manage
+ * <LI>Call management functions. These are functions used to manage
* active calls within the stack.</LI>
- * <LI>Capability management functions. These functions are used for
+ * <LI>Capability management functions. These functions are used for
* negotiating capabilities between two different terminals.</LI>
- * <LI>H.225 and H.245 message handling functions. Functions for
+ * <LI>H.225 and H.245 message handling functions. Functions for
* creating and handling H.323 standard ASN.1 messages.</LI>
- * <LI>Q.931 functions. Functions for the execution of various
+ * <LI>Q.931 functions. Functions for the execution of various
* standard Q.931 operations.</LI>
- * <LI>TCP/IP and UDP socket communication functions. Low-level
+ * <LI>TCP/IP and UDP socket communication functions. Low-level
* functions for writing data to and receiving data from sockets.</LI>
* </UL>
- */
+ */
/**
- * @file ootypes.h
+ * @file ootypes.h
* This file contains definitions of common constants and data structures.
*/
#ifndef _OOTYPES_H_
@@ -71,7 +71,7 @@
#endif /* MAKE_DLL */
#endif /* EXTERN */
-/**
+/**
* @defgroup ootypes Common type and constant definitions.
* @{
*/
@@ -86,7 +86,7 @@
*/
typedef enum OOMasterSlaveState {
OO_MasterSlave_Idle,
- OO_MasterSlave_DetermineSent,
+ OO_MasterSlave_DetermineSent,
OO_MasterSlave_AckReceived,
OO_MasterSlave_Master,
OO_MasterSlave_Slave
@@ -97,25 +97,25 @@ typedef enum OOMSAckStatus {
OO_msAck_remoteReceived
} OOMSAckStatus;
-/**
- * States defined for the capability exchange procedure.
+/**
+ * States defined for the capability exchange procedure.
*/
typedef enum {
- OO_LocalTermCapExchange_Idle,
- OO_LocalTermCapSetSent,
- OO_LocalTermCapSetAckRecvd,
- OO_RemoteTermCapExchange_Idle,
- OO_RemoteTermCapSetRecvd,
+ OO_LocalTermCapExchange_Idle,
+ OO_LocalTermCapSetSent,
+ OO_LocalTermCapSetAckRecvd,
+ OO_RemoteTermCapExchange_Idle,
+ OO_RemoteTermCapSetRecvd,
OO_RemoteTermCapSetAckSent
} OOCapExchangeState;
-/**
+/**
* Call clear reason codes.
*/
typedef enum OOCallClearReason {
- OO_REASON_UNKNOWN=0,
+ OO_REASON_UNKNOWN=0,
OO_REASON_INVALIDMESSAGE,
- OO_REASON_TRANSPORTFAILURE,
+ OO_REASON_TRANSPORTFAILURE,
OO_REASON_NOROUTE,
OO_REASON_NOUSER,
OO_REASON_NOBW,
@@ -125,10 +125,10 @@ typedef enum OOCallClearReason {
OO_REASON_GK_UNREACHABLE,
OO_REASON_GK_CLEARED,
OO_REASON_NOCOMMON_CAPABILITIES,
- OO_REASON_REMOTE_FWDED,
+ OO_REASON_REMOTE_FWDED,
OO_REASON_LOCAL_FWDED,
- OO_REASON_REMOTE_CLEARED,
- OO_REASON_LOCAL_CLEARED,
+ OO_REASON_REMOTE_CLEARED,
+ OO_REASON_LOCAL_CLEARED,
OO_REASON_REMOTE_BUSY,
OO_REASON_LOCAL_BUSY,
OO_REASON_REMOTE_NOANSWER,
@@ -154,45 +154,45 @@ typedef enum OOCallClearReason {
/**
Various message types for H225 and H245 messages
*/
-#define OO_MSGTYPE_MIN 101
-#define OOQ931MSG 101
-#define OOH245MSG 102
-#define OOSetup 103
-#define OOCallProceeding 104
-#define OOAlert 105
-#define OOConnect 106
-#define OOReleaseComplete 107
-#define OOFacility 108
-#define OOInformationMessage 109
-#define OOMasterSlaveDetermination 110
-#define OOMasterSlaveAck 111
-#define OOMasterSlaveReject 112
-#define OOMasterSlaveRelease 113
-#define OOTerminalCapabilitySet 114
-#define OOTerminalCapabilitySetAck 115
-#define OOTerminalCapabilitySetReject 116
-#define OOTerminalCapabilitySetRelease 117
-#define OOOpenLogicalChannel 118
-#define OOOpenLogicalChannelAck 119
-#define OOOpenLogicalChannelReject 120
-#define OOOpenLogicalChannelRelease 121
-#define OOOpenLogicalChannelConfirm 122
-#define OOCloseLogicalChannel 123
-#define OOCloseLogicalChannelAck 124
-#define OORequestChannelClose 125
-#define OORequestChannelCloseAck 126
-#define OORequestChannelCloseReject 127
-#define OORequestChannelCloseRelease 128
-#define OOEndSessionCommand 129
-#define OOUserInputIndication 130
-#define OORequestModeAck 131
-#define OORequestModeReject 132
-#define OORequestMode 133
-#define OORequestDelayResponse 134
-#define OORequestDelayRequest 135
-#define OOStatus 136
+#define OO_MSGTYPE_MIN 0x65
+#define OOQ931MSG 0x65
+#define OOH245MSG 0x66
+#define OOSetup 0x67
+#define OOCallProceeding 0x68
+#define OOAlert 0x69
+#define OOConnect 0x6a
+#define OOReleaseComplete 0x6b
+#define OOFacility 0x6c
+#define OOInformationMessage 0x6d
+#define OOMasterSlaveDetermination 0x6e
+#define OOMasterSlaveAck 0x6f
+#define OOMasterSlaveReject 0x70
+#define OOMasterSlaveRelease 0x71
+#define OOTerminalCapabilitySet 0x72
+#define OOTerminalCapabilitySetAck 0x73
+#define OOTerminalCapabilitySetReject 0x74
+#define OOTerminalCapabilitySetRelease 0x75
+#define OOOpenLogicalChannel 0x76
+#define OOOpenLogicalChannelAck 0x77
+#define OOOpenLogicalChannelReject 0x78
+#define OOOpenLogicalChannelRelease 0x79
+#define OOOpenLogicalChannelConfirm 0x7a
+#define OOCloseLogicalChannel 0x7b
+#define OOCloseLogicalChannelAck 0x7c
+#define OORequestChannelClose 0x7d
+#define OORequestChannelCloseAck 0x7e
+#define OORequestChannelCloseReject 0x7f
+#define OORequestChannelCloseRelease 0x80
+#define OOEndSessionCommand 0x81
+#define OOUserInputIndication 0x82
+#define OORequestModeAck 0x83
+#define OORequestModeReject 0x84
+#define OORequestMode 0x85
+#define OORequestDelayResponse 0x86
+#define OORequestDelayRequest 0x87
+#define OOStatus 0x88
-#define OO_MSGTYPE_MAX 136
+#define OO_MSGTYPE_MAX 0x88
/* Timer types */
#define OO_CALLESTB_TIMER (1<<0)
@@ -241,8 +241,8 @@ typedef enum OOCallMode {
/*TODO: Should add caller-id, callername etc. So that they can be changed per
call basis*/
/**
- * This structure defines options that can be set at the level of an
- * individual call. They override options set in the H.323 endpoint
+ * This structure defines options that can be set at the level of an
+ * individual call. They override options set in the H.323 endpoint
* structure.
*/
typedef struct ooCallOptions {
@@ -252,7 +252,7 @@ typedef struct ooCallOptions {
OOCallMode callMode; /*!< Type of channel to setup with FastStart */
int transfercap; /* q931 cap */
}ooCallOptions;
-
+
struct OOH323CallData;
@@ -266,4 +266,3 @@ typedef struct ooTimerCallback{
* @}
*/
#endif
-
diff --git a/addons/ooh323c/src/perutil.c b/addons/ooh323c/src/perutil.c
index 75368279a..9d6c4618a 100644
--- a/addons/ooh323c/src/perutil.c
+++ b/addons/ooh323c/src/perutil.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -23,7 +23,7 @@
ASN1BOOL isExtendableSize (Asn1SizeCnst* pSizeList);
static ASN1BOOL isFixedSize (Asn1SizeCnst* pSizeList);
-ASN1BOOL alignCharStr
+ASN1BOOL alignCharStr
(OOCTXT* pctxt, ASN1UINT len, ASN1UINT nbits, Asn1SizeCnst* pSize)
{
if (TRUE) {
@@ -59,16 +59,16 @@ ASN1BOOL alignCharStr
return FALSE;
}
-int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
- ASN1UINT itemCount,
+int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
+ ASN1UINT itemCount,
ASN1BOOL bitStrFlag,
ASN1BOOL* pAlignFlag)
{
ASN1UINT threshold = (bitStrFlag) ? 16 : 2;
- if (pSizeList == 0 || itemCount > threshold)
+ if (pSizeList == 0 || itemCount > threshold)
*pAlignFlag = TRUE;
- else if (isFixedSize(pSizeList))
+ else if (isFixedSize(pSizeList))
*pAlignFlag = FALSE;
else {
@@ -91,8 +91,8 @@ int bitAndOctetStringAlignmentTest (Asn1SizeCnst* pSizeList,
return (ASN_OK);
}
-Asn1SizeCnst* checkSize (Asn1SizeCnst* pSizeList,
- ASN1UINT value,
+Asn1SizeCnst* checkSize (Asn1SizeCnst* pSizeList,
+ ASN1UINT value,
ASN1BOOL* pExtendable)
{
Asn1SizeCnst* lpSize = pSizeList;
@@ -132,7 +132,7 @@ int addSizeConstraint (OOCTXT* pctxt, Asn1SizeCnst* pSize)
lpSize = pSize;
while (lpSize) {
if (pctxt->pSizeConstraint->lower <= lpSize->lower ||
- pctxt->pSizeConstraint->upper >= lpSize->upper)
+ pctxt->pSizeConstraint->upper >= lpSize->upper)
{
/* Set the extension flag to the value of the size */
/* constraint structure that the item falls within.. */
@@ -196,32 +196,32 @@ int checkSizeConstraint(OOCTXT* pctxt, int size)
}
ASN1UINT getUIntBitCount (ASN1UINT value)
-{
+{
/* Binary search - decision tree (5 tests, rarely 6) */
return
((value < 1<<15) ?
((value < 1<<7) ?
((value < 1<<3) ?
- ((value < 1<<1) ? ((value < 1<<0) ? 0 : 1) :
+ ((value < 1<<1) ? ((value < 1<<0) ? 0 : 1) :
((value < 1<<2) ? 2 : 3)) :
- ((value < 1<<5) ? ((value < 1<<4) ? 4 : 5) :
+ ((value < 1<<5) ? ((value < 1<<4) ? 4 : 5) :
((value < 1<<6) ? 6 : 7))) :
((value < 1<<11) ?
- ((value < 1<<9) ? ((value < 1<<8) ? 8 : 9) :
+ ((value < 1<<9) ? ((value < 1<<8) ? 8 : 9) :
((value < 1<<10) ? 10 : 11)) :
- ((value < 1<<13) ? ((value < 1<<12) ? 12 : 13) :
+ ((value < 1<<13) ? ((value < 1<<12) ? 12 : 13) :
((value < 1<<14) ? 14 : 15)))) :
((value < 1<<23) ?
((value < 1<<19) ?
- ((value < 1<<17) ? ((value < 1<<16) ? 16 : 17) :
+ ((value < 1<<17) ? ((value < 1<<16) ? 16 : 17) :
((value < 1<<18) ? 18 : 19)) :
- ((value < 1<<21) ? ((value < 1<<20) ? 20 : 21) :
+ ((value < 1<<21) ? ((value < 1<<20) ? 20 : 21) :
((value < 1<<22) ? 22 : 23))) :
((value < 1<<27) ?
- ((value < 1<<25) ? ((value < 1<<24) ? 24 : 25) :
+ ((value < 1<<25) ? ((value < 1<<24) ? 24 : 25) :
((value < 1<<26) ? 26 : 27)) :
- ((value < 1<<29) ? ((value < 1<<28) ? 28 : 29) :
- ((value < 1<<30) ? 30 :
+ ((value < 1<<29) ? ((value < 1<<28) ? 28 : 29) :
+ ((value < 1<<30) ? 30 :
((value < 1UL<<31) ? 31 : 32))))));
}
@@ -257,7 +257,7 @@ static ASN1BOOL isFixedSize (Asn1SizeCnst* pSizeList)
return FALSE;
}
-void set16BitCharSet
+void set16BitCharSet
(OOCTXT* pctxt, Asn116BitCharSet* pCharSet, Asn116BitCharSet* pAlphabet)
{
/* Permitted alphabet range can either be specified as a range of */
@@ -267,7 +267,7 @@ void set16BitCharSet
int nocts = pAlphabet->charSet.nchars * 2;
pCharSet->charSet.nchars = pAlphabet->charSet.nchars;
- pCharSet->charSet.data =
+ pCharSet->charSet.data =
(ASN116BITCHAR*) ASN1MALLOC (pctxt, nocts);
if (pCharSet->charSet.data != NULL)
@@ -286,4 +286,3 @@ void set16BitCharSet
pCharSet->alignedBits <<= 1;
}
-
diff --git a/addons/ooh323c/src/printHandler.c b/addons/ooh323c/src/printHandler.c
index 8d5113795..bdc81ff61 100644
--- a/addons/ooh323c/src/printHandler.c
+++ b/addons/ooh323c/src/printHandler.c
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/* This is an implementation of a simple print handler. It outputs
- the fields of an encoded PER message to stdout in a structured output
+/* This is an implementation of a simple print handler. It outputs
+ the fields of an encoded PER message to stdout in a structured output
format..
*/
#include "asterisk.h"
@@ -35,10 +35,10 @@ AST_MUTEX_DEFINE_STATIC(printlock);
static const char* pVarName;
static int gIndentSpaces;
-static const char* bitStrToString
+static const char* bitStrToString
(ASN1UINT numbits, const ASN1OCTET* data, char* buffer, size_t bufsiz);
-static const char* octStrToString
+static const char* octStrToString
(ASN1UINT numocts, const ASN1OCTET* data, char* buffer, size_t bufsiz);
void printCharStr32BitValue (ASN1UINT nchars, ASN132BITCHAR* data);
@@ -231,7 +231,7 @@ void printOpenTypeValue (ASN1UINT numocts, const ASN1OCTET* data)
OOTRACEDBGB1 ("< encoded data >\n");
}
-static const char* bitStrToString
+static const char* bitStrToString
(ASN1UINT numbits, const ASN1OCTET* data, char* buffer, size_t bufsiz)
{
size_t i;
@@ -257,7 +257,7 @@ static const char* bitStrToString
return buffer;
}
-static const char* octStrToString
+static const char* octStrToString
(ASN1UINT numocts, const ASN1OCTET* data, char* buffer, size_t bufsiz)
{
size_t i;
diff --git a/addons/ooh323c/src/printHandler.h b/addons/ooh323c/src/printHandler.h
index 73f225b1f..4c6d4e18f 100644
--- a/addons/ooh323c/src/printHandler.h
+++ b/addons/ooh323c/src/printHandler.h
@@ -1,22 +1,22 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
/**
- @file printHandler.h
- This is an implementation of a simple print handler. It outputs
- the fields of an encoded PER message to stdout in a structured output
+ @file printHandler.h
+ This is an implementation of a simple print handler. It outputs
+ the fields of an encoded PER message to stdout in a structured output
format..
*/
diff --git a/addons/ooh323c/src/rtctype.c b/addons/ooh323c/src/rtctype.c
index 8dfe4e3fa..60f7d898b 100644
--- a/addons/ooh323c/src/rtctype.c
+++ b/addons/ooh323c/src/rtctype.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
diff --git a/addons/ooh323c/src/rtctype.h b/addons/ooh323c/src/rtctype.h
index ebb0a59b4..4ab96807c 100644
--- a/addons/ooh323c/src/rtctype.h
+++ b/addons/ooh323c/src/rtctype.h
@@ -1,21 +1,21 @@
/*
* Copyright (C) 1997-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
-/**
- * @file rtctype.h
+/**
+ * @file rtctype.h
*/
#ifndef _RTCTYPE_H_
#define _RTCTYPE_H_
@@ -83,4 +83,3 @@ extern EXTERN const ASN1OCTET rtCtypeTable[256];
#endif
#endif /* _RTCTYPE_H_ */
-
diff --git a/addons/ooh323cDriver.c b/addons/ooh323cDriver.c
index bceb07745..1676c0e0a 100644
--- a/addons/ooh323cDriver.c
+++ b/addons/ooh323cDriver.c
@@ -1,15 +1,15 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
@@ -116,7 +116,7 @@ void* ooh323c_call_thread(void* dummy)
} while (mycthread->call != NULL && res >= 0);
-
+
ast_mutex_destroy(&mycthread->lock);
close(mycthread->thePipe[0]);
@@ -240,10 +240,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g711 ulaw capability to H323 endpoint\n");
}
- ret= ooH323EpAddG711Capability(OO_G711ULAW64K, gtxframes, grxframes,
+ ret= ooH323EpAddG711Capability(OO_G711ULAW64K, gtxframes, grxframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_alaw) == AST_FORMAT_CMP_EQUAL)
@@ -251,10 +251,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g711 alaw capability to H323 endpoint\n");
}
- ret= ooH323EpAddG711Capability(OO_G711ALAW64K, gtxframes, grxframes,
+ ret= ooH323EpAddG711Capability(OO_G711ALAW64K, gtxframes, grxframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -263,27 +263,27 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g729A capability to H323 endpoint\n");
}
- ret = ooH323EpAddG729Capability(OO_G729A, 2, 24,
+ ret = ooH323EpAddG729Capability(OO_G729A, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729 capability to H323 endpoint\n");
}
- ret |= ooH323EpAddG729Capability(OO_G729, 2, 24,
+ ret |= ooH323EpAddG729Capability(OO_G729, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729b capability to H323 endpoint\n");
}
- ret |= ooH323EpAddG729Capability(OO_G729B, 2, 24,
+ ret |= ooH323EpAddG729Capability(OO_G729B, 2, 24,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -292,10 +292,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g7231 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG7231Capability(OO_G7231, 1, 1, FALSE,
+ ret = ooH323EpAddG7231Capability(OO_G7231, 1, 1, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -305,10 +305,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g726 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG726Capability(OO_G726, gtxframes, grxframes, FALSE,
+ ret = ooH323EpAddG726Capability(OO_G726, gtxframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -318,10 +318,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding g726aal2 capability to H323 endpoint\n");
}
- ret = ooH323EpAddG726Capability(OO_G726AAL2, gtxframes, grxframes, FALSE,
+ ret = ooH323EpAddG726Capability(OO_G726AAL2, gtxframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -331,10 +331,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding h263 capability to H323 endpoint\n");
}
- ret = ooH323EpAddH263VideoCapability(OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
+ ret = ooH323EpAddH263VideoCapability(OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -344,10 +344,10 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding gsm capability to H323 endpoint\n");
}
- ret = ooH323EpAddGSMCapability(OO_GSMFULLRATE, 4, FALSE, FALSE,
+ ret = ooH323EpAddGSMCapability(OO_GSMFULLRATE, 4, FALSE, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -357,17 +357,17 @@ int ooh323c_set_capability
if (gH323Debug) {
ast_verb(0, "\tAdding speex capability to H323 endpoint\n");
}
- ret = ooH323EpAddSpeexCapability(OO_SPEEX, 4, 4, FALSE,
+ ret = ooH323EpAddSpeexCapability(OO_SPEEX, 4, 4, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
- ao2_ref(format, -1);
+ ao2_ref(format, -1);
}
-
+
if(dtmf & H323_DTMF_CISCO)
ret |= ooH323EpEnableDTMFCISCO(0);
if(dtmf & H323_DTMF_RFC2833)
@@ -386,7 +386,7 @@ int ooh323c_set_capability_for_call
{
int ret = 0, x, txframes;
if (gH323Debug) {
- ast_verb(0, "\tAdding capabilities to call(%s, %s)\n", call->callType,
+ ast_verb(0, "\tAdding capabilities to call(%s, %s)\n", call->callType,
call->callToken);
}
if(dtmf & H323_DTMF_CISCO || 1)
@@ -399,7 +399,7 @@ int ooh323c_set_capability_for_call
ret |= ooCallEnableDTMFH245Signal(call);
if (t38support)
- ooCapabilityAddT38Capability(call, OO_T38, OORXANDTX,
+ ooCapabilityAddT38Capability(call, OO_T38, OORXANDTX,
&ooh323c_start_receive_datachannel,
&ooh323c_start_transmit_datachannel,
&ooh323c_stop_receive_datachannel,
@@ -412,15 +412,15 @@ int ooh323c_set_capability_for_call
if(ast_format_cmp(format, ast_format_ulaw) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding g711 ulaw capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding g711 ulaw capability to call(%s, %s)\n",
call->callType, call->callToken);
}
txframes = ast_format_cap_get_format_framing(cap, format);
- ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
- txframes, OORXANDTX,
+ ret= ooCallAddG711Capability(call, OO_G711ULAW64K, txframes,
+ txframes, OORXANDTX,
&ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_alaw) == AST_FORMAT_CMP_EQUAL)
@@ -430,11 +430,11 @@ int ooh323c_set_capability_for_call
call->callType, call->callToken);
}
txframes = ast_format_cap_get_format_framing(cap, format);
- ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
- txframes, OORXANDTX,
+ ret= ooCallAddG711Capability(call, OO_G711ALAW64K, txframes,
+ txframes, OORXANDTX,
&ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -448,7 +448,7 @@ int ooh323c_set_capability_for_call
ret = ooCallAddG726Capability(call, OO_G726, txframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -463,23 +463,23 @@ int ooh323c_set_capability_for_call
ret = ooCallAddG726Capability(call, OO_G726AAL2, txframes, grxframes, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_g729) == AST_FORMAT_CMP_EQUAL)
{
-
+
txframes = (ast_format_cap_get_format_framing(cap, format))/10;
if (gH323Debug) {
ast_verb(0, "\tAdding g729A capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret= ooCallAddG729Capability(call, OO_G729A, txframes, txframes,
+ ret= ooCallAddG729Capability(call, OO_G729A, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (g729onlyA)
continue;
@@ -487,19 +487,19 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding g729 capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret|= ooCallAddG729Capability(call, OO_G729, txframes, txframes,
+ ret|= ooCallAddG729Capability(call, OO_G729, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
if (gH323Debug) {
ast_verb(0, "\tAdding g729B capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret|= ooCallAddG729Capability(call, OO_G729B, txframes, txframes,
+ ret|= ooCallAddG729Capability(call, OO_G729B, txframes, txframes,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -510,10 +510,10 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding g7231 capability to call (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddG7231Capability(call, OO_G7231, 1, 1, FALSE,
+ ret = ooCallAddG7231Capability(call, OO_G7231, 1, 1, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -524,10 +524,10 @@ int ooh323c_set_capability_for_call
ast_verb(0, "\tAdding h263 capability to call (%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddH263VideoCapability(call, OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
+ ret = ooCallAddH263VideoCapability(call, OO_H263VIDEO, 1, 0, 0, 0, 0, 320*1024,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -535,26 +535,26 @@ int ooh323c_set_capability_for_call
if(ast_format_cmp(format, ast_format_gsm) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding gsm capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding gsm capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddGSMCapability(call, OO_GSMFULLRATE, 4, FALSE, FALSE,
+ ret = ooCallAddGSMCapability(call, OO_GSMFULLRATE, 4, FALSE, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
if(ast_format_cmp(format, ast_format_speex) == AST_FORMAT_CMP_EQUAL)
{
if (gH323Debug) {
- ast_verb(0, "\tAdding Speex capability to call(%s, %s)\n",
+ ast_verb(0, "\tAdding Speex capability to call(%s, %s)\n",
call->callType, call->callToken);
}
- ret = ooCallAddSpeexCapability(call, OO_SPEEX, 4, 4, FALSE,
+ ret = ooCallAddSpeexCapability(call, OO_SPEEX, 4, 4, FALSE,
OORXANDTX, &ooh323c_start_receive_channel,
&ooh323c_start_transmit_channel,
- &ooh323c_stop_receive_channel,
+ &ooh323c_stop_receive_channel,
&ooh323c_stop_transmit_channel);
}
@@ -569,7 +569,7 @@ int ooh323c_set_aliases(ooAliases * aliases)
while(cur)
{
switch(cur->type)
- {
+ {
case T_H225AliasAddress_dialedDigits:
ooH323EpAddAliasDialedDigits(cur->value);
break;
@@ -589,7 +589,7 @@ int ooh323c_set_aliases(ooAliases * aliases)
}
return 1;
}
-
+
int ooh323c_start_receive_channel(ooCallData *call, ooLogicalChannel *pChannel)
{
struct ast_format *tmpfmt = NULL;
@@ -694,5 +694,3 @@ struct ast_format *convertH323CapToAsteriskCap(int cap)
return NULL;
}
-
-
diff --git a/addons/ooh323cDriver.h b/addons/ooh323cDriver.h
index 98198019a..00bf9b551 100644
--- a/addons/ooh323cDriver.h
+++ b/addons/ooh323cDriver.h
@@ -1,20 +1,20 @@
/*
* Copyright (C) 2004-2005 by Objective Systems, Inc.
*
- * This software is furnished under an open source license and may be
- * used and copied only in accordance with the terms of this license.
- * The text of the license may generally be found in the root
- * directory of this installation in the COPYING file. It
+ * This software is furnished under an open source license and may be
+ * used and copied only in accordance with the terms of this license.
+ * The text of the license may generally be found in the root
+ * directory of this installation in the COPYING file. It
* can also be viewed online at the following URL:
*
* http://www.obj-sys.com/open/license.html
*
- * Any redistributions of this file including modified versions must
+ * Any redistributions of this file including modified versions must
* maintain this copyright notice.
*
*****************************************************************************/
#ifndef _OO_H323CDRIVER_H_
-#define __OO_H323DRIVER_H_
+#define _OO_H323CDRIVER_H_
#include "chan_ooh323.h"
#include "ootypes.h"
#include "ooh323ep.h"
diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
index cdc641bd1..776257e6d 100644
--- a/addons/res_config_mysql.c
+++ b/addons/res_config_mysql.c
@@ -449,7 +449,7 @@ static struct ast_config *realtime_multi_mysql(const char *database, const char
release_database(dbh);
return NULL;
}
-
+
if (!(cfg = ast_config_new())) {
/* If I can't alloc memory at this point, why bother doing anything else? */
ast_log(LOG_WARNING, "Out of memory!\n");
@@ -751,7 +751,7 @@ static int update2_mysql(const char *database, const char *tablename, const stru
return (int)numrows;
}
-
+
static int store_mysql(const char *database, const char *table, const struct ast_variable *rt_fields)
{
struct mysql_conn *dbh;
@@ -875,7 +875,7 @@ static int destroy_mysql(const char *database, const char *table, const char *ke
return (int)numrows;
}
-
+
static struct ast_config *config_mysql(const char *database, const char *table, const char *file, struct ast_config *cfg, struct ast_flags config_flags, const char *unused, const char *who_asked)
{
struct mysql_conn *dbh;
@@ -1563,4 +1563,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "MySQL RealTime Config
.reload = reload,
.load_pri = AST_MODPRI_REALTIME_DRIVER,
);
-
diff --git a/agi/Makefile b/agi/Makefile
index 8a2186001..c3129868b 100644
--- a/agi/Makefile
+++ b/agi/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for AGI-related stuff
#
# Copyright (C) 1999-2006, Digium
diff --git a/agi/eagi-sphinx-test.c b/agi/eagi-sphinx-test.c
index 359360286..c7f6997c2 100644
--- a/agi/eagi-sphinx-test.c
+++ b/agi/eagi-sphinx-test.c
@@ -101,7 +101,7 @@ static int read_environment(void)
/* Load into normal environment */
setenv(buf, val, 1);
-
+
}
/* Never reached */
return 0;
@@ -163,7 +163,7 @@ static char *wait_result(void)
}
}
}
-
+
}
static char *run_command(char *command)
diff --git a/agi/eagi-test.c b/agi/eagi-test.c
index 7f24d1f23..28d38fc5b 100644
--- a/agi/eagi-test.c
+++ b/agi/eagi-test.c
@@ -50,7 +50,7 @@ static int read_environment(void)
/* Load into normal environment */
setenv(buf, val, 1);
-
+
}
/* Never reached */
return 0;
@@ -101,7 +101,7 @@ static char *wait_result(void)
}
}
}
-
+
}
static char *run_command(char *command)
diff --git a/agi/jukebox.agi b/agi/jukebox.agi
index 7bd9c10f9..0d05b45ee 100755
--- a/agi/jukebox.agi
+++ b/agi/jukebox.agi
@@ -265,12 +265,12 @@ MYCONTINUE:
my $cmdr = `ln -s $mp3 $link`;
chomp($cmdr);
print "Failed to create symlink to mp3: $cmdr\n" if $cmdr ne '';
-
+
print "EXEC MP3Player \"$link\"\n";
my $result = <STDIN>; &check_result($result);
`rm $link`;
-
+
if (!$MENUAFTERSONG) {
print "EXEC Playback \"$FESTIVALCACHE/jukebox_thankyou\"\n";
my $result = <STDIN>; &check_result($result);
diff --git a/apps/Makefile b/apps/Makefile
index 87e45bb99..13c77abf0 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for PBX applications
#
# Copyright (C) 1999-2006, Digium, Inc.
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index 640f553a4..e73795aae 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -29,7 +29,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page adsi.conf adsi.conf
* \verbinclude adsi.conf.sample
*/
@@ -321,7 +321,7 @@ static int goto_line(char *buf, char *name, int id, char *args, struct adsi_scri
else if (!strcasecmp(page, "COMM"))
cmd = 0x80;
else {
- ast_log(LOG_WARNING, "Expecting either 'INFO' or 'COMM' page, got got '%s' at line %d of %s\n", page, lineno, script);
+ ast_log(LOG_WARNING, "Expecting either 'INFO' or 'COMM' page, got '%s' at line %d of %s\n", page, lineno, script);
return 0;
}
@@ -935,7 +935,7 @@ static const struct adsi_key_cmd kcmds[] = {
};
static const struct adsi_key_cmd opcmds[] = {
-
+
/* 1 - Branch on event -- handled specially */
{ "SHOWKEYS", 2, showkeys },
/* Display Control */
@@ -1111,7 +1111,7 @@ static int adsi_process(struct adsi_script *state, char *buf, const char *script
tmp[7] = '\0';
}
/* Setup initial stuff */
- state->key->retstr[0] = 128;
+ state->key->retstr[0] = 0x80;
/* 1 has the length */
state->key->retstr[2] = state->key->id;
/* Put the Full name in */
@@ -1147,7 +1147,7 @@ static int adsi_process(struct adsi_script *state, char *buf, const char *script
break;
}
/* Setup sub */
- state->sub->data[0] = 130;
+ state->sub->data[0] = 0x82;
/* 1 is the length */
state->sub->data[2] = 0x0; /* Clear extensibility bit */
state->sub->datalen = 3;
@@ -1264,7 +1264,7 @@ static int adsi_process(struct adsi_script *state, char *buf, const char *script
/* Something bad happened */
break;
}
- disp->data[0] = 129;
+ disp->data[0] = 0x81;
disp->data[1] = disp->datalen - 2;
disp->data[2] = ((lrci & 0x3) << 6) | disp->id;
disp->data[3] = wi;
@@ -1575,7 +1575,7 @@ static int adsi_prog(struct ast_channel *chan, const char *script)
static int adsi_exec(struct ast_channel *chan, const char *data)
{
int res = 0;
-
+
if (ast_strlen_zero(data))
data = "asterisk.adsi";
@@ -1600,8 +1600,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index a637bbe5f..ef8b95ec8 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -457,11 +457,17 @@ struct agents_cfg {
struct ao2_container *agents;
};
+static const char *agent_type_blacklist[] = {
+ "general",
+ "agents",
+ NULL,
+};
+
static struct aco_type agent_type = {
.type = ACO_ITEM,
.name = "agent-id",
- .category_match = ACO_BLACKLIST,
- .category = "^(general|agents)$",
+ .category_match = ACO_BLACKLIST_ARRAY,
+ .category = (const char *)agent_type_blacklist,
.item_alloc = agent_cfg_alloc,
.item_find = agent_cfg_find,
.item_offset = offsetof(struct agents_cfg, agents),
@@ -473,8 +479,8 @@ static struct aco_type *agent_types[] = ACO_TYPES(&agent_type);
static struct aco_type general_type = {
.type = ACO_GLOBAL,
.name = "global",
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
static struct aco_file agents_conf = {
diff --git a/apps/app_amd.c b/apps/app_amd.c
index 9a2e5f31f..273ca3770 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -32,7 +32,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page amd.conf amd.conf
* \verbinclude amd.conf.sample
*/
@@ -316,7 +316,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
if (dspsilence > 0) {
silenceDuration = dspsilence;
-
+
if (silenceDuration >= betweenWordsSilence) {
if (currentState != STATE_IN_SILENCE ) {
ast_verb(3, "AMD: Channel [%s]. Changed state to STATE_IN_SILENCE\n", ast_channel_name(chan));
@@ -338,7 +338,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
res = 1;
break;
}
-
+
if (silenceDuration >= afterGreetingSilence && inGreeting == 1) {
ast_verb(3, "AMD: Channel [%s]. HUMAN: silenceDuration:%d afterGreetingSilence:%d\n",
ast_channel_name(chan), silenceDuration, afterGreetingSilence);
@@ -348,7 +348,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
res = 1;
break;
}
-
+
} else {
consecutiveVoiceDuration += framelength;
voiceDuration += framelength;
@@ -397,12 +397,12 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
inInitialSilence = 0;
inGreeting = 1;
}
-
+
}
}
ast_frfree(f);
}
-
+
if (!res) {
/* It took too long to get a frame back. Giving up. */
ast_verb(3, "AMD: Channel [%s]. Too long...\n", ast_channel_name(chan));
@@ -507,8 +507,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index 53d0e484c..f06257613 100644
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -103,7 +103,7 @@ static const char app[] = "Authenticate";
</syntax>
<description>
<para>This application asks the caller to enter a given password in order to continue dialplan execution.</para>
- <para>If the password begins with the <literal>/</literal> character,
+ <para>If the password begins with the <literal>/</literal> character,
it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file.</para>
<para>When using a database key, the value associated with the key can be anything.</para>
<para>Users have three attempts to authenticate before the channel is hung up.</para>
@@ -158,7 +158,7 @@ static int auth_exec(struct ast_channel *chan, const char *data)
} else {
prompt = "agent-pass";
}
-
+
/* Start asking for password */
for (retries = 0; retries < 3; retries++) {
if ((res = ast_app_getdata(chan, prompt, passwd, maxdigits, 0)) < 0)
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 84200db4f..0b5f89e03 100644
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -93,7 +93,7 @@ static const char app[] = "ChanIsAvail";
</variable>
<variable name="AVAILCAUSECODE">
<para>The cause code returned when requesting the channel</para>
- </variable>
+ </variable>
</variablelist>
</description>
</application>
@@ -173,7 +173,7 @@ static int chanavail_exec(struct ast_channel *chan, const char *data)
ast_str_append(&tmp_availstat, 0, "%s%s", ast_str_strlen(tmp_availstat) ? "&" : "", tmp);
if ((inuse <= 1) && (tempchan = ast_request(tech, ast_channel_nativeformats(chan), NULL, chan, number, &status))) {
ast_str_append(&tmp_availchan, 0, "%s%s", ast_str_strlen(tmp_availchan) ? "&" : "", ast_channel_name(tempchan));
-
+
snprintf(tmp, sizeof(tmp), "%s/%s", tech, number);
ast_str_append(&tmp_availorig, 0, "%s%s", ast_str_strlen(tmp_availorig) ? "&" : "", tmp);
@@ -212,4 +212,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Check channel availability");
-
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index aefe94054..b78ebcb0f 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -101,7 +101,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<option name="e">
<argument name="ext" required="true" />
<para>Enable <emphasis>enforced</emphasis> mode, so the spying channel can
- only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
+ only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
list.</para>
</option>
<option name="E">
@@ -113,7 +113,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
listed in <replaceable>grp</replaceable> matches one or more groups from the
<variable>SPYGROUP</variable> variable set on the channel to be spied upon.</para>
</argument>
- <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
+ <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
either a single group or a colon-delimited list of groups, such
as <literal>sales:support:accounting</literal>.</para></note>
</option>
@@ -135,7 +135,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
selected channel name.</para>
</option>
<option name="r">
- <para>Record the session to the monitor spool directory. An optional base for the filename
+ <para>Record the session to the monitor spool directory. An optional base for the filename
may be specified. The default is <literal>chanspy</literal>.</para>
<argument name="basename" />
</option>
@@ -152,7 +152,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</option>
<option name="v">
<argument name="value" />
- <para>Adjust the initial volume in the range from <literal>-4</literal>
+ <para>Adjust the initial volume in the range from <literal>-4</literal>
to <literal>4</literal>. A negative value refers to a quieter setting.</para>
</option>
<option name="w">
@@ -177,11 +177,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
name of the last channel that was spied on will be stored
in the <variable>SPY_CHANNEL</variable> variable.</para>
</option>
- </optionlist>
+ </optionlist>
</parameter>
</syntax>
<description>
- <para>This application is used to listen to the audio from an Asterisk channel. This includes the audio
+ <para>This application is used to listen to the audio from an Asterisk channel. This includes the audio
coming in and out of the channel being spied on. If the <literal>chanprefix</literal> parameter is specified,
only channels beginning with this string will be spied upon.</para>
<para>While spying, the following actions may be performed:</para>
@@ -246,7 +246,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<option name="e">
<argument name="ext" required="true" />
<para>Enable <emphasis>enforced</emphasis> mode, so the spying channel can
- only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
+ only monitor extensions whose name is in the <replaceable>ext</replaceable> : delimited
list.</para>
</option>
<option name="E">
@@ -258,7 +258,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
listed in <replaceable>grp</replaceable> matches one or more groups from the
<variable>SPYGROUP</variable> variable set on the channel to be spied upon.</para>
</argument>
- <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
+ <note><para>both <replaceable>grp</replaceable> and <variable>SPYGROUP</variable> can contain
either a single group or a colon-delimited list of groups, such
as <literal>sales:support:accounting</literal>.</para></note>
</option>
@@ -280,7 +280,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
selected channel name.</para>
</option>
<option name="r">
- <para>Record the session to the monitor spool directory. An optional base for the filename
+ <para>Record the session to the monitor spool directory. An optional base for the filename
may be specified. The default is <literal>chanspy</literal>.</para>
<argument name="basename" />
</option>
@@ -293,7 +293,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</option>
<option name="v">
<argument name="value" />
- <para>Adjust the initial volume in the range from <literal>-4</literal>
+ <para>Adjust the initial volume in the range from <literal>-4</literal>
to <literal>4</literal>. A negative value refers to a quieter setting.</para>
</option>
<option name="w">
@@ -318,13 +318,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
name of the last channel that was spied on will be stored
in the <variable>SPY_CHANNEL</variable> variable.</para>
</option>
- </optionlist>
+ </optionlist>
</parameter>
</syntax>
<description>
- <para>This application is used to listen to the audio from an Asterisk channel. This includes
+ <para>This application is used to listen to the audio from an Asterisk channel. This includes
the audio coming in and out of the channel being spied on. Only channels created by outgoing calls for the
- specified extension will be selected for spying. If the optional context is not supplied,
+ specified extension will be selected for spying. If the optional context is not supplied,
the current channel's context will be used.</para>
<para>While spying, the following actions may be performed:</para>
<para> - Dialing <literal>#</literal> cycles the volume level.</para>
@@ -1022,7 +1022,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags,
num_mygroups = ast_app_separate_args(dup_mygroup, ':', mygroups,
ARRAY_LEN(mygroups));
- /* Before dahdi scan was part of chanspy, it would use the "GROUP" variable
+ /* Before dahdi scan was part of chanspy, it would use the "GROUP" variable
* rather than "SPYGROUP", this check is done to preserve expected behavior */
ast_autochan_channel_lock(autochan);
if (ast_test_flag(flags, OPTION_DAHDI_SCAN)) {
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index c27fd1c52..9e1acd52c 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -221,7 +221,7 @@ static int controlplayback_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
return -1;
}
-
+
tmp = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, tmp);
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index bd0a58fca..28cf6d19b 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -21,7 +21,7 @@
* \brief Execute an ISDN RAS
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -138,7 +138,7 @@ static void run_ras(struct ast_channel *chan, char *args)
int signalled = 0;
struct dahdi_bufferinfo savebi;
int x;
-
+
res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_BUFINFO, &savebi);
if(res) {
ast_log(LOG_WARNING, "Unable to check buffer policy on channel %s\n", ast_channel_name(chan));
@@ -168,7 +168,7 @@ static void run_ras(struct ast_channel *chan, char *args)
if (WIFEXITED(status)) {
ast_verb(3, "RAS on %s terminated with status %d\n", ast_channel_name(chan), WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
- ast_verb(3, "RAS on %s terminated with signal %d\n",
+ ast_verb(3, "RAS on %s terminated with signal %d\n",
ast_channel_name(chan), WTERMSIG(status));
} else {
ast_verb(3, "RAS on %s terminated weirdly.\n", ast_channel_name(chan));
@@ -194,11 +194,11 @@ static int dahdiras_exec(struct ast_channel *chan, const char *data)
char *args;
struct dahdi_params dahdip;
- if (!data)
+ if (!data)
data = "";
args = ast_strdupa(data);
-
+
/* Answer the channel if it's not up */
if (ast_channel_state(chan) != AST_STATE_UP)
ast_answer(chan);
@@ -223,7 +223,7 @@ static int dahdiras_exec(struct ast_channel *chan, const char *data)
return res;
}
-static int unload_module(void)
+static int unload_module(void)
{
return ast_unregister_application(app);
}
@@ -234,5 +234,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "DAHDI ISDN Remote Access Server");
-
-
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 9f77cd880..a37ff771a 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -402,7 +402,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</argument>
</option>
<option name="R">
- <para>Default: Indicate ringing to the calling party, even if the called party isn't actually ringing.
+ <para>Default: Indicate ringing to the calling party, even if the called party isn't actually ringing.
Allow interruption of the ringback if early media is received on the channel.</para>
</option>
<option name="S">
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index 1dcae7f73..f79ba82fe 100644
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -202,7 +202,7 @@ static int dictate_exec(struct ast_channel *chan, const char *data)
samples += ffactor;
ast_seekstream(fs, samples, SEEK_SET);
break;
-
+
default:
got = 0;
}
@@ -258,7 +258,7 @@ static int dictate_exec(struct ast_channel *chan, const char *data)
break;
}
}
-
+
} else if (f->frametype == AST_FRAME_VOICE) {
switch(mode) {
struct ast_frame *fr;
@@ -330,7 +330,7 @@ static int dictate_exec(struct ast_channel *chan, const char *data)
}
break;
}
-
+
}
ast_frfree(f);
@@ -356,4 +356,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Virtual Dictation Machine");
-
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 9cfcbf862..f644d9c68 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -49,9 +49,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</synopsis>
<syntax>
<parameter name="vm-context">
- <para>This is the context within voicemail.conf to use for the Directory. If not
- specified and <literal>searchcontexts=no</literal> in
- <filename>voicemail.conf</filename>, then <literal>default</literal>
+ <para>This is the context within voicemail.conf to use for the Directory. If not
+ specified and <literal>searchcontexts=no</literal> in
+ <filename>voicemail.conf</filename>, then <literal>default</literal>
will be assumed.</para>
</parameter>
<parameter name="dial-context" required="false">
@@ -107,7 +107,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</option>
</optionlist>
<note><para>Only one of the <replaceable>f</replaceable>, <replaceable>l</replaceable>, or <replaceable>b</replaceable>
- options may be specified. <emphasis>If more than one is specified</emphasis>, then Directory will act as
+ options may be specified. <emphasis>If more than one is specified</emphasis>, then Directory will act as
if <replaceable>b</replaceable> was specified. The number
of characters for the user to type defaults to <literal>3</literal>.</para></note>
@@ -366,7 +366,7 @@ static int select_item_seq(struct ast_channel *chan, struct directory_item **ite
if (!res)
res = ast_waitfordigit(chan, 3000);
ast_stopstream(chan);
-
+
if (res == '0') { /* operator selected */
goto_exten(chan, dialcontext, "o");
pbx_builtin_setvar_helper(chan, "DIRECTORY_RESULT", "OPERATOR");
@@ -934,7 +934,7 @@ static int directory_exec(struct ast_channel *chan, const char *data)
res = ast_stream_and_wait(chan, digits, AST_DIGIT_ANY);
}
if (!res) {
- res = ast_stream_and_wait(chan,
+ res = ast_stream_and_wait(chan,
which == FIRST ? "dir-first" :
which == LAST ? "dir-last" :
"dir-firstlast", AST_DIGIT_ANY);
diff --git a/apps/app_echo.c b/apps/app_echo.c
index 914607871..52bf7fb38 100644
--- a/apps/app_echo.c
+++ b/apps/app_echo.c
@@ -44,7 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</synopsis>
<syntax />
<description>
- <para>Echos back any media or DTMF frames read from the calling
+ <para>Echos back any media or DTMF frames read from the calling
channel back to itself. This will not echo CONTROL, MODEM, or NULL
frames. Note: If '#' detected application exits.</para>
<para>This application does not automatically answer and should be
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index b661a2ec9..2597d2ff2 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -151,8 +151,8 @@ struct gen_state {
int sample_queue;
};
-static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
- int *eivr_events_fd, int *eivr_commands_fd, int *eivr_errors_fd,
+static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
+ int *eivr_events_fd, int *eivr_commands_fd, int *eivr_errors_fd,
const struct ast_str *args, const struct ast_flags flags);
static void send_eivr_event(FILE *handle, const char event, const char *data,
@@ -307,7 +307,7 @@ static void ast_eivr_getvariable(struct ast_channel *chan, char *data, char *out
char *inbuf, *variable;
const char *value;
int j;
- struct ast_str *newstring = ast_str_alloca(outbuflen);
+ struct ast_str *newstring = ast_str_alloca(outbuflen);
outbuf[0] = '\0';
@@ -320,7 +320,7 @@ static void ast_eivr_getvariable(struct ast_channel *chan, char *data, char *out
}
break;
}
-
+
ast_channel_lock(chan);
if (!(value = pbx_builtin_getvar_helper(chan, variable))) {
value = "";
@@ -410,7 +410,7 @@ static int app_exec(struct ast_channel *chan, const char *data)
char *buf;
int j;
- char *s, **app_args, *e;
+ char *s, **app_args, *e;
struct ast_str *comma_delim_args = ast_str_alloca(100);
AST_DECLARE_APP_ARGS(eivr_args,
@@ -472,7 +472,7 @@ static int app_exec(struct ast_channel *chan, const char *data)
if (ast_test_flag(&flags, run_dead)) {
ast_verb(4, "run_dead is set\n");
}
-
+
if (!(ast_test_flag(&flags, noanswer))) {
ast_verb(3, "Answering channel and starting generator\n");
if (ast_channel_state(chan) != AST_STATE_UP) {
@@ -541,18 +541,18 @@ static int app_exec(struct ast_channel *chan, const char *data)
ast_chan_log(LOG_ERROR, chan, "Could not create pipe for child errors: %s\n", strerror(errno));
goto exit;
}
-
+
pid = ast_safe_fork(0);
if (pid < 0) {
ast_log(LOG_ERROR, "Failed to fork(): %s\n", strerror(errno));
goto exit;
}
-
+
if (!pid) {
/* child process */
if (ast_opt_high_priority)
ast_set_priority(0);
-
+
dup2(child_stdin[0], STDIN_FILENO);
dup2(child_stdout[1], STDOUT_FILENO);
dup2(child_stderr[1], STDERR_FILENO);
@@ -603,8 +603,8 @@ static int app_exec(struct ast_channel *chan, const char *data)
return res;
}
-static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
- int *eivr_events_fd, int *eivr_commands_fd, int *eivr_errors_fd,
+static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
+ int *eivr_events_fd, int *eivr_commands_fd, int *eivr_errors_fd,
const struct ast_str *args, const struct ast_flags flags)
{
struct playlist_entry *entry;
@@ -617,7 +617,7 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
int res = -1;
int test_available_fd = -1;
int hangup_info_sent = 0;
-
+
FILE *eivr_commands = NULL;
FILE *eivr_errors = NULL;
FILE *eivr_events = NULL;
@@ -638,7 +638,7 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
}
test_available_fd = open("/dev/null", O_RDONLY);
-
+
setvbuf(eivr_events, NULL, _IONBF, 0);
setvbuf(eivr_commands, NULL, _IONBF, 0);
if (eivr_errors) {
@@ -661,14 +661,14 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
break;
}
}
-
+
ready_fd = 0;
ms = 100;
errno = 0;
exception = 0;
-
+
rchan = ast_waitfor_nandfds(&chan, 1, waitfds, (eivr_errors_fd) ? 2 : 1, &exception, &ready_fd, &ms);
-
+
if (ast_channel_state(chan) == AST_STATE_UP && !AST_LIST_EMPTY(&u->finishlist)) {
AST_LIST_LOCK(&u->finishlist);
while ((entry = AST_LIST_REMOVE_HEAD(&u->finishlist, list))) {
@@ -677,7 +677,7 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
}
AST_LIST_UNLOCK(&u->finishlist);
}
-
+
if (ast_channel_state(chan) == AST_STATE_UP && !(ast_check_hangup(chan)) && rchan) {
/* the channel has something */
f = ast_read(chan);
@@ -717,12 +717,12 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
ast_frfree(f);
} else if (ready_fd == *eivr_commands_fd) {
char input[1024];
-
+
if (exception || (dup2(*eivr_commands_fd, test_available_fd) == -1) || feof(eivr_commands)) {
ast_chan_log(LOG_ERROR, chan, "Child process went away\n");
break;
}
-
+
if (!fgets(input, sizeof(input), eivr_commands)) {
continue;
}
@@ -871,7 +871,7 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
}
} else if (eivr_errors_fd && (ready_fd == *eivr_errors_fd)) {
char input[1024];
-
+
if (exception || feof(eivr_errors)) {
ast_chan_log(LOG_ERROR, chan, "Child process went away\n");
break;
@@ -879,15 +879,15 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
if (fgets(input, sizeof(input), eivr_errors)) {
ast_chan_log(LOG_NOTICE, chan, "stderr: %s\n", ast_strip(input));
}
- } else if ((ready_fd < 0) && ms) {
+ } else if ((ready_fd < 0) && ms) {
if (errno == 0 || errno == EINTR)
continue;
-
+
ast_chan_log(LOG_ERROR, chan, "Wait failed (%s)\n", strerror(errno));
break;
}
}
-
+
exit:
if (test_available_fd > -1) {
close(test_available_fd);
@@ -918,4 +918,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "External IVR Interface Application");
-
diff --git a/apps/app_fax.c b/apps/app_fax.c
index e2a7c2a4c..73aef1ce3 100644
--- a/apps/app_fax.c
+++ b/apps/app_fax.c
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Simple fax applications
- *
+ *
* 2007-2008, Dmitry Andrianov <asterisk@dima.spb.ru>
*
* Code based on original implementation by Steve Underwood <steveu@coppice.org>
@@ -102,12 +102,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<para>Filename of TIFF file save incoming fax</para>
</parameter>
<parameter name="c" required="false">
- <para>Makes the application behave as the calling machine</para>
+ <para>Makes the application behave as the calling machine</para>
<para>(Default behavior is as answering machine)</para>
</parameter>
</syntax>
<description>
- <para>Receives a FAX from the channel into the given filename
+ <para>Receives a FAX from the channel into the given filename
overwriting the file if it already exists.</para>
<para>File created will be in TIFF format.</para>
@@ -284,7 +284,7 @@ static int set_logging(logging_state_t *state)
int level = SPAN_LOG_WARNING + option_debug;
span_log_set_message_handler(state, span_message);
- span_log_set_level(state, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | level);
+ span_log_set_level(state, SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | level);
return 0;
}
@@ -330,7 +330,7 @@ static int fax_generator_generate(struct ast_channel *chan, void *data, int len,
fax_state_t *fax = (fax_state_t*) data;
uint8_t buffer[AST_FRIENDLY_OFFSET + MAX_SAMPLES * sizeof(uint16_t)];
int16_t *buf = (int16_t *) (buffer + AST_FRIENDLY_OFFSET);
-
+
struct ast_frame outf = {
.frametype = AST_FRAME_VOICE,
.subclass.format = ast_format_slin,
@@ -341,7 +341,7 @@ static int fax_generator_generate(struct ast_channel *chan, void *data, int len,
ast_log(LOG_WARNING, "Only generating %d samples, where %d requested\n", MAX_SAMPLES, samples);
samples = MAX_SAMPLES;
}
-
+
if ((len = fax_tx(fax, buf, samples)) > 0) {
outf.samples = len;
AST_FRAME_SET_BUFFER(&outf, buffer, AST_FRIENDLY_OFFSET, len * sizeof(int16_t));
@@ -781,14 +781,14 @@ static int transmit(fax_session *s)
/* Clear all channel variables which to be set by the application.
Pre-set status to error so in case of any problems we can just leave */
- pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "FAILED");
- pbx_builtin_setvar_helper(s->chan, "FAXERROR", "Channel problems");
+ pbx_builtin_setvar_helper(s->chan, "FAXSTATUS", "FAILED");
+ pbx_builtin_setvar_helper(s->chan, "FAXERROR", "Channel problems");
pbx_builtin_setvar_helper(s->chan, "FAXMODE", NULL);
pbx_builtin_setvar_helper(s->chan, "REMOTESTATIONID", NULL);
pbx_builtin_setvar_helper(s->chan, "FAXPAGES", "0");
pbx_builtin_setvar_helper(s->chan, "FAXRESOLUTION", NULL);
- pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", NULL);
+ pbx_builtin_setvar_helper(s->chan, "FAXBITRATE", NULL);
if (ast_channel_state(s->chan) != AST_STATE_UP) {
/* Shouldn't need this, but checking to see if channel is already answered
@@ -802,8 +802,8 @@ static int transmit(fax_session *s)
s->t38state = ast_channel_get_t38_state(s->chan);
if (s->t38state != T38_STATE_NEGOTIATED) {
- /* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */
- pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio");
+ /* T38 is not negotiated on the channel yet. First start regular transmission. If it switches to T38, follow */
+ pbx_builtin_setvar_helper(s->chan, "FAXMODE", "audio");
res = transmit_audio(s);
if (res > 0) {
/* transmit_audio reports switchover to T38. Update t38state */
@@ -815,7 +815,7 @@ static int transmit(fax_session *s)
}
if (s->t38state == T38_STATE_NEGOTIATED) {
- pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38");
+ pbx_builtin_setvar_helper(s->chan, "FAXMODE", "T38");
res = transmit_t38(s);
}
@@ -859,7 +859,7 @@ static int sndfax_exec(struct ast_channel *chan, const char *data)
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
-
+
session.caller_mode = TRUE;
if (args.options) {
@@ -928,7 +928,7 @@ static int rcvfax_exec(struct ast_channel *chan, const char *data)
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
-
+
session.caller_mode = FALSE;
if (args.options) {
@@ -975,8 +975,8 @@ static int unload_module(void)
{
int res;
- res = ast_unregister_application(app_sndfax_name);
- res |= ast_unregister_application(app_rcvfax_name);
+ res = ast_unregister_application(app_sndfax_name);
+ res |= ast_unregister_application(app_rcvfax_name);
return res;
}
@@ -1000,5 +1000,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Simple FAX Application",
.load = load_module,
.unload = unload_module,
);
-
-
diff --git a/apps/app_festival.c b/apps/app_festival.c
index 7df8caf8a..0893e3be3 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -23,7 +23,7 @@
* \author Christos Ricudis <ricudis@itc.auth.gr>
*
* \extref The Festival Speech Synthesis System - http://www.cstr.ed.ac.uk/projects/festival/
- *
+ *
* \ingroup applications
*/
@@ -31,7 +31,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page festival.conf festival.conf
* \verbinclude festival.conf.sample
*/
@@ -198,7 +198,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
ast_answer(chan);
ast_stopstream(chan);
ast_indicate(chan, -1);
-
+
owriteformat = ao2_bump(ast_channel_writeformat(chan));
res = ast_set_write_format(chan, ast_format_slin);
if (res < 0) {
@@ -212,7 +212,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
myf.f.data.ptr = myf.frdata;
-
+
res = send_waveform_to_fd(waveform, length, fds[1]);
if (res >= 0) {
/* Order is important -- there's almost always going to be mp3... we want to prioritize the
@@ -308,8 +308,8 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
int strln;
int fdesc = -1;
char buffer[16384];
- int seekpos = 0;
- char *data;
+ int seekpos = 0;
+ char *data;
struct ast_config *cfg;
char *newfestivalcommand;
struct ast_flags config_flags = { 0 };
@@ -381,13 +381,13 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
newfestivalcommand[j] = '\0';
festivalcommand = newfestivalcommand;
}
-
+
if (args.interrupt && !strcasecmp(args.interrupt, "any"))
args.interrupt = AST_DIGIT_ANY;
ast_debug(1, "Text passed to festival server : %s\n", args.text);
/* Connect to local festival server */
-
+
fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (fd < 0) {
@@ -405,6 +405,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
if (serverhost == NULL) {
ast_log(LOG_WARNING, "festival_client: gethostbyname failed\n");
ast_config_destroy(cfg);
+ close(fd);
return -1;
}
memmove(&serv_addr.sin_addr, serverhost->h_addr, serverhost->h_length);
@@ -416,6 +417,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) {
ast_log(LOG_WARNING, "festival_client: connect to server failed\n");
ast_config_destroy(cfg);
+ close(fd);
return -1;
}
@@ -425,7 +427,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
MD5Final(MD5Res, &md5ctx);
MD5Hex[0] = '\0';
- /* Convert to HEX and look if there is any matching file in the cache
+ /* Convert to HEX and look if there is any matching file in the cache
directory */
for (i = 0; i < 16; i++) {
snprintf(koko, sizeof(koko), "%X", (unsigned)MD5Res[i]);
@@ -462,7 +464,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
ast_log(LOG_WARNING, "read() failed: %s\n", strerror(errno));
}
bigstring[strln] = 0;
- if (strcmp(bigstring, args.text) == 0) {
+ if (strcmp(bigstring, args.text) == 0) {
readcache = 1;
} else {
ast_log(LOG_WARNING, "Strings do not match\n");
@@ -485,7 +487,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
fflush(fs);
fclose(fs);
}
-
+
/* Write to cache and then pass it down */
if (writecache == 1) {
ast_debug(1, "Writing result to cache...\n");
@@ -499,7 +501,7 @@ static int festival_exec(struct ast_channel *chan, const char *vdata)
fd = open(cachefile, O_RDWR);
lseek(fd, seekpos, SEEK_SET);
}
-
+
ast_debug(1, "Passing data to channel...\n");
/* Read back info from server */
@@ -556,8 +558,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -576,4 +578,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Simple Festival Interface");
-
diff --git a/apps/app_flash.c b/apps/app_flash.c
index dbbad3332..0cbe1136e 100644
--- a/apps/app_flash.c
+++ b/apps/app_flash.c
@@ -21,10 +21,10 @@
* \brief App to flash a DAHDI trunk
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
-
+
/*** MODULEINFO
<depend>dahdi</depend>
<support_level>core</support_level>
@@ -83,7 +83,7 @@ static int flash_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "%s is not a DAHDI channel\n", ast_channel_name(chan));
return -1;
}
-
+
memset(&dahdip, 0, sizeof(dahdip));
res = ioctl(ast_channel_fd(chan, 0), DAHDI_GET_PARAMS, &dahdip);
if (!res) {
@@ -118,4 +118,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Flash channel application");
-
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 5f9e220b5..16fc044c3 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* A full-featured Find-Me/Follow-Me Application
- *
+ *
* Copyright (C) 2005-2006, BJ Weschke All Rights Reserved.
*
* BJ Weschke <bweschke@btwtech.com>
@@ -30,7 +30,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page followme.conf followme.conf
* \verbinclude followme.conf.sample
*/
@@ -334,15 +334,15 @@ static void init_profile(struct call_followme *f, int activate)
}
}
-
-
+
+
/*! \brief Set parameter in profile from configuration file */
static void profile_set_param(struct call_followme *f, const char *param, const char *val, int linenum, int failunknown)
{
- if (!strcasecmp(param, "musicclass") || !strcasecmp(param, "musiconhold") || !strcasecmp(param, "music"))
+ if (!strcasecmp(param, "musicclass") || !strcasecmp(param, "musiconhold") || !strcasecmp(param, "music"))
ast_copy_string(f->moh, val, sizeof(f->moh));
- else if (!strcasecmp(param, "context"))
+ else if (!strcasecmp(param, "context"))
ast_copy_string(f->context, val, sizeof(f->context));
else if (!strcasecmp(param, "takecall"))
ast_copy_string(f->takecall, val, sizeof(f->takecall));
@@ -350,15 +350,15 @@ static void profile_set_param(struct call_followme *f, const char *param, const
ast_copy_string(f->nextindp, val, sizeof(f->nextindp));
else if (!strcasecmp(param, "call-from-prompt") || !strcasecmp(param, "call_from_prompt"))
ast_copy_string(f->callfromprompt, val, sizeof(f->callfromprompt));
- else if (!strcasecmp(param, "followme-norecording-prompt") || !strcasecmp(param, "norecording_prompt"))
+ else if (!strcasecmp(param, "followme-norecording-prompt") || !strcasecmp(param, "norecording_prompt"))
ast_copy_string(f->norecordingprompt, val, sizeof(f->norecordingprompt));
- else if (!strcasecmp(param, "followme-options-prompt") || !strcasecmp(param, "options_prompt"))
+ else if (!strcasecmp(param, "followme-options-prompt") || !strcasecmp(param, "options_prompt"))
ast_copy_string(f->optionsprompt, val, sizeof(f->optionsprompt));
else if (!strcasecmp(param, "followme-pls-hold-prompt") || !strcasecmp(param, "pls_hold_prompt"))
ast_copy_string(f->plsholdprompt, val, sizeof(f->plsholdprompt));
- else if (!strcasecmp(param, "followme-status-prompt") || !strcasecmp(param, "status_prompt"))
+ else if (!strcasecmp(param, "followme-status-prompt") || !strcasecmp(param, "status_prompt"))
ast_copy_string(f->statusprompt, val, sizeof(f->statusprompt));
- else if (!strcasecmp(param, "followme-sorry-prompt") || !strcasecmp(param, "sorry_prompt"))
+ else if (!strcasecmp(param, "followme-sorry-prompt") || !strcasecmp(param, "sorry_prompt"))
ast_copy_string(f->sorryprompt, val, sizeof(f->sorryprompt));
else if (failunknown) {
if (linenum >= 0)
@@ -524,7 +524,7 @@ static int reload_followme(int reload)
numorder = atoi(tmp);
if (numorder < 0)
numorder = 0;
- } else
+ } else
numorder = 0;
} else {
timeout = 25;
@@ -533,7 +533,7 @@ static int reload_followme(int reload)
if (!numorder) {
idx = 1;
- AST_LIST_TRAVERSE(&f->numbers, nm, entry)
+ AST_LIST_TRAVERSE(&f->numbers, nm, entry)
idx++;
numorder = idx;
}
@@ -548,7 +548,7 @@ static int reload_followme(int reload)
var = var->next;
} /* End while(var) loop */
- if (!new)
+ if (!new)
ast_mutex_unlock(&f->lock);
else
AST_RWLIST_INSERT_HEAD(&followmes, f, entry);
@@ -586,7 +586,7 @@ static void clear_caller(struct findme_user *tmpuser)
tmpuser->ochan = NULL;
}
-static void clear_unanswered_calls(struct findme_user_listptr *findme_user_list)
+static void clear_unanswered_calls(struct findme_user_listptr *findme_user_list)
{
struct findme_user *tmpuser;
@@ -628,7 +628,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
char *callfromname;
char *pressbuttonname;
- /* ------------ wait_for_winner_channel start --------------- */
+ /* ------------ wait_for_winner_channel start --------------- */
callfromname = ast_strdupa(tpargs->callfromprompt);
pressbuttonname = ast_strdupa(tpargs->optionsprompt);
@@ -637,7 +637,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
for (;;) {
to = 1000;
- pos = 1;
+ pos = 1;
livechannels = 0;
watchers[0] = caller;
@@ -785,7 +785,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
ast_channel_publish_dial(caller, winner, NULL, "ANSWER");
publish_dial_end_event(caller, findme_user_list, winner, "CANCEL");
tmpuser->answered = 1;
- /* If call has been answered, then the eventual hangup is likely to be normal hangup */
+ /* If call has been answered, then the eventual hangup is likely to be normal hangup */
ast_channel_hangupcause_set(winner, AST_CAUSE_NORMAL_CLEARING);
ast_channel_hangupcause_set(caller, AST_CAUSE_NORMAL_CLEARING);
ast_verb(3, "Starting playback of %s\n", callfromname);
@@ -927,7 +927,7 @@ static struct ast_channel *wait_for_winner(struct findme_user_listptr *findme_us
f->subclass.integer, ast_channel_name(winner));
break;
}
- }
+ }
if (tmpuser && tmpuser->state == 3 && f->frametype == AST_FRAME_DTMF) {
int cmp_len;
@@ -1377,7 +1377,7 @@ static int app_exec(struct ast_channel *chan, const char *data)
ast_copy_string(targs->plsholdprompt, f->plsholdprompt, sizeof(targs->plsholdprompt));
ast_copy_string(targs->statusprompt, f->statusprompt, sizeof(targs->statusprompt));
ast_copy_string(targs->sorryprompt, f->sorryprompt, sizeof(targs->sorryprompt));
- /* Copy the numbers we're going to use into another list in case the master list should get modified
+ /* Copy the numbers we're going to use into another list in case the master list should get modified
(and locked) while we're trying to do a follow-me */
AST_LIST_HEAD_INIT_NOLOCK(&targs->cnumbers);
AST_LIST_TRAVERSE(&f->numbers, nm, entry) {
@@ -1577,8 +1577,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/apps/app_forkcdr.c b/apps/app_forkcdr.c
index d3c92a0fc..aa2e009d6 100644
--- a/apps/app_forkcdr.c
+++ b/apps/app_forkcdr.c
@@ -22,7 +22,7 @@
* \author Anthony Minessale anthmct@yahoo.com
*
* \note Development of this app Sponsored/Funded by TAAN Softworks Corp
- *
+ *
* \ingroup applications
*/
diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c
index 319ed3cb9..87a9701c3 100644
--- a/apps/app_getcpeid.c
+++ b/apps/app_getcpeid.c
@@ -21,7 +21,7 @@
* \brief Get ADSI CPE ID
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -106,7 +106,7 @@ static int cpeid_exec(struct ast_channel *chan, const char *idata)
cpeid[0], cpeid[1], cpeid[2], cpeid[3]);
else
strcpy(data[1], "CPEID Unknown");
- if (gotgeometry)
+ if (gotgeometry)
snprintf(data[2], 80, "Geom: %dx%d, %d buttons", width, height, buttons);
else
strcpy(data[2], "Geometry unknown");
diff --git a/apps/app_ices.c b/apps/app_ices.c
index d0fdf5cf1..b52c1517d 100644
--- a/apps/app_ices.c
+++ b/apps/app_ices.c
@@ -21,7 +21,7 @@
* \brief Stream to an icecast server via ICES (see contrib/asterisk-ices.xml)
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* ICES - http://www.icecast.org/ices.php
*
* \ingroup applications
@@ -30,7 +30,7 @@
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -79,7 +79,7 @@ static int icesencode(char *filename, int fd)
int res;
res = ast_safe_fork(0);
- if (res < 0)
+ if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res) {
return res;
@@ -90,8 +90,8 @@ static int icesencode(char *filename, int fd)
dup2(fd, STDIN_FILENO);
ast_close_fds_above_n(STDERR_FILENO);
- /* Most commonly installed in /usr/local/bin
- * But many places has it in /usr/bin
+ /* Most commonly installed in /usr/local/bin
+ * But many places has it in /usr/bin
* As a last-ditch effort, try to use PATH
*/
execl(path_LOCAL "ices2", "ices", filename, SENTINEL);
@@ -115,7 +115,6 @@ static int ices_exec(struct ast_channel *chan, const char *data)
int fds[2];
int ms = -1;
int pid = -1;
- int flags;
struct ast_format *oreadformat;
struct ast_frame *f;
char filename[256]="";
@@ -125,19 +124,18 @@ static int ices_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "ICES requires an argument (configfile.xml)\n");
return -1;
}
-
+
if (pipe(fds)) {
ast_log(LOG_WARNING, "Unable to create pipe\n");
return -1;
}
- flags = fcntl(fds[1], F_GETFL);
- fcntl(fds[1], F_SETFL, flags | O_NONBLOCK);
-
+ ast_fd_set_flags(fds[1], O_NONBLOCK);
+
ast_stopstream(chan);
if (ast_channel_state(chan) != AST_STATE_UP)
res = ast_answer(chan);
-
+
if (res) {
close(fds[0]);
close(fds[1]);
@@ -158,10 +156,10 @@ static int ices_exec(struct ast_channel *chan, const char *data)
ast_copy_string(filename, (char *) data, sizeof(filename));
else
snprintf(filename, sizeof(filename), "%s/%s", ast_config_AST_CONFIG_DIR, (char *)data);
- /* Placeholder for options */
+ /* Placeholder for options */
c = strchr(filename, '|');
if (c)
- *c = '\0';
+ *c = '\0';
res = icesencode(filename, fds[0]);
if (res >= 0) {
pid = res;
@@ -216,4 +214,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Encode and Stream via icecast and ices");
-
diff --git a/apps/app_image.c b/apps/app_image.c
index 4218917b2..bc2d6391e 100644
--- a/apps/app_image.c
+++ b/apps/app_image.c
@@ -21,14 +21,14 @@
* \brief App to transmit an image
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -92,7 +92,7 @@ static int sendimage_exec(struct ast_channel *chan, const char *data)
} else {
pbx_builtin_setvar_helper(chan, "SENDIMAGESTATUS", "FAILURE");
}
-
+
return 0;
}
@@ -107,4 +107,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Image Transmission Application");
-
diff --git a/apps/app_ivrdemo.c b/apps/app_ivrdemo.c
index de59fbd70..4e57892e5 100644
--- a/apps/app_ivrdemo.c
+++ b/apps/app_ivrdemo.c
@@ -21,7 +21,7 @@
* \brief IVR Demo application
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -64,7 +64,7 @@ static int ivr_demo_func(struct ast_channel *chan, void *data)
return 0;
}
-AST_IVR_DECLARE_MENU(ivr_submenu, "IVR Demo Sub Menu", 0,
+AST_IVR_DECLARE_MENU(ivr_submenu, "IVR Demo Sub Menu", 0,
{
{ "s", AST_ACTION_BACKGROUND, "demo-abouttotry" },
{ "s", AST_ACTION_WAITOPTION },
@@ -79,7 +79,7 @@ AST_IVR_DECLARE_MENU(ivr_submenu, "IVR Demo Sub Menu", 0,
{ NULL }
});
-AST_IVR_DECLARE_MENU(ivr_demo, "IVR Demo Main Menu", 0,
+AST_IVR_DECLARE_MENU(ivr_demo, "IVR Demo Main Menu", 0,
{
{ "s", AST_ACTION_BACKGROUND, "demo-congrats" },
{ "g", AST_ACTION_BACKGROUND, "demo-instruct" },
@@ -98,12 +98,12 @@ static int skel_exec(struct ast_channel *chan, const char *data)
{
int res=0;
char *tmp;
-
+
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
-
+
tmp = ast_strdupa(data);
/* Do our thing here */
@@ -112,7 +112,7 @@ static int skel_exec(struct ast_channel *chan, const char *data)
res = ast_answer(chan);
if (!res)
res = ast_ivr_menu_run(chan, &ivr_demo, tmp);
-
+
return res;
}
@@ -127,4 +127,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "IVR Demo Application");
-
diff --git a/apps/app_jack.c b/apps/app_jack.c
index 8d404318b..9c89298c4 100644
--- a/apps/app_jack.c
+++ b/apps/app_jack.c
@@ -1052,4 +1052,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "JACK Interface");
-
diff --git a/apps/app_macro.c b/apps/app_macro.c
index ab80fbc38..5c50a9f40 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -21,7 +21,7 @@
* \brief Dial plan macro Implementation
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -274,16 +274,16 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION"))) {
sscanf(s, "%30d", &maxdepth);
}
-
+
/* Count how many levels deep the rabbit hole goes */
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH"))) {
sscanf(s, "%30d", &depth);
}
-
+
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
if (strcmp(ast_channel_exten(chan), "h") == 0)
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
-
+
if ((inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP"))) {
sscanf(inhangupc, "%30d", &inhangup);
}
@@ -371,7 +371,7 @@ static int _macro_exec(struct ast_channel *chan, const char *data, int exclusive
save_macro_priority = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY"));
snprintf(pc, sizeof(pc), "%d", oldpriority);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", pc);
-
+
save_macro_offset = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"));
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
@@ -612,7 +612,7 @@ static int macroexclusive_exec(struct ast_channel *chan, const char *data)
return _macro_exec(chan, data, 1);
}
-static int macroif_exec(struct ast_channel *chan, const char *data)
+static int macroif_exec(struct ast_channel *chan, const char *data)
{
char *expr = NULL, *label_a = NULL, *label_b = NULL;
int res = 0;
@@ -628,14 +628,14 @@ static int macroif_exec(struct ast_channel *chan, const char *data)
}
if (pbx_checkcondition(expr))
res = macro_exec(chan, label_a);
- else if (label_b)
+ else if (label_b)
res = macro_exec(chan, label_b);
} else
ast_log(LOG_WARNING, "Invalid Syntax.\n");
return res;
}
-
+
static int macro_exit_exec(struct ast_channel *chan, const char *data)
{
return MACRO_EXIT_RESULT;
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 1d3c324c2..18c2bd6c8 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -25,7 +25,7 @@
*
* \author Mark Spencer <markster@digium.com>
* \author (SLA) Russell Bryant <russell@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -33,7 +33,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page meetme.conf meetme.conf
* \verbinclude meetme.conf.sample
*/
@@ -698,7 +698,7 @@ enum {
CONFFLAG_TALKER = (1 << 4),
/*! If set there will be no enter or leave sounds */
CONFFLAG_QUIET = (1 << 5),
- /*! If set, when user joins the conference, they will be told the number
+ /*! If set, when user joins the conference, they will be told the number
* of users that are already in */
CONFFLAG_ANNOUNCEUSERCOUNT = (1 << 6),
/*! Set to run AGI Script in Background */
@@ -726,10 +726,10 @@ enum {
CONFFLAG_ALWAYSPROMPT = (1 << 20),
/*! If set, treat talking users as muted users */
CONFFLAG_OPTIMIZETALKER = (1 << 21),
- /*! If set, won't speak the extra prompt when the first person
+ /*! If set, won't speak the extra prompt when the first person
* enters the conference */
CONFFLAG_NOONLYPERSON = (1 << 22),
- /*! If set, user will be asked to record name on entry of conference
+ /*! If set, user will be asked to record name on entry of conference
* without review */
CONFFLAG_INTROUSERNOREVIEW = (1 << 23),
/*! If set, the user will be initially self-muted */
@@ -744,7 +744,7 @@ enum {
CONFFLAG_DURATION_LIMIT = (1 << 30),
};
-/* These flags are defined separately because we ran out of bits that an enum can be used to represent.
+/* These flags are defined separately because we ran out of bits that an enum can be used to represent.
If you add new flags, be sure to do it in the same way that these are. */
/*! Do not write any audio to this channel until the state is up. */
#define CONFFLAG_NO_AUDIO_UNTIL_UP (1ULL << 31)
@@ -945,9 +945,9 @@ struct sla_trunk_ref;
struct sla_station {
AST_RWLIST_ENTRY(sla_station) entry;
AST_DECLARE_STRING_FIELDS(
- AST_STRING_FIELD(name);
- AST_STRING_FIELD(device);
- AST_STRING_FIELD(autocontext);
+ AST_STRING_FIELD(name);
+ AST_STRING_FIELD(device);
+ AST_STRING_FIELD(autocontext);
);
AST_LIST_HEAD_NOLOCK(, sla_trunk_ref) trunks;
struct ast_dial *dial;
@@ -985,7 +985,7 @@ struct sla_trunk {
AST_DECLARE_STRING_FIELDS(
AST_STRING_FIELD(name);
AST_STRING_FIELD(device);
- AST_STRING_FIELD(autocontext);
+ AST_STRING_FIELD(autocontext);
);
AST_LIST_HEAD_NOLOCK(, sla_station_ref) stations;
/*! Number of stations that use this trunk */
@@ -1054,7 +1054,7 @@ struct sla_event {
AST_LIST_ENTRY(sla_event) entry;
};
-/*! \brief A station that failed to be dialed
+/*! \brief A station that failed to be dialed
* \note Only used by the SLA thread. */
struct sla_failed_station {
struct sla_station *station;
@@ -1108,7 +1108,7 @@ static struct {
* when in a conference */
static int audio_buffers;
-/*! \brief Map 'volume' levels from -5 through +5 into decibel (dB)
+/*! \brief Map 'volume' levels from -5 through +5 into decibel (dB)
* settings for channel drivers.
*
* \note these are not a straight linear-to-dB
@@ -1404,7 +1404,7 @@ static const char *istalking(int x)
return "(talking)";
else if (x < 0)
return "(unmonitored)";
- else
+ else
return "(not talking)";
}
@@ -1463,7 +1463,7 @@ static void tweak_volume(struct volume *vol, enum volume_action action)
{
switch (action) {
case VOL_UP:
- switch (vol->desired) {
+ switch (vol->desired) {
case 5:
break;
case 0:
@@ -1563,7 +1563,7 @@ static void conf_play(struct ast_channel *chan, struct ast_conference *conf, enu
AST_LIST_UNLOCK(&confs);
- if (!res)
+ if (!res)
ast_autoservice_stop(chan);
}
@@ -1618,7 +1618,7 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
AST_LIST_LOCK(&confs);
AST_LIST_TRAVERSE(&confs, cnf, list) {
- if (!strcmp(confno, cnf->confno))
+ if (!strcmp(confno, cnf->confno))
break;
}
@@ -1708,7 +1708,7 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
/* Reserve conference number in map */
if ((sscanf(cnf->confno, "%30d", &confno_int) == 1) && (confno_int >= 0 && confno_int < 1024))
conf_map[confno_int] = 1;
-
+
cnfout:
ao2_cleanup(cap_slin);
if (cnf)
@@ -1964,7 +1964,7 @@ static char *meetme_show_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
ast_test_flag64(&user->userflags, CONFFLAG_MONITOR) ? "(Listen only)" : "",
user->adminflags & ADMINFLAG_MUTED ? "(Admin Muted)" : user->adminflags & ADMINFLAG_SELFMUTED ? "(Muted)" : "",
user->adminflags & ADMINFLAG_T_REQUEST ? "(Request to Talk)" : "",
- istalking(user->talking), hr, min, sec);
+ istalking(user->talking), hr, min, sec);
} else {
ast_cli(a->fd, "%d!%s!%s!%s!%s!%s!%s!%s!%d!%02d:%02d:%02d\n",
user->user_no,
@@ -2009,13 +2009,13 @@ static char *meetme_cmd_helper(struct ast_cli_args *a)
/* Unlock */
ast_str_append(&cmdline, 0, ",l");
}
- } else if (strcasestr(a->argv[1], "mute")) {
+ } else if (strcasestr(a->argv[1], "mute")) {
if (strcasecmp(a->argv[1], "mute") == 0) {
/* Mute */
if (strcasecmp(a->argv[3], "all") == 0) {
ast_str_append(&cmdline, 0, ",N");
} else {
- ast_str_append(&cmdline, 0, ",M,%s", a->argv[3]);
+ ast_str_append(&cmdline, 0, ",M,%s", a->argv[3]);
}
} else {
/* Unmute */
@@ -2167,8 +2167,8 @@ static char *sla_show_trunks(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
"=== ==> BargeAllowed: %s\n"
"=== ==> HoldAccess: %s\n"
"=== ==> Stations ...\n",
- trunk->name, trunk->device,
- S_OR(trunk->autocontext, "(none)"),
+ trunk->name, trunk->device,
+ S_OR(trunk->autocontext, "(none)"),
ring_timeout,
trunk->barge_disabled ? "No" : "Yes",
sla_hold_str(trunk->hold_access));
@@ -2217,7 +2217,7 @@ static char *sla_show_stations(struct ast_cli_entry *e, int cmd, struct ast_cli_
return NULL;
}
- ast_cli(a->fd, "\n"
+ ast_cli(a->fd, "\n"
"=============================================================\n"
"=== Configured SLA Stations =================================\n"
"=============================================================\n"
@@ -2231,11 +2231,11 @@ static char *sla_show_stations(struct ast_cli_entry *e, int cmd, struct ast_cli_
ao2_lock(station);
if (station->ring_timeout) {
- snprintf(ring_timeout, sizeof(ring_timeout),
+ snprintf(ring_timeout, sizeof(ring_timeout),
"%u", station->ring_timeout);
}
if (station->ring_delay) {
- snprintf(ring_delay, sizeof(ring_delay),
+ snprintf(ring_delay, sizeof(ring_delay),
"%u", station->ring_delay);
}
ast_cli(a->fd, "=== ---------------------------------------------------------\n"
@@ -2247,7 +2247,7 @@ static char *sla_show_stations(struct ast_cli_entry *e, int cmd, struct ast_cli_
"=== ==> HoldAccess: %s\n"
"=== ==> Trunks ...\n",
station->name, station->device,
- S_OR(station->autocontext, "(none)"),
+ S_OR(station->autocontext, "(none)"),
ring_timeout, ring_delay,
sla_hold_str(station->hold_access));
AST_LIST_TRAVERSE(&station->trunks, trunk_ref, entry) {
@@ -2359,7 +2359,7 @@ static int conf_free(struct ast_conference *conf)
ast_cond_signal(&conf->announcelist_addition);
ast_mutex_unlock(&conf->announcelistlock);
pthread_join(conf->announcethread, NULL);
-
+
while ((item = AST_LIST_REMOVE_HEAD(&conf->announcelist, entry))) {
/* If it's a voicemail greeting file we don't want to remove it */
if (!item->vmrec){
@@ -2413,7 +2413,7 @@ static void conf_queue_dtmf(const struct ast_conference *conf,
ao2_iterator_destroy(&user_iter);
}
-static void sla_queue_event_full(enum sla_event_type type,
+static void sla_queue_event_full(enum sla_event_type type,
struct sla_trunk_ref *trunk_ref, struct sla_station *station, int lock)
{
struct sla_event *event;
@@ -3326,7 +3326,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
else
exitkeys = ast_strdupa("#"); /* Default */
}
-
+
if (ast_test_flag64(confflags, CONFFLAG_RECORDCONF)) {
if (!conf->recordingfilename) {
const char *var;
@@ -3378,29 +3378,29 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
ast_mutex_unlock(&conf->announcethreadlock);
time(&user->jointime);
-
+
user->timelimit = timelimit;
user->play_warning = play_warning;
user->warning_freq = warning_freq;
user->warning_sound = warning_sound;
- user->end_sound = end_sound;
-
+ user->end_sound = end_sound;
+
if (calldurationlimit > 0) {
time(&user->kicktime);
user->kicktime = user->kicktime + calldurationlimit;
}
-
+
if (ast_tvzero(user->start_time))
user->start_time = ast_tvnow();
time_left_ms = user->timelimit;
-
+
if (user->timelimit) {
nexteventts = ast_tvadd(user->start_time, ast_samp2tv(user->timelimit, 1000));
nexteventts = ast_tvsub(nexteventts, ast_samp2tv(user->play_warning, 1000));
}
if (conf->locked && (!ast_test_flag64(confflags, CONFFLAG_ADMIN))) {
- /* Sorry, but this conference is locked! */
+ /* Sorry, but this conference is locked! */
if (!ast_streamfile(chan, "conf-locked", ast_channel_language(chan)))
ast_waitstream(chan, "");
goto outrun;
@@ -3410,7 +3410,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
if (rt_schedule && conf->maxusers) {
if (conf->users >= conf->maxusers) {
- /* Sorry, but this confernce has reached the participant limit! */
+ /* Sorry, but this confernce has reached the participant limit! */
ast_mutex_unlock(&conf->playlock);
if (!ast_streamfile(chan, "conf-full", ast_channel_language(chan)))
ast_waitstream(chan, "");
@@ -3539,7 +3539,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
if (ast_test_flag64(confflags, CONFFLAG_ANNOUNCEUSERCOUNT) && conf->users > 1) {
int keepplaying = 1;
- if (conf->users == 2) {
+ if (conf->users == 2) {
if (!ast_streamfile(chan, "conf-onlyone", ast_channel_language(chan))) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
@@ -3548,7 +3548,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
else if (res == -1)
goto outrun;
}
- } else {
+ } else {
if (!ast_streamfile(chan, "conf-thereare", ast_channel_language(chan))) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
@@ -3569,7 +3569,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
ast_stopstream(chan);
if (res > 0)
keepplaying = 0;
- else if (res == -1)
+ else if (res == -1)
goto outrun;
}
}
@@ -3730,7 +3730,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
agifile = ast_strdupa(agifiledefault);
}
ast_channel_unlock(chan);
-
+
if (user->dahdichannel) {
/* Set CONFMUTE mode on DAHDI channel to mute DTMF tones */
x = 1;
@@ -3835,11 +3835,11 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
}
break;
}
-
+
to = -1;
if (user->timelimit) {
int minutes = 0, seconds = 0, remain = 0;
-
+
to = ast_tvdiff_ms(nexteventts, now);
if (to < 0) {
to = 0;
@@ -3848,9 +3848,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
if (time_left_ms < to) {
to = time_left_ms;
}
-
+
if (time_left_ms <= 0) {
- if (user->end_sound) {
+ if (user->end_sound) {
res = ast_streamfile(chan, user->end_sound, ast_channel_language(chan));
res = ast_waitstream(chan, "");
}
@@ -3861,10 +3861,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
}
break;
}
-
+
if (!to) {
- if (time_left_ms >= 5000) {
-
+ if (time_left_ms >= 5000) {
+
remain = (time_left_ms + 500) / 1000;
if (remain / 60 >= 1) {
minutes = remain / 60;
@@ -3872,11 +3872,11 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
} else {
seconds = remain;
}
-
+
/* force the time left to round up if appropriate */
if (user->warning_sound && user->play_warning) {
if (!strcmp(user->warning_sound, "timeleft")) {
-
+
res = ast_streamfile(chan, "vm-youhave", ast_channel_language(chan));
res = ast_waitstream(chan, "");
if (minutes) {
@@ -3997,7 +3997,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
ast_moh_stop(chan);
musiconhold = 0;
}
- if (!ast_test_flag64(confflags, CONFFLAG_QUIET) &&
+ if (!ast_test_flag64(confflags, CONFFLAG_QUIET) &&
!ast_test_flag64(confflags, CONFFLAG_MARKEDUSER)) {
if (!ast_streamfile(chan, "conf-placeintoconf", ast_channel_language(chan))) {
ast_waitstream(chan, "");
@@ -4013,7 +4013,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
if (!musiconhold) {
conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]);
musiconhold = 1;
- }
+ }
} else {
if (musiconhold) {
ast_moh_stop(chan);
@@ -4021,7 +4021,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
}
}
}
-
+
/* Leave if the last marked user left */
if (currentmarked == 0 && lastmarked != 0 && ast_test_flag64(confflags, CONFFLAG_MARKEDEXIT)) {
if (ast_test_flag64(confflags, CONFFLAG_KICK_CONTINUE)) {
@@ -4071,7 +4071,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
meetme_stasis_generate_msg(conf, chan, user, meetme_mute_type(), status_blob);
}
- if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
+ if ((user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
(user->adminflags & ADMINFLAG_T_REQUEST) && !(talkreq_manager)) {
RAII_VAR(struct ast_json *, status_blob, status_to_json(1), ast_json_unref);
@@ -4079,7 +4079,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
meetme_stasis_generate_msg(conf, chan, user, meetme_talk_request_type(), status_blob);
}
- if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
+ if (!(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) &&
!(user->adminflags & ADMINFLAG_T_REQUEST) && (talkreq_manager)) {
RAII_VAR(struct ast_json *, status_blob, status_to_json(0), ast_json_unref);
talkreq_manager = 0;
@@ -4095,7 +4095,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
/* If I have been kicked, exit the conference */
if (user->adminflags & ADMINFLAG_KICKME) {
/* You have been kicked. */
- if (!ast_test_flag64(confflags, CONFFLAG_QUIET) &&
+ if (!ast_test_flag64(confflags, CONFFLAG_QUIET) &&
!ast_streamfile(chan, "conf-kicked", ast_channel_language(chan))) {
ast_waitstream(chan, "");
}
@@ -4389,12 +4389,12 @@ bailoutandtrynormal:
if (musiconhold) {
ast_moh_stop(chan);
}
-
+
if (using_pseudo) {
close(fd);
} else {
/* Take out of conference */
- dahdic.chan = 0;
+ dahdic.chan = 0;
dahdic.confno = 0;
dahdic.confmode = 0;
if (ioctl(fd, DAHDI_SETCONF, &dahdic)) {
@@ -4436,7 +4436,7 @@ bailoutandtrynormal:
if (dsp) {
ast_dsp_free(dsp);
}
-
+
if (user->user_no) {
/* Only cleanup users who really joined! */
now = ast_tvnow();
@@ -4461,7 +4461,7 @@ bailoutandtrynormal:
}
}
/* Remove ourselves from the container */
- ao2_unlink(conf->usercontainer, user);
+ ao2_unlink(conf->usercontainer, user);
/* Change any states */
if (!conf->users) {
@@ -4772,7 +4772,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
ast_log(LOG_WARNING, "No DAHDI channel available for conference, user introduction disabled (is chan_dahdi loaded?)\n");
ast_clear_flag64(confflags, CONFFLAG_INTROUSER | CONFFLAG_INTROUSERNOREVIEW | CONFFLAG_INTROUSER_VMREC);
}
-
+
if (confflags && !cnf->chan &&
ast_test_flag64(confflags, CONFFLAG_RECORDCONF)) {
ast_log(LOG_WARNING, "No DAHDI channel available for conference, conference recording disabled (is chan_dahdi loaded?)\n");
@@ -4790,7 +4790,7 @@ static int count_exec(struct ast_channel *chan, const char *data)
struct ast_conference *conf;
int count;
char *localdata;
- char val[80] = "0";
+ char val[80] = "0";
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(confno);
AST_APP_ARG(varname);
@@ -4800,11 +4800,11 @@ static int count_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "MeetMeCount requires an argument (conference number)\n");
return -1;
}
-
+
localdata = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, localdata);
-
+
conf = find_conf(chan, args.confno, 0, 0, NULL, 0, 1, NULL);
if (conf) {
@@ -4856,13 +4856,13 @@ static int conf_exec(struct ast_channel *chan, const char *data)
} else {
notdata = data;
}
-
+
if (ast_channel_state(chan) != AST_STATE_UP)
ast_answer(chan);
info = ast_strdupa(notdata);
- AST_STANDARD_APP_ARGS(args, info);
+ AST_STANDARD_APP_ARGS(args, info);
if (args.confno) {
ast_copy_string(confno, args.confno, sizeof(confno));
@@ -4870,7 +4870,7 @@ static int conf_exec(struct ast_channel *chan, const char *data)
allowretry = 1;
}
}
-
+
if (args.pin)
ast_copy_string(the_pin, args.pin, sizeof(the_pin));
@@ -5018,12 +5018,12 @@ static int conf_exec(struct ast_channel *chan, const char *data)
}
if (!ast_strlen_zero(confno)) {
/* Check the validity of the conference */
- cnf = find_conf(chan, confno, 1, dynamic, the_pin,
+ cnf = find_conf(chan, confno, 1, dynamic, the_pin,
sizeof(the_pin), 1, &confflags);
if (!cnf) {
int too_early = 0;
- cnf = find_conf_realtime(chan, confno, 1, dynamic,
+ cnf = find_conf_realtime(chan, confno, 1, dynamic,
the_pin, sizeof(the_pin), 1, &confflags, &too_early, optargs);
if (rt_schedule && too_early)
allowretry = 0;
@@ -5131,7 +5131,7 @@ static int conf_exec(struct ast_channel *chan, const char *data)
/* No pin required */
allowretry = 0;
- /* For RealTime conferences without a pin
+ /* For RealTime conferences without a pin
* should still support loading options
*/
if (!ast_strlen_zero(cnf->useropts)) {
@@ -5150,7 +5150,7 @@ static int conf_exec(struct ast_channel *chan, const char *data)
if (cnf)
dispose_conf(cnf);
-
+
return res;
}
@@ -5214,7 +5214,7 @@ static int user_chan_cb(void *obj, void *args, int flags)
return 0;
}
-/*! \brief The MeetMeadmin application
+/*! \brief The MeetMeadmin application
MeetMeAdmin(confno, command, caller) */
static int admin_exec(struct ast_channel *chan, const char *data) {
@@ -5285,10 +5285,10 @@ static int admin_exec(struct ast_channel *chan, const char *data) {
}
switch (*args.command) {
- case 76: /* L: Lock */
+ case 76: /* L: Lock */
cnf->locked = 1;
break;
- case 108: /* l: Unlock */
+ case 108: /* l: Unlock */
cnf->locked = 0;
break;
case 75: /* K: kick all users */
@@ -5315,19 +5315,19 @@ static int admin_exec(struct ast_channel *chan, const char *data) {
}
break;
}
- case 77: /* M: Mute */
+ case 77: /* M: Mute */
user->adminflags |= ADMINFLAG_MUTED;
break;
case 78: /* N: Mute all (non-admin) users */
ao2_callback(cnf->usercontainer, OBJ_NODATA, user_set_muted_cb, &cnf);
- break;
- case 109: /* m: Unmute */
+ break;
+ case 109: /* m: Unmute */
user->adminflags &= ~(ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED | ADMINFLAG_T_REQUEST);
break;
case 110: /* n: Unmute all users */
ao2_callback(cnf->usercontainer, OBJ_NODATA, user_set_unmuted_cb, NULL);
break;
- case 107: /* k: Kick user */
+ case 107: /* k: Kick user */
user->adminflags |= ADMINFLAG_KICKME;
break;
case 118: /* v: Lower all users listen volume */
@@ -5380,7 +5380,7 @@ usernotfound:
return 0;
}
-/*! \brief The MeetMeChannelAdmin application
+/*! \brief The MeetMeChannelAdmin application
MeetMeChannelAdmin(channel, command) */
static int channel_admin_exec(struct ast_channel *chan, const char *data) {
char *params;
@@ -5395,7 +5395,7 @@ static int channel_admin_exec(struct ast_channel *chan, const char *data) {
ast_log(LOG_WARNING, "MeetMeChannelAdmin requires two arguments!\n");
return -1;
}
-
+
params = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, params);
@@ -5415,22 +5415,22 @@ static int channel_admin_exec(struct ast_channel *chan, const char *data) {
break;
}
}
-
+
if (!user) {
ast_log(LOG_NOTICE, "Specified user (%s) not found\n", args.channel);
AST_LIST_UNLOCK(&confs);
return 0;
}
-
+
/* perform the specified action */
switch (*args.command) {
- case 77: /* M: Mute */
+ case 77: /* M: Mute */
user->adminflags |= ADMINFLAG_MUTED;
break;
- case 109: /* m: Unmute */
+ case 109: /* m: Unmute */
user->adminflags &= ~ADMINFLAG_MUTED;
break;
- case 107: /* k: Kick user */
+ case 107: /* k: Kick user */
user->adminflags |= ADMINFLAG_KICKME;
break;
default: /* unknown command */
@@ -5439,7 +5439,7 @@ static int channel_admin_exec(struct ast_channel *chan, const char *data) {
}
ao2_ref(user, -1);
AST_LIST_UNLOCK(&confs);
-
+
return 0;
}
@@ -5638,7 +5638,7 @@ static int action_meetmelistrooms(struct mansession *s, const struct message *m)
markedusers,
hr, min, sec,
cnf->isdynamic ? "Dynamic" : "Static",
- cnf->locked ? "Yes" : "No");
+ cnf->locked ? "Yes" : "No");
}
AST_LIST_UNLOCK(&confs);
@@ -5706,7 +5706,7 @@ static void *recordthread(void *args)
s = ast_writefile(filename_buffer, cnf->recordingformat, NULL, flags, 0, AST_FILE_MODE);
oldrecordingfilename = filename_buffer;
}
-
+
f = ast_read(cnf->lchan);
if (!f) {
res = -1;
@@ -5737,7 +5737,7 @@ static void *recordthread(void *args)
cnf->recording = MEETME_RECORD_OFF;
if (s)
ast_closestream(s);
-
+
pthread_exit(0);
}
@@ -5822,25 +5822,25 @@ static void load_config_meetme(int reload)
if ((sscanf(val, "%30d", &fuzzystart) != 1)) {
ast_log(LOG_WARNING, "fuzzystart must be a number, not '%s'\n", val);
fuzzystart = 0;
- }
+ }
}
if ((val = ast_variable_retrieve(cfg, "general", "earlyalert"))) {
if ((sscanf(val, "%30d", &earlyalert) != 1)) {
ast_log(LOG_WARNING, "earlyalert must be a number, not '%s'\n", val);
earlyalert = 0;
- }
+ }
}
if ((val = ast_variable_retrieve(cfg, "general", "endalert"))) {
if ((sscanf(val, "%30d", &endalert) != 1)) {
ast_log(LOG_WARNING, "endalert must be a number, not '%s'\n", val);
endalert = 0;
- }
+ }
}
if ((val = ast_variable_retrieve(cfg, "general", "extendby"))) {
if ((sscanf(val, "%30d", &extendby) != 1)) {
ast_log(LOG_WARNING, "extendby must be a number, not '%s'\n", val);
extendby = 0;
- }
+ }
}
ast_config_destroy(cfg);
@@ -5911,12 +5911,12 @@ static struct sla_trunk_ref *sla_find_trunk_ref_byname(const struct sla_station
if (strcasecmp(trunk_ref->trunk->name, name))
continue;
- if ( (trunk_ref->trunk->barge_disabled
+ if ( (trunk_ref->trunk->barge_disabled
&& trunk_ref->state == SLA_TRUNK_STATE_UP) ||
- (trunk_ref->trunk->hold_stations
+ (trunk_ref->trunk->hold_stations
&& trunk_ref->trunk->hold_access == SLA_HOLD_PRIVATE
&& trunk_ref->state != SLA_TRUNK_STATE_ONHOLD_BYME) ||
- sla_check_station_hold_access(trunk_ref->trunk, station) )
+ sla_check_station_hold_access(trunk_ref->trunk, station) )
{
trunk_ref = NULL;
}
@@ -6021,7 +6021,7 @@ static enum ast_device_state sla_state_to_devstate(enum sla_trunk_state state)
return AST_DEVICE_UNKNOWN;
}
-static void sla_change_trunk_state(const struct sla_trunk *trunk, enum sla_trunk_state state,
+static void sla_change_trunk_state(const struct sla_trunk *trunk, enum sla_trunk_state state,
enum sla_which_trunk_refs inactive_only, const struct sla_trunk_ref *exclude)
{
struct sla_station *station;
@@ -6080,7 +6080,7 @@ static void *run_station(void *data)
ast_atomic_fetchadd_int((int *) &trunk_ref->trunk->active_stations, 1);
ast_str_set(&conf_name, 0, "SLA_%s", trunk_ref->trunk->name);
- ast_set_flag64(&conf_flags,
+ ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
answer_trunk_chan(trunk_ref->chan);
conf = build_conf(ast_str_buffer(conf_name), "", "", 0, 0, 1, trunk_ref->chan, NULL);
@@ -6188,7 +6188,7 @@ static int sla_check_timed_out_station(const struct sla_ringing_trunk *ringing_t
* \return a pointer to the selected ringing trunk, or NULL if none found
* \note Assumes that sla.lock is locked
*/
-static struct sla_ringing_trunk *sla_choose_ringing_trunk(struct sla_station *station,
+static struct sla_ringing_trunk *sla_choose_ringing_trunk(struct sla_station *station,
struct sla_trunk_ref **trunk_ref, int rm)
{
struct sla_trunk_ref *s_trunk_ref;
@@ -6216,7 +6216,7 @@ static struct sla_ringing_trunk *sla_choose_ringing_trunk(struct sla_station *st
break;
}
AST_LIST_TRAVERSE_SAFE_END;
-
+
if (ringing_trunk)
break;
}
@@ -6306,8 +6306,8 @@ static void sla_handle_dial_state_event(void)
AST_LIST_TRAVERSE_SAFE_END;
}
-/*! \brief Check to see if this station is already ringing
- * \note Assumes sla.lock is locked
+/*! \brief Check to see if this station is already ringing
+ * \note Assumes sla.lock is locked
*/
static int sla_check_ringing_station(const struct sla_station *station)
{
@@ -6377,13 +6377,13 @@ static int sla_ring_station(struct sla_ringing_trunk *ringing_trunk, struct sla_
}
res = ast_dial_run(dial, ringing_trunk->trunk->chan, 1);
-
+
/* Restore saved caller ID */
if (caller_is_saved) {
ast_party_caller_free(ast_channel_caller(ringing_trunk->trunk->chan));
ast_channel_caller_set(ringing_trunk->trunk->chan, &caller);
}
-
+
if (res != AST_DIAL_RESULT_TRYING) {
struct sla_failed_station *failed_station;
ast_dial_destroy(dial);
@@ -6439,7 +6439,7 @@ static struct sla_trunk_ref *sla_find_trunk_ref(const struct sla_station *statio
* \param ringing_trunk the trunk. If NULL, the highest priority ringing trunk will be used
* \return the number of ms left before the delay is complete, or INT_MAX if there is no delay
*/
-static int sla_check_station_delay(struct sla_station *station,
+static int sla_check_station_delay(struct sla_station *station,
struct sla_ringing_trunk *ringing_trunk)
{
RAII_VAR(struct sla_trunk_ref *, trunk_ref, NULL, ao2_cleanup);
@@ -6557,7 +6557,7 @@ static void sla_handle_hold_event(struct sla_event *event)
event->trunk_ref->state = SLA_TRUNK_STATE_ONHOLD_BYME;
ast_devstate_changed(AST_DEVICE_ONHOLD, AST_DEVSTATE_CACHABLE, "SLA:%s_%s",
event->station->name, event->trunk_ref->trunk->name);
- sla_change_trunk_state(event->trunk_ref->trunk, SLA_TRUNK_STATE_ONHOLD,
+ sla_change_trunk_state(event->trunk_ref->trunk, SLA_TRUNK_STATE_ONHOLD,
INACTIVE_TRUNK_REFS, event->trunk_ref);
if (event->trunk_ref->trunk->active_stations == 1) {
@@ -6715,7 +6715,7 @@ static int sla_calc_station_delays(unsigned int *timeout)
continue;
/* If there is no time left, then the station needs to start ringing.
- * Return non-zero so that an event will be queued up an event to
+ * Return non-zero so that an event will be queued up an event to
* make that happen. */
if (time_left <= 0) {
res = 1;
@@ -6953,8 +6953,8 @@ static void *dial_trunk(void *data)
}
snprintf(conf_name, sizeof(conf_name), "SLA_%s", trunk_ref->trunk->name);
- ast_set_flag64(&conf_flags,
- CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER |
+ ast_set_flag64(&conf_flags,
+ CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER |
CONFFLAG_PASS_DTMF | CONFFLAG_SLA_TRUNK);
conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan, NULL);
@@ -7144,7 +7144,7 @@ static int sla_station_exec(struct ast_channel *chan, const char *data)
trunk_ref->trunk->hold_stations = 0;
sla_change_trunk_state(trunk_ref->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
}
-
+
pbx_builtin_setvar_helper(chan, "SLASTATION_STATUS", "SUCCESS");
return 0;
@@ -7277,7 +7277,7 @@ static int sla_trunk_exec(struct ast_channel *chan, const char *data)
pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
return 0;
}
- ast_set_flag64(&conf_flags,
+ ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER | CONFFLAG_PASS_DTMF | CONFFLAG_NO_AUDIO_UNTIL_UP);
if (ast_test_flag(&opt_flags, SLA_TRUNK_OPT_MOH)) {
@@ -7386,9 +7386,9 @@ static void sla_station_destructor(void *obj)
char hint[AST_MAX_APP];
snprintf(exten, sizeof(exten), "%s_%s", station->name, trunk_ref->trunk->name);
snprintf(hint, sizeof(hint), "SLA:%s", exten);
- ast_context_remove_extension(station->autocontext, exten,
+ ast_context_remove_extension(station->autocontext, exten,
1, sla_registrar);
- ast_context_remove_extension(station->autocontext, hint,
+ ast_context_remove_extension(station->autocontext, hint,
PRIORITY_HINT, sla_registrar);
}
}
@@ -7738,7 +7738,7 @@ static int sla_build_station(struct ast_config *cfg, const char *cat)
char hint[AST_MAX_APP];
snprintf(exten, sizeof(exten), "%s_%s", station->name, trunk_ref->trunk->name);
snprintf(hint, sizeof(hint), "SLA:%s", exten);
- /* Extension for this line button
+ /* Extension for this line button
* exten => station1_line1,1,SLAStation(station1_line1) */
if (ast_add_extension(station->autocontext, 0 /* don't replace */, exten, 1,
NULL, NULL, slastation_app, ast_strdup(exten), ast_free_ptr, sla_registrar)) {
@@ -7746,7 +7746,7 @@ static int sla_build_station(struct ast_config *cfg, const char *cat)
"for trunk '%s'!\n", station->name);
return -1;
}
- /* Hint for this line button
+ /* Hint for this line button
* exten => station1_line1,hint,SLA:station1_line1 */
if (ast_add_extension(station->autocontext, 0 /* don't replace */, exten, PRIORITY_HINT,
NULL, NULL, hint, NULL, NULL, sla_registrar)) {
@@ -7988,7 +7988,7 @@ static int acf_meetme_info(struct ast_channel *chan, const char *cmd, char *data
ast_log(LOG_NOTICE, "Error: invalid keyword: '%s'\n", args.keyword);
snprintf(buf, len, "0");
} else if (result == -2) {
- ast_log(LOG_NOTICE, "Error: conference (%s) not found\n", args.confno);
+ ast_log(LOG_NOTICE, "Error: conference (%s) not found\n", args.confno);
snprintf(buf, len, "0");
}
@@ -8105,7 +8105,7 @@ static int meetme_data_provider_get(const struct ast_data_search *search,
continue;
}
- ao2_callback(cnf->usercontainer, OBJ_NODATA, user_add_provider_cb, data_meetme_users);
+ ao2_callback(cnf->usercontainer, OBJ_NODATA, user_add_provider_cb, data_meetme_users);
}
if (!ast_data_search_match(search, data_meetme)) {
@@ -8191,7 +8191,7 @@ AST_TEST_DEFINE(test_meetme_data_provider)
static int unload_module(void)
{
int res = 0;
-
+
ast_cli_unregister_multiple(cli_meetme, ARRAY_LEN(cli_meetme));
res = ast_manager_unregister("MeetmeMute");
res |= ast_manager_unregister("MeetmeUnmute");
@@ -8211,9 +8211,9 @@ static int unload_module(void)
ast_devstate_prov_del("Meetme");
ast_devstate_prov_del("SLA");
-
+
sla_destroy();
-
+
res |= ast_custom_function_unregister(&meetme_info_acf);
ast_unload_realtime("meetme");
@@ -8228,8 +8228,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -8279,4 +8279,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "MeetMe conference bri
.reload = reload,
.load_pri = AST_MODPRI_DEVSTATE_PROVIDER,
);
-
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c
index a3509581d..61a45eb7e 100644
--- a/apps/app_milliwatt.c
+++ b/apps/app_milliwatt.c
@@ -21,7 +21,7 @@
* \brief Digital Milliwatt Test
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index dcf0ee2fa..2c57e04dc 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -24,7 +24,7 @@
*
* A voicemail system in small building blocks, working together
* based on the Comedian Mail voicemail system (app_voicemail.c).
- *
+ *
* \par See also
* \arg \ref Config_minivm_examples
* \arg \ref App_minivm
@@ -32,10 +32,10 @@
* \ingroup applications
*
* \page App_minivm Asterisk Mini-voicemail - A minimal voicemail system
- *
+ *
* This is a minimal voicemail system, building blocks for something
* else. It is built for multi-language systems.
- * The current version is focused on accounts where voicemail is
+ * The current version is focused on accounts where voicemail is
* forwarded to users in e-mail. It's work in progress, with loosed ends hanging
* around from the old voicemail system and it's configuration.
*
@@ -64,19 +64,19 @@
* - General configuration in minivm.conf
* - Users in realtime or configuration file
* - Or configured on the command line with just the e-mail address
- *
+ *
* Voicemail accounts are identified by userid and domain
*
* Language codes are like setlocale - langcode_countrycode
* \note Don't use language codes like the rest of Asterisk, two letter countrycode. Use
- * language_country like setlocale().
- *
+ * language_country like setlocale().
+ *
* Examples:
* - Swedish, Sweden sv_se
* - Swedish, Finland sv_fi
* - English, USA en_us
* - English, GB en_gb
- *
+ *
* \par See also
* \arg \ref Config_minivm
* \arg \ref Config_minivm_examples
@@ -779,7 +779,7 @@ static int message_template_build(const char *name, struct ast_variable *var)
} else if (!strcasecmp(var->name, "charset")) {
ast_copy_string(template->charset, var->value, sizeof(template->charset));
} else if (!strcasecmp(var->name, "templatefile")) {
- if (template->body)
+ if (template->body)
ast_free(template->body);
template->body = message_template_parse_filebody(var->value);
if (!template->body) {
@@ -787,7 +787,7 @@ static int message_template_build(const char *name, struct ast_variable *var)
error++;
}
} else if (!strcasecmp(var->name, "messagebody")) {
- if (template->body)
+ if (template->body)
ast_free(template->body);
template->body = message_template_parse_emailbody(var->value);
if (!template->body) {
@@ -1004,7 +1004,7 @@ static void prep_email_sub_vars(struct ast_channel *channel, const struct minivm
{
char callerid[256];
struct ast_variable *var;
-
+
if (!channel) {
ast_log(LOG_ERROR, "No allocated channel, giving up...\n");
return;
@@ -1031,7 +1031,7 @@ static void prep_email_sub_vars(struct ast_channel *channel, const struct minivm
* \brief Set default values for Mini-Voicemail users */
static void populate_defaults(struct minivm_account *vmu)
{
- ast_copy_flags(vmu, (&globalflags), AST_FLAGS_ALL);
+ ast_copy_flags(vmu, (&globalflags), AST_FLAGS_ALL);
ast_copy_string(vmu->attachfmt, default_vmformat, sizeof(vmu->attachfmt));
vmu->volgain = global_volgain;
}
@@ -1057,7 +1057,7 @@ static void vmaccounts_destroy_list(void)
{
struct minivm_account *this;
AST_LIST_LOCK(&minivm_accounts);
- while ((this = AST_LIST_REMOVE_HEAD(&minivm_accounts, list)))
+ while ((this = AST_LIST_REMOVE_HEAD(&minivm_accounts, list)))
ast_free(this);
AST_LIST_UNLOCK(&minivm_accounts);
}
@@ -1094,7 +1094,7 @@ static struct minivm_account *find_account(const char *domain, const char *usern
if (createtemp && !vmu) {
/* Create a temporary user, send e-mail and be gone */
vmu = mvm_user_alloc();
- ast_set2_flag(vmu, TRUE, MVM_ALLOCED);
+ ast_set2_flag(vmu, TRUE, MVM_ALLOCED);
if (vmu) {
ast_copy_string(vmu->username, username, sizeof(vmu->username));
ast_copy_string(vmu->domain, domain, sizeof(vmu->domain));
@@ -1119,7 +1119,7 @@ static struct minivm_account *find_user_realtime(const char *domain, const char
if (!retval)
return NULL;
- if (username)
+ if (username)
ast_copy_string(retval->username, username, sizeof(retval->username));
populate_defaults(retval);
@@ -1262,7 +1262,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
if (type == MVM_MESSAGE_EMAIL) {
if (vmu && !ast_strlen_zero(vmu->email)) {
- ast_copy_string(email, vmu->email, sizeof(email));
+ ast_copy_string(email, vmu->email, sizeof(email));
} else if (!ast_strlen_zero(vmu->username) && !ast_strlen_zero(vmu->domain))
snprintf(email, sizeof(email), "%s@%s", vmu->username, vmu->domain);
} else if (type == MVM_MESSAGE_PAGE) {
@@ -1333,7 +1333,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
struct minivm_zone *z;
AST_LIST_LOCK(&minivm_zones);
AST_LIST_TRAVERSE(&minivm_zones, z, list) {
- if (strcmp(z->name, vmu->zonetag))
+ if (strcmp(z->name, vmu->zonetag))
continue;
the_zone = z;
}
@@ -1354,7 +1354,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
prep_email_sub_vars(chan, vmu, cidnum, cidname, dur, date, counter);
/* Find email address to use */
- /* If there's a server e-mail address in the account, use that, othterwise template */
+ /* If there's a server e-mail address in the account, use that, otherwise template */
fromemail = ast_strlen_zero(vmu->serveremail) ? template->serveremail : vmu->serveremail;
/* Find name to user for server e-mail */
@@ -1392,7 +1392,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
} else {
fprintf(p, "From: %s <%s>\n", ast_str_quote(&str2, 0, ast_str_buffer(str1)), who);
}
- }
+ }
fprintf(p, "Message-ID: <Asterisk-%u-%s-%d-%s>\n", (unsigned int)ast_random(), vmu->username, (int)getpid(), who);
@@ -1458,7 +1458,7 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
} else {
fprintf(p, "Dear %s:\n\n\tJust wanted to let you know you were just left a %s long message \n"
"in mailbox %s from %s, on %s so you might\n"
- "want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n\n", vmu->fullname,
+ "want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n\n", vmu->fullname,
dur, vmu->username, (cidname ? cidname : (cidnum ? cidnum : "an unknown caller")), date);
ast_debug(3, "Using default message body (no template)\n-----\n");
}
@@ -1532,7 +1532,7 @@ static int make_dir(char *dest, int len, const char *domain, const char *usernam
* \param dest String. base directory.
* \param len Int. Length base directory string.
* \param domain String. Ignored if is null or empty string.
- * \param username String. Ignored if is null or empty string.
+ * \param username String. Ignored if is null or empty string.
* \param folder String. Ignored if is null or empty string.
* \return 0 on failure, 1 on success.
*/
@@ -1582,10 +1582,10 @@ static int invent_message(struct ast_channel *chan, char *domain, char *username
if (ast_fileexists(fn, NULL, NULL) > 0) {
res = ast_streamfile(chan, fn, ast_channel_language(chan));
- if (res)
+ if (res)
return -1;
res = ast_waitstream(chan, ecodes);
- if (res)
+ if (res)
return res;
} else {
int numericusername = 1;
@@ -1681,11 +1681,11 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
case '3':
message_exists = 0;
/* Record */
- if (recorded == 1)
+ if (recorded == 1)
ast_verb(3, "Re-recording the message\n");
else
ast_verb(3, "Recording the message\n");
- if (recorded && outsidecaller)
+ if (recorded && outsidecaller)
cmd = ast_play_and_wait(chan, "beep");
recorded = 1;
/* After an attempt has been made to record message, we have to take care of INTRO and beep for incoming messages, but not for greetings */
@@ -1907,7 +1907,7 @@ notify_cleanup:
return res;
}
-
+
/*!\internal
* \brief Record voicemail message, store into file prepared for sending e-mail */
static int leave_voicemail(struct ast_channel *chan, char *username, struct leave_vm_options *options)
@@ -2016,17 +2016,17 @@ static int leave_voicemail(struct ast_channel *chan, char *username, struct leav
"%s:%s:%s:%s:%d:%s:%s:%s:%s:%d:%s:%s\n",
username,
ast_channel_context(chan),
- ast_channel_macrocontext(chan),
+ ast_channel_macrocontext(chan),
ast_channel_exten(chan),
ast_channel_priority(chan),
ast_channel_name(chan),
callerid,
- date,
+ date,
timebuf,
duration,
duration < global_vmminmessage ? "IGNORED" : "OK",
vmu->accountcode
- );
+ );
fprintf(txt, "%s", logbuf);
if (minivmlogfile) {
ast_mutex_lock(&minivmloglock);
@@ -2041,7 +2041,7 @@ static int leave_voicemail(struct ast_channel *chan, char *username, struct leav
unlink(tmptxtfile);
pbx_builtin_setvar_helper(chan, "MVM_RECORD_STATUS", "FAILED");
return 0;
- }
+ }
fclose(txt); /* Close log file */
if (ast_fileexists(tmptxtfile, NULL, NULL) <= 0) {
ast_debug(1, "The recorded media file is gone, so we should remove the .txt file too!\n");
@@ -2165,7 +2165,7 @@ static int minivm_notify_exec(struct ast_channel *chan, const char *data)
if (domain) {
*domain = '\0';
domain++;
- }
+ }
if (ast_strlen_zero(domain) || ast_strlen_zero(username)) {
ast_log(LOG_ERROR, "Need username@domain as argument. Sorry. Argument 0 %s\n", argv[0]);
return -1;
@@ -2185,7 +2185,7 @@ static int minivm_notify_exec(struct ast_channel *chan, const char *data)
ast_channel_unlock(chan);
/* Notify of new message to e-mail and pager */
if (!ast_strlen_zero(filename)) {
- ast_channel_lock(chan);
+ ast_channel_lock(chan);
if ((format = pbx_builtin_getvar_helper(chan, "MVM_FORMAT"))) {
format = ast_strdupa(format);
}
@@ -2246,10 +2246,10 @@ static int minivm_record_exec(struct ast_channel *chan, const char *data)
if (sscanf(opts[OPT_ARG_RECORDGAIN], "%30d", &gain) != 1) {
ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]);
return -1;
- } else
+ } else
leave_options.record_gain = (signed char) gain;
}
- }
+ }
/* Now run the appliation and good luck to you! */
res = leave_voicemail(chan, argv[0], &leave_options);
@@ -2307,7 +2307,7 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
if (domain) {
*domain = '\0';
domain++;
- }
+ }
if (ast_strlen_zero(domain) || ast_strlen_zero(username)) {
ast_log(LOG_ERROR, "Need username@domain as argument. Sorry. Argument: %s\n", argv[0]);
return -1;
@@ -2385,7 +2385,7 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
res = 0; /* Reset */
/* Play the beginning intro if desired */
if (!ast_strlen_zero(prefile)) {
- if (ast_streamfile(chan, prefile, ast_channel_language(chan)) > -1)
+ if (ast_streamfile(chan, prefile, ast_channel_language(chan)) > -1)
res = ast_waitstream(chan, ecodes);
} else {
ast_debug(2, "%s doesn't exist, doing what we can\n", prefile);
@@ -2472,7 +2472,7 @@ static int minivm_delete_exec(struct ast_channel *chan, const char *data)
if (ast_strlen_zero(filename)) {
ast_log(LOG_ERROR, "No filename given in application arguments or channel variable MVM_FILENAME\n");
return res;
- }
+ }
/* Go ahead and delete audio files from system, they're not needed any more */
/* We should look for both audio and text files here */
@@ -2544,7 +2544,7 @@ static int minivm_accmess_exec(struct ast_channel *chan, const char *data)
if (domain) {
*domain = '\0';
domain++;
- }
+ }
if (ast_strlen_zero(domain) || ast_strlen_zero(username)) {
ast_log(LOG_ERROR, "Need username@domain as argument. Sorry. Argument 0 %s\n", argv[0]);
pbx_builtin_setvar_helper(chan, "MVM_ACCMESS_STATUS", "FAILED");
@@ -2561,7 +2561,7 @@ static int minivm_accmess_exec(struct ast_channel *chan, const char *data)
/* Answer channel if it's not already answered */
if (ast_channel_state(chan) != AST_STATE_UP)
ast_answer(chan);
-
+
/* Here's where the action is */
if (ast_test_flag(&flags, OPT_BUSY_GREETING)) {
message = "busy";
@@ -2619,7 +2619,7 @@ static int create_vmaccount(char *name, struct ast_variable *var, int realtime)
vmu = ast_calloc(1, sizeof(*vmu));
if (!vmu)
return 0;
-
+
ast_copy_string(vmu->domain, domain, sizeof(vmu->domain));
ast_copy_string(vmu->username, username, sizeof(vmu->username));
@@ -2674,7 +2674,7 @@ static int create_vmaccount(char *name, struct ast_variable *var, int realtime)
var = var->next;
}
ast_debug(3, "...Linking account %s\n", name);
-
+
AST_LIST_LOCK(&minivm_accounts);
AST_LIST_INSERT_TAIL(&minivm_accounts, vmu, list);
AST_LIST_UNLOCK(&minivm_accounts);
@@ -2697,9 +2697,9 @@ static void timezone_destroy_list(void)
struct minivm_zone *this;
AST_LIST_LOCK(&minivm_zones);
- while ((this = AST_LIST_REMOVE_HEAD(&minivm_zones, list)))
+ while ((this = AST_LIST_REMOVE_HEAD(&minivm_zones, list)))
free_zone(this);
-
+
AST_LIST_UNLOCK(&minivm_zones);
}
@@ -2721,7 +2721,7 @@ static int timezone_add(const char *zonename, const char *config)
ast_free(newzone);
return 0;
}
-
+
ast_copy_string(newzone->name, zonename, sizeof(newzone->name));
ast_copy_string(newzone->timezone, timezone_str, sizeof(newzone->timezone));
ast_copy_string(newzone->msg_format, msg_format, sizeof(newzone->msg_format));
@@ -2747,9 +2747,9 @@ static char *message_template_parse_filebody(const char *filename) {
if (ast_strlen_zero(filename))
return NULL;
- if (*filename == '/')
+ if (*filename == '/')
ast_copy_string(filenamebuf, filename, sizeof(filenamebuf));
- else
+ else
snprintf(filenamebuf, sizeof(filenamebuf), "%s/%s", ast_config_AST_CONFIG_DIR, filename);
if (!(fi = fopen(filenamebuf, "r"))) {
@@ -2799,7 +2799,7 @@ static char *message_template_parse_emailbody(const char *configuration)
}
tmpread = tmpwrite + len;
}
- return emailbody;
+ return emailbody;
}
/*! \brief Apply general configuration options */
@@ -2851,9 +2851,9 @@ static int apply_general_options(struct ast_variable *var)
} else if (!strcmp(var->name, "format")) {
ast_copy_string(default_vmformat, var->value, sizeof(default_vmformat));
} else if (!strcmp(var->name, "review")) {
- ast_set2_flag((&globalflags), ast_true(var->value), MVM_REVIEW);
+ ast_set2_flag((&globalflags), ast_true(var->value), MVM_REVIEW);
} else if (!strcmp(var->name, "operator")) {
- ast_set2_flag((&globalflags), ast_true(var->value), MVM_OPERATOR);
+ ast_set2_flag((&globalflags), ast_true(var->value), MVM_OPERATOR);
}
var = var->next;
}
@@ -2897,8 +2897,8 @@ static int load_config(int reload)
global_maxsilence = 0;
global_saydurationminfo = 2;
ast_copy_string(default_vmformat, "wav", sizeof(default_vmformat));
- ast_set2_flag((&globalflags), FALSE, MVM_REVIEW);
- ast_set2_flag((&globalflags), FALSE, MVM_OPERATOR);
+ ast_set2_flag((&globalflags), FALSE, MVM_REVIEW);
+ ast_set2_flag((&globalflags), FALSE, MVM_OPERATOR);
/* Reset statistics */
memset(&global_stats, 0, sizeof(global_stats));
global_stats.reset = ast_tvnow();
@@ -2950,7 +2950,7 @@ static int load_config(int reload)
template = message_template_find("email-default");
/* Load date format config for voicemail mail */
- if ((chanvar = ast_variable_retrieve(cfg, "general", "emaildateformat")))
+ if ((chanvar = ast_variable_retrieve(cfg, "general", "emaildateformat")))
ast_copy_string(template->dateformat, chanvar, sizeof(template->dateformat));
if ((chanvar = ast_variable_retrieve(cfg, "general", "emailfromstring")))
ast_copy_string(template->fromaddress, chanvar, sizeof(template->fromaddress));
@@ -2958,9 +2958,9 @@ static int load_config(int reload)
ast_copy_string(template->serveremail, chanvar, sizeof(template->serveremail));
if ((chanvar = ast_variable_retrieve(cfg, "general", "emailcharset")))
ast_copy_string(template->charset, chanvar, sizeof(template->charset));
- if ((chanvar = ast_variable_retrieve(cfg, "general", "emailsubject")))
+ if ((chanvar = ast_variable_retrieve(cfg, "general", "emailsubject")))
ast_copy_string(template->subject, chanvar, sizeof(template->subject));
- if ((chanvar = ast_variable_retrieve(cfg, "general", "emailbody")))
+ if ((chanvar = ast_variable_retrieve(cfg, "general", "emailbody")))
template->body = message_template_parse_emailbody(chanvar);
template->attachment = TRUE;
@@ -2974,7 +2974,7 @@ static int load_config(int reload)
ast_copy_string(template->charset, chanvar, sizeof(template->charset));
if ((chanvar = ast_variable_retrieve(cfg, "general", "pagersubject")))
ast_copy_string(template->subject, chanvar,sizeof(template->subject));
- if ((chanvar = ast_variable_retrieve(cfg, "general", "pagerbody")))
+ if ((chanvar = ast_variable_retrieve(cfg, "general", "pagerbody")))
template->body = message_template_parse_emailbody(chanvar);
template->attachment = FALSE;
@@ -3030,7 +3030,7 @@ static char *handle_minivm_list_templates(struct ast_cli_entry *e, int cmd, stru
ast_cli(a->fd, HVLT_OUTPUT_FORMAT, "Template name", "Charset", "Locale", "Attach media", "Subject");
ast_cli(a->fd, HVLT_OUTPUT_FORMAT, "-------------", "-------", "------", "------------", "-------");
AST_LIST_TRAVERSE(&message_templates, this, list) {
- ast_cli(a->fd, HVLT_OUTPUT_FORMAT, this->name,
+ ast_cli(a->fd, HVLT_OUTPUT_FORMAT, this->name,
S_OR(this->charset, "-"),
S_OR(this->locale, "-"),
this->attachment ? "Yes" : "No",
@@ -3188,7 +3188,7 @@ static char *handle_minivm_show_stats(struct ast_cli_entry *e, int cmd, struct a
char buf[BUFSIZ];
switch (cmd) {
-
+
case CLI_INIT:
e->command = "minivm show stats";
e->usage =
@@ -3249,25 +3249,25 @@ static int minivm_account_func_read(struct ast_channel *chan, const char *cmd, c
if (!strcasecmp(colname, "hasaccount")) {
ast_copy_string(buf, (ast_test_flag(vmu, MVM_ALLOCED) ? "0" : "1"), len);
- } else if (!strcasecmp(colname, "fullname")) {
+ } else if (!strcasecmp(colname, "fullname")) {
ast_copy_string(buf, vmu->fullname, len);
- } else if (!strcasecmp(colname, "email")) {
+ } else if (!strcasecmp(colname, "email")) {
if (!ast_strlen_zero(vmu->email))
ast_copy_string(buf, vmu->email, len);
else
snprintf(buf, len, "%s@%s", vmu->username, vmu->domain);
- } else if (!strcasecmp(colname, "pager")) {
+ } else if (!strcasecmp(colname, "pager")) {
ast_copy_string(buf, vmu->pager, len);
- } else if (!strcasecmp(colname, "etemplate")) {
+ } else if (!strcasecmp(colname, "etemplate")) {
if (!ast_strlen_zero(vmu->etemplate))
ast_copy_string(buf, vmu->etemplate, len);
else
ast_copy_string(buf, "email-default", len);
- } else if (!strcasecmp(colname, "language")) {
+ } else if (!strcasecmp(colname, "language")) {
ast_copy_string(buf, vmu->language, len);
- } else if (!strcasecmp(colname, "timezone")) {
+ } else if (!strcasecmp(colname, "timezone")) {
ast_copy_string(buf, vmu->zonetag, len);
- } else if (!strcasecmp(colname, "ptemplate")) {
+ } else if (!strcasecmp(colname, "ptemplate")) {
if (!ast_strlen_zero(vmu->ptemplate))
ast_copy_string(buf, vmu->ptemplate, len);
else
@@ -3309,11 +3309,11 @@ static int vm_lock_path(const char *path)
}
}
-/*! \brief Access counter file, lock directory, read and possibly write it again changed
+/*! \brief Access counter file, lock directory, read and possibly write it again changed
\param directory Directory to crate file in
- \param countername filename
+ \param countername filename
\param value If set to zero, we only read the variable
- \param operand 0 to read, 1 to set new value, 2 to change
+ \param operand 0 to read, 1 to set new value, 2 to change
\return -1 on error, otherwise counter value
*/
static int access_counter_file(char *directory, char *countername, int value, int operand)
@@ -3353,7 +3353,7 @@ static int access_counter_file(char *directory, char *countername, int value, in
counter = 0;
break;
}
-
+
/* Now, write the new value to the file */
counterfile = fopen(filename, "w");
if (!counterfile) {
@@ -3382,7 +3382,7 @@ static int minivm_counter_func_read(struct ast_channel *chan, const char *cmd, c
if ((countername = strchr(username, ':'))) {
*countername = '\0';
countername++;
- }
+ }
if ((domain = strchr(username, '@'))) {
*domain = '\0';
@@ -3438,11 +3438,11 @@ static int minivm_counter_func_write(struct ast_channel *chan, const char *cmd,
if ((countername = strchr(username, ':'))) {
*countername = '\0';
countername++;
- }
+ }
if ((operand = strchr(countername, ':'))) {
*operand = '\0';
operand++;
- }
+ }
if ((domain = strchr(username, '@'))) {
*domain = '\0';
@@ -3496,7 +3496,7 @@ static int minivm_counter_func_write(struct ast_channel *chan, const char *cmd,
static struct ast_cli_entry cli_minivm[] = {
AST_CLI_DEFINE(handle_minivm_show_users, "List defined mini-voicemail boxes"),
AST_CLI_DEFINE(handle_minivm_show_zones, "List zone message formats"),
- AST_CLI_DEFINE(handle_minivm_list_templates, "List message templates"),
+ AST_CLI_DEFINE(handle_minivm_list_templates, "List message templates"),
AST_CLI_DEFINE(handle_minivm_reload, "Reload Mini-voicemail configuration"),
AST_CLI_DEFINE(handle_minivm_show_stats, "Show some mini-voicemail statistics"),
AST_CLI_DEFINE(handle_minivm_show_settings, "Show mini-voicemail general settings"),
@@ -3550,7 +3550,7 @@ static int reload(void)
/*! \brief Reload cofiguration */
static char *handle_minivm_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
-
+
switch (cmd) {
case CLI_INIT:
e->command = "minivm reload";
@@ -3561,7 +3561,7 @@ static char *handle_minivm_reload(struct ast_cli_entry *e, int cmd, struct ast_c
case CLI_GENERATE:
return NULL;
}
-
+
reload();
ast_cli(a->fd, "\n-- Mini voicemail re-configured \n");
return CLI_SUCCESS;
@@ -3571,7 +3571,7 @@ static char *handle_minivm_reload(struct ast_cli_entry *e, int cmd, struct ast_c
static int unload_module(void)
{
int res;
-
+
res = ast_unregister_application(app_minivm_record);
res |= ast_unregister_application(app_minivm_greet);
res |= ast_unregister_application(app_minivm_notify);
diff --git a/apps/app_morsecode.c b/apps/app_morsecode.c
index 27e70f09c..10ac58dbe 100644
--- a/apps/app_morsecode.c
+++ b/apps/app_morsecode.c
@@ -67,7 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<ref type="application">SayPhonetic</ref>
</see-also>
</application>
- ***/
+ ***/
static const char app_morsecode[] = "Morsecode";
static const char * const morsecode[] = {
@@ -187,4 +187,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Morse code");
-
diff --git a/apps/app_mp3.c b/apps/app_mp3.c
index e27eb3774..17f7874af 100644
--- a/apps/app_mp3.c
+++ b/apps/app_mp3.c
@@ -24,14 +24,14 @@
*
* \note Add feature to play local M3U playlist file
* Vincent Li <mchun.li@gmail.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -83,7 +83,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd)
char sampling_rate_str[8];
res = ast_safe_fork(0);
- if (res < 0)
+ if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res) {
return res;
@@ -150,7 +150,7 @@ static int timed_read(int fd, void *data, int datalen, int timeout)
return -1;
}
return read(fd, data, datalen);
-
+
}
static int mp3_exec(struct ast_channel *chan, const char *data)
@@ -183,7 +183,7 @@ static int mp3_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "Unable to create pipe\n");
return -1;
}
-
+
ast_stopstream(chan);
native_format = ast_format_cap_get_format(ast_channel_nativeformats(chan), 0);
@@ -205,7 +205,7 @@ static int mp3_exec(struct ast_channel *chan, const char *data)
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
myf.f.data.ptr = myf.frdata;
-
+
res = mp3play(data, sampling_rate, fds[1]);
if (!strncasecmp(data, "http://", 7)) {
timeout = 10000;
@@ -255,20 +255,20 @@ static int mp3_exec(struct ast_channel *chan, const char *data)
break;
}
ast_frfree(f);
- }
+ }
}
}
}
close(fds[0]);
close(fds[1]);
-
+
if (pid > -1)
kill(pid, SIGKILL);
if (!res && owriteformat)
ast_set_write_format(chan, owriteformat);
ast_frfree(&myf.f);
-
+
return res;
}
@@ -283,4 +283,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Silly MP3 Application");
-
diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c
index a347cf3c8..4e64249d0 100644
--- a/apps/app_nbscat.c
+++ b/apps/app_nbscat.c
@@ -21,14 +21,14 @@
* \brief Silly application to play an NBScat file -- uses nbscat8k
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -107,7 +107,7 @@ static int timed_read(int fd, void *data, int datalen)
return -1;
}
return read(fd, data, datalen);
-
+
}
static int NBScat_exec(struct ast_channel *chan, const char *data)
@@ -129,7 +129,7 @@ static int NBScat_exec(struct ast_channel *chan, const char *data)
ast_log(LOG_WARNING, "Unable to create socketpair\n");
return -1;
}
-
+
ast_stopstream(chan);
owriteformat = ao2_bump(ast_channel_writeformat(chan));
@@ -148,7 +148,7 @@ static int NBScat_exec(struct ast_channel *chan, const char *data)
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
myf.f.data.ptr = myf.frdata;
-
+
res = NBScatplay(fds[1]);
/* Wait 1000 ms first */
next = ast_tvnow();
@@ -195,14 +195,14 @@ static int NBScat_exec(struct ast_channel *chan, const char *data)
break;
}
ast_frfree(f);
- }
+ }
}
}
}
close(fds[0]);
close(fds[1]);
ast_frfree(&myf.f);
-
+
if (pid > -1)
kill(pid, SIGKILL);
if (!res && owriteformat)
@@ -223,4 +223,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Silly NBS Stream Application");
-
diff --git a/apps/app_page.c b/apps/app_page.c
index 590b15b88..302b2b39b 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -443,4 +443,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Page Multiple Phones");
-
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 422dd8eff..65a75ac6e 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -21,7 +21,7 @@
* \brief Trivial application to playback a sound file
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -165,7 +165,7 @@ static int s_streamwait3(const say_args_t *a, const char *fn)
ast_waitstream_full(a->chan, a->ints, a->audiofd, a->ctrlfd) :
ast_waitstream(a->chan, a->ints);
ast_stopstream(a->chan);
- return res;
+ return res;
}
/*! \brief
@@ -176,7 +176,7 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
{
struct ast_variable *v;
char *lang, *x, *rule = NULL;
- int ret = 0;
+ int ret = 0;
struct varshead head = { .first = NULL, .last = NULL };
struct ast_var_t *n;
@@ -276,7 +276,7 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
strcpy(fn2 + l, data);
ret = do_say(a, fn2, options, depth);
}
-
+
if (ret) {
break;
}
@@ -374,9 +374,9 @@ static int say_init_mode(const char *mode) {
ast_say_enumeration_full = say_enumeration_full;
#if 0
- /*! \todo XXX
+ /*! \todo XXX
These functions doesn't exist.
- say.conf.sample indicates this is working...
+ say.conf.sample indicates this is working...
*/
ast_say_digits_full = say_digits_full;
ast_say_digit_str_full = say_digit_str_full;
@@ -394,7 +394,7 @@ static int say_init_mode(const char *mode) {
ast_log(LOG_WARNING, "unrecognized mode %s\n", mode);
return -1;
}
-
+
return 0;
}
@@ -405,7 +405,7 @@ static char *__say_cli_init(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
switch (cmd) {
case CLI_INIT:
e->command = "say load [new|old]";
- e->usage =
+ e->usage =
"Usage: say load [new|old]\n"
" say load\n"
" Report status of current say mode\n"
@@ -449,7 +449,7 @@ static int playback_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(filenames);
AST_APP_ARG(options);
);
-
+
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Playback requires an argument (filename)\n");
return -1;
@@ -465,7 +465,7 @@ static int playback_exec(struct ast_channel *chan, const char *data)
option_say = 1;
if (strcasestr(args.options, "noanswer"))
option_noanswer = 1;
- }
+ }
if (ast_channel_state(chan) != AST_STATE_UP) {
if (option_skip) {
/* At the user's option, skip if the line is not up */
@@ -530,7 +530,7 @@ static int reload(void)
}
}
}
-
+
/*! \todo
* XXX here we should sort rules according to the same order
* we have in pbx.c so we have the same matching behaviour.
@@ -549,7 +549,7 @@ static int unload_module(void)
if (say_cfg)
ast_config_destroy(say_cfg);
- return res;
+ return res;
}
static int load_module(void)
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b7718a131..b42eac240 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1500,6 +1500,7 @@ struct member {
char state_exten[AST_MAX_EXTENSION]; /*!< Extension to get state from (if using hint) */
char state_context[AST_MAX_CONTEXT]; /*!< Context to use when getting state (if using hint) */
char state_interface[AST_CHANNEL_NAME]; /*!< Technology/Location from which to read devicestate changes */
+ int state_id; /*!< Extension state callback id (if using hint) */
char membername[80]; /*!< Member name to use in queue logs */
int penalty; /*!< Are we a last resort? */
int calls; /*!< Number of calls serviced by this member */
@@ -2569,12 +2570,21 @@ static int get_queue_member_status(struct member *cur)
return ast_strlen_zero(cur->state_exten) ? ast_device_state(cur->state_interface) : extensionstate2devicestate(ast_extension_state(NULL, cur->state_context, cur->state_exten));
}
+static void destroy_queue_member_cb(void *obj)
+{
+ struct member *mem = obj;
+
+ if (mem->state_id != -1) {
+ ast_extension_state_del(mem->state_id, extension_state_cb);
+ }
+}
+
/*! \brief allocate space for new queue member and set fields based on parameters passed */
static struct member *create_queue_member(const char *interface, const char *membername, int penalty, int paused, const char *state_interface, int ringinuse)
{
struct member *cur;
- if ((cur = ao2_alloc(sizeof(*cur), NULL))) {
+ if ((cur = ao2_alloc(sizeof(*cur), destroy_queue_member_cb))) {
cur->ringinuse = ringinuse;
cur->penalty = penalty;
cur->paused = paused;
@@ -2598,6 +2608,10 @@ static struct member *create_queue_member(const char *interface, const char *mem
ast_copy_string(cur->state_exten, exten, sizeof(cur->state_exten));
ast_copy_string(cur->state_context, S_OR(context, "default"), sizeof(cur->state_context));
+
+ cur->state_id = ast_extension_state_add(cur->state_context, cur->state_exten, extension_state_cb, NULL);
+ } else {
+ cur->state_id = -1;
}
cur->status = get_queue_member_status(cur);
}
@@ -10876,8 +10890,6 @@ static int unload_module(void)
device_state_sub = stasis_unsubscribe_and_join(device_state_sub);
- ast_extension_state_del(0, extension_state_cb);
-
ast_unload_realtime("queue_members");
ao2_cleanup(queues);
ao2_cleanup(pending_members);
@@ -11035,8 +11047,6 @@ static int load_module(void)
err |= STASIS_MESSAGE_TYPE_INIT(queue_agent_dump_type);
err |= STASIS_MESSAGE_TYPE_INIT(queue_agent_ringnoanswer_type);
- ast_extension_state_add(NULL, NULL, extension_state_cb, NULL);
-
if (err) {
unload_module();
return AST_MODULE_LOAD_DECLINE;
@@ -11077,4 +11087,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "True Call Queueing",
.load_pri = AST_MODPRI_DEVSTATE_CONSUMER,
.nonoptreq = "res_monitor",
);
-
diff --git a/apps/app_read.c b/apps/app_read.c
index d2a1de7b6..817851efc 100644
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -21,14 +21,14 @@
* \brief Trivial application to read a variable
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -146,13 +146,13 @@ static int read_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(attempts);
AST_APP_ARG(timeout);
);
-
+
pbx_builtin_setvar_helper(chan, "READSTATUS", status);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Read requires an argument (variable)\n");
return 0;
}
-
+
argcopy = ast_strdupa(data);
AST_STANDARD_APP_ARGS(arglist, argcopy);
@@ -160,7 +160,7 @@ static int read_exec(struct ast_channel *chan, const char *data)
if (!ast_strlen_zero(arglist.options)) {
ast_app_parse_options(read_app_options, &flags, NULL, arglist.options);
}
-
+
if (!ast_strlen_zero(arglist.attempts)) {
tries = atoi(arglist.attempts);
if (tries <= 0)
diff --git a/apps/app_readexten.c b/apps/app_readexten.c
index deaf83f53..fbb290c4c 100644
--- a/apps/app_readexten.c
+++ b/apps/app_readexten.c
@@ -20,14 +20,14 @@
* \brief Trivial application to read an extension into a variable
*
* \author David Chappell <David.Chappell@trincoll.edu>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_record.c b/apps/app_record.c
index d1cdeabce..99948e796 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -28,7 +28,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -230,7 +230,7 @@ static int record_exec(struct ast_channel *chan, const char *data)
struct ast_filestream *s = NULL;
struct ast_frame *f = NULL;
-
+
struct ast_dsp *sildet = NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
@@ -382,7 +382,7 @@ static int record_exec(struct ast_channel *chan, const char *data)
return -1;
}
ast_dsp_set_threshold(sildet, ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE));
- }
+ }
if (create_destination_directory(tmp)) {
ast_log(LOG_WARNING, "Could not create directory for file %s\n", args.filename);
diff --git a/apps/app_saycounted.c b/apps/app_saycounted.c
index 4eddc08e5..98c00ce46 100644
--- a/apps/app_saycounted.c
+++ b/apps/app_saycounted.c
@@ -39,7 +39,7 @@
<para>The number of things</para>
</parameter>
<parameter name="filename" required="true">
- <para>File name stem for the noun that is the the name of the things</para>
+ <para>File name stem for the noun that is the name of the things</para>
</parameter>
</syntax>
<description>
@@ -206,4 +206,3 @@ static int unload_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Decline words according to channel language");
-
diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c
index 3b4d2b51e..63b0f70d8 100644
--- a/apps/app_sayunixtime.c
+++ b/apps/app_sayunixtime.c
@@ -21,7 +21,7 @@
* \brief SayUnixTime application
*
* \author Tilghman Lesher <app_sayunixtime__200309@the-tilghman.com>
- *
+ *
* \ingroup applications
*/
@@ -68,7 +68,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</parameter>
</syntax>
<description>
- <para>Uses some of the sound files stored in <directory>/var/lib/asterisk/sounds</directory> to construct a phrase
+ <para>Uses some of the sound files stored in <directory>/var/lib/asterisk/sounds</directory> to construct a phrase
saying the specified date and/or time in the specified format. </para>
</description>
<see-also>
@@ -175,20 +175,20 @@ static int sayunixtime_exec(struct ast_channel *chan, const char *data)
static int unload_module(void)
{
int res;
-
+
res = ast_unregister_application(app_sayunixtime);
res |= ast_unregister_application(app_datetime);
-
+
return res;
}
static int load_module(void)
{
int res;
-
+
res = ast_register_application_xml(app_sayunixtime, sayunixtime_exec);
res |= ast_register_application_xml(app_datetime, sayunixtime_exec);
-
+
return res;
}
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index be70d7b0f..25444a323 100644
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -162,7 +162,7 @@ static int manager_play_dtmf(struct mansession *s, const struct message *m)
chan = ast_channel_unref(chan);
return 0;
}
-
+
if (!ast_strlen_zero(duration) && (sscanf(duration, "%30u", &duration_ms) != 1)) {
astman_send_error(s, m, "Could not convert Duration parameter");
chan = ast_channel_unref(chan);
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 98b7b2fad..3c1b4f534 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -21,7 +21,7 @@
* \brief App to transmit a text message
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \note Requires support of sending text messages from channel driver
*
* \ingroup applications
@@ -30,7 +30,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index 1bd093cff..43e37af2c 100644
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -21,7 +21,7 @@
* \brief App to set callerid presentation
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -110,7 +110,7 @@ static int setcallerid_pres_exec(struct ast_channel *chan, const char *data)
(char *) data);
return 0;
}
-
+
/* Set the combined caller id presentation. */
ast_channel_caller(chan)->id.name.presentation = pres;
ast_channel_caller(chan)->id.number.presentation = pres;
@@ -128,4 +128,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Set CallerID Presentation Application");
-
diff --git a/apps/app_skel.c b/apps/app_skel.c
index 12afdc726..ae50bb576 100644
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -33,7 +33,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page app_skel.conf app_skel.conf
* \verbinclude app_skel.conf.sample
*/
@@ -173,7 +173,7 @@ struct skel_level_state {
};
/*! \brief Object to hold level config information.
- * \note This object should hold a reference to an an object that holds state across reloads.
+ * \note This object should hold a reference to an object that holds state across reloads.
* The other fields are just examples of the kind of data that might be stored in an level.
*/
struct skel_level {
@@ -193,7 +193,7 @@ struct skel_level {
* the running game.
*/
struct skel_current_game {
- uint32_t total_games; /*! The total number of games for this call to to the app */
+ uint32_t total_games; /*! The total number of games for this call to the app */
uint32_t games_left; /*! How many games are left to play in this set */
uint32_t cheat; /*! Whether or not cheating was enabled for the game */
struct skel_level *level_info; /*! The level information for the running game */
@@ -244,8 +244,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "globals",
.item_offset = offsetof(struct skel_config, global),
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -255,18 +255,24 @@ static struct aco_type sound_option = {
.type = ACO_GLOBAL,
.name = "sounds",
.item_offset = offsetof(struct skel_config, global),
- .category_match = ACO_WHITELIST,
- .category = "^sounds$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "sounds",
};
struct aco_type *sound_options[] = ACO_TYPES(&sound_option);
+static const char *level_categories[] = {
+ "general",
+ "sounds",
+ NULL,
+};
+
/*! \brief An aco_type structure to link the everything but the "general" and "sounds" categories to the skel_level type */
static struct aco_type level_option = {
.type = ACO_ITEM,
.name = "level",
- .category_match = ACO_BLACKLIST,
- .category = "^(general|sounds)$",
+ .category_match = ACO_BLACKLIST_ARRAY,
+ .category = (const char *)level_categories,
.item_alloc = skel_level_alloc,
.item_find = skel_level_find,
.item_offset = offsetof(struct skel_config, levels),
@@ -712,8 +718,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/apps/app_sms.c b/apps/app_sms.c
index 385f47978..c3d8ccd4b 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -17,7 +17,7 @@
/*! \file
*
* \brief SMS application - ETSI ES 201 912 protocol 1 implementation
- *
+ *
* \par Development notes
* \note The ETSI standards are available free of charge from ETSI at
* http://pda.etsi.org/pda/queryform.asp
@@ -26,7 +26,7 @@
* ES 201 912 SMS for PSTN/ISDN
* TS 123 040 Technical realization of SMS
*
- *
+ *
* \ingroup applications
*
* \author Adrian Kennard (for the original protocol 1 code)
@@ -409,7 +409,7 @@ static int packsms7(unsigned char *o, int udhl, unsigned char *udh, int udl, uns
for (v = 0; v < 128 && escapes[v] != u; v++);
if (v < 128) { /* escaped sequence, esc + v */
/* store the low (8-b) bits in o[p], the remaining bits in o[p+1] */
- o[p] |= (27 << b); /* the low bits go into o[p] */
+ o[p] |= (27 << b); /* the low bits go into o[p] */
b += 7;
if (b >= 8) {
b -= 8;
@@ -472,13 +472,13 @@ static int packsms8(unsigned char *o, int udhl, unsigned char *udh, int udl, uns
return p;
}
-/*! \brief takes a binary header (udhl bytes at udh) and UCS-2
- message (udl characters at ud) and packs in to o using 16 bit
- UCS-2 character codes
- The return value is the number of bytes packed in to o, which is
- internally limited to 140
- o can be null, in which case this is used to validate or count
- only if the input contains invalid characters then
+/*! \brief takes a binary header (udhl bytes at udh) and UCS-2
+ message (udl characters at ud) and packs in to o using 16 bit
+ UCS-2 character codes
+ The return value is the number of bytes packed in to o, which is
+ internally limited to 140
+ o can be null, in which case this is used to validate or count
+ only if the input contains invalid characters then
the return value is -1 */
static int packsms16(unsigned char *o, int udhl, unsigned char *udh, int udl, unsigned short *ud)
{
@@ -513,7 +513,7 @@ static int packsms16(unsigned char *o, int udhl, unsigned char *udh, int udl, un
return p;
}
-/*! \brief general pack, with length and data,
+/*! \brief general pack, with length and data,
returns number of bytes of target used */
static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, unsigned char *udh, int udl, unsigned short *ud)
{
@@ -521,7 +521,7 @@ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, un
if (udl == 0) {
*p++ = 0; /* no user data */
} else {
-
+
int l = 0;
if (is7bit(dcs)) { /* 7 bit */
if ((l = packsms7(p + 1, udhl, udh, udl, ud)) < 0) {
@@ -594,8 +594,8 @@ static struct timeval unpackdate(unsigned char *i)
return ast_mktime(&t, NULL);
}
-/*! \brief unpacks bytes (7 bit encoding) at i, len l septets,
- and places in udh and ud setting udhl and udl. udh not used
+/*! \brief unpacks bytes (7 bit encoding) at i, len l septets,
+ and places in udh and ud setting udhl and udl. udh not used
if udhi not set */
static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
{
@@ -649,8 +649,8 @@ static void unpacksms7(unsigned char *i, unsigned char l, unsigned char *udh, in
*udl = (o - ud);
}
-/*! \brief unpacks bytes (8 bit encoding) at i, len l septets,
- * and places in udh and ud setting udhl and udl. udh not used
+/*! \brief unpacks bytes (8 bit encoding) at i, len l septets,
+ * and places in udh and ud setting udhl and udl. udh not used
* if udhi not set.
*/
static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
@@ -677,7 +677,7 @@ static void unpacksms8(unsigned char *i, unsigned char l, unsigned char *udh, in
}
/*! \brief unpacks bytes (16 bit encoding) at i, len l septets,
- and places in udh and ud setting udhl and udl.
+ and places in udh and ud setting udhl and udl.
udh not used if udhi not set */
static void unpacksms16(unsigned char *i, unsigned char l, unsigned char *udh, int *udhl, unsigned short *ud, int *udl, char udhi)
{
@@ -801,7 +801,7 @@ static void sms_log(sms_t * h, char status)
*p++ = '\\';
*p++ = 'r';
} else if (h->ud[n] < 32 || h->ud[n] == 127) {
- *p++ = 191;
+ *p++ = 0xbf;
} else {
*p++ = h->ud[n];
}
@@ -1433,7 +1433,7 @@ static void sms_compose1(sms_t *h, int more)
/*! \brief find and fill in next message, or send a REL if none waiting */
static void sms_nextoutgoing (sms_t * h)
-{
+{
char fn[100 + NAME_MAX] = "";
DIR *d;
char more = 0;
@@ -1942,7 +1942,7 @@ static int sms_exec(struct ast_channel *chan, const char *data)
if (ast_test_flag(&flags, OPTION_DCS)) {
h.dcs = 1;
}
-#if 0
+#if 0
case '1':
case '2':
case '3':
@@ -1997,7 +1997,7 @@ static int sms_exec(struct ast_channel *chan, const char *data)
res = h.err;
goto done;
}
-
+
if (ast_channel_state(chan) != AST_STATE_UP) { /* make sure channel is answered before any TX */
ast_answer(chan);
}
@@ -2054,7 +2054,7 @@ static int sms_exec(struct ast_channel *chan, const char *data)
}
res = h.err; /* XXX */
- /*
+ /*
* The SMS generator data is on the stack. We _MUST_ make sure the generator
* is stopped before returning from this function.
*/
@@ -2083,4 +2083,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "SMS/PSTN handler");
-
diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c
index f3fc4c18f..f83e19f49 100644
--- a/apps/app_softhangup.c
+++ b/apps/app_softhangup.c
@@ -21,7 +21,7 @@
* \brief SoftHangup application
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -54,9 +54,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</option>
</optionlist>
</parameter>
- </syntax>
+ </syntax>
<description>
- <para>Hangs up the requested channel. If there are no channels to
+ <para>Hangs up the requested channel. If there are no channels to
hangup, the application will report it.</para>
</description>
</application>
@@ -85,7 +85,7 @@ static int softhangup_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(options);
);
struct ast_channel_iterator *iter;
-
+
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SoftHangup requires an argument (Technology/resource)\n");
return 0;
@@ -106,7 +106,7 @@ static int softhangup_exec(struct ast_channel *chan, const char *data)
ast_channel_lock(c);
ast_copy_string(name, ast_channel_name(c), sizeof(name));
if (ast_test_flag(&flags, OPTION_ALL)) {
- /* CAPI is set up like CAPI[foo/bar]/clcnt */
+ /* CAPI is set up like CAPI[foo/bar]/clcnt */
if (!strcmp(ast_channel_tech(c)->type, "CAPI")) {
cut = strrchr(name, '/');
/* Basically everything else is Foo/Bar-Z */
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index d94603837..49b5b304b 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -109,7 +109,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
and ${SPEECH_SCORE(1)}.</para>
<para>The first argument is the sound file and the second is the timeout integer in seconds.</para>
<para>Hangs up the channel on failure. If this is not desired, use TryExec.</para>
-
+
</description>
</application>
<application name="SpeechDeactivateGrammar" language="en_US">
@@ -371,9 +371,9 @@ static int speech_score(struct ast_channel *chan, const char *cmd, char *data,
if (data == NULL || speech == NULL || !(result = find_result(speech->results, data))) {
return -1;
}
-
+
snprintf(tmp, sizeof(tmp), "%d", result->score);
-
+
ast_copy_string(buf, tmp, len);
return 0;
@@ -681,10 +681,10 @@ static int speech_streamfile(struct ast_channel *chan, const char *filename, con
if (!(fs = ast_openstream(chan, filename, preflang)))
return -1;
-
+
if (ast_applystream(chan, fs))
return -1;
-
+
ast_playstream(fs);
return 0;
@@ -756,7 +756,7 @@ static int speech_background(struct ast_channel *chan, const char *data)
if ((tmp2 = pbx_builtin_getvar_helper(chan, "SPEECH_DTMF_MAXLEN")) && !ast_strlen_zero(tmp2)) {
max_dtmf_len = atoi(tmp2);
}
-
+
/* See if a terminator is specified */
if ((tmp2 = pbx_builtin_getvar_helper(chan, "SPEECH_DTMF_TERMINATOR"))) {
if (ast_strlen_zero(tmp2))
@@ -975,7 +975,7 @@ static int unload_module(void)
res |= ast_custom_function_unregister(&speech_engine_function);
res |= ast_custom_function_unregister(&speech_results_type_function);
- return res;
+ return res;
}
static int load_module(void)
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 253f41310..4cade64d2 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -21,7 +21,7 @@
* \brief Stack applications Gosub, Return, etc.
*
* \author Tilghman Lesher <app_stack_v003@the-tilghman.com>
- *
+ *
* \ingroup applications
*/
@@ -31,7 +31,7 @@
***/
#include "asterisk.h"
-
+
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
@@ -305,7 +305,7 @@ static void gosub_release_frame(struct ast_channel *chan, struct gosub_stack_fra
*/
while ((vardata = AST_LIST_REMOVE_HEAD(&frame->varshead, entries))) {
if (chan)
- pbx_builtin_setvar_helper(chan, ast_var_name(vardata), NULL);
+ pbx_builtin_setvar_helper(chan, ast_var_name(vardata), NULL);
ast_var_delete(vardata);
}
diff --git a/apps/app_system.c b/apps/app_system.c
index e868a07dc..481ce6052 100644
--- a/apps/app_system.c
+++ b/apps/app_system.c
@@ -21,7 +21,7 @@
* \brief Execute arbitrary system commands
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -149,14 +149,14 @@ static int system_exec_helper(struct ast_channel *chan, const char *data, int fa
pbx_builtin_setvar_helper(chan, chanvar, "FAILURE");
res = failmode;
} else {
- if (res < 0)
+ if (res < 0)
res = 0;
if (res != 0)
pbx_builtin_setvar_helper(chan, chanvar, "APPERROR");
else
pbx_builtin_setvar_helper(chan, chanvar, "SUCCESS");
res = 0;
- }
+ }
ast_autoservice_stop(chan);
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c
index f7086fdd9..36df6aac1 100644
--- a/apps/app_talkdetect.c
+++ b/apps/app_talkdetect.c
@@ -21,7 +21,7 @@
* \brief Playback a file with audio detect
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -173,7 +173,7 @@ static int background_detect_exec(struct ast_channel *chan, const char *data)
ast_verb(3, "BackgroundDetect: Talk analysis time complete on %s.\n", ast_channel_name(chan));
}
}
-
+
if (!fr) {
res = -1;
break;
@@ -205,8 +205,8 @@ static int background_detect_exec(struct ast_channel *chan, const char *data)
char ms_str[12];
ast_debug(1, "Found qualified token of %d ms\n", ms);
- /* Save detected talk time (in milliseconds) */
- snprintf(ms_str, sizeof(ms_str), "%d", ms);
+ /* Save detected talk time (in milliseconds) */
+ snprintf(ms_str, sizeof(ms_str), "%d", ms);
pbx_builtin_setvar_helper(chan, "TALK_DETECTED", ms_str);
ast_goto_if_exists(chan, ast_channel_context(chan), "talk", 1);
@@ -236,7 +236,7 @@ static int background_detect_exec(struct ast_channel *chan, const char *data)
if (res > -1) {
if (origrformat && ast_set_read_format(chan, origrformat)) {
- ast_log(LOG_WARNING, "Failed to restore read format for %s to %s\n",
+ ast_log(LOG_WARNING, "Failed to restore read format for %s to %s\n",
ast_channel_name(chan), ast_format_get_name(origrformat));
}
}
@@ -257,4 +257,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Playback with Talk Detection");
-
diff --git a/apps/app_test.c b/apps/app_test.c
index 410d68606..a5494c546 100644
--- a/apps/app_test.c
+++ b/apps/app_test.c
@@ -23,7 +23,7 @@
*
* \author Mark Spencer <markster@digium.com>
* \author Russell Bryant <russelb@clemson.edu>
- *
+ *
* \ingroup applications
*/
@@ -499,4 +499,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Interface Test Application");
-
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index 1b8108278..1c0b16e31 100644
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -21,7 +21,7 @@
* \brief Transfer a caller
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* Requires transfer support from channel driver
*
* \ingroup applications
@@ -53,7 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</syntax>
<description>
<para>Requests the remote caller be transferred
- to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only
+ to a given destination. If TECH (SIP, IAX2, etc) is used, only
an incoming call with the same channel technology will be transferred.
Note that for SIP, if you transfer before call is setup, a 302 redirect
SIP message will be returned to the caller.</para>
diff --git a/apps/app_url.c b/apps/app_url.c
index d5dd70176..6058e38e0 100644
--- a/apps/app_url.c
+++ b/apps/app_url.c
@@ -21,14 +21,14 @@
* \brief App to transmit a URL
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -106,7 +106,7 @@ static int sendurl_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(url);
AST_APP_ARG(options);
);
-
+
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "SendURL requires an argument (URL)\n");
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", status);
@@ -118,7 +118,7 @@ static int sendurl_exec(struct ast_channel *chan, const char *data)
AST_STANDARD_APP_ARGS(args, tmp);
if (args.argc == 2)
ast_app_parse_options(app_opts, &flags, opts, args.options);
-
+
if (!ast_channel_supports_html(chan)) {
/* Does not support transport */
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", "UNSUPPORTED");
@@ -134,7 +134,7 @@ static int sendurl_exec(struct ast_channel *chan, const char *data)
for(;;) {
/* Wait for an event */
res = ast_waitfor(chan, -1);
- if (res < 0)
+ if (res < 0)
break;
f = ast_read(chan);
if (!f) {
@@ -163,8 +163,8 @@ static int sendurl_exec(struct ast_channel *chan, const char *data)
}
ast_frfree(f);
}
- }
-out:
+ }
+out:
pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", status);
return res;
}
@@ -180,4 +180,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Send URL Applications");
-
diff --git a/apps/app_userevent.c b/apps/app_userevent.c
index 96a455cfb..ddc59503c 100644
--- a/apps/app_userevent.c
+++ b/apps/app_userevent.c
@@ -17,7 +17,7 @@
/*! \file
*
* \brief UserEvent application -- send manager event
- *
+ *
* \ingroup applications
*/
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c080bfee9..891b6f023 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -41,7 +41,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page voicemail.conf voicemail.conf
* \verbinclude voicemail.conf.sample
*/
@@ -796,7 +796,7 @@ struct baseio {
unsigned char iobuf[BASEMAXINLINE];
};
-/*! Structure for linked list of users
+/*! Structure for linked list of users
* Use ast_vm_user_destroy() to free one of these structures. */
struct ast_vm_user {
char context[AST_MAX_CONTEXT]; /*!< Voicemail context */
@@ -915,7 +915,7 @@ static char odbc_table[80];
#define STORE(a,b,c,d,e,f,g,h,i,j,k)
#define EXISTS(a,b,c,d) (ast_fileexists(c,NULL,d) > 0)
#define RENAME(a,b,c,d,e,f,g,h) (rename_file(g,h));
-#define COPY(a,b,c,d,e,f,g,h) (copy_plain_file(g,h));
+#define COPY(a,b,c,d,e,f,g,h) (copy_plain_file(g,h));
#define DELETE(a,b,c,d) (vm_delete(c))
#define UPDATE_MSG_ID(a, b, c, d, e, f)
#endif
@@ -969,7 +969,7 @@ static int maxdeletedmsg;
static int silencethreshold = 128;
static char serveremail[80];
static char mailcmd[160]; /* Configurable mail cmd */
-static char externnotify[160];
+static char externnotify[160];
static struct ast_smdi_interface *smdi_iface = NULL;
static char vmfmts[80];
static double volgain;
@@ -1298,11 +1298,11 @@ static void populate_defaults(struct ast_vm_user *vmu)
}
/*!
- * \brief Sets a a specific property value.
+ * \brief Sets a specific property value.
* \param vmu The voicemail user object to work with.
* \param var The name of the property to be set.
* \param value The value to be set to the property.
- *
+ *
* The property name must be one of the understood properties. See the source for details.
*/
static void apply_option(struct ast_vm_user *vmu, const char *var, const char *value)
@@ -1352,25 +1352,25 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
vmu->imapversion = imapversion;
#endif
} else if (!strcasecmp(var, "delete") || !strcasecmp(var, "deletevoicemail")) {
- ast_set2_flag(vmu, ast_true(value), VM_DELETE);
+ ast_set2_flag(vmu, ast_true(value), VM_DELETE);
} else if (!strcasecmp(var, "saycid")){
- ast_set2_flag(vmu, ast_true(value), VM_SAYCID);
+ ast_set2_flag(vmu, ast_true(value), VM_SAYCID);
} else if (!strcasecmp(var, "sendvoicemail")){
- ast_set2_flag(vmu, ast_true(value), VM_SVMAIL);
+ ast_set2_flag(vmu, ast_true(value), VM_SVMAIL);
} else if (!strcasecmp(var, "review")){
ast_set2_flag(vmu, ast_true(value), VM_REVIEW);
} else if (!strcasecmp(var, "tempgreetwarn")){
- ast_set2_flag(vmu, ast_true(value), VM_TEMPGREETWARN);
+ ast_set2_flag(vmu, ast_true(value), VM_TEMPGREETWARN);
} else if (!strcasecmp(var, "messagewrap")){
- ast_set2_flag(vmu, ast_true(value), VM_MESSAGEWRAP);
+ ast_set2_flag(vmu, ast_true(value), VM_MESSAGEWRAP);
} else if (!strcasecmp(var, "operator")) {
- ast_set2_flag(vmu, ast_true(value), VM_OPERATOR);
+ ast_set2_flag(vmu, ast_true(value), VM_OPERATOR);
} else if (!strcasecmp(var, "envelope")){
- ast_set2_flag(vmu, ast_true(value), VM_ENVELOPE);
+ ast_set2_flag(vmu, ast_true(value), VM_ENVELOPE);
} else if (!strcasecmp(var, "moveheard")){
ast_set2_flag(vmu, ast_true(value), VM_MOVEHEARD);
} else if (!strcasecmp(var, "sayduration")){
- ast_set2_flag(vmu, ast_true(value), VM_SAYDURATION);
+ ast_set2_flag(vmu, ast_true(value), VM_SAYDURATION);
} else if (!strcasecmp(var, "saydurationm")){
if (sscanf(value, "%30d", &x) == 1) {
vmu->saydurationm = x;
@@ -1378,9 +1378,9 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
ast_log(AST_LOG_WARNING, "Invalid min duration for say duration\n");
}
} else if (!strcasecmp(var, "forcename")){
- ast_set2_flag(vmu, ast_true(value), VM_FORCENAME);
+ ast_set2_flag(vmu, ast_true(value), VM_FORCENAME);
} else if (!strcasecmp(var, "forcegreetings")){
- ast_set2_flag(vmu, ast_true(value), VM_FORCEGREET);
+ ast_set2_flag(vmu, ast_true(value), VM_FORCEGREET);
} else if (!strcasecmp(var, "callback")) {
ast_copy_string(vmu->callback, value, sizeof(vmu->callback));
} else if (!strcasecmp(var, "dialout")) {
@@ -1444,7 +1444,7 @@ static void apply_option(struct ast_vm_user *vmu, const char *var, const char *v
}
}
-static char *vm_check_password_shell(char *command, char *buf, size_t len)
+static char *vm_check_password_shell(char *command, char *buf, size_t len)
{
int fds[2], pid = 0;
@@ -1482,7 +1482,7 @@ static char *vm_check_password_shell(char *command, char *buf, size_t len)
AST_NONSTANDARD_APP_ARGS(arg, mycmd, ' ');
- execv(arg.v[0], arg.v);
+ execv(arg.v[0], arg.v);
printf("FAILURE: %s", strerror(errno));
_exit(0);
}
@@ -1528,11 +1528,11 @@ static int check_password(struct ast_vm_user *vmu, char *password)
return 0;
}
-/*!
+/*!
* \brief Performs a change of the voicemail passowrd in the realtime engine.
* \param vmu The voicemail user to change the password for.
* \param password The new value to be set to the password for this user.
- *
+ *
* This only works if there is a realtime engine configured.
* This is called from the (top level) vm_change_password.
*
@@ -1561,7 +1561,7 @@ static int change_password_realtime(struct ast_vm_user *vmu, const char *passwor
* \brief Destructively Parse options and apply.
*/
static void apply_options(struct ast_vm_user *vmu, const char *options)
-{
+{
char *stringp;
char *s;
char *var, *value;
@@ -1571,12 +1571,12 @@ static void apply_options(struct ast_vm_user *vmu, const char *options)
if ((var = strsep(&value, "=")) && value) {
apply_option(vmu, var, value);
}
- }
+ }
}
/*!
* \brief Loads the options specific to a voicemail user.
- *
+ *
* This is called when a vm_user structure is being set up, such as from load_options.
*/
static void apply_options_full(struct ast_vm_user *retval, struct ast_variable *var)
@@ -1642,7 +1642,7 @@ static void apply_options_full(struct ast_vm_user *retval, struct ast_variable *
* \brief Determines if a DTMF key entered is valid.
* \param key The character to be compared. expects a single character. Though is capable of handling a string, this is internally copies using ast_strdupa.
*
- * Tests the character entered against the set of valid DTMF characters.
+ * Tests the character entered against the set of valid DTMF characters.
* \return 1 if the character entered is a valid DTMF digit, 0 if the character is invalid.
*/
static int is_valid_dtmf(const char *key)
@@ -1694,12 +1694,12 @@ static struct ast_vm_user *find_user_realtime(struct ast_vm_user *ivm, const cha
if (var) {
apply_options_full(retval, var);
ast_variables_destroy(var);
- } else {
- if (!ivm)
+ } else {
+ if (!ivm)
ast_free(retval);
retval = NULL;
- }
- }
+ }
+ }
return retval;
}
@@ -1708,7 +1708,7 @@ static struct ast_vm_user *find_user_realtime(struct ast_vm_user *ivm, const cha
* \param ivm
* \param context
* \param mailbox
- *
+ *
* \return The ast_vm_user structure for the user that was found.
*/
static struct ast_vm_user *find_user(struct ast_vm_user *ivm, const char *context, const char *mailbox)
@@ -1787,7 +1787,7 @@ static inline int valid_config(const struct ast_config *cfg)
return cfg && cfg != CONFIG_STATUS_FILEINVALID;
}
-/*!
+/*!
* \brief The handler for the change password option.
* \param vmu The voicemail user to work with.
* \param newpassword The new password (that has been gathered from the appropriate prompting).
@@ -1915,15 +1915,15 @@ static void vm_change_password_shell(struct ast_vm_user *vmu, char *newpassword)
}
}
-/*!
+/*!
* \brief Creates a file system path expression for a folder within the voicemail data folder and the appropriate context.
* \param dest The variable to hold the output generated path expression. This buffer should be of size PATH_MAX.
* \param len The length of the path string that was written out.
* \param context
- * \param ext
- * \param folder
- *
- * The path is constructed as
+ * \param ext
+ * \param folder
+ *
+ * The path is constructed as
* VM_SPOOL_DIRcontext/ext/folder
*
* \return zero on success, -1 on error.
@@ -1933,14 +1933,14 @@ static int make_dir(char *dest, int len, const char *context, const char *ext, c
return snprintf(dest, len, "%s%s/%s/%s", VM_SPOOL_DIR, context, ext, folder);
}
-/*!
+/*!
* \brief Creates a file system path expression for a folder within the voicemail data folder and the appropriate context.
* \param dest The variable to hold the output generated path expression. This buffer should be of size PATH_MAX.
* \param len The length of the path string that was written out.
- * \param dir
- * \param num
- *
- * The path is constructed as
+ * \param dir
+ * \param num
+ *
+ * The path is constructed as
* VM_SPOOL_DIRcontext/ext/folder
*
* \return zero on success, -1 on error.
@@ -1971,7 +1971,7 @@ static FILE *vm_mkftemp(char *template)
* \param len Length of dest.
* \param context String. Ignored if is null or empty string.
* \param ext String. Ignored if is null or empty string.
- * \param folder String. Ignored if is null or empty string.
+ * \param folder String. Ignored if is null or empty string.
* \return -1 on failure, 0 on success.
*/
static int create_dirpath(char *dest, int len, const char *context, const char *ext, const char *folder)
@@ -2205,9 +2205,9 @@ static int imap_retrieve_greeting(const char *dir, const int msgnum, struct ast_
}
/* check if someone is accessing this box right now... */
- if (!(vms_p = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 1)) &&
+ if (!(vms_p = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 1)) &&
!(vms_p = get_vm_state_by_mailbox(vmu->mailbox, vmu->context, 0))) {
- /* Unlike when retrieving a message, it is reasonable not to be able to find a
+ /* Unlike when retrieving a message, it is reasonable not to be able to find a
* vm_state for a mailbox when trying to retrieve a greeting. Just create one,
* that's all we need to do.
*/
@@ -2360,7 +2360,7 @@ static int imap_retrieve_file(const char *dir, const int msgnum, const char *mai
res = -1;
goto exit;
}
-
+
/* Find the format of the attached file */
strsep(&attachedfilefmt, ".");
@@ -2369,7 +2369,7 @@ static int imap_retrieve_file(const char *dir, const int msgnum, const char *mai
res = -1;
goto exit;
}
-
+
save_body(body, vms, "2", attachedfilefmt, 0);
if (save_body(body, vms, "3", attachedfilefmt, 1)) {
*vms->introfn = '\0';
@@ -2459,7 +2459,7 @@ static int __messagecount(const char *context, const char *mailbox, const char *
int ret = 0;
int fold = folder_int(folder);
int urgent = 0;
-
+
/* If URGENT, then look at INBOX */
if (fold == 11) {
fold = NEW_FOLDER;
@@ -2607,7 +2607,7 @@ static int imap_check_limits(struct ast_channel *chan, struct vm_state *vms, str
* \brief Gets the number of messages that exist in a mailbox folder.
* \param mailbox_id
* \param folder
- *
+ *
* This method is used when IMAP backend is used.
* \return The number of messages in this mailbox folder (zero or more).
*/
@@ -2773,7 +2773,7 @@ static int imap_store_file(const char *dir, const char *mailboxuser, const char
* \param newmsgs The variable that is updated with the count of new messages within this inbox.
* \param oldmsgs The variable that is updated with the count of old messages within this inbox.
* \param urgentmsgs The variable that is updated with the count of urgent messages within this inbox.
- *
+ *
* This method is used when IMAP backend is used.
* Simultaneously determines the count of new,old, and urgent messages. The total messages would then be the sum of these three.
*
@@ -2811,7 +2811,7 @@ static int inboxcount2(const char *mailbox_context, int *urgentmsgs, int *newmsg
return -1;
else {
if (newmsgs)
- *newmsgs += tmpnew;
+ *newmsgs += tmpnew;
if (oldmsgs)
*oldmsgs += tmpold;
if (urgentmsgs)
@@ -2855,7 +2855,7 @@ static int inboxcount2(const char *mailbox_context, int *urgentmsgs, int *newmsg
return 0;
}
-/**
+/**
* \brief Determines if the given folder has messages.
* \param mailbox The @ delimited string for user@context. If no context is found, uses 'default' for the context.
* \param folder the folder to look in
@@ -2933,7 +2933,7 @@ static void imap_mailbox_name(char *spec, size_t len, struct vm_state *vms, int
{
char tmp[256], *t = tmp;
size_t left = sizeof(tmp);
-
+
if (box == OLD_FOLDER) {
ast_copy_string(vms->curbox, mbox(NULL, NEW_FOLDER), sizeof(vms->curbox));
} else {
@@ -3628,7 +3628,7 @@ static void vmstate_delete(struct vm_state *vms)
}
AST_LIST_TRAVERSE_SAFE_END
AST_LIST_UNLOCK(&vmstates);
-
+
if (vc) {
ast_mutex_destroy(&vc->vms->lock);
ast_free(vc->vms->msgArray);
@@ -3707,8 +3707,8 @@ static int save_body(BODY *body, struct vm_state *vms, char *section, char *form
return 0;
}
-/*!
- * \brief Get delimiter via mm_list callback
+/*!
+ * \brief Get delimiter via mm_list callback
* \param vms The voicemail state object
* \param stream
*
@@ -3721,8 +3721,8 @@ static void get_mailbox_delimiter(struct vm_state *vms, MAILSTREAM *stream) {
mail_list(stream, tmp, "*");
}
-/*!
- * \brief Check Quota for user
+/*!
+ * \brief Check Quota for user
* \param vms a pointer to a vm_state struct, will use the mailstream property of this.
* \param mailbox the mailbox to check the quota for.
*
@@ -4490,7 +4490,7 @@ static void rename_file(char *sdir, int smsg, char *mailboxuser, char *mailboxco
*
* Removes the message content file and the information file.
* This method is used by the DISPOSE macro when mailboxes are stored in an ODBC back end.
- * Typical use is to clean up after a RETRIEVE operation.
+ * Typical use is to clean up after a RETRIEVE operation.
* Note that this does not remove the message from the mailbox folders, to do that we would use delete_file().
* \return zero on success, -1 on error.
*/
@@ -4499,13 +4499,13 @@ static int remove_file(char *dir, int msgnum)
char fn[PATH_MAX];
char full_fn[PATH_MAX];
char msgnums[80];
-
+
if (msgnum > -1) {
snprintf(msgnums, sizeof(msgnums), "%d", msgnum);
make_file(fn, sizeof(fn), dir, msgnum);
} else
ast_copy_string(fn, dir, sizeof(fn));
- ast_filedelete(fn, NULL);
+ ast_filedelete(fn, NULL);
snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
unlink(full_fn);
return 0;
@@ -4540,7 +4540,7 @@ static int count_messages(struct ast_vm_user *vmu, char *dir)
closedir(vmdir);
}
ast_unlock_path(dir);
-
+
return vmcount;
}
@@ -4564,9 +4564,9 @@ static void rename_file(char *sfn, char *dfn)
rename(stxt, dtxt);
}
-/*!
+/*!
* \brief Determines the highest message number in use for a given user and mailbox folder.
- * \param vmu
+ * \param vmu
* \param dir the folder the mailbox folder to look for messages. Used to construct the SQL where clause.
*
* This method is used when mailboxes are stored on the filesystem. (not ODBC and not IMAP).
@@ -4630,55 +4630,62 @@ static int copy(char *infile, char *outfile)
{
int ifd;
int ofd;
- int res;
+ int res = -1;
int len;
char buf[4096];
#ifdef HARDLINK_WHEN_POSSIBLE
/* Hard link if possible; saves disk space & is faster */
- if (link(infile, outfile)) {
+ if (!link(infile, outfile)) {
+ return 0;
+ }
#endif
- if ((ifd = open(infile, O_RDONLY)) < 0) {
- ast_log(AST_LOG_WARNING, "Unable to open %s in read-only mode: %s\n", infile, strerror(errno));
- return -1;
+
+ if ((ifd = open(infile, O_RDONLY)) < 0) {
+ ast_log(AST_LOG_WARNING, "Unable to open %s in read-only mode: %s\n", infile, strerror(errno));
+ return -1;
+ }
+
+ if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, VOICEMAIL_FILE_MODE)) < 0) {
+ ast_log(AST_LOG_WARNING, "Unable to open %s in write-only mode: %s\n", outfile, strerror(errno));
+ close(ifd);
+ return -1;
+ }
+
+ for (;;) {
+ int wrlen;
+
+ len = read(ifd, buf, sizeof(buf));
+ if (!len) {
+ res = 0;
+ break;
}
- if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, VOICEMAIL_FILE_MODE)) < 0) {
- ast_log(AST_LOG_WARNING, "Unable to open %s in write-only mode: %s\n", outfile, strerror(errno));
- close(ifd);
- return -1;
+
+ if (len < 0) {
+ ast_log(AST_LOG_WARNING, "Read failed on %s: %s\n", infile, strerror(errno));
+ break;
+ }
+
+ wrlen = write(ofd, buf, len);
+ if (errno == ENOMEM || errno == ENOSPC || wrlen != len) {
+ ast_log(AST_LOG_WARNING, "Write failed on %s (%d of %d): %s\n", outfile, wrlen, len, strerror(errno));
+ break;
}
- do {
- len = read(ifd, buf, sizeof(buf));
- if (len < 0) {
- ast_log(AST_LOG_WARNING, "Read failed on %s: %s\n", infile, strerror(errno));
- close(ifd);
- close(ofd);
- unlink(outfile);
- } else if (len) {
- res = write(ofd, buf, len);
- if (errno == ENOMEM || errno == ENOSPC || res != len) {
- ast_log(AST_LOG_WARNING, "Write failed on %s (%d of %d): %s\n", outfile, res, len, strerror(errno));
- close(ifd);
- close(ofd);
- unlink(outfile);
- }
- }
- } while (len);
- close(ifd);
- close(ofd);
- return 0;
-#ifdef HARDLINK_WHEN_POSSIBLE
- } else {
- /* Hard link succeeded */
- return 0;
}
-#endif
+
+ close(ifd);
+ close(ofd);
+ if (res) {
+ unlink(outfile);
+ }
+
+ return res;
}
/*!
* \brief Copies a voicemail information (envelope) file.
* \param frompath
- * \param topath
+ * \param topath
*
* Every voicemail has the data (.wav) file, and the information file.
* This function performs the file system copying of the information file for a voicemail, handling the internal fields and their values.
@@ -4727,9 +4734,9 @@ static void copy_plain_file(char *frompath, char *topath)
}
#endif
-/*!
+/*!
* \brief Removes the voicemail sound and information file.
- * \param file The path to the sound file. This will be the the folder and message index, without the extension.
+ * \param file The path to the sound file. This will be the folder and message index, without the extension.
*
* This is used by the DELETE macro when voicemails are stored on the file system.
*
@@ -4873,7 +4880,7 @@ static int base_encode(char *filename, FILE *so)
}
fclose(fi);
-
+
if (fputs(ENDL, so) == EOF) {
return 0;
}
@@ -4940,7 +4947,7 @@ static void prep_email_sub_vars(struct ast_channel *ast, struct ast_vm_user *vmu
* \param from The string to work with.
* \param buf The buffer into which to write the modified quoted string.
* \param maxlen Always zero, but see \see ast_str
- *
+ *
* \return The destination string with quotes wrapped on it (the to field).
*/
static const char *ast_str_quote(struct ast_str **buf, ssize_t maxlen, const char *from)
@@ -5054,13 +5061,13 @@ static const char *ast_str_encode_mime(struct ast_str **end, ssize_t maxlen, con
* \param srcemail The email address to send the email to, presumably the email address for the owner of the mailbox.
* \param vmu The voicemail user who is sending the voicemail.
* \param msgnum The message index in the mailbox folder.
- * \param context
+ * \param context
* \param mailbox The voicemail box to read the voicemail to be notified in this email.
* \param fromfolder
* \param cidnum The caller ID number.
* \param cidname The caller ID name.
* \param attach the name of the sound file to be attached to the email, if attach_user_voicemail == 1.
- * \param attach2
+ * \param attach2
* \param format The message sound file format. i.e. .wav
* \param duration The time of the message content, in seconds.
* \param attach_user_voicemail if 1, the sound file is attached to the email.
@@ -5099,7 +5106,7 @@ static void make_email_file(FILE *p,
struct ast_tm tm;
char enc_cidnum[256] = "", enc_cidname[256] = "";
struct ast_str *str1 = ast_str_create(16), *str2 = ast_str_create(16);
- char *greeting_attachment;
+ char *greeting_attachment;
char filename[256];
int first_line;
char *emailsbuf;
@@ -5373,6 +5380,7 @@ plain_message:
static int add_email_attachment(FILE *p, struct ast_vm_user *vmu, char *format, char *attach, char *greeting_attachment, char *mailbox, char *bound, char *filename, int last, int msgnum)
{
char fname[PATH_MAX] = "";
+ char sox_gain_tmpdir[PATH_MAX];
char *file_to_delete = NULL, *dir_to_delete = NULL;
int res;
@@ -5382,7 +5390,6 @@ static int add_email_attachment(FILE *p, struct ast_vm_user *vmu, char *format,
/* This 'while' loop will only execute once. We use it so that we can 'break' */
while (vmu->volgain < -.001 || vmu->volgain > .001) {
char tmpdir[PATH_MAX];
- char sox_gain_tmpdir[PATH_MAX];
create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vmu->mailbox, "tmp");
@@ -5665,9 +5672,9 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char
* \brief Gets the current date and time, as formatted string.
* \param s The buffer to hold the output formatted date.
* \param len the length of the buffer. Used to prevent buffer overflow in ast_strftime.
- *
+ *
* The date format string used is "%a %b %e %r UTC %Y".
- *
+ *
* \return zero on success, -1 on error.
*/
static int get_date(char *s, int len)
@@ -5887,10 +5894,10 @@ bail:
return nummsgs;
}
-/**
+/**
* \brief Determines if the given folder has messages.
* \param mailbox The @ delimited string for user@context. If no context is found, uses 'default' for the context.
- *
+ *
* This function is used when the mailbox is stored in an ODBC back end.
* This invokes the messagecount(). Here we are interested in the presence of messages (> 0) only, not the actual count.
* \return 1 if the folder has one or more messages. zero otherwise.
@@ -5910,7 +5917,7 @@ static int has_voicemail(const char *mailboxes, const char *folder)
}
#endif
#ifndef IMAP_STORAGE
-/*!
+/*!
* \brief Copies a message from one mailbox to another.
* \param chan
* \param vmu
@@ -6042,7 +6049,7 @@ static int __has_voicemail(const char *context, const char *mailbox, const char
return ret;
}
-/**
+/**
* \brief Determines if the given folder has messages.
* \param mailbox The \@ delimited string for user\@context. If no context is found, uses 'default' for the context.
* \param folder the folder to look in
@@ -6102,7 +6109,7 @@ static int inboxcount2(const char *mailbox, int *urgentmsgs, int *newmsgs, int *
return -1;
else {
if (newmsgs)
- *newmsgs += tmpnew;
+ *newmsgs += tmpnew;
if (oldmsgs)
*oldmsgs += tmpold;
if (urgentmsgs)
@@ -6114,7 +6121,7 @@ static int inboxcount2(const char *mailbox, int *urgentmsgs, int *newmsgs, int *
}
ast_copy_string(tmp, mailbox, sizeof(tmp));
-
+
if ((context = strchr(tmp, '@')))
*context++ = '\0';
else
@@ -6156,7 +6163,7 @@ static void run_externnotify(char *context, char *extension, const char *flag)
ast_copy_string(ext_context, extension, sizeof(ext_context));
if (smdi_iface) {
- if (ast_app_has_voicemail(ext_context, NULL))
+ if (ast_app_has_voicemail(ext_context, NULL))
ast_smdi_mwi_set(smdi_iface, extension);
else
ast_smdi_mwi_unset(smdi_iface, extension);
@@ -6504,9 +6511,9 @@ static int msg_create_from_file(struct ast_vm_recording_data *recdata)
* \param chan
* \param ext
* \param options OPT_BUSY_GREETING, OPT_UNAVAIL_GREETING
- *
- *
- *
+ *
+ *
+ *
* \return zero on success, -1 on error.
*/
static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_options *options)
@@ -6603,7 +6610,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
else
ast_copy_string(ext_context, vmu->mailbox, sizeof(ext_context));
- /* Set the path to the prefile. Will be one of
+ /* Set the path to the prefile. Will be one of
VM_SPOOL_DIRcontext/ext/busy
VM_SPOOL_DIRcontext/ext/unavail
Depending on the flag set in options.
@@ -6690,11 +6697,11 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
/* Play the beginning intro if desired */
if (!ast_strlen_zero(prefile)) {
#ifdef ODBC_STORAGE
- int success =
+ int success =
#endif
RETRIEVE(prefile, -1, ext, context);
if (ast_fileexists(prefile, NULL, NULL) > 0) {
- if (ast_streamfile(chan, prefile, ast_channel_language(chan)) > -1)
+ if (ast_streamfile(chan, prefile, ast_channel_language(chan)) > -1)
res = ast_waitstream(chan, ecodes);
#ifdef ODBC_STORAGE
if (success == -1) {
@@ -6859,7 +6866,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
/* Unless we're *really* silent, try to send the beep */
res = ast_stream_and_wait(chan, "beep", "");
}
-
+
/* Store information in real-time storage */
if (ast_check_realtime("voicemail_data")) {
snprintf(priority, sizeof(priority), "%d", ast_channel_priority(chan));
@@ -6893,7 +6900,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL),
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),
"Unknown");
- fprintf(txt,
+ fprintf(txt,
";\n"
"; Message Information file\n"
";\n"
@@ -6912,7 +6919,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
"msg_id=%s\n",
ext,
ast_channel_context(chan),
- ast_channel_macrocontext(chan),
+ ast_channel_macrocontext(chan),
ast_channel_exten(chan),
S_COR(ast_channel_redirecting(chan)->from.number.valid,
ast_channel_redirecting(chan)->from.number.str, "unknown"),
@@ -6967,7 +6974,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
#endif
make_file(fn, sizeof(fn), dir, msgnum);
- /* assign a variable with the name of the voicemail file */
+ /* assign a variable with the name of the voicemail file */
#ifndef IMAP_STORAGE
pbx_builtin_setvar_helper(chan, "VM_MESSAGEFILE", fn);
#else
@@ -7078,7 +7085,7 @@ leave_vm_out:
#ifdef HAVE_IMAP_TK2006
if (LEVELUIDPLUS (vms->mailstream)) {
mail_expunge_full(vms->mailstream, NIL, EX_UID);
- } else
+ } else
#endif
mail_expunge(vms->mailstream);
ast_mutex_unlock(&vms->lock);
@@ -7458,7 +7465,7 @@ static void adsi_folders(struct ast_channel *chan, int start, char *label)
static void adsi_message(struct ast_channel *chan, struct vm_state *vms)
{
int bytes = 0;
- unsigned char buf[256];
+ unsigned char buf[256];
char buf1[256], buf2[256];
char fn2[PATH_MAX];
@@ -7479,7 +7486,7 @@ static void adsi_message(struct ast_channel *chan, struct vm_state *vms)
snprintf(fn2, sizeof(fn2), "%s.txt", vms->fn);
f = fopen(fn2, "r");
if (f) {
- while (!feof(f)) {
+ while (!feof(f)) {
if (!fgets((char *) buf, sizeof(buf), f)) {
continue;
}
@@ -7695,7 +7702,7 @@ static void adsi_status2(struct ast_channel *chan, struct vm_state *vms)
bytes += ast_adsi_voice_mode(buf + bytes, 0);
ast_adsi_transmit_message(chan, buf, bytes, ADSI_MSG_DISPLAY);
-
+
}
/*
@@ -7812,9 +7819,9 @@ static int get_folder_ja(struct ast_channel *chan, int start)
* \param start Does not appear to be used at this time.
*
* This is used by the main menu option to move a message to a folder or to save a message into a folder.
- * After playing the message identified by the fn parameter value, it calls get_folder(), which plays the
+ * After playing the message identified by the fn parameter value, it calls get_folder(), which plays the
* prompting for the number inputs that correspond to the available folders.
- *
+ *
* \return zero on success, or -1 on error.
*/
static int get_folder2(struct ast_channel *chan, char *fn, int start)
@@ -7853,7 +7860,7 @@ static int get_folder2(struct ast_channel *chan, char *fn, int start)
* \param record_gain
* \param duration
* \param vms
- * \param flag
+ * \param flag
*
* Presents a prompt for 1 to prepend the current message, 2 to forward the message without prepending, or * to return to the main menu.
*
@@ -7895,7 +7902,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
if (cmd)
retries = 0;
switch (cmd) {
- case '1':
+ case '1':
#ifdef IMAP_STORAGE
/* Record new intro file */
@@ -7953,7 +7960,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
if (record_gain)
ast_channel_setoption(chan, AST_OPTION_RXGAIN, &zero_gain, sizeof(zero_gain), 0);
-
+
if ((duration_str = ast_variable_retrieve(msg_cfg, "message", "duration")))
*duration = atoi(duration_str);
@@ -7972,7 +7979,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
#endif
break;
- case '2':
+ case '2':
/* NULL out introfile so we know there is no intro! */
#ifdef IMAP_STORAGE
*vms->introfn = '\0';
@@ -7982,7 +7989,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu,
case '*':
cmd = '*';
break;
- default:
+ default:
/* If time_out and return to menu, reset already_recorded */
already_recorded = 0;
@@ -8117,7 +8124,7 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
DELETE(todir, msgnum, fn, vmu);
/* Leave voicemail for someone */
- if (ast_app_has_voicemail(ext_context, NULL))
+ if (ast_app_has_voicemail(ext_context, NULL))
ast_app_inboxcount2(ext_context, &urgentmsgs, &newmsgs, &oldmsgs);
queue_mwi_event(ast_channel_uniqueid(chan), ext_context, urgentmsgs, newmsgs, oldmsgs);
@@ -8141,17 +8148,17 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
* \param vms
* \param sender
* \param fmt
- * \param is_new_message Used to indicate the mode for which this method was invoked.
+ * \param is_new_message Used to indicate the mode for which this method was invoked.
* Will be 0 when called to forward an existing message (option 8)
* Will be 1 when called to leave a message (option 3->5)
- * \param record_gain
+ * \param record_gain
* \param urgent
*
* Reads the destination mailbox(es) from keypad input for CID, or if use_directory feature is enabled, the Directory.
- *
+ *
* When in the leave message mode (is_new_message == 1):
* - allow the leaving of a message for ourselves. (Will not allow us to forward a message to ourselves, when is_new_message == 0).
- * - attempt to determine the context and and mailbox, and then invoke leave_message() function to record and store the message.
+ * - attempt to determine the context and mailbox, and then invoke leave_message() function to record and store the message.
*
* When in the forward message mode (is_new_message == 0):
* - retrieves the current message to be forwarded
@@ -8204,19 +8211,19 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
if (cmd)
retries = 0;
switch (cmd) {
- case '1':
+ case '1':
use_directory = 0;
done = 1;
break;
- case '2':
+ case '2':
use_directory = 1;
done = 1;
break;
- case '*':
+ case '*':
cmd = 't';
done = 1;
break;
- default:
+ default:
/* Press 1 to enter an extension press 2 to use the directory */
cmd = ast_play_and_wait(chan, "vm-forward");
if (!cmd) {
@@ -8252,7 +8259,7 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
old_exten = ast_strdupa(ast_channel_exten(chan));
old_priority = ast_channel_priority(chan);
- /* call the the Directory, changes the channel */
+ /* call the Directory, changes the channel */
snprintf(vmcontext, sizeof(vmcontext), "%s,,v", context ? context : "default");
res = pbx_exec(chan, directory_app, vmcontext);
@@ -8410,7 +8417,7 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
#ifdef IMAP_STORAGE
int attach_user_voicemail;
char *myserveremail = serveremail;
-
+
/* get destination mailbox */
dstvms = get_vm_state_by_mailbox(vmtmp->mailbox, vmtmp->context, 0);
if (!dstvms) {
@@ -8422,7 +8429,7 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
ast_log(AST_LOG_ERROR, "IMAP mailstream for %s is NULL\n", vmtmp->mailbox);
} else {
copy_msg_result = STORE(vmstmp.curdir, vmtmp->mailbox, vmtmp->context, curmsg, chan, vmtmp, fmt, duration, dstvms, urgent_str, msg_id);
- run_externnotify(vmtmp->context, vmtmp->mailbox, urgent_str);
+ run_externnotify(vmtmp->context, vmtmp->mailbox, urgent_str);
}
} else {
ast_log(AST_LOG_ERROR, "Could not find state information for mailbox %s\n", vmtmp->mailbox);
@@ -8502,12 +8509,12 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
static int wait_file2(struct ast_channel *chan, struct vm_state *vms, char *file)
{
int res;
- if ((res = ast_stream_and_wait(chan, file, AST_DIGIT_ANY)) < 0)
- ast_log(AST_LOG_WARNING, "Unable to play message %s\n", file);
+ if ((res = ast_stream_and_wait(chan, file, AST_DIGIT_ANY)) < 0)
+ ast_log(AST_LOG_WARNING, "Unable to play message %s\n", file);
return res;
}
-static int wait_file(struct ast_channel *chan, struct vm_state *vms, char *file)
+static int wait_file(struct ast_channel *chan, struct vm_state *vms, char *file)
{
ast_test_suite_event_notify("PLAYVOICE", "Message: Playing %s", file);
return ast_control_streamfile(chan, file, listen_control_forward_key, listen_control_reverse_key, listen_control_stop_key, listen_control_pause_key, listen_control_restart_key, skipms, NULL);
@@ -8898,13 +8905,13 @@ static int imap_remove_file(char *dir, int msgnum)
char fn[PATH_MAX];
char full_fn[PATH_MAX];
char intro[PATH_MAX] = {0,};
-
+
if (msgnum > -1) {
make_file(fn, sizeof(fn), dir, msgnum);
snprintf(intro, sizeof(intro), "%sintro", fn);
} else
ast_copy_string(fn, dir, sizeof(fn));
-
+
if ((msgnum < 0 && imapgreetings) || msgnum > -1) {
ast_filedelete(fn, NULL);
if (!ast_strlen_zero(intro)) {
@@ -9250,7 +9257,7 @@ static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
if (vms->newmessages) {
res = ast_play_and_wait(chan, "vm-youhave");
- if (!res)
+ if (!res)
res = ast_say_number(chan, vms->newmessages, AST_DIGIT_ANY, ast_channel_language(chan), NULL);
if (!res) {
if (vms->newmessages == 1) {
@@ -9276,20 +9283,20 @@ static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
if (!res)
res = ast_play_and_wait(chan, "vm-messages");
}
- } else if (!vms->oldmessages && !vms->newmessages)
- res = ast_play_and_wait(chan, "vm-denExeteMynhmata");
+ } else if (!vms->oldmessages && !vms->newmessages)
+ res = ast_play_and_wait(chan, "vm-denExeteMynhmata");
return res;
}
/* Version of vm_intro() designed to work for many languages.
*
- * It is hoped that this function can prevent the proliferation of
+ * It is hoped that this function can prevent the proliferation of
* language-specific vm_intro() functions and in time replace the language-
* specific functions which already exist. An examination of the language-
* specific functions revealed that they all corrected the same deficiencies
* in vm_intro_en() (which was the default function). Namely:
*
- * 1) The vm-Old and vm-INBOX sound files were overloaded. The English
+ * 1) The vm-Old and vm-INBOX sound files were overloaded. The English
* wording of the voicemail greeting hides this problem. For example,
* vm-INBOX contains only the word "new". This means that both of these
* sequences produce valid utterances:
@@ -9315,7 +9322,7 @@ static int vm_intro_gr(struct ast_channel *chan, struct vm_state *vms)
* 3) Call ast_say_counted_adjective() to put the proper gender and number
* prefix on vm-new and vm-old (none for English).
* 4) Pass the gender of the language's word for "message" as an agument to
- * this function which is can in turn pass on to the functions which
+ * this function which is can in turn pass on to the functions which
* say numbers and put endings on nounds and adjectives.
*
* All languages require these messages:
@@ -9427,7 +9434,7 @@ static int vm_intro_he(struct ast_channel *chan, struct vm_state *vms)
if (vms->oldmessages == 2) {
res = ast_play_and_wait(chan, "vm-shtei");
} else {
- res = ast_say_number(chan, vms->oldmessages, AST_DIGIT_ANY, ast_channel_language(chan), "f");
+ res = ast_say_number(chan, vms->oldmessages, AST_DIGIT_ANY, ast_channel_language(chan), "f");
}
res = ast_play_and_wait(chan, "vm-Old");
}
@@ -9482,7 +9489,7 @@ static int vm_intro_ja(struct ast_channel *chan,struct vm_state *vms)
}
return res;
} /* Japanese */
-
+
/* Default English syntax */
static int vm_intro_en(struct ast_channel *chan, struct vm_state *vms)
{
@@ -9516,7 +9523,7 @@ static int vm_intro_en(struct ast_channel *chan, struct vm_state *vms)
else
res = ast_play_and_wait(chan, "vm-messages");
}
-
+
}
if (!res && vms->oldmessages) {
res = say_and_wait(chan, vms->oldmessages, ast_channel_language(chan));
@@ -9756,7 +9763,7 @@ static int vm_intro_de(struct ast_channel *chan, struct vm_state *vms)
else
res = ast_play_and_wait(chan, "vm-messages");
}
-
+
}
if (!res && vms->oldmessages) {
if (vms->oldmessages == 1)
@@ -9900,7 +9907,7 @@ static int vm_intro_fr(struct ast_channel *chan, struct vm_state *vms)
else
res = ast_play_and_wait(chan, "vm-messages");
}
-
+
}
if (!res && vms->oldmessages) {
res = say_and_wait(chan, vms->oldmessages, ast_channel_language(chan));
@@ -9947,7 +9954,7 @@ static int vm_intro_nl(struct ast_channel *chan, struct vm_state *vms)
else
res = ast_play_and_wait(chan, "vm-messages");
}
-
+
}
if (!res && vms->oldmessages) {
res = say_and_wait(chan, vms->oldmessages, ast_channel_language(chan));
@@ -10028,14 +10035,14 @@ static int vm_intro_pt(struct ast_channel *chan, struct vm_state *vms)
/* in czech there must be declension of word new and message
* czech : english : czech : english
* --------------------------------------------------------
- * vm-youhave : you have
+ * vm-youhave : you have
* vm-novou : one new : vm-zpravu : message
* vm-nove : 2-4 new : vm-zpravy : messages
* vm-novych : 5-infinite new : vm-zprav : messages
* vm-starou : one old
- * vm-stare : 2-4 old
+ * vm-stare : 2-4 old
* vm-starych : 5-infinite old
- * jednu : one - falling 4.
+ * jednu : one - falling 4.
* vm-no : no ( no messages )
*/
@@ -10116,7 +10123,7 @@ static int vm_intro_zh(struct ast_channel *chan, struct vm_state *vms)
res = ast_play_and_wait(chan, "vm-INBOX");
if (vms->oldmessages && !res)
res = ast_play_and_wait(chan, "vm-and");
- else if (!res)
+ else if (!res)
res = ast_play_and_wait(chan, "vm-messages");
}
if (!res && vms->oldmessages) {
@@ -10156,7 +10163,7 @@ static int vm_intro_vi(struct ast_channel *chan, struct vm_state *vms)
if (!res && vms->oldmessages) {
res = say_and_wait(chan, vms->oldmessages, ast_channel_language(chan));
if (!res)
- res = ast_play_and_wait(chan, "vm-Old");
+ res = ast_play_and_wait(chan, "vm-Old");
}
if (!res) {
if (!vms->oldmessages && !vms->newmessages) {
@@ -10172,7 +10179,7 @@ static int vm_intro_vi(struct ast_channel *chan, struct vm_state *vms)
static int vm_intro(struct ast_channel *chan, struct ast_vm_user *vmu, struct vm_state *vms)
{
char prefile[256];
-
+
/* Notify the user that the temp greeting is set and give them the option to remove it */
snprintf(prefile, sizeof(prefile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, vms->username);
if (ast_test_flag(vmu, VM_TEMPGREETWARN)) {
@@ -10679,7 +10686,7 @@ static int vm_options(struct ast_channel *chan, struct ast_vm_user *vmu, struct
}
/*!
- * \brief The handler for 'record a temporary greeting'.
+ * \brief The handler for 'record a temporary greeting'.
* \param chan
* \param vmu
* \param vms
@@ -10723,7 +10730,7 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
if (cmd == -1) {
break;
}
- cmd = 't';
+ cmd = 't';
} else {
switch (cmd) {
case '1':
@@ -10732,9 +10739,9 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
case '2':
DELETE(prefile, -1, prefile, vmu);
ast_play_and_wait(chan, "vm-tempremoved");
- cmd = 't';
+ cmd = 't';
break;
- case '*':
+ case '*':
cmd = 't';
break;
default:
@@ -10767,7 +10774,7 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st
* \param vmu
*
* \return zero on success, -1 on error.
- */
+ */
static int vm_browse_messages_gr(struct ast_channel *chan, struct vm_state *vms, struct ast_vm_user *vmu)
{
int cmd = 0;
@@ -10791,7 +10798,7 @@ static int vm_browse_messages_gr(struct ast_channel *chan, struct vm_state *vms,
cmd = ast_play_and_wait(chan, vms->fn);
}
}
- }
+ }
return cmd;
}
@@ -10812,7 +10819,7 @@ static int vm_browse_messages_he(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
* \brief Default English syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -10828,7 +10835,7 @@ static int vm_browse_messages_en(struct ast_channel *chan, struct vm_state *vms,
cmd = play_message(chan, vmu, vms);
} else {
cmd = ast_play_and_wait(chan, "vm-youhave");
- if (!cmd)
+ if (!cmd)
cmd = ast_play_and_wait(chan, "vm-no");
if (!cmd) {
snprintf(vms->fn, sizeof(vms->fn), "vm-%s", vms->curbox);
@@ -10840,7 +10847,7 @@ static int vm_browse_messages_en(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
*\brief Italian syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -10893,7 +10900,7 @@ static int vm_browse_messages_ja(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
* \brief Spanish syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -10919,7 +10926,7 @@ static int vm_browse_messages_es(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
* \brief Portuguese syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -10945,7 +10952,7 @@ static int vm_browse_messages_pt(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
* \brief Chinese (Taiwan)syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -10961,7 +10968,7 @@ static int vm_browse_messages_zh(struct ast_channel *chan, struct vm_state *vms,
cmd = play_message(chan, vmu, vms);
} else {
cmd = ast_play_and_wait(chan, "vm-you");
- if (!cmd)
+ if (!cmd)
cmd = ast_play_and_wait(chan, "vm-haveno");
if (!cmd)
cmd = ast_play_and_wait(chan, "vm-messages");
@@ -10973,7 +10980,7 @@ static int vm_browse_messages_zh(struct ast_channel *chan, struct vm_state *vms,
return cmd;
}
-/*!
+/*!
* \brief Vietnamese syntax for 'You have N messages' greeting.
* \param chan
* \param vms
@@ -11002,7 +11009,7 @@ static int vm_browse_messages_vi(struct ast_channel *chan, struct vm_state *vms,
* \param chan The channel for the current user. We read the language property from this.
* \param vms passed into the language-specific vm_browse_messages function.
* \param vmu passed into the language-specific vm_browse_messages function.
- *
+ *
* The method to be invoked is determined by the value of language code property in the user's channel.
* The default (when unable to match) is to use english.
*
@@ -11060,7 +11067,7 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
if (ast_channel_caller(chan)->id.number.valid && ast_channel_caller(chan)->id.number.str) {
ast_copy_string(mailbox, ast_channel_caller(chan)->id.number.str, mailbox_size);
} else {
- ast_verb(3, "Username not entered\n");
+ ast_verb(3, "Username not entered\n");
return -1;
}
} else if (mailbox[0] == '*') {
@@ -11399,7 +11406,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
ast_set_flag(&flags, OPT_SILENT);
else if (*(args.argv0) == 'p')
ast_set_flag(&flags, OPT_PREPEND_MAILBOX);
- else
+ else
break;
(args.argv0)++;
}
@@ -11536,7 +11543,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
res = 0;
/* Check to see if this is a new user */
- if (!strcasecmp(vmu->mailbox, vmu->password) &&
+ if (!strcasecmp(vmu->mailbox, vmu->password) &&
(ast_test_flag(vmu, VM_FORCENAME | VM_FORCEGREET))) {
if (ast_play_and_wait(chan, vm_newuser) == -1)
ast_log(AST_LOG_WARNING, "Couldn't stream new user file\n");
@@ -11928,7 +11935,7 @@ static int vm_execmain(struct ast_channel *chan, const char *data)
snprintf(vms.fn, sizeof(vms.fn), "vm-%s", mbox(vmu, box));
if (!cmd) {
cmd = ast_play_and_wait(chan, "vm-message");
- if (!cmd)
+ if (!cmd)
cmd = say_and_wait(chan, vms.curmsg + 1, ast_channel_language(chan));
if (!cmd)
cmd = ast_play_and_wait(chan, "vm-savedto");
@@ -12032,7 +12039,7 @@ out:
if (valid && res != OPERATOR_EXIT) {
if (silentexit)
res = ast_play_and_wait(chan, "vm-dialout");
- else
+ else
res = ast_play_and_wait(chan, "vm-goodbye");
}
if ((valid && res > 0) || res == OPERATOR_EXIT) {
@@ -12090,7 +12097,7 @@ static int vm_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(argv0);
AST_APP_ARG(argv1);
);
-
+
memset(&leave_options, 0, sizeof(leave_options));
if (ast_channel_state(chan) != AST_STATE_UP)
@@ -12204,15 +12211,15 @@ static struct ast_vm_user *find_or_create(const char *context, const char *box)
return NULL;
}
}
-
+
if (!(vmu = ast_calloc(1, sizeof(*vmu))))
return NULL;
-
+
ast_copy_string(vmu->context, context, sizeof(vmu->context));
ast_copy_string(vmu->mailbox, box, sizeof(vmu->mailbox));
AST_LIST_INSERT_TAIL(&users, vmu, list);
-
+
return vmu;
}
@@ -12470,7 +12477,7 @@ AST_TEST_DEFINE(test_voicemail_vmuser)
}
#endif
-static int vm_box_exists(struct ast_channel *chan, const char *data)
+static int vm_box_exists(struct ast_channel *chan, const char *data)
{
struct ast_vm_user svm, *vmu;
char *context, *box;
@@ -12640,7 +12647,7 @@ static int vmauthenticate(struct ast_channel *chan, const char *data)
char *options = NULL;
int silent = 0, skipuser = 0;
int res = -1;
-
+
if (data) {
s = ast_strdupa(data);
user = strsep(&s, ",");
@@ -12679,7 +12686,7 @@ static char *show_users_realtime(int fd, const char *context)
struct ast_config *cfg;
const char *cat = NULL;
- if (!(cfg = ast_load_realtime_multientry("voicemail",
+ if (!(cfg = ast_load_realtime_multientry("voicemail",
"context", context, SENTINEL))) {
return CLI_FAILURE;
}
@@ -12752,7 +12759,7 @@ static char *handle_voicemail_show_users(struct ast_cli_entry *e, int cmd, struc
return NULL;
case CLI_GENERATE:
return complete_voicemail_show_users(a->line, a->word, a->pos, a->n);
- }
+ }
if ((a->argc < 3) || (a->argc > 5) || (a->argc == 4))
return CLI_SHOWUSAGE;
@@ -12864,9 +12871,9 @@ static char *handle_voicemail_reload(struct ast_cli_entry *e, int cmd, struct as
if (a->argc != 2)
return CLI_SHOWUSAGE;
- ast_cli(a->fd, "Reloading voicemail configuration...\n");
+ ast_cli(a->fd, "Reloading voicemail configuration...\n");
load_config(1);
-
+
return CLI_SUCCESS;
}
@@ -13212,6 +13219,7 @@ static void mwi_sub_event_cb(struct stasis_subscription_change *change)
}
if (separate_mailbox(ast_strdupa(stasis_topic_name(change->topic)), &mailbox, &context)) {
+ ast_free(mwist);
return;
}
@@ -13342,14 +13350,14 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
AST_LIST_UNLOCK(&users);
return RESULT_SUCCESS;
}
-
+
astman_send_listack(s, m, "Voicemail user list will follow", "start");
-
+
AST_LIST_TRAVERSE(&users, vmu, list) {
char dirname[256];
int new, old;
inboxcount(vmu->mailbox, &new, &old);
-
+
make_dir(dirname, sizeof(dirname), vmu->context, vmu->mailbox, "INBOX");
astman_append(s,
"Event: VoicemailUserEntry\r\n"
@@ -13425,7 +13433,7 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
#endif
);
++num_users;
- }
+ }
astman_send_list_complete_start(s, m, "VoicemailUserEntryComplete", num_users);
astman_send_list_complete_end(s);
@@ -13436,7 +13444,7 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
}
/*! \brief Free the users structure. */
-static void free_vm_users(void)
+static void free_vm_users(void)
{
struct ast_vm_user *current;
AST_LIST_LOCK(&users);
@@ -13465,7 +13473,7 @@ static const char *substitute_escapes(const char *value)
struct ast_str *str = ast_str_thread_get(&ast_str_thread_global_buf, strlen(value) + 16);
ast_str_reset(str);
-
+
/* Substitute strings \r, \n, and \t into the appropriate characters */
for (current = (char *) value; *current; current++) {
if (*current == '\\') {
@@ -13587,7 +13595,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
/* Free all the zones structure */
free_vm_zones();
- AST_LIST_LOCK(&users);
+ AST_LIST_LOCK(&users);
memset(ext_pass_cmd, 0, sizeof(ext_pass_cmd));
memset(ext_pass_check_cmd, 0, sizeof(ext_pass_check_cmd));
@@ -13599,9 +13607,9 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
val = "default";
ast_copy_string(userscontext, val, sizeof(userscontext));
/* Attach voice message to mail message ? */
- if (!(val = ast_variable_retrieve(cfg, "general", "attach")))
+ if (!(val = ast_variable_retrieve(cfg, "general", "attach")))
val = "yes";
- ast_set2_flag((&globalflags), ast_true(val), VM_ATTACH);
+ ast_set2_flag((&globalflags), ast_true(val), VM_ATTACH);
if (!(val = ast_variable_retrieve(cfg, "general", "searchcontexts")))
val = "no";
@@ -13620,7 +13628,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
if ((val = ast_variable_retrieve(cfg, "general", "odbctable"))) {
ast_copy_string(odbc_table, val, sizeof(odbc_table));
}
-#endif
+#endif
/* Mail command */
strcpy(mailcmd, SENDMAIL);
if ((val = ast_variable_retrieve(cfg, "general", "mailcmd")))
@@ -13632,7 +13640,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
if (maxsilence > 0)
maxsilence *= 1000;
}
-
+
if (!(val = ast_variable_retrieve(cfg, "general", "maxmsg"))) {
maxmsg = MAXMSG;
} else {
@@ -13753,7 +13761,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
}
/* There is some very unorthodox casting done here. This is due
- * to the way c-client handles the argument passed in. It expects a
+ * to the way c-client handles the argument passed in. It expects a
* void pointer and casts the pointer directly to a long without
* first dereferencing it. */
if ((val = ast_variable_retrieve(cfg, "general", "imapreadtimeout"))) {
@@ -13862,7 +13870,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
val = ast_variable_retrieve(cfg, "general", "format");
if (!val) {
- val = "wav";
+ val = "wav";
} else {
tmp = ast_strdupa(val);
val = ast_format_str_reduce(tmp);
@@ -14066,9 +14074,9 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
if ((val = ast_variable_retrieve(cfg, "general", "listen-control-stop-key")) && is_valid_dtmf(val))
ast_copy_string(listen_control_stop_key, val, sizeof(listen_control_stop_key));
- if (!(val = ast_variable_retrieve(cfg, "general", "usedirectory")))
+ if (!(val = ast_variable_retrieve(cfg, "general", "usedirectory")))
val = "no";
- ast_set2_flag((&globalflags), ast_true(val), VM_DIRECFORWARD);
+ ast_set2_flag((&globalflags), ast_true(val), VM_DIRECFORWARD);
if (!(val = ast_variable_retrieve(cfg, "general", "passwordlocation"))) {
val = "voicemail.conf";
@@ -14174,7 +14182,7 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
}
/* load mailboxes from users.conf */
- if (ucfg) {
+ if (ucfg) {
for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) {
if (!strcasecmp(cat, "general")) {
continue;
@@ -14570,7 +14578,7 @@ AST_TEST_DEFINE(test_voicemail_msgcount)
/* hasvm-old, hasvm-urgent, hasvm-new, ic-old, ic-urgent, ic-new, ic2-old, ic2-urgent, ic2-new, mc-old, mc-urgent, mc-new */
for (j = 0; j < 3; j++) {
- /* folder[2] is INBOX, __has_voicemail will default back to INBOX */
+ /* folder[2] is INBOX, __has_voicemail will default back to INBOX */
if (ast_app_has_voicemail(testspec, (j==2 ? NULL : folders[j])) != expected_results[i][0 + j]) {
ast_test_status_update(test, "has_voicemail(%s, %s) returned %d and we expected %d\n",
testspec, folders[j], ast_app_has_voicemail(testspec, folders[j]), expected_results[i][0 + j]);
@@ -15014,7 +15022,7 @@ static int load_module(void)
/* compute the location of the voicemail spool directory */
snprintf(VM_SPOOL_DIR, sizeof(VM_SPOOL_DIR), "%s/voicemail/", ast_config_AST_SPOOL_DIR);
-
+
if (!(mwi_subscription_tps = ast_taskprocessor_get("app_voicemail", 0))) {
ast_log(AST_LOG_WARNING, "failed to reference mwi subscription taskprocessor. MWI will not work\n");
}
@@ -15078,7 +15086,7 @@ static int load_module(void)
return AST_MODULE_LOAD_SUCCESS;
}
-static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context)
+static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num, char *outgoing_context)
{
int cmd = 0;
char destination[80] = "";
@@ -15108,7 +15116,7 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num,
ast_verb(3, "User hit '*' to cancel outgoing call\n");
return 0;
}
- if ((cmd = ast_readstring(chan, destination + strlen(destination), sizeof(destination) - 1, 6000, 10000, "#")) < 0)
+ if ((cmd = ast_readstring(chan, destination + strlen(destination), sizeof(destination) - 1, 6000, 10000, "#")) < 0)
retries++;
else
cmd = 't';
@@ -15118,7 +15126,7 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num,
if (retries >= 3) {
return 0;
}
-
+
} else {
ast_verb(3, "Destination number is CID number '%s'\n", num);
ast_copy_string(destination, num, sizeof(destination));
@@ -15126,7 +15134,7 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num,
if (!ast_strlen_zero(destination)) {
if (destination[strlen(destination) -1 ] == '*')
- return 0;
+ return 0;
ast_verb(3, "Placing outgoing call to extension '%s' in context '%s' from context '%s'\n", destination, outgoing_context, ast_channel_context(chan));
ast_channel_exten_set(chan, destination);
ast_channel_context_set(chan, outgoing_context);
@@ -15139,13 +15147,13 @@ static int dialout(struct ast_channel *chan, struct ast_vm_user *vmu, char *num,
/*!
* \brief The advanced options within a message.
* \param chan
- * \param vmu
+ * \param vmu
* \param vms
* \param msg
* \param option
* \param record_gain
*
- * Provides handling for the play message envelope, call the person back, or reply to message.
+ * Provides handling for the play message envelope, call the person back, or reply to message.
*
* \return zero on success, -1 on error.
*/
@@ -15160,7 +15168,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
char *cid;
struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE, };
- vms->starting = 0;
+ vms->starting = 0;
make_file(vms->fn, sizeof(vms->fn), vms->curdir, msg);
@@ -15279,8 +15287,8 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
}
}
ast_test_suite_event_notify("USERPRESS", "Message: User pressed %c\r\nDTMF: %c", res, res);
- break;
-
+ break;
+
}
if (res == 't')
res = 0;
@@ -15288,7 +15296,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
res = -1;
}
break;
-
+
case 1: /* Reply */
/* Send reply directly to sender */
if (ast_strlen_zero(cid))
@@ -15311,7 +15319,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
snprintf(mailbox, sizeof(mailbox), "%s@%s", num, vmu->context);
ast_verb(3, "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
-
+
memset(&leave_options, 0, sizeof(leave_options));
leave_options.record_gain = record_gain;
res = leave_voicemail(chan, mailbox, &leave_options);
@@ -15328,7 +15336,7 @@ static int advanced_options(struct ast_channel *chan, struct ast_vm_user *vmu, s
ast_config_destroy(msg_cfg);
return res;
}
- }
+ }
res = 0;
break;
@@ -15388,7 +15396,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
} else {
/* Otherwise 1 is to save the existing message */
ast_verb(3, "Saving message as is\n");
- if (!outsidecaller)
+ if (!outsidecaller)
ast_filerename(tempfile, recordfile, NULL);
if (!forwardintro) {
ast_stream_and_wait(chan, "vm-msgsaved", "");
@@ -15409,11 +15417,11 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
case '3':
msg_exists = 0;
/* Record */
- if (recorded == 1)
+ if (recorded == 1)
ast_verb(3, "Re-recording the message\n");
- else
+ else
ast_verb(3, "Recording the message\n");
-
+
if (recorded && outsidecaller) {
if (forwardintro) {
cmd = ast_play_and_wait(chan, "vm-record-prepend");
@@ -15440,7 +15448,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
if (!outsidecaller) {
/* user was recording a greeting and they hung up, so let's delete the recording. */
ast_filedelete(tempfile, NULL);
- }
+ }
return cmd;
}
if (cmd == '0') {
@@ -15497,7 +15505,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
case '#':
cmd = ast_play_and_wait(chan, "vm-sorry");
break;
-#if 0
+#if 0
/* XXX Commented out for the moment because of the dangers of deleting
a message while recording (can put the message numbers out of sync) */
case '*':
@@ -15559,7 +15567,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
if (!cmd)
cmd = ast_waitfordigit(chan, 600);
}
-
+
if (!cmd && outsidecaller && ast_test_flag(vmu, VM_OPERATOR)) {
cmd = ast_play_and_wait(chan, "vm-reachoper");
if (!cmd)
diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c
index 7ed906bfa..b1b22e34d 100644
--- a/apps/app_waitforring.c
+++ b/apps/app_waitforring.c
@@ -21,7 +21,7 @@
* \brief Wait for Ring Application
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -141,4 +141,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Waits until first ring after time");
-
diff --git a/apps/app_while.c b/apps/app_while.c
index 90d3d5826..ca440da87 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -21,7 +21,7 @@
* \brief While Loop Implementation
*
* \author Anthony Minessale <anthmct@yahoo.com>
- *
+ *
* \ingroup applications
*/
@@ -225,13 +225,13 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
for (x=0;;x++) {
if (get_index(chan, prefix, x)) {
used_index_i = x;
- } else
+ } else
break;
}
-
+
snprintf(used_index, VAR_SIZE, "%d", used_index_i);
snprintf(new_index, VAR_SIZE, "%d", used_index_i + 1);
-
+
if (!end)
condition = ast_strdupa(data);
@@ -239,7 +239,7 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
my_name = ast_alloca(size);
memset(my_name, 0, size);
snprintf(my_name, size, "%s_%s_%d", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan));
-
+
ast_channel_lock(chan);
if (end) {
label = used_index;
@@ -253,7 +253,7 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
snprintf(end_varname,VAR_SIZE,"END_%s",varname);
}
ast_channel_unlock(chan);
-
+
if ((!end && !pbx_checkcondition(condition)) || (end == 2)) {
/* Condition Met (clean up helper vars) */
@@ -338,7 +338,7 @@ static int while_continue_exec(struct ast_channel *chan, const char *data)
static int unload_module(void)
{
int res;
-
+
res = ast_unregister_application(start_app);
res |= ast_unregister_application(stop_app);
res |= ast_unregister_application(exit_app);
diff --git a/apps/app_zapateller.c b/apps/app_zapateller.c
index ccdeba2b7..b2703ec2a 100644
--- a/apps/app_zapateller.c
+++ b/apps/app_zapateller.c
@@ -21,14 +21,14 @@
* \brief Playback the special information tone to get rid of telemarketers
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -114,15 +114,15 @@ static int zapateller_exec(struct ast_channel *chan, const char *data)
return res;
}
- if (!res)
+ if (!res)
res = ast_tonepair(chan, 950, 0, 330, 0);
- if (!res)
+ if (!res)
res = ast_tonepair(chan, 1400, 0, 330, 0);
- if (!res)
+ if (!res)
res = ast_tonepair(chan, 1800, 0, 330, 0);
- if (!res)
+ if (!res)
res = ast_tonepair(chan, 0, 0, 1000, 0);
-
+
pbx_builtin_setvar_helper(chan, "ZAPATELLERSTATUS", "ZAPPED");
return res;
}
@@ -138,4 +138,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Block Telemarketers with Special Information Tone");
-
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index 2de1ec238..16d393526 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -377,7 +377,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
regardless if this limit is reached or not.
</para></description>
</configOption>
- <configOption name="^sound_">
+ <configOption name="sound_">
<synopsis>Override the various conference bridge sound files</synopsis>
<description><para>
All sounds in the conference are customizable using the bridge profile options below.
@@ -592,8 +592,8 @@ static void *bridge_profile_find(struct ao2_container *container, const char *ca
static struct aco_type bridge_type = {
.type = ACO_ITEM,
.name = "bridge_profile",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.matchfield = "type",
.matchvalue = "bridge",
.item_alloc = bridge_profile_alloc,
@@ -629,8 +629,8 @@ static void *user_profile_find(struct ao2_container *container, const char *cate
static struct aco_type user_type = {
.type = ACO_ITEM,
.name = "user_profile",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.matchfield = "type",
.matchvalue = "user",
.item_alloc = user_profile_alloc,
@@ -660,8 +660,8 @@ static void *menu_find(struct ao2_container *container, const char *category)
static struct aco_type menu_type = {
.type = ACO_ITEM,
.name = "menu",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.matchfield = "type",
.matchvalue = "menu",
.item_alloc = menu_alloc,
@@ -678,8 +678,8 @@ static struct aco_type *user_types[] = ACO_TYPES(&user_type);
static struct aco_type general_type = {
.type = ACO_GLOBAL,
.name = "global",
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
static struct aco_file confbridge_conf = {
@@ -2149,7 +2149,7 @@ int conf_load_config(void)
aco_option_register(&cfg_info, "record_file", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, rec_file));
aco_option_register(&cfg_info, "regcontext", ACO_EXACT, bridge_types, NULL, OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, regcontext));
aco_option_register(&cfg_info, "language", ACO_EXACT, bridge_types, "en", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct bridge_profile, language));
- aco_option_register_custom(&cfg_info, "^sound_", ACO_REGEX, bridge_types, NULL, sound_option_handler, 0);
+ aco_option_register_custom(&cfg_info, "sound_", ACO_PREFIX, bridge_types, NULL, sound_option_handler, 0);
/* This option should only be used with the CONFBRIDGE dialplan function */
aco_option_register_custom(&cfg_info, "template", ACO_EXACT, bridge_types, NULL, bridge_template_handler, 0);
diff --git a/apps/enter.h b/apps/enter.h
index ac765984a..a0b244df9 100644
--- a/apps/enter.h
+++ b/apps/enter.h
@@ -10,278 +10,278 @@
*/
static unsigned char enter[] = {
-0xba, 0xba, 0xb0, 0xa6, 0xa9, 0xb8, 0xfe, 0x46, 0x42, 0x46,
-0x4a, 0xfe, 0xac, 0xa2, 0x9f, 0x9f, 0xa8, 0xb8, 0x3b, 0x29,
-0x35, 0x4a, 0xfe, 0xc1, 0xad, 0xa2, 0xad, 0xc5, 0x4e, 0x68,
-0x68, 0xe7, 0xb8, 0xb0, 0xb2, 0xc1, 0xc1, 0xb0, 0xae, 0xcd,
-0xfe, 0xfe, 0xcd, 0xcd, 0xfe, 0x68, 0xd3, 0xb2, 0xae, 0xab,
-0xb2, 0xfe, 0x35, 0x31, 0xdb, 0xac, 0xab, 0xaf, 0xab, 0xaa,
-0xb4, 0x68, 0x3b, 0x39, 0x3f, 0x68, 0xb4, 0xa8, 0xa8, 0xb0,
-0xbc, 0xbc, 0xc5, 0x3f, 0x31, 0x37, 0xfe, 0xc1, 0xbc, 0xb0,
-0xa5, 0xa2, 0xa8, 0xaf, 0xbe, 0x3b, 0x28, 0x26, 0x3d, 0xbc,
-0xb0, 0xae, 0xa2, 0x9f, 0xa2, 0xfe, 0x29, 0x24, 0x29, 0x4a,
-0xc5, 0xaa, 0xa8, 0xa9, 0xa8, 0xa5, 0xa7, 0xdb, 0x2c, 0x27,
-0x2d, 0x4a, 0xfe, 0xdb, 0xb2, 0xa2, 0x9f, 0x9f, 0xae, 0xe7,
-0x2c, 0x22, 0x2b, 0xfe, 0xba, 0xb0, 0xaa, 0x9f, 0xa3, 0xb0,
-0x5c, 0x33, 0x33, 0x39, 0x5c, 0xdb, 0xc1, 0xb4, 0xb0, 0xaa,
-0xad, 0xba, 0x54, 0x46, 0xfe, 0xe7, 0xfe, 0x54, 0xe7, 0xaf,
-0xa6, 0xa7, 0xb0, 0xfe, 0x46, 0x39, 0x5c, 0xe7, 0xdb, 0xfe,
-0xba, 0xac, 0xa8, 0xc5, 0x46, 0x33, 0x54, 0xc5, 0xae, 0xad,
-0xb2, 0xc1, 0xcd, 0xc1, 0xbc, 0xfe, 0x3f, 0x37, 0xfe, 0xb4,
-0xb6, 0xcd, 0xdb, 0xc1, 0xb0, 0xb6, 0xcd, 0x4e, 0x39, 0x37,
-0xfe, 0xb0, 0xab, 0xa9, 0xa9, 0xa9, 0xb0, 0x5c, 0x29, 0x25,
-0x31, 0xfe, 0xc1, 0xb4, 0xae, 0xab, 0xab, 0xb2, 0xcd, 0x3b,
-0x2a, 0x2c, 0x54, 0xb4, 0xb4, 0xba, 0xb2, 0xa3, 0x9f, 0xa8,
-0xfe, 0x33, 0x27, 0x2a, 0x39, 0xfe, 0xc1, 0xbe, 0xb0, 0xa2,
-0x9f, 0xb0, 0x33, 0x22, 0x25, 0x46, 0xc1, 0xb8, 0xb0, 0xab,
-0xa8, 0xa8, 0xb0, 0xbe, 0x42, 0x2c, 0x2e, 0x4a, 0xfe, 0x5c,
-0xfe, 0xb4, 0xa8, 0xa8, 0xba, 0xfe, 0x4a, 0x39, 0x39, 0x46,
-0xfe, 0xbc, 0xaf, 0xa5, 0xa5, 0xae, 0x68, 0x37, 0x4a, 0xfe,
-0xfe, 0x4a, 0x4a, 0xd3, 0xb0, 0xb0, 0xc1, 0x5c, 0x46, 0x46,
-0xd3, 0xb6, 0xbe, 0x54, 0x54, 0xc9, 0xab, 0xae, 0xc5, 0x46,
-0x4a, 0xfe, 0xcd, 0xc9, 0xcd, 0xe7, 0xe7, 0xc9, 0xb4, 0xc5,
-0x4a, 0x2c, 0x37, 0xc1, 0xb0, 0xb2, 0xb4, 0xb2, 0xb6, 0xdb,
-0xfe, 0x4a, 0x46, 0x3f, 0x68, 0xba, 0xb2, 0xba, 0xc5, 0xb6,
-0xb2, 0xcd, 0x33, 0x2e, 0x39, 0x68, 0xfe, 0xe7, 0xba, 0xaf,
-0xa7, 0xa7, 0xad, 0xe7, 0x2d, 0x25, 0x2f, 0xd3, 0xbe, 0xcd,
-0xc5, 0xac, 0xa6, 0xac, 0xfe, 0x3b, 0x2c, 0x2d, 0x3d, 0xc1,
-0xb4, 0xbe, 0xcd, 0xaf, 0xa5, 0xa8, 0xe7, 0x31, 0x2f, 0x39,
-0x46, 0x5c, 0xdb, 0xbc, 0xba, 0xaf, 0xa9, 0xad, 0xfe, 0x2f,
-0x2d, 0xba, 0xad, 0xba, 0xfe, 0x3d, 0x42, 0x5c, 0xc9, 0xc1,
-0xcd, 0xfe, 0xc1, 0xae, 0xa6, 0xcd, 0x33, 0x25, 0x3b, 0xdb,
-0xb0, 0xb6, 0xb8, 0xb6, 0xb4, 0xb8, 0xba, 0xfe, 0x3d, 0x37,
-0xfe, 0xba, 0xc1, 0x54, 0x54, 0xd3, 0xb0, 0xb4, 0xe7, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd3, 0xb6, 0xa9, 0xa7, 0xba,
-0x3d, 0x35, 0xfe, 0xc1, 0xcd, 0x4a, 0x54, 0xbe, 0xb2, 0xb8,
-0xfe, 0x46, 0x3b, 0xfe, 0xba, 0xab, 0xc5, 0x46, 0x3b, 0xbc,
-0xaa, 0xab, 0xd3, 0x68, 0xfe, 0xd3, 0xcd, 0xdb, 0x54, 0x3d,
-0x4a, 0xbc, 0xac, 0xb4, 0x3f, 0x2e, 0x3d, 0xba, 0xb0, 0xb8,
-0xba, 0xb6, 0xba, 0xcd, 0xfe, 0xfe, 0x5c, 0x54, 0xc9, 0xb4,
-0xbe, 0x54, 0x54, 0xcd, 0xb6, 0xc9, 0x46, 0x54, 0xcd, 0xc5,
-0xdb, 0xfe, 0xfe, 0xc1, 0xae, 0xa9, 0xac, 0xfe, 0x35, 0x2e,
-0xfe, 0xba, 0xc1, 0x5c, 0xfe, 0xb6, 0xaa, 0xb0, 0xe7, 0x35,
-0x2e, 0x39, 0xc1, 0xac, 0xb0, 0xfe, 0xfe, 0xbc, 0xa6, 0xac,
-0xc1, 0x42, 0x46, 0x54, 0xfe, 0xfe, 0xfe, 0xfe, 0xc9, 0xae,
-0xa9, 0xb0, 0x54, 0x35, 0x37, 0xfe, 0xd3, 0xd3, 0xb8, 0xae,
-0xab, 0xb6, 0xe7, 0xfe, 0xfe, 0x68, 0xfe, 0xfe, 0xfe, 0x4e,
-0xfe, 0xb0, 0xac, 0xb8, 0xfe, 0xfe, 0xc1, 0xb6, 0xc5, 0x46,
-0x3d, 0xe7, 0xb4, 0xa7, 0xab, 0xbc, 0x3f, 0x37, 0x54, 0xba,
-0xcd, 0x54, 0x42, 0xc5, 0xae, 0xac, 0xc9, 0x46, 0x3d, 0x54,
-0xba, 0xb0, 0xb0, 0xfe, 0x5c, 0xcd, 0xb0, 0xb0, 0xc9, 0x54,
-0x54, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xcd, 0xc1, 0xba, 0xc5,
-0xfe, 0x42, 0x46, 0xfe, 0xc5, 0xba, 0xb2, 0xa7, 0xa7, 0xb0,
-0xfe, 0x3d, 0x4a, 0x5c, 0xfe, 0xfe, 0xfe, 0xe7, 0xbc, 0xb0,
-0xae, 0xc5, 0x4e, 0x39, 0xfe, 0xc5, 0xbe, 0xfe, 0x54, 0xc9,
-0xa9, 0xa2, 0xa5, 0xbc, 0x3b, 0x2f, 0x35, 0xfe, 0xc9, 0xfe,
-0xfe, 0xc5, 0xa9, 0xa6, 0xb0, 0x54, 0x31, 0x31, 0x3f, 0xd3,
-0xbc, 0xc1, 0xcd, 0xb8, 0xae, 0xa8, 0xb4, 0xd3, 0x54, 0x4e,
-0x5c, 0x54, 0xfe, 0xdb, 0xba, 0xb4, 0xb4, 0xba, 0xcd, 0x5c,
-0x3d, 0x3f, 0x54, 0xfe, 0xcd, 0xaf, 0xa8, 0xac, 0xc5, 0xfe,
-0xfe, 0xe7, 0xdb, 0xfe, 0xfe, 0xfe, 0xe7, 0xb8, 0xaf, 0xb0,
-0xe7, 0x42, 0x4a, 0xcd, 0xbc, 0xdb, 0x46, 0x68, 0xcd, 0xb0,
-0xab, 0xbc, 0xfe, 0x3d, 0x46, 0xfe, 0xb8, 0xbc, 0xd3, 0xd3,
-0xb6, 0xb0, 0xb6, 0x5c, 0x3b, 0x35, 0x54, 0xdb, 0xba, 0xb4,
-0xc1, 0xc9, 0xc1, 0xba, 0xc9, 0x5c, 0x3d, 0x46, 0xfe, 0xcd,
-0xc5, 0xb8, 0xae, 0xaf, 0xb4, 0xd3, 0x54, 0x3d, 0x35, 0x46,
-0xfe, 0xdb, 0xbc, 0xb2, 0xa9, 0xab, 0xba, 0x3f, 0x31, 0x39,
-0xfe, 0xe7, 0xdb, 0xcd, 0xb8, 0xae, 0xab, 0xac, 0xe7, 0x3d,
-0x2d, 0x3f, 0xfe, 0xdb, 0xfe, 0xfe, 0xbc, 0xaa, 0xa8, 0xb0,
-0xfe, 0x31, 0x2d, 0x3d, 0xdb, 0xc5, 0xcd, 0xc9, 0xb4, 0xa8,
-0xad, 0xc5, 0x46, 0x39, 0x3f, 0x5c, 0xfe, 0xd3, 0xc5, 0xc1,
-0xb6, 0xb0, 0xbc, 0x68, 0x46, 0x4e, 0xe7, 0xfe, 0x5c, 0xfe,
-0xc1, 0xaf, 0xb0, 0xb8, 0xe7, 0x5c, 0x5c, 0xfe, 0xe7, 0xfe,
-0xfe, 0xe7, 0xb0, 0xab, 0xb2, 0x4a, 0x37, 0x3f, 0xcd, 0xbe,
-0xc1, 0xe7, 0xe7, 0xd3, 0xb6, 0xb4, 0xc9, 0x3b, 0x33, 0x4a,
-0xba, 0xb4, 0xc5, 0xfe, 0xc9, 0xb6, 0xb4, 0xcd, 0xfe, 0x3b,
-0x3b, 0xfe, 0xc1, 0xb6, 0xc5, 0xc5, 0xb8, 0xb0, 0xba, 0x4a,
-0x31, 0x35, 0x68, 0xcd, 0xc5, 0xba, 0xb4, 0xb0, 0xb0, 0xba,
-0x5c, 0x35, 0x2f, 0x4e, 0xd3, 0xc1, 0xdb, 0xd3, 0xb4, 0xa9,
-0xab, 0xcd, 0x3b, 0x2f, 0x35, 0xfe, 0xd3, 0xd3, 0xdb, 0xbc,
-0xad, 0xa4, 0xb0, 0xfe, 0x2d, 0x2f, 0x3f, 0xe7, 0xe7, 0xe7,
-0xcd, 0xb4, 0xaf, 0xad, 0xc5, 0x3d, 0x31, 0x3d, 0xe7, 0xd3,
-0xe7, 0xe7, 0xc1, 0xaf, 0xad, 0xb6, 0xfe, 0x4a, 0x42, 0x54,
-0xfe, 0x68, 0xfe, 0xd3, 0xb2, 0xae, 0xb4, 0xfe, 0x42, 0x4e,
-0xcd, 0xc5, 0xcd, 0xdb, 0xc9, 0xb4, 0xb0, 0xb6, 0xfe, 0x3b,
-0x42, 0xe7, 0xb0, 0xb8, 0xcd, 0xfe, 0xc9, 0xb6, 0xb8, 0xfe,
-0x42, 0x3d, 0xfe, 0xc1, 0xb0, 0xba, 0xd3, 0xfe, 0xc1, 0xb0,
-0xb6, 0xfe, 0x3b, 0x3f, 0xe7, 0xba, 0xb8, 0xbc, 0xc5, 0xc1,
-0xc1, 0xcd, 0xfe, 0x3b, 0x37, 0xfe, 0xc1, 0xb4, 0xb6, 0xb8,
-0xb6, 0xb8, 0xc5, 0x5c, 0x3f, 0x46, 0xfe, 0xcd, 0xc5, 0xcd,
-0xcd, 0xc1, 0xb2, 0xb2, 0xfe, 0x3f, 0x35, 0x54, 0xdb, 0xc1,
-0xcd, 0xcd, 0xbc, 0xaf, 0xac, 0xb6, 0x54, 0x35, 0x31, 0x68,
-0xba, 0xb8, 0xcd, 0xdb, 0xc9, 0xb2, 0xb4, 0xc9, 0x46, 0x39,
-0x42, 0xdb, 0xbc, 0xbc, 0xcd, 0xcd, 0xbe, 0xb2, 0xb8, 0xe7,
-0x54, 0x46, 0xfe, 0xfe, 0xdb, 0xc9, 0xc5, 0xbe, 0xbe, 0xc9,
-0xfe, 0x5c, 0x5c, 0xfe, 0xd3, 0xcd, 0xcd, 0xc5, 0xb6, 0xb2,
-0xc5, 0x68, 0x4e, 0xfe, 0xc5, 0xc1, 0xcd, 0x68, 0x5c, 0xe7,
-0xb8, 0xb6, 0xd3, 0x4a, 0x46, 0xfe, 0xbc, 0xb8, 0xc1, 0xe7,
-0xe7, 0xc1, 0xb4, 0xbe, 0xfe, 0x3f, 0x3f, 0xfe, 0xba, 0xb2,
-0xba, 0xe7, 0xfe, 0xcd, 0xcd, 0xfe, 0x4e, 0x46, 0xfe, 0xc5,
-0xb8, 0xb2, 0xba, 0xc1, 0xcd, 0xd3, 0xe7, 0xfe, 0x5c, 0x5c,
-0xfe, 0xe7, 0xc5, 0xbe, 0xb6, 0xba, 0xc5, 0xfe, 0x3f, 0x3f,
-0x54, 0xfe, 0xd3, 0xc1, 0xbc, 0xb6, 0xb0, 0xb0, 0xd3, 0x54,
-0x39, 0x46, 0xfe, 0xc1, 0xcd, 0xe7, 0xe7, 0xc5, 0xb8, 0xb4,
-0xd3, 0x54, 0x37, 0x42, 0xdb, 0xbe, 0xc1, 0xd3, 0xcd, 0xb8,
-0xb0, 0xb0, 0xcd, 0x4a, 0x3b, 0x42, 0xe7, 0xc5, 0xbe, 0xcd,
-0xe7, 0xd3, 0xc5, 0xcd, 0xfe, 0x54, 0x54, 0x68, 0xe7, 0xc5,
-0xc1, 0xc1, 0xcd, 0xcd, 0xc9, 0xc9, 0xcd, 0xe7, 0xfe, 0xfe,
-0xfe, 0xe7, 0xc5, 0xbe, 0xc1, 0xfe, 0x5c, 0x5c, 0xfe, 0xcd,
-0xcd, 0xcd, 0xdb, 0xd3, 0xc1, 0xbc, 0xbe, 0xfe, 0x4e, 0x54,
-0xcd, 0xb6, 0xb8, 0xd3, 0x5c, 0x5c, 0xfe, 0xc5, 0xc9, 0xfe,
-0x46, 0x4a, 0xe7, 0xb4, 0xb6, 0xc5, 0xfe, 0xe7, 0xcd, 0xc9,
-0xdb, 0xfe, 0x4e, 0x68, 0xd3, 0xb6, 0xb2, 0xbc, 0xfe, 0x68,
-0xfe, 0xfe, 0x68, 0x54, 0x68, 0xe7, 0xc5, 0xbc, 0xb8, 0xbe,
-0xcd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd3, 0xd3, 0xcd,
-0xc1, 0xb8, 0xbc, 0xdb, 0x4e, 0x42, 0x4a, 0xfe, 0xc9, 0xc1,
-0xcd, 0xd3, 0xcd, 0xba, 0xb8, 0xcd, 0x46, 0x3b, 0xfe, 0xc9,
-0xba, 0xcd, 0xe7, 0xfe, 0xd3, 0xc1, 0xba, 0xdb, 0x54, 0x3d,
-0x68, 0xd3, 0xbc, 0xcd, 0xfe, 0xfe, 0xc5, 0xbe, 0xc1, 0xe7,
-0x54, 0x4a, 0xfe, 0xc9, 0xc1, 0xcd, 0xfe, 0xfe, 0xd3, 0xd3,
-0xd3, 0xfe, 0xe7, 0xe7, 0xe7, 0xdb, 0xd3, 0xe7, 0xe7, 0xe7,
-0xfe, 0xfe, 0xfe, 0xfe, 0xcd, 0xc9, 0xdb, 0xfe, 0xfe, 0xdb,
-0xbe, 0xc9, 0xfe, 0x5c, 0xfe, 0xc9, 0xbc, 0xbe, 0xdb, 0x68,
-0x5c, 0xdb, 0xc5, 0xd3, 0x54, 0x46, 0xfe, 0xbc, 0xb2, 0xb8,
-0xdb, 0x68, 0x68, 0xe7, 0xcd, 0xdb, 0x5c, 0x54, 0xfe, 0xc1,
-0xb8, 0xc1, 0xe7, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe,
-0xd3, 0xc5, 0xc1, 0xc5, 0xcd, 0xd3, 0xe7, 0xfe, 0x54, 0x4e,
-0xfe, 0xd3, 0xcd, 0xd3, 0xd3, 0xc5, 0xc1, 0xc1, 0xe7, 0x5c,
-0x4e, 0x5c, 0xd3, 0xc1, 0xcd, 0xfe, 0xfe, 0xcd, 0xba, 0xba,
-0xe7, 0x4a, 0x4a, 0x68, 0xcd, 0xc5, 0xcd, 0xfe, 0xfe, 0xcd,
-0xb8, 0xc1, 0xe7, 0x4e, 0x5c, 0xe7, 0xc1, 0xc9, 0xdb, 0xfe,
-0xe7, 0xc9, 0xc5, 0xd3, 0xfe, 0x68, 0xfe, 0xdb, 0xd3, 0xe7,
-0xfe, 0xfe, 0xcd, 0xc9, 0xcd, 0xd3, 0xd3, 0xd3, 0xcd, 0xe7,
-0xfe, 0xfe, 0xe7, 0xc5, 0xc5, 0xe7, 0x68, 0x68, 0xe7, 0xc1,
-0xc5, 0xfe, 0x5c, 0xfe, 0xd3, 0xc1, 0xd3, 0xfe, 0x68, 0xe7,
-0xc5, 0xb6, 0xc5, 0xe7, 0x68, 0xfe, 0xcd, 0xc5, 0xe7, 0xfe,
-0x54, 0xfe, 0xc9, 0xc5, 0xdb, 0xfe, 0xfe, 0xfe, 0xd3, 0xd3,
-0xfe, 0xfe, 0xfe, 0xcd, 0xc1, 0xc1, 0xc9, 0xd3, 0xd3, 0xe7,
-0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xd3, 0xdb, 0xe7, 0xe7, 0xd3,
-0xcd, 0xd3, 0xfe, 0xfe, 0xfe, 0xcd, 0xc5, 0xd3, 0xe7, 0xe7,
-0xc9, 0xbc, 0xbe, 0xe7, 0x68, 0x4a, 0xfe, 0xdb, 0xcd, 0xfe,
-0xfe, 0xfe, 0xcd, 0xc1, 0xc9, 0xfe, 0x54, 0x5c, 0xe7, 0xc9,
-0xc5, 0xe7, 0xfe, 0xfe, 0xcd, 0xc5, 0xc5, 0xe7, 0xfe, 0xfe,
-0xfe, 0xe7, 0xe7, 0xfe, 0xfe, 0xdb, 0xd3, 0xd3, 0xdb, 0xe7,
-0xfe, 0xfe, 0xe7, 0xe7, 0xdb, 0xd3, 0xc9, 0xd3, 0xe7, 0xfe,
-0xfe, 0xd3, 0xd3, 0xdb, 0xfe, 0xfe, 0xfe, 0xd3, 0xcd, 0xcd,
-0xfe, 0xfe, 0xe7, 0xc9, 0xc5, 0xd3, 0xfe, 0xfe, 0xfe, 0xcd,
-0xc9, 0xd3, 0xfe, 0xfe, 0xfe, 0xdb, 0xc9, 0xcd, 0xe7, 0xfe,
-0xe7, 0xcd, 0xcd, 0xe7, 0xfe, 0xfe, 0xe7, 0xd3, 0xc5, 0xcd,
-0xe7, 0xfe, 0xfe, 0xfe, 0xdb, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe,
-0xe7, 0xcd, 0xcd, 0xd3, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe,
-0xe7, 0xe7, 0xdb, 0xc9, 0xc1, 0xc5, 0xfe, 0x5c, 0x68, 0xfe,
-0xd3, 0xdb, 0xe7, 0xe7, 0xe7, 0xd3, 0xc5, 0xcd, 0xe7, 0x68,
-0xfe, 0xe7, 0xcd, 0xd3, 0xe7, 0xfe, 0xe7, 0xcd, 0xc1, 0xc1,
-0xdb, 0xfe, 0x54, 0xfe, 0xe7, 0xcd, 0xe7, 0xfe, 0xe7, 0xd3,
-0xcd, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xcd, 0xc5, 0xcd, 0xfe,
-0xfe, 0xe7, 0xcd, 0xd3, 0xdb, 0xe7, 0xfe, 0xfe, 0xfe, 0xe7,
-0xd3, 0xd3, 0xe7, 0xfe, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe,
-0xfe, 0xdb, 0xc5, 0xc1, 0xd3, 0xfe, 0xfe, 0xfe, 0xd3, 0xc9,
-0xcd, 0xe7, 0xfe, 0xfe, 0xd3, 0xcd, 0xdb, 0xfe, 0x5c, 0xfe,
-0xcd, 0xc9, 0xd3, 0xfe, 0xfe, 0xfe, 0xd3, 0xc9, 0xcd, 0xfe,
-0x68, 0xfe, 0xd3, 0xc1, 0xc1, 0xdb, 0xfe, 0xfe, 0xe7, 0xe7,
-0xfe, 0xfe, 0x68, 0xfe, 0xe7, 0xc5, 0xc9, 0xdb, 0xfe, 0xfe,
-0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xdb, 0xc5, 0xc5,
-0xd3, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xfe,
-0xc9, 0xc1, 0xc5, 0xfe, 0x54, 0x5c, 0xfe, 0xcd, 0xc5, 0xcd,
-0xfe, 0xfe, 0xdb, 0xc5, 0xc9, 0xfe, 0x5c, 0x68, 0xfe, 0xcd,
-0xcd, 0xfe, 0xfe, 0xfe, 0xe7, 0xc5, 0xc1, 0xd3, 0xfe, 0xfe,
-0xdb, 0xc9, 0xc5, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe,
-0xfe, 0xfe, 0xe7, 0xcd, 0xcd, 0xdb, 0xfe, 0xfe, 0xfe, 0xfe,
-0xe7, 0xd3, 0xcd, 0xd3, 0xfe, 0xfe, 0xdb, 0xcd, 0xd3, 0xe7,
-0xfe, 0xfe, 0xfe, 0xdb, 0xcd, 0xd3, 0xe7, 0xfe, 0xd3, 0xc5,
-0xc9, 0xfe, 0x5c, 0x54, 0xfe, 0xcd, 0xc1, 0xcd, 0xe7, 0xfe,
-0xfe, 0xd3, 0xcd, 0xfe, 0x54, 0x5c, 0xe7, 0xc1, 0xc1, 0xd3,
-0xfe, 0xfe, 0xe7, 0xd3, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xcd,
-0xc5, 0xcd, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xe7, 0xd3, 0xcd, 0xc9, 0xcd, 0xe7, 0xfe, 0xfe, 0xfe, 0xdb,
-0xc9, 0xcd, 0xe7, 0xfe, 0xe7, 0xc9, 0xc5, 0xdb, 0xfe, 0x5c,
-0xfe, 0xe7, 0xcd, 0xcd, 0xe7, 0xfe, 0xe7, 0xc5, 0xc1, 0xd3,
-0xfe, 0x5c, 0xfe, 0xcd, 0xc5, 0xcd, 0xe7, 0xfe, 0xfe, 0xe7,
-0xd3, 0xe7, 0xfe, 0xfe, 0xe7, 0xcd, 0xcd, 0xdb, 0xfe, 0xfe,
-0xfe, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xe7, 0xdb, 0xcd, 0xd3,
-0xd3, 0xdb, 0xfe, 0xfe, 0xfe, 0xfe, 0xdb, 0xd3, 0xdb, 0xe7,
-0xe7, 0xdb, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xe7, 0xc9, 0xc5,
-0xcd, 0xe7, 0xfe, 0xdb, 0xd3, 0xe7, 0xfe, 0x68, 0xfe, 0xe7,
-0xcd, 0xcd, 0xd3, 0xfe, 0xfe, 0xe7, 0xdb, 0xe7, 0xfe, 0x68,
-0xfe, 0xdb, 0xfe, 0x68, 0xbe, 0xb2, 0xae, 0xab, 0xb2, 0xfe,
-0x2f, 0x31, 0xdb, 0xac, 0xad, 0xaf, 0xab, 0xab, 0xb4, 0x68,
-0x37, 0x39, 0x3f, 0xe7, 0xb4, 0xa8, 0xaa, 0xb0, 0xbc, 0xbc,
-0xc5, 0x3f, 0x31, 0x3d, 0xfe, 0xc1, 0xb8, 0xb0, 0xa5, 0xa2,
-0xa8, 0xaf, 0xdb, 0x3b, 0x28, 0x2a, 0x3d, 0xbc, 0xb0, 0xaa,
-0xa2, 0x9f, 0xab, 0xfe, 0x29, 0x24, 0x29, 0x4a, 0xb4, 0xaa,
-0xa8, 0xa9, 0xa8, 0xa5, 0xac, 0xdb, 0x2c, 0x27, 0x35, 0x4a,
-0xfe, 0xcd, 0xb2, 0xa2, 0x9f, 0x9f, 0xae, 0x4e, 0x2c, 0x22,
-0x33, 0xfe, 0xba, 0xb0, 0xa6, 0x9f, 0xa3, 0xbc, 0x5c, 0x33,
-0x31, 0x39, 0x5c, 0xcd, 0xc1, 0xb4, 0xad, 0xaa, 0xad, 0xcd,
-0x54, 0x46, 0xfe, 0xe7, 0xfe, 0x54, 0xc5, 0xaf, 0xa6, 0xa9,
-0xb0, 0xfe, 0x3d, 0x39, 0x5c, 0xdb, 0xdb, 0xfe, 0xba, 0xac,
-0xa8, 0xc5, 0x39, 0x33, 0x54, 0xb8, 0xae, 0xad, 0xb8, 0xc1,
-0xcd, 0xbe, 0xbc, 0xfe, 0x39, 0x37, 0xfe, 0xb4, 0xba, 0xcd,
-0xdb, 0xb8, 0xb0, 0xb6, 0xfe, 0x4e, 0x39, 0x3d, 0xfe, 0xb0,
-0xaa, 0xa9, 0xa9, 0xaa, 0xb0, 0x5c, 0x29, 0x28, 0x31, 0xfe,
-0xba, 0xb4, 0xae, 0xab, 0xab, 0xb2, 0xfe, 0x3b, 0x2a, 0x2f,
-0x54, 0xb4, 0xb4, 0xba, 0xb2, 0xa3, 0x9f, 0xa8, 0xfe, 0x2c,
-0x27, 0x2a, 0x46, 0xfe, 0xc1, 0xbc, 0xb0, 0xa2, 0xa2, 0xb0,
-0x33, 0x22, 0x2b, 0x46, 0xc1, 0xb4, 0xb0, 0xab, 0xa8, 0xa8,
-0xb0, 0xdb, 0x42, 0x2c, 0x33, 0x4a, 0xfe, 0x5c, 0xdb, 0xb4,
-0xa8, 0xad, 0xba, 0xfe, 0x46, 0x39, 0x39, 0x4a, 0xfe, 0xbc,
-0xab, 0xa5, 0xa5, 0xb8, 0x68, 0x37, 0x4a, 0xe7, 0xfe, 0x4a,
-0x5c, 0xd3, 0xb0, 0xb2, 0xc1, 0x5c, 0x42, 0x46, 0xd3, 0xb4,
-0xbe, 0x54, 0x54, 0xb6, 0xab, 0xae, 0xe7, 0x46, 0x4a, 0xfe,
-0xcd, 0xc9, 0xd3, 0xe7, 0xe7, 0xbe, 0xb4, 0xc5, 0x37, 0x2c,
-0x37, 0xc1, 0xb0, 0xb2, 0xb4, 0xb2, 0xb6, 0xdb, 0x54, 0x4a,
-0x46, 0x42, 0x68, 0xba, 0xb2, 0xba, 0xc5, 0xb6, 0xb6, 0xcd,
-0x33, 0x2f, 0x39, 0x68, 0xfe, 0xe7, 0xba, 0xac, 0xa7, 0xa7,
-0xb2, 0xe7, 0x2d, 0x25, 0x2f, 0xd3, 0xbe, 0xd3, 0xc5, 0xac,
-0xa6, 0xac, 0xfe, 0x33, 0x2c, 0x2d, 0x54, 0xc1, 0xb4, 0xcd,
-0xcd, 0xaf, 0xa4, 0xa8, 0xe7, 0x31, 0x31, 0x39, 0x46, 0xfe,
-0xdb, 0xbc, 0xb6, 0xaf, 0xa9, 0xb2, 0xfe, 0x2f, 0xfe, 0xba,
-0xad, 0xba, 0x4e, 0x3d, 0x42, 0xfe, 0xc9, 0xc1, 0xe7, 0xfe,
-0xc1, 0xa9, 0xa6, 0xcd, 0x2a, 0x25, 0x3b, 0xbc, 0xb0, 0xb6,
-0xb8, 0xb4, 0xb4, 0xb8, 0xc1, 0xfe, 0x3d, 0x3d, 0xfe, 0xba,
-0xd3, 0x54, 0x54, 0xbe, 0xb0, 0xb4, 0xe7, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xc5, 0xb6, 0xa9, 0xaa, 0xba, 0x3d, 0x39,
-0xfe, 0xc1, 0xfe, 0x4a, 0x54, 0xbe, 0xb2, 0xb8, 0xfe, 0x3d,
-0x3b, 0xfe, 0xb0, 0xab, 0xc5, 0x39, 0x3b, 0xbc, 0xa7, 0xab,
-0xd3, 0x68, 0xfe, 0xd3, 0xcd, 0xfe, 0x54, 0x3d, 0xfe, 0xbc,
-0xac, 0xc9, 0x3f, 0x2e, 0xfe, 0xba, 0xb0, 0xba, 0xba, 0xb6,
-0xba, 0xd3, 0xfe, 0xfe, 0x5c, 0x54, 0xc9, 0xb4, 0xbe, 0x54,
-0x68, 0xcd, 0xb6, 0xfe, 0x46, 0x54, 0xcd, 0xc5, 0xdb, 0xfe,
-0xe7, 0xc1, 0xae, 0xa8, 0xac, 0xfe, 0x2e, 0x2e, 0xfe, 0xb6,
-0xc1, 0x5c, 0xe7, 0xb6, 0xaa, 0xb0, 0x54, 0x35, 0x2e, 0x4a,
-0xc1, 0xac, 0xbc, 0xfe, 0xfe, 0xaf, 0xa6, 0xac, 0xfe, 0x42,
-0x46, 0x5c, 0xfe, 0xfe, 0xfe, 0xe7, 0xc9, 0xae, 0xa9, 0xb0,
-0x54, 0x31, 0x37, 0xfe, 0xd3, 0xd3, 0xb8, 0xac, 0xab, 0xb6,
-0xe7, 0xfe, 0xfe, 0x68, 0xfe, 0xfe, 0xfe, 0x54, 0xfe, 0xb0,
-0xae, 0xb8, 0xfe, 0xe7, 0xc1, 0xb6, 0xe7, 0x46, 0x3d, 0xe7,
-0xae, 0xa7, 0xab, 0xdb, 0x3f, 0x37, 0xfe, 0xba, 0xcd, 0x3f,
-0x42, 0xc5, 0xab, 0xac, 0xc9, 0x46, 0x3d, 0x54, 0xba, 0xad,
-0xb0, 0xfe, 0x68, 0xcd, 0xb0, 0xb0, 0xc9, 0x54, 0x54, 0xfe,
-0xfe, 0xfe, 0xfe, 0xe7, 0xcd, 0xbe, 0xba, 0xc5, 0x68, 0x42,
-0x46, 0xe7, 0xc5, 0xba, 0xaf, 0xa7, 0xa7, 0xbc, 0xfe, 0x3d,
-0x4a, 0x68, 0xfe, 0xfe, 0xfe, 0xe7, 0xbc, 0xaf, 0xae, 0xc5,
-0x3d, 0x39, 0xfe, 0xbc, 0xbe, 0xfe, 0x68, 0xc9, 0xa9, 0xa2,
-0xaa, 0xbc, 0x3b, 0x2d, 0x35, 0xfe, 0xcd, 0xfe, 0xfe, 0xb4,
-0xa9, 0xa6, 0xbc, 0x54, 0x31, 0x31, 0x54, 0xd3, 0xbc, 0xc5,
-0xcd, 0xb8, 0xab, 0xa8, 0xb4, 0xfe, 0x54, 0x4e, 0x68, 0x54,
-0xfe, 0xc9, 0xba, 0xb4, 0xb4, 0xba, 0xcd, 0x5c, 0x3b, 0x3f,
-0x54, 0xfe, 0xcd, 0xaf, 0xa8, 0xac, 0xc5, 0x68, 0xfe, 0xe7,
-0xdb, 0xfe, 0xfe, 0xfe, 0xcd, 0xb8, 0xaf, 0xb6, 0xe7, 0x42,
-0x5c, 0xcd, 0xbc, 0xfe, 0x46, 0x68, 0xba, 0xb0, 0xab, 0xbc,
-0x54, 0x3d, 0x46, 0xc9, 0xb8, 0xbc, 0xdb, 0xd3, 0xb6, 0xb0,
-0xb6, 0x5c, 0x37, 0x35, 0x54, 0xc9, 0xba, 0xb4, 0xc1, 0xc9,
-0xc1, 0xba, 0xe7, 0x5c, 0x3d, 0x54, 0xfe, 0xcd, 0xc5, 0xb8,
-0xae, 0xaf, 0xb4, 0xd3, 0x54, 0x3b, 0x35, 0x46, 0xfe, 0xdb,
-0xbc, 0xaf, 0xa9, 0xab, 0xd3, 0x3f, 0x31, 0x3f, 0xfe, 0xe7,
-0xdb, 0xcd, 0xb8, 0xae, 0xaa, 0xac, 0xe7, 0x33, 0x2d, 0x3f,
-0xd3, 0xdb, 0xfe, 0xfe, 0xbc, 0xaa, 0xa9, 0xb0, 0xfe, 0x31,
-0x2f, 0x3d, 0xdb, 0xc5, 0xcd, 0xc9, 0xae, 0xa8, 0xad, 0xfe,
-0x46, 0x39, 0x46, 0x5c, 0xfe, 0xcd, 0xc5, 0xc1, 0xb6, 0xb0,
-0xbc, 0x68, 0x42, 0x4e, 0xe7, 0xfe, 0x5c, 0xfe, 0xb6, 0xaf,
-0xb0, 0xc5, 0xe7, 0x5c, 0x5c, 0xfe, 0xe7, 0xfe, 0x68, 0xe7,
-0xb0, 0xac, 0xb2, 0x4a, 0x35, 0x3f, 0xcd, 0xbc, 0xc1, 0xe7,
-0xe7, 0xd3, 0xb6, 0xb4, 0xfe, 0x3b, 0x33, 0xfe, 0xba, 0xb4,
-0xd3, 0xfe, 0xc9, 0xb4, 0xb4, 0xcd, 0x4a, 0x3b, 0x3b, 0xfe,
-0xb8, 0xb6, 0xc5, 0xc5, 0xb8, 0xb0, 0xcd, 0x4a, 0x31, 0x3b,
-0x68, 0xcd, 0xc1, 0xba, 0xb4, 0xb0, 0xb0, 0xba, 0x5c, 0x2f,
+0xba, 0xba, 0xb0, 0xa6, 0xa9, 0xb8, 0xfe, 0x46, 0x42, 0x46,
+0x4a, 0xfe, 0xac, 0xa2, 0x9f, 0x9f, 0xa8, 0xb8, 0x3b, 0x29,
+0x35, 0x4a, 0xfe, 0xc1, 0xad, 0xa2, 0xad, 0xc5, 0x4e, 0x68,
+0x68, 0xe7, 0xb8, 0xb0, 0xb2, 0xc1, 0xc1, 0xb0, 0xae, 0xcd,
+0xfe, 0xfe, 0xcd, 0xcd, 0xfe, 0x68, 0xd3, 0xb2, 0xae, 0xab,
+0xb2, 0xfe, 0x35, 0x31, 0xdb, 0xac, 0xab, 0xaf, 0xab, 0xaa,
+0xb4, 0x68, 0x3b, 0x39, 0x3f, 0x68, 0xb4, 0xa8, 0xa8, 0xb0,
+0xbc, 0xbc, 0xc5, 0x3f, 0x31, 0x37, 0xfe, 0xc1, 0xbc, 0xb0,
+0xa5, 0xa2, 0xa8, 0xaf, 0xbe, 0x3b, 0x28, 0x26, 0x3d, 0xbc,
+0xb0, 0xae, 0xa2, 0x9f, 0xa2, 0xfe, 0x29, 0x24, 0x29, 0x4a,
+0xc5, 0xaa, 0xa8, 0xa9, 0xa8, 0xa5, 0xa7, 0xdb, 0x2c, 0x27,
+0x2d, 0x4a, 0xfe, 0xdb, 0xb2, 0xa2, 0x9f, 0x9f, 0xae, 0xe7,
+0x2c, 0x22, 0x2b, 0xfe, 0xba, 0xb0, 0xaa, 0x9f, 0xa3, 0xb0,
+0x5c, 0x33, 0x33, 0x39, 0x5c, 0xdb, 0xc1, 0xb4, 0xb0, 0xaa,
+0xad, 0xba, 0x54, 0x46, 0xfe, 0xe7, 0xfe, 0x54, 0xe7, 0xaf,
+0xa6, 0xa7, 0xb0, 0xfe, 0x46, 0x39, 0x5c, 0xe7, 0xdb, 0xfe,
+0xba, 0xac, 0xa8, 0xc5, 0x46, 0x33, 0x54, 0xc5, 0xae, 0xad,
+0xb2, 0xc1, 0xcd, 0xc1, 0xbc, 0xfe, 0x3f, 0x37, 0xfe, 0xb4,
+0xb6, 0xcd, 0xdb, 0xc1, 0xb0, 0xb6, 0xcd, 0x4e, 0x39, 0x37,
+0xfe, 0xb0, 0xab, 0xa9, 0xa9, 0xa9, 0xb0, 0x5c, 0x29, 0x25,
+0x31, 0xfe, 0xc1, 0xb4, 0xae, 0xab, 0xab, 0xb2, 0xcd, 0x3b,
+0x2a, 0x2c, 0x54, 0xb4, 0xb4, 0xba, 0xb2, 0xa3, 0x9f, 0xa8,
+0xfe, 0x33, 0x27, 0x2a, 0x39, 0xfe, 0xc1, 0xbe, 0xb0, 0xa2,
+0x9f, 0xb0, 0x33, 0x22, 0x25, 0x46, 0xc1, 0xb8, 0xb0, 0xab,
+0xa8, 0xa8, 0xb0, 0xbe, 0x42, 0x2c, 0x2e, 0x4a, 0xfe, 0x5c,
+0xfe, 0xb4, 0xa8, 0xa8, 0xba, 0xfe, 0x4a, 0x39, 0x39, 0x46,
+0xfe, 0xbc, 0xaf, 0xa5, 0xa5, 0xae, 0x68, 0x37, 0x4a, 0xfe,
+0xfe, 0x4a, 0x4a, 0xd3, 0xb0, 0xb0, 0xc1, 0x5c, 0x46, 0x46,
+0xd3, 0xb6, 0xbe, 0x54, 0x54, 0xc9, 0xab, 0xae, 0xc5, 0x46,
+0x4a, 0xfe, 0xcd, 0xc9, 0xcd, 0xe7, 0xe7, 0xc9, 0xb4, 0xc5,
+0x4a, 0x2c, 0x37, 0xc1, 0xb0, 0xb2, 0xb4, 0xb2, 0xb6, 0xdb,
+0xfe, 0x4a, 0x46, 0x3f, 0x68, 0xba, 0xb2, 0xba, 0xc5, 0xb6,
+0xb2, 0xcd, 0x33, 0x2e, 0x39, 0x68, 0xfe, 0xe7, 0xba, 0xaf,
+0xa7, 0xa7, 0xad, 0xe7, 0x2d, 0x25, 0x2f, 0xd3, 0xbe, 0xcd,
+0xc5, 0xac, 0xa6, 0xac, 0xfe, 0x3b, 0x2c, 0x2d, 0x3d, 0xc1,
+0xb4, 0xbe, 0xcd, 0xaf, 0xa5, 0xa8, 0xe7, 0x31, 0x2f, 0x39,
+0x46, 0x5c, 0xdb, 0xbc, 0xba, 0xaf, 0xa9, 0xad, 0xfe, 0x2f,
+0x2d, 0xba, 0xad, 0xba, 0xfe, 0x3d, 0x42, 0x5c, 0xc9, 0xc1,
+0xcd, 0xfe, 0xc1, 0xae, 0xa6, 0xcd, 0x33, 0x25, 0x3b, 0xdb,
+0xb0, 0xb6, 0xb8, 0xb6, 0xb4, 0xb8, 0xba, 0xfe, 0x3d, 0x37,
+0xfe, 0xba, 0xc1, 0x54, 0x54, 0xd3, 0xb0, 0xb4, 0xe7, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd3, 0xb6, 0xa9, 0xa7, 0xba,
+0x3d, 0x35, 0xfe, 0xc1, 0xcd, 0x4a, 0x54, 0xbe, 0xb2, 0xb8,
+0xfe, 0x46, 0x3b, 0xfe, 0xba, 0xab, 0xc5, 0x46, 0x3b, 0xbc,
+0xaa, 0xab, 0xd3, 0x68, 0xfe, 0xd3, 0xcd, 0xdb, 0x54, 0x3d,
+0x4a, 0xbc, 0xac, 0xb4, 0x3f, 0x2e, 0x3d, 0xba, 0xb0, 0xb8,
+0xba, 0xb6, 0xba, 0xcd, 0xfe, 0xfe, 0x5c, 0x54, 0xc9, 0xb4,
+0xbe, 0x54, 0x54, 0xcd, 0xb6, 0xc9, 0x46, 0x54, 0xcd, 0xc5,
+0xdb, 0xfe, 0xfe, 0xc1, 0xae, 0xa9, 0xac, 0xfe, 0x35, 0x2e,
+0xfe, 0xba, 0xc1, 0x5c, 0xfe, 0xb6, 0xaa, 0xb0, 0xe7, 0x35,
+0x2e, 0x39, 0xc1, 0xac, 0xb0, 0xfe, 0xfe, 0xbc, 0xa6, 0xac,
+0xc1, 0x42, 0x46, 0x54, 0xfe, 0xfe, 0xfe, 0xfe, 0xc9, 0xae,
+0xa9, 0xb0, 0x54, 0x35, 0x37, 0xfe, 0xd3, 0xd3, 0xb8, 0xae,
+0xab, 0xb6, 0xe7, 0xfe, 0xfe, 0x68, 0xfe, 0xfe, 0xfe, 0x4e,
+0xfe, 0xb0, 0xac, 0xb8, 0xfe, 0xfe, 0xc1, 0xb6, 0xc5, 0x46,
+0x3d, 0xe7, 0xb4, 0xa7, 0xab, 0xbc, 0x3f, 0x37, 0x54, 0xba,
+0xcd, 0x54, 0x42, 0xc5, 0xae, 0xac, 0xc9, 0x46, 0x3d, 0x54,
+0xba, 0xb0, 0xb0, 0xfe, 0x5c, 0xcd, 0xb0, 0xb0, 0xc9, 0x54,
+0x54, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xcd, 0xc1, 0xba, 0xc5,
+0xfe, 0x42, 0x46, 0xfe, 0xc5, 0xba, 0xb2, 0xa7, 0xa7, 0xb0,
+0xfe, 0x3d, 0x4a, 0x5c, 0xfe, 0xfe, 0xfe, 0xe7, 0xbc, 0xb0,
+0xae, 0xc5, 0x4e, 0x39, 0xfe, 0xc5, 0xbe, 0xfe, 0x54, 0xc9,
+0xa9, 0xa2, 0xa5, 0xbc, 0x3b, 0x2f, 0x35, 0xfe, 0xc9, 0xfe,
+0xfe, 0xc5, 0xa9, 0xa6, 0xb0, 0x54, 0x31, 0x31, 0x3f, 0xd3,
+0xbc, 0xc1, 0xcd, 0xb8, 0xae, 0xa8, 0xb4, 0xd3, 0x54, 0x4e,
+0x5c, 0x54, 0xfe, 0xdb, 0xba, 0xb4, 0xb4, 0xba, 0xcd, 0x5c,
+0x3d, 0x3f, 0x54, 0xfe, 0xcd, 0xaf, 0xa8, 0xac, 0xc5, 0xfe,
+0xfe, 0xe7, 0xdb, 0xfe, 0xfe, 0xfe, 0xe7, 0xb8, 0xaf, 0xb0,
+0xe7, 0x42, 0x4a, 0xcd, 0xbc, 0xdb, 0x46, 0x68, 0xcd, 0xb0,
+0xab, 0xbc, 0xfe, 0x3d, 0x46, 0xfe, 0xb8, 0xbc, 0xd3, 0xd3,
+0xb6, 0xb0, 0xb6, 0x5c, 0x3b, 0x35, 0x54, 0xdb, 0xba, 0xb4,
+0xc1, 0xc9, 0xc1, 0xba, 0xc9, 0x5c, 0x3d, 0x46, 0xfe, 0xcd,
+0xc5, 0xb8, 0xae, 0xaf, 0xb4, 0xd3, 0x54, 0x3d, 0x35, 0x46,
+0xfe, 0xdb, 0xbc, 0xb2, 0xa9, 0xab, 0xba, 0x3f, 0x31, 0x39,
+0xfe, 0xe7, 0xdb, 0xcd, 0xb8, 0xae, 0xab, 0xac, 0xe7, 0x3d,
+0x2d, 0x3f, 0xfe, 0xdb, 0xfe, 0xfe, 0xbc, 0xaa, 0xa8, 0xb0,
+0xfe, 0x31, 0x2d, 0x3d, 0xdb, 0xc5, 0xcd, 0xc9, 0xb4, 0xa8,
+0xad, 0xc5, 0x46, 0x39, 0x3f, 0x5c, 0xfe, 0xd3, 0xc5, 0xc1,
+0xb6, 0xb0, 0xbc, 0x68, 0x46, 0x4e, 0xe7, 0xfe, 0x5c, 0xfe,
+0xc1, 0xaf, 0xb0, 0xb8, 0xe7, 0x5c, 0x5c, 0xfe, 0xe7, 0xfe,
+0xfe, 0xe7, 0xb0, 0xab, 0xb2, 0x4a, 0x37, 0x3f, 0xcd, 0xbe,
+0xc1, 0xe7, 0xe7, 0xd3, 0xb6, 0xb4, 0xc9, 0x3b, 0x33, 0x4a,
+0xba, 0xb4, 0xc5, 0xfe, 0xc9, 0xb6, 0xb4, 0xcd, 0xfe, 0x3b,
+0x3b, 0xfe, 0xc1, 0xb6, 0xc5, 0xc5, 0xb8, 0xb0, 0xba, 0x4a,
+0x31, 0x35, 0x68, 0xcd, 0xc5, 0xba, 0xb4, 0xb0, 0xb0, 0xba,
+0x5c, 0x35, 0x2f, 0x4e, 0xd3, 0xc1, 0xdb, 0xd3, 0xb4, 0xa9,
+0xab, 0xcd, 0x3b, 0x2f, 0x35, 0xfe, 0xd3, 0xd3, 0xdb, 0xbc,
+0xad, 0xa4, 0xb0, 0xfe, 0x2d, 0x2f, 0x3f, 0xe7, 0xe7, 0xe7,
+0xcd, 0xb4, 0xaf, 0xad, 0xc5, 0x3d, 0x31, 0x3d, 0xe7, 0xd3,
+0xe7, 0xe7, 0xc1, 0xaf, 0xad, 0xb6, 0xfe, 0x4a, 0x42, 0x54,
+0xfe, 0x68, 0xfe, 0xd3, 0xb2, 0xae, 0xb4, 0xfe, 0x42, 0x4e,
+0xcd, 0xc5, 0xcd, 0xdb, 0xc9, 0xb4, 0xb0, 0xb6, 0xfe, 0x3b,
+0x42, 0xe7, 0xb0, 0xb8, 0xcd, 0xfe, 0xc9, 0xb6, 0xb8, 0xfe,
+0x42, 0x3d, 0xfe, 0xc1, 0xb0, 0xba, 0xd3, 0xfe, 0xc1, 0xb0,
+0xb6, 0xfe, 0x3b, 0x3f, 0xe7, 0xba, 0xb8, 0xbc, 0xc5, 0xc1,
+0xc1, 0xcd, 0xfe, 0x3b, 0x37, 0xfe, 0xc1, 0xb4, 0xb6, 0xb8,
+0xb6, 0xb8, 0xc5, 0x5c, 0x3f, 0x46, 0xfe, 0xcd, 0xc5, 0xcd,
+0xcd, 0xc1, 0xb2, 0xb2, 0xfe, 0x3f, 0x35, 0x54, 0xdb, 0xc1,
+0xcd, 0xcd, 0xbc, 0xaf, 0xac, 0xb6, 0x54, 0x35, 0x31, 0x68,
+0xba, 0xb8, 0xcd, 0xdb, 0xc9, 0xb2, 0xb4, 0xc9, 0x46, 0x39,
+0x42, 0xdb, 0xbc, 0xbc, 0xcd, 0xcd, 0xbe, 0xb2, 0xb8, 0xe7,
+0x54, 0x46, 0xfe, 0xfe, 0xdb, 0xc9, 0xc5, 0xbe, 0xbe, 0xc9,
+0xfe, 0x5c, 0x5c, 0xfe, 0xd3, 0xcd, 0xcd, 0xc5, 0xb6, 0xb2,
+0xc5, 0x68, 0x4e, 0xfe, 0xc5, 0xc1, 0xcd, 0x68, 0x5c, 0xe7,
+0xb8, 0xb6, 0xd3, 0x4a, 0x46, 0xfe, 0xbc, 0xb8, 0xc1, 0xe7,
+0xe7, 0xc1, 0xb4, 0xbe, 0xfe, 0x3f, 0x3f, 0xfe, 0xba, 0xb2,
+0xba, 0xe7, 0xfe, 0xcd, 0xcd, 0xfe, 0x4e, 0x46, 0xfe, 0xc5,
+0xb8, 0xb2, 0xba, 0xc1, 0xcd, 0xd3, 0xe7, 0xfe, 0x5c, 0x5c,
+0xfe, 0xe7, 0xc5, 0xbe, 0xb6, 0xba, 0xc5, 0xfe, 0x3f, 0x3f,
+0x54, 0xfe, 0xd3, 0xc1, 0xbc, 0xb6, 0xb0, 0xb0, 0xd3, 0x54,
+0x39, 0x46, 0xfe, 0xc1, 0xcd, 0xe7, 0xe7, 0xc5, 0xb8, 0xb4,
+0xd3, 0x54, 0x37, 0x42, 0xdb, 0xbe, 0xc1, 0xd3, 0xcd, 0xb8,
+0xb0, 0xb0, 0xcd, 0x4a, 0x3b, 0x42, 0xe7, 0xc5, 0xbe, 0xcd,
+0xe7, 0xd3, 0xc5, 0xcd, 0xfe, 0x54, 0x54, 0x68, 0xe7, 0xc5,
+0xc1, 0xc1, 0xcd, 0xcd, 0xc9, 0xc9, 0xcd, 0xe7, 0xfe, 0xfe,
+0xfe, 0xe7, 0xc5, 0xbe, 0xc1, 0xfe, 0x5c, 0x5c, 0xfe, 0xcd,
+0xcd, 0xcd, 0xdb, 0xd3, 0xc1, 0xbc, 0xbe, 0xfe, 0x4e, 0x54,
+0xcd, 0xb6, 0xb8, 0xd3, 0x5c, 0x5c, 0xfe, 0xc5, 0xc9, 0xfe,
+0x46, 0x4a, 0xe7, 0xb4, 0xb6, 0xc5, 0xfe, 0xe7, 0xcd, 0xc9,
+0xdb, 0xfe, 0x4e, 0x68, 0xd3, 0xb6, 0xb2, 0xbc, 0xfe, 0x68,
+0xfe, 0xfe, 0x68, 0x54, 0x68, 0xe7, 0xc5, 0xbc, 0xb8, 0xbe,
+0xcd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xd3, 0xd3, 0xcd,
+0xc1, 0xb8, 0xbc, 0xdb, 0x4e, 0x42, 0x4a, 0xfe, 0xc9, 0xc1,
+0xcd, 0xd3, 0xcd, 0xba, 0xb8, 0xcd, 0x46, 0x3b, 0xfe, 0xc9,
+0xba, 0xcd, 0xe7, 0xfe, 0xd3, 0xc1, 0xba, 0xdb, 0x54, 0x3d,
+0x68, 0xd3, 0xbc, 0xcd, 0xfe, 0xfe, 0xc5, 0xbe, 0xc1, 0xe7,
+0x54, 0x4a, 0xfe, 0xc9, 0xc1, 0xcd, 0xfe, 0xfe, 0xd3, 0xd3,
+0xd3, 0xfe, 0xe7, 0xe7, 0xe7, 0xdb, 0xd3, 0xe7, 0xe7, 0xe7,
+0xfe, 0xfe, 0xfe, 0xfe, 0xcd, 0xc9, 0xdb, 0xfe, 0xfe, 0xdb,
+0xbe, 0xc9, 0xfe, 0x5c, 0xfe, 0xc9, 0xbc, 0xbe, 0xdb, 0x68,
+0x5c, 0xdb, 0xc5, 0xd3, 0x54, 0x46, 0xfe, 0xbc, 0xb2, 0xb8,
+0xdb, 0x68, 0x68, 0xe7, 0xcd, 0xdb, 0x5c, 0x54, 0xfe, 0xc1,
+0xb8, 0xc1, 0xe7, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe,
+0xd3, 0xc5, 0xc1, 0xc5, 0xcd, 0xd3, 0xe7, 0xfe, 0x54, 0x4e,
+0xfe, 0xd3, 0xcd, 0xd3, 0xd3, 0xc5, 0xc1, 0xc1, 0xe7, 0x5c,
+0x4e, 0x5c, 0xd3, 0xc1, 0xcd, 0xfe, 0xfe, 0xcd, 0xba, 0xba,
+0xe7, 0x4a, 0x4a, 0x68, 0xcd, 0xc5, 0xcd, 0xfe, 0xfe, 0xcd,
+0xb8, 0xc1, 0xe7, 0x4e, 0x5c, 0xe7, 0xc1, 0xc9, 0xdb, 0xfe,
+0xe7, 0xc9, 0xc5, 0xd3, 0xfe, 0x68, 0xfe, 0xdb, 0xd3, 0xe7,
+0xfe, 0xfe, 0xcd, 0xc9, 0xcd, 0xd3, 0xd3, 0xd3, 0xcd, 0xe7,
+0xfe, 0xfe, 0xe7, 0xc5, 0xc5, 0xe7, 0x68, 0x68, 0xe7, 0xc1,
+0xc5, 0xfe, 0x5c, 0xfe, 0xd3, 0xc1, 0xd3, 0xfe, 0x68, 0xe7,
+0xc5, 0xb6, 0xc5, 0xe7, 0x68, 0xfe, 0xcd, 0xc5, 0xe7, 0xfe,
+0x54, 0xfe, 0xc9, 0xc5, 0xdb, 0xfe, 0xfe, 0xfe, 0xd3, 0xd3,
+0xfe, 0xfe, 0xfe, 0xcd, 0xc1, 0xc1, 0xc9, 0xd3, 0xd3, 0xe7,
+0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xd3, 0xdb, 0xe7, 0xe7, 0xd3,
+0xcd, 0xd3, 0xfe, 0xfe, 0xfe, 0xcd, 0xc5, 0xd3, 0xe7, 0xe7,
+0xc9, 0xbc, 0xbe, 0xe7, 0x68, 0x4a, 0xfe, 0xdb, 0xcd, 0xfe,
+0xfe, 0xfe, 0xcd, 0xc1, 0xc9, 0xfe, 0x54, 0x5c, 0xe7, 0xc9,
+0xc5, 0xe7, 0xfe, 0xfe, 0xcd, 0xc5, 0xc5, 0xe7, 0xfe, 0xfe,
+0xfe, 0xe7, 0xe7, 0xfe, 0xfe, 0xdb, 0xd3, 0xd3, 0xdb, 0xe7,
+0xfe, 0xfe, 0xe7, 0xe7, 0xdb, 0xd3, 0xc9, 0xd3, 0xe7, 0xfe,
+0xfe, 0xd3, 0xd3, 0xdb, 0xfe, 0xfe, 0xfe, 0xd3, 0xcd, 0xcd,
+0xfe, 0xfe, 0xe7, 0xc9, 0xc5, 0xd3, 0xfe, 0xfe, 0xfe, 0xcd,
+0xc9, 0xd3, 0xfe, 0xfe, 0xfe, 0xdb, 0xc9, 0xcd, 0xe7, 0xfe,
+0xe7, 0xcd, 0xcd, 0xe7, 0xfe, 0xfe, 0xe7, 0xd3, 0xc5, 0xcd,
+0xe7, 0xfe, 0xfe, 0xfe, 0xdb, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe,
+0xe7, 0xcd, 0xcd, 0xd3, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe,
+0xe7, 0xe7, 0xdb, 0xc9, 0xc1, 0xc5, 0xfe, 0x5c, 0x68, 0xfe,
+0xd3, 0xdb, 0xe7, 0xe7, 0xe7, 0xd3, 0xc5, 0xcd, 0xe7, 0x68,
+0xfe, 0xe7, 0xcd, 0xd3, 0xe7, 0xfe, 0xe7, 0xcd, 0xc1, 0xc1,
+0xdb, 0xfe, 0x54, 0xfe, 0xe7, 0xcd, 0xe7, 0xfe, 0xe7, 0xd3,
+0xcd, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xcd, 0xc5, 0xcd, 0xfe,
+0xfe, 0xe7, 0xcd, 0xd3, 0xdb, 0xe7, 0xfe, 0xfe, 0xfe, 0xe7,
+0xd3, 0xd3, 0xe7, 0xfe, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe,
+0xfe, 0xdb, 0xc5, 0xc1, 0xd3, 0xfe, 0xfe, 0xfe, 0xd3, 0xc9,
+0xcd, 0xe7, 0xfe, 0xfe, 0xd3, 0xcd, 0xdb, 0xfe, 0x5c, 0xfe,
+0xcd, 0xc9, 0xd3, 0xfe, 0xfe, 0xfe, 0xd3, 0xc9, 0xcd, 0xfe,
+0x68, 0xfe, 0xd3, 0xc1, 0xc1, 0xdb, 0xfe, 0xfe, 0xe7, 0xe7,
+0xfe, 0xfe, 0x68, 0xfe, 0xe7, 0xc5, 0xc9, 0xdb, 0xfe, 0xfe,
+0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xdb, 0xc5, 0xc5,
+0xd3, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xfe,
+0xc9, 0xc1, 0xc5, 0xfe, 0x54, 0x5c, 0xfe, 0xcd, 0xc5, 0xcd,
+0xfe, 0xfe, 0xdb, 0xc5, 0xc9, 0xfe, 0x5c, 0x68, 0xfe, 0xcd,
+0xcd, 0xfe, 0xfe, 0xfe, 0xe7, 0xc5, 0xc1, 0xd3, 0xfe, 0xfe,
+0xdb, 0xc9, 0xc5, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe,
+0xfe, 0xfe, 0xe7, 0xcd, 0xcd, 0xdb, 0xfe, 0xfe, 0xfe, 0xfe,
+0xe7, 0xd3, 0xcd, 0xd3, 0xfe, 0xfe, 0xdb, 0xcd, 0xd3, 0xe7,
+0xfe, 0xfe, 0xfe, 0xdb, 0xcd, 0xd3, 0xe7, 0xfe, 0xd3, 0xc5,
+0xc9, 0xfe, 0x5c, 0x54, 0xfe, 0xcd, 0xc1, 0xcd, 0xe7, 0xfe,
+0xfe, 0xd3, 0xcd, 0xfe, 0x54, 0x5c, 0xe7, 0xc1, 0xc1, 0xd3,
+0xfe, 0xfe, 0xe7, 0xd3, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xcd,
+0xc5, 0xcd, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xe7, 0xd3, 0xcd, 0xc9, 0xcd, 0xe7, 0xfe, 0xfe, 0xfe, 0xdb,
+0xc9, 0xcd, 0xe7, 0xfe, 0xe7, 0xc9, 0xc5, 0xdb, 0xfe, 0x5c,
+0xfe, 0xe7, 0xcd, 0xcd, 0xe7, 0xfe, 0xe7, 0xc5, 0xc1, 0xd3,
+0xfe, 0x5c, 0xfe, 0xcd, 0xc5, 0xcd, 0xe7, 0xfe, 0xfe, 0xe7,
+0xd3, 0xe7, 0xfe, 0xfe, 0xe7, 0xcd, 0xcd, 0xdb, 0xfe, 0xfe,
+0xfe, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xe7, 0xdb, 0xcd, 0xd3,
+0xd3, 0xdb, 0xfe, 0xfe, 0xfe, 0xfe, 0xdb, 0xd3, 0xdb, 0xe7,
+0xe7, 0xdb, 0xd3, 0xe7, 0xfe, 0xfe, 0xfe, 0xe7, 0xc9, 0xc5,
+0xcd, 0xe7, 0xfe, 0xdb, 0xd3, 0xe7, 0xfe, 0x68, 0xfe, 0xe7,
+0xcd, 0xcd, 0xd3, 0xfe, 0xfe, 0xe7, 0xdb, 0xe7, 0xfe, 0x68,
+0xfe, 0xdb, 0xfe, 0x68, 0xbe, 0xb2, 0xae, 0xab, 0xb2, 0xfe,
+0x2f, 0x31, 0xdb, 0xac, 0xad, 0xaf, 0xab, 0xab, 0xb4, 0x68,
+0x37, 0x39, 0x3f, 0xe7, 0xb4, 0xa8, 0xaa, 0xb0, 0xbc, 0xbc,
+0xc5, 0x3f, 0x31, 0x3d, 0xfe, 0xc1, 0xb8, 0xb0, 0xa5, 0xa2,
+0xa8, 0xaf, 0xdb, 0x3b, 0x28, 0x2a, 0x3d, 0xbc, 0xb0, 0xaa,
+0xa2, 0x9f, 0xab, 0xfe, 0x29, 0x24, 0x29, 0x4a, 0xb4, 0xaa,
+0xa8, 0xa9, 0xa8, 0xa5, 0xac, 0xdb, 0x2c, 0x27, 0x35, 0x4a,
+0xfe, 0xcd, 0xb2, 0xa2, 0x9f, 0x9f, 0xae, 0x4e, 0x2c, 0x22,
+0x33, 0xfe, 0xba, 0xb0, 0xa6, 0x9f, 0xa3, 0xbc, 0x5c, 0x33,
+0x31, 0x39, 0x5c, 0xcd, 0xc1, 0xb4, 0xad, 0xaa, 0xad, 0xcd,
+0x54, 0x46, 0xfe, 0xe7, 0xfe, 0x54, 0xc5, 0xaf, 0xa6, 0xa9,
+0xb0, 0xfe, 0x3d, 0x39, 0x5c, 0xdb, 0xdb, 0xfe, 0xba, 0xac,
+0xa8, 0xc5, 0x39, 0x33, 0x54, 0xb8, 0xae, 0xad, 0xb8, 0xc1,
+0xcd, 0xbe, 0xbc, 0xfe, 0x39, 0x37, 0xfe, 0xb4, 0xba, 0xcd,
+0xdb, 0xb8, 0xb0, 0xb6, 0xfe, 0x4e, 0x39, 0x3d, 0xfe, 0xb0,
+0xaa, 0xa9, 0xa9, 0xaa, 0xb0, 0x5c, 0x29, 0x28, 0x31, 0xfe,
+0xba, 0xb4, 0xae, 0xab, 0xab, 0xb2, 0xfe, 0x3b, 0x2a, 0x2f,
+0x54, 0xb4, 0xb4, 0xba, 0xb2, 0xa3, 0x9f, 0xa8, 0xfe, 0x2c,
+0x27, 0x2a, 0x46, 0xfe, 0xc1, 0xbc, 0xb0, 0xa2, 0xa2, 0xb0,
+0x33, 0x22, 0x2b, 0x46, 0xc1, 0xb4, 0xb0, 0xab, 0xa8, 0xa8,
+0xb0, 0xdb, 0x42, 0x2c, 0x33, 0x4a, 0xfe, 0x5c, 0xdb, 0xb4,
+0xa8, 0xad, 0xba, 0xfe, 0x46, 0x39, 0x39, 0x4a, 0xfe, 0xbc,
+0xab, 0xa5, 0xa5, 0xb8, 0x68, 0x37, 0x4a, 0xe7, 0xfe, 0x4a,
+0x5c, 0xd3, 0xb0, 0xb2, 0xc1, 0x5c, 0x42, 0x46, 0xd3, 0xb4,
+0xbe, 0x54, 0x54, 0xb6, 0xab, 0xae, 0xe7, 0x46, 0x4a, 0xfe,
+0xcd, 0xc9, 0xd3, 0xe7, 0xe7, 0xbe, 0xb4, 0xc5, 0x37, 0x2c,
+0x37, 0xc1, 0xb0, 0xb2, 0xb4, 0xb2, 0xb6, 0xdb, 0x54, 0x4a,
+0x46, 0x42, 0x68, 0xba, 0xb2, 0xba, 0xc5, 0xb6, 0xb6, 0xcd,
+0x33, 0x2f, 0x39, 0x68, 0xfe, 0xe7, 0xba, 0xac, 0xa7, 0xa7,
+0xb2, 0xe7, 0x2d, 0x25, 0x2f, 0xd3, 0xbe, 0xd3, 0xc5, 0xac,
+0xa6, 0xac, 0xfe, 0x33, 0x2c, 0x2d, 0x54, 0xc1, 0xb4, 0xcd,
+0xcd, 0xaf, 0xa4, 0xa8, 0xe7, 0x31, 0x31, 0x39, 0x46, 0xfe,
+0xdb, 0xbc, 0xb6, 0xaf, 0xa9, 0xb2, 0xfe, 0x2f, 0xfe, 0xba,
+0xad, 0xba, 0x4e, 0x3d, 0x42, 0xfe, 0xc9, 0xc1, 0xe7, 0xfe,
+0xc1, 0xa9, 0xa6, 0xcd, 0x2a, 0x25, 0x3b, 0xbc, 0xb0, 0xb6,
+0xb8, 0xb4, 0xb4, 0xb8, 0xc1, 0xfe, 0x3d, 0x3d, 0xfe, 0xba,
+0xd3, 0x54, 0x54, 0xbe, 0xb0, 0xb4, 0xe7, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xc5, 0xb6, 0xa9, 0xaa, 0xba, 0x3d, 0x39,
+0xfe, 0xc1, 0xfe, 0x4a, 0x54, 0xbe, 0xb2, 0xb8, 0xfe, 0x3d,
+0x3b, 0xfe, 0xb0, 0xab, 0xc5, 0x39, 0x3b, 0xbc, 0xa7, 0xab,
+0xd3, 0x68, 0xfe, 0xd3, 0xcd, 0xfe, 0x54, 0x3d, 0xfe, 0xbc,
+0xac, 0xc9, 0x3f, 0x2e, 0xfe, 0xba, 0xb0, 0xba, 0xba, 0xb6,
+0xba, 0xd3, 0xfe, 0xfe, 0x5c, 0x54, 0xc9, 0xb4, 0xbe, 0x54,
+0x68, 0xcd, 0xb6, 0xfe, 0x46, 0x54, 0xcd, 0xc5, 0xdb, 0xfe,
+0xe7, 0xc1, 0xae, 0xa8, 0xac, 0xfe, 0x2e, 0x2e, 0xfe, 0xb6,
+0xc1, 0x5c, 0xe7, 0xb6, 0xaa, 0xb0, 0x54, 0x35, 0x2e, 0x4a,
+0xc1, 0xac, 0xbc, 0xfe, 0xfe, 0xaf, 0xa6, 0xac, 0xfe, 0x42,
+0x46, 0x5c, 0xfe, 0xfe, 0xfe, 0xe7, 0xc9, 0xae, 0xa9, 0xb0,
+0x54, 0x31, 0x37, 0xfe, 0xd3, 0xd3, 0xb8, 0xac, 0xab, 0xb6,
+0xe7, 0xfe, 0xfe, 0x68, 0xfe, 0xfe, 0xfe, 0x54, 0xfe, 0xb0,
+0xae, 0xb8, 0xfe, 0xe7, 0xc1, 0xb6, 0xe7, 0x46, 0x3d, 0xe7,
+0xae, 0xa7, 0xab, 0xdb, 0x3f, 0x37, 0xfe, 0xba, 0xcd, 0x3f,
+0x42, 0xc5, 0xab, 0xac, 0xc9, 0x46, 0x3d, 0x54, 0xba, 0xad,
+0xb0, 0xfe, 0x68, 0xcd, 0xb0, 0xb0, 0xc9, 0x54, 0x54, 0xfe,
+0xfe, 0xfe, 0xfe, 0xe7, 0xcd, 0xbe, 0xba, 0xc5, 0x68, 0x42,
+0x46, 0xe7, 0xc5, 0xba, 0xaf, 0xa7, 0xa7, 0xbc, 0xfe, 0x3d,
+0x4a, 0x68, 0xfe, 0xfe, 0xfe, 0xe7, 0xbc, 0xaf, 0xae, 0xc5,
+0x3d, 0x39, 0xfe, 0xbc, 0xbe, 0xfe, 0x68, 0xc9, 0xa9, 0xa2,
+0xaa, 0xbc, 0x3b, 0x2d, 0x35, 0xfe, 0xcd, 0xfe, 0xfe, 0xb4,
+0xa9, 0xa6, 0xbc, 0x54, 0x31, 0x31, 0x54, 0xd3, 0xbc, 0xc5,
+0xcd, 0xb8, 0xab, 0xa8, 0xb4, 0xfe, 0x54, 0x4e, 0x68, 0x54,
+0xfe, 0xc9, 0xba, 0xb4, 0xb4, 0xba, 0xcd, 0x5c, 0x3b, 0x3f,
+0x54, 0xfe, 0xcd, 0xaf, 0xa8, 0xac, 0xc5, 0x68, 0xfe, 0xe7,
+0xdb, 0xfe, 0xfe, 0xfe, 0xcd, 0xb8, 0xaf, 0xb6, 0xe7, 0x42,
+0x5c, 0xcd, 0xbc, 0xfe, 0x46, 0x68, 0xba, 0xb0, 0xab, 0xbc,
+0x54, 0x3d, 0x46, 0xc9, 0xb8, 0xbc, 0xdb, 0xd3, 0xb6, 0xb0,
+0xb6, 0x5c, 0x37, 0x35, 0x54, 0xc9, 0xba, 0xb4, 0xc1, 0xc9,
+0xc1, 0xba, 0xe7, 0x5c, 0x3d, 0x54, 0xfe, 0xcd, 0xc5, 0xb8,
+0xae, 0xaf, 0xb4, 0xd3, 0x54, 0x3b, 0x35, 0x46, 0xfe, 0xdb,
+0xbc, 0xaf, 0xa9, 0xab, 0xd3, 0x3f, 0x31, 0x3f, 0xfe, 0xe7,
+0xdb, 0xcd, 0xb8, 0xae, 0xaa, 0xac, 0xe7, 0x33, 0x2d, 0x3f,
+0xd3, 0xdb, 0xfe, 0xfe, 0xbc, 0xaa, 0xa9, 0xb0, 0xfe, 0x31,
+0x2f, 0x3d, 0xdb, 0xc5, 0xcd, 0xc9, 0xae, 0xa8, 0xad, 0xfe,
+0x46, 0x39, 0x46, 0x5c, 0xfe, 0xcd, 0xc5, 0xc1, 0xb6, 0xb0,
+0xbc, 0x68, 0x42, 0x4e, 0xe7, 0xfe, 0x5c, 0xfe, 0xb6, 0xaf,
+0xb0, 0xc5, 0xe7, 0x5c, 0x5c, 0xfe, 0xe7, 0xfe, 0x68, 0xe7,
+0xb0, 0xac, 0xb2, 0x4a, 0x35, 0x3f, 0xcd, 0xbc, 0xc1, 0xe7,
+0xe7, 0xd3, 0xb6, 0xb4, 0xfe, 0x3b, 0x33, 0xfe, 0xba, 0xb4,
+0xd3, 0xfe, 0xc9, 0xb4, 0xb4, 0xcd, 0x4a, 0x3b, 0x3b, 0xfe,
+0xb8, 0xb6, 0xc5, 0xc5, 0xb8, 0xb0, 0xcd, 0x4a, 0x31, 0x3b,
+0x68, 0xcd, 0xc1, 0xba, 0xb4, 0xb0, 0xb0, 0xba, 0x5c, 0x2f,
0x2f, 0x4e, 0xc9, 0xc1, 0xdb, 0xc9, 0xb4 };
diff --git a/apps/leave.h b/apps/leave.h
index 238976f20..8850d1cd0 100644
--- a/apps/leave.h
+++ b/apps/leave.h
@@ -10,198 +10,198 @@
*/
static unsigned char leave[] = {
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xc1, 0x3d,
-0x42, 0x46, 0x3f, 0x3f, 0x46, 0x3f, 0x4e, 0xba, 0xbe, 0xbe,
-0xbc, 0xba, 0xbe, 0xc5, 0xb6, 0x2e, 0x2c, 0x33, 0x2f, 0x2e,
-0x2f, 0x33, 0x2b, 0x54, 0xac, 0xb0, 0xb0, 0xad, 0xaf, 0xb0,
-0xae, 0xcd, 0x3b, 0x2f, 0x31, 0x2e, 0x2f, 0x31, 0x2e, 0x46,
-0xc5, 0xaf, 0xb0, 0xaf, 0xae, 0xaf, 0xaf, 0xb0, 0xfe, 0x2d,
-0x31, 0x31, 0x2e, 0x31, 0x2f, 0x31, 0xfe, 0xae, 0xaf, 0xaf,
-0xae, 0xb0, 0xae, 0xaf, 0xfe, 0xdb, 0x2e, 0x2e, 0x31, 0x31,
-0x2d, 0x2e, 0xdb, 0x68, 0xaf, 0xad, 0xb0, 0xb0, 0xae, 0xaf,
-0x5c, 0xe7, 0x39, 0x2d, 0x31, 0x31, 0x31, 0x2d, 0xfe, 0xfe,
-0x68, 0xad, 0xaf, 0xb0, 0xaf, 0xac, 0xbc, 0xfe, 0xd3, 0x2f,
-0x2e, 0x33, 0x31, 0x2d, 0x4e, 0xdb, 0xfe, 0xfe, 0xac, 0xaf,
-0xb0, 0xac, 0xb6, 0x68, 0xe7, 0xdb, 0x2e, 0x2f, 0x35, 0x2f,
-0x31, 0xe7, 0xe7, 0x68, 0xad, 0xac, 0xb0, 0xae, 0xac, 0xfe,
-0xfe, 0xdb, 0xfe, 0x2d, 0x33, 0x31, 0x2e, 0xfe, 0xfe, 0xfe,
-0xfe, 0xbc, 0xaf, 0xb0, 0xad, 0xfe, 0xfe, 0xfe, 0xe7, 0x5c,
-0x2e, 0x33, 0x2e, 0x35, 0xe7, 0xfe, 0xfe, 0xfe, 0xad, 0xb0,
-0xaf, 0xc1, 0xfe, 0xe7, 0xfe, 0xe7, 0x3d, 0x31, 0x2f, 0x37,
-0xe7, 0xfe, 0xfe, 0xe7, 0xfe, 0xaf, 0xad, 0xbe, 0xfe, 0xdb,
-0xfe, 0xfe, 0xdb, 0x35, 0x2d, 0x39, 0xdb, 0xfe, 0xfe, 0xdb,
-0xfe, 0xfe, 0xad, 0xaf, 0xfe, 0xfe, 0xe7, 0x68, 0xfe, 0xd3,
-0x2e, 0x2c, 0xdb, 0xdb, 0x2c, 0x35, 0xd3, 0x68, 0xaf, 0xad,
-0xb0, 0xb0, 0xad, 0xba, 0x68, 0xe7, 0xe7, 0x2e, 0x2f, 0x33,
-0x31, 0x2d, 0xdb, 0xd3, 0x5c, 0xae, 0xaa, 0xe7, 0x68, 0xaa,
-0xe7, 0xfe, 0xdb, 0xe7, 0xfe, 0xe7, 0xd3, 0x2d, 0xfe, 0xdb,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xc5, 0xfe, 0xe7, 0xe7,
-0xfe, 0xfe, 0xe7, 0xe7, 0x3b, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xc5, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xfe, 0x3b,
-0xdb, 0xfe, 0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xb0, 0xfe, 0xfe,
-0xe7, 0xfe, 0xfe, 0xfe, 0xdb, 0x2e, 0x5c, 0xdb, 0xfe, 0xfe,
-0xe7, 0xe7, 0x68, 0xb0, 0xbe, 0x68, 0xe7, 0xe7, 0xfe, 0xfe,
-0xdb, 0x39, 0x2f, 0xdb, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xbe,
-0xaf, 0xe7, 0x68, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0x33, 0x33,
-0xdb, 0xfe, 0xfe, 0xdb, 0xe7, 0xfe, 0xb0, 0xb0, 0xfe, 0xfe,
-0xe7, 0xfe, 0xfe, 0xfe, 0x35, 0x33, 0xe7, 0xe7, 0xfe, 0xe7,
-0xe7, 0xfe, 0xb0, 0xb2, 0xb0, 0xfe, 0xfe, 0xe7, 0xfe, 0xe7,
-0x46, 0x35, 0x35, 0x3f, 0xe7, 0xfe, 0xe7, 0xfe, 0xb2, 0xb0,
-0xb2, 0xb0, 0xfe, 0xfe, 0xfe, 0xfe, 0x42, 0x35, 0x37, 0x33,
-0xe7, 0xfe, 0xfe, 0xfe, 0xb8, 0xb0, 0xb6, 0xb0, 0xba, 0xfe,
-0xfe, 0xe7, 0xe7, 0x33, 0x39, 0x39, 0x33, 0xe7, 0xdb, 0xfe,
-0xe7, 0xb0, 0xb4, 0xb6, 0xb0, 0xcd, 0xfe, 0xe7, 0xe7, 0x33,
-0x39, 0x3b, 0x33, 0x46, 0xd3, 0xfe, 0xfe, 0xb0, 0xb2, 0xb6,
-0xb4, 0xb0, 0xfe, 0xfe, 0xdb, 0x35, 0x37, 0x39, 0x39, 0x35,
-0x37, 0xdb, 0x68, 0xcd, 0xb2, 0xb6, 0xb6, 0xb4, 0xb4, 0x68,
-0xe7, 0x42, 0x37, 0x3b, 0x3b, 0x39, 0x37, 0xdb, 0xfe, 0xcd,
-0xb2, 0xb6, 0xb6, 0xb6, 0xb2, 0xb4, 0xfe, 0x54, 0x37, 0x3b,
-0x39, 0x3b, 0x3b, 0x39, 0xe7, 0xfe, 0xb6, 0xb6, 0xb6, 0xb4,
-0xb6, 0xb6, 0xbc, 0xfe, 0x3f, 0x3b, 0x3b, 0x39, 0x3b, 0x3b,
-0x39, 0xe7, 0xb6, 0xb8, 0xb8, 0xb6, 0xb8, 0xb8, 0xb4, 0xfe,
-0x3b, 0x3d, 0x3d, 0x3b, 0x39, 0x3d, 0x3b, 0x39, 0xbe, 0xb8,
-0xba, 0xb8, 0xb6, 0xb8, 0xba, 0xb4, 0xfe, 0x39, 0x3f, 0x3d,
-0x3b, 0x3d, 0x3f, 0x39, 0xdb, 0xb4, 0xba, 0xb8, 0xb6, 0xb8,
-0xbc, 0xb4, 0xba, 0x39, 0x42, 0x3f, 0x3d, 0x3d, 0x3f, 0x3f,
-0x3b, 0xb8, 0xb6, 0xbc, 0xb8, 0xb8, 0xba, 0xbc, 0xb8, 0xe7,
-0x3d, 0x42, 0x3f, 0x3d, 0x3f, 0x42, 0x3d, 0xfe, 0xb8, 0xbc,
-0xbc, 0xba, 0xba, 0xbc, 0xba, 0xe7, 0x3d, 0x3f, 0x42, 0x3f,
-0x3f, 0x42, 0x42, 0xfe, 0xfe, 0xbc, 0xbc, 0xbe, 0xbc, 0xbe,
-0xbc, 0xc5, 0xe7, 0x68, 0x42, 0x46, 0x42, 0x46, 0x42, 0x46,
-0xfe, 0xfe, 0xbc, 0xbe, 0xbe, 0xbe, 0xbc, 0xc5, 0xfe, 0xdb,
-0x46, 0x46, 0x4a, 0x4a, 0x46, 0x46, 0xe7, 0xfe, 0xd3, 0xbe,
-0xc9, 0xc9, 0xc5, 0xc5, 0xe7, 0xdb, 0xd3, 0x4a, 0x4e, 0x54,
-0x4e, 0x4e, 0xfe, 0x5c, 0x54, 0xd3, 0xcd, 0xd3, 0xd3, 0xcd,
-0xd3, 0xd3, 0xcd, 0xfe, 0x5c, 0x68, 0x5c, 0x5c, 0x5c, 0x68,
-0x5c, 0x5c, 0xcd, 0xcd, 0xd3, 0xcd, 0xdb, 0xe7, 0xe7, 0xdb,
-0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7,
-0xfe, 0x5c, 0x5c, 0xfe, 0xfe, 0xfe, 0xfe, 0x46, 0x35, 0x35,
-0x37, 0x39, 0x3b, 0x39, 0x35, 0x33, 0x35, 0x5c, 0xd3, 0xcd,
-0xdb, 0xfe, 0xfe, 0xd3, 0xb0, 0xb0, 0xb0, 0xb4, 0xb4, 0xb6,
-0xb2, 0xb0, 0xb0, 0xb6, 0xcd, 0x5c, 0x68, 0xfe, 0xfe, 0xfe,
-0x3b, 0x33, 0x35, 0x37, 0x39, 0x3b, 0x39, 0x37, 0x35, 0x35,
-0x3f, 0xdb, 0xcd, 0xcd, 0xdb, 0xfe, 0xe7, 0xc5, 0xb0, 0xb0,
-0xb2, 0xb6, 0xb6, 0xb6, 0xb2, 0xb0, 0xb0, 0xcd, 0x5c, 0x5c,
-0xfe, 0xe7, 0xe7, 0xfe, 0x35, 0x35, 0x35, 0x39, 0x3b, 0x3b,
-0x39, 0x35, 0x33, 0x39, 0xdb, 0xcd, 0xd3, 0xe7, 0xfe, 0xfe,
-0xba, 0xb0, 0xb0, 0xb2, 0xb4, 0xb6, 0xb6, 0xb4, 0xb2, 0xb0,
-0xb4, 0xc9, 0x5c, 0x68, 0xfe, 0xfe, 0x5c, 0x3b, 0x35, 0x37,
-0x39, 0x3b, 0x3b, 0x3b, 0x39, 0x37, 0x37, 0x3d, 0xe7, 0xcd,
-0xdb, 0xfe, 0xe7, 0xbe, 0xb2, 0xb2, 0xb4, 0xb4, 0xb6, 0xb6,
-0xb6, 0xb4, 0xb0, 0xb0, 0xc5, 0x5c, 0x5c, 0xfe, 0xe7, 0xe7,
-0x4e, 0x35, 0x35, 0x37, 0x3b, 0x3b, 0x3b, 0x39, 0x37, 0x37,
-0x3b, 0xe7, 0xc9, 0xcd, 0xe7, 0xfe, 0xd3, 0xb4, 0xb2, 0xb2,
-0xb4, 0xb6, 0xb6, 0xb6, 0xb6, 0xb4, 0xb2, 0xb4, 0xc1, 0x68,
-0x68, 0xfe, 0xfe, 0x42, 0x39, 0x37, 0x39, 0x3b, 0x3b, 0x3b,
-0x3b, 0x3b, 0x39, 0x37, 0x3b, 0xfe, 0xd3, 0xdb, 0xfe, 0xcd,
-0xb4, 0xb2, 0xb4, 0xb4, 0xb6, 0xb6, 0xb6, 0xb6, 0xb4, 0xb2,
-0xb2, 0xc1, 0x5c, 0x5c, 0xfe, 0xfe, 0xfe, 0x3d, 0x37, 0x37,
-0x39, 0x3b, 0x3b, 0x3b, 0x3b, 0x37, 0x37, 0x39, 0xfe, 0xcd,
-0xd3, 0xfe, 0xfe, 0xc1, 0xb2, 0xb2, 0xb4, 0xb6, 0xb6, 0xb6,
-0xb6, 0xb6, 0xb6, 0xb4, 0xb4, 0xbc, 0x68, 0xfe, 0xfe, 0xfe,
-0x3b, 0x39, 0x39, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x39,
-0x39, 0x3b, 0xfe, 0xdb, 0xe7, 0xfe, 0xbc, 0xb6, 0xb6, 0xb6,
-0xb8, 0xb6, 0xb6, 0xb6, 0xb8, 0xb6, 0xb4, 0xb4, 0xbc, 0xfe,
-0x68, 0xfe, 0xe7, 0x5c, 0x3b, 0x39, 0x39, 0x3b, 0x3b, 0x3b,
-0x3d, 0x3d, 0x3b, 0x39, 0x3b, 0x68, 0xdb, 0xdb, 0xfe, 0xe7,
-0xb8, 0xb6, 0xb6, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb6,
-0xb4, 0xb6, 0xdb, 0x68, 0xfe, 0xfe, 0x46, 0x3b, 0x3b, 0x3b,
-0x3d, 0x3d, 0x3b, 0x3d, 0x3d, 0x3d, 0x3d, 0x3b, 0x3b, 0x5c,
-0xdb, 0xdb, 0xc9, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8,
-0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xbc, 0xcd, 0xfe, 0xfe, 0x3d,
-0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3b, 0x3d, 0x3d, 0x3d, 0x3d,
-0x3b, 0x3d, 0x46, 0xfe, 0xe7, 0xe7, 0xc5, 0xb8, 0xb8, 0xb8,
-0xba, 0xba, 0xb8, 0xb8, 0xba, 0xba, 0xb8, 0xb8, 0xb8, 0xcd,
-0xfe, 0xfe, 0x68, 0x3f, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
-0x3d, 0x3d, 0x3f, 0x3f, 0x3d, 0x3b, 0x4a, 0xfe, 0xdb, 0xbc,
-0xb8, 0xba, 0xba, 0xba, 0xba, 0xb8, 0xb8, 0xb8, 0xba, 0xba,
-0xba, 0xba, 0xba, 0xc5, 0xfe, 0x54, 0x3f, 0x3f, 0x3f, 0x3f,
-0x3f, 0x3f, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x42,
-0xfe, 0xe7, 0xdb, 0xbc, 0xba, 0xba, 0xba, 0xba, 0xba, 0xba,
-0xba, 0xba, 0xbc, 0xba, 0xba, 0xba, 0xc5, 0xfe, 0xfe, 0x4e,
-0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x42,
-0x42, 0x42, 0x3f, 0x46, 0xfe, 0xcd, 0xb8, 0xba, 0xbc, 0xbc,
-0xbc, 0xba, 0xba, 0xba, 0xba, 0xbc, 0xbc, 0xbc, 0xba, 0xb8,
-0xbe, 0xfe, 0x42, 0x3d, 0x3f, 0x42, 0x42, 0x42, 0x3f, 0x3f,
-0x3f, 0x42, 0x42, 0x42, 0x42, 0x3f, 0x3f, 0x68, 0xdb, 0xc5,
-0xba, 0xbc, 0xbc, 0xbc, 0xbc, 0xba, 0xba, 0xba, 0xbc, 0xbc,
-0xbc, 0xbc, 0xba, 0xc1, 0xfe, 0xfe, 0x3f, 0x42, 0x46, 0x46,
-0x46, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x46, 0x42, 0x3f,
-0x42, 0x68, 0xbe, 0xba, 0xbc, 0xbe, 0xbe, 0xbe, 0xbc, 0xbc,
-0xbc, 0xbc, 0xbe, 0xc1, 0xbe, 0xbc, 0xba, 0xbe, 0x68, 0x3f,
-0x42, 0x46, 0x4a, 0x4a, 0x46, 0x42, 0x42, 0x42, 0x46, 0x46,
-0x46, 0x46, 0x42, 0x42, 0x68, 0xd3, 0xbc, 0xbc, 0xbe, 0xc1,
-0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xc1, 0xc1, 0xbe, 0xbe,
-0xc1, 0xfe, 0x4e, 0x42, 0x46, 0x4a, 0x4a, 0x4a, 0x46, 0x46,
-0x46, 0x46, 0x4a, 0x4a, 0x4a, 0x46, 0x46, 0x68, 0xdb, 0xbe,
-0xbe, 0xc1, 0xc5, 0xc1, 0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xc1,
-0xc5, 0xc5, 0xbe, 0xbc, 0xc1, 0x4e, 0x46, 0x46, 0x4a, 0x4e,
-0x4e, 0x4a, 0x46, 0x46, 0x46, 0x4a, 0x4a, 0x4e, 0x4a, 0x46,
-0x46, 0xfe, 0xbe, 0xbe, 0xc1, 0xc9, 0xc5, 0xc5, 0xc1, 0xc1,
-0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, 0xbe, 0xc1, 0xfe, 0x4a,
-0x4a, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4a, 0x4a, 0x4a, 0x4e,
-0x54, 0x4e, 0x4a, 0x4a, 0x4e, 0xcd, 0xc1, 0xc5, 0xc5, 0xc9,
-0xc5, 0xc5, 0xc5, 0xc5, 0xc9, 0xcd, 0xcd, 0xcd, 0xcd, 0xc9,
-0xc9, 0xd3, 0x68, 0x54, 0x5c, 0x68, 0x68, 0x68, 0x5c, 0x5c,
-0x5c, 0x5c, 0x5c, 0x68, 0x68, 0x5c, 0x54, 0x5c, 0xdb, 0xcd,
-0xcd, 0xdb, 0xdb, 0xdb, 0xdb, 0xd3, 0xd3, 0xe7, 0xe7, 0xe7,
-0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
-0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xc1, 0x3d,
+0x42, 0x46, 0x3f, 0x3f, 0x46, 0x3f, 0x4e, 0xba, 0xbe, 0xbe,
+0xbc, 0xba, 0xbe, 0xc5, 0xb6, 0x2e, 0x2c, 0x33, 0x2f, 0x2e,
+0x2f, 0x33, 0x2b, 0x54, 0xac, 0xb0, 0xb0, 0xad, 0xaf, 0xb0,
+0xae, 0xcd, 0x3b, 0x2f, 0x31, 0x2e, 0x2f, 0x31, 0x2e, 0x46,
+0xc5, 0xaf, 0xb0, 0xaf, 0xae, 0xaf, 0xaf, 0xb0, 0xfe, 0x2d,
+0x31, 0x31, 0x2e, 0x31, 0x2f, 0x31, 0xfe, 0xae, 0xaf, 0xaf,
+0xae, 0xb0, 0xae, 0xaf, 0xfe, 0xdb, 0x2e, 0x2e, 0x31, 0x31,
+0x2d, 0x2e, 0xdb, 0x68, 0xaf, 0xad, 0xb0, 0xb0, 0xae, 0xaf,
+0x5c, 0xe7, 0x39, 0x2d, 0x31, 0x31, 0x31, 0x2d, 0xfe, 0xfe,
+0x68, 0xad, 0xaf, 0xb0, 0xaf, 0xac, 0xbc, 0xfe, 0xd3, 0x2f,
+0x2e, 0x33, 0x31, 0x2d, 0x4e, 0xdb, 0xfe, 0xfe, 0xac, 0xaf,
+0xb0, 0xac, 0xb6, 0x68, 0xe7, 0xdb, 0x2e, 0x2f, 0x35, 0x2f,
+0x31, 0xe7, 0xe7, 0x68, 0xad, 0xac, 0xb0, 0xae, 0xac, 0xfe,
+0xfe, 0xdb, 0xfe, 0x2d, 0x33, 0x31, 0x2e, 0xfe, 0xfe, 0xfe,
+0xfe, 0xbc, 0xaf, 0xb0, 0xad, 0xfe, 0xfe, 0xfe, 0xe7, 0x5c,
+0x2e, 0x33, 0x2e, 0x35, 0xe7, 0xfe, 0xfe, 0xfe, 0xad, 0xb0,
+0xaf, 0xc1, 0xfe, 0xe7, 0xfe, 0xe7, 0x3d, 0x31, 0x2f, 0x37,
+0xe7, 0xfe, 0xfe, 0xe7, 0xfe, 0xaf, 0xad, 0xbe, 0xfe, 0xdb,
+0xfe, 0xfe, 0xdb, 0x35, 0x2d, 0x39, 0xdb, 0xfe, 0xfe, 0xdb,
+0xfe, 0xfe, 0xad, 0xaf, 0xfe, 0xfe, 0xe7, 0x68, 0xfe, 0xd3,
+0x2e, 0x2c, 0xdb, 0xdb, 0x2c, 0x35, 0xd3, 0x68, 0xaf, 0xad,
+0xb0, 0xb0, 0xad, 0xba, 0x68, 0xe7, 0xe7, 0x2e, 0x2f, 0x33,
+0x31, 0x2d, 0xdb, 0xd3, 0x5c, 0xae, 0xaa, 0xe7, 0x68, 0xaa,
+0xe7, 0xfe, 0xdb, 0xe7, 0xfe, 0xe7, 0xd3, 0x2d, 0xfe, 0xdb,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xc5, 0xfe, 0xe7, 0xe7,
+0xfe, 0xfe, 0xe7, 0xe7, 0x3b, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xc5, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7, 0xfe, 0x3b,
+0xdb, 0xfe, 0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xb0, 0xfe, 0xfe,
+0xe7, 0xfe, 0xfe, 0xfe, 0xdb, 0x2e, 0x5c, 0xdb, 0xfe, 0xfe,
+0xe7, 0xe7, 0x68, 0xb0, 0xbe, 0x68, 0xe7, 0xe7, 0xfe, 0xfe,
+0xdb, 0x39, 0x2f, 0xdb, 0xfe, 0xfe, 0xe7, 0xe7, 0xfe, 0xbe,
+0xaf, 0xe7, 0x68, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0x33, 0x33,
+0xdb, 0xfe, 0xfe, 0xdb, 0xe7, 0xfe, 0xb0, 0xb0, 0xfe, 0xfe,
+0xe7, 0xfe, 0xfe, 0xfe, 0x35, 0x33, 0xe7, 0xe7, 0xfe, 0xe7,
+0xe7, 0xfe, 0xb0, 0xb2, 0xb0, 0xfe, 0xfe, 0xe7, 0xfe, 0xe7,
+0x46, 0x35, 0x35, 0x3f, 0xe7, 0xfe, 0xe7, 0xfe, 0xb2, 0xb0,
+0xb2, 0xb0, 0xfe, 0xfe, 0xfe, 0xfe, 0x42, 0x35, 0x37, 0x33,
+0xe7, 0xfe, 0xfe, 0xfe, 0xb8, 0xb0, 0xb6, 0xb0, 0xba, 0xfe,
+0xfe, 0xe7, 0xe7, 0x33, 0x39, 0x39, 0x33, 0xe7, 0xdb, 0xfe,
+0xe7, 0xb0, 0xb4, 0xb6, 0xb0, 0xcd, 0xfe, 0xe7, 0xe7, 0x33,
+0x39, 0x3b, 0x33, 0x46, 0xd3, 0xfe, 0xfe, 0xb0, 0xb2, 0xb6,
+0xb4, 0xb0, 0xfe, 0xfe, 0xdb, 0x35, 0x37, 0x39, 0x39, 0x35,
+0x37, 0xdb, 0x68, 0xcd, 0xb2, 0xb6, 0xb6, 0xb4, 0xb4, 0x68,
+0xe7, 0x42, 0x37, 0x3b, 0x3b, 0x39, 0x37, 0xdb, 0xfe, 0xcd,
+0xb2, 0xb6, 0xb6, 0xb6, 0xb2, 0xb4, 0xfe, 0x54, 0x37, 0x3b,
+0x39, 0x3b, 0x3b, 0x39, 0xe7, 0xfe, 0xb6, 0xb6, 0xb6, 0xb4,
+0xb6, 0xb6, 0xbc, 0xfe, 0x3f, 0x3b, 0x3b, 0x39, 0x3b, 0x3b,
+0x39, 0xe7, 0xb6, 0xb8, 0xb8, 0xb6, 0xb8, 0xb8, 0xb4, 0xfe,
+0x3b, 0x3d, 0x3d, 0x3b, 0x39, 0x3d, 0x3b, 0x39, 0xbe, 0xb8,
+0xba, 0xb8, 0xb6, 0xb8, 0xba, 0xb4, 0xfe, 0x39, 0x3f, 0x3d,
+0x3b, 0x3d, 0x3f, 0x39, 0xdb, 0xb4, 0xba, 0xb8, 0xb6, 0xb8,
+0xbc, 0xb4, 0xba, 0x39, 0x42, 0x3f, 0x3d, 0x3d, 0x3f, 0x3f,
+0x3b, 0xb8, 0xb6, 0xbc, 0xb8, 0xb8, 0xba, 0xbc, 0xb8, 0xe7,
+0x3d, 0x42, 0x3f, 0x3d, 0x3f, 0x42, 0x3d, 0xfe, 0xb8, 0xbc,
+0xbc, 0xba, 0xba, 0xbc, 0xba, 0xe7, 0x3d, 0x3f, 0x42, 0x3f,
+0x3f, 0x42, 0x42, 0xfe, 0xfe, 0xbc, 0xbc, 0xbe, 0xbc, 0xbe,
+0xbc, 0xc5, 0xe7, 0x68, 0x42, 0x46, 0x42, 0x46, 0x42, 0x46,
+0xfe, 0xfe, 0xbc, 0xbe, 0xbe, 0xbe, 0xbc, 0xc5, 0xfe, 0xdb,
+0x46, 0x46, 0x4a, 0x4a, 0x46, 0x46, 0xe7, 0xfe, 0xd3, 0xbe,
+0xc9, 0xc9, 0xc5, 0xc5, 0xe7, 0xdb, 0xd3, 0x4a, 0x4e, 0x54,
+0x4e, 0x4e, 0xfe, 0x5c, 0x54, 0xd3, 0xcd, 0xd3, 0xd3, 0xcd,
+0xd3, 0xd3, 0xcd, 0xfe, 0x5c, 0x68, 0x5c, 0x5c, 0x5c, 0x68,
+0x5c, 0x5c, 0xcd, 0xcd, 0xd3, 0xcd, 0xdb, 0xe7, 0xe7, 0xdb,
+0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe7,
+0xfe, 0x5c, 0x5c, 0xfe, 0xfe, 0xfe, 0xfe, 0x46, 0x35, 0x35,
+0x37, 0x39, 0x3b, 0x39, 0x35, 0x33, 0x35, 0x5c, 0xd3, 0xcd,
+0xdb, 0xfe, 0xfe, 0xd3, 0xb0, 0xb0, 0xb0, 0xb4, 0xb4, 0xb6,
+0xb2, 0xb0, 0xb0, 0xb6, 0xcd, 0x5c, 0x68, 0xfe, 0xfe, 0xfe,
+0x3b, 0x33, 0x35, 0x37, 0x39, 0x3b, 0x39, 0x37, 0x35, 0x35,
+0x3f, 0xdb, 0xcd, 0xcd, 0xdb, 0xfe, 0xe7, 0xc5, 0xb0, 0xb0,
+0xb2, 0xb6, 0xb6, 0xb6, 0xb2, 0xb0, 0xb0, 0xcd, 0x5c, 0x5c,
+0xfe, 0xe7, 0xe7, 0xfe, 0x35, 0x35, 0x35, 0x39, 0x3b, 0x3b,
+0x39, 0x35, 0x33, 0x39, 0xdb, 0xcd, 0xd3, 0xe7, 0xfe, 0xfe,
+0xba, 0xb0, 0xb0, 0xb2, 0xb4, 0xb6, 0xb6, 0xb4, 0xb2, 0xb0,
+0xb4, 0xc9, 0x5c, 0x68, 0xfe, 0xfe, 0x5c, 0x3b, 0x35, 0x37,
+0x39, 0x3b, 0x3b, 0x3b, 0x39, 0x37, 0x37, 0x3d, 0xe7, 0xcd,
+0xdb, 0xfe, 0xe7, 0xbe, 0xb2, 0xb2, 0xb4, 0xb4, 0xb6, 0xb6,
+0xb6, 0xb4, 0xb0, 0xb0, 0xc5, 0x5c, 0x5c, 0xfe, 0xe7, 0xe7,
+0x4e, 0x35, 0x35, 0x37, 0x3b, 0x3b, 0x3b, 0x39, 0x37, 0x37,
+0x3b, 0xe7, 0xc9, 0xcd, 0xe7, 0xfe, 0xd3, 0xb4, 0xb2, 0xb2,
+0xb4, 0xb6, 0xb6, 0xb6, 0xb6, 0xb4, 0xb2, 0xb4, 0xc1, 0x68,
+0x68, 0xfe, 0xfe, 0x42, 0x39, 0x37, 0x39, 0x3b, 0x3b, 0x3b,
+0x3b, 0x3b, 0x39, 0x37, 0x3b, 0xfe, 0xd3, 0xdb, 0xfe, 0xcd,
+0xb4, 0xb2, 0xb4, 0xb4, 0xb6, 0xb6, 0xb6, 0xb6, 0xb4, 0xb2,
+0xb2, 0xc1, 0x5c, 0x5c, 0xfe, 0xfe, 0xfe, 0x3d, 0x37, 0x37,
+0x39, 0x3b, 0x3b, 0x3b, 0x3b, 0x37, 0x37, 0x39, 0xfe, 0xcd,
+0xd3, 0xfe, 0xfe, 0xc1, 0xb2, 0xb2, 0xb4, 0xb6, 0xb6, 0xb6,
+0xb6, 0xb6, 0xb6, 0xb4, 0xb4, 0xbc, 0x68, 0xfe, 0xfe, 0xfe,
+0x3b, 0x39, 0x39, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x3b, 0x39,
+0x39, 0x3b, 0xfe, 0xdb, 0xe7, 0xfe, 0xbc, 0xb6, 0xb6, 0xb6,
+0xb8, 0xb6, 0xb6, 0xb6, 0xb8, 0xb6, 0xb4, 0xb4, 0xbc, 0xfe,
+0x68, 0xfe, 0xe7, 0x5c, 0x3b, 0x39, 0x39, 0x3b, 0x3b, 0x3b,
+0x3d, 0x3d, 0x3b, 0x39, 0x3b, 0x68, 0xdb, 0xdb, 0xfe, 0xe7,
+0xb8, 0xb6, 0xb6, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb6,
+0xb4, 0xb6, 0xdb, 0x68, 0xfe, 0xfe, 0x46, 0x3b, 0x3b, 0x3b,
+0x3d, 0x3d, 0x3b, 0x3d, 0x3d, 0x3d, 0x3d, 0x3b, 0x3b, 0x5c,
+0xdb, 0xdb, 0xc9, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xb8,
+0xb8, 0xb8, 0xb8, 0xb8, 0xb8, 0xbc, 0xcd, 0xfe, 0xfe, 0x3d,
+0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3b, 0x3d, 0x3d, 0x3d, 0x3d,
+0x3b, 0x3d, 0x46, 0xfe, 0xe7, 0xe7, 0xc5, 0xb8, 0xb8, 0xb8,
+0xba, 0xba, 0xb8, 0xb8, 0xba, 0xba, 0xb8, 0xb8, 0xb8, 0xcd,
+0xfe, 0xfe, 0x68, 0x3f, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d,
+0x3d, 0x3d, 0x3f, 0x3f, 0x3d, 0x3b, 0x4a, 0xfe, 0xdb, 0xbc,
+0xb8, 0xba, 0xba, 0xba, 0xba, 0xb8, 0xb8, 0xb8, 0xba, 0xba,
+0xba, 0xba, 0xba, 0xc5, 0xfe, 0x54, 0x3f, 0x3f, 0x3f, 0x3f,
+0x3f, 0x3f, 0x3d, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x42,
+0xfe, 0xe7, 0xdb, 0xbc, 0xba, 0xba, 0xba, 0xba, 0xba, 0xba,
+0xba, 0xba, 0xbc, 0xba, 0xba, 0xba, 0xc5, 0xfe, 0xfe, 0x4e,
+0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x42,
+0x42, 0x42, 0x3f, 0x46, 0xfe, 0xcd, 0xb8, 0xba, 0xbc, 0xbc,
+0xbc, 0xba, 0xba, 0xba, 0xba, 0xbc, 0xbc, 0xbc, 0xba, 0xb8,
+0xbe, 0xfe, 0x42, 0x3d, 0x3f, 0x42, 0x42, 0x42, 0x3f, 0x3f,
+0x3f, 0x42, 0x42, 0x42, 0x42, 0x3f, 0x3f, 0x68, 0xdb, 0xc5,
+0xba, 0xbc, 0xbc, 0xbc, 0xbc, 0xba, 0xba, 0xba, 0xbc, 0xbc,
+0xbc, 0xbc, 0xba, 0xc1, 0xfe, 0xfe, 0x3f, 0x42, 0x46, 0x46,
+0x46, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x46, 0x42, 0x3f,
+0x42, 0x68, 0xbe, 0xba, 0xbc, 0xbe, 0xbe, 0xbe, 0xbc, 0xbc,
+0xbc, 0xbc, 0xbe, 0xc1, 0xbe, 0xbc, 0xba, 0xbe, 0x68, 0x3f,
+0x42, 0x46, 0x4a, 0x4a, 0x46, 0x42, 0x42, 0x42, 0x46, 0x46,
+0x46, 0x46, 0x42, 0x42, 0x68, 0xd3, 0xbc, 0xbc, 0xbe, 0xc1,
+0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xbe, 0xc1, 0xc1, 0xbe, 0xbe,
+0xc1, 0xfe, 0x4e, 0x42, 0x46, 0x4a, 0x4a, 0x4a, 0x46, 0x46,
+0x46, 0x46, 0x4a, 0x4a, 0x4a, 0x46, 0x46, 0x68, 0xdb, 0xbe,
+0xbe, 0xc1, 0xc5, 0xc1, 0xc1, 0xbe, 0xbe, 0xbe, 0xbe, 0xc1,
+0xc5, 0xc5, 0xbe, 0xbc, 0xc1, 0x4e, 0x46, 0x46, 0x4a, 0x4e,
+0x4e, 0x4a, 0x46, 0x46, 0x46, 0x4a, 0x4a, 0x4e, 0x4a, 0x46,
+0x46, 0xfe, 0xbe, 0xbe, 0xc1, 0xc9, 0xc5, 0xc5, 0xc1, 0xc1,
+0xc1, 0xc1, 0xc5, 0xc5, 0xc5, 0xc5, 0xbe, 0xc1, 0xfe, 0x4a,
+0x4a, 0x4e, 0x4e, 0x4e, 0x4e, 0x4e, 0x4a, 0x4a, 0x4a, 0x4e,
+0x54, 0x4e, 0x4a, 0x4a, 0x4e, 0xcd, 0xc1, 0xc5, 0xc5, 0xc9,
+0xc5, 0xc5, 0xc5, 0xc5, 0xc9, 0xcd, 0xcd, 0xcd, 0xcd, 0xc9,
+0xc9, 0xd3, 0x68, 0x54, 0x5c, 0x68, 0x68, 0x68, 0x5c, 0x5c,
+0x5c, 0x5c, 0x5c, 0x68, 0x68, 0x5c, 0x54, 0x5c, 0xdb, 0xcd,
+0xcd, 0xdb, 0xdb, 0xdb, 0xdb, 0xd3, 0xd3, 0xe7, 0xe7, 0xe7,
+0xe7, 0xe7, 0xe7, 0xe7, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xe7, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
+0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe };
diff --git a/autoconf/ast_c_compile_check.m4 b/autoconf/ast_c_compile_check.m4
index ebdaefa89..48fe77ceb 100644
--- a/autoconf/ast_c_compile_check.m4
+++ b/autoconf/ast_c_compile_check.m4
@@ -20,7 +20,7 @@ AC_DEFUN([AST_C_COMPILE_CHECK],
AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
m4_ifval([$4], [AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])])
],
- [ AC_MSG_RESULT(no) ]
+ [ AC_MSG_RESULT(no) ]
)
CPPFLAGS="${saved_cppflags}"
fi
diff --git a/autoconf/ast_c_declare_check.m4 b/autoconf/ast_c_declare_check.m4
index 89fb8063d..cd4fa033f 100644
--- a/autoconf/ast_c_declare_check.m4
+++ b/autoconf/ast_c_declare_check.m4
@@ -23,7 +23,7 @@ AC_DEFUN([AST_C_DECLARE_CHECK],
AC_DEFINE([HAVE_$1], 1, [Define if your system has $2 declared.])
m4_ifval([$4], [AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])])
],
- [ AC_MSG_RESULT(no) ]
+ [ AC_MSG_RESULT(no) ]
)
CPPFLAGS="${saved_cppflags}"
diff --git a/autoconf/ast_c_define_check.m4 b/autoconf/ast_c_define_check.m4
index 52b979110..f23bdfce8 100644
--- a/autoconf/ast_c_define_check.m4
+++ b/autoconf/ast_c_define_check.m4
@@ -25,7 +25,7 @@ AC_DEFUN([AST_C_DEFINE_CHECK],
AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
m4_ifval([$4], [AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])])
],
- [ AC_MSG_RESULT(no) ]
+ [ AC_MSG_RESULT(no) ]
)
CPPFLAGS="${saved_cppflags}"
fi
diff --git a/autoconf/ast_check_osptk.m4 b/autoconf/ast_check_osptk.m4
index e93b2951a..e42ec0e29 100644
--- a/autoconf/ast_check_osptk.m4
+++ b/autoconf/ast_check_osptk.m4
@@ -1,4 +1,4 @@
-dnl
+dnl
dnl @synopsis AST_CHECK_OSPTK([REQ_VER_MAJOR],[REQ_VER_MINOR],[REQ_VER_BUGFIX])
dnl
dnl @summary check for existence of OSP Toolkit package
@@ -64,4 +64,3 @@ AC_DEFUN([AST_CHECK_OSPTK],
fi
fi
])
-
diff --git a/autoconf/ast_check_pwlib.m4 b/autoconf/ast_check_pwlib.m4
index 8ec2d58a0..beaf8db74 100644
--- a/autoconf/ast_check_pwlib.m4
+++ b/autoconf/ast_check_pwlib.m4
@@ -103,7 +103,7 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then
else
AC_CHECK_HEADER(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then
- AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make)
+ AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin$PATH_SEPARATOR/usr/local/share/ptlib/make$PATH_SEPARATOR/usr/local/share/pwlib/make)
PWLIB_INCDIR="/usr/local/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
@@ -121,7 +121,7 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then
else
AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, )
if test "${HAS_PWLIB:-unset}" != "unset" ; then
- AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make)
+ AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/bin$PATH_SEPARATOR/usr/share/ptlib/make$PATH_SEPARATOR/usr/share/pwlib/make)
PWLIB_INCDIR="/usr/include"
PWLIB_LIBDIR=`${PTLIB_CONFIG} --pwlibdir 2>/dev/null`
if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
@@ -234,11 +234,11 @@ AC_DEFUN([AST_CHECK_PWLIB_BUILD], [
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([$4],[$5])],
- [ AC_MSG_RESULT(yes)
- ac_cv_lib_$2="yes"
+ [ AC_MSG_RESULT(yes)
+ ac_cv_lib_$2="yes"
],
- [ AC_MSG_RESULT(no)
- ac_cv_lib_$2="no"
+ [ AC_MSG_RESULT(no)
+ ac_cv_lib_$2="no"
]
)
diff --git a/autoconf/ast_ext_lib.m4 b/autoconf/ast_ext_lib.m4
index 080b8c34d..8e5b50e4a 100644
--- a/autoconf/ast_ext_lib.m4
+++ b/autoconf/ast_ext_lib.m4
@@ -39,7 +39,7 @@ AC_DEFUN([AST_EXT_LIB_SETUP],
# AST_OPTION_ONLY([option name], [option variable], [option description], [default value])
AC_DEFUN([AST_OPTION_ONLY],
[
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH], [use $3 in PATH]),
+AC_ARG_WITH([$1], AS_HELP_STRING([--with-$1=PATH], [use $3 in PATH]),
[
case ${withval} in
n|no)
diff --git a/autoconf/ast_pkgconfig.m4 b/autoconf/ast_pkgconfig.m4
index 8641f94a9..ae7bbc086 100644
--- a/autoconf/ast_pkgconfig.m4
+++ b/autoconf/ast_pkgconfig.m4
@@ -14,4 +14,3 @@ AC_DEFUN([AST_PKG_CONFIG_CHECK],
)
fi
])
-
diff --git a/bridges/Makefile b/bridges/Makefile
index d887ae1f2..253dc791f 100644
--- a/bridges/Makefile
+++ b/bridges/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for bridging modules
#
# Copyright (C) 2005-2007, Digium, Inc.
diff --git a/bridges/bridge_holding.c b/bridges/bridge_holding.c
index 0ef5601c1..36a58b3db 100644
--- a/bridges/bridge_holding.c
+++ b/bridges/bridge_holding.c
@@ -446,4 +446,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Holding bridge module");
-
diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c
index 122c132d6..d490183ff 100644
--- a/bridges/bridge_native_rtp.c
+++ b/bridges/bridge_native_rtp.c
@@ -755,7 +755,7 @@ static int native_rtp_bridge_compatible(struct ast_bridge *bridge)
static int native_rtp_bridge_framehook_attach(struct ast_bridge_channel *bridge_channel)
{
struct native_rtp_bridge_channel_data *data = bridge_channel->tech_pvt;
- static struct ast_framehook_interface hook = {
+ struct ast_framehook_interface hook = {
.version = AST_FRAMEHOOK_INTERFACE_VERSION,
.event_cb = native_rtp_framehook,
.destroy_cb = __ao2_cleanup,
@@ -773,9 +773,10 @@ static int native_rtp_bridge_framehook_attach(struct ast_bridge_channel *bridge_
ast_debug(2, "Bridge '%s'. Attaching hook data %p to '%s'\n",
bridge_channel->bridge->uniqueid, data, ast_channel_name(bridge_channel->chan));
- ast_channel_lock(bridge_channel->chan);
/* We're giving 1 ref to the framehook and keeping the one from the alloc for ourselves */
hook.data = ao2_bump(data->hook_data);
+
+ ast_channel_lock(bridge_channel->chan);
data->hook_data->id = ast_framehook_attach(bridge_channel->chan, &hook);
ast_channel_unlock(bridge_channel->chan);
if (data->hook_data->id < 0) {
diff --git a/build_tools/make_buildopts_h b/build_tools/make_buildopts_h
index b9f9af2cb..fb289b588 100755
--- a/build_tools/make_buildopts_h
+++ b/build_tools/make_buildopts_h
@@ -5,7 +5,7 @@ MD5=${MD5:-md5sum}
cat << END
/*
- * buildopts.h
+ * buildopts.h
* Automatically generated
*/
diff --git a/build_tools/make_defaults_h b/build_tools/make_defaults_h
index e6051e5f7..4a9fb5521 100755
--- a/build_tools/make_defaults_h
+++ b/build_tools/make_defaults_h
@@ -1,7 +1,7 @@
#!/bin/sh
cat << END
/*
- * defaults.h
+ * defaults.h
* Automatically generated from build options,
* only used in main/asterisk.c
*/
diff --git a/build_tools/make_sample_voicemail b/build_tools/make_sample_voicemail
index 78062dd70..db0e84774 100755
--- a/build_tools/make_sample_voicemail
+++ b/build_tools/make_sample_voicemail
@@ -7,16 +7,16 @@ for lang in /en/ /fr/ /es/
[ ! -f "${1}/sounds${lang}vm-isunavail.${format}" ] && continue
mkdir -p "${2}/voicemail/default/1234${lang}"
-
+
: > "${2}/voicemail/default/1234${lang}unavail.${format}"
-
+
for file in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail
do
cat "${1}/sounds${lang}${file}.${format}" >> "${2}/voicemail/default/1234${lang}unavail.${format}"
done
: > "${2}/voicemail/default/1234${lang}busy.${format}"
-
+
for file in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isonphone
do
cat "${1}/sounds${lang}${file}.${format}" >> "${2}/voicemail/default/1234${lang}busy.${format}"
diff --git a/build_tools/make_version b/build_tools/make_version
index a89d273d2..fbff4eaf8 100755
--- a/build_tools/make_version
+++ b/build_tools/make_version
@@ -89,13 +89,13 @@ elif [ -d ${1}/.git ]; then
if [ -z ${GIT} ]; then
GIT="git"
fi
-
+
if ! command -v ${GIT} >/dev/null 2>&1; then
echo "UNKNOWN__and_probably_unsupported"
exit 1
fi
- cd ${1}
-
+ cd ${1}
+
# If the first log commit messages indicates that this is checked into
# subversion, we'll just use the SVN- form of the revision.
MODIFIED=""
diff --git a/build_tools/sha1sum-sh b/build_tools/sha1sum-sh
index 33d53f1b5..5fd2a63fb 100755
--- a/build_tools/sha1sum-sh
+++ b/build_tools/sha1sum-sh
@@ -68,4 +68,3 @@ else
exit 1
fi
fi
-
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index e53240afd..3e51081f3 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -815,4 +815,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Adaptive ODBC CDR bac
.reload = reload,
.load_pri = AST_MODPRI_CDR_DRIVER,
);
-
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c
index eb34ba06a..770b35083 100644
--- a/cdr/cdr_custom.c
+++ b/cdr/cdr_custom.c
@@ -234,4 +234,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Customizable Comma Se
.reload = reload,
.load_pri = AST_MODPRI_CDR_DRIVER,
);
-
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c
index f590c766b..50d0dd085 100644
--- a/cdr/cdr_radius.c
+++ b/cdr/cdr_radius.c
@@ -200,7 +200,7 @@ static int build_radius_record(VALUE_PAIR **tosend, struct ast_cdr *cdr)
}
/* Setting Acct-Session-Id & User-Name attributes for proper generation
- * of Acct-Unique-Session-Id on server side
+ * of Acct-Unique-Session-Id on server side
*/
/* Channel */
if (!rc_avpair_add(rh, tosend, PW_USER_NAME, &cdr->channel, strlen(cdr->channel), 0))
diff --git a/cel/Makefile b/cel/Makefile
index 8e0a0225e..9e3cb5cea 100644
--- a/cel/Makefile
+++ b/cel/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for CEL backends
#
# Copyright (C) 1999-2008, Digium, Inc.
diff --git a/cel/cel_custom.c b/cel/cel_custom.c
index 9f480b8d7..410b71508 100644
--- a/cel/cel_custom.c
+++ b/cel/cel_custom.c
@@ -226,4 +226,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Customizable Comma Se
.reload = reload,
.load_pri = AST_MODPRI_CDR_DRIVER,
);
-
diff --git a/cel/cel_odbc.c b/cel/cel_odbc.c
index 1d304dce0..ea57b1020 100644
--- a/cel/cel_odbc.c
+++ b/cel/cel_odbc.c
@@ -823,7 +823,7 @@ static int unload_module(void)
free_config();
AST_RWLIST_UNLOCK(&odbc_tables);
AST_RWLIST_HEAD_DESTROY(&odbc_tables);
-
+
return 0;
}
@@ -865,4 +865,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, ODBC_BACKEND_NAME,
.reload = reload,
.load_pri = AST_MODPRI_CDR_DRIVER,
);
-
diff --git a/channels/Makefile b/channels/Makefile
index fdc139089..63142798c 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -67,4 +67,3 @@ chan_usbradio.o: ./xpmr/xpmr.c ./xpmr/xpmr.h ./xpmr/xpmr_coef.h
chan_usbradio.so: LIBS+=-lusb -lasound
chan_usbradio.so: _ASTCFLAGS+=-DNDEBUG
-
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index 0f61d7c03..1edd22e32 100644
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -16,8 +16,8 @@
* at the top of the source tree.
*/
-/*! \file
- * \brief ALSA sound card channel driver
+/*! \file
+ * \brief ALSA sound card channel driver
*
* \author Matthew Fredrickson <creslin@digium.com>
*
@@ -129,7 +129,7 @@ static struct chan_alsa_pvt {
} alsa;
/* Number of buffers... Each is FRAMESIZE/8 ms long. For example
- with 160 sample frames, and a buffer size of 3, we have a 60ms buffer,
+ with 160 sample frames, and a buffer size of 3, we have a 60ms buffer,
usually plenty. */
#define MAX_BUFFER_SIZE 100
@@ -297,7 +297,7 @@ static int soundcard_init(void)
static int alsa_digit(struct ast_channel *c, char digit, unsigned int duration)
{
ast_mutex_lock(&alsalock);
- ast_verbose(" << Console Received digit %c of duration %u ms >> \n",
+ ast_verbose(" << Console Received digit %c of duration %u ms >> \n",
digit, duration);
ast_mutex_unlock(&alsalock);
@@ -688,7 +688,7 @@ static char *console_answer(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
return NULL;
case CLI_GENERATE:
- return NULL;
+ return NULL;
}
if (a->argc != 2)
@@ -734,7 +734,7 @@ static char *console_sendtext(struct ast_cli_entry *e, int cmd, struct ast_cli_a
" Sends a text message for display on the remote terminal.\n";
return NULL;
case CLI_GENERATE:
- return NULL;
+ return NULL;
}
if (a->argc < 3)
@@ -782,9 +782,9 @@ static char *console_hangup(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
" Hangs up any call currently placed on the console.\n";
return NULL;
case CLI_GENERATE:
- return NULL;
+ return NULL;
}
-
+
if (a->argc != 2)
return CLI_SHOWUSAGE;
@@ -952,8 +952,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 02d68870b..bc5f7f2fe 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -16,9 +16,9 @@
* at the top of the source tree.
*/
-/*!
- * \file
- * \brief Cross-platform console channel driver
+/*!
+ * \file
+ * \brief Cross-platform console channel driver
*
* \author Russell Bryant <russell@digium.com>
*
@@ -26,7 +26,7 @@
* chan_oss, Mark Spencer <markster@digium.com>
* chan_oss, Luigi Rizzo
* chan_alsa, Matthew Fredrickson <creslin@digium.com>
- *
+ *
* \ingroup channel_drivers
*
* Portaudio http://www.portaudio.com/
@@ -79,15 +79,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/stasis_channels.h"
#include "asterisk/format_cache.h"
-/*!
- * \brief The sample rate to request from PortAudio
+/*!
+ * \brief The sample rate to request from PortAudio
*
* \todo Make this optional. If this is only going to talk to 8 kHz endpoints,
* then it makes sense to use 8 kHz natively.
*/
#define SAMPLE_RATE 16000
-/*!
+/*!
* \brief The number of samples to configure the portaudio stream for
*
* 320 samples (20 ms) is the most common frame size in Asterisk. So, the code
@@ -105,7 +105,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*! \brief Mono Output */
#define OUTPUT_CHANNELS 1
-/*!
+/*!
* \brief Maximum text message length
* \note This should be changed if there is a common definition somewhere
* that defines the maximum length of a text message.
@@ -179,8 +179,8 @@ static struct ao2_container *pvts;
static struct console_pvt *active_pvt;
AST_RWLOCK_DEFINE_STATIC(active_lock);
-/*!
- * \brief Global jitterbuffer configuration
+/*!
+ * \brief Global jitterbuffer configuration
*
* \note Disabled by default.
* \note Values shown here match the defaults shown in console.conf.sample
@@ -205,7 +205,7 @@ static int console_answer(struct ast_channel *c);
static struct ast_frame *console_read(struct ast_channel *chan);
static int console_call(struct ast_channel *c, const char *dest, int timeout);
static int console_write(struct ast_channel *chan, struct ast_frame *f);
-static int console_indicate(struct ast_channel *chan, int cond,
+static int console_indicate(struct ast_channel *chan, int cond,
const void *data, size_t datalen);
static int console_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
/*! @} */
@@ -255,7 +255,7 @@ static struct console_pvt *find_pvt(const char *name)
}
/*!
- * \brief Stream monitor thread
+ * \brief Stream monitor thread
*
* \arg data A pointer to the console_pvt structure that contains the portaudio
* stream that needs to be monitored.
@@ -298,19 +298,19 @@ static int open_stream(struct console_pvt *pvt)
{
int res = paInternalError;
- if (!strcasecmp(pvt->input_device, "default") &&
+ if (!strcasecmp(pvt->input_device, "default") &&
!strcasecmp(pvt->output_device, "default")) {
- res = Pa_OpenDefaultStream(&pvt->stream, INPUT_CHANNELS, OUTPUT_CHANNELS,
+ res = Pa_OpenDefaultStream(&pvt->stream, INPUT_CHANNELS, OUTPUT_CHANNELS,
paInt16, SAMPLE_RATE, NUM_SAMPLES, NULL, NULL);
} else {
- PaStreamParameters input_params = {
+ PaStreamParameters input_params = {
.channelCount = 1,
.sampleFormat = paInt16,
.suggestedLatency = (1.0 / 50.0), /* 20 ms */
.device = paNoDevice,
};
- PaStreamParameters output_params = {
- .channelCount = 1,
+ PaStreamParameters output_params = {
+ .channelCount = 1,
.sampleFormat = paInt16,
.suggestedLatency = (1.0 / 50.0), /* 20 ms */
.device = paNoDevice,
@@ -323,10 +323,10 @@ static int open_stream(struct console_pvt *pvt)
def_input = Pa_GetDefaultInputDevice();
def_output = Pa_GetDefaultOutputDevice();
- for (idx = 0;
- idx < num_devices && (input_params.device == paNoDevice
- || output_params.device == paNoDevice);
- idx++)
+ for (idx = 0;
+ idx < num_devices && (input_params.device == paNoDevice
+ || output_params.device == paNoDevice);
+ idx++)
{
const PaDeviceInfo *dev = Pa_GetDeviceInfo(idx);
@@ -430,7 +430,7 @@ static struct ast_channel *console_new(struct console_pvt *pvt, const char *ext,
return NULL;
}
- if (!(chan = ast_channel_alloc(1, state, pvt->cid_num, pvt->cid_name, NULL,
+ if (!(chan = ast_channel_alloc(1, state, pvt->cid_num, pvt->cid_name, NULL,
ext, ctx, assignedids, requestor, 0, "Console/%s", pvt->name))) {
ao2_ref(caps, -1);
return NULL;
@@ -513,7 +513,7 @@ static int console_digit_begin(struct ast_channel *c, char digit)
static int console_digit_end(struct ast_channel *c, char digit, unsigned int duration)
{
- ast_verb(1, V_BEGIN "Console Received End of Digit %c (duration %u)" V_END,
+ ast_verb(1, V_BEGIN "Console Received End of Digit %c (duration %u)" V_END,
digit, duration);
return -1; /* non-zero to request inband audio */
@@ -558,7 +558,7 @@ static int console_answer(struct ast_channel *c)
* Calling this function is harmless. However, if it does get called, it
* is an indication that something weird happened that really shouldn't
* have and is worth looking into.
- *
+ *
* Why should this function not get called? Well, let me explain. There are
* a couple of ways to pass on audio that has come from this channel. The way
* that this channel driver uses is that once the audio is available, it is
@@ -646,7 +646,7 @@ static int console_indicate(struct ast_channel *chan, int cond, const void *data
ast_moh_stop(chan);
break;
default:
- ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n",
+ ast_log(LOG_WARNING, "Don't know how to display condition %d on %s\n",
cond, ast_channel_name(chan));
/* The core will play inband indications for us if appropriate */
res = -1;
@@ -703,13 +703,13 @@ static struct console_pvt *get_active_pvt(void)
struct console_pvt *pvt;
ast_rwlock_rdlock(&active_lock);
- pvt = ref_pvt(active_pvt);
+ pvt = ref_pvt(active_pvt);
ast_rwlock_unlock(&active_lock);
return pvt;
}
-static char *cli_console_autoanswer(struct ast_cli_entry *e, int cmd,
+static char *cli_console_autoanswer(struct ast_cli_entry *e, int cmd,
struct ast_cli_args *a)
{
struct console_pvt *pvt;
@@ -800,7 +800,7 @@ static char *cli_console_flash(struct ast_cli_entry *e, int cmd, struct ast_cli_
static char *cli_console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char *s = NULL;
- const char *mye = NULL, *myc = NULL;
+ const char *mye = NULL, *myc = NULL;
struct console_pvt *pvt;
if (cmd == CLI_INIT) {
@@ -847,7 +847,7 @@ static char *cli_console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_a
if (a->argc == e->args + 1) {
char *ext = NULL, *con = NULL;
s = ast_ext_ctx(pvt, a->argv[e->args], &ext, &con);
- ast_debug(1, "provided '%s', exten '%s' context '%s'\n",
+ ast_debug(1, "provided '%s', exten '%s' context '%s'\n",
a->argv[e->args], mye, myc);
mye = ext;
myc = con;
@@ -947,7 +947,7 @@ static char *cli_console_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_a
else
res = CLI_SHOWUSAGE;
- ast_verb(1, V_BEGIN "The Console is now %s" V_END,
+ ast_verb(1, V_BEGIN "The Console is now %s" V_END,
pvt->muted ? "Muted" : "Unmuted");
unref_pvt(pvt);
@@ -1235,7 +1235,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
return CLI_SUCCESS;
}
- if (!(pvt = find_pvt(a->argv[e->args - 1]))) {
+ if (!(pvt = find_pvt(a->argv[e->args]))) {
ast_cli(a->fd, "Could not find a device called '%s'.\n", a->argv[e->args]);
return CLI_FAILURE;
}
@@ -1279,7 +1279,7 @@ static void set_pvt_defaults(struct console_pvt *pvt)
ast_string_field_set(pvt, cid_num, "");
ast_string_field_set(pvt, cid_name, "");
ast_string_field_set(pvt, parkinglot, "");
-
+
pvt->overridecontext = 0;
pvt->autoanswer = 0;
} else {
@@ -1305,7 +1305,7 @@ static void store_callerid(struct console_pvt *pvt, const char *value)
char cid_name[256];
char cid_num[256];
- ast_callerid_split(value, cid_name, sizeof(cid_name),
+ ast_callerid_split(value, cid_name, sizeof(cid_name),
cid_num, sizeof(cid_num));
ast_string_field_set(pvt, cid_name, cid_name);
@@ -1388,7 +1388,7 @@ static void build_device(struct ast_config *cfg, const char *name)
ao2_link(pvts, pvt);
else
console_pvt_unlock(pvt);
-
+
unref_pvt(pvt);
}
@@ -1444,7 +1444,7 @@ static int load_config(int reload)
ast_log(LOG_NOTICE, "Config file %s has an invalid format\n", config_file);
return -1;
}
-
+
ao2_callback(pvts, OBJ_NODATA, pvt_mark_destroy_cb, NULL);
ast_mutex_lock(&globals_lock);
@@ -1517,8 +1517,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index ba7072b2c..d5e79ffcf 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -8077,7 +8077,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast)
p->subs[otherindex].needunhold = 1;
p->owner = p->subs[SUB_REAL].owner;
} else {
- ast_verb(3, "Dumping incomplete call on on %s\n", ast_channel_name(p->subs[SUB_THREEWAY].owner));
+ ast_verb(3, "Dumping incomplete call on %s\n", ast_channel_name(p->subs[SUB_THREEWAY].owner));
swap_subs(p, SUB_THREEWAY, SUB_REAL);
ast_channel_softhangup_internal_flag_add(p->subs[SUB_THREEWAY].owner, AST_SOFTHANGUP_DEV);
p->owner = p->subs[SUB_REAL].owner;
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index e618ee807..97cbe7390 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -7166,7 +7166,7 @@ static char *complete_iax2_unregister(const char *line, const char *word, int po
if (pos == 2) {
struct ao2_iterator i = ao2_iterator_init(peers, 0);
while ((p = ao2_iterator_next(&i))) {
- if (!strncasecmp(p->name, word, wordlen) &&
+ if (!strncasecmp(p->name, word, wordlen) &&
++which > state && p->expire > -1) {
res = ast_strdup(p->name);
peer_unref(p);
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index f3fe538a0..e8c2293cf 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -392,7 +392,7 @@ struct mgcp_endpoint {
/* struct ast_channel *owner; */
/* struct ast_rtp *rtp; */
/* struct sockaddr_in tmpdest; */
- /* message go the the endpoint and not the channel so they stay here */
+ /* message go the endpoint and not the channel so they stay here */
struct ast_variable *chanvars; /*!< Variables to set for channel created by user */
struct mgcp_endpoint *next;
struct mgcp_gateway *parent;
diff --git a/channels/chan_motif.c b/channels/chan_motif.c
index 314103765..a80f8be2c 100644
--- a/channels/chan_motif.c
+++ b/channels/chan_motif.c
@@ -543,8 +543,8 @@ static int jingle_endpoint_cmp(void *obj, void *arg, int flags)
static struct aco_type endpoint_option = {
.type = ACO_ITEM,
.name = "endpoint",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.item_alloc = jingle_endpoint_alloc,
.item_find = jingle_endpoint_find,
.item_offset = offsetof(struct jingle_config, endpoints),
@@ -2721,8 +2721,8 @@ static int custom_transport_handler(const struct aco_option *opt, struct ast_var
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c
index b1ce4c6e9..a34cb9391 100644
--- a/channels/chan_nbs.c
+++ b/channels/chan_nbs.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Network broadcast sound support channel driver
- *
+ *
* \author Mark Spencer <markster@digium.com>
*
* \ingroup channel_drivers
@@ -27,7 +27,7 @@
/*** MODULEINFO
<depend>nbs</depend>
- <support_level>extended</support_level>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
@@ -55,7 +55,7 @@ static char context[AST_MAX_EXTENSION] = "default";
static const char type[] = "NBS";
/* NBS creates private structures on demand */
-
+
struct nbs_pvt {
NBS *nbs;
struct ast_channel *owner; /* Channel we belong to, possibly NULL */
@@ -140,7 +140,7 @@ static struct nbs_pvt *nbs_alloc(const char *data)
flags |= NBS_FLAG_OVERRIDE;
} else
flags = NBS_FLAG_OVERSPEAK;
-
+
ast_copy_string(p->stream, stream, sizeof(p->stream));
p->nbs = nbs_newstream("asterisk", stream, flags);
if (!p->nbs) {
@@ -187,7 +187,7 @@ static int nbs_xwrite(struct ast_channel *ast, struct ast_frame *frame)
/* Don't try tos end audio on-hook */
return 0;
}
- if (nbs_write(p->nbs, frame->data.ptr, frame->datalen / 2) < 0)
+ if (nbs_write(p->nbs, frame->data.ptr, frame->datalen / 2) < 0)
return -1;
return 0;
}
@@ -273,4 +273,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Network Broadcast Sound Support");
-
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 4e940f44d..ceace2c15 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -49,7 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <ctype.h> /* isalnum() used here */
#include <math.h>
-#include <sys/ioctl.h>
+#include <sys/ioctl.h>
#ifdef __linux
#include <linux/soundcard.h>
@@ -582,7 +582,7 @@ static int oss_digit_begin(struct ast_channel *c, char digit)
static int oss_digit_end(struct ast_channel *c, char digit, unsigned int duration)
{
/* no better use for received digits than print them */
- ast_verbose(" << Console Received digit %c of duration %u ms >> \n",
+ ast_verbose(" << Console Received digit %c of duration %u ms >> \n",
digit, duration);
return 0;
}
@@ -892,7 +892,7 @@ static char *console_cmd(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
switch (cmd) {
case CLI_INIT:
e->command = CONSOLE_VIDEO_CMDS;
- e->usage =
+ e->usage =
"Usage: " CONSOLE_VIDEO_CMDS "...\n"
" Generic handler for console commands.\n";
return NULL;
@@ -1144,7 +1144,7 @@ static char *console_mute(struct ast_cli_entry *e, int cmd, struct ast_cli_args
struct chan_oss_pvt *o = find_desc(oss_active);
const char *s;
int toggle = 0;
-
+
if (cmd == CLI_INIT) {
e->command = "console {mute|unmute} [toggle]";
e->usage =
@@ -1294,7 +1294,7 @@ static struct ast_cli_entry cli_oss[] = {
AST_CLI_DEFINE(console_flash, "Flash a call on the console"),
AST_CLI_DEFINE(console_dial, "Dial an extension on the console"),
AST_CLI_DEFINE(console_mute, "Disable/Enable mic input"),
- AST_CLI_DEFINE(console_transfer, "Transfer a call to a different extension"),
+ AST_CLI_DEFINE(console_transfer, "Transfer a call to a different extension"),
AST_CLI_DEFINE(console_cmd, "Generic console command"),
AST_CLI_DEFINE(console_sendtext, "Send text to the remote device"),
AST_CLI_DEFINE(console_autoanswer, "Sets/displays autoanswer"),
@@ -1468,8 +1468,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -1522,4 +1522,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "OSS Console Channel Driver");
-
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index b418b282b..8a10b9bd0 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -21,7 +21,7 @@
* \brief Generic Linux Telephony Interface driver
*
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup channel_drivers
*/
@@ -116,7 +116,7 @@ AST_MUTEX_DEFINE_STATIC(monlock);
/* Boolean value whether the monitoring thread shall continue. */
static unsigned int monitor;
-
+
/* This is the thread for the monitor which checks for input on the channels
which are not currently in use. */
static pthread_t monitor_thread = AST_PTHREADT_NULL;
@@ -125,7 +125,7 @@ static int restart_monitor(void);
/* The private structures of the Phone Jack channels are linked for
selecting outgoing channels */
-
+
#define MODE_DIALTONE 1
#define MODE_IMMEDIATE 2
#define MODE_FXO 3
@@ -338,7 +338,7 @@ static int phone_call(struct ast_channel *ast, const char *dest, int timeout)
start = IXJ_PHONE_RING_START(cid);
if (start == -1)
return -1;
-
+
if (p->mode == MODE_FXS) {
const char *digit = strchr(dest, '/');
if (digit)
@@ -348,7 +348,7 @@ static int phone_call(struct ast_channel *ast, const char *dest, int timeout)
phone_digit_end(ast, *digit++, 0);
}
}
-
+
ast_setstate(ast, AST_STATE_RINGING);
ast_queue_control(ast, AST_CONTROL_RINGING);
return 0;
@@ -451,7 +451,7 @@ static int phone_setup(struct ast_channel *ast)
if (!p->lastinput || (ast_format_cmp(p->lastinput, ast_channel_rawreadformat(ast)) == AST_FORMAT_CMP_NOT_EQUAL)) {
ao2_replace(p->lastinput, ast_channel_rawreadformat(ast));
if (ioctl(p->fd, PHONE_REC_CODEC, ast_channel_rawreadformat(ast))) {
- ast_log(LOG_WARNING, "Failed to set codec to %s\n",
+ ast_log(LOG_WARNING, "Failed to set codec to %s\n",
ast_format_get_name(ast_channel_rawreadformat(ast)));
return -1;
}
@@ -517,11 +517,11 @@ static struct ast_frame *phone_exception(struct ast_channel *ast)
p->fr.offset = 0;
p->fr.mallocd=0;
p->fr.delivery = ast_tv(0,0);
-
+
phonee.bytes = ioctl(p->fd, PHONE_EXCEPTION);
if (phonee.bits.dtmf_ready) {
ast_debug(1, "phone_exception(): DTMF\n");
-
+
/* We've got a digit -- Just handle this nicely and easily */
digit = ioctl(p->fd, PHONE_GET_DTMF_ASCII);
p->fr.subclass.integer = digit;
@@ -543,7 +543,7 @@ static struct ast_frame *phone_exception(struct ast_channel *ast)
phone_setup(ast);
ast_setstate(ast, AST_STATE_UP);
return &p->fr;
- } else
+ } else
ast_log(LOG_WARNING, "Got off hook in weird state %u\n", ast_channel_state(ast));
}
}
@@ -566,7 +566,7 @@ static struct ast_frame *phone_read(struct ast_channel *ast)
{
int res;
struct phone_pvt *p = ast_channel_tech_pvt(ast);
-
+
/* Some nice norms */
p->fr.datalen = 0;
@@ -647,7 +647,7 @@ static int phone_write_buf(struct phone_pvt *p, const char *buf, int len, int fr
}
p->obuflen -= frlen;
/* Move memory if necessary */
- if (p->obuflen)
+ if (p->obuflen)
memmove(p->obuf, p->obuf + frlen, p->obuflen);
}
return len;
@@ -656,7 +656,7 @@ static int phone_write_buf(struct phone_pvt *p, const char *buf, int len, int fr
static int phone_send_text(struct ast_channel *ast, const char *text)
{
int length = strlen(text);
- return phone_write_buf(ast_channel_tech_pvt(ast), text, length, length, 0) ==
+ return phone_write_buf(ast_channel_tech_pvt(ast), text, length, length, 0) ==
length ? 0 : -1;
}
@@ -687,7 +687,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
/* Don't try tos end audio on-hook */
return 0;
}
-#endif
+#endif
if (ast_format_cmp(frame->subclass.format, ast_format_g729) == AST_FORMAT_CMP_EQUAL) {
if (!p->lastformat || (ast_format_cmp(p->lastformat, ast_format_g729) != AST_FORMAT_CMP_EQUAL)) {
ioctl(p->fd, PHONE_PLAY_STOP);
@@ -814,7 +814,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
expected = frame->datalen - sofar;
if (maxfr < expected)
expected = maxfr;
- /* XXX Internet Phone Jack does not handle the 4-byte VAD frame properly! XXX
+ /* XXX Internet Phone Jack does not handle the 4-byte VAD frame properly! XXX
we have to pad it to 24 bytes still. */
if (frame->datalen == 4) {
if (p->silencesupression) {
@@ -834,7 +834,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
}
if (res != expected) {
if ((errno != EAGAIN) && (errno != EINTR)) {
- if (res < 0)
+ if (res < 0)
ast_log(LOG_WARNING, "Write returned error (%s)\n", strerror(errno));
/*
* Card is in non-blocking mode now and it works well now, but there are
@@ -1026,8 +1026,8 @@ static void phone_check_exception(struct phone_pvt *i)
}
if (phonee.bits.caller_id)
ast_verbose("We have caller ID\n");
-
-
+
+
}
static void *do_monitor(void *data)
@@ -1193,8 +1193,7 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
{
/* Make a phone_pvt structure for this interface */
struct phone_pvt *tmp;
- int flags;
-
+
tmp = ast_calloc(1, sizeof(*tmp));
if (tmp) {
tmp->fd = open(iface, O_RDWR);
@@ -1208,7 +1207,7 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
ast_debug(1, "Unable to set port to PSTN\n");
}
} else {
- if (ioctl(tmp->fd, IXJCTL_PORT, PORT_POTS))
+ if (ioctl(tmp->fd, IXJCTL_PORT, PORT_POTS))
if (mode != MODE_FXS)
ast_debug(1, "Unable to set port to POTS\n");
}
@@ -1220,14 +1219,13 @@ static struct phone_pvt *mkif(const char *iface, int mode, int txgain, int rxgai
ast_debug(1, "ioctl(PHONE_PSTN_SET_STATE) failed on %s (%s)\n",iface, strerror(errno));
if (echocancel != AEC_OFF)
ioctl(tmp->fd, IXJCTL_AEC_START, echocancel);
- if (silencesupression)
+ if (silencesupression)
tmp->silencesupression = 1;
#ifdef PHONE_VAD
ioctl(tmp->fd, PHONE_VAD, tmp->silencesupression);
#endif
tmp->mode = mode;
- flags = fcntl(tmp->fd, F_GETFL);
- fcntl(tmp->fd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(tmp->fd, O_NONBLOCK);
tmp->owner = NULL;
ao2_cleanup(tmp->lastformat);
tmp->lastformat = NULL;
@@ -1304,7 +1302,7 @@ static int parse_gain_value(const char *gain_type, const char *value)
return DEFAULT_GAIN;
}
- /* multiplicate gain by 1.0 gain value */
+ /* multiplicate gain by 1.0 gain value */
gain = gain * (float)DEFAULT_GAIN;
/* percentage? */
@@ -1428,7 +1426,7 @@ static int load_module(void)
if (tmp) {
tmp->next = iflist;
iflist = tmp;
-
+
} else {
ast_log(LOG_ERROR, "Unable to register channel '%s'\n", v->value);
ast_config_destroy(cfg);
@@ -1443,7 +1441,7 @@ static int load_module(void)
} else if (!strcasecmp(v->name, "callerid")) {
ast_callerid_split(v->value, cid_name, sizeof(cid_name), cid_num, sizeof(cid_num));
} else if (!strcasecmp(v->name, "mode")) {
- if (!strncasecmp(v->value, "di", 2))
+ if (!strncasecmp(v->value, "di", 2))
mode = MODE_DIALTONE;
else if (!strncasecmp(v->value, "sig", 3))
mode = MODE_SIGMA;
@@ -1487,13 +1485,13 @@ static int load_module(void)
echocancel = AEC_MED;
} else if (!strcasecmp(v->value, "high")) {
echocancel = AEC_HIGH;
- } else
+ } else
ast_log(LOG_WARNING, "Unknown echo cancellation '%s'\n", v->value);
} else if (!strcasecmp(v->name, "txgain")) {
txgain = parse_gain_value(v->name, v->value);
} else if (!strcasecmp(v->name, "rxgain")) {
rxgain = parse_gain_value(v->name, v->value);
- }
+ }
v = v->next;
}
ast_mutex_unlock(&iflock);
@@ -1519,4 +1517,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Linux Telephony API Support");
-
diff --git a/channels/chan_phone.h b/channels/chan_phone.h
index e71ba0c7d..d15570850 100644
--- a/channels/chan_phone.h
+++ b/channels/chan_phone.h
@@ -15,243 +15,243 @@
*/
static unsigned char DialTone[] = {
-0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
-0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
-0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
-0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
-0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
-0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
-0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
-0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
-0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
-0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
-0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
-0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
-0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
-0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
-0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
-0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
-0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
-0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
-0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
-0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
-0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
-0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
-0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
-0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
-0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
-0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
-0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
-0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
-0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
-0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
-0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
-0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
-0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
-0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
-0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
-0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
-0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
-0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
-0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
-0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
-0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
-0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
-0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
-0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
-0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
-0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
-0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
-0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
-0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
-0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
-0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
-0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
-0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
-0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
-0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
-0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
-0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
-0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
-0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
-0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
-0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
-0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
-0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
-0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
-0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
-0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
-0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
-0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
-0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
-0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
-0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
-0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
-0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
-0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
-0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
-0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
-0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
-0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
-0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
-0x59, 0x2a, 0x1c, 0x16, 0x11, 0x10, 0x11, 0x16, 0x1d, 0x2b,
-0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
-0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
-0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
-0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
-0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
-0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
-0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
-0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
-0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
-0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
-0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
-0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
-0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
-0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
-0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
-0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
-0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
-0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
-0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
-0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
-0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
-0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
-0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
-0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
-0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
-0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
-0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
-0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
-0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
-0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
-0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
-0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
-0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
-0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
-0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
-0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
-0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
-0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
-0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
-0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
-0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
-0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
-0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
-0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
-0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
-0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
-0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
-0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
-0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
-0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
-0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
-0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
-0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
-0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
-0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
-0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
-0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
-0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
-0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
-0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
-0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
-0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
-0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
-0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
-0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
-0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
-0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
-0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
-0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
-0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
-0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
-0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
-0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
-0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
-0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
-0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
-0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
-0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
-0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
-0x59, 0x2a, 0x1c, 0x16, 0x11, 0x10, 0x11, 0x16, 0x1d, 0x2b,
-0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
-0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
-0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
-0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
-0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
-0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
-0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
-0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
-0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
-0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
-0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
-0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
-0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
-0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
-0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
-0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
-0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
-0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
-0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
-0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
-0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
-0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
-0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
-0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
-0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
-0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
-0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
-0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
-0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
-0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
-0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
-0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
-0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
-0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
-0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
-0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
-0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
-0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
-0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
-0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
-0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
-0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
-0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
-0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
-0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
-0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
-0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
-0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
-0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
-0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
-0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
-0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
-0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
-0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
-0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
-0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
-0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
-0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
-0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
-0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
-0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
-0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
-0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
-0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
-0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
-0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
-0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
-0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
-0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
-0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
-0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
-0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
-0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
-0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
-0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
-0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
-0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
-0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
-0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
+0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
+0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
+0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
+0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
+0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
+0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
+0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
+0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
+0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
+0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
+0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
+0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
+0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
+0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
+0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
+0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
+0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
+0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
+0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
+0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
+0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
+0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
+0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
+0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
+0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
+0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
+0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
+0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
+0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
+0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
+0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
+0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
+0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
+0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
+0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
+0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
+0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
+0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
+0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
+0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
+0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
+0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
+0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
+0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
+0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
+0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
+0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
+0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
+0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
+0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
+0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
+0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
+0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
+0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
+0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
+0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
+0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
+0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
+0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
+0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
+0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
+0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
+0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
+0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
+0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
+0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
+0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
+0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
+0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
+0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
+0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
+0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
+0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
+0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
+0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
+0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
+0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
+0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
+0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
+0x59, 0x2a, 0x1c, 0x16, 0x11, 0x10, 0x11, 0x16, 0x1d, 0x2b,
+0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
+0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
+0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
+0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
+0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
+0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
+0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
+0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
+0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
+0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
+0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
+0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
+0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
+0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
+0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
+0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
+0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
+0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
+0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
+0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
+0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
+0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
+0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
+0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
+0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
+0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
+0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
+0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
+0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
+0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
+0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
+0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
+0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
+0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
+0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
+0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
+0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
+0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
+0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
+0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
+0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
+0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
+0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
+0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
+0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
+0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
+0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
+0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
+0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
+0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
+0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
+0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
+0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
+0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
+0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
+0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
+0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
+0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
+0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
+0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
+0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
+0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
+0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
+0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
+0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
+0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
+0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
+0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
+0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
+0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
+0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
+0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
+0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
+0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
+0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
+0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
+0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
+0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
+0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
+0x59, 0x2a, 0x1c, 0x16, 0x11, 0x10, 0x11, 0x16, 0x1d, 0x2b,
+0xff, 0xab, 0x9d, 0x96, 0x91, 0x90, 0x91, 0x96, 0x9c, 0xaa,
+0xd9, 0x2f, 0x1f, 0x19, 0x15, 0x14, 0x15, 0x19, 0x1f, 0x2c,
+0x4e, 0xb9, 0xa7, 0x9f, 0x9c, 0x9b, 0x9c, 0x9f, 0xa7, 0xb3,
+0xcf, 0x47, 0x34, 0x2d, 0x2a, 0x2a, 0x2c, 0x31, 0x3a, 0x47,
+0x5f, 0xe4, 0xd8, 0xd9, 0xe9, 0x64, 0x4f, 0x49, 0x46, 0x49,
+0x58, 0xde, 0xc2, 0xb5, 0xad, 0xa8, 0xa6, 0xa6, 0xa9, 0xaf,
+0xbf, 0x56, 0x32, 0x26, 0x1e, 0x1b, 0x19, 0x1a, 0x1d, 0x24,
+0x33, 0xdd, 0xad, 0x9f, 0x98, 0x94, 0x92, 0x93, 0x97, 0x9e,
+0xac, 0xf8, 0x2c, 0x1d, 0x16, 0x11, 0xf, 0x10, 0x15, 0x1b,
+0x29, 0x55, 0xae, 0x9e, 0x97, 0x92, 0x90, 0x91, 0x95, 0x9c,
+0xa8, 0xca, 0x35, 0x22, 0x1a, 0x16, 0x15, 0x16, 0x19, 0x1f,
+0x2b, 0x47, 0xbe, 0xab, 0xa2, 0x9e, 0x9d, 0x9e, 0xa2, 0xa9,
+0xb4, 0xcc, 0x4f, 0x3a, 0x32, 0x2f, 0x2f, 0x32, 0x39, 0x41,
+0x4f, 0x67, 0xf5, 0xf5, 0x67, 0x51, 0x46, 0x3e, 0x3b, 0x3b,
+0x3f, 0x4d, 0xe2, 0xbe, 0xb0, 0xa9, 0xa4, 0xa1, 0xa1, 0xa5,
+0xab, 0xba, 0x64, 0x33, 0x25, 0x1d, 0x19, 0x17, 0x18, 0x1b,
+0x20, 0x2e, 0x72, 0xae, 0x9f, 0x98, 0x94, 0x91, 0x92, 0x96,
+0x9c, 0xa9, 0xd4, 0x2f, 0x1e, 0x17, 0x11, 0xf, 0x10, 0x14,
+0x1a, 0x26, 0x48, 0xb2, 0x9f, 0x98, 0x93, 0x91, 0x92, 0x95,
+0x9b, 0xa7, 0xc1, 0x3a, 0x25, 0x1c, 0x18, 0x16, 0x17, 0x1a,
+0x1f, 0x2b, 0x42, 0xc6, 0xae, 0xa6, 0xa0, 0x9f, 0xa0, 0xa5,
+0xab, 0xb6, 0xcb, 0x5a, 0x40, 0x39, 0x36, 0x37, 0x3b, 0x43,
+0x4e, 0x60, 0x7b, 0x7c, 0x60, 0x4e, 0x41, 0x3a, 0x34, 0x32,
+0x33, 0x39, 0x45, 0xed, 0xbd, 0xae, 0xa6, 0xa0, 0x9e, 0x9e,
+0xa0, 0xa8, 0xb4, 0xef, 0x34, 0x24, 0x1c, 0x18, 0x16, 0x16,
+0x19, 0x1e, 0x2b, 0x54, 0xb1, 0x9f, 0x98, 0x93, 0x91, 0x91,
+0x95, 0x9b, 0xa6, 0xc6, 0x33, 0x1f, 0x17, 0x12, 0xf, 0x10,
+0x13, 0x1a, 0x24, 0x3e, 0xb8, 0xa2, 0x99, 0x94, 0x92, 0x92,
+0x96, 0x9b, 0xa6, 0xbc, 0x40, 0x29, 0x1e, 0x1a, 0x18, 0x19,
+0x1b, 0x20, 0x2b, 0x3f, 0xcf, 0xb3, 0xa9, 0xa5, 0xa3, 0xa4,
+0xa8, 0xae, 0xb9, 0xcc, 0x67, 0x49, 0x40, 0x3f, 0x42, 0x4a,
+0x59, 0x79, 0xe5, 0xe4, 0x7a, 0x54, 0x43, 0x39, 0x31, 0x2d,
+0x2c, 0x2d, 0x32, 0x3e, 0x71, 0xbd, 0xad, 0xa4, 0x9e, 0x9c,
+0x9c, 0x9e, 0xa4, 0xaf, 0xd7, 0x36, 0x24, 0x1c, 0x17, 0x15,
+0x15, 0x17, 0x1d, 0x28, 0x47, 0xb5, 0xa1, 0x98, 0x93, 0x90,
+0x90, 0x93, 0x99, 0xa4, 0xbd, 0x38, 0x21, 0x18, 0x13, 0x10,
+0x10, 0x13, 0x19, 0x22, 0x39, 0xbe, 0xa5, 0x9b, 0x96, 0x93,
+0x93, 0x96, 0x9b, 0xa5, 0xb9, 0x4a, 0x2c, 0x20, 0x1c, 0x1a,
+0x1a, 0x1d, 0x22, 0x2c, 0x3d, 0xdc, 0xb8, 0xad, 0xa9, 0xa8,
+0xa9, 0xac, 0xb2, 0xbd, 0xce, 0x78, 0x54, 0x4d, 0x4f, 0x5a,
+0xff, 0xda, 0xcf, 0xcd, 0xd4, 0xf8, 0x4e, 0x3d, 0x32, 0x2c,
+0x29, 0x28, 0x29, 0x2d, 0x38, 0x5c, 0xbd, 0xac, 0xa2, 0x9d,
+0x9a, 0x9a, 0x9c, 0xa0, 0xac, 0xca, 0x39, 0x25, 0x1b, 0x16,
+0x13, 0x13, 0x16, 0x1b, 0x25, 0x3e, 0xb9, 0xa2, 0x99, 0x93,
+0x90, 0x90, 0x93, 0x98, 0xa1, 0xb8, 0x3d, 0x24, 0x19, 0x13,
+0x10, 0x10, 0x13, 0x18, 0x21, 0x35, 0xc7, 0xa8, 0x9d, 0x97,
+0x95, 0x95, 0x97, 0x9c, 0xa4, 0xb6, 0x57, 0x2f, 0x24, 0x1e,
+0x1c, 0x1c, 0x1e, 0x24, 0x2d, 0x3d, 0xf1, 0xbe, 0xb2, 0xad,
+0xac, 0xad, 0xb1, 0xb9, 0xc3, 0xd4, 0xfa, 0x64, 0x65, 0xf9,
+0xd9, 0xca, 0xc2, 0xbf, 0xc0, 0xc9, 0xe7, 0x4c, 0x39, 0x2e,
+0x28, 0x24, 0x23, 0x25, 0x29, 0x33, 0x4f, 0xbf, 0xab, 0xa0,
+0x9b, 0x99, 0x98, 0x9a, 0x9e, 0xa9, 0xc0, 0x3c, 0x26, 0x1b,
+0x16, 0x12, 0x12, 0x14, 0x19, 0x22, 0x38, 0xbe, 0xa4, 0x9a,
+0x93, 0x90, 0x8f, 0x92, 0x97, 0x9f, 0xb3, 0x46, 0x26, 0x1b,
+0x15, 0x11, 0x11, 0x13, 0x18, 0x1f, 0x31, 0xd4, 0xab, 0x9e,
+0x99, 0x96, 0x96, 0x98, 0x9c, 0xa4, 0xb4, 0x6f, 0x34, 0x28,
+0x20, 0x1e, 0x1e, 0x20, 0x26, 0x2e, 0x3d, 0x6d, 0xc5, 0xb9,
+0xb3, 0xb2, 0xb4, 0xba, 0xc1, 0xcd, 0xe0, 0xfc, 0xfb, 0xe0,
+0xce, 0xc3, 0xbb, 0xb7, 0xb6, 0xb9, 0xc0, 0xda, 0x4b, 0x36,
+0x2b, 0x25, 0x20, 0x1f, 0x20, 0x26, 0x2e, 0x46, 0xc2, 0xab,
+0x9f, 0x9a, 0x97, 0x96, 0x98, 0x9c, 0xa5, 0xba, 0x41, 0x27,
+0x1b, 0x15, 0x12, 0x11, 0x13, 0x18, 0x1f, 0x32, 0xc8, 0xa6,
+0x9a, 0x94, 0x90, 0x8f, 0x91, 0x97, 0x9e, 0xaf, 0x54, 0x29,
+0x1c, 0x16, 0x12, 0x11, 0x14, 0x18, 0x1f, 0x2e, 0xf2, 0xae,
+0xa0, 0x9b, 0x98, 0x97, 0x99, 0x9d, 0xa5, 0xb3, 0xe4, 0x3a,
+0x2b, 0x25, 0x21, 0x21, 0x24, 0x29, 0x30, 0x3e, 0x62, 0xcd,
+0xbf, 0xbb, 0xbb, 0xbe, 0xc6, 0xd1, 0xe7, 0x76, 0x75, 0xe7,
+0xcf, 0xc1, 0xb9, 0xb2, 0xaf, 0xaf, 0xb2, 0xba, 0xcf, 0x4c,
+0x34, 0x29, 0x22, 0x1e, 0x1d, 0x1e, 0x22, 0x2b, 0x3e, 0xc7,
+0xab, 0x9f, 0x99, 0x96, 0x95, 0x96, 0x9a, 0xa2, 0xb5, 0x4a,
+0x28, 0x1c, 0x15, 0x11, 0x10, 0x12, 0x17, 0x1e, 0x2e, 0xd5,
+0xa9, 0x9b, 0x95, 0x90, 0x8f, 0x91, 0x96, 0x9d, 0xac, 0x78,
+0x2c, 0x1e, 0x17, 0x13, 0x12, 0x14, 0x18, 0x1f, 0x2d, 0x5d,
+0xb3, 0xa4, 0x9d, 0x9a, 0x99, 0x9b, 0x9e, 0xa6, 0xb2, 0xd6,
+0x3f, 0x2f, 0x29, 0x26, 0x26, 0x28, 0x2d, 0x35, 0x42, 0x5e,
+0xd8, 0xca, 0xc6, 0xc9, 0xcf, 0xe4, 0x69, 0x59, 0x58, 0x64,
+0xdf, 0xc7, 0xba, 0xb1, 0xac, 0xaa, 0xaa, 0xad, 0xb4, 0xc7,
+0x4f, 0x33, 0x27, 0x1f, 0x1c, 0x1b, 0x1c, 0x1f, 0x27, 0x39,
+0xce, 0xac, 0x9f, 0x99, 0x95, 0x94, 0x95, 0x99, 0x9f, 0xaf,
0x59, 0x2a, 0x1c, 0x16, 0x11, 0x10, 0x11, 0x16, 0x1d, 0x2b };
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index c48801756..c5252f439 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -511,6 +511,11 @@ static struct ast_channel *chan_pjsip_new(struct ast_sip_session *session, int s
ast_party_id_copy(&ast_channel_caller(chan)->id, &session->id);
ast_party_id_copy(&ast_channel_caller(chan)->ani, &session->id);
+ if (!ast_strlen_zero(exten)) {
+ /* Set provided DNID on the new channel. */
+ ast_channel_dialed(chan)->number.str = ast_strdup(exten);
+ }
+
ast_channel_priority_set(chan, 1);
ast_channel_callgroup_set(chan, session->endpoint->pickup.callgroup);
@@ -697,7 +702,7 @@ static struct ast_frame *chan_pjsip_cng_tone_detected(struct ast_sip_session *se
}
/*!
- * \brief Function called by core to read any waiting frames
+ * \brief Function called by core to read any waiting frames
*
* \note The channel is already locked.
*/
@@ -2127,7 +2132,7 @@ static int request(void *obj)
struct request_data *req_data = obj;
struct ast_sip_session *session = NULL;
char *tmp = ast_strdupa(req_data->dest), *endpoint_name = NULL, *request_user = NULL;
- RAII_VAR(struct ast_sip_endpoint *, endpoint, NULL, ao2_cleanup);
+ struct ast_sip_endpoint *endpoint;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(endpoint);
@@ -2152,10 +2157,18 @@ static int request(void *obj)
}
if (ast_strlen_zero(endpoint_name)) {
- ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
+ if (request_user) {
+ ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name: %s@<endpoint-name>\n",
+ request_user);
+ } else {
+ ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
+ }
req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
return -1;
- } else if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
+ }
+ endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint",
+ endpoint_name);
+ if (!endpoint) {
ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name);
req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
return -1;
@@ -2167,23 +2180,38 @@ static int request(void *obj)
ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
return -1;
- } else if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
+ }
+ endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint",
+ endpoint_name);
+ if (!endpoint) {
/* It seems it's not a multi-domain endpoint or single endpoint exact match,
* it's possible that it's a SIP trunk with a specified user (user@trunkname),
* so extract the user before @ sign.
*/
- if ((endpoint_name = strchr(args.endpoint, '@'))) {
- request_user = args.endpoint;
- *endpoint_name++ = '\0';
+ endpoint_name = strchr(args.endpoint, '@');
+ if (!endpoint_name) {
+ /*
+ * Couldn't find an '@' so it had to be an endpoint
+ * name that doesn't exist.
+ */
+ ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n",
+ args.endpoint);
+ req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
+ return -1;
}
+ request_user = args.endpoint;
+ *endpoint_name++ = '\0';
if (ast_strlen_zero(endpoint_name)) {
- ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
+ ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name: %s@<endpoint-name>\n",
+ request_user);
req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
return -1;
}
- if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
+ endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint",
+ endpoint_name);
+ if (!endpoint) {
ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name);
req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
return -1;
@@ -2191,7 +2219,10 @@ static int request(void *obj)
}
}
- if (!(session = ast_sip_session_create_outgoing(endpoint, NULL, args.aor, request_user, req_data->caps))) {
+ session = ast_sip_session_create_outgoing(endpoint, NULL, args.aor, request_user,
+ req_data->caps);
+ ao2_ref(endpoint, -1);
+ if (!session) {
ast_log(LOG_ERROR, "Failed to create outgoing session to endpoint '%s'\n", endpoint_name);
req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;
return -1;
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 559e5c05b..ee2eee009 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2948,14 +2948,7 @@ static void *_sip_tcp_helper_thread(struct ast_tcptls_session_instance *tcptls_s
goto cleanup;
}
- if ((flags = fcntl(tcptls_session->fd, F_GETFL)) == -1) {
- ast_log(LOG_ERROR, "error setting socket to non blocking mode, fcntl() failed: %s\n", strerror(errno));
- goto cleanup;
- }
-
- flags |= O_NONBLOCK;
- if (fcntl(tcptls_session->fd, F_SETFL, flags) == -1) {
- ast_log(LOG_ERROR, "error setting socket to non blocking mode, fcntl() failed: %s\n", strerror(errno));
+ if (ast_fd_set_flags(tcptls_session->fd, O_NONBLOCK)) {
goto cleanup;
}
@@ -9246,7 +9239,7 @@ static enum match_req_res match_req_to_dialog(struct sip_pvt *sip_pvt_ptr, struc
}
/*! \brief This function creates a dialog to handle a forked request. This dialog
- * exists only to properly terminiate the the forked request immediately.
+ * exists only to properly terminiate the forked request immediately.
*/
static void forked_invite_init(struct sip_request *req, const char *new_theirtag, struct sip_pvt *original, struct ast_sockaddr *addr)
{
@@ -11295,7 +11288,7 @@ static int process_sdp_a_ice(const char *a, struct sip_pvt *p, struct ast_rtp_in
{
struct ast_rtp_engine_ice *ice;
int found = FALSE;
- char ufrag[256], pwd[256], foundation[32], transport[4], address[46], cand_type[6], relay_address[46] = "";
+ char ufrag[256], pwd[256], foundation[33], transport[4], address[46], cand_type[6], relay_address[46] = "";
struct ast_rtp_engine_ice_candidate candidate = { 0, };
unsigned int port, relay_port = 0;
@@ -11309,7 +11302,7 @@ static int process_sdp_a_ice(const char *a, struct sip_pvt *p, struct ast_rtp_in
} else if (sscanf(a, "ice-pwd: %255s", pwd) == 1) {
ice->set_authentication(instance, NULL, pwd);
found = TRUE;
- } else if (sscanf(a, "candidate: %31s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,
+ } else if (sscanf(a, "candidate: %32s %30u %3s %30u %23s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport, (unsigned *)&candidate.priority,
address, &port, cand_type, relay_address, &relay_port) >= 7) {
if (rtcp_mux_offered && ast_test_flag(&p->flags[2], SIP_PAGE3_RTCP_MUX) && candidate.id > 1) {
@@ -15717,7 +15710,7 @@ static int sip_reregister(const void *data)
if (r->call && r->call->do_history) {
append_history(r->call, "RegistryRenew", "Account: %s@%s", r->username, r->hostname);
}
- /* Since registry's are only added/removed by the the monitor thread, this
+ /* Since registry's are only added/removed by the monitor thread, this
may be overkill to reference/dereference at all here */
if (sipdebug) {
ast_log(LOG_NOTICE, " -- Re-registration for %s@%s\n", r->username, r->hostname);
@@ -23175,6 +23168,8 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
redirecting->from.number.valid = 1;
ast_free(redirecting->from.number.str);
redirecting->from.number.str = redirecting_from_number;
+ } else {
+ ast_free(redirecting_from_number);
}
if (!ast_strlen_zero(redirecting_from_name)) {
ast_debug(3, "Got redirecting from name %s\n", redirecting_from_name);
@@ -23182,6 +23177,8 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
redirecting->from.name.valid = 1;
ast_free(redirecting->from.name.str);
redirecting->from.name.str = redirecting_from_name;
+ } else {
+ ast_free(redirecting_from_name);
}
if (!ast_strlen_zero(p->cid_tag)) {
ast_free(redirecting->from.tag);
@@ -23195,13 +23192,17 @@ static void change_redirecting_information(struct sip_pvt *p, struct sip_request
redirecting->to.number.valid = 1;
ast_free(redirecting->to.number.str);
redirecting->to.number.str = redirecting_to_number;
+ } else {
+ ast_free(redirecting_to_number);
}
if (!ast_strlen_zero(redirecting_to_name)) {
- ast_debug(3, "Got redirecting to name %s\n", redirecting_from_number);
+ ast_debug(3, "Got redirecting to name %s\n", redirecting_to_name);
update_redirecting->to.name = 1;
redirecting->to.name.valid = 1;
ast_free(redirecting->to.name.str);
redirecting->to.name.str = redirecting_to_name;
+ } else {
+ ast_free(redirecting_to_name);
}
redirecting->reason.code = reason;
ast_free(redirecting->reason.str);
@@ -24230,6 +24231,7 @@ static void handle_response_subscribe(struct sip_pvt *p, int resp, const char *r
ast_cc_monitor_failed(monitor_instance->core_id,
monitor_instance->device_name,
"Received error response to our SUBSCRIBE");
+ ao2_ref(monitor_instance, -1);
}
return;
}
@@ -26096,7 +26098,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, str
if (p->owner) {
ast_debug(3, "INVITE w Replaces on existing call? Refusing action. [%s]\n", p->callid);
- transmit_response_reliable(p, "400 Bad request", req); /* The best way to not not accept the transfer */
+ transmit_response_reliable(p, "400 Bad request", req); /* The best way to not accept the transfer */
check_via(p, req);
copy_request(&p->initreq, req);
/* Do not destroy existing call */
@@ -26184,7 +26186,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, str
if (replaces_pvt == p) {
ast_log(LOG_NOTICE, "INVITE with replaces into it's own call id (%s == %s)!\n", replace_id, p->callid);
- transmit_response_reliable(p, "400 Bad request", req); /* The best way to not not accept the transfer */
+ transmit_response_reliable(p, "400 Bad request", req); /* The best way to not accept the transfer */
error = 1;
}
@@ -26412,6 +26414,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, str
ast_log(LOG_NOTICE, "Call from '%s' (%s) to extension"
" '%s' rejected because extension not found in context '%s'.\n",
S_OR(p->username, p->peername), ast_sockaddr_stringify(&p->recv), decoded_exten, p->context);
+ sip_report_failed_acl(p, "no_extension_match");
}
break;
case SIP_GET_DEST_REFUSED:
@@ -30075,6 +30078,7 @@ static int sip_send_keepalive(const void *data)
struct sip_peer *peer = (struct sip_peer*) data;
int res = 0;
const char keepalive[] = "\r\n";
+ size_t count = sizeof(keepalive) - 1;
peer->keepalivesend = -1;
@@ -30085,13 +30089,13 @@ static int sip_send_keepalive(const void *data)
/* Send the packet out using the proper method for this peer */
if ((peer->socket.fd != -1) && (peer->socket.type == AST_TRANSPORT_UDP)) {
- res = ast_sendto(peer->socket.fd, keepalive, sizeof(keepalive), 0, &peer->addr);
+ res = ast_sendto(peer->socket.fd, keepalive, count, 0, &peer->addr);
} else if ((peer->socket.type & (AST_TRANSPORT_TCP | AST_TRANSPORT_TLS)) &&
(peer->socket.tcptls_session) &&
(peer->socket.tcptls_session->fd != -1)) {
- res = sip_tcptls_write(peer->socket.tcptls_session, keepalive, sizeof(keepalive));
+ res = sip_tcptls_write(peer->socket.tcptls_session, keepalive, count);
} else if (peer->socket.type == AST_TRANSPORT_UDP) {
- res = ast_sendto(sipsock, keepalive, sizeof(keepalive), 0, &peer->addr);
+ res = ast_sendto(sipsock, keepalive, count, 0, &peer->addr);
}
if (res == -1) {
@@ -30105,7 +30109,7 @@ static int sip_send_keepalive(const void *data)
}
}
- if (res != sizeof(keepalive)) {
+ if (res != count) {
ast_log(LOG_WARNING, "sip_send_keepalive to %s returned %d: %s\n", ast_sockaddr_stringify(&peer->addr), res, strerror(errno));
}
@@ -30472,6 +30476,17 @@ static struct ast_channel *sip_request_call(const char *type, struct ast_format_
ast_string_field_set(p, todnid, dnid);
}
+ /* If stripping the DNID left us with nothing, bail out */
+ if (ast_strlen_zero(tmp)) {
+ dialog_unlink_all(p);
+ dialog_unref(p, "unref dialog p from bad destination");
+ *cause = AST_CAUSE_DESTINATION_OUT_OF_ORDER;
+ if (callid) {
+ ast_callid_unref(callid);
+ }
+ return NULL;
+ }
+
/* Divvy up the items separated by slashes */
AST_NONSTANDARD_APP_ARGS(args, tmp, '/');
@@ -34071,7 +34086,7 @@ static int peer_cmp_cb(void *obj, void *arg, int flags)
}
/*!
- * Hash function based on the the peer's ip address. For IPv6, we use the end
+ * Hash function based on the peer's ip address. For IPv6, we use the end
* of the address.
* \todo Find a better hashing function
*/
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index ccf6a9464..97634bcbc 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -4756,15 +4756,19 @@ static void start_rtp(struct skinny_subchannel *sub)
{
struct skinny_line *l = sub->line;
struct skinny_device *d = l->device;
+#if 0
int hasvideo = 0;
+#endif
struct ast_sockaddr bindaddr_tmp;
skinny_locksub(sub);
SKINNY_DEBUG(DEBUG_AUDIO, 3, "Sub %u - Starting RTP\n", sub->callid);
ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr);
sub->rtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL);
+#if 0
if (hasvideo)
sub->vrtp = ast_rtp_instance_new("asterisk", sched, &bindaddr_tmp, NULL);
+#endif
if (sub->rtp) {
ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_RTCP, 1);
@@ -4778,11 +4782,13 @@ static void start_rtp(struct skinny_subchannel *sub)
ast_channel_set_fd(sub->owner, 0, ast_rtp_instance_fd(sub->rtp, 0));
ast_channel_set_fd(sub->owner, 1, ast_rtp_instance_fd(sub->rtp, 1));
}
+#if 0
if (hasvideo && sub->vrtp && sub->owner) {
ast_rtp_instance_set_channel_id(sub->vrtp, ast_channel_uniqueid(sub->owner));
ast_channel_set_fd(sub->owner, 2, ast_rtp_instance_fd(sub->vrtp, 0));
ast_channel_set_fd(sub->owner, 3, ast_rtp_instance_fd(sub->vrtp, 1));
}
+#endif
if (sub->rtp) {
ast_rtp_instance_set_qos(sub->rtp, qos.tos_audio, qos.cos_audio, "Skinny RTP");
ast_rtp_instance_set_prop(sub->rtp, AST_RTP_PROPERTY_NAT, l->nat);
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index c3baa8acb..b82b140a9 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -4485,7 +4485,7 @@ static void process_request(int size, unsigned char *buf, struct unistimsession
}
if (!memcmp(buf + SIZE_HEADER, packet_recv_expansion_pressed_key, sizeof(packet_recv_expansion_pressed_key))) {
char keycode = buf[13];
-
+
if (unistimdebug) {
ast_verb(0, "Expansion key pressed: keycode = 0x%02hhx - current state: %s\n", (unsigned char)keycode,
ptestate_tostr(pte->state));
@@ -4965,7 +4965,7 @@ static int unistim_hangup(struct ast_channel *ast)
continue;
}
if (d->ssub[i] != sub) {
- if (d->ssub[i] != NULL) { /* Found other subchannel active other then hangup'ed one */
+ if (d->ssub[i] != NULL) { /* Found other subchannel active other than hangup'ed one */
end_call = 0;
}
continue;
@@ -6437,7 +6437,7 @@ static struct unistim_device *build_device(const char *cat, const struct ast_var
}
ast_mutex_init(&d->lock);
ast_copy_string(d->name, cat, sizeof(d->name));
-
+
ast_copy_string(d->context, DEFAULTCONTEXT, sizeof(d->context));
d->contrast = -1;
d->output = OUTPUT_HANDSET;
@@ -7025,7 +7025,7 @@ static int unistim_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instanc
if (!rtp) {
return 0;
}
-
+
sub = (struct unistim_subchannel *) ast_channel_tech_pvt(chan);
if (!sub) {
ast_log(LOG_ERROR, "No Private Structure, this is bad\n");
@@ -7038,9 +7038,9 @@ static int unistim_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instanc
ast_rtp_instance_get_local_address(rtp, &tmp);
ast_sockaddr_to_sin(&tmp, &us);
}
-
+
/* TODO: Set rtp on phone in case of direct rtp (not implemented) */
-
+
return 0;
}
diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index da02ff3e8..cc943e301 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -6,7 +6,7 @@
* Copyright (C) 2004 - 2005, Ben Kramer
* Ben Kramer <ben@voicetronix.com.au>
*
- * Daniel Bichara <daniel@bichara.com.br> - Brazilian CallerID detection (c)2004
+ * Daniel Bichara <daniel@bichara.com.br> - Brazilian CallerID detection (c)2004
*
* Welber Silveira - welberms@magiclink.com.br - (c)2004
* Copying CLID string to propper structure after detection
@@ -25,7 +25,7 @@
/*! \file
*
* \brief VoiceTronix Interface driver
- *
+ *
* \ingroup channel_drivers
*/
@@ -89,8 +89,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define DEFAULT_GAIN 0
#define DEFAULT_ECHO_CANCEL 1
-
-#define VPB_SAMPLES 160
+
+#define VPB_SAMPLES 160
#define VPB_MAX_BUF VPB_SAMPLES*4 + AST_FRIENDLY_OFFSET
#define VPB_NULL_EVENT 200
@@ -100,7 +100,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define MAX_VPB_GAIN 12.0
#define MIN_VPB_GAIN -12.0
-#define DTMF_CALLERID
+#define DTMF_CALLERID
#define DTMF_CID_START 'D'
#define DTMF_CID_STOP 'C'
@@ -138,9 +138,9 @@ static int mthreadactive = -1; /* Flag for monitoring monitorthread.*/
static int restart_monitor(void);
-/* The private structures of the VPB channels are
+/* The private structures of the VPB channels are
linked for selecting outgoing channels */
-
+
#define MODE_DIALTONE 1
#define MODE_IMMEDIATE 2
#define MODE_FXO 3
@@ -200,7 +200,7 @@ static int dtmf_idd = 3000;
#define TIMER_PERIOD_BUSY 700
#define TIMER_PERIOD_RING 4000
static int timer_period_ring = TIMER_PERIOD_RING;
-
+
#define VPB_EVENTS_ALL (VPB_MRING|VPB_MDIGIT|VPB_MDTMF|VPB_MTONEDETECT|VPB_MTIMEREXP \
|VPB_MSTATION_OFFHOOK|VPB_MSTATION_ONHOOK \
|VPB_MRING_OFF|VPB_MDROP|VPB_MSTATION_FLASH)
@@ -262,7 +262,7 @@ static int max_bridges = MAX_BRIDGES_V4PCI;
AST_MUTEX_DEFINE_STATIC(bridge_lock);
typedef enum {
- vpb_model_unknown = 0,
+ vpb_model_unknown = 0,
vpb_model_v4pci,
vpb_model_v12pci
} vpb_model_t;
@@ -422,7 +422,7 @@ static struct ast_channel_tech vpb_tech_indicate = {
};
#if defined(VPB_NATIVE_BRIDGING)
-/* Can't get ast_vpb_bridge() working on v4pci without either a horrible
+/* Can't get ast_vpb_bridge() working on v4pci without either a horrible
* high pitched feedback noise or bad hiss noise depending on gain settings
* Get asterisk to do the bridging
*/
@@ -463,7 +463,7 @@ static enum ast_bridge_result ast_vpb_bridge(struct ast_channel *c0, struct ast_
/* Bridge channels, check if we can. I believe we always can, so find a slot.*/
ast_mutex_lock(&bridge_lock);
- for (i = 0; i < max_bridges; i++)
+ for (i = 0; i < max_bridges; i++)
if (!bridges[i].inuse)
break;
if (i < max_bridges) {
@@ -474,8 +474,8 @@ static enum ast_bridge_result ast_vpb_bridge(struct ast_channel *c0, struct ast_
bridges[i].fo = fo;
bridges[i].c0 = c0;
bridges[i].c1 = c1;
- }
- ast_mutex_unlock(&bridge_lock);
+ }
+ ast_mutex_unlock(&bridge_lock);
if (i == max_bridges) {
ast_log(LOG_WARNING, "%s: vpb_bridge: Failed to bridge %s and %s!\n", p0->dev, ast_channel_name(c0), ast_channel_name(c1));
@@ -556,18 +556,18 @@ static enum ast_bridge_result ast_vpb_bridge(struct ast_channel *c0, struct ast_
}
f = ast_read(who);
if (!f || ((f->frametype == AST_FRAME_DTMF) &&
- (((who == c0) && (flags & AST_BRIDGE_DTMF_CHANNEL_0)) ||
+ (((who == c0) && (flags & AST_BRIDGE_DTMF_CHANNEL_0)) ||
((who == c1) && (flags & AST_BRIDGE_DTMF_CHANNEL_1))))) {
*fo = f;
*rc = who;
ast_debug(1, "%s: vpb_bridge: Got a [%s]\n", p0->dev, f ? "digit" : "hangup");
#if 0
if ((c0->tech_pvt == pvt0) && (!ast_check_hangup(c0))) {
- if (pr0->set_rtp_peer(c0, NULL, NULL, 0))
+ if (pr0->set_rtp_peer(c0, NULL, NULL, 0))
ast_log(LOG_WARNING, "Channel '%s' failed to revert\n", c0->name);
}
if ((c1->tech_pvt == pvt1) && (!ast_check_hangup(c1))) {
- if (pr1->set_rtp_peer(c1, NULL, NULL, 0))
+ if (pr1->set_rtp_peer(c1, NULL, NULL, 0))
ast_log(LOG_WARNING, "Channel '%s' failed to revert back\n", c1->name);
}
/* That's all we needed */
@@ -580,9 +580,9 @@ static enum ast_bridge_result ast_vpb_bridge(struct ast_channel *c0, struct ast_
break;
}
} else {
- if ((f->frametype == AST_FRAME_DTMF) ||
- (f->frametype == AST_FRAME_VOICE) ||
- (f->frametype == AST_FRAME_VIDEO))
+ if ((f->frametype == AST_FRAME_DTMF) ||
+ (f->frametype == AST_FRAME_VOICE) ||
+ (f->frametype == AST_FRAME_VIDEO))
{
/* Forward voice or DTMF frames if they happen upon us */
/* Actually I dont think we want to forward on any frames!
@@ -600,14 +600,14 @@ static enum ast_bridge_result ast_vpb_bridge(struct ast_channel *c0, struct ast_
cs[0] = cs[1];
cs[1] = cs[2];
};
- vpb_bridge(p0->handle, p1->handle, VPB_BRIDGE_OFF);
+ vpb_bridge(p0->handle, p1->handle, VPB_BRIDGE_OFF);
}
#endif
ast_mutex_lock(&bridge_lock);
bridges[i].inuse = 0;
- ast_mutex_unlock(&bridge_lock);
+ ast_mutex_unlock(&bridge_lock);
p0->bridge = NULL;
p1->bridge = NULL;
@@ -638,7 +638,7 @@ static void get_callerid(struct vpb_pvt *p)
int rc;
struct ast_channel *owner = p->owner;
/*
- char callerid[AST_MAX_EXTENSION] = "";
+ char callerid[AST_MAX_EXTENSION] = "";
*/
#ifdef ANALYSE_CID
void * ws;
@@ -693,7 +693,7 @@ static void get_callerid(struct vpb_pvt *p)
ast_free(owner->cid.cid_name);
owner->cid.cid_name=NULL;
*/
-
+
if (cli_struct->ra_cldn[0] == '\0') {
/*
owner->cid.cid_num = ast_strdup(cli_struct->cldn);
@@ -719,7 +719,7 @@ static void get_callerid(struct vpb_pvt *p)
}
delete cli_struct;
- } else
+ } else
ast_log(LOG_ERROR, "CID record - Failed to set record mode for caller id on %s\n", p->dev);
}
@@ -761,9 +761,9 @@ static void get_callerid_ast(struct vpb_pvt *p)
cs = callerid_new(which_cid);
if (cs) {
#ifdef ANALYSE_CID
- vpb_wave_open_write(&ws, file, VPB_MULAW);
- vpb_record_set_gain(p->handle, 3.0);
- vpb_record_set_hw_gain(p->handle, 12.0);
+ vpb_wave_open_write(&ws, file, VPB_MULAW);
+ vpb_record_set_gain(p->handle, 3.0);
+ vpb_record_set_hw_gain(p->handle, 12.0);
#endif
vpb_record_buf_start(p->handle, VPB_MULAW);
while ((rc == 0) && (sam_count < 8000 * 3)) {
@@ -772,7 +772,7 @@ static void get_callerid_ast(struct vpb_pvt *p)
ast_log(LOG_ERROR, "%s: Caller ID couldn't read audio buffer!\n", p->dev);
rc = callerid_feed(cs, (unsigned char *)buf, sizeof(buf), ast_format_ulaw);
#ifdef ANALYSE_CID
- vpb_wave_write(ws, (char *)buf, sizeof(buf));
+ vpb_wave_write(ws, (char *)buf, sizeof(buf));
#endif
sam_count += sizeof(buf);
ast_verb(4, "Collecting Caller ID samples [%d][%d]...\n", sam_count, rc);
@@ -880,7 +880,7 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
vpb_timer_stop(p->ring_timer);
f.frametype = AST_FRAME_NULL;
}
-
+
} else {
f.frametype = AST_FRAME_NULL; /* Ignore. */
}
@@ -932,7 +932,7 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
/* Nothing heard on line for a very long time
* Timeout connection */
ast_verb(3, "grunt timeout\n");
- ast_log(LOG_NOTICE, "%s: Line hangup due of lack of conversation\n", p->dev);
+ ast_log(LOG_NOTICE, "%s: Line hangup due of lack of conversation\n", p->dev);
f.subclass.integer = AST_CONTROL_HANGUP;
} else {
p->lastgrunt = ast_tvnow();
@@ -955,7 +955,7 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
f.subclass.integer = AST_CONTROL_HANGUP;
}
#else
- ast_log(LOG_NOTICE, "%s: Got call progress callback but blind dialing \n", p->dev);
+ ast_log(LOG_NOTICE, "%s: Got call progress callback but blind dialing \n", p->dev);
f.frametype = AST_FRAME_NULL;
#endif
break;
@@ -1017,15 +1017,15 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
/*
ast_verb(4, "%s: LOCKING in handle_owned [%d]\n", p->dev,res);
- res = ast_mutex_lock(&p->lock);
+ res = ast_mutex_lock(&p->lock);
ast_verb(4, "%s: LOCKING count[%d] owner[%d] \n", p->dev, p->lock.__m_count,p->lock.__m_owner);
*/
if (p->bridge) { /* Check what happened, see if we need to report it. */
switch (f.frametype) {
case AST_FRAME_DTMF:
- if ( !(p->bridge->c0 == p->owner &&
+ if ( !(p->bridge->c0 == p->owner &&
(p->bridge->flags & AST_BRIDGE_DTMF_CHANNEL_0) ) &&
- !(p->bridge->c1 == p->owner &&
+ !(p->bridge->c1 == p->owner &&
(p->bridge->flags & AST_BRIDGE_DTMF_CHANNEL_1) )) {
/* Kill bridge, this is interesting. */
endbridge = 1;
@@ -1052,8 +1052,8 @@ static inline int monitor_handle_owned(struct vpb_pvt *p, VPB_EVENT *e)
ast_mutex_lock(&p->bridge->lock);
p->bridge->endbridge = 1;
ast_cond_signal(&p->bridge->cond);
- ast_mutex_unlock(&p->bridge->lock);
- }
+ ast_mutex_unlock(&p->bridge->lock);
+ }
}
if (endbridge) {
@@ -1164,7 +1164,7 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
else if (p->state == VPB_STATE_PLAYBUSY) {
playtone(p->handle, &Busytone);
p->wantdtmf = 1;
- p->ext[0] = 0;
+ p->ext[0] = 0;
} else if (p->state == VPB_STATE_PLAYRING) {
playtone(p->handle, &Ringbacktone);
p->wantdtmf = 1;
@@ -1200,7 +1200,7 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
/* No owner any more, Assume caller has hung up */
vpb_timer_stop(p->ring_timer);
}
- }
+ }
break;
case VPB_DTMF:
@@ -1253,7 +1253,7 @@ static inline int monitor_handle_notowned(struct vpb_pvt *p, VPB_EVENT *e)
if (ast_pickup_call(c)) {
/* Call pickup wasnt possible */
}
- } else
+ } else
#endif
if (ast_exists_extension(NULL, p->context, p->ext, 1, p->callerid)) {
if (ast_canmatch_extension(NULL, p->context, p->ext, 1, p->callerid)) {
@@ -1348,15 +1348,15 @@ static void *do_monitor(void *unused)
}
}
- ast_mutex_unlock(&monlock);
+ ast_mutex_unlock(&monlock);
if (!p) {
if (e.type != VPB_NULL_EVENT) {
- ast_log(LOG_WARNING, "Got event [%s][%d], no matching iface!\n", str, e.type);
+ ast_log(LOG_WARNING, "Got event [%s][%d], no matching iface!\n", str, e.type);
ast_verb(4, "vpb/ERR: No interface for Event [%d=>%s] \n", e.type, str);
}
continue;
- }
+ }
/* flush the event from the channel event Q */
vpb_get_event_ch_async(e.handle, &je);
@@ -1426,7 +1426,7 @@ static int restart_monitor(void)
vpb_put_event(&e);
} else {
/* Start a new monitor */
- int pid = ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL);
+ int pid = ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL);
ast_verb(4, "Created new monitor thread %d\n", pid);
if (pid < 0) {
ast_log(LOG_ERROR, "Unable to start monitor thread.\n");
@@ -1496,13 +1496,13 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
tmp->handle = vpb_open(board, channel);
- if (tmp->handle < 0) {
- ast_log(LOG_WARNING, "Unable to create channel vpb/%d-%d: %s\n",
+ if (tmp->handle < 0) {
+ ast_log(LOG_WARNING, "Unable to create channel vpb/%d-%d: %s\n",
board, channel, strerror(errno));
ast_free(tmp);
return NULL;
}
-
+
snprintf(tmp->dev, sizeof(tmp->dev), "vpb/%d-%d", board, channel);
tmp->mode = mode;
@@ -1518,7 +1518,7 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
ast_copy_string(tmp->context, context, sizeof(tmp->context));
tmp->callerid_type = 0;
- if (callerid) {
+ if (callerid) {
if (strcasecmp(callerid, "on") == 0) {
tmp->callerid_type = 1;
ast_copy_string(tmp->callerid, "unknown", sizeof(tmp->callerid));
@@ -1555,7 +1555,7 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
} else {
tmp->txgain = txgain;
}
-
+
ast_log(LOG_NOTICE, "VPB setting Tx Hw gain to [%f]\n", tmp->txgain);
vpb_play_set_hw_gain(tmp->handle, tmp->txgain);
}
@@ -1601,7 +1601,7 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
/* set default read state */
tmp->read_state = 0;
-
+
tmp->golock = 0;
tmp->busy_timer_id = vpb_timer_get_unique_timer_id();
@@ -1612,10 +1612,10 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
tmp->ring_timer_id = vpb_timer_get_unique_timer_id();
vpb_timer_open(&tmp->ring_timer, tmp->handle, tmp->ring_timer_id, timer_period_ring);
-
+
tmp->dtmfidd_timer_id = vpb_timer_get_unique_timer_id();
vpb_timer_open(&tmp->dtmfidd_timer, tmp->handle, tmp->dtmfidd_timer_id, dtmf_idd);
-
+
if (mode == MODE_FXO){
if (use_ast_dtmfdet)
vpb_set_event_mask(tmp->handle, VPB_EVENTS_NODTMF);
@@ -1683,8 +1683,8 @@ static int vpb_indicate(struct ast_channel *ast, int condition, const void *data
if (ast_channel_state(ast) == AST_STATE_UP) {
playtone(p->handle, &Busytone);
p->state = VPB_STATE_PLAYBUSY;
- vpb_timer_stop(p->busy_timer);
- vpb_timer_start(p->busy_timer);
+ vpb_timer_stop(p->busy_timer);
+ vpb_timer_start(p->busy_timer);
}
break;
case AST_CONTROL_RINGING:
@@ -1696,7 +1696,7 @@ static int vpb_indicate(struct ast_channel *ast, int condition, const void *data
vpb_timer_stop(p->ringback_timer);
vpb_timer_start(p->ringback_timer);
}
- break;
+ break;
case AST_CONTROL_ANSWER:
case -1: /* -1 means stop playing? */
vpb_timer_stop(p->ringback_timer);
@@ -1854,7 +1854,7 @@ static int vpb_call(struct ast_channel *ast, const char *dest, int timeout)
call.answer_timeout);
for (j = 0; !call.tone_map[j].terminate; j++) {
ast_verb(2, "%s: Dial parms for %s tone %d->%d\n", p->dev,
- ast_channel_name(ast), call.tone_map[j].tone_id, call.tone_map[j].call_id);
+ ast_channel_name(ast), call.tone_map[j].tone_id, call.tone_map[j].call_id);
}
ast_verb(4, "%s: Disabling Loop Drop detection\n", p->dev);
@@ -1924,7 +1924,7 @@ static int vpb_hangup(struct ast_channel *ast)
/* Stop record */
p->stopreads = 1;
if (p->readthread) {
- pthread_join(p->readthread, NULL);
+ pthread_join(p->readthread, NULL);
ast_verb(4, "%s: stopped record thread \n", ast_channel_name(ast));
}
@@ -1953,7 +1953,7 @@ static int vpb_hangup(struct ast_channel *ast)
vpb_ring_station_async(p->handle, 0);
if (p->state != VPB_STATE_ONHOOK) {
/* This is causing a "dial end" "play tone" loop
- playtone(p->handle, &Busytone);
+ playtone(p->handle, &Busytone);
p->state = VPB_STATE_PLAYBUSY;
ast_verb(5, "%s: Station offhook[%d], playing busy tone\n",
ast->name,p->state);
@@ -2058,8 +2058,8 @@ static int vpb_answer(struct ast_channel *ast)
static struct ast_frame *vpb_read(struct ast_channel *ast)
{
- struct vpb_pvt *p = (struct vpb_pvt *)ast_channel_tech_pvt(ast);
- static struct ast_frame f = { AST_FRAME_NULL };
+ struct vpb_pvt *p = (struct vpb_pvt *)ast_channel_tech_pvt(ast);
+ static struct ast_frame f = { AST_FRAME_NULL };
f.src = "vpb";
ast_log(LOG_NOTICE, "%s: vpb_read: should never be called!\n", p->dev);
@@ -2109,7 +2109,7 @@ static inline int astformatbits(struct ast_format *format)
}
}
-int a_gain_vector(float g, short *v, int n)
+int a_gain_vector(float g, short *v, int n)
{
int i;
float tmp;
@@ -2119,15 +2119,15 @@ int a_gain_vector(float g, short *v, int n)
tmp = 32767.0;
if (tmp < -32768.0)
tmp = -32768.0;
- v[i] = (short)tmp;
- }
+ v[i] = (short)tmp;
+ }
return i;
}
/* Writes a frame of voice data to a VPB channel */
static int vpb_write(struct ast_channel *ast, struct ast_frame *frame)
{
- struct vpb_pvt *p = (struct vpb_pvt *)ast_channel_tech_pvt(ast);
+ struct vpb_pvt *p = (struct vpb_pvt *)ast_channel_tech_pvt(ast);
int res = 0;
AudioCompress fmt = VPB_RAW;
struct timeval play_buf_time_start;
@@ -2158,20 +2158,20 @@ static int vpb_write(struct ast_channel *ast, struct ast_frame *frame)
}
tdiff = ast_tvdiff_ms(ast_tvnow(), p->lastplay);
- ast_debug(1, "%s: vpb_write: time since last play(%d) \n", p->dev, tdiff);
+ ast_debug(1, "%s: vpb_write: time since last play(%d) \n", p->dev, tdiff);
if (tdiff < (VPB_SAMPLES / 8 - 1)) {
- ast_debug(1, "%s: vpb_write: Asked to play too often (%d) (%d)\n", p->dev, tdiff, frame->datalen);
+ ast_debug(1, "%s: vpb_write: Asked to play too often (%d) (%d)\n", p->dev, tdiff, frame->datalen);
/* return 0; */
}
p->lastplay = ast_tvnow();
/*
- ast_debug(1, "%s: vpb_write: Checked frame format..\n", p->dev);
+ ast_debug(1, "%s: vpb_write: Checked frame format..\n", p->dev);
*/
ast_mutex_lock(&p->play_lock);
/*
- ast_debug(1, "%s: vpb_write: Got play lock..\n", p->dev);
+ ast_debug(1, "%s: vpb_write: Got play lock..\n", p->dev);
*/
/* Check if we have set up the play_buf */
@@ -2245,7 +2245,7 @@ static void *do_chanreads(void *pvt)
ast_verb(3, "%s: chanreads: starting thread\n", p->dev);
ast_mutex_lock(&p->record_lock);
- p->stopreads = 0;
+ p->stopreads = 0;
p->read_state = 1;
while (!p->stopreads && p->owner) {
@@ -2285,7 +2285,7 @@ static void *do_chanreads(void *pvt)
}
p->last_ignore_dtmf = ignore_dtmf;
- /* Play DTMF digits here to avoid problem you get if playing a digit during
+ /* Play DTMF digits here to avoid problem you get if playing a digit during
* a record operation
*/
ast_verb(6, "%s: chanreads: Checking dtmf's \n", p->dev);
@@ -2305,7 +2305,7 @@ static void *do_chanreads(void *pvt)
p->play_dtmf[0] = '\0';
ast_mutex_unlock(&p->play_dtmf_lock);
vpb_sleep(700); /* Long enough to miss echo and DTMF event */
- if( !ignore_dtmf)
+ if( !ignore_dtmf)
vpb_set_event_mask(p->handle, VPB_EVENTS_ALL);
continue;
}
@@ -2417,13 +2417,13 @@ static void *do_chanreads(void *pvt)
ast_mutex_unlock(&p->record_lock);
ast_verb(2, "%s: Ending record mode (%d/%s)\n",
- p->dev, p->stopreads, p->owner ? "yes" : "no");
+ p->dev, p->stopreads, p->owner ? "yes" : "no");
return NULL;
}
static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state state, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
{
- struct ast_channel *tmp;
+ struct ast_channel *tmp;
char cid_num[256];
char cid_name[256];
@@ -2443,7 +2443,7 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state st
ast_channel_callgroup_set(tmp, me->callgroup);
ast_channel_pickupgroup_set(tmp, me->pickupgroup);
-
+
/* Linear is the preferred format. Although Voicetronix supports other formats
* they are all converted to/from linear in the vpb code. Best for us to use
* linear since we can then adjust volume in this modules.
@@ -2459,7 +2459,7 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state st
ast_set_callerid(tmp, cid_num, cid_name, cid_num);
}
ast_channel_tech_pvt_set(tmp, me);
-
+
ast_channel_context_set(tmp, context);
if (!ast_strlen_zero(me->ext))
ast_channel_exten_set(tmp, me->ext);
@@ -2478,7 +2478,7 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state st
me->readthread = 0;
me->play_dtmf[0] = '\0';
me->faxhandled = 0;
-
+
me->lastgrunt = ast_tvnow(); /* Assume at least one grunt tone seen now. */
me->lastplay = ast_tvnow(); /* Assume at least one grunt tone seen now. */
@@ -2497,7 +2497,7 @@ static struct ast_channel *vpb_new(struct vpb_pvt *me, enum ast_channel_state st
return tmp;
}
-static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *vpb_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
{
struct vpb_pvt *p;
struct ast_channel *tmp = NULL;
@@ -2606,7 +2606,7 @@ static int unload_module(void)
/* Destroy all the interfaces and free their memory */
while (iflist) {
- p = iflist;
+ p = iflist;
ast_mutex_destroy(&p->lock);
pthread_cancel(p->readthread);
ast_mutex_destroy(&p->owner_lock);
@@ -2648,8 +2648,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static enum ast_module_load_result load_module()
@@ -2662,14 +2662,14 @@ static enum ast_module_load_result load_module()
ast_group_t callgroup = 0;
ast_group_t pickupgroup = 0;
int mode = MODE_IMMEDIATE;
- float txgain = DEFAULT_GAIN, rxgain = DEFAULT_GAIN;
- float txswgain = 0, rxswgain = 0;
+ float txgain = DEFAULT_GAIN, rxgain = DEFAULT_GAIN;
+ float txswgain = 0, rxswgain = 0;
int got_gain=0;
int first_channel = 1;
int echo_cancel = DEFAULT_ECHO_CANCEL;
enum ast_module_load_result error = AST_MODULE_LOAD_SUCCESS; /* Error flag */
int bal1 = -1; /* Special value - means do not set */
- int bal2 = -1;
+ int bal2 = -1;
int bal3 = -1;
char * callerid = NULL;
int num_cards = 0;
@@ -2701,7 +2701,7 @@ static enum ast_module_load_result load_module()
if (!cfg || cfg == CONFIG_STATUS_FILEINVALID) {
ast_log(LOG_ERROR, "Unable to load config %s\n", config);
return AST_MODULE_LOAD_DECLINE;
- }
+ }
ast_mutex_lock(&iflock);
v = ast_variable_browse(cfg, "general");
@@ -2737,7 +2737,7 @@ static enum ast_module_load_result load_module()
}
v = v->next;
}
-
+
v = ast_variable_browse(cfg, "interfaces");
while (v) {
/* Create the interface list */
@@ -2858,7 +2858,7 @@ static enum ast_module_load_result load_module()
if (error != AST_MODULE_LOAD_SUCCESS)
unload_module();
- else
+ else
restart_monitor(); /* And start the monitor for the first time */
return error;
diff --git a/channels/console_board.c b/channels/console_board.c
index 6c920a944..777443063 100644
--- a/channels/console_board.c
+++ b/channels/console_board.c
@@ -16,7 +16,7 @@
* $Revision$
*/
-/*
+/*
* Message board implementation.
*
* A message board is a region of the SDL screen where
@@ -28,7 +28,7 @@
* of fixed size (rows and cols). A portion of the buffer is
* visible on the screen, and the visible window can be moved up and
* down by dragging (not yet!)
- *
+ *
* TODO: font dynamic allocation
*
* The region where the text is displayed on the screen is defined
@@ -136,7 +136,7 @@ struct board *board_setup(SDL_Surface *screen, SDL_Rect *dest,
screen->format->Rmask, screen->format->Gmask,
screen->format->Bmask, screen->format->Amask);
- if (b->blank == NULL) {
+ if (b->blank == NULL) {
ast_log(LOG_WARNING, "Unable to allocate board virtual screen: %s\n",
SDL_GetError());
ast_free(b->text);
diff --git a/channels/console_gui.c b/channels/console_gui.c
index 916c40801..312da396b 100644
--- a/channels/console_gui.c
+++ b/channels/console_gui.c
@@ -6,7 +6,7 @@
/*
* GUI layout, structure and management
-
+
For the GUI we use SDL to create a large surface (gui->screen) with 4 areas:
remote video on the left, local video on the right, keypad with all controls
and text windows in the center, and source device thumbnails on the top.
@@ -148,7 +148,7 @@ struct gui_info {
int outfd; /* fd for output */
SDL_Surface *keypad; /* the skin for the keypad */
SDL_Rect kp_rect; /* portion of the skin to display - default all */
- SDL_Surface *font; /* font to be used */
+ SDL_Surface *font; /* font to be used */
SDL_Rect font_rects[96]; /* only printable chars */
/* each of the following board has two rectangles,
@@ -189,10 +189,10 @@ static struct gui_info *cleanup_sdl(struct gui_info *gui, int device_num)
if (gui == NULL)
return NULL;
- /* unload font file */
+ /* unload font file */
if (gui->font) {
SDL_FreeSurface(gui->font);
- gui->font = NULL;
+ gui->font = NULL;
}
if (gui->outfd > -1)
@@ -221,7 +221,7 @@ static struct gui_info *cleanup_sdl(struct gui_info *gui, int device_num)
if (gui->thumb_bd_array[i].board) /* may be useless */
delete_board(gui->thumb_bd_array[i].board);
}
-
+
ast_free(gui);
SDL_Quit();
return NULL;
@@ -290,7 +290,7 @@ static void show_frame(struct video_desc *env, int out)
return;
p_in = NULL;
b_out = &env->src_dpy[i];
- }
+ }
bmp = gui->win[out].bmp;
SDL_LockYUVOverlay(bmp);
/* output picture info - this is sdl, YUV420P */
@@ -372,7 +372,7 @@ enum skin_area {
/* accumulate digits, possibly call dial if in connected mode */
static void keypad_digit(struct video_desc *env, int digit)
-{
+{
if (env->owner) { /* we have a call, send the digit */
struct ast_frame f = { AST_FRAME_DTMF, 0 };
@@ -457,7 +457,7 @@ static void keypad_pick_up(struct video_desc *env)
*
* To generate a font we can use the 'fly' command with the
* following script (3 lines with 32 chars each)
-
+
size 320,64
name font.png
transparent 0,0,0
@@ -473,7 +473,7 @@ static int gui_output(struct video_desc *env, const char *text)
{
return 1; /* error, not supported */
}
-#endif
+#endif
static int video_geom(struct fbuf_t *b, const char *s);
static void sdl_setup(struct video_desc *env);
@@ -495,23 +495,23 @@ static int update_device_info(struct video_desc *env, int i)
}
/*! \brief Changes the video output (local video) source, controlling if
- * it is already using that video device,
+ * it is already using that video device,
* and switching the correct fields of env->out.
* grabbers are always open and saved in the device table.
* The secondary or the primary device can be changed,
* according to the "button" parameter:
* the primary device is changed if button = SDL_BUTTON_LEFT;
* the secondary device is changed if button = not SDL_BUTTON_LEFT;
- *
+ *
* the correct message boards of the sources are also updated
* with the new status
- *
+ *
* \param env = pointer to the video environment descriptor
* \param index = index of the device the caller wants to use are primary or secondary device
* \param button = button clicked on the mouse
*
* returns 0 on success,
- * returns 1 on error
+ * returns 1 on error
*/
static int switch_video_out(struct video_desc *env, int index, Uint8 button)
{
@@ -532,7 +532,7 @@ static int switch_video_out(struct video_desc *env, int index, Uint8 button)
ast_log(LOG_WARNING, "switching to %s...\n", env->out.devices[index].name);
/* already open */
if (env->out.devices[index].grabber) {
- /* we also have to update the messages in the source
+ /* we also have to update the messages in the source
message boards below the source windows */
/* first we update the board of the previous source */
if (p == &env->out.device_primary)
@@ -607,7 +607,7 @@ static int turn_on_off(int index, struct video_desc *env)
/* print the new message in the message board */
update_device_info(env, index);
return 2; /* closed */
- }
+ }
}
/*
@@ -620,24 +620,24 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
{
uint8_t index = KEY_OUT_OF_KEYPAD; /* the key or region of the display we clicked on */
struct gui_info *gui = env->gui;
-
+
int i; /* integer variable used as iterator */
int x; /* integer variable usable as a container */
-
+
/* total width of source device thumbnails */
int src_wins_tot_w = env->out.device_num*(SRC_WIN_W+BORDER)+BORDER;
/* x coordinate of the center of the keypad */
int x0 = MAX(env->rem_dpy.w+gui->keypad->w/2+2*BORDER, src_wins_tot_w/2);
-
+
#if 0
ast_log(LOG_WARNING, "event %d %d have %d/%d regions at %p\n",
button.x, button.y, gui->kp_used, gui->kp_size, gui->kp);
#endif
/* for each mousedown we end previous drag */
gui->drag.drag_window = DRAG_NONE;
-
+
/* define keypad boundary */
/* XXX this should be extended for clicks on different audio device markers */
if (button.y >= (env->out.device_num ? SRC_WIN_H+2*BORDER+SRC_MSG_BD_H : 0)) {
@@ -662,7 +662,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
else if (button.x >= x0 + gui->keypad->w/2)
index = KEY_OUT_OF_KEYPAD;
else if (gui->kp) {
- /* we have to calculate the first coordinate
+ /* we have to calculate the first coordinate
inside the keypad before calling the kp_match_area*/
int x_keypad = button.x - (x0 - gui->keypad->w/2);
/* find the key clicked (if one was clicked) */
@@ -682,7 +682,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
else if (button.x < x)
index = KEY_OUT_OF_KEYPAD;
else if (button.x < x + src_wins_tot_w - BORDER) {
- /* note that the additional device windows
+ /* note that the additional device windows
are numbered from left to right
starting from 0, with a maximum of 8, the index associated on a click is:
KEY_SRCS_WIN + number_of_the_window */
@@ -779,7 +779,7 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
if (index == KEY_LOC_DPY && env->out.picture_in_picture &&
button.x >= x0+gui->keypad->w/2+BORDER+pip_loc_x &&
button.x < x0+gui->keypad->w/2+BORDER+pip_loc_x+env->loc_dpy.w/3 &&
- button.y >= BORDER+pip_loc_y &&
+ button.y >= BORDER+pip_loc_y &&
button.y < BORDER+pip_loc_y+env->loc_dpy.h/3) {
/* set the y cordinate to his previous value */
button.y += (env->out.device_num ? SRC_WIN_H+2*BORDER+SRC_MSG_BD_H : 0);
@@ -800,14 +800,14 @@ static void handle_mousedown(struct video_desc *env, SDL_MouseButtonEvent button
fb->w, fb->h);
video_geom(fb, buf);
sdl_setup(env);
- /* writes messages in the source boards, those can be
- modified during the execution, because of the events
+ /* writes messages in the source boards, those can be
+ modified during the execution, because of the events
this must be done here, otherwise the status of sources will not be
shown after sdl_setup */
for (i = 0; i < env->out.device_num; i++) {
update_device_info(env, i);
}
- /* we also have to refresh other boards,
+ /* we also have to refresh other boards,
to avoid messages to disappear after video resize */
print_message(gui->bd_msg, " \b");
print_message(gui->bd_dialed, " \b");
@@ -1043,7 +1043,7 @@ static void eventhandler(struct video_desc *env, const char *caption)
static SDL_Surface *load_image(const char *file)
{
SDL_Surface *temp;
-
+
#ifdef HAVE_SDL_IMAGE
temp = IMG_Load(file);
#else
@@ -1223,7 +1223,7 @@ static void sdl_setup(struct video_desc *env)
const SDL_VideoInfo *info;
int kp_w = 0, kp_h = 0; /* keypad width and height */
struct gui_info *gui = env->gui;
-
+
/* Some helper variables used for filling the SDL window */
int x0; /* the x coordinate of the center of the keypad */
int x1; /* userful for calculating of the size of the parent window */
@@ -1231,7 +1231,7 @@ static void sdl_setup(struct video_desc *env)
int src_wins_tot_w; /* total width of the source windows */
int i;
int x; /* useful for the creation of the source windows; */
-
+
#ifdef HAVE_X11
const char *e = getenv("SDL_WINDOWID");
@@ -1247,7 +1247,7 @@ static void sdl_setup(struct video_desc *env)
ast_log(LOG_WARNING, "%s error in window\n", __FUNCTION__);
return;
}
- }
+ }
#endif
/*
* initialize the SDL environment. We have one large window
@@ -1294,23 +1294,23 @@ static void sdl_setup(struct video_desc *env)
kp_h = gui->keypad->h;
}
}
-
+
/* total width of the thumbnails */
src_wins_tot_w = env->out.device_num*(SRC_WIN_W+BORDER)+BORDER;
-
+
/* x coordinate of the center of the keypad */
x0 = MAX(env->rem_dpy.w+kp_w/2+2*BORDER, src_wins_tot_w/2);
-
+
/* from center of the keypad to right border */
x1 = MAX(env->loc_dpy.w+kp_w/2+2*BORDER, src_wins_tot_w/2);
-
+
/* total width of the SDL window to create */
maxw = x0+x1;
-
+
/* total height of the mother window to create */
maxh = MAX( MAX(env->rem_dpy.h, env->loc_dpy.h), kp_h)+2*BORDER;
maxh += env->out.device_num ? (2*BORDER+SRC_WIN_H+SRC_MSG_BD_H) : 0;
-
+
gui->screen = SDL_SetVideoMode(maxw, maxh, depth, 0);
if (!gui->screen) {
ast_log(LOG_ERROR, "SDL: could not set video mode - exiting\n");
@@ -1411,9 +1411,9 @@ static void sdl_setup(struct video_desc *env)
#endif /* HAVE_X11 */
y0 = env->out.device_num ? (3*BORDER+SRC_WIN_H+SRC_MSG_BD_H) : BORDER;
-
+
SDL_WM_SetCaption("Asterisk console Video Output", NULL);
-
+
/* intialize the windows for local and remote video */
if (set_win(gui->screen, &gui->win[WIN_REMOTE], dpy_fmt,
env->rem_dpy.w, env->rem_dpy.h, x0-kp_w/2-BORDER-env->rem_dpy.w, y0))
@@ -1425,7 +1425,7 @@ static void sdl_setup(struct video_desc *env)
env->loc_dpy.w, env->loc_dpy.h,
x0+kp_w/2+BORDER, y0))
goto no_sdl;
-
+
/* initialize device_num source windows (thumbnails) and boards
(for a maximum of 9 additional windows and boards) */
x = x0 - src_wins_tot_w/2 + BORDER;
diff --git a/channels/console_video.c b/channels/console_video.c
index a1db5cd77..9d65ef603 100644
--- a/channels/console_video.c
+++ b/channels/console_video.c
@@ -151,7 +151,7 @@ int console_video_formats = 0;
#else /* defined(HAVE_FFMPEG) && defined(HAVE_SDL) */
/*! The list of video formats we support. */
-int console_video_formats =
+int console_video_formats =
AST_FORMAT_H263_PLUS | AST_FORMAT_H263 |
AST_FORMAT_MP4_VIDEO | AST_FORMAT_H264 | AST_FORMAT_H261 ;
@@ -187,7 +187,7 @@ struct video_codec_desc; /* forward declaration */
* + the encoding and RTP info, including timestamps to generate
* frames at the correct rate;
* + source-specific info, i.e. fd for /dev/video, dpy-image for x11, etc,
- * filled in by grabber_open, part of source_specific information are in
+ * filled in by grabber_open, part of source_specific information are in
* the device table (devices member), others are shared;
* NOTE: loc_src.data == NULL means the rest of the struct is invalid, and
* the video source is not available.
@@ -214,18 +214,18 @@ struct video_out_desc {
AVFrame *enc_in_frame; /* enc_in mapped into avcodec format. */
/* The initial part of AVFrame is an AVPicture */
int mtu;
-
+
/* Table of devices specified with "videodevice=" in oss.conf.
* Static size as we have a limited number of entries.
*/
- struct video_device devices[MAX_VIDEO_SOURCES];
+ struct video_device devices[MAX_VIDEO_SOURCES];
int device_num; /*number of devices in table*/
int device_primary; /*index of the actual primary device in the table*/
int device_secondary; /*index of the actual secondary device in the table*/
int picture_in_picture; /*Is the PiP mode activated? 0 = NO | 1 = YES*/
- /* these are the coordinates of the picture inside the picture (visible if PiP mode is active)
+ /* these are the coordinates of the picture inside the picture (visible if PiP mode is active)
these coordinates are valid considering the containing buffer with cif geometry*/
int pip_x;
int pip_y;
@@ -308,7 +308,7 @@ used_mem(const char *msg)
return 0;
}
#endif
-
+
#include "vcodecs.c"
#include "console_gui.c"
@@ -322,7 +322,7 @@ used_mem(const char *msg)
*
* \param v = video out environment descriptor
*
- * returns 0 on success, 1 on error
+ * returns 0 on success, 1 on error
*/
static int grabber_open(struct video_out_desc *v)
{
@@ -348,7 +348,7 @@ static int grabber_open(struct video_out_desc *v)
}
/* the first working device is selected as the primary one and the secondary one */
for (i = 0; i < v->device_num; i++) {
- if (!v->devices[i].grabber)
+ if (!v->devices[i].grabber)
continue;
v->device_primary = i;
v->device_secondary = i;
@@ -374,7 +374,7 @@ static struct fbuf_t *grabber_read(struct video_device *dev, int fps)
if (dev->grabber == NULL) /* not initialized */
return NULL;
-
+
/* the last_frame field in this row of the device table (dev)
is always initialized, it is set during the parsing of the config
file, and never unset, function fill_device_table(). */
@@ -422,7 +422,7 @@ static int video_out_uninit(struct video_desc *env)
{
struct video_out_desc *v = &env->out;
int i; /* integer variable used as iterator */
-
+
/* XXX this should be a codec callback */
if (v->enc_ctx) {
AVCodecContext *enc_ctx = (AVCodecContext *)v->enc_ctx;
@@ -590,7 +590,7 @@ static AVPicture *fill_pict(struct fbuf_t *b, AVPicture *p)
int len = b->w; /* Y linesize, bytes */
int luv = b->w/2; /* U/V linesize, bytes */
int sample_size = 1;
-
+
memset(p, '\0', sizeof(*p));
switch (b->pix_fmt) {
case PIX_FMT_RGB555:
@@ -608,7 +608,7 @@ static AVPicture *fill_pict(struct fbuf_t *b, AVPicture *p)
break;
}
len *= sample_size;
-
+
p->data[0] = b->data;
p->linesize[0] = len;
/* these are only valid for component images */
@@ -616,11 +616,11 @@ static AVPicture *fill_pict(struct fbuf_t *b, AVPicture *p)
p->data[2] = luv ? b->data + 5*l4 : b->data+len;
p->linesize[1] = luv;
p->linesize[2] = luv;
-
- /* add the offsets to the pointers previously calculated,
+
+ /* add the offsets to the pointers previously calculated,
it is necessary for the picture in picture mode */
p->data[0] += len*b->win_y + b->win_x*sample_size;
- if (luv) {
+ if (luv) {
p->data[1] += luv*(b->win_y/2) + (b->win_x/2) * sample_size;
p->data[2] += luv*(b->win_y/2) + (b->win_x/2) * sample_size;
}
@@ -833,7 +833,7 @@ static struct ast_frame *get_video_frames(struct video_desc *env, struct ast_fra
}
}
show_frame(env, WIN_LOCAL); /* local rendering */
- for (i = 0; i < env->out.device_num; i++)
+ for (i = 0; i < env->out.device_num; i++)
show_frame(env, i+WIN_SRC1); /* rendering of every source device in thumbnails */
if (tail == NULL)
tail = &dummy;
@@ -927,7 +927,7 @@ static void *video_thread(void *arg)
/* manage keypad events */
/* XXX here we should always check for events,
- * otherwise the drag will not work */
+ * otherwise the drag will not work */
if (env->gui)
eventhandler(env, caption);
@@ -1255,7 +1255,7 @@ int console_video_config(struct video_desc **penv,
if (env == NULL) {
ast_log(LOG_WARNING, "fail to allocate video_desc\n");
return 1; /* error */
-
+
}
/* set default values - 0's are already there */
env->out.device_primary = 0;
diff --git a/channels/console_video.h b/channels/console_video.h
index f88e5fa1d..1c945e48e 100644
--- a/channels/console_video.h
+++ b/channels/console_video.h
@@ -64,7 +64,7 @@ struct fbuf_t { /* frame buffers, dynamically allocated */
int ebit; /* bits to ignore at the end */
int x; /* origin, if necessary */
int y;
- int w; /* size */
+ int w; /* size */
int h;
int pix_fmt;
/* offsets and size of the copy in Picture-in-Picture mode */
diff --git a/channels/iax2/include/iax2.h b/channels/iax2/include/iax2.h
index ca9ab74dd..3deb5dbcd 100644
--- a/channels/iax2/include/iax2.h
+++ b/channels/iax2/include/iax2.h
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Implementation of Inter-Asterisk eXchange
- *
+ *
* Copyright (C) 2003, Digium
*
* Mark Spencer <markster@linux-support.net>
@@ -19,7 +19,7 @@
* \ref iax2-parser.h
* \ref chan_iax2.c
*/
-
+
#ifndef _IAX2_H
#define _IAX2_H
diff --git a/channels/iax2/include/parser.h b/channels/iax2/include/parser.h
index 7c9ba2ab5..d8edc4b2a 100644
--- a/channels/iax2/include/parser.h
+++ b/channels/iax2/include/parser.h
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Implementation of Inter-Asterisk eXchange
- *
+ *
* Copyright (C) 2003, Digium
*
* Mark Spencer <markster@digium.com>
@@ -14,7 +14,7 @@
/*!\file
* \brief Implementation of the IAX2 protocol
*/
-
+
#ifndef _IAX2_PARSER_H
#define _IAX2_PARSER_H
diff --git a/channels/iax2/parser.c b/channels/iax2/parser.c
index 09c13238d..c003a821d 100644
--- a/channels/iax2/parser.c
+++ b/channels/iax2/parser.c
@@ -20,7 +20,7 @@
*
* \brief Implementation of Inter-Asterisk eXchange Protocol, v 2
*
- * \author Mark Spencer <markster@digium.com>
+ * \author Mark Spencer <markster@digium.com>
*/
/*** MODULEINFO
@@ -138,7 +138,7 @@ static void dump_prefs(char *output, int maxlen, void *value, int len)
strncpy(output, value, maxlen);
output[maxlen] = '\0';
-
+
iax2_codec_pref_convert(&pref, output, total_len, 0);
memset(output,0,total_len);
iax2_codec_pref_string(&pref, output, total_len);
@@ -149,7 +149,7 @@ static void dump_int(char *output, int maxlen, void *value, int len)
if (len == (int)sizeof(unsigned int))
snprintf(output, maxlen, "%lu", (unsigned long)ntohl(get_unaligned_uint32(value)));
else
- ast_copy_string(output, "Invalid INT", maxlen);
+ ast_copy_string(output, "Invalid INT", maxlen);
}
static void dump_short(char *output, int maxlen, void *value, int len)
@@ -179,7 +179,7 @@ static void dump_datetime(char *output, int maxlen, void *value, int len)
tm.tm_mday = (val >> 16) & 0x1f;
tm.tm_mon = ((val >> 21) & 0x0f) - 1;
tm.tm_year = ((val >> 25) & 0x7f) + 100;
- ast_strftime(output, maxlen, "%Y-%m-%d %T", &tm);
+ ast_strftime(output, maxlen, "%Y-%m-%d %T", &tm);
} else
ast_copy_string(output, "Invalid DATETIME format!", maxlen);
}
@@ -368,7 +368,7 @@ static void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int l
char tmp[256];
if (len < 2)
return;
- strcpy(output, "\n");
+ strcpy(output, "\n");
maxlen -= strlen(output); output += strlen(output);
while(len > 2) {
ie = iedata[0];
@@ -750,14 +750,14 @@ int iax_ie_append_versioned_uint64(struct iax_ie_data *ied, unsigned char ie, un
return iax_ie_append_raw(ied, ie, &newval, (int) sizeof(newval));
}
-int iax_ie_append_int(struct iax_ie_data *ied, unsigned char ie, unsigned int value)
+int iax_ie_append_int(struct iax_ie_data *ied, unsigned char ie, unsigned int value)
{
unsigned int newval;
newval = htonl(value);
return iax_ie_append_raw(ied, ie, &newval, (int)sizeof(newval));
}
-int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned short value)
+int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned short value)
{
unsigned short newval;
newval = htons(value);
@@ -774,7 +774,7 @@ int iax_ie_append_byte(struct iax_ie_data *ied, unsigned char ie, unsigned char
return iax_ie_append_raw(ied, ie, &dat, 1);
}
-int iax_ie_append(struct iax_ie_data *ied, unsigned char ie)
+int iax_ie_append(struct iax_ie_data *ied, unsigned char ie)
{
return iax_ie_append_raw(ied, ie, NULL, 0);
}
@@ -980,7 +980,7 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen)
snprintf(tmp, (int)sizeof(tmp), "Expecting msgcount to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len);
errorf(tmp);
} else
- ies->msgcount = ntohs(get_unaligned_uint16(data + 2));
+ ies->msgcount = ntohs(get_unaligned_uint16(data + 2));
break;
case IAX_IE_AUTOANSWER:
ies->autoanswer = 1;
@@ -1007,7 +1007,7 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen)
snprintf(tmp, (int)sizeof(tmp), "Expecting firmwarever to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len);
errorf(tmp);
} else
- ies->firmwarever = ntohs(get_unaligned_uint16(data + 2));
+ ies->firmwarever = ntohs(get_unaligned_uint16(data + 2));
break;
case IAX_IE_DEVICETYPE:
ies->devicetype = (char *)data + 2;
@@ -1060,7 +1060,7 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen)
snprintf(tmp, (int)sizeof(tmp), "Expecting callingtns to be %d bytes long but was %d\n", (int)sizeof(unsigned short), len);
errorf(tmp);
} else
- ies->calling_tns = ntohs(get_unaligned_uint16(data + 2));
+ ies->calling_tns = ntohs(get_unaligned_uint16(data + 2));
break;
case IAX_IE_RR_JITTER:
if (len != (int)sizeof(unsigned int)) {
@@ -1269,12 +1269,12 @@ struct iax_frame *iax_frame_new(int direction, int datalen, unsigned int cacheab
fr->direction = direction;
fr->retrans = -1;
-
+
if (fr->direction == DIRECTION_INGRESS)
ast_atomic_fetchadd_int(&iframes, 1);
else
ast_atomic_fetchadd_int(&oframes, 1);
-
+
ast_atomic_fetchadd_int(&frames, 1);
return fr;
diff --git a/channels/iax2/provision.c b/channels/iax2/provision.c
index 85dfe9448..2d12ebbb1 100644
--- a/channels/iax2/provision.c
+++ b/channels/iax2/provision.c
@@ -17,8 +17,8 @@
*/
/*! \file
- *
- * \brief IAX Provisioning Protocol
+ *
+ * \brief IAX Provisioning Protocol
*
* \author Mark Spencer <markster@digium.com>
*/
@@ -95,7 +95,7 @@ char *iax_provflags2str(char *buf, int buflen, unsigned int flags)
if (!buf || buflen < 1)
return NULL;
-
+
buf[0] = '\0';
for (x = 0; x < ARRAY_LEN(iax_flags); x++) {
@@ -105,7 +105,7 @@ char *iax_provflags2str(char *buf, int buflen, unsigned int flags)
}
}
- if (!ast_strlen_zero(buf))
+ if (!ast_strlen_zero(buf))
buf[strlen(buf) - 1] = '\0';
else
strncpy(buf, "none", buflen - 1);
@@ -241,7 +241,7 @@ int iax_provision_build(struct iax_ie_data *provdata, unsigned int *signature, c
iax_ie_append_int(provdata, PROV_IE_FORMAT, cur->format);
if (force || cur->tos)
iax_ie_append_byte(provdata, PROV_IE_TOS, cur->tos);
-
+
/* Calculate checksum of message so far */
sig = prov_ver_calc(provdata);
if (signature)
@@ -301,7 +301,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
ast_log(LOG_WARNING, "Unable to find base template '%s' for creating '%s'. Trying '%s'\n", t, s, def);
else
def = t;
- }
+ }
if (!src) {
src = iax_template_find(def, 0);
if (!src)
@@ -344,7 +344,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
cur->server = ntohl(ia.s_addr);
else
cur->altserver = ntohl(ia.s_addr);
- } else
+ } else
ast_log(LOG_WARNING, "Ignoring invalid %s '%s' for '%s' at line %d\n", v->name, v->value, s, v->lineno);
} else if (!strcasecmp(v->name, "codec")) {
struct ast_format *tmpfmt;
@@ -427,10 +427,10 @@ static const char *ifthere(const char *s)
static const char *iax_server(unsigned int addr)
{
struct in_addr ia;
-
+
if (!addr)
return "<unspecified>";
-
+
ia.s_addr = htonl(addr);
return ast_inet_ntoa(ia);
@@ -463,7 +463,7 @@ static char *iax_show_provisioning(struct ast_cli_entry *e, int cmd, struct ast_
ast_mutex_lock(&provlock);
AST_LIST_TRAVERSE(&templates, cur, list) {
if ((a->argc == 3) || (!strcasecmp(a->argv[3], cur->name))) {
- if (found)
+ if (found)
ast_cli(a->fd, "\n");
ast_copy_string(server, iax_server(cur->server), sizeof(server));
ast_copy_string(alternate, iax_server(cur->altserver), sizeof(alternate));
@@ -537,7 +537,7 @@ int iax_provision_reload(int reload)
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
if (!provinit)
iax_provision_init();
-
+
cfg = ast_config_load2("iaxprov.conf", "chan_iax2", config_flags);
if (cfg != NULL && cfg != CONFIG_STATUS_FILEUNCHANGED && cfg != CONFIG_STATUS_FILEINVALID) {
/* Mark all as dead. No need for locking */
diff --git a/channels/misdn/ie.c b/channels/misdn/ie.c
index df5df9afe..67fc9585e 100644
--- a/channels/misdn/ie.c
+++ b/channels/misdn/ie.c
@@ -1412,4 +1412,3 @@ static void enc_ie_restart_ind(unsigned char **ntmode, msg_t *msg, unsigned char
p[2] = rind;
}
-
diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c
index 8dcf41faa..cb64106b9 100644
--- a/channels/misdn/isdn_lib.c
+++ b/channels/misdn/isdn_lib.c
@@ -4817,5 +4817,3 @@ void misdn_lib_reinit_nt_stack(int port)
misdn_lib_get_l1_up(stack);
}
}
-
-
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c
index ae1c265bc..4a751230b 100644
--- a/channels/pjsip/dialplan_functions.c
+++ b/channels/pjsip/dialplan_functions.c
@@ -388,7 +388,7 @@
</enumlist>
</enum>
<enum name="target_uri">
- <para>The request URI of the <literal>INVITE</literal> request associated with the creation of this channel.</para>
+ <para>The contact URI where requests are sent.</para>
</enum>
<enum name="local_uri">
<para>The local URI.</para>
@@ -402,6 +402,10 @@
<enum name="remote_tag">
<para>Tag in To header</para>
</enum>
+ <enum name="request_uri">
+ <para>The request URI of the incoming <literal>INVITE</literal>
+ associated with the creation of this channel.</para>
+ </enum>
<enum name="t38state">
<para>The current state of any T.38 fax on this channel.</para>
<enumlist>
@@ -657,6 +661,27 @@ static int channel_read_rtcp(struct ast_channel *chan, const char *type, const c
return 0;
}
+static int print_escaped_uri(struct ast_channel *chan, const char *type,
+ pjsip_uri_context_e context, const void *uri, char *buf, size_t size)
+{
+ int res;
+ char *buf_copy;
+
+ res = pjsip_uri_print(context, uri, buf, size);
+ if (res < 0) {
+ ast_log(LOG_ERROR, "Channel %s: Unescaped %s too long for %d byte buffer\n",
+ ast_channel_name(chan), type, (int) size);
+
+ /* Empty buffer that likely is not terminated. */
+ buf[0] = '\0';
+ return -1;
+ }
+
+ buf_copy = ast_strdupa(buf);
+ ast_escape_quoted(buf_copy, buf, size);
+ return 0;
+}
+
/*!
* \internal \brief Handle reading signalling information
*/
@@ -665,6 +690,7 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const
struct ast_sip_channel_pvt *channel = ast_channel_tech_pvt(chan);
char *buf_copy;
pjsip_dialog *dlg;
+ int res = 0;
if (!channel) {
ast_log(AST_LOG_WARNING, "Channel %s has no pvt!\n", ast_channel_name(chan));
@@ -690,25 +716,27 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const
return -1;
#endif
} else if (!strcmp(type, "target_uri")) {
- pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->target, buf, buflen);
- buf_copy = ast_strdupa(buf);
- ast_escape_quoted(buf_copy, buf, buflen);
+ res = print_escaped_uri(chan, type, PJSIP_URI_IN_REQ_URI, dlg->target, buf,
+ buflen);
} else if (!strcmp(type, "local_uri")) {
- pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri, buf, buflen);
- buf_copy = ast_strdupa(buf);
- ast_escape_quoted(buf_copy, buf, buflen);
+ res = print_escaped_uri(chan, type, PJSIP_URI_IN_FROMTO_HDR, dlg->local.info->uri,
+ buf, buflen);
} else if (!strcmp(type, "local_tag")) {
ast_copy_pj_str(buf, &dlg->local.info->tag, buflen);
buf_copy = ast_strdupa(buf);
ast_escape_quoted(buf_copy, buf, buflen);
} else if (!strcmp(type, "remote_uri")) {
- pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, dlg->remote.info->uri, buf, buflen);
- buf_copy = ast_strdupa(buf);
- ast_escape_quoted(buf_copy, buf, buflen);
+ res = print_escaped_uri(chan, type, PJSIP_URI_IN_FROMTO_HDR,
+ dlg->remote.info->uri, buf, buflen);
} else if (!strcmp(type, "remote_tag")) {
ast_copy_pj_str(buf, &dlg->remote.info->tag, buflen);
buf_copy = ast_strdupa(buf);
ast_escape_quoted(buf_copy, buf, buflen);
+ } else if (!strcmp(type, "request_uri")) {
+ if (channel->session->request_uri) {
+ res = print_escaped_uri(chan, type, PJSIP_URI_IN_REQ_URI,
+ channel->session->request_uri, buf, buflen);
+ }
} else if (!strcmp(type, "t38state")) {
ast_copy_string(buf, t38state_to_string[channel->session->t38state], buflen);
} else if (!strcmp(type, "local_addr")) {
@@ -744,7 +772,7 @@ static int channel_read_pjsip(struct ast_channel *chan, const char *type, const
return -1;
}
- return 0;
+ return res;
}
/*! \brief Struct used to push function arguments to task processor */
diff --git a/channels/sig_analog.h b/channels/sig_analog.h
index 6415b6eb8..42e00c029 100644
--- a/channels/sig_analog.h
+++ b/channels/sig_analog.h
@@ -93,7 +93,7 @@ enum analog_event {
ANALOG_EVENT_EC_NLP_ENABLED,
ANALOG_EVENT_ERROR, /* not a DAHDI event */
ANALOG_EVENT_DTMFCID, /* not a DAHDI event */
- ANALOG_EVENT_PULSEDIGIT = (1 << 16),
+ ANALOG_EVENT_PULSEDIGIT = (1 << 16),
ANALOG_EVENT_DTMFDOWN = (1 << 17),
ANALOG_EVENT_DTMFUP = (1 << 18),
};
@@ -231,7 +231,7 @@ struct analog_callback {
int (* const check_confirmanswer)(void *pvt);
void (* const set_callwaiting)(void *pvt, int callwaiting_enable);
void (* const cancel_cidspill)(void *pvt);
- int (* const confmute)(void *pvt, int mute);
+ int (* const confmute)(void *pvt, int mute);
void (* const set_pulsedial)(void *pvt, int flag);
void (* const set_new_owner)(void *pvt, struct ast_channel *new_owner);
diff --git a/channels/sip/config_parser.c b/channels/sip/config_parser.c
index 0feb24655..397f2656f 100644
--- a/channels/sip/config_parser.c
+++ b/channels/sip/config_parser.c
@@ -926,4 +926,3 @@ void sip_config_parser_unregister_tests(void)
AST_TEST_UNREGISTER(sip_parse_host_line_test);
AST_TEST_UNREGISTER(sip_parse_nat_test);
}
-
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c
index 7a1a4435a..ac6508d93 100644
--- a/channels/sip/dialplan_functions.c
+++ b/channels/sip/dialplan_functions.c
@@ -136,7 +136,7 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p
AST_APP_ARG(type);
AST_APP_ARG(field);
);
-
+
/* Check for zero arguments */
if (ast_strlen_zero(parse)) {
ast_log(LOG_ERROR, "Cannot call %s without arguments\n", funcname);
@@ -511,4 +511,3 @@ void sip_dialplan_function_unregister_tests(void)
{
AST_TEST_UNREGISTER(test_sip_rtpqos_1);
}
-
diff --git a/channels/sip/include/config_parser.h b/channels/sip/include/config_parser.h
index fd055b145..811f8951c 100644
--- a/channels/sip/include/config_parser.h
+++ b/channels/sip/include/config_parser.h
@@ -35,7 +35,7 @@ int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const
/*!
* \brief parses a config line for a host with a transport
*
- * An example input would be:
+ * An example input would be:
* <code>tls://www.google.com:8056</code>
*
* \retval 0 on success
diff --git a/channels/sip/include/globals.h b/channels/sip/include/globals.h
index d7c9f13d0..3c3ba47bd 100644
--- a/channels/sip/include/globals.h
+++ b/channels/sip/include/globals.h
@@ -39,4 +39,3 @@ extern struct ast_channel_tech sip_tech;
extern struct ast_channel_tech sip_tech_info;
#endif /* !defined(SIP_GLOBALS_H) */
-
diff --git a/channels/sip/include/reqresp_parser.h b/channels/sip/include/reqresp_parser.h
index 2543329dd..338824a53 100644
--- a/channels/sip/include/reqresp_parser.h
+++ b/channels/sip/include/reqresp_parser.h
@@ -59,8 +59,8 @@ AST_LIST_HEAD_NOLOCK(contactliststruct, contact);
* parts, user:secret.
* - If the URI contains a port number, hostport will return with both
* parts, host:port.
- * - This function overwrites the the URI string.
- *
+ * - This function overwrites the URI string.
+ *
* \retval 0 on success
* \retval -1 on error.
*
diff --git a/channels/sip/security_events.c b/channels/sip/security_events.c
index 5b6755120..b93dffe99 100644
--- a/channels/sip/security_events.c
+++ b/channels/sip/security_events.c
@@ -358,4 +358,3 @@ int sip_report_security_event(const char *peer, struct ast_sockaddr *addr, const
return result;
}
-
diff --git a/channels/vcodecs.c b/channels/vcodecs.c
index 76aeb671f..e55c5fef9 100644
--- a/channels/vcodecs.c
+++ b/channels/vcodecs.c
@@ -154,7 +154,7 @@ static void check_h261(struct fbuf_t *b)
{
struct bitbuf a = bitbuf_init(b->data, b->used * 8, 0);
uint32_t x, y;
-
+
x = getbits(&a, 20); /* PSC, 0000 0000 0000 0001 0000 */
if (x != 0x10) {
ast_log(LOG_WARNING, "bad PSC 0x%x\n", x);
@@ -386,7 +386,7 @@ static struct ast_frame *h263p_encap(struct fbuf_t *b, int mtu,
ast_log(LOG_WARNING, "--- frame error l %d\n", l);
break;
}
-
+
if (d[0] == 0 && d[1] == 0) { /* we start with a psc */
h = 0;
} else { /* no psc, create a header */
@@ -568,8 +568,8 @@ static int h263_enc_init(AVCodecContext *enc_ctx)
* TR:8 .... .... temporal reference
* PTYPE:13 or more ptype...
* If we don't fragment a GOB SBIT and EBIT = 0.
- * reference, 8 bit)
- *
+ * reference, 8 bit)
+ *
* The assumption below is that we start with a PSC.
*/
static struct ast_frame *h263_encap(struct fbuf_t *b, int mtu,
@@ -695,7 +695,7 @@ static struct video_codec_desc h263_codec = {
.dec_init = NULL,
.dec_decap = h263_decap,
.dec_run = ffmpeg_decode
-
+
};
/*---- h261 support -----*/
@@ -947,7 +947,7 @@ static int h264_dec_init(AVCodecContext *dec_ctx)
* - 0..n 0-byte(s), unused, optional. one zero-byte is always present
* in the first NAL before the start code prefix.
* - start code prefix (3 bytes): 0x000001
- * (the first bytestream has a
+ * (the first bytestream has a
* like these 0x00000001!)
* - NAL header byte ( F[1] | NRI[2] | Type[5] ) where type != 0
* - byte-stream
@@ -1127,7 +1127,7 @@ static const struct _cm video_formats[] = {
{ AST_FORMAT_MP4_VIDEO, CODEC_ID_MPEG4, CM_RDWR },
{ 0, 0, 0 },
};
-
+
/*! \brief map an asterisk format into an ffmpeg one */
static enum CodecID map_video_format(uint32_t ast_format, int rw)
diff --git a/channels/vgrabbers.c b/channels/vgrabbers.c
index 45dced4e1..054911de5 100644
--- a/channels/vgrabbers.c
+++ b/channels/vgrabbers.c
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright 2007, Luigi Rizzo
+ * Copyright 2007, Luigi Rizzo
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -209,7 +209,7 @@ static void *grab_v4l1_open(const char *dev, struct fbuf_t *geom, int fps)
struct fbuf_t *b;
/* name should be something under /dev/ */
- if (strncmp(dev, "/dev/", 5))
+ if (strncmp(dev, "/dev/", 5))
return NULL;
fd = open(dev, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
@@ -227,12 +227,8 @@ static void *grab_v4l1_open(const char *dev, struct fbuf_t *geom, int fps)
v->b = *geom;
b = &v->b; /* shorthand */
- i = fcntl(fd, F_GETFL);
- if (-1 == fcntl(fd, F_SETFL, i | O_NONBLOCK)) {
- /* non fatal, just emit a warning */
- ast_log(LOG_WARNING, "error F_SETFL for %s [%s]\n",
- dev, strerror(errno));
- }
+ ast_fd_set_flags(fd, O_NONBLOCK);
+
/* set format for the camera.
* In principle we could retry with a different format if the
* one we are asking for is not supported.
diff --git a/codecs/Makefile b/codecs/Makefile
index c43f44bf0..885898832 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for codec modules
#
# Copyright (C) 1999-2006, Digium, Inc.
diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c
index 924ec7650..f96671ba2 100644
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -23,7 +23,7 @@
/*! \file
*
* \brief codec_adpcm.c - translate between signed linear and Dialogic ADPCM
- *
+ *
* \ingroup codecs
*/
@@ -52,7 +52,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "ex_adpcm.h"
/*
- * Step size index shift table
+ * Step size index shift table
*/
static int indsft[8] = { -1, -1, -1, -1, 2, 4, 6, 8 };
@@ -169,7 +169,7 @@ static inline int adpcm(short csig, struct adpcm_state *state)
int step;
int encoded;
- /*
+ /*
* Clip csig if too large or too small
*/
csig >>= 4;
@@ -210,7 +210,7 @@ static inline int adpcm(short csig, struct adpcm_state *state)
/* feedback to state */
decode(encoded, state);
-
+
return encoded;
}
@@ -261,7 +261,7 @@ static struct ast_frame *lintoadpcm_frameout(struct ast_trans_pvt *pvt)
struct ast_frame *f;
int i;
int samples = pvt->samples; /* save original number */
-
+
if (samples < 2)
return NULL;
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c
index 0a4d4b8f6..b0ef9ed5f 100644
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief codec_alaw.c - translate between signed linear and alaw
- *
+ *
* \ingroup codecs
*/
@@ -52,7 +52,7 @@ static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
pvt->samples += i;
pvt->datalen += i * 2; /* 2 bytes/sample */
-
+
while (i--)
*dst++ = AST_ALAW(*src++);
@@ -69,7 +69,7 @@ static int lintoalaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
pvt->samples += i;
pvt->datalen += i; /* 1 byte/sample */
- while (i--)
+ while (i--)
*dst++ = AST_LIN2A(*src++);
return 0;
diff --git a/codecs/codec_dahdi.c b/codecs/codec_dahdi.c
index f207b6486..edf5038ca 100644
--- a/codecs/codec_dahdi.c
+++ b/codecs/codec_dahdi.c
@@ -615,7 +615,6 @@ static int dahdi_translate(struct ast_trans_pvt *pvt, uint32_t dst_dahdi_fmt, ui
/* Request translation through zap if possible */
int fd;
struct codec_dahdi_pvt *dahdip = pvt->pvt;
- int flags;
int tried_once = 0;
const char *dev_filename = "/dev/dahdi/transcode";
@@ -661,11 +660,7 @@ retry:
return -1;
}
- flags = fcntl(fd, F_GETFL);
- if (flags > - 1) {
- if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
- ast_log(LOG_WARNING, "Could not set non-block mode!\n");
- }
+ ast_fd_set_flags(fd, O_NONBLOCK);
dahdip->fd = fd;
diff --git a/codecs/codec_g722.c b/codecs/codec_g722.c
index feca8a0be..8a23be84f 100644
--- a/codecs/codec_g722.c
+++ b/codecs/codec_g722.c
@@ -111,7 +111,7 @@ static int g722tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
/* g722_decode expects the samples to be in the invalid samples / 2 format */
in_samples = f->samples / 2;
- out_samples = g722_decode(&tmp->g722, &pvt->outbuf.i16[pvt->samples * sizeof(int16_t)],
+ out_samples = g722_decode(&tmp->g722, &pvt->outbuf.i16[pvt->samples * sizeof(int16_t)],
(uint8_t *) f->data.ptr, in_samples);
pvt->samples += out_samples;
@@ -126,7 +126,7 @@ static int lintog722_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
struct g722_encoder_pvt *tmp = pvt->pvt;
int outlen;
- outlen = g722_encode(&tmp->g722, (&pvt->outbuf.ui8[pvt->datalen]),
+ outlen = g722_encode(&tmp->g722, (&pvt->outbuf.ui8[pvt->datalen]),
(int16_t *) f->data.ptr, f->samples);
pvt->samples += outlen * 2;
@@ -244,7 +244,7 @@ static int load_module(void)
if (res) {
unload_module();
return AST_MODULE_LOAD_DECLINE;
- }
+ }
return AST_MODULE_LOAD_SUCCESS;
}
diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c
index 8fb1fd10b..7e3384a50 100644
--- a/codecs/codec_g726.c
+++ b/codecs/codec_g726.c
@@ -893,7 +893,7 @@ static int load_module(void)
if (res) {
unload_module();
return AST_MODULE_LOAD_DECLINE;
- }
+ }
return AST_MODULE_LOAD_SUCCESS;
}
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index b3c21912c..cac77760b 100644
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -66,7 +66,7 @@ struct gsm_translator_pvt { /* both gsm2lin and lin2gsm */
static int gsm_new(struct ast_trans_pvt *pvt)
{
struct gsm_translator_pvt *tmp = pvt->pvt;
-
+
return (tmp->gsm = gsm_create()) ? 0 : -1;
}
@@ -97,7 +97,7 @@ static int gsmtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
src = f->data.ptr + x;
}
/* XXX maybe we don't need to check */
- if (pvt->samples + len > BUFFER_SAMPLES) {
+ if (pvt->samples + len > BUFFER_SAMPLES) {
ast_log(LOG_WARNING, "Out of buffer space\n");
return -1;
}
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index df59dd756..4098cc280 100644
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -7,7 +7,7 @@
*
* The lpc10 code is from a library used by nautilus, modified to be a bit
* nicer to the compiler.
- * See http://www.arl.wustl.edu/~jaf/
+ * See http://www.arl.wustl.edu/~jaf/
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -139,7 +139,7 @@ static int lpc10tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
pvt->datalen += 2*LPC10_SAMPLES_PER_FRAME;
len += LPC10_BYTES_IN_COMPRESSED_FRAME;
}
- if (len != f->datalen)
+ if (len != f->datalen)
printf("Decoded %d, expected %d\n", len, f->datalen);
return 0;
}
diff --git a/codecs/codec_resample.c b/codecs/codec_resample.c
index 03f068323..eba109140 100644
--- a/codecs/codec_resample.c
+++ b/codecs/codec_resample.c
@@ -17,11 +17,11 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
*
* \brief Resample slinear audio
- *
+ *
* \ingroup codecs
*/
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index c9adceb2f..3c65ee51b 100644
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -21,7 +21,7 @@
*
* \brief Translate between signed linear and Speex (Open Codec)
*
- * \note This work was motivated by Jeremy McNamara
+ * \note This work was motivated by Jeremy McNamara
* hacked to be configurable by anthm and bkw 9/28/2004
*
* \ingroup codecs
@@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/* We require a post 1.1.8 version of Speex to enable preprocessing
* and better type handling
- */
+ */
#ifdef _SPEEX_TYPES_H
#include <speex/speex_preprocess.h>
#endif
@@ -136,7 +136,7 @@ static int speex_encoder_construct(struct ast_trans_pvt *pvt, const SpeexMode *p
if (abr)
speex_encoder_ctl(tmp->speex, SPEEX_SET_ABR, &abr);
if (dtx)
- speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx);
+ speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx);
tmp->silent_state = 0;
return 0;
@@ -160,7 +160,7 @@ static int lin32tospeexuwb_new(struct ast_trans_pvt *pvt)
static int speex_decoder_construct(struct ast_trans_pvt *pvt, const SpeexMode *profile)
{
struct speex_coder_pvt *tmp = pvt->pvt;
-
+
if (!(tmp->speex = speex_decoder_init(profile)))
return -1;
@@ -387,7 +387,7 @@ static struct ast_translator speextolin = {
};
static struct ast_translator lintospeex = {
- .name = "lintospeex",
+ .name = "lintospeex",
.src_codec = {
.name = "slin",
.type = AST_MEDIA_TYPE_AUDIO,
@@ -420,7 +420,7 @@ static struct ast_translator speexwbtolin16 = {
.name = "slin",
.type = AST_MEDIA_TYPE_AUDIO,
.sample_rate = 16000,
- },
+ },
.format = "slin16",
.newpvt = speexwbtolin16_new,
.framein = speextolin_framein,
@@ -499,7 +499,7 @@ static struct ast_translator lin32tospeexuwb = {
.buf_size = BUFFER_SAMPLES * 2, /* XXX maybe a lot less ? */
};
-static int parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
@@ -516,14 +516,14 @@ static int parse_config(int reload)
if (res > -1 && res < 11) {
ast_verb(3, "CODEC SPEEX: Setting Quality to %d\n",res);
quality = res;
- } else
+ } else
ast_log(LOG_ERROR,"Error Quality must be 0-10\n");
} else if (!strcasecmp(var->name, "complexity")) {
res = abs(atoi(var->value));
if (res > -1 && res < 11) {
ast_verb(3, "CODEC SPEEX: Setting Complexity to %d\n",res);
complexity = res;
- } else
+ } else
ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n");
} else if (!strcasecmp(var->name, "vbr_quality")) {
if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0 && res_f <= 10) {
@@ -547,7 +547,7 @@ static int parse_config(int reload)
else
ast_verb(3, "CODEC SPEEX: Disabling ABR\n");
abr = res;
- } else
+ } else
ast_log(LOG_ERROR,"Error! ABR target bitrate must be >= 0\n");
} else if (!strcasecmp(var->name, "vad")) {
vad = ast_true(var->value) ? 1 : 0;
@@ -594,7 +594,7 @@ static int parse_config(int reload)
return 0;
}
-static int reload(void)
+static int reload(void)
{
if (parse_config(1))
return AST_MODULE_LOAD_DECLINE;
diff --git a/codecs/codec_ulaw.c b/codecs/codec_ulaw.c
index 2246c4b57..2c2a65da8 100644
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief codec_ulaw.c - translate between signed linear and ulaw
- *
+ *
* \ingroup codecs
*/
diff --git a/codecs/ex_ilbc.h b/codecs/ex_ilbc.h
index 3a79b0918..1af3d090b 100644
--- a/codecs/ex_ilbc.h
+++ b/codecs/ex_ilbc.h
@@ -8,10 +8,10 @@
*/
static uint8_t ex_ilbc[] = {
- 0xff, 0xa0, 0xff, 0xfa, 0x0f, 0x60, 0x12, 0x11, 0xa2, 0x47,
- 0x22, 0x8c, 0x00, 0x00, 0x01, 0x02, 0x80, 0x43, 0xa0, 0x40,
- 0x33, 0xff, 0xcf, 0xc0, 0xf3, 0xf3, 0x3f, 0x8f, 0x3f, 0xff,
- 0xff, 0xff, 0xff, 0xfc, 0xf9, 0xe5, 0x55, 0x78, 0x0b, 0xca,
+ 0xff, 0xa0, 0xff, 0xfa, 0x0f, 0x60, 0x12, 0x11, 0xa2, 0x47,
+ 0x22, 0x8c, 0x00, 0x00, 0x01, 0x02, 0x80, 0x43, 0xa0, 0x40,
+ 0x33, 0xff, 0xcf, 0xc0, 0xf3, 0xf3, 0x3f, 0x8f, 0x3f, 0xff,
+ 0xff, 0xff, 0xff, 0xfc, 0xf9, 0xe5, 0x55, 0x78, 0x0b, 0xca,
0xe1, 0x27, 0x94, 0x7b, 0xa8, 0x91, 0x2c, 0x36, 0x08, 0x56,
};
diff --git a/codecs/g722/g722.h b/codecs/g722/g722.h
index f57b1c882..1a1e4f9de 100644
--- a/codecs/g722/g722.h
+++ b/codecs/g722/g722.h
@@ -7,7 +7,7 @@
*
* Copyright (C) 2005 Steve Underwood
*
- * Despite my general liking of the GPL, I place my own contributions
+ * Despite my general liking of the GPL, I place my own contributions
* to this code in the public domain for the benefit of all mankind -
* even the slimy ones who might try to proprietize my work and use it
* to my detriment.
@@ -122,7 +122,7 @@ typedef struct
int nb;
int det;
} band[2];
-
+
unsigned int in_buffer;
int in_bits;
unsigned int out_buffer;
diff --git a/codecs/g722/g722_decode.c b/codecs/g722/g722_decode.c
index 3e8f7d0c6..47e63eb17 100644
--- a/codecs/g722/g722_decode.c
+++ b/codecs/g722/g722_decode.c
@@ -7,7 +7,7 @@
*
* Copyright (C) 2005 Steve Underwood
*
- * Despite my general liking of the GPL, I place my own contributions
+ * Despite my general liking of the GPL, I place my own contributions
* to this code in the public domain for the benefit of all mankind -
* even the slimy ones who might try to proprietize my work and use it
* to my detriment.
@@ -121,7 +121,7 @@ static void block4(g722_decode_state_t *s, int band, int d)
s->band[band].d[i] = s->band[band].d[i - 1];
s->band[band].b[i] = s->band[band].bp[i];
}
-
+
for (i = 2; i > 0; i--)
{
s->band[band].r[i] = s->band[band].r[i - 1];
@@ -198,9 +198,9 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
static const int wh[3] = {0, -214, 798};
static const int rh2[4] = {2, 1, 2, 1};
static const int qm2[4] = {-7408, -1616, 7408, 1616};
- static const int qm4[16] =
+ static const int qm4[16] =
{
- 0, -20456, -12896, -8968,
+ 0, -20456, -12896, -8968,
-6288, -4240, -2584, -1200,
20456, 12896, 8968, 6288,
4240, 2584, 1200, 0
@@ -320,7 +320,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
else if (wd1 > 18432)
wd1 = 18432;
s->band[0].nb = wd1;
-
+
/* Block 3L, SCALEL */
wd1 = (s->band[0].nb >> 6) & 31;
wd2 = 8 - (s->band[0].nb >> 11);
@@ -328,7 +328,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
s->band[0].det = wd3 << 2;
block4(s, 0, dlowt);
-
+
if (!s->eight_k)
{
/* Block 2H, INVQAH */
@@ -351,7 +351,7 @@ int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[]
else if (wd1 > 22528)
wd1 = 22528;
s->band[1].nb = wd1;
-
+
/* Block 3H, SCALEH */
wd1 = (s->band[1].nb >> 6) & 31;
wd2 = 10 - (s->band[1].nb >> 11);
diff --git a/codecs/g722/g722_encode.c b/codecs/g722/g722_encode.c
index 5890fbf24..cf53c74eb 100644
--- a/codecs/g722/g722_encode.c
+++ b/codecs/g722/g722_encode.c
@@ -9,7 +9,7 @@
*
* All rights reserved.
*
- * Despite my general liking of the GPL, I place my own contributions
+ * Despite my general liking of the GPL, I place my own contributions
* to this code in the public domain for the benefit of all mankind -
* even the slimy ones who might try to proprietize my work and use it
* to my detriment.
@@ -120,7 +120,7 @@ static void block4(g722_encode_state_t *s, int band, int d)
s->band[band].d[i] = s->band[band].d[i - 1];
s->band[band].b[i] = s->band[band].bp[i];
}
-
+
for (i = 2; i > 0; i--)
{
s->band[band].r[i] = s->band[band].r[i - 1];
@@ -289,7 +289,7 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
s->x[i] = s->x[i + 2];
s->x[22] = amp[j++];
s->x[23] = amp[j++];
-
+
/* Discard every other QMF output */
sumeven = 0;
sumodd = 0;
@@ -337,7 +337,7 @@ int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[]
s->band[0].det = wd3 << 2;
block4(s, 0, dlow);
-
+
if (s->eight_k)
{
/* Just leave the high bits as zero */
diff --git a/codecs/gsm/Makefile b/codecs/gsm/Makefile
index 06f082983..489a0f377 100644
--- a/codecs/gsm/Makefile
+++ b/codecs/gsm/Makefile
@@ -17,14 +17,14 @@ SASR = -DSASR
# LTP_CUT = -DLTP_CUT
LTP_CUT =
-######### Define to enable the GSM library's long-term correlation
+######### Define to enable the GSM library's long-term correlation
######### approximation option---faster, but worse; works for
######### both integer and floating point multiplications.
######### This flag is still in the experimental stage.
WAV49 = -DWAV49
#WAV49 =
-######### Define to enable the GSM library's option to pack GSM frames
+######### Define to enable the GSM library's option to pack GSM frames
######### in the style used by the WAV #49 format. If you want to write
######### a tool that produces .WAV files which contain GSM-encoded data,
######### define this, and read about the GSM_OPT_WAV49 option in the
@@ -35,7 +35,7 @@ WAV49 = -DWAV49
######### Define to enable MMXTM optimizations for x86 architecture CPU's
######### which support MMX instructions. This should be newer pentiums,
######### ppro's, etc, as well as the AMD K6 and K7. The compile will
-######### probably require gcc.
+######### probably require gcc.
# Due to the gsm codec beeing broken when compiled with gcc version 4.2
# and optimization higher than -O2 we are checking for that version and
@@ -48,7 +48,7 @@ endif
PG =
#PG = -g -pg
######### Profiling flags. If you don't know what that means, leave it blank.
-
+
# Choose a compiler. The code works both with ANSI and K&R-C.
# Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
# compile without, function prototypes in the header files.
@@ -119,13 +119,13 @@ ARFLAGS = cr
RMFLAGS = -f
FIND = find
COMPRESS = compress
-COMPRESSFLAGS =
+COMPRESSFLAGS =
# RANLIB = true
RANLIB = ranlib
#
# You shouldn't have to configure below this line if you're porting.
-#
+#
# Local Directories
@@ -484,7 +484,7 @@ $(ADDTST)/add: $(ADDTST)/add_test.o
# format used by the tests we ran (.cod). We paid for the test data,
# so I guess we can't just provide them with this package. Still,
# if you happen to have them lying around, here's the code.
-#
+#
# You can use gsm2cod | cod2txt independently to look at what's
# coded inside the compressed frames, although this shouldn't be
# hard to roll on your own using the gsm_print() function from
@@ -492,7 +492,7 @@ $(ADDTST)/add: $(ADDTST)/add_test.o
$(TST)/test-result: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/run
- ( cd $(TST); ./run )
+ ( cd $(TST); ./run )
$(TST)/lin2txt: $(TST)/lin2txt.o $(LIBGSM)
$(LD) $(LFLAGS) -o $(TST)/lin2txt \
diff --git a/codecs/gsm/README b/codecs/gsm/README
index cb6af85cf..10470e04e 100644
--- a/codecs/gsm/README
+++ b/codecs/gsm/README
@@ -17,7 +17,7 @@ rate, i.e. a frame rate of 50 Hz) into 260 bits; for compatibility
with typical UNIX applications, our implementation turns frames of 160
16-bit linear samples into 33-byte frames (1650 Bytes/s).
The quality of the algorithm is good enough for reliable speaker
-recognition; even music often survives transcoding in recognizable
+recognition; even music often survives transcoding in recognizable
form (given the bandwidth limitations of 8 kHz sampling rate).
The interfaces offered are a front end modelled after compress(1), and
diff --git a/codecs/gsm/inc/gsm.h b/codecs/gsm/inc/gsm.h
index 81065e512..c98b06fd4 100644
--- a/codecs/gsm/inc/gsm.h
+++ b/codecs/gsm/inc/gsm.h
@@ -55,7 +55,7 @@ typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */
#define GSM_OPT_FRAME_CHAIN 6
extern gsm gsm_create GSM_P((void));
-extern void gsm_destroy GSM_P((gsm));
+extern void gsm_destroy GSM_P((gsm));
extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *));
extern int gsm_option GSM_P((gsm, int, int *));
diff --git a/codecs/gsm/inc/private.h b/codecs/gsm/inc/private.h
index 80ecbc59f..21634337c 100644
--- a/codecs/gsm/inc/private.h
+++ b/codecs/gsm/inc/private.h
@@ -82,10 +82,10 @@ extern longword gsm_L_asr P((longword a, int n));
extern word gsm_asr P((word a, int n));
/*
- * Inlined functions from add.h
+ * Inlined functions from add.h
*/
-/*
+/*
* #define GSM_MULT_R(a, b) (* word a, word b, !(a == b == MIN_WORD) *) \
* (0x0FFFF & SASR(((longword)(a) * (longword)(b) + 16384), 15))
*/
@@ -103,7 +103,7 @@ extern word gsm_asr P((word a, int n));
static __inline__ int GSM_L_ADD(int a, int b)
{
__asm__ __volatile__(
-
+
"addl %2,%0; jno 0f; movl $0x7fffffff,%0; adcl $0,%0; 0:"
: "=&r" (a)
: "0" (a), "ir" (b)
@@ -139,7 +139,7 @@ static __inline__ short GSM_SUB(short a, short b)
#ifdef WIN32
#define inline __inline
#define __inline__ __inline
-#endif
+#endif
# define GSM_L_ADD(a, b) \
( (a) < 0 ? ( (b) >= 0 ? (a) + (b) \
@@ -214,10 +214,10 @@ extern void Gsm_Preprocess P((
extern void Gsm_Encoding P((
struct gsm_state * S,
- word * e,
- word * ep,
+ word * e,
+ word * ep,
word * xmaxc,
- word * Mc,
+ word * Mc,
word * xMc));
extern void Gsm_Short_Term_Analysis_Filter P((
diff --git a/codecs/gsm/inc/proto.h b/codecs/gsm/inc/proto.h
index 68e1ecf05..20682c35d 100644
--- a/codecs/gsm/inc/proto.h
+++ b/codecs/gsm/inc/proto.h
@@ -40,7 +40,7 @@
# define P1(x, a) (a)
# define P2(x, a, b) (a, b)
# define P3(x, a, b, c) (a, b, c)
-# define P4(x, a, b, c, d) (a, b, c, d)
+# define P4(x, a, b, c, d) (a, b, c, d)
# define P5(x, a, b, c, d, e) (a, b, c, d, e)
# define P6(x, a, b, c, d, e, f) (a, b, c, d, e, f)
# define P7(x, a, b, c, d, e, f, g) (a, b, c, d, e, f, g)
diff --git a/codecs/gsm/src/add.c b/codecs/gsm/src/add.c
index f23d27f16..d3e722de6 100644
--- a/codecs/gsm/src/add.c
+++ b/codecs/gsm/src/add.c
@@ -88,7 +88,7 @@ longword gsm_L_sub P2((a,b), longword a, longword b)
}
else if (b <= 0) return a - b;
else {
- /* a<0, b>0 */
+ /* a<0, b>0 */
ulongword A = (ulongword)-(a + 1) + b;
return A >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)A - 1;
@@ -120,7 +120,7 @@ word gsm_norm P1((a), longword a )
* variable L_var1 for positive values on the interval
*
* with minimum of
- * minimum of 1073741824 (01000000000000000000000000000000) and
+ * minimum of 1073741824 (01000000000000000000000000000000) and
* maximum of 2147483647 (01111111111111111111111111111111)
*
*
@@ -141,7 +141,7 @@ word gsm_norm P1((a), longword a )
a = ~a;
}
- return a & 0xffff0000
+ return a & 0xffff0000
? ( a & 0xff000000
? -1 + bitoff[ 0xFF & (a >> 24) ]
: 7 + bitoff[ 0xFF & (a >> 16) ] )
@@ -194,7 +194,7 @@ word gsm_asr P2((a,n), word a, int n)
# endif
}
-/*
+/*
* (From p. 46, end of section 4.2.5)
*
* NOTE: The following lines gives [sic] one correct implementation
diff --git a/codecs/gsm/src/code.c b/codecs/gsm/src/code.c
index 9f6b00f43..dd7e6190e 100644
--- a/codecs/gsm/src/code.c
+++ b/codecs/gsm/src/code.c
@@ -19,8 +19,8 @@
#include "gsm.h"
#include "proto.h"
-/*
- * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER
+/*
+ * 4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER
*/
void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),
@@ -33,7 +33,7 @@ void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),
* The RPE-LTD coder works on a frame by frame basis. The length of
* the frame is equal to 160 samples. Some computations are done
* once per frame to produce at the output of the coder the
- * LARc[1..8] parameters which are the coded LAR coefficients and
+ * LARc[1..8] parameters which are the coded LAR coefficients and
* also to realize the inverse filtering operation for the entire
* frame (160 samples of signal d[0..159]). These parts produce at
* the output of the coder:
diff --git a/codecs/gsm/src/debug.c b/codecs/gsm/src/debug.c
index 22dfa8082..c2469df1a 100644
--- a/codecs/gsm/src/debug.c
+++ b/codecs/gsm/src/debug.c
@@ -18,7 +18,7 @@
#include <stdio.h>
#include "proto.h"
-void gsm_debug_words P4( (name, from, to, ptr),
+void gsm_debug_words P4( (name, from, to, ptr),
char * name,
int from,
int to,
diff --git a/codecs/gsm/src/gsm_decode.c b/codecs/gsm/src/gsm_decode.c
index 7318ba2d4..7ebf35dd0 100644
--- a/codecs/gsm/src/gsm_decode.c
+++ b/codecs/gsm/src/gsm_decode.c
@@ -206,7 +206,7 @@ int gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
xmaxc[2] = sr & 0x3f; sr >>= 6;
xmc[26] = sr & 0x7; sr >>= 3;
xmc[27] = sr & 0x7; sr >>= 3;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
xmc[28] = sr & 0x7; sr >>= 3;
xmc[29] = sr & 0x7; sr >>= 3;
xmc[30] = sr & 0x7; sr >>= 3;
@@ -223,7 +223,7 @@ int gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
xmc[38] = sr & 0x7; sr >>= 3;
sr = *c++;
Nc[3] = sr & 0x7f; sr >>= 7;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
bc[3] = sr & 0x3; sr >>= 2;
Mc[3] = sr & 0x3; sr >>= 2;
sr |= (uword)*c++ << 5;
diff --git a/codecs/gsm/src/gsm_explode.c b/codecs/gsm/src/gsm_explode.c
index a906fc2ed..744ded5af 100644
--- a/codecs/gsm/src/gsm_explode.c
+++ b/codecs/gsm/src/gsm_explode.c
@@ -228,7 +228,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
#define xmc (target + 46 - 26)
xmc[26] = sr & 0x7; sr >>= 3;
xmc[27] = sr & 0x7; sr >>= 3;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
xmc[28] = sr & 0x7; sr >>= 3;
xmc[29] = sr & 0x7; sr >>= 3;
xmc[30] = sr & 0x7; sr >>= 3;
@@ -245,7 +245,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
xmc[38] = sr & 0x7; sr >>= 3;
sr = *c++;
Nc[3] = sr & 0x7f; sr >>= 7;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
bc[3] = sr & 0x3; sr >>= 2;
Mc[3] = sr & 0x3; sr >>= 2;
sr |= (uword)*c++ << 5;
@@ -273,7 +273,7 @@ int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
xmc[51] = sr & 0x7; sr >>= 3;
}
}
- else
+ else
#endif
{
/* GSM_MAGIC = (*c >> 4) & 0xF; */
diff --git a/codecs/gsm/src/gsm_implode.c b/codecs/gsm/src/gsm_implode.c
index 453b8cf39..08ebf5853 100644
--- a/codecs/gsm/src/gsm_implode.c
+++ b/codecs/gsm/src/gsm_implode.c
@@ -316,7 +316,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
#define xmc (source + 46 - 26)
xmc[26] = sr & 0x7; sr >>= 3;
xmc[27] = sr & 0x7; sr >>= 3;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
xmc[28] = sr & 0x7; sr >>= 3;
xmc[29] = sr & 0x7; sr >>= 3;
xmc[30] = sr & 0x7; sr >>= 3;
@@ -333,7 +333,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
xmc[38] = sr & 0x7; sr >>= 3;
sr = *c++;
Nc[3] = sr & 0x7f; sr >>= 7;
- sr |= (uword)*c++ << 1;
+ sr |= (uword)*c++ << 1;
bc[3] = sr & 0x3; sr >>= 2;
Mc[3] = sr & 0x3; sr >>= 2;
sr |= (uword)*c++ << 5;
@@ -361,7 +361,7 @@ void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
}
}
else
-#endif
+#endif
{
*c++ = ((GSM_MAGIC & 0xF) << 4) /* 1 */
diff --git a/codecs/gsm/src/gsm_option.c b/codecs/gsm/src/gsm_option.c
index 280780132..303170a9c 100644
--- a/codecs/gsm/src/gsm_option.c
+++ b/codecs/gsm/src/gsm_option.c
@@ -56,7 +56,7 @@ int gsm_option P3((r, opt, val), gsm r, int opt, int * val)
case GSM_OPT_WAV49:
-#ifdef WAV49
+#ifdef WAV49
result = r->wav_fmt;
if (val) r->wav_fmt = !!*val;
#endif
diff --git a/codecs/gsm/src/k6opt.h b/codecs/gsm/src/k6opt.h
index 16ea2ac8d..5c65b378c 100644
--- a/codecs/gsm/src/k6opt.h
+++ b/codecs/gsm/src/k6opt.h
@@ -1,7 +1,7 @@
/* k6opt.h vector functions optimized for MMX extensions to x86
*
* Copyright (C) 1999 by Stanley J. Brooks <stabro@megsinet.net>
- *
+ *
* Any use of this software is permitted provided that this notice is not
* removed and that neither the authors nor the Technische Universitaet Berlin
* are deemed to have made any representations as to the suitability of this
@@ -9,7 +9,7 @@
* this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE;
* not even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE.
- *
+ *
* Chicago, 03.12.1999
* Stanley J. Brooks
*/
@@ -22,7 +22,7 @@ extern void Weighting_filter P2((e, x),
extern longword k6maxcc P3((wt,dp,Nc_out),
const word *wt,
- const word *dp,
+ const word *dp,
word * Nc_out /* OUT */
)
;
@@ -34,7 +34,7 @@ extern longword k6maxcc P3((wt,dp,Nc_out),
*/
extern longword k6maxmin P3((p,n,out),
const word *p,
- int n,
+ int n,
word *out /* out[0] is max, out[1] is min */
)
;
@@ -53,7 +53,7 @@ extern longword k6iprod P3((p,q,n),
*/
extern void k6vsraw P3((p,n,bits),
const word *p,
- int n,
+ int n,
int bits
)
;
@@ -65,7 +65,7 @@ extern void k6vsraw P3((p,n,bits),
*/
extern void k6vsllw P3((p,n,bits),
const word *p,
- int n,
+ int n,
int bits
)
;
diff --git a/codecs/gsm/src/long_term.c b/codecs/gsm/src/long_term.c
index 83b6fdf85..571d9c7db 100644
--- a/codecs/gsm/src/long_term.c
+++ b/codecs/gsm/src/long_term.c
@@ -338,7 +338,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
else scal = 6 - temp;
assert(scal >= 0);
- ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100;
+ ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100;
/* Initialization of a working array wt
@@ -370,7 +370,7 @@ static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -536,7 +536,7 @@ static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -750,7 +750,7 @@ static void Fast_Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
register float a = lp[-8], b = lp[-7], c = lp[-6],
d = lp[-5], e = lp[-4], f = lp[-3],
g = lp[-2], h = lp[-1];
- register float E;
+ register float E;
register float S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
S5 = 0, S6 = 0, S7 = 0, S8 = 0;
@@ -867,7 +867,7 @@ static void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e),
case 0: STEP( 3277 ); break;
case 1: STEP( 11469 ); break;
case 2: STEP( 21299 ); break;
- case 3: STEP( 32767 ); break;
+ case 3: STEP( 32767 ); break;
}
}
@@ -888,7 +888,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */
assert( dpp); assert( Nc ); assert( bc );
#if defined(FAST) && defined(USE_FLOAT_MUL)
- if (S->fast)
+ if (S->fast)
#if defined (LTP_CUT)
if (S->ltp_cut)
Cut_Fast_Calculation_of_the_LTP_parameters(S,
@@ -896,7 +896,7 @@ void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), /* 4x for 160 samples */
else
#endif /* LTP_CUT */
Fast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc );
- else
+ else
#endif /* FAST & USE_FLOAT_MUL */
#ifdef LTP_CUT
if (S->ltp_cut)
@@ -936,7 +936,7 @@ void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
*/
brp = gsm_QLB[ bcr ];
- /* Computation of the reconstructed short term residual
+ /* Computation of the reconstructed short term residual
* signal drp[0..39]
*/
assert(brp != MIN_WORD);
diff --git a/codecs/gsm/src/lpc.c b/codecs/gsm/src/lpc.c
index 744149e02..7ce2c2ff3 100644
--- a/codecs/gsm/src/lpc.c
+++ b/codecs/gsm/src/lpc.c
@@ -84,7 +84,7 @@ static void Autocorrelation P2((s, L_ACF),
float_s[k] = (float) \
(s[k] = GSM_MULT_R(s[k], 16384 >> (n-1)));\
break;
-# else
+# else
# define SCALE(n) \
case n: for (k = 0; k <= 159; k++) \
s[k] = (word)GSM_MULT_R( s[k], 16384 >> (n-1) );\
@@ -153,7 +153,7 @@ static void Autocorrelation P2((s, L_ACF),
STEP(5); STEP(6); STEP(7); STEP(8);
}
- for (k = 9; k--; L_ACF[k] <<= 1) ;
+ for (k = 9; k--; L_ACF[k] <<= 1) ;
}
@@ -168,7 +168,7 @@ static void Autocorrelation P2((s, L_ACF),
/* Rescaling of the array s[0..159]
*/
if (scalauto > 0) {
- assert(scalauto <= 4);
+ assert(scalauto <= 4);
#ifndef K6OPT
for (k = 160; k--; *s++ <<= scalauto) ;
# else /* K6OPT */
@@ -256,7 +256,7 @@ static void Reflection_coefficients P2( (L_ACF, r),
assert(*r >= 0);
if (P[1] > 0) *r = -*r; /* r[n] = sub(0, r[n]) */
assert (*r != MIN_WORD);
- if (n == 8) return;
+ if (n == 8) return;
/* Schur recursion
*/
@@ -325,7 +325,7 @@ static void Quantization_and_coding P1((LAR),
/* This procedure needs four tables; the following equations
* give the optimum scaling for the constants:
- *
+ *
* A[0..7] = integer( real_A[0..7] * 1024 )
* B[0..7] = integer( real_B[0..7] * 512 )
* MAC[0..7] = maximum of the LARc[0..7]
diff --git a/codecs/gsm/src/preprocess.c b/codecs/gsm/src/preprocess.c
index eacdac851..da7baae13 100644
--- a/codecs/gsm/src/preprocess.c
+++ b/codecs/gsm/src/preprocess.c
@@ -15,7 +15,7 @@
#include "proto.h"
/* 4.2.0 .. 4.2.3 PREPROCESSING SECTION
- *
+ *
* After A-law to linear conversion (or directly from the
* Ato D converter) the following scaling is assumed for
* input to the RPE-LTP algorithm:
@@ -26,7 +26,7 @@
* Where S is the sign bit, v a valid bit, and * a "don't care" bit.
* The original signal is called sop[..]
*
- * out: 0.1................... 12
+ * out: 0.1................... 12
* S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0
*/
@@ -59,7 +59,7 @@ void Gsm_Preprocess P3((S, s, so),
/* 4.2.2 Offset compensation
- *
+ *
* This part implements a high-pass filter and requires extended
* arithmetic precision for the recursive part of this filter.
* The input of this procedure is the array so[0...159] and the
@@ -82,15 +82,15 @@ void Gsm_Preprocess P3((S, s, so),
*/
{
word msp;
-#ifndef __GNUC__
+#ifndef __GNUC__
word lsp;
#endif
longword L_s2;
longword L_temp;
-
+
L_s2 = s1;
L_s2 <<= 15;
-#ifndef __GNUC__
+#ifndef __GNUC__
msp = (word)SASR( L_z2, 15 );
lsp = (word)(L_z2 & 0x7fff); /* gsm_L_sub(L_z2,(msp<<15)); */
diff --git a/codecs/gsm/src/rpe.c b/codecs/gsm/src/rpe.c
index 1c354795d..2ace69f2f 100644
--- a/codecs/gsm/src/rpe.c
+++ b/codecs/gsm/src/rpe.c
@@ -29,7 +29,7 @@ static void Weighting_filter P2((e, x),
* The coefficients of the weighting filter are stored in a table
* (see table 4.4). The following scaling is used:
*
- * H[0..10] = integer( real_H[ 0..10] * 8192 );
+ * H[0..10] = integer( real_H[ 0..10] * 8192 );
*/
{
/* word wt[ 50 ]; */
@@ -50,7 +50,7 @@ static void Weighting_filter P2((e, x),
e -= 5;
/* Compute the signal x[0..39]
- */
+ */
for (k = 0; k <= 39; k++) {
L_result = 8192 >> 1;
@@ -65,7 +65,7 @@ static void Weighting_filter P2((e, x),
#define STEP( i, H ) (e[ k + i ] * (longword)H)
/* Every one of these multiplications is done twice --
- * but I don't see an elegant way to optimize this.
+ * but I don't see an elegant way to optimize this.
* Do you?
*/
@@ -83,16 +83,16 @@ static void Weighting_filter P2((e, x),
L_result += STEP( 10, -134 ) ;
#else
L_result +=
- STEP( 0, -134 )
- + STEP( 1, -374 )
+ STEP( 0, -134 )
+ + STEP( 1, -374 )
/* + STEP( 2, 0 ) */
- + STEP( 3, 2054 )
- + STEP( 4, 5741 )
- + STEP( 5, 8192 )
- + STEP( 6, 5741 )
- + STEP( 7, 2054 )
+ + STEP( 3, 2054 )
+ + STEP( 4, 5741 )
+ + STEP( 5, 8192 )
+ + STEP( 6, 5741 )
+ + STEP( 7, 2054 )
/* + STEP( 8, 0 ) */
- + STEP( 9, -374 )
+ + STEP( 9, -374 )
+ STEP(10, -134 )
;
#endif
@@ -117,7 +117,7 @@ static void Weighting_filter P2((e, x),
/* 4.2.14 */
static void RPE_grid_selection P3((x,xM,Mc_out),
- word * x, /* [0..39] IN */
+ word * x, /* [0..39] IN */
word * xM, /* [0..12] OUT */
word * Mc_out /* OUT */
)
@@ -150,7 +150,7 @@ static void RPE_grid_selection P3((x,xM,Mc_out),
* L_temp = GSM_L_MULT( temp1, temp1 );
* L_result = GSM_L_ADD( L_temp, L_result );
* }
- *
+ *
* if (L_result > EM) {
* Mc = m;
* EM = L_result;
@@ -313,7 +313,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
* can be calculated by using the exponent and the mantissa part of
* xmaxc (logarithmic table).
* So, this method avoids any division and uses only a scaling
- * of the RPE samples by a function of the exponent. A direct
+ * of the RPE samples by a function of the exponent. A direct
* multiplication by the inverse of the mantissa (NRFAC[0..7]
* found in table 4.5) gives the 3 bit coded version xMc[0..12]
* of the RPE samples.
@@ -324,7 +324,7 @@ static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
*/
assert( exp <= 4096 && exp >= -4096);
- assert( mant >= 0 && mant <= 7 );
+ assert( mant >= 0 && mant <= 7 );
temp1 = 6 - exp; /* normalization by the exponent */
temp2 = gsm_NRFAC[ mant ]; /* inverse mantissa */
@@ -354,7 +354,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
word mant,
word exp,
register word * xMp) /* [0..12] OUT */
-/*
+/*
* This part is for decoding the RPE sequence of coded xMc[0..12]
* samples to obtain the xMp[0..12] array. Table 4.6 is used to get
* the mantissa of xmaxc (FAC[0..7]).
@@ -363,7 +363,7 @@ static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
int i;
word temp, temp1, temp2, temp3;
- assert( mant >= 0 && mant <= 7 );
+ assert( mant >= 0 && mant <= 7 );
temp1 = gsm_FAC[ mant ]; /* see 4.2-15 for mant */
temp2 = gsm_sub( 6, exp ); /* see 4.2-15 for exp */
@@ -440,7 +440,7 @@ void Gsm_Update_of_reconstructed_short_time_residual_signal P3((dpp, ep, dp),
{
int k;
- for (k = 0; k <= 79; k++)
+ for (k = 0; k <= 79; k++)
dp[ -120 + k ] = dp[ -80 + k ];
for (k = 0; k <= 39; k++)
diff --git a/codecs/gsm/src/short_term.c b/codecs/gsm/src/short_term.c
index 43c592c04..d22d276ba 100644
--- a/codecs/gsm/src/short_term.c
+++ b/codecs/gsm/src/short_term.c
@@ -55,21 +55,21 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
*/
#undef STEP
-#define STEP( B, MIC, INVA ) \
+#define STEP( B_TIMES_TWO, MIC, INVA ) \
temp1 = GSM_ADD( *LARc++, MIC ) << 10; \
- temp1 = GSM_SUB( temp1, B << 1 ); \
+ temp1 = GSM_SUB( temp1, B_TIMES_TWO ); \
temp1 = (word)GSM_MULT_R( INVA, temp1 ); \
*LARpp++ = GSM_ADD( temp1, temp1 );
STEP( 0, -32, 13107 );
STEP( 0, -32, 13107 );
- STEP( 2048, -16, 13107 );
- STEP( -2560, -16, 13107 );
+ STEP( 4096, -16, 13107 );
+ STEP( -5120, -16, 13107 );
- STEP( 94, -8, 19223 );
- STEP( -1792, -8, 17476 );
- STEP( -341, -4, 31454 );
- STEP( -1144, -4, 29708 );
+ STEP( 188, -8, 19223 );
+ STEP( -3584, -8, 17476 );
+ STEP( -682, -4, 31454 );
+ STEP( -2288, -4, 29708 );
/* NOTE: the addition of *MIC is used to restore
* the sign of *LARc.
@@ -77,7 +77,7 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
}
/* 4.2.9 */
-/* Computation of the quantized reflection coefficients
+/* Computation of the quantized reflection coefficients
*/
/* 4.2.9.1 Interpolation of the LARpp[1..8] to get the LARp[1..8]
@@ -401,7 +401,7 @@ void Gsm_Short_Term_Analysis_Filter P3((S,LARc,s),
Coefficients_40_159( LARpp_j, LARp);
LARp_to_rp( LARp );
FILTER( S->u, LARp, 120, s + 40);
-
+
}
void Gsm_Short_Term_Synthesis_Filter P4((S, LARcr, wt, s),
diff --git a/codecs/gsm/src/table.c b/codecs/gsm/src/table.c
index 16a04118c..d8366931e 100644
--- a/codecs/gsm/src/table.c
+++ b/codecs/gsm/src/table.c
@@ -51,7 +51,7 @@ word gsm_QLB[4] = { 3277, 11469, 21299, 32767 };
word gsm_H[11] = {-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 };
-/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax
+/* Table 4.5 Normalized inverse mantissa used to compute xM/xmax
*/
/* i 0 1 2 3 4 5 6 7 */
word gsm_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 };
diff --git a/codecs/ilbc/FrameClassify.c b/codecs/ilbc/FrameClassify.c
index 80d72d917..f4e73ccf2 100644
--- a/codecs/ilbc/FrameClassify.c
+++ b/codecs/ilbc/FrameClassify.c
@@ -111,4 +111,3 @@
return max_ssqEn_n;
}
-
diff --git a/codecs/ilbc/FrameClassify.h b/codecs/ilbc/FrameClassify.h
index 018ddbe5d..6997a0d32 100644
--- a/codecs/ilbc/FrameClassify.h
+++ b/codecs/ilbc/FrameClassify.h
@@ -24,4 +24,3 @@
#endif
-
diff --git a/codecs/ilbc/LPCdecode.c b/codecs/ilbc/LPCdecode.c
index 81bab9048..a0d77ff24 100644
--- a/codecs/ilbc/LPCdecode.c
+++ b/codecs/ilbc/LPCdecode.c
@@ -150,9 +150,3 @@
length*sizeof(float));
}
-
-
-
-
-
-
diff --git a/codecs/ilbc/LPCdecode.h b/codecs/ilbc/LPCdecode.h
index abe1d7b3b..fc23ab7ab 100644
--- a/codecs/ilbc/LPCdecode.h
+++ b/codecs/ilbc/LPCdecode.h
@@ -38,15 +38,3 @@
);
#endif
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/LPCencode.c b/codecs/ilbc/LPCencode.c
index 09c690958..7ef6204e0 100644
--- a/codecs/ilbc/LPCencode.c
+++ b/codecs/ilbc/LPCencode.c
@@ -236,4 +236,3 @@
lsf, lsfdeq, iLBCenc_inst->lsfold,
iLBCenc_inst->lsfdeqold, LPC_FILTERORDER, iLBCenc_inst);
}
-
diff --git a/codecs/ilbc/LPCencode.h b/codecs/ilbc/LPCencode.h
index 39a9b0403..c9cdfd471 100644
--- a/codecs/ilbc/LPCencode.h
+++ b/codecs/ilbc/LPCencode.h
@@ -25,4 +25,3 @@
);
#endif
-
diff --git a/codecs/ilbc/StateConstructW.c b/codecs/ilbc/StateConstructW.c
index 1d3e65fa6..9fd45251d 100644
--- a/codecs/ilbc/StateConstructW.c
+++ b/codecs/ilbc/StateConstructW.c
@@ -72,15 +72,3 @@
out[k] = fout[len-1-k]+fout[2*len-1-k];
}
}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/StateConstructW.h b/codecs/ilbc/StateConstructW.h
index 08f93d281..19ec6cf86 100644
--- a/codecs/ilbc/StateConstructW.h
+++ b/codecs/ilbc/StateConstructW.h
@@ -28,4 +28,3 @@
);
#endif
-
diff --git a/codecs/ilbc/StateSearchW.c b/codecs/ilbc/StateSearchW.c
index 1eeee936c..7320dded9 100644
--- a/codecs/ilbc/StateSearchW.c
+++ b/codecs/ilbc/StateSearchW.c
@@ -198,14 +198,3 @@
AbsQuantW(iLBCenc_inst, fout,syntDenum,
weightDenum,idxVec, len, state_first);
}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/StateSearchW.h b/codecs/ilbc/StateSearchW.h
index 9036daa89..730e03960 100644
--- a/codecs/ilbc/StateSearchW.h
+++ b/codecs/ilbc/StateSearchW.h
@@ -42,11 +42,3 @@
#endif
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/anaFilter.c b/codecs/ilbc/anaFilter.c
index c161f98a5..3ac2127a1 100644
--- a/codecs/ilbc/anaFilter.c
+++ b/codecs/ilbc/anaFilter.c
@@ -69,4 +69,3 @@
memcpy(mem, &In[len-LPC_FILTERORDER],
LPC_FILTERORDER*sizeof(float));
}
-
diff --git a/codecs/ilbc/anaFilter.h b/codecs/ilbc/anaFilter.h
index 91367f95e..df741bfb8 100644
--- a/codecs/ilbc/anaFilter.h
+++ b/codecs/ilbc/anaFilter.h
@@ -27,4 +27,3 @@
);
#endif
-
diff --git a/codecs/ilbc/constants.c b/codecs/ilbc/constants.c
index d43dac4d4..bedfc3971 100644
--- a/codecs/ilbc/constants.c
+++ b/codecs/ilbc/constants.c
@@ -767,4 +767,3 @@
(float)1.786499, (float)2.041748, (float)2.290405, (float)2.650757,
(float)1.938232, (float)2.264404, (float)2.529053, (float)2.796143
};
-
diff --git a/codecs/ilbc/constants.h b/codecs/ilbc/constants.h
index 3487d529d..da84a9d47 100644
--- a/codecs/ilbc/constants.h
+++ b/codecs/ilbc/constants.h
@@ -77,4 +77,3 @@
#endif
-
diff --git a/codecs/ilbc/createCB.c b/codecs/ilbc/createCB.c
index aefacf200..31d6eab19 100644
--- a/codecs/ilbc/createCB.c
+++ b/codecs/ilbc/createCB.c
@@ -228,4 +228,3 @@
}
-
diff --git a/codecs/ilbc/createCB.h b/codecs/ilbc/createCB.h
index eda547c66..6689cc27d 100644
--- a/codecs/ilbc/createCB.h
+++ b/codecs/ilbc/createCB.h
@@ -55,4 +55,3 @@
);
#endif
-
diff --git a/codecs/ilbc/doCPLC.c b/codecs/ilbc/doCPLC.c
index 9fa4584fe..c655c6df9 100644
--- a/codecs/ilbc/doCPLC.c
+++ b/codecs/ilbc/doCPLC.c
@@ -267,4 +267,3 @@
memcpy(iLBCdec_inst->prevResidual, PLCresidual,
iLBCdec_inst->blockl*sizeof(float));
}
-
diff --git a/codecs/ilbc/doCPLC.h b/codecs/ilbc/doCPLC.h
index 2bda7a144..9bbb519ee 100644
--- a/codecs/ilbc/doCPLC.h
+++ b/codecs/ilbc/doCPLC.h
@@ -26,4 +26,3 @@
);
#endif
-
diff --git a/codecs/ilbc/enhancer.c b/codecs/ilbc/enhancer.c
index 1770207dd..681ec2a63 100644
--- a/codecs/ilbc/enhancer.c
+++ b/codecs/ilbc/enhancer.c
@@ -698,4 +698,3 @@
return (lag*2);
}
-
diff --git a/codecs/ilbc/enhancer.h b/codecs/ilbc/enhancer.h
index 8a081fb1b..80a494e09 100644
--- a/codecs/ilbc/enhancer.h
+++ b/codecs/ilbc/enhancer.h
@@ -33,4 +33,3 @@
);
#endif
-
diff --git a/codecs/ilbc/extract-cfile.awk b/codecs/ilbc/extract-cfile.awk
index e4b07bc08..54fd2bbf7 100644
--- a/codecs/ilbc/extract-cfile.awk
+++ b/codecs/ilbc/extract-cfile.awk
@@ -5,7 +5,7 @@ BEGIN { srcname = "nothing"; }
srcname = $2;
printf("creating source file %s\n", srcname);
}else if (srcname != "nothing") {
- if (/Andersen,* *et* *al\./)
+ if (/Andersen,* *et* *al\./)
printf("skipping %s\n", $0);
else if (/ /)
printf("skipping2 %s\n", $0);
diff --git a/codecs/ilbc/filter.c b/codecs/ilbc/filter.c
index 6565c2bee..322a9612f 100644
--- a/codecs/ilbc/filter.c
+++ b/codecs/ilbc/filter.c
@@ -172,4 +172,3 @@
*Out_ptr++ = o;
}
}
-
diff --git a/codecs/ilbc/filter.h b/codecs/ilbc/filter.h
index 4c512cd93..9c13ec66b 100644
--- a/codecs/ilbc/filter.h
+++ b/codecs/ilbc/filter.h
@@ -77,4 +77,3 @@
);
#endif
-
diff --git a/codecs/ilbc/gainquant.c b/codecs/ilbc/gainquant.c
index 0e74ff827..7b2052f6c 100644
--- a/codecs/ilbc/gainquant.c
+++ b/codecs/ilbc/gainquant.c
@@ -108,9 +108,3 @@
return 0.0;
}
-
-
-
-
-
-
diff --git a/codecs/ilbc/gainquant.h b/codecs/ilbc/gainquant.h
index 0d024246d..543e7e324 100644
--- a/codecs/ilbc/gainquant.h
+++ b/codecs/ilbc/gainquant.h
@@ -27,4 +27,3 @@
);
#endif
-
diff --git a/codecs/ilbc/getCBvec.c b/codecs/ilbc/getCBvec.c
index 4f2d29141..c0faf5f91 100644
--- a/codecs/ilbc/getCBvec.c
+++ b/codecs/ilbc/getCBvec.c
@@ -190,4 +190,3 @@
}
}
}
-
diff --git a/codecs/ilbc/getCBvec.h b/codecs/ilbc/getCBvec.h
index 0080907c0..6ac63d743 100644
--- a/codecs/ilbc/getCBvec.h
+++ b/codecs/ilbc/getCBvec.h
@@ -22,4 +22,3 @@
);
#endif
-
diff --git a/codecs/ilbc/helpfun.c b/codecs/ilbc/helpfun.c
index b79ac4f39..15189c3a1 100644
--- a/codecs/ilbc/helpfun.c
+++ b/codecs/ilbc/helpfun.c
@@ -321,4 +321,3 @@
return change;
}
-
diff --git a/codecs/ilbc/helpfun.h b/codecs/ilbc/helpfun.h
index 931ca68a6..21ff9c023 100644
--- a/codecs/ilbc/helpfun.h
+++ b/codecs/ilbc/helpfun.h
@@ -103,4 +103,3 @@
);
#endif
-
diff --git a/codecs/ilbc/hpInput.c b/codecs/ilbc/hpInput.c
index 7ceee0964..93986d653 100644
--- a/codecs/ilbc/hpInput.c
+++ b/codecs/ilbc/hpInput.c
@@ -62,4 +62,3 @@
}
}
-
diff --git a/codecs/ilbc/hpInput.h b/codecs/ilbc/hpInput.h
index 3b020d11d..70fa35392 100644
--- a/codecs/ilbc/hpInput.h
+++ b/codecs/ilbc/hpInput.h
@@ -21,4 +21,3 @@
);
#endif
-
diff --git a/codecs/ilbc/hpOutput.c b/codecs/ilbc/hpOutput.c
index 756160a65..4d2128ee0 100644
--- a/codecs/ilbc/hpOutput.c
+++ b/codecs/ilbc/hpOutput.c
@@ -58,4 +58,3 @@
po++;
}
}
-
diff --git a/codecs/ilbc/hpOutput.h b/codecs/ilbc/hpOutput.h
index b213a1934..b192e3696 100644
--- a/codecs/ilbc/hpOutput.h
+++ b/codecs/ilbc/hpOutput.h
@@ -21,4 +21,3 @@
);
#endif
-
diff --git a/codecs/ilbc/iCBConstruct.c b/codecs/ilbc/iCBConstruct.c
index ee9a73ca5..4d4330ff7 100644
--- a/codecs/ilbc/iCBConstruct.c
+++ b/codecs/ilbc/iCBConstruct.c
@@ -109,4 +109,3 @@
}
}
}
-
diff --git a/codecs/ilbc/iCBConstruct.h b/codecs/ilbc/iCBConstruct.h
index 143501ed6..8ff82cb61 100644
--- a/codecs/ilbc/iCBConstruct.h
+++ b/codecs/ilbc/iCBConstruct.h
@@ -37,4 +37,3 @@
);
#endif
-
diff --git a/codecs/ilbc/iCBSearch.c b/codecs/ilbc/iCBSearch.c
index 78d67df17..85c9ceca2 100644
--- a/codecs/ilbc/iCBSearch.c
+++ b/codecs/ilbc/iCBSearch.c
@@ -501,12 +501,3 @@
}
gain_index[0]=j;
}
-
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/iCBSearch.h b/codecs/ilbc/iCBSearch.h
index a61db1540..b8bdf68b0 100644
--- a/codecs/ilbc/iCBSearch.h
+++ b/codecs/ilbc/iCBSearch.h
@@ -34,4 +34,3 @@
);
#endif
-
diff --git a/codecs/ilbc/iLBC_decode.c b/codecs/ilbc/iLBC_decode.c
index e7bda1164..b607f41d0 100644
--- a/codecs/ilbc/iLBC_decode.c
+++ b/codecs/ilbc/iLBC_decode.c
@@ -648,4 +648,3 @@
iLBCdec_inst->prev_enh_pl=1;
}
}
-
diff --git a/codecs/ilbc/iLBC_decode.h b/codecs/ilbc/iLBC_decode.h
index 5f4384dcd..7af2fd76f 100644
--- a/codecs/ilbc/iLBC_decode.h
+++ b/codecs/ilbc/iLBC_decode.h
@@ -39,4 +39,3 @@
);
#endif
-
diff --git a/codecs/ilbc/iLBC_define.h b/codecs/ilbc/iLBC_define.h
index 480c834b9..09b120e98 100644
--- a/codecs/ilbc/iLBC_define.h
+++ b/codecs/ilbc/iLBC_define.h
@@ -214,4 +214,3 @@
} iLBC_Dec_Inst_t;
#endif
-
diff --git a/codecs/ilbc/iLBC_encode.c b/codecs/ilbc/iLBC_encode.c
index 4c2e6f714..ff3205d0b 100644
--- a/codecs/ilbc/iLBC_encode.c
+++ b/codecs/ilbc/iLBC_encode.c
@@ -540,4 +540,3 @@
will treat it as a lost frame) */
dopack( &pbytes, 0, 1, &pos);
}
-
diff --git a/codecs/ilbc/iLBC_encode.h b/codecs/ilbc/iLBC_encode.h
index a3ab55f9d..2c2cd3fea 100644
--- a/codecs/ilbc/iLBC_encode.h
+++ b/codecs/ilbc/iLBC_encode.h
@@ -31,9 +31,3 @@
);
#endif
-
-
-
-
-
-
diff --git a/codecs/ilbc/iLBC_test.c b/codecs/ilbc/iLBC_test.c
index 92d6c0ddc..6ca7afa7e 100644
--- a/codecs/ilbc/iLBC_test.c
+++ b/codecs/ilbc/iLBC_test.c
@@ -311,4 +311,3 @@
}
return(0);
}
-
diff --git a/codecs/ilbc/lsf.c b/codecs/ilbc/lsf.c
index b4fe0eda3..861e4f93b 100644
--- a/codecs/ilbc/lsf.c
+++ b/codecs/ilbc/lsf.c
@@ -274,10 +274,3 @@
a_coef[0] = 1.0;
}
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/lsf.h b/codecs/ilbc/lsf.h
index caff77ec0..27d8dfb4c 100644
--- a/codecs/ilbc/lsf.h
+++ b/codecs/ilbc/lsf.h
@@ -24,4 +24,3 @@
);
#endif
-
diff --git a/codecs/ilbc/packing.c b/codecs/ilbc/packing.c
index b7496a48e..10f1c5068 100644
--- a/codecs/ilbc/packing.c
+++ b/codecs/ilbc/packing.c
@@ -179,4 +179,3 @@
}
}
}
-
diff --git a/codecs/ilbc/packing.h b/codecs/ilbc/packing.h
index cbb9f82df..96d390e19 100644
--- a/codecs/ilbc/packing.h
+++ b/codecs/ilbc/packing.h
@@ -65,4 +65,3 @@
);
#endif
-
diff --git a/codecs/ilbc/rfc3951.txt b/codecs/ilbc/rfc3951.txt
index d4fba08e4..320651b7b 100644
--- a/codecs/ilbc/rfc3951.txt
+++ b/codecs/ilbc/rfc3951.txt
@@ -56,7 +56,7 @@ Abstract
Andersen, et al. Experimental [Page 1]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -112,7 +112,7 @@ Table of Contents
Andersen, et al. Experimental [Page 2]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -168,7 +168,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 3]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -224,7 +224,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 4]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -280,7 +280,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 5]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -336,7 +336,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 6]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -392,7 +392,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 7]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -448,7 +448,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 8]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -504,7 +504,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 9]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -560,7 +560,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 10]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -616,7 +616,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 11]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -672,7 +672,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 12]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -728,7 +728,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 13]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -784,7 +784,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 14]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -840,7 +840,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 15]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -896,7 +896,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 16]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -952,7 +952,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 17]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1008,7 +1008,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 18]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1064,7 +1064,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 19]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1120,7 +1120,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 20]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1176,7 +1176,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 21]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1232,7 +1232,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 22]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1288,7 +1288,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 23]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1344,7 +1344,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 24]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1400,7 +1400,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 25]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1456,7 +1456,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 26]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1512,7 +1512,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 27]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1568,7 +1568,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 28]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1624,7 +1624,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 29]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1680,7 +1680,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 30]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1736,7 +1736,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 31]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1792,7 +1792,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 32]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1848,7 +1848,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 33]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1904,7 +1904,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 34]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -1960,7 +1960,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 35]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2016,7 +2016,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 36]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2072,7 +2072,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 37]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2128,7 +2128,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 38]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2184,7 +2184,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 39]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2240,7 +2240,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 40]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2296,7 +2296,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 41]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2352,7 +2352,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 42]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2408,7 +2408,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 43]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2464,7 +2464,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 44]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2520,7 +2520,7 @@ APPENDIX A. Reference Implementation
Andersen, et al. Experimental [Page 45]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2576,7 +2576,7 @@ A.1. iLBC_test.c
Andersen, et al. Experimental [Page 46]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2632,7 +2632,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 47]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2688,7 +2688,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 48]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2744,7 +2744,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 49]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2800,7 +2800,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 50]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2856,7 +2856,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 51]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2912,7 +2912,7 @@ A.2. iLBC_encode.h
Andersen, et al. Experimental [Page 52]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -2968,7 +2968,7 @@ A.3. iLBC_encode.c
Andersen, et al. Experimental [Page 53]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3024,7 +3024,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 54]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3080,7 +3080,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 55]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3136,7 +3136,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 56]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3192,7 +3192,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 57]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3248,7 +3248,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 58]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3304,7 +3304,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 59]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3360,7 +3360,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 60]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3416,7 +3416,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 61]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3472,7 +3472,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 62]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3528,7 +3528,7 @@ A.4. iLBC_decode.h
Andersen, et al. Experimental [Page 63]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3584,7 +3584,7 @@ A.5. iLBC_decode.c
Andersen, et al. Experimental [Page 64]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3640,7 +3640,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 65]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3696,7 +3696,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 66]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3752,7 +3752,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 67]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3808,7 +3808,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 68]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3864,7 +3864,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 69]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3920,7 +3920,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 70]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -3976,7 +3976,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 71]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4032,7 +4032,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 72]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4088,7 +4088,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 73]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4144,7 +4144,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 74]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4200,7 +4200,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 75]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4256,7 +4256,7 @@ A.6. iLBC_define.h
Andersen, et al. Experimental [Page 76]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4312,7 +4312,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 77]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4368,7 +4368,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 78]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4424,7 +4424,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 79]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4480,7 +4480,7 @@ A.7. constants.h
Andersen, et al. Experimental [Page 80]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4536,7 +4536,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 81]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4592,7 +4592,7 @@ A.8. constants.c
Andersen, et al. Experimental [Page 82]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4648,7 +4648,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 83]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4704,7 +4704,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 84]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4760,7 +4760,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 85]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4816,7 +4816,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 86]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4872,7 +4872,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 87]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4928,7 +4928,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 88]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -4984,7 +4984,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 89]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5040,7 +5040,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 90]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5096,7 +5096,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 91]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5152,7 +5152,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 92]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5208,7 +5208,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 93]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5264,7 +5264,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 94]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5320,7 +5320,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 95]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5376,7 +5376,7 @@ A.9. anaFilter.h
Andersen, et al. Experimental [Page 96]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5432,7 +5432,7 @@ A.10. anaFilter.c
Andersen, et al. Experimental [Page 97]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5488,7 +5488,7 @@ A.11. createCB.h
Andersen, et al. Experimental [Page 98]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5544,7 +5544,7 @@ A.12. createCB.c
Andersen, et al. Experimental [Page 99]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5600,7 +5600,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 100]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5656,7 +5656,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 101]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5712,7 +5712,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 102]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5768,7 +5768,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 103]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5824,7 +5824,7 @@ A.14. doCPLC.c
Andersen, et al. Experimental [Page 104]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5880,7 +5880,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 105]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5936,7 +5936,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 106]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -5992,7 +5992,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 107]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6048,7 +6048,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 108]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6104,7 +6104,7 @@ A.15. enhancer.h
Andersen, et al. Experimental [Page 109]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6160,7 +6160,7 @@ A.16. enhancer.c
Andersen, et al. Experimental [Page 110]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6216,7 +6216,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 111]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6272,7 +6272,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 112]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6328,7 +6328,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 113]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6384,7 +6384,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 114]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6440,7 +6440,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 115]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6496,7 +6496,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 116]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6552,7 +6552,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 117]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6608,7 +6608,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 118]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6664,7 +6664,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 119]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6720,7 +6720,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 120]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6776,7 +6776,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 121]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6832,7 +6832,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 122]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6888,7 +6888,7 @@ A.17. filter.h
Andersen, et al. Experimental [Page 123]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -6944,7 +6944,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 124]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7000,7 +7000,7 @@ A.18. filter.c
Andersen, et al. Experimental [Page 125]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7056,7 +7056,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 126]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7112,7 +7112,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 127]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7168,7 +7168,7 @@ A.19. FrameClassify.h
Andersen, et al. Experimental [Page 128]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7224,7 +7224,7 @@ A.20. FrameClassify.c
Andersen, et al. Experimental [Page 129]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7280,7 +7280,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 130]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7336,7 +7336,7 @@ A.22. gainquant.c
Andersen, et al. Experimental [Page 131]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7392,7 +7392,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 132]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7448,7 +7448,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 133]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7504,7 +7504,7 @@ A.24. getCBvec.c
Andersen, et al. Experimental [Page 134]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7560,7 +7560,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 135]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7616,7 +7616,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 136]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7672,7 +7672,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 137]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7728,7 +7728,7 @@ A.25. helpfun.h
Andersen, et al. Experimental [Page 138]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7784,7 +7784,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 139]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7840,7 +7840,7 @@ A.26. helpfun.c
Andersen, et al. Experimental [Page 140]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7896,7 +7896,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 141]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -7952,7 +7952,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 142]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8008,7 +8008,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 143]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8064,7 +8064,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 144]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8120,7 +8120,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 145]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8176,7 +8176,7 @@ A.28. hpInput.c
Andersen, et al. Experimental [Page 146]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8232,7 +8232,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 147]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8288,7 +8288,7 @@ A.30. hpOutput.c
Andersen, et al. Experimental [Page 148]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8344,7 +8344,7 @@ A.31. iCBConstruct.h
Andersen, et al. Experimental [Page 149]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8400,7 +8400,7 @@ A.32. iCBConstruct.c
Andersen, et al. Experimental [Page 150]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8456,7 +8456,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 151]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8512,7 +8512,7 @@ A.33. iCBSearch.h
Andersen, et al. Experimental [Page 152]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8568,7 +8568,7 @@ A.34. iCBSearch.c
Andersen, et al. Experimental [Page 153]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8624,7 +8624,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 154]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8680,7 +8680,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 155]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8736,7 +8736,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 156]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8792,7 +8792,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 157]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8848,7 +8848,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 158]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8904,7 +8904,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 159]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -8960,7 +8960,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 160]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9016,7 +9016,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 161]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9072,7 +9072,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 162]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9128,7 +9128,7 @@ A.35. LPCdecode.h
Andersen, et al. Experimental [Page 163]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9184,7 +9184,7 @@ A.36. LPCdecode.c
Andersen, et al. Experimental [Page 164]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9240,7 +9240,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 165]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9296,7 +9296,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 166]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9352,7 +9352,7 @@ A.38. LPCencode.c
Andersen, et al. Experimental [Page 167]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9408,7 +9408,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 168]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9464,7 +9464,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 169]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9520,7 +9520,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 170]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9576,7 +9576,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 171]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9632,7 +9632,7 @@ A.40. lsf.c
Andersen, et al. Experimental [Page 172]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9688,7 +9688,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 173]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9744,7 +9744,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 174]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9800,7 +9800,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 175]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9856,7 +9856,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 176]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9912,7 +9912,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 177]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -9968,7 +9968,7 @@ A.41. packing.h
Andersen, et al. Experimental [Page 178]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10024,7 +10024,7 @@ A.42. packing.c
Andersen, et al. Experimental [Page 179]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10080,7 +10080,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 180]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10136,7 +10136,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 181]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10192,7 +10192,7 @@ A.43. StateConstructW.h
Andersen, et al. Experimental [Page 182]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10248,7 +10248,7 @@ A.44. StateConstructW.c
Andersen, et al. Experimental [Page 183]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10304,7 +10304,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 184]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10360,7 +10360,7 @@ A.45. StateSearchW.h
Andersen, et al. Experimental [Page 185]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10416,7 +10416,7 @@ A.46. StateSearchW.c
Andersen, et al. Experimental [Page 186]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10472,7 +10472,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 187]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10528,7 +10528,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 188]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10584,7 +10584,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 189]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10640,7 +10640,7 @@ A.48. syntFilter.c
Andersen, et al. Experimental [Page 190]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10696,7 +10696,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 191]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10752,7 +10752,7 @@ Authors' Addresses
Andersen, et al. Experimental [Page 192]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10808,7 +10808,7 @@ RFC 3951 Internet Low Bit Rate Codec December 2004
Andersen, et al. Experimental [Page 193]
-
+
RFC 3951 Internet Low Bit Rate Codec December 2004
@@ -10864,4 +10864,3 @@ Acknowledgement
Andersen, et al. Experimental [Page 194]
-
diff --git a/codecs/ilbc/syntFilter.c b/codecs/ilbc/syntFilter.c
index 190eb009d..db5bb6673 100644
--- a/codecs/ilbc/syntFilter.c
+++ b/codecs/ilbc/syntFilter.c
@@ -64,17 +64,3 @@
memcpy(mem, &Out[len-LPC_FILTERORDER],
LPC_FILTERORDER*sizeof(float));
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/codecs/ilbc/syntFilter.h b/codecs/ilbc/syntFilter.h
index 8865b8917..586ab2bd0 100644
--- a/codecs/ilbc/syntFilter.h
+++ b/codecs/ilbc/syntFilter.h
@@ -21,4 +21,3 @@
);
#endif
-
diff --git a/codecs/log2comp.h b/codecs/log2comp.h
index 6dc59c307..aa43103cb 100644
--- a/codecs/log2comp.h
+++ b/codecs/log2comp.h
@@ -1,6 +1,6 @@
-/*! \file
+/*! \file
* \brief log2comp.h - various base 2 log computation versions
- *
+ *
* Asterisk -- An open source telephony toolkit.
*
* \author Alex Volkov <codepro@usa.net>
@@ -53,8 +53,8 @@ static inline int ilog2(int val)
static inline int ilog2(int val)
{
int a;
- __asm__ ("cntlzw %0,%1"
- : "=r" (a)
+ __asm__ ("cntlzw %0,%1"
+ : "=r" (a)
: "r" (val)
);
return 31-a;
diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile
index bdf1a3ad7..959bcd36e 100644
--- a/codecs/lpc10/Makefile
+++ b/codecs/lpc10/Makefile
@@ -1,25 +1,25 @@
-#
+#
# Makefile for LPC-10 speech coder library (unix)
-#
+#
# default C compiler
CC?= gcc
-#
+#
# These definitions for CFLAGS and LIB_TARGET_DIR are used when one
# runs make in the lpc10 directory, without environment variables that
# override them. When make is run in this directory from a makefile
# for an application that uses the LPC10 coder, there are environment
# variables set for CFLAGS and LIB_TARGET_DIR that override these
# definitions.
-#
+#
LIB_TARGET_DIR = .
-#
+#
# -I$(LIB_TARGET_DIR) option needed so that #include "machine.h"
# directives can find the machine.h file.
-#
+#
CFLAGS+= -fPIC -Wno-comment
diff --git a/codecs/lpc10/analys.c b/codecs/lpc10/analys.c
index 50e95703d..5ea0a2d39 100644
--- a/codecs/lpc10/analys.c
+++ b/codecs/lpc10/analys.c
@@ -203,7 +203,7 @@ static integer c__1 = 1;
/* This entry has no local state. It accesses a "constant" array */
/* declared in ANALYS. */
-/* Subroutine */ int analys_(real *speech, integer *voice, integer
+/* Subroutine */ int analys_(real *speech, integer *voice, integer
*pitch, real *rms, real *rc, struct lpc10_encoder_state *st)
{
/* Initialized data */
@@ -243,8 +243,8 @@ static integer c__1 = 1;
extern int dcbias_(integer *, real *, real *);
integer ipitch;
integer *obound;
- extern /* Subroutine */ int preemp_(real *, real *, integer *, real *,
- real *), voicin_(integer *, real *, real *, integer *, integer *,
+ extern /* Subroutine */ int preemp_(real *, real *, integer *, real *,
+ real *), voicin_(integer *, real *, real *, integer *, integer *,
real *, real *, integer *, real *, integer *, integer *, integer *,
struct lpc10_encoder_state *);
integer *voibuf;
@@ -252,10 +252,10 @@ static integer c__1 = 1;
real *rmsbuf;
extern /* Subroutine */ int lpfilt_(real *, real *, integer *, integer *),
ivfilt_(real *, real *, integer *, integer *, real *), energy_(
- integer *, real *, real *), invert_(integer *, real *, real *,
+ integer *, real *, real *), invert_(integer *, real *, real *,
real *);
integer minptr, maxptr;
- extern /* Subroutine */ int dyptrk_(real *, integer *, integer *, integer
+ extern /* Subroutine */ int dyptrk_(real *, integer *, integer *, integer
*, integer *, integer *, struct lpc10_encoder_state *);
real phi[100] /* was [10][10] */, psi[10];
@@ -355,13 +355,13 @@ static integer c__1 = 1;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -371,35 +371,35 @@ static integer c__1 = 1;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -426,7 +426,7 @@ static integer c__1 = 1;
/* The tables TAU and BUFLIM, and the variable PRECOEF, are not */
/* Fortran PARAMETER's, but they are initialized with DATA */
/* statements, and never modified. Thus, they need not have SAVE */
-/* statements for them to keep their values from one invocation to
+/* statements for them to keep their values from one invocation to
*/
/* the next. */
/* Local variables that need not be saved */
@@ -512,13 +512,13 @@ static integer c__1 = 1;
vwin[(i__ << 1) - 1] = vwin[((i__ + 1) << 1) - 1] - contrl_1.lframe;
awin[(i__ << 1) - 2] = awin[((i__ + 1) << 1) - 2] - contrl_1.lframe;
awin[(i__ << 1) - 1] = awin[((i__ + 1) << 1) - 1] - contrl_1.lframe;
-/* EWIN(*,J) is unused for J .NE. AF, so the following shift is
+/* EWIN(*,J) is unused for J .NE. AF, so the following shift is
*/
/* unnecessary. It also causes error messages when the C versio
n */
-/* of the code created from this by f2c is run with Purify. It
+/* of the code created from this by f2c is run with Purify. It
*/
-/* correctly complains that uninitialized memory is being read.
+/* correctly complains that uninitialized memory is being read.
*/
/* EWIN(1,I) = EWIN(1,I+1) - LFRAME */
/* EWIN(2,I) = EWIN(2,I+1) - LFRAME */
@@ -533,17 +533,17 @@ n */
}
/* Copy input speech, scale to sign+12 bit integers */
/* Remove long term DC bias. */
-/* If the average value in the frame was over 1/4096 (after current
+/* If the average value in the frame was over 1/4096 (after current
*/
/* BIAS correction), then subtract that much more from samples in */
/* next frame. If the average value in the frame was under */
-/* -1/4096, add 1/4096 more to samples in next frame. In all other
+/* -1/4096, add 1/4096 more to samples in next frame. In all other
*/
/* cases, keep BIAS the same. */
temp = 0.f;
i__1 = contrl_1.lframe;
for (i__ = 1; i__ <= i__1; ++i__) {
- inbuf[720 - contrl_1.lframe + i__ - 181] = speech[i__] * 4096.f -
+ inbuf[720 - contrl_1.lframe + i__ - 181] = speech[i__] * 4096.f -
(*bias);
temp += inbuf[720 - contrl_1.lframe + i__ - 181];
}
@@ -555,7 +555,7 @@ n */
}
/* Place Voicing Window */
i__ = 721 - contrl_1.lframe;
- preemp_(&inbuf[i__ - 181], &pebuf[i__ - 181], &contrl_1.lframe, &precoef,
+ preemp_(&inbuf[i__ - 181], &pebuf[i__ - 181], &contrl_1.lframe, &precoef,
zpre);
onset_(pebuf, osbuf, osptr, &c__10, &c__181, &c__720, &contrl_1.lframe, st);
@@ -563,39 +563,39 @@ n */
/* MAXOSP = MAX( MAXOSP, OSPTR ) */
- placev_(osbuf, osptr, &c__10, &obound[2], vwin, &c__3, &contrl_1.lframe,
+ placev_(osbuf, osptr, &c__10, &obound[2], vwin, &c__3, &contrl_1.lframe,
&c__90, &c__156, &c__307, &c__462);
-/* The Pitch Extraction algorithm estimates the pitch for a frame
+/* The Pitch Extraction algorithm estimates the pitch for a frame
*/
/* of speech by locating the minimum of the average magnitude difference
*/
/* function (AMDF). The AMDF operates on low-pass, inverse filtered */
-/* speech. (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
+/* speech. (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
*/
-/* filter and the inverse filter is a 2nd-order LPC filter.) The pitch
+/* filter and the inverse filter is a 2nd-order LPC filter.) The pitch
*/
-/* estimate is later refined by dynamic programming (DYPTRK). However,
+/* estimate is later refined by dynamic programming (DYPTRK). However,
*/
/* since some of DYPTRK's parameters are a function of the voicing */
/* decisions, a voicing decision must precede the final pitch estimation.
*/
/* See subroutines LPFILT, IVFILT, and TBDM. */
/* LPFILT reads indices LBUFH-LFRAME-29 = 511 through LBUFH = 720 */
-/* of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
+/* of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
*/
/* = 720 of LPBUF. */
lpfilt_(&inbuf[228], &lpbuf[384], &c__312, &contrl_1.lframe);
-/* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
+/* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
*/
/* of LPBUF, and writes indices (PWINH-LFRAME+1) = 361 through */
/* PWINH = 540 of IVBUF. */
ivfilt_(&lpbuf[204], ivbuf, &c__312, &contrl_1.lframe, ivrc);
/* TBDM reads indices PWINL = 229 through */
-/* (PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
+/* (PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
*/
/* indices 1 through LTAU = 60 of AMDF. */
tbdm_(ivbuf, &c__156, tau, &c__60, amdf, &minptr, &maxptr, &mintau);
-/* Voicing decisions are made for each half frame of input speech.
+/* Voicing decisions are made for each half frame of input speech.
*/
/* An initial voicing classification is made for each half of the */
/* analysis frame, and the voicing decisions for the present frame */
@@ -605,9 +605,9 @@ n */
/* maximum-to-minimum ratio, the zero crossing rate, energy measures, */
/* reflection coefficients, and prediction gains. */
/* The pitch and voicing rules apply smoothing and isolated */
-/* corrections to the pitch and voicing estimates and, in the process,
+/* corrections to the pitch and voicing estimates and, in the process,
*/
-/* introduce two frames of delay into the corrected pitch estimates and
+/* introduce two frames of delay into the corrected pitch estimates and
*/
/* voicing decisions. */
for (half = 1; half <= 2; ++half) {
diff --git a/codecs/lpc10/bsynz.c b/codecs/lpc10/bsynz.c
index daf9105d6..de43b43d6 100644
--- a/codecs/lpc10/bsynz.c
+++ b/codecs/lpc10/bsynz.c
@@ -119,7 +119,7 @@ extern struct {
/* reinitialize its state for any other reason, call the ENTRY */
/* INITBSYNZ. */
-/* Subroutine */ int bsynz_(real *coef, integer *ip, integer *iv,
+/* Subroutine */ int bsynz_(real *coef, integer *ip, integer *iv,
real *sout, real *rms, real *ratio, real *g2pass,
struct lpc10_decoder_state *st)
{
@@ -245,13 +245,13 @@ extern struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -261,35 +261,35 @@ extern struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -301,11 +301,11 @@ extern struct {
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Function return value definitions */
/* Parameters/constants */
-/* KEXC is not a Fortran PARAMETER, but it is an array initialized
+/* KEXC is not a Fortran PARAMETER, but it is an array initialized
*/
/* with a DATA statement that is never modified. */
/* Local variables that need not be saved */
-/* NOISE is declared with range (1:MAXPIT+MAXORD), but only indices
+/* NOISE is declared with range (1:MAXPIT+MAXORD), but only indices
*/
/* ORDER+1 through ORDER+IP are ever used, and I think that IP */
/* .LE. MAXPIT. Why not declare it to be in the range (1:MAXPIT) */
@@ -357,7 +357,7 @@ extern struct {
/* Impulse doublet excitation for plosives */
/* (RANDOM()+32768) is in the range 0 to 2**16-1. Therefore the
*/
-/* following expression should be evaluated using integers with
+/* following expression should be evaluated using integers with
at */
/* least 32 bits (16 isn't enough), and PX should be in the rang
e */
diff --git a/codecs/lpc10/chanwr.c b/codecs/lpc10/chanwr.c
index b7a9c722e..280cd6893 100644
--- a/codecs/lpc10/chanwr.c
+++ b/codecs/lpc10/chanwr.c
@@ -129,7 +129,7 @@ Some OSS fixes and a few lpc changes to make it actually work
/* R5-1, R6-1, R7-2, R9-0, P-5, */
/* R5-2, R6-2,R10-1, R8-2, P-6, R9-1, */
/* R5-3, R6-3, R7-3, R9-2, R8-3, SYNC */
-/* Subroutine */ int chanwr_0_(int n__, integer *order, integer *ipitv,
+/* Subroutine */ int chanwr_0_(int n__, integer *order, integer *ipitv,
integer *irms, integer *irc, integer *ibits,
struct lpc10_encoder_state *st)
{
@@ -150,7 +150,7 @@ Some OSS fixes and a few lpc changes to make it actually work
/* Arguments */
/* Parameters/constants */
/* These arrays are not Fortran PARAMETER's, but they are defined */
-/* by DATA statements below, and their contents are never altered.
+/* by DATA statements below, and their contents are never altered.
*/
/* Local variables that need not be saved */
/* Local state */
@@ -220,13 +220,13 @@ L_chanrd:
return 0;
} /* chanwr_ */
-/* Subroutine */ int chanwr_(integer *order, integer *ipitv, integer *irms,
+/* Subroutine */ int chanwr_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits, struct lpc10_encoder_state *st)
{
return chanwr_0_(0, order, ipitv, irms, irc, ibits, st);
}
-/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
+/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits)
{
return chanwr_0_(1, order, ipitv, irms, irc, ibits, NULL);
diff --git a/codecs/lpc10/dcbias.c b/codecs/lpc10/dcbias.c
index d5a7d644f..2fb07cf2b 100644
--- a/codecs/lpc10/dcbias.c
+++ b/codecs/lpc10/dcbias.c
@@ -104,4 +104,3 @@ extern int dcbias_(integer *len, real *speech, real *sigout);
}
return 0;
} /* dcbias_ */
-
diff --git a/codecs/lpc10/decode.c b/codecs/lpc10/decode.c
index 08b8b9192..d58cd0874 100644
--- a/codecs/lpc10/decode.c
+++ b/codecs/lpc10/decode.c
@@ -67,7 +67,7 @@ static integer c__2 = 2;
*
* Revision 1.15 2003/09/19 01:20:22 markster
* Code cleanups (bug #66)
- *
+ *
* Revision 1.2 2003/09/19 01:20:22 markster
* Code cleanups (bug #66)
*
@@ -144,7 +144,7 @@ static integer c__2 = 2;
/* reinitialize its state for any other reason, call the ENTRY */
/* INITDECODE. */
-/* Subroutine */ int decode_(integer *ipitv, integer *irms,
+/* Subroutine */ int decode_(integer *ipitv, integer *irms,
integer *irc, integer *voice, integer *pitch, real *rms, real *rc,
struct lpc10_decoder_state *st)
{
@@ -301,13 +301,13 @@ static integer c__2 = 2;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -317,35 +317,35 @@ static integer c__2 = 2;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -379,9 +379,9 @@ static integer c__2 = 2;
/* The following are used regardless of CORRP's value */
/* The following are used only if CORRP is .TRUE. */
/* I am guessing the initial values for IVP2H, IOVOIC, DRC, DPIT, */
-/* and DRMS. They should be checked to see if they are reasonable.
+/* and DRMS. They should be checked to see if they are reasonable.
*/
-/* I'm also guessing for ERATE, but I think 0 is the right initial
+/* I'm also guessing for ERATE, but I think 0 is the right initial
*/
/* value. */
/* Parameter adjustments */
@@ -474,7 +474,7 @@ static integer c__2 = 2;
if (*first) {
*first = FALSE_;
/* Assign PITCH a "default" value on the first call, since */
-/* otherwise it would be left uninitialized. The two lines
+/* otherwise it would be left uninitialized. The two lines
*/
/* below were copied from above, since it seemed like a */
/* reasonable thing to do for the first call. */
@@ -535,7 +535,7 @@ static integer c__2 = 2;
*pitch = dpit[1];
/* If bit 2 of ICORF is set then smooth RMS and RC's, */
if ((icorf & bit[1]) != 0) {
- if ((i__1 = drms[1] - drms[0], (real) abs(i__1)) >= corth[ixcor + 3]
+ if ((i__1 = drms[1] - drms[0], (real) abs(i__1)) >= corth[ixcor + 3]
&& (i__2 = drms[1] - drms[2], (real) abs(i__2)) >= corth[
ixcor + 3]) {
*irms = median_(&drms[2], &drms[1], drms);
@@ -552,7 +552,7 @@ static integer c__2 = 2;
}
/* If bit 3 of ICORF is set then smooth pitch */
if ((icorf & bit[2]) != 0) {
- if ((i__1 = dpit[1] - dpit[0], (real) abs(i__1)) >= corth[ixcor - 1]
+ if ((i__1 = dpit[1] - dpit[0], (real) abs(i__1)) >= corth[ixcor - 1]
&& (i__2 = dpit[1] - dpit[2], (real) abs(i__2)) >= corth[
ixcor - 1]) {
*pitch = median_(&dpit[2], &dpit[1], dpit);
diff --git a/codecs/lpc10/difmag.c b/codecs/lpc10/difmag.c
index ab59e8c9a..5132f96e9 100644
--- a/codecs/lpc10/difmag.c
+++ b/codecs/lpc10/difmag.c
@@ -87,7 +87,7 @@ extern int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau, in
/* This subroutine has no local state. */
-/* Subroutine */ int difmag_(real *speech, integer *lpita, integer *tau,
+/* Subroutine */ int difmag_(real *speech, integer *lpita, integer *tau,
integer *ltau, integer *maxlag, real *amdf, integer *minptr, integer *
maxptr)
{
@@ -130,4 +130,3 @@ extern int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau, in
}
return 0;
} /* difmag_ */
-
diff --git a/codecs/lpc10/dyptrk.c b/codecs/lpc10/dyptrk.c
index 45fb5eb08..ca195b601 100644
--- a/codecs/lpc10/dyptrk.c
+++ b/codecs/lpc10/dyptrk.c
@@ -200,13 +200,13 @@ extern struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -216,35 +216,35 @@ extern struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -260,7 +260,7 @@ extern struct {
/* removed. */
/* Local state */
/* It would be a bit more "general" to define S(LTAU), if Fortran */
-/* allows the argument of a function to be used as the dimension of
+/* allows the argument of a function to be used as the dimension of
*/
/* a local array variable. */
/* IPOINT is always in the range 0 to DEPTH-1. */
@@ -272,16 +272,16 @@ extern struct {
/* initial values (all indices of P with second index equal to */
/* IPTR are all written before being read in this subroutine). */
-/* From examining the code carefully, it appears that all of these
+/* From examining the code carefully, it appears that all of these
*/
/* should be saved from one invocation to the next. */
/* I've run lpcsim with the "-l 6" option to see all of the */
/* debugging information that is printed out by this subroutine */
/* below, and it appears that S, P, IPOINT, and ALPHAX are all */
-/* initialized to 0 (these initial values would likely be different
+/* initialized to 0 (these initial values would likely be different
*/
-/* on different platforms, compilers, etc.). Given that the output
+/* on different platforms, compilers, etc.). Given that the output
*/
/* of the coder sounds reasonable, I'm going to initialize these */
/* variables to 0 explicitly. */
@@ -299,9 +299,9 @@ extern struct {
/* Function Body */
-/* Calculate the confidence factor ALPHA, used as a threshold slope in
+/* Calculate the confidence factor ALPHA, used as a threshold slope in
*/
-/* SEESAW. If unvoiced, set high slope so that every point in P array
+/* SEESAW. If unvoiced, set high slope so that every point in P array
*/
/* is marked as a potential pitch frequency. A scaled up version (ALPHAX
)*/
@@ -391,11 +391,11 @@ n*/
*pitch = p[*pitch + j * 60 - 61];
}
-/* The following statement subtracts one from IPOINT, mod DEPTH. I
+/* The following statement subtracts one from IPOINT, mod DEPTH. I
*/
-/* think the author chose to add DEPTH-1, instead of subtracting 1,
+/* think the author chose to add DEPTH-1, instead of subtracting 1,
*/
-/* because then it will work even if MOD doesn't work as desired on
+/* because then it will work even if MOD doesn't work as desired on
*/
/* negative arguments. */
diff --git a/codecs/lpc10/encode.c b/codecs/lpc10/encode.c
index b81799f6b..f7b47762d 100644
--- a/codecs/lpc10/encode.c
+++ b/codecs/lpc10/encode.c
@@ -213,13 +213,13 @@ static integer c__2 = 2;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -229,35 +229,35 @@ static integer c__2 = 2;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -269,7 +269,7 @@ static integer c__2 = 2;
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Parameters/constants */
/* These arrays are not Fortran PARAMETER's, but they are defined */
-/* by DATA statements below, and their contents are never altered.
+/* by DATA statements below, and their contents are never altered.
*/
/* Local variables that need not be saved */
/* Parameter adjustments */
@@ -370,4 +370,3 @@ static integer c__2 = 2;
/* 801 FORMAT(1X,'<<ENCODE OUT>>',T32,2I3,I6,I5,T50,10I8) */
return 0;
} /* encode_ */
-
diff --git a/codecs/lpc10/energy.c b/codecs/lpc10/energy.c
index eada04bef..eba35d89f 100644
--- a/codecs/lpc10/energy.c
+++ b/codecs/lpc10/energy.c
@@ -100,4 +100,3 @@ extern int energy_(integer *len, real *speech, real *rms);
*rms = (real)sqrt(*rms / *len);
return 0;
} /* energy_ */
-
diff --git a/codecs/lpc10/f2c.h b/codecs/lpc10/f2c.h
index e50d642e0..09bc75727 100644
--- a/codecs/lpc10/f2c.h
+++ b/codecs/lpc10/f2c.h
@@ -267,18 +267,18 @@ extern integer i_nint(real *x);
#endif
#ifdef P_R_O_T_O_T_Y_P_E_S
-extern int bsynz_(real *coef, integer *ip, integer *iv,
+extern int bsynz_(real *coef, integer *ip, integer *iv,
real *sout, real *rms, real *ratio, real *g2pass,
struct lpc10_decoder_state *st);
extern int chanwr_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits, struct lpc10_encoder_state *st);
extern int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits);
-extern int chanwr_0_(int n__, integer *order, integer *ipitv,
+extern int chanwr_0_(int n__, integer *order, integer *ipitv,
integer *irms, integer *irc, integer *ibits,
struct lpc10_encoder_state *st);
extern int dcbias_(integer *len, real *speech, real *sigout);
-extern int decode_(integer *ipitv, integer *irms, integer *irc,
+extern int decode_(integer *ipitv, integer *irms, integer *irc,
integer *voice, integer *pitch, real *rms,
real *rc, struct lpc10_decoder_state *st);
extern int deemp_(real *x, integer *n, struct lpc10_decoder_state *st);
diff --git a/codecs/lpc10/ham84.c b/codecs/lpc10/ham84.c
index fddd8f3c0..6fb1301cb 100644
--- a/codecs/lpc10/ham84.c
+++ b/codecs/lpc10/ham84.c
@@ -123,4 +123,3 @@ extern int ham84_(integer *input, integer *output, integer *errcnt);
}
return 0;
} /* ham84_ */
-
diff --git a/codecs/lpc10/invert.c b/codecs/lpc10/invert.c
index 03c27e20d..786e4bf97 100644
--- a/codecs/lpc10/invert.c
+++ b/codecs/lpc10/invert.c
@@ -191,4 +191,3 @@ L100:
/* END DO */
return 0;
} /* invert_ */
-
diff --git a/codecs/lpc10/irc2pc.c b/codecs/lpc10/irc2pc.c
index b96ff0d66..dc3358b42 100644
--- a/codecs/lpc10/irc2pc.c
+++ b/codecs/lpc10/irc2pc.c
@@ -148,4 +148,3 @@ extern int irc2pc_(real *rc, real *pc, integer *order, real *gprime, real *g2pas
}
return 0;
} /* irc2pc_ */
-
diff --git a/codecs/lpc10/ivfilt.c b/codecs/lpc10/ivfilt.c
index 784de2571..7a0bf6036 100644
--- a/codecs/lpc10/ivfilt.c
+++ b/codecs/lpc10/ivfilt.c
@@ -133,4 +133,3 @@ extern int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real
}
return 0;
} /* ivfilt_ */
-
diff --git a/codecs/lpc10/lpc10.h b/codecs/lpc10/lpc10.h
index a57f84f3f..82e7b2cba 100644
--- a/codecs/lpc10/lpc10.h
+++ b/codecs/lpc10/lpc10.h
@@ -87,7 +87,7 @@ struct lpc10_encoder_state {
real z21;
real z12;
real z22;
-
+
/* State used by function analys */
real inbuf[540], pebuf[540];
real lpbuf[696], ivbuf[312];
@@ -242,7 +242,7 @@ struct lpc10_decoder_state {
(indices 0 through (LPC10_BITS_IN_COMPRESSED_FRAME-1)), and the
array speech[] is written (indices 0 through
(LPC10_SAMPLES_PER_FRAME-1)).
-
+
*/
struct lpc10_encoder_state * create_lpc10_encoder_state (void);
diff --git a/codecs/lpc10/lpcdec.c b/codecs/lpc10/lpcdec.c
index dd859ffce..55f8892b6 100644
--- a/codecs/lpc10/lpcdec.c
+++ b/codecs/lpc10/lpcdec.c
@@ -114,11 +114,11 @@ static integer c__10 = 10;
struct lpc10_decoder_state *st)
{
integer irms, voice[2], pitch, ipitv;
- extern /* Subroutine */ int decode_(integer *, integer *, integer *,
+ extern /* Subroutine */ int decode_(integer *, integer *, integer *,
integer *, integer *, real *, real *, struct lpc10_decoder_state *);
real rc[10];
- extern /* Subroutine */ int chanrd_(integer *, integer *, integer *,
- integer *, integer *), synths_(integer *,
+ extern /* Subroutine */ int chanrd_(integer *, integer *, integer *,
+ integer *, integer *), synths_(integer *,
integer *, real *, real *, real *, integer *,
struct lpc10_decoder_state *);
integer irc[10], len;
@@ -220,13 +220,13 @@ static integer c__10 = 10;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -236,35 +236,35 @@ static integer c__10 = 10;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
diff --git a/codecs/lpc10/lpcenc.c b/codecs/lpc10/lpcenc.c
index 989a2defd..990e73178 100644
--- a/codecs/lpc10/lpcenc.c
+++ b/codecs/lpc10/lpcenc.c
@@ -110,10 +110,10 @@ static integer c__10 = 10;
{
integer irms, voice[2], pitch, ipitv;
real rc[10];
- extern /* Subroutine */ int encode_(integer *, integer *, real *, real *,
- integer *, integer *, integer *), chanwr_(integer *, integer *,
+ extern /* Subroutine */ int encode_(integer *, integer *, real *, real *,
+ integer *, integer *, integer *), chanwr_(integer *, integer *,
integer *, integer *, integer *, struct lpc10_encoder_state *),
- analys_(real *, integer *,
+ analys_(real *, integer *,
integer *, real *, real *, struct lpc10_encoder_state *),
prepro_(real *, integer *, struct lpc10_encoder_state *);
integer irc[10];
@@ -126,7 +126,7 @@ static integer c__10 = 10;
*
* Revision 1.14 2003/02/12 13:59:15 matteo
* mer feb 12 14:56:57 CET 2003
- *
+ *
* Revision 1.1.1.1 2003/02/12 13:59:15 matteo
* mer feb 12 14:56:57 CET 2003
*
diff --git a/codecs/lpc10/lpcini.c b/codecs/lpc10/lpcini.c
index 42c233195..7b4b1cefe 100644
--- a/codecs/lpc10/lpcini.c
+++ b/codecs/lpc10/lpcini.c
@@ -186,13 +186,13 @@ struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -202,35 +202,35 @@ struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -279,7 +279,7 @@ void init_lpc10_encoder_state(struct lpc10_encoder_state *st)
st->z21 = 0.0f;
st->z12 = 0.0f;
st->z22 = 0.0f;
-
+
/* State used by function analys */
for (i = 0; i < 540; i++) {
st->inbuf[i] = 0.0f;
diff --git a/codecs/lpc10/lpfilt.c b/codecs/lpc10/lpfilt.c
index 375528921..159b2d7d9 100644
--- a/codecs/lpc10/lpfilt.c
+++ b/codecs/lpc10/lpfilt.c
@@ -122,4 +122,3 @@ extern int lpfilt_(real *inbuf, real *lpbuf, integer *len, integer *nsamp);
}
return 0;
} /* lpfilt_ */
-
diff --git a/codecs/lpc10/median.c b/codecs/lpc10/median.c
index 383c46e89..52c4a78d0 100644
--- a/codecs/lpc10/median.c
+++ b/codecs/lpc10/median.c
@@ -86,4 +86,3 @@ integer median_(integer *d1, integer *d2, integer *d3)
}
return ret_val;
} /* median_ */
-
diff --git a/codecs/lpc10/mload.c b/codecs/lpc10/mload.c
index 1cdb0647c..e384f0d77 100644
--- a/codecs/lpc10/mload.c
+++ b/codecs/lpc10/mload.c
@@ -96,7 +96,7 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
/* This subroutine has no local state. */
-/* Subroutine */ int mload_(integer *order, integer *awins, integer *awinf,
+/* Subroutine */ int mload_(integer *order, integer *awins, integer *awinf,
real *speech, real *phi, real *psi)
{
/* System generated locals */
@@ -136,21 +136,21 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
for (r__ = 2; r__ <= i__1; ++r__) {
i__2 = r__;
for (c__ = 2; c__ <= i__2; ++c__) {
- phi[r__ + c__ * phi_dim1] = phi[r__ - 1 + (c__ - 1) * phi_dim1] -
- speech[*awinf + 1 - r__] * speech[*awinf + 1 - c__] +
+ phi[r__ + c__ * phi_dim1] = phi[r__ - 1 + (c__ - 1) * phi_dim1] -
+ speech[*awinf + 1 - r__] * speech[*awinf + 1 - c__] +
speech[start - r__] * speech[start - c__];
}
}
/* End correct to get additional elements of PSI */
i__1 = *order - 1;
for (c__ = 1; c__ <= i__1; ++c__) {
- psi[c__] = phi[c__ + 1 + phi_dim1] - speech[start - 1] * speech[start
+ psi[c__] = phi[c__ + 1 + phi_dim1] - speech[start - 1] * speech[start
- 1 - c__] + speech[*awinf] * speech[*awinf - c__];
}
/* Copy lower triangular section into upper (why bother?) */
-/* I'm commenting this out, since the upper triangular half of PHI
+/* I'm commenting this out, since the upper triangular half of PHI
*/
-/* is never used by later code, unless a sufficiently high level of
+/* is never used by later code, unless a sufficiently high level of
*/
/* tracing is turned on. */
/* DO R = 1,ORDER */
@@ -160,4 +160,3 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
/* END DO */
return 0;
} /* mload_ */
-
diff --git a/codecs/lpc10/onset.c b/codecs/lpc10/onset.c
index ddca3b477..b4469c16a 100644
--- a/codecs/lpc10/onset.c
+++ b/codecs/lpc10/onset.c
@@ -203,35 +203,35 @@ static real c_b2 = 1.f;
/* N, D Numerator and denominator of prediction filters */
/* FPC Current prediction coefs */
/* L2BUF, L2SUM1, L2SUM2 State of slope filter */
-/* The only "significant" change I've made is to change L2SUM2 out
+/* The only "significant" change I've made is to change L2SUM2 out
*/
/* of the list of local variables that need to be saved, since it */
/* didn't need to be. */
-/* L2SUM1 need not be, but avoiding saving it would require a small
+/* L2SUM1 need not be, but avoiding saving it would require a small
*/
/* change to the body of the code. See comments below for an */
-/* example of how the code could be changed to avoid saving L2SUM1.
+/* example of how the code could be changed to avoid saving L2SUM1.
*/
/* FPC and LASTI are saved from one invocation to the next, but */
-/* they are not given initial values. This is acceptable, because
+/* they are not given initial values. This is acceptable, because
*/
/* FPC will be assigned a value the first time that this function */
/* is called after D is initialized to 1, since the formula to */
/* change D will not change it to 0 in one step, and the IF (D */
-/* .NE. 0) statement will execute its THEN part, initializing FPC.
+/* .NE. 0) statement will execute its THEN part, initializing FPC.
*/
/* LASTI's value will not be used until HYST is .TRUE., and */
/* whenever HYST is changed from its initial value of .FALSE., */
/* LASTI is assigned a value. */
/* In a C version of this coder, it would be nice if all of these */
-/* saved things, in this and all other subroutines, could be stored
+/* saved things, in this and all other subroutines, could be stored
*/
-/* in a single struct lpc10_coder_state_t, initialized with a call
+/* in a single struct lpc10_coder_state_t, initialized with a call
*/
-/* to a function like lpc10_init(&lpc10_coder_state). In this way,
+/* to a function like lpc10_init(&lpc10_coder_state). In this way,
*/
-/* a program that used these functions could conveniently alternate
+/* a program that used these functions could conveniently alternate
*/
/* coding more than one distinct audio stream. */
@@ -264,7 +264,7 @@ static real c_b2 = 1.f;
}
i__1 = *sbufh;
for (i__ = *sbufh - *lframe + 1; i__ <= i__1; ++i__) {
-/* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1.
+/* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1.
*/
*n = (pebuf[i__] * pebuf[i__ - 1] + (*n) * 63.f) / 64.f;
/* Computing 2nd power */
@@ -278,11 +278,11 @@ static real c_b2 = 1.f;
}
}
/* Filter FPC */
-/* In order to allow L2SUM1 not to be saved from one invocation
+/* In order to allow L2SUM1 not to be saved from one invocation
of */
/* this subroutine to the next, one could change the sequence of
*/
-/* assignments below, up to the IF statement, to the following.
+/* assignments below, up to the IF statement, to the following.
In */
/* addition, the initial value of L2PTR2 should be changed to */
/* L2WID/2 instead of L2WID/2+1. */
diff --git a/codecs/lpc10/pitsyn.c b/codecs/lpc10/pitsyn.c
index 36f6f2a7a..e345fba10 100644
--- a/codecs/lpc10/pitsyn.c
+++ b/codecs/lpc10/pitsyn.c
@@ -129,8 +129,8 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* RATIO - Previous to present energy ratio */
/* Always assigned a value. */
-/* Subroutine */ int pitsyn_(integer *order, integer *voice,
- integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv,
+/* Subroutine */ int pitsyn_(integer *order, integer *voice,
+ integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv,
integer *ipiti, real *rmsi, real *rci, integer *nout, real *ratio,
struct lpc10_decoder_state *st)
{
@@ -201,7 +201,7 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* Frame size, Prediction order, Pitch period */
/* Local variables that need not be saved */
/* LSAMP is initialized in the IF (FIRST) THEN clause, but it is */
-/* not used the first time through, and it is given a value before
+/* not used the first time through, and it is given a value before
*/
/* use whenever FIRST is .FALSE., so it appears unnecessary to */
/* assign it a value when FIRST is .TRUE. */
@@ -214,12 +214,12 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* JSAMP - If this routine is called N times with identical values of */
/* LFRAME, then the total length of all pitch periods returned */
-/* is always N*LFRAME-JSAMP, and JSAMP is always in the range 0
+/* is always N*LFRAME-JSAMP, and JSAMP is always in the range 0
*/
/* to MAXPIT-1 (see below for why this is so). Thus JSAMP is */
/* the number of samples "left over" from the previous call to */
/* PITSYN, that haven't been "used" in a pitch period returned */
-/* from this subroutine. Every time this subroutine is called,
+/* from this subroutine. Every time this subroutine is called,
*/
/* it returns pitch periods with a total length of at most */
/* LFRAME+JSAMP. */
@@ -277,7 +277,7 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
*nout = *lframe / *pitch;
*jsamp = *lframe - *nout * *pitch;
-/* SYNTHS only calls this subroutine with PITCH in the range
+/* SYNTHS only calls this subroutine with PITCH in the range
20 */
/* to 156. LFRAME = MAXFRM = 180, so NOUT is somewhere in th
e */
@@ -361,7 +361,7 @@ e */
vflag = 1;
}
}
-/* Here is the value of most variables that are used below, depending
+/* Here is the value of most variables that are used below, depending
on */
/* the values of IVOICO, VOICE(1), and VOICE(2). VOICE(1) and VOICE(2
) */
@@ -369,11 +369,11 @@ on */
/* previous call (see notes for the IF (NOUT .NE. 0) statement near th
e */
/* end). Each of these three values is either 0 or 1. These three */
-/* values below are given as 3-bit long strings, in the order IVOICO,
+/* values below are given as 3-bit long strings, in the order IVOICO,
*/
/* VOICE(1), and VOICE(2). It appears that the code above assumes tha
t */
-/* the bit sequences 010 and 101 never occur, but I wonder whether a
+/* the bit sequences 010 and 101 never occur, but I wonder whether a
*/
/* large enough number of bit errors in the channel could cause such a
*/
@@ -390,7 +390,7 @@ t */
4, */
/* and the 45 for NL-JSAMP is actually LFRAME-3*LFRAME/4. */
-/* Note that LSAMP-JSAMP is given as the variable. This was just for
+/* Note that LSAMP-JSAMP is given as the variable. This was just for
*/
/* brevity, to avoid adding "+JSAMP" to all of the column entries. */
/* Similarly for NL-JSAMP. */
@@ -429,13 +429,13 @@ t */
/* The only possible non-0 value of SLOPE (in column 111) is */
/* (PITCH-IPITO)/FLOAT(LSAMP) */
-/* Column 101 is identical to 100. Any good properties we can prove
+/* Column 101 is identical to 100. Any good properties we can prove
*/
/* for 100 will also hold for 101. Similarly for 010 and 011. */
-/* SYNTHS calls this subroutine with PITCH restricted to the range 20
+/* SYNTHS calls this subroutine with PITCH restricted to the range 20
to */
-/* 156. IPITO is similarly restricted to this range, after the first
+/* 156. IPITO is similarly restricted to this range, after the first
*/
/* call. IP below is also restricted to this range, given the */
/* definitions of IPITO, SLOPE, UVPIT, and that I is in the range ISTA
@@ -456,7 +456,7 @@ ugh */
/* (I - MAXPIT) .LE. JUSED .LE. (I-1) */
-/* Note that the final value of I is LSAMP+1, so that
+/* Note that the final value of I is LSAMP+1, so that
after */
/* the DO loop is complete, we know: */
@@ -474,10 +474,10 @@ after */
/* The following check is no longer nece
ssary, now that */
-/* we can prove that NOUT will never go
+/* we can prove that NOUT will never go
over 16. */
-/* IF (NOUT .GT. 16) STOP 'PITSYN: too many epochs'
+/* IF (NOUT .GT. 16) STOP 'PITSYN: too many epochs'
*/
ipiti[*nout] = ip;
@@ -501,7 +501,7 @@ over 16. */
goto L100;
}
-/* I want to prove what range UVPIT must lie in after
+/* I want to prove what range UVPIT must lie in after
the */
/* assignments to it below. To do this, I must determ
ine */
@@ -521,7 +521,7 @@ at: */
/* ISTART is one more than this. */
-/* Let newLSAMP be the value assigned to LSAMP below.
+/* Let newLSAMP be the value assigned to LSAMP below.
This */
/* is 180+JSAMP. Thus (newLSAMP-oldLSAMP) is either 4
5 or */
@@ -566,7 +566,7 @@ ge. */
L100:
*jsamp = lsamp - jused;
}
-/* Given that the maximum pitch period MAXPIT .LT. LFRAME (this is
+/* Given that the maximum pitch period MAXPIT .LT. LFRAME (this is
*/
/* currently true on every call, since SYNTHS always sets */
/* LFRAME=180), NOUT will always be .GE. 1 at this point. */
diff --git a/codecs/lpc10/placea.c b/codecs/lpc10/placea.c
index dacb50e7a..7a485c418 100644
--- a/codecs/lpc10/placea.c
+++ b/codecs/lpc10/placea.c
@@ -114,7 +114,7 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a
/* This subroutine has no local state. */
/* Subroutine */ int placea_(integer *ipitch, integer *voibuf, integer *
- obound, integer *af, integer *vwin, integer *awin, integer *ewin,
+ obound, integer *af, integer *vwin, integer *awin, integer *ewin,
integer *lframe, integer *maxwin)
{
/* System generated locals */
@@ -146,13 +146,13 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a
/* Case 1: Sustained Voiced Speech */
/* If the five most recent voicing decisions are */
/* voiced, then the window is placed phase-synchronously with the */
-/* previous window, as close to the present voicing window if possible.
+/* previous window, as close to the present voicing window if possible.
*/
/* If onsets bound the voicing window, then preference is given to */
/* a phase-synchronous placement which does not overlap these onsets. */
/* Case 2: Voiced Transition */
-/* If at least one voicing decision in AF is voicied, and there are no
+/* If at least one voicing decision in AF is voicied, and there are no
*/
/* onsets, then the window is placed as in case 1. */
@@ -207,7 +207,7 @@ rd */
awin[(*af << 1) + 1] -= *ipitch;
awin[(*af << 1) + 2] -= *ipitch;
}
-/* Similarly if the placement puts the analysis window below LRANGE.
+/* Similarly if the placement puts the analysis window below LRANGE.
*/
while(awin[(*af << 1) + 1] < lrange) {
awin[(*af << 1) + 1] += *ipitch;
@@ -239,4 +239,3 @@ e*/
}
return 0;
} /* placea_ */
-
diff --git a/codecs/lpc10/placev.c b/codecs/lpc10/placev.c
index 56e72c4b8..9d1548c46 100644
--- a/codecs/lpc10/placev.c
+++ b/codecs/lpc10/placev.c
@@ -109,8 +109,8 @@ extern int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obou
/* This subroutine has no local state. */
-/* Subroutine */ int placev_(integer *osbuf, integer *osptr, integer *oslen,
- integer *obound, integer *vwin, integer *af, integer *lframe, integer
+/* Subroutine */ int placev_(integer *osbuf, integer *osptr, integer *oslen,
+ integer *obound, integer *vwin, integer *af, integer *lframe, integer
*minwin, integer *maxwin, integer *dvwinl, integer *dvwinh)
{
/* System generated locals */
@@ -146,15 +146,15 @@ extern int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obou
/* given in the LPC-10e phase 1 report. */
/* 1. If there are no onsets in this range, then the voicing window */
-/* is centered in the pitch window. If such a placement is not within
+/* is centered in the pitch window. If such a placement is not within
*/
-/* the window's placement range, then the window is placed in the left-
+/* the window's placement range, then the window is placed in the left-
*/
/* most portion of the placement range. Its length is always MAXWIN. */
/* 2. If the first onset is in 2F and there is sufficient room to place
*/
-/* the window immediately before this onset, then the window is placed
+/* the window immediately before this onset, then the window is placed
*/
/* there, and its length is set to the maximum possible under these */
/* constraints. */
@@ -177,7 +177,7 @@ ing*/
/* Note that the values of MINWIN and LFRAME must be chosen such */
/* that case 2 = false implies case 3 = true. This means that */
/* MINWIN <= LFRAME/2. If this were not the case, then a fourth case */
-/* would have to be added for when the window cannot fit either before
+/* would have to be added for when the window cannot fit either before
*/
/* or after the onset. */
@@ -185,11 +185,11 @@ ing*/
*/
/* time, due to the filter delays in computing onsets. The result is tha
t*/
-/* occasionally a voicing window will overlap that onset. The only way
+/* occasionally a voicing window will overlap that onset. The only way
*/
-/* to circumvent this problem is to add more delay in processing input
+/* to circumvent this problem is to add more delay in processing input
*/
-/* speech. In the trade-off between delay and window-placement, window
+/* speech. In the trade-off between delay and window-placement, window
*/
/* placement lost. */
/* Compute the placement range */
@@ -272,4 +272,3 @@ L120:
}
return 0;
} /* placev_ */
-
diff --git a/codecs/lpc10/preemp.c b/codecs/lpc10/preemp.c
index 645428c3c..61316dd5b 100644
--- a/codecs/lpc10/preemp.c
+++ b/codecs/lpc10/preemp.c
@@ -110,12 +110,12 @@ extern int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z
/* Could it be more efficient to apply multiple filters */
/* simultaneously, by combining them into one equivalent filter? */
-/* Are there ever cases when "factoring" one high-order filter into
+/* Are there ever cases when "factoring" one high-order filter into
*/
/* multiple smaller-order filter actually reduces the number of */
/* arithmetic operations needed to perform them? */
/* When I first read this subroutine, I didn't understand why the */
-/* variable temp was used. It seemed that the statements in the do
+/* variable temp was used. It seemed that the statements in the do
*/
/* loop could be replaced with the following: */
@@ -141,4 +141,3 @@ extern int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z
}
return 0;
} /* preemp_ */
-
diff --git a/codecs/lpc10/random.c b/codecs/lpc10/random.c
index 0f8e9b209..dc4da2a91 100644
--- a/codecs/lpc10/random.c
+++ b/codecs/lpc10/random.c
@@ -122,4 +122,3 @@ integer random_(struct lpc10_decoder_state *st)
}
return ret_val;
} /* random_ */
-
diff --git a/codecs/lpc10/rcchk.c b/codecs/lpc10/rcchk.c
index 6cb76ef7d..4cc84f381 100644
--- a/codecs/lpc10/rcchk.c
+++ b/codecs/lpc10/rcchk.c
@@ -102,7 +102,7 @@ extern int rcchk_(integer *order, real *rc1f, real *rc2f);
}
}
return 0;
-/* Note: In version embedded in other software, all calls to ERROR
+/* Note: In version embedded in other software, all calls to ERROR
*/
/* should probably be removed. */
L10:
@@ -116,4 +116,3 @@ L10:
}
return 0;
} /* rcchk_ */
-
diff --git a/codecs/lpc10/synths.c b/codecs/lpc10/synths.c
index 4c5a70fac..2a3179b91 100644
--- a/codecs/lpc10/synths.c
+++ b/codecs/lpc10/synths.c
@@ -187,8 +187,8 @@ static real c_b2 = .7f;
integer ipiti[16];
real g2pass;
real pc[10];
- extern /* Subroutine */ int pitsyn_(integer *, integer *, integer *, real
- *, real *, integer *, integer *, integer *, real *, real *,
+ extern /* Subroutine */ int pitsyn_(integer *, integer *, integer *, real
+ *, real *, integer *, integer *, integer *, real *, real *,
integer *, real *, struct lpc10_decoder_state *);
real rci[160] /* was [10][16] */;
@@ -288,13 +288,13 @@ static real c_b2 = .7f;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -304,35 +304,35 @@ static real c_b2 = .7f;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -345,21 +345,21 @@ static real c_b2 = .7f;
/* Parameters/constants */
/* Local variables that need not be saved */
/* Local state */
-/* BUF is a buffer of speech samples that would have been returned
+/* BUF is a buffer of speech samples that would have been returned
*/
/* by the older version of SYNTHS, but the newer version doesn't, */
/* so that the newer version can always return MAXFRM samples on */
/* every call. This has the effect of delaying the return of */
/* samples for one additional frame time. */
-/* Indices 1 through BUFLEN contain samples that are left over from
+/* Indices 1 through BUFLEN contain samples that are left over from
*/
/* the last call to SYNTHS. Given the way that PITSYN works, */
/* BUFLEN should always be in the range MAXFRM-MAXPIT+1 through */
/* MAXFRM, inclusive, after a call to SYNTHS is complete. */
/* On the first call to SYNTHS (or the first call after */
-/* reinitializing with the entry INITSYNTHS), BUFLEN is MAXFRM, and
+/* reinitializing with the entry INITSYNTHS), BUFLEN is MAXFRM, and
*/
/* a frame of silence is always returned. */
/* Parameter adjustments */
@@ -388,7 +388,7 @@ static real c_b2 = .7f;
r__1 = min(r__2,.99f);
rc[i__] = max(r__1,-.99f);
}
- pitsyn_(&contrl_1.order, &voice[1], pitch, rms, &rc[1], &contrl_1.lframe,
+ pitsyn_(&contrl_1.order, &voice[1], pitch, rms, &rc[1], &contrl_1.lframe,
ivuv, ipiti, rmsi, rci, &nout, &ratio, st);
if (nout > 0) {
i__1 = nout;
@@ -405,7 +405,7 @@ d of */
*buflen += ipiti[j - 1];
}
-/* Copy first MAXFRM samples from BUF to output array SPEECH
+/* Copy first MAXFRM samples from BUF to output array SPEECH
*/
/* (scaling them), and then remove them from the beginning of
*/
diff --git a/codecs/lpc10/tbdm.c b/codecs/lpc10/tbdm.c
index 2f6f3d692..4ca4d73a3 100644
--- a/codecs/lpc10/tbdm.c
+++ b/codecs/lpc10/tbdm.c
@@ -91,7 +91,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
/* This subroutine has no local state. */
-/* Subroutine */ int tbdm_(real *speech, integer *lpita, integer *tau,
+/* Subroutine */ int tbdm_(real *speech, integer *lpita, integer *tau,
integer *ltau, real *amdf, integer *minptr, integer *maxptr, integer *
mintau)
{
@@ -101,7 +101,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
/* Local variables */
real amdf2[6];
integer minp2, ltau2, maxp2, i__;
- extern /* Subroutine */ int difmag_(real *, integer *, integer *, integer
+ extern /* Subroutine */ int difmag_(real *, integer *, integer *, integer
*, integer *, real *, integer *, integer *);
integer minamd, ptr, tau2[6];
@@ -118,7 +118,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
--tau;
/* Function Body */
- difmag_(&speech[1], lpita, &tau[1], ltau, &tau[*ltau], &amdf[1], minptr,
+ difmag_(&speech[1], lpita, &tau[1], ltau, &tau[*ltau], &amdf[1], minptr,
maxptr);
*mintau = tau[*minptr];
minamd = (integer)amdf[*minptr];
@@ -185,4 +185,3 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
}
return 0;
} /* tbdm_ */
-
diff --git a/codecs/lpc10/voicin.c b/codecs/lpc10/voicin.c
index 3605d2f2e..2d36e2c99 100644
--- a/codecs/lpc10/voicin.c
+++ b/codecs/lpc10/voicin.c
@@ -256,8 +256,8 @@ s*/
/* INITVOICIN. */
/* Subroutine */ int voicin_(integer *vwin, real *inbuf, real *
- lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd,
- integer *mintau, real *ivrc, integer *obound, integer *voibuf,
+ lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd,
+ integer *mintau, real *ivrc, integer *obound, integer *voibuf,
integer *af, struct lpc10_encoder_state *st)
{
/* Initialized data */
@@ -298,8 +298,8 @@ s*/
real *maxmin;
integer vstate;
real rc1;
- extern /* Subroutine */ int vparms_(integer *, real *, real *, integer *,
- integer *, real *, integer *, integer *, integer *, integer *,
+ extern /* Subroutine */ int vparms_(integer *, real *, real *, integer *,
+ integer *, real *, integer *, integer *, integer *, integer *,
real *, real *, real *, real *);
integer fbe, lbe;
real *snr;
@@ -363,13 +363,13 @@ s*/
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -379,35 +379,35 @@ s*/
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -418,7 +418,7 @@ s*/
/* common /contrl/ quant, nbits */
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Parameters/constants */
-/* Voicing coefficient and Linear Discriminant Analysis variables:
+/* Voicing coefficient and Linear Discriminant Analysis variables:
*/
/* Max number of VDC's and VDC levels */
/* The following are not Fortran PARAMETER's, but they are */
@@ -428,15 +428,15 @@ s*/
/* Note: */
/* VALUE(1) through VALUE(8) are assigned values, but VALUE(9) */
-/* never is. Yet VALUE(9) is read in the loop that begins "DO I =
+/* never is. Yet VALUE(9) is read in the loop that begins "DO I =
*/
-/* 1, 9" below. I believe that this doesn't cause any problems in
+/* 1, 9" below. I believe that this doesn't cause any problems in
*/
-/* this subroutine, because all VDC(9,*) array elements are 0, and
+/* this subroutine, because all VDC(9,*) array elements are 0, and
*/
-/* this is what is multiplied by VALUE(9) in all cases. Still, it
+/* this is what is multiplied by VALUE(9) in all cases. Still, it
*/
-/* would save a multiplication to change the loop to "DO I = 1, 8".
+/* would save a multiplication to change the loop to "DO I = 1, 8".
*/
/* Local state */
/* WARNING! */
@@ -450,16 +450,16 @@ s*/
/* For VOICE, note that it is "shifted" in the statement that */
/* begins "IF (HALF .EQ. 1) THEN" below. Also, uninitialized */
-/* values in the VOICE array can only affect entries in the VOIBUF
+/* values in the VOICE array can only affect entries in the VOIBUF
*/
-/* array that are for the same frame, or for an older frame. Thus
+/* array that are for the same frame, or for an older frame. Thus
*/
/* the effects of uninitialized values in VOICE cannot linger on */
/* for more than 2 or 3 frame times. */
/* For SFBUE and SLBUE, the effects of uninitialized values can */
/* linger on for many frame times, because their previous values */
-/* are exponentially decayed. Thus it is more important to choose
+/* are exponentially decayed. Thus it is more important to choose
*/
/* initial values for these variables. I would guess that a */
/* reasonable initial value for SFBUE is REF/16, the same as used */
@@ -521,7 +521,7 @@ s*/
/* LBVE, LBUE, FBVE, FBUE, OFBUE, OLBUE */
/* MAXMIN is initialized on the first call, assuming that HALF */
-/* .EQ. 1 on first call. This is how ANALYS calls this subroutine.
+/* .EQ. 1 on first call. This is how ANALYS calls this subroutine.
*/
/* Voicing Decision Parameter vector (* denotes zero coefficient): */
@@ -544,7 +544,7 @@ fic*/
/* The VOICE array contains the result of the linear discriminant functio
n*/
-/* (analog values). The VOIBUF array contains the hard-limited binary
+/* (analog values). The VOIBUF array contains the hard-limited binary
*/
/* voicing decisions. The VOICE and VOIBUF arrays, according to FORTRAN
*/
@@ -564,10 +564,10 @@ n*/
*maxmin = *maxamd / max(*minamd,1.f);
}
/* Calculate voicing parameters twice per frame: */
- vparms_(&vwin[1], &inbuf[inbuf_offset], &lpbuf[lpbuf_offset], &buflim[1],
+ vparms_(&vwin[1], &inbuf[inbuf_offset], &lpbuf[lpbuf_offset], &buflim[1],
half, dither, mintau, &zc, &lbe, &fbe, &qs, &rc1, &ar_b__, &
ar_f__);
-/* Estimate signal-to-noise ratio to select the appropriate VDC vector.
+/* Estimate signal-to-noise ratio to select the appropriate VDC vector.
*/
/* The SNR is estimated as the running average of the ratio of the */
/* running average full-band voiced energy to the running average */
@@ -607,10 +607,10 @@ L69:
voibuf[*half + 6] = 0;
}
/* Skip voicing decision smoothing in first half-frame: */
-/* Give a value to VSTATE, so that trace statements below will print
+/* Give a value to VSTATE, so that trace statements below will print
*/
/* a consistent value from one call to the next when HALF .EQ. 1. */
-/* The value of VSTATE is not used for any other purpose when this is
+/* The value of VSTATE is not used for any other purpose when this is
*/
/* true. */
vstate = -1;
@@ -631,7 +631,7 @@ L69:
.*/
/* Voicing override of transitions at onsets: */
-/* If a V/UV or UV/V voicing decision transition occurs within one-half
+/* If a V/UV or UV/V voicing decision transition occurs within one-half
*/
/* frame of an onset bounding a voicing window, then the transition is */
/* moved to occur at the onset. */
diff --git a/codecs/lpc10/vparms.c b/codecs/lpc10/vparms.c
index c75b1b17d..f802e6ffd 100644
--- a/codecs/lpc10/vparms.c
+++ b/codecs/lpc10/vparms.c
@@ -131,8 +131,8 @@ static real c_b2 = 1.f;
/* This subroutine has no local state. */
-/* Subroutine */ int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer
- *buflim, integer *half, real *dither, integer *mintau, integer *zc,
+/* Subroutine */ int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer
+ *buflim, integer *half, real *dither, integer *mintau, integer *zc,
integer *lbe, integer *fbe, real *qs, real *rc1, real *ar_b__, real *
ar_f__)
{
@@ -252,4 +252,3 @@ is)*/
*fbe = min(i__1,32767);
return 0;
} /* vparms_ */
-
diff --git a/codecs/speex/arch.h b/codecs/speex/arch.h
index af42e645d..435befcef 100644
--- a/codecs/speex/arch.h
+++ b/codecs/speex/arch.h
@@ -7,18 +7,18 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -219,11 +219,11 @@ typedef float spx_word32_t;
#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
/* 2 on TI C5x DSP */
-#define BYTES_PER_CHAR 2
+#define BYTES_PER_CHAR 2
#define BITS_PER_CHAR 16
#define LOG2_BITS_PER_CHAR 4
-#else
+#else
#define BYTES_PER_CHAR 1
#define BITS_PER_CHAR 8
diff --git a/codecs/speex/fixed_generic.h b/codecs/speex/fixed_generic.h
index 3fb096ed9..0b219188d 100644
--- a/codecs/speex/fixed_generic.h
+++ b/codecs/speex/fixed_generic.h
@@ -7,18 +7,18 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/codecs/speex/resample.c b/codecs/speex/resample.c
index 2b0395180..0797352ad 100644
--- a/codecs/speex/resample.c
+++ b/codecs/speex/resample.c
@@ -1,6 +1,6 @@
/* Copyright (C) 2007-2008 Jean-Marc Valin
Copyright (C) 2008 Thorvald Natvig
-
+
File: resample.c
Arbitrary resampling code
@@ -38,22 +38,22 @@
- Low memory requirement
- Good *perceptual* quality (and not best SNR)
- Warning: This resampler is relatively new. Although I think I got rid of
+ Warning: This resampler is relatively new. Although I think I got rid of
all the major bugs and I don't expect the API to change anymore, there
may be something I've missed. So use with caution.
This algorithm is based on this original resampling algorithm:
Smith, Julius O. Digital Audio Resampling Home Page
- Center for Computer Research in Music and Acoustics (CCRMA),
+ Center for Computer Research in Music and Acoustics (CCRMA),
Stanford University, 2007.
Web published at http://www-ccrma.stanford.edu/~jos/resample/.
- There is one main difference, though. This resampler uses cubic
+ There is one main difference, though. This resampler uses cubic
interpolation instead of linear interpolation in the above paper. This
makes the table much smaller and makes it possible to compute that table
- on a per-stream basis. In turn, being able to tweak the table for each
- stream makes it possible to both reduce complexity on simple ratios
- (e.g. 2/3), and get rid of the rounding operations in the inner loop.
+ on a per-stream basis. In turn, being able to tweak the table for each
+ stream makes it possible to both reduce complexity on simple ratios
+ (e.g. 2/3), and get rid of the rounding operations in the inner loop.
The latter both reduces CPU time and makes the algorithm more SIMD-friendly.
*/
@@ -106,7 +106,7 @@ struct SpeexResamplerState_ {
spx_uint32_t out_rate;
spx_uint32_t num_rate;
spx_uint32_t den_rate;
-
+
int quality;
spx_uint32_t nb_channels;
spx_uint32_t filt_len;
@@ -118,17 +118,17 @@ struct SpeexResamplerState_ {
spx_uint32_t oversample;
int initialised;
int started;
-
+
/* These are per-channel */
spx_int32_t *last_sample;
spx_uint32_t *samp_frac_num;
spx_uint32_t *magic_samples;
-
+
spx_word16_t *mem;
spx_word16_t *sinc_table;
spx_uint32_t sinc_table_length;
resampler_basic_func resampler_ptr;
-
+
int in_stride;
int out_stride;
} ;
@@ -170,7 +170,7 @@ static double kaiser8_table[36] = {
0.32108304, 0.27619388, 0.23465776, 0.19672670, 0.16255380, 0.13219758,
0.10562887, 0.08273982, 0.06335451, 0.04724088, 0.03412321, 0.02369490,
0.01563093, 0.00959968, 0.00527363, 0.00233883, 0.00050000, 0.00000000};
-
+
static double kaiser6_table[36] = {
0.99733006, 1.00000000, 0.99733006, 0.98935595, 0.97618418, 0.95799003,
0.93501423, 0.90755855, 0.87598009, 0.84068475, 0.80211977, 0.76076565,
@@ -183,7 +183,7 @@ struct FuncDef {
double *table;
int oversample;
};
-
+
static struct FuncDef _KAISER12 = {kaiser12_table, 64};
#define KAISER12 (&_KAISER12)
/*static struct FuncDef _KAISER12 = {kaiser12_table, 32};
@@ -205,7 +205,7 @@ struct QualityMapping {
/* This table maps conversion quality to internal parameters. There are two
- reasons that explain why the up-sampling bandwidth is larger than the
+ reasons that explain why the up-sampling bandwidth is larger than the
down-sampling bandwidth:
1) When up-sampling, we can assume that the spectrum is already attenuated
close to the Nyquist rate (from an A/D or a previous resampling filter)
@@ -231,7 +231,7 @@ static double compute_func(float x, struct FuncDef *func)
{
float y, frac;
double interp[4];
- int ind;
+ int ind;
y = x*func->oversample;
ind = (int)floor(y);
frac = (y-ind);
@@ -242,7 +242,7 @@ static double compute_func(float x, struct FuncDef *func)
interp[0] = -0.3333333333*frac + 0.5*(frac*frac) - 0.1666666667*(frac*frac*frac);
/* Just to make sure we don't have rounding problems */
interp[1] = 1.f-interp[3]-interp[2]-interp[0];
-
+
/*sum = frac*accum[1] + (1-frac)*accum[2];*/
return interp[0]*func->table[ind] + interp[1]*func->table[ind+1] + interp[2]*func->table[ind+2] + interp[3]*func->table[ind+3];
}
@@ -461,7 +461,7 @@ static int resampler_basic_interpolate_single(SpeexResamplerState *st, spx_uint3
cubic_coef(frac, interp);
sum = interpolate_product_single(iptr, st->sinc_table + st->oversample + 4 - offset - 2, N, st->oversample, interp);
#endif
-
+
out[out_stride * out_sample++] = PSHR32(sum,15);
last_sample += int_advance;
samp_frac_num += frac_advance;
@@ -523,7 +523,7 @@ static int resampler_basic_interpolate_double(SpeexResamplerState *st, spx_uint3
cubic_coef(frac, interp);
sum = interpolate_product_double(iptr, st->sinc_table + st->oversample + 4 - offset - 2, N, st->oversample, interp);
#endif
-
+
out[out_stride * out_sample++] = PSHR32(sum,15);
last_sample += int_advance;
samp_frac_num += frac_advance;
@@ -543,11 +543,11 @@ static int resampler_basic_interpolate_double(SpeexResamplerState *st, spx_uint3
static void update_filter(SpeexResamplerState *st)
{
spx_uint32_t old_length;
-
+
old_length = st->filt_len;
st->oversample = quality_map[st->quality].oversample;
st->filt_len = quality_map[st->quality].base_length;
-
+
if (st->num_rate > st->den_rate)
{
/* down-sampling */
@@ -570,7 +570,7 @@ static void update_filter(SpeexResamplerState *st)
/* up-sampling */
st->cutoff = quality_map[st->quality].upsample_bandwidth;
}
-
+
/* Choose the resampling type that requires the least amount of memory */
if (st->den_rate <= st->oversample)
{
@@ -623,7 +623,7 @@ static void update_filter(SpeexResamplerState *st)
st->int_advance = st->num_rate/st->den_rate;
st->frac_advance = st->num_rate%st->den_rate;
-
+
/* Here's the place where we update the filter memory to take into account
the change in filter length. It's probably the messiest part of the code
due to handling of lots of corner cases. */
@@ -661,7 +661,7 @@ static void update_filter(SpeexResamplerState *st)
/*if (st->magic_samples[i])*/
{
/* Try and remove the magic samples as if nothing had happened */
-
+
/* FIXME: This is wrong but for now we need it to avoid going over the array bounds */
olen = old_length + 2*st->magic_samples[i];
for (j=old_length-2+st->magic_samples[i];j>=0;j--)
@@ -736,18 +736,18 @@ static void update_filter(SpeexResamplerState *st)
st->filt_len = 0;
st->mem = 0;
st->resampler_ptr = 0;
-
+
st->cutoff = 1.f;
st->nb_channels = nb_channels;
st->in_stride = 1;
st->out_stride = 1;
-
+
#ifdef FIXED_POINT
st->buffer_size = 160;
#else
st->buffer_size = 160;
#endif
-
+
/* Per channel data */
st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(int));
st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
@@ -762,9 +762,9 @@ static void update_filter(SpeexResamplerState *st)
speex_resampler_set_quality(st, quality);
speex_resampler_set_rate_frac(st, ratio_num, ratio_den, in_rate, out_rate);
-
+
update_filter(st);
-
+
st->initialised = 1;
if (err)
*err = RESAMPLER_ERR_SUCCESS;
@@ -789,17 +789,17 @@ static int speex_resampler_process_native(SpeexResamplerState *st, spx_uint32_t
int out_sample = 0;
spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size;
spx_uint32_t ilen;
-
+
st->started = 1;
-
+
/* Call the right resampler through the function ptr */
out_sample = st->resampler_ptr(st, channel_index, mem, in_len, out, out_len);
-
+
if (st->last_sample[channel_index] < (spx_int32_t)*in_len)
*in_len = st->last_sample[channel_index];
*out_len = out_sample;
st->last_sample[channel_index] -= *in_len;
-
+
ilen = *in_len;
for(j=0;j<N-1;++j)
@@ -812,11 +812,11 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
spx_uint32_t tmp_in_len = st->magic_samples[channel_index];
spx_word16_t *mem = st->mem + channel_index * st->mem_alloc_size;
const int N = st->filt_len;
-
+
speex_resampler_process_native(st, channel_index, &tmp_in_len, *out, &out_len);
st->magic_samples[channel_index] -= tmp_in_len;
-
+
/* If we couldn't process all "magic" input samples, save the rest for next time */
if (st->magic_samples[channel_index])
{
@@ -842,13 +842,13 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
const spx_uint32_t xlen = st->mem_alloc_size - filt_offs;
const int istride = st->in_stride;
- if (st->magic_samples[channel_index])
+ if (st->magic_samples[channel_index])
olen -= speex_resampler_magic(st, channel_index, &out, olen);
if (! st->magic_samples[channel_index]) {
while (ilen && olen) {
spx_uint32_t ichunk = (ilen > xlen) ? xlen : ilen;
spx_uint32_t ochunk = olen;
-
+
if (in) {
for(j=0;j<ichunk;++j)
x[j+filt_offs]=in[j*istride];
@@ -892,7 +892,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
#endif
st->out_stride = 1;
-
+
while (ilen && olen) {
spx_word16_t *y = ystack;
spx_uint32_t ichunk = (ilen > xlen) ? xlen : ilen;
@@ -929,7 +929,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
#else
out[j*ostride_save] = WORD2INT(ystack[j]);
#endif
-
+
ilen -= ichunk;
olen -= ochunk;
out += (ochunk+omagic) * ostride_save;
@@ -963,7 +963,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
st->out_stride = ostride_save;
return RESAMPLER_ERR_SUCCESS;
}
-
+
int speex_resampler_process_interleaved_int(SpeexResamplerState *st, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
{
spx_uint32_t i;
@@ -1003,7 +1003,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
spx_uint32_t i;
if (st->in_rate == in_rate && st->out_rate == out_rate && st->num_rate == ratio_num && st->den_rate == ratio_den)
return RESAMPLER_ERR_SUCCESS;
-
+
old_den = st->den_rate;
st->in_rate = in_rate;
st->out_rate = out_rate;
@@ -1018,7 +1018,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
st->den_rate /= fact;
}
}
-
+
if (old_den > 0)
{
for (i=0;i<st->nb_channels;i++)
@@ -1029,7 +1029,7 @@ static int speex_resampler_magic(SpeexResamplerState *st, spx_uint32_t channel_i
st->samp_frac_num[i] = st->den_rate-1;
}
}
-
+
if (st->initialised)
update_filter(st);
return RESAMPLER_ERR_SUCCESS;
diff --git a/codecs/speex/resample_sse.h b/codecs/speex/resample_sse.h
index 4bd35a2d0..d85898067 100644
--- a/codecs/speex/resample_sse.h
+++ b/codecs/speex/resample_sse.h
@@ -9,18 +9,18 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
diff --git a/codecs/speex/speex_resampler.h b/codecs/speex/speex_resampler.h
index 5dead0e79..d02022d2e 100644
--- a/codecs/speex/speex_resampler.h
+++ b/codecs/speex/speex_resampler.h
@@ -1,8 +1,8 @@
/* Copyright (C) 2007 Jean-Marc Valin
-
+
File: speex_resampler.h
Resampling code
-
+
The design goals of this code are:
- Very fast algorithm
- Low memory requirement
@@ -45,7 +45,7 @@
/********* WARNING: MENTAL SANITY ENDS HERE *************/
-/* If the resampler is defined outside of Speex, we change the symbol names so that
+/* If the resampler is defined outside of Speex, we change the symbol names so that
there won't be any clash if linking with Speex later on. */
#define RANDOM_PREFIX ast
@@ -55,7 +55,7 @@
#define CAT_PREFIX2(a,b) a ## b
#define CAT_PREFIX(a,b) CAT_PREFIX2(a, b)
-
+
#define speex_resampler_init CAT_PREFIX(RANDOM_PREFIX,_resampler_init)
#define speex_resampler_init_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_init_frac)
#define speex_resampler_destroy CAT_PREFIX(RANDOM_PREFIX,_resampler_destroy)
@@ -83,7 +83,7 @@
#define spx_int32_t int
#define spx_uint16_t unsigned short
#define spx_uint32_t unsigned int
-
+
#else /* OUTSIDE_SPEEX */
#include "speex/speex_types.h"
@@ -106,7 +106,7 @@ enum {
RESAMPLER_ERR_BAD_STATE = 2,
RESAMPLER_ERR_INVALID_ARG = 3,
RESAMPLER_ERR_PTR_OVERLAP = 4,
-
+
RESAMPLER_ERR_MAX_ERROR
};
@@ -123,14 +123,14 @@ typedef struct SpeexResamplerState_ SpeexResamplerState;
* \return Newly created resampler state
* \retval NULL Error: not enough memory
*/
-SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate,
+SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
+ spx_uint32_t in_rate,
+ spx_uint32_t out_rate,
int quality,
int *err);
-/** Create a new resampler with fractional input/output rates. The sampling
- * rate ratio is an arbitrary rational number with both the numerator and
+/** Create a new resampler with fractional input/output rates. The sampling
+ * rate ratio is an arbitrary rational number with both the numerator and
* denominator being 32-bit integers.
* @param nb_channels Number of channels to be processed
* @param ratio_num Numerator of the sampling rate ratio
@@ -143,11 +143,11 @@ SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels,
* @return Newly created resampler state
* @retval NULL Error: not enough memory
*/
-SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
- spx_uint32_t ratio_num,
- spx_uint32_t ratio_den,
- spx_uint32_t in_rate,
- spx_uint32_t out_rate,
+SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels,
+ spx_uint32_t ratio_num,
+ spx_uint32_t ratio_den,
+ spx_uint32_t in_rate,
+ spx_uint32_t out_rate,
int quality,
int *err);
@@ -158,24 +158,24 @@ void speex_resampler_destroy(SpeexResamplerState *st);
/** Resample a float array. The input and output buffers must *not* overlap.
* @param st Resampler state
- * @param channel_index Index of the channel to process for the multi-channel
+ * @param channel_index Index of the channel to process for the multi-channel
* base (0 otherwise)
* @param in Input buffer
- * @param in_len Number of input samples in the input buffer. Returns the
+ * @param in_len Number of input samples in the input buffer. Returns the
* number of samples processed
* @param out Output buffer
* @param out_len Size of the output buffer. Returns the number of samples written
*/
-int speex_resampler_process_float(SpeexResamplerState *st,
- spx_uint32_t channel_index,
- const float *in,
- spx_uint32_t *in_len,
- float *out,
+int speex_resampler_process_float(SpeexResamplerState *st,
+ spx_uint32_t channel_index,
+ const float *in,
+ spx_uint32_t *in_len,
+ float *out,
spx_uint32_t *out_len);
/** Resample an int array. The input and output buffers must *not* overlap.
* @param st Resampler state
- * @param channel_index Index of the channel to process for the multi-channel
+ * @param channel_index Index of the channel to process for the multi-channel
* base (0 otherwise)
* @param in Input buffer
* @param in_len Number of input samples in the input buffer. Returns the number
@@ -183,11 +183,11 @@ int speex_resampler_process_float(SpeexResamplerState *st,
* @param out Output buffer
* @param out_len Size of the output buffer. Returns the number of samples written
*/
-int speex_resampler_process_int(SpeexResamplerState *st,
- spx_uint32_t channel_index,
- const spx_int16_t *in,
- spx_uint32_t *in_len,
- spx_int16_t *out,
+int speex_resampler_process_int(SpeexResamplerState *st,
+ spx_uint32_t channel_index,
+ const spx_int16_t *in,
+ spx_uint32_t *in_len,
+ spx_int16_t *out,
spx_uint32_t *out_len);
/** Resample an interleaved float array. The input and output buffers must *not* overlap.
@@ -199,10 +199,10 @@ int speex_resampler_process_int(SpeexResamplerState *st,
* @param out_len Size of the output buffer. Returns the number of samples written.
* This is all per-channel.
*/
-int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
- const float *in,
- spx_uint32_t *in_len,
- float *out,
+int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
+ const float *in,
+ spx_uint32_t *in_len,
+ float *out,
spx_uint32_t *out_len);
/** Resample an interleaved int array. The input and output buffers must *not* overlap.
@@ -214,10 +214,10 @@ int speex_resampler_process_interleaved_float(SpeexResamplerState *st,
* @param out_len Size of the output buffer. Returns the number of samples written.
* This is all per-channel.
*/
-int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
- const spx_int16_t *in,
- spx_uint32_t *in_len,
- spx_int16_t *out,
+int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
+ const spx_int16_t *in,
+ spx_uint32_t *in_len,
+ spx_int16_t *out,
spx_uint32_t *out_len);
/** Set (change) the input/output sampling rates (integer value).
@@ -225,8 +225,8 @@ int speex_resampler_process_interleaved_int(SpeexResamplerState *st,
* @param in_rate Input sampling rate (integer number of Hz).
* @param out_rate Output sampling rate (integer number of Hz).
*/
-int speex_resampler_set_rate(SpeexResamplerState *st,
- spx_uint32_t in_rate,
+int speex_resampler_set_rate(SpeexResamplerState *st,
+ spx_uint32_t in_rate,
spx_uint32_t out_rate);
/** Get the current input/output sampling rates (integer value).
@@ -234,11 +234,11 @@ int speex_resampler_set_rate(SpeexResamplerState *st,
* @param in_rate Input sampling rate (integer number of Hz) copied.
* @param out_rate Output sampling rate (integer number of Hz) copied.
*/
-void speex_resampler_get_rate(SpeexResamplerState *st,
- spx_uint32_t *in_rate,
+void speex_resampler_get_rate(SpeexResamplerState *st,
+ spx_uint32_t *in_rate,
spx_uint32_t *out_rate);
-/** Set (change) the input/output sampling rates and resampling ratio
+/** Set (change) the input/output sampling rates and resampling ratio
* (fractional values in Hz supported).
* @param st Resampler state
* @param ratio_num Numerator of the sampling rate ratio
@@ -246,10 +246,10 @@ void speex_resampler_get_rate(SpeexResamplerState *st,
* @param in_rate Input sampling rate rounded to the nearest integer (in Hz).
* @param out_rate Output sampling rate rounded to the nearest integer (in Hz).
*/
-int speex_resampler_set_rate_frac(SpeexResamplerState *st,
- spx_uint32_t ratio_num,
- spx_uint32_t ratio_den,
- spx_uint32_t in_rate,
+int speex_resampler_set_rate_frac(SpeexResamplerState *st,
+ spx_uint32_t ratio_num,
+ spx_uint32_t ratio_den,
+ spx_uint32_t in_rate,
spx_uint32_t out_rate);
/** Get the current resampling ratio. This will be reduced to the least
@@ -258,52 +258,52 @@ int speex_resampler_set_rate_frac(SpeexResamplerState *st,
* @param ratio_num Numerator of the sampling rate ratio copied
* @param ratio_den Denominator of the sampling rate ratio copied
*/
-void speex_resampler_get_ratio(SpeexResamplerState *st,
- spx_uint32_t *ratio_num,
+void speex_resampler_get_ratio(SpeexResamplerState *st,
+ spx_uint32_t *ratio_num,
spx_uint32_t *ratio_den);
/** Set (change) the conversion quality.
* @param st Resampler state
- * @param quality Resampling quality between 0 and 10, where 0 has poor
+ * @param quality Resampling quality between 0 and 10, where 0 has poor
* quality and 10 has very high quality.
*/
-int speex_resampler_set_quality(SpeexResamplerState *st,
+int speex_resampler_set_quality(SpeexResamplerState *st,
int quality);
/** Get the conversion quality.
* @param st Resampler state
- * @param quality Resampling quality between 0 and 10, where 0 has poor
+ * @param quality Resampling quality between 0 and 10, where 0 has poor
* quality and 10 has very high quality.
*/
-void speex_resampler_get_quality(SpeexResamplerState *st,
+void speex_resampler_get_quality(SpeexResamplerState *st,
int *quality);
/** Set (change) the input stride.
* @param st Resampler state
* @param stride Input stride
*/
-void speex_resampler_set_input_stride(SpeexResamplerState *st,
+void speex_resampler_set_input_stride(SpeexResamplerState *st,
spx_uint32_t stride);
/** Get the input stride.
* @param st Resampler state
* @param stride Input stride copied
*/
-void speex_resampler_get_input_stride(SpeexResamplerState *st,
+void speex_resampler_get_input_stride(SpeexResamplerState *st,
spx_uint32_t *stride);
/** Set (change) the output stride.
* @param st Resampler state
* @param stride Output stride
*/
-void speex_resampler_set_output_stride(SpeexResamplerState *st,
+void speex_resampler_set_output_stride(SpeexResamplerState *st,
spx_uint32_t stride);
/** Get the output stride.
* @param st Resampler state copied
* @param stride Output stride
*/
-void speex_resampler_get_output_stride(SpeexResamplerState *st,
+void speex_resampler_get_output_stride(SpeexResamplerState *st,
spx_uint32_t *stride);
/** Get the latency in input samples introduced by the resampler.
@@ -316,8 +316,8 @@ int speex_resampler_get_input_latency(SpeexResamplerState *st);
*/
int speex_resampler_get_output_latency(SpeexResamplerState *st);
-/** Make sure that the first samples to go out of the resamplers don't have
- * leading zeros. This is only useful before starting to use a newly created
+/** Make sure that the first samples to go out of the resamplers don't have
+ * leading zeros. This is only useful before starting to use a newly created
* resampler. It is recommended to use that when resampling an audio file, as
* it will generate a file with the same length. For real-time processing,
* it is probably easier not to use this call (so that the output duration
diff --git a/codecs/speex/stack_alloc.h b/codecs/speex/stack_alloc.h
index 5264e666b..6c56334f8 100644
--- a/codecs/speex/stack_alloc.h
+++ b/codecs/speex/stack_alloc.h
@@ -7,18 +7,18 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
-
+
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
-
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -101,7 +101,7 @@
#endif
#if defined(VAR_ARRAYS)
-#define VARDECL(var)
+#define VARDECL(var)
#define ALLOC(var, size, type) type var[size]
#elif defined(USE_ALLOCA)
#define VARDECL(var) var
diff --git a/configs/basic-pbx/indications.conf b/configs/basic-pbx/indications.conf
index 115cddd0b..ccf249d6b 100644
--- a/configs/basic-pbx/indications.conf
+++ b/configs/basic-pbx/indications.conf
@@ -16,4 +16,3 @@ stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/1
; Additional country configurations can be found in the Asterisk source
; at /configs/samples/indications.conf.sample
-
diff --git a/configs/basic-pbx/pjsip.conf b/configs/basic-pbx/pjsip.conf
index b20e0c623..826d5c5ec 100644
--- a/configs/basic-pbx/pjsip.conf
+++ b/configs/basic-pbx/pjsip.conf
@@ -326,4 +326,3 @@ username = DB589C0875AB
[1108](aor-single-reg)
mailboxes = 1108@example
-
diff --git a/configs/basic-pbx/queues.conf b/configs/basic-pbx/queues.conf
index 8aaa0b4d1..da7b7d4e3 100644
--- a/configs/basic-pbx/queues.conf
+++ b/configs/basic-pbx/queues.conf
@@ -16,4 +16,3 @@ strategy=ringall
member => PJSIP/1101 ; Maria Berny - Director of Customer Experience
member => PJSIP/1115 ; Dusty Williams - Customer Advocate
member => PJSIP/1102 ; Tommy Briar - Customer Advocate
-
diff --git a/configs/samples/alsa.conf.sample b/configs/samples/alsa.conf.sample
index 23aac4e10..3e617104d 100644
--- a/configs/samples/alsa.conf.sample
+++ b/configs/samples/alsa.conf.sample
@@ -75,4 +75,3 @@ extension=s
; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
; ----------------------------------------------------------------------------------
-
diff --git a/configs/samples/ari.conf.sample b/configs/samples/ari.conf.sample
index 59f9a44e5..4cd74a5b6 100644
--- a/configs/samples/ari.conf.sample
+++ b/configs/samples/ari.conf.sample
@@ -28,4 +28,3 @@ enabled = yes ; When set to no, ARI support is disabled.
; When set to plain, the password is in plaintext.
;
;password_format = plain
-
diff --git a/configs/samples/asterisk.adsi b/configs/samples/asterisk.adsi
index a58952589..904b33aa1 100644
--- a/configs/samples/asterisk.adsi
+++ b/configs/samples/asterisk.adsi
@@ -156,4 +156,3 @@ SUB "stableCall" IS
SHOWDISPLAY "callended" AT 2
ENDIF
ENDSUB
-
diff --git a/configs/samples/asterisk.conf.sample b/configs/samples/asterisk.conf.sample
index e57ee10e0..56c449099 100644
--- a/configs/samples/asterisk.conf.sample
+++ b/configs/samples/asterisk.conf.sample
@@ -73,7 +73,7 @@ astsbindir => /usr/sbin
;rungroup = asterisk ; The group to run as.
;lightbackground = yes ; If your terminal is set for a light-colored
; background.
-;forceblackbackground = yes ; Force the background of the terminal to be
+;forceblackbackground = yes ; Force the background of the terminal to be
; black, in order for terminal colors to show
; up properly.
;defaultlanguage = en ; Default language
diff --git a/configs/samples/calendar.conf.sample b/configs/samples/calendar.conf.sample
index 82b8702f0..8c7336156 100644
--- a/configs/samples/calendar.conf.sample
+++ b/configs/samples/calendar.conf.sample
@@ -41,7 +41,7 @@
;setvar = CALLERID(name)=${CALENDAR_EVENT(summary)}
;[calendar2]
-; Note: Support for Exchange Server 2003
+; Note: Support for Exchange Server 2003
;
;type = exchange ; type of calendar--currently supported: ical, caldav, exchange, or ews
;url = https://example.com/exchange/jdoe ; URL to MS Exchange OWA for user (usually includes exchange/user)
diff --git a/configs/samples/cdr_adaptive_odbc.conf.sample b/configs/samples/cdr_adaptive_odbc.conf.sample
index f3c806e75..2daa98333 100644
--- a/configs/samples/cdr_adaptive_odbc.conf.sample
+++ b/configs/samples/cdr_adaptive_odbc.conf.sample
@@ -57,4 +57,3 @@
; for this is to allow different sections to specify different values for
; a certain named column, presumably separated by filters.
;static "Some Special Value" => identifier_code
-
diff --git a/configs/samples/cdr_mysql.conf.sample b/configs/samples/cdr_mysql.conf.sample
index e15a8ed93..a1f7d38e8 100644
--- a/configs/samples/cdr_mysql.conf.sample
+++ b/configs/samples/cdr_mysql.conf.sample
@@ -4,17 +4,17 @@
; setting hostname=localhost
;
; port and sock are both optional parameters. If hostname is specified
-; and is not "localhost" (you can use address 127.0.0.1 instead), then
-; cdr_mysql will attempt to connect to the port specified or use the
-; default port. If hostname is not specified or if hostname is
-; "localhost", then cdr_mysql will attempt to connect to the socket file
+; and is not "localhost" (you can use address 127.0.0.1 instead), then
+; cdr_mysql will attempt to connect to the port specified or use the
+; default port. If hostname is not specified or if hostname is
+; "localhost", then cdr_mysql will attempt to connect to the socket file
; specified by sock or otherwise use the default socket file.
;
;[global]
;hostname=database.host.name
;dbname=asteriskcdrdb
;table=cdr
-;password=password
+;password=password
;user=asteriskcdruser
;port=3306
;sock=/tmp/mysql.sock
@@ -60,4 +60,3 @@ alias start => calldate
;alias accountcode => <a_field_not_named_accountcode>
;alias userfield => <a_field_not_named_userfield>
;alias uniqueid => <a_field_not_named_uniqueid>
-
diff --git a/configs/samples/cdr_tds.conf.sample b/configs/samples/cdr_tds.conf.sample
index 309599e5f..f3a9d7cca 100644
--- a/configs/samples/cdr_tds.conf.sample
+++ b/configs/samples/cdr_tds.conf.sample
@@ -75,4 +75,3 @@
; Default value: false
;hrtime=false
-
diff --git a/configs/samples/cel.conf.sample b/configs/samples/cel.conf.sample
index d92e2745d..755fcd3ed 100644
--- a/configs/samples/cel.conf.sample
+++ b/configs/samples/cel.conf.sample
@@ -103,7 +103,7 @@ events=APP_START,CHAN_START,CHAN_END,ANSWER,HANGUP,BRIDGE_ENTER,BRIDGE_EXIT
;show_user_defined=yes
;
-; RADIUS CEL Backend
+; RADIUS CEL Backend
;
[radius]
;
diff --git a/configs/samples/chan_dahdi.conf.sample b/configs/samples/chan_dahdi.conf.sample
index d0ccd5db5..fe9cdecf5 100644
--- a/configs/samples/chan_dahdi.conf.sample
+++ b/configs/samples/chan_dahdi.conf.sample
@@ -1508,12 +1508,12 @@ pickupgroup=1
; MFC-R2 signaling has lots of variants from country to country and even sometimes
; minor variants inside the same country. The only mandatory parameters here are:
; mfcr2_variant, mfcr2_max_ani and mfcr2_max_dnis.
-; IT IS RECOMMENDED that you leave the default values (leaving it commented) for the
-; other parameters unless you have problems or you have been instructed to change some
-; parameter. OpenR2 library uses the mfcr2_variant parameter to try to determine the
-; best defaults for your country, also refer to the OpenR2 package directory
-; doc/asterisk/ where you can find sample configurations for some countries. If you
-; want to contribute your configs for a particular country send them to the e-mail
+; IT IS RECOMMENDED that you leave the default values (leaving it commented) for the
+; other parameters unless you have problems or you have been instructed to change some
+; parameter. OpenR2 library uses the mfcr2_variant parameter to try to determine the
+; best defaults for your country, also refer to the OpenR2 package directory
+; doc/asterisk/ where you can find sample configurations for some countries. If you
+; want to contribute your configs for a particular country send them to the e-mail
; of the primary OpenR2 developer that you can find in the AUTHORS file of the OpenR2 package
; MFC/R2 variant. This depends on the OpenR2 supported variants
diff --git a/configs/samples/chan_mobile.conf.sample b/configs/samples/chan_mobile.conf.sample
index c9c4d2d85..381433731 100644
--- a/configs/samples/chan_mobile.conf.sample
+++ b/configs/samples/chan_mobile.conf.sample
@@ -4,7 +4,7 @@
;
[general]
-interval=30 ; Number of seconds between trying to connect to devices.
+interval=30 ; Number of seconds between trying to connect to devices.
; The following is a list of adapters we use.
; id must be unique and address is the bdaddr of the adapter from hciconfig.
@@ -24,7 +24,7 @@ id=dlink
address=00:80:C8:35:52:78
; The following is a list of the devices we deal with.
-; Every device listed below will be available for calls in and out of Asterisk.
+; Every device listed below will be available for calls in and out of Asterisk.
; Each device needs an adapter=xxxx entry which determines which bluetooth adapter is used.
; Use the CLI command 'mobile search' to discover devices.
; Use the CLI command 'mobile show devices' to see device status.
diff --git a/configs/samples/codecs.conf.sample b/configs/samples/codecs.conf.sample
index eff3da02c..e1dbd7990 100644
--- a/configs/samples/codecs.conf.sample
+++ b/configs/samples/codecs.conf.sample
@@ -204,4 +204,3 @@ packetloss_percentage=10;
;max_bandwidth=wide ; Maximum encoded bandwidth set to wide band (0-8000 Hz
; ; audio bandwidth at 16Khz sample rate)
;cbr=yes ; Force a constant bit rate (i.e don't use what's on the SDP)
-
diff --git a/configs/samples/confbridge.conf.sample b/configs/samples/confbridge.conf.sample
index 49208c31b..8c06cd9b1 100644
--- a/configs/samples/confbridge.conf.sample
+++ b/configs/samples/confbridge.conf.sample
@@ -228,8 +228,8 @@ type=bridge
; left the conference. This is used for user intros.
; Example "_____ has left the conference"
;sound_kicked ; The sound played to a user who has been kicked from the conference.
-;sound_muted ; The sound played when the mute option it toggled on.
-;sound_unmuted ; The sound played when the mute option it toggled off.
+;sound_muted ; The sound played when the mute option is toggled on using DTMF menu.
+;sound_unmuted ; The sound played when the mute option is toggled off using DTMF menu.
;sound_only_person ; The sound played when the user is the only person in the conference.
;sound_only_one ; The sound played to a user when there is only one other
; person is in the conference.
diff --git a/configs/samples/dbsep.conf.sample b/configs/samples/dbsep.conf.sample
index 9cfa23740..7a68850be 100644
--- a/configs/samples/dbsep.conf.sample
+++ b/configs/samples/dbsep.conf.sample
@@ -32,4 +32,3 @@ dbpass=password
# For most databases, this is fine. Set to 'no' for Sybase or MS SQL Server.
backslash_is_escape=yes
-
diff --git a/configs/samples/dsp.conf.sample b/configs/samples/dsp.conf.sample
index 55951582e..f13ca2f96 100644
--- a/configs/samples/dsp.conf.sample
+++ b/configs/samples/dsp.conf.sample
@@ -40,4 +40,3 @@
;successive number hits/misses of 12.75ms before a digit/nodigit is considered valid
;dtmf_hits_to_begin=2
;dtmf_misses_to_end=3
-
diff --git a/configs/samples/extconfig.conf.sample b/configs/samples/extconfig.conf.sample
index 0f347a6ab..9e13cacda 100644
--- a/configs/samples/extconfig.conf.sample
+++ b/configs/samples/extconfig.conf.sample
@@ -109,4 +109,3 @@
; note that using dynamic realtime extensions is not recommended anymore as a
; best practice; instead, you should consider writing a static dialplan with
; proper data abstraction via a tool like func_odbc.
-
diff --git a/configs/samples/extensions.lua.sample b/configs/samples/extensions.lua.sample
index 1b4428c7c..e845f0dc9 100644
--- a/configs/samples/extensions.lua.sample
+++ b/configs/samples/extensions.lua.sample
@@ -238,4 +238,3 @@ hints = {
["1234"] = "SIP/1234";
};
}
-
diff --git a/configs/samples/extensions_minivm.conf.sample b/configs/samples/extensions_minivm.conf.sample
index 2f9d24637..69ef3adba 100644
--- a/configs/samples/extensions_minivm.conf.sample
+++ b/configs/samples/extensions_minivm.conf.sample
@@ -156,4 +156,3 @@ exten => sendvmcleanup,n(done),wait(0.5)
exten => sendvmcleanup,n,hangup
exten => h,1,gotoif($[${MINIVM_RECORD_STATUS} = SUCCESS]?sendvmcleanup,1))
-
diff --git a/configs/samples/festival.conf.sample b/configs/samples/festival.conf.sample
index e91821719..27b43d52e 100644
--- a/configs/samples/festival.conf.sample
+++ b/configs/samples/festival.conf.sample
@@ -32,4 +32,3 @@
;festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
;
;
-
diff --git a/configs/samples/followme.conf.sample b/configs/samples/followme.conf.sample
index a233948bf..be301f166 100644
--- a/configs/samples/followme.conf.sample
+++ b/configs/samples/followme.conf.sample
@@ -87,5 +87,3 @@ status_prompt=>followme/status
sorry_prompt=>followme/sorry
; The 'I'm sorry, but we were unable to locate your party' message prompt. Default
; is the global default.
-
-
diff --git a/configs/samples/func_odbc.conf.sample b/configs/samples/func_odbc.conf.sample
index 8614bf12a..0307e22f2 100644
--- a/configs/samples/func_odbc.conf.sample
+++ b/configs/samples/func_odbc.conf.sample
@@ -107,4 +107,3 @@ synopsis=Check if a specified callerid is contained in the ex-gf database
dsn=mysql1
readsql=SELECT location FROM presence WHERE id='${SQL_ESC(${ARG1})}'
writesql=UPDATE presence SET location='${SQL_ESC(${VAL1})}' WHERE id='${SQL_ESC(${ARG1})}'
-
diff --git a/configs/samples/iax.conf.sample b/configs/samples/iax.conf.sample
index 1d9623afb..170f08a4a 100644
--- a/configs/samples/iax.conf.sample
+++ b/configs/samples/iax.conf.sample
@@ -572,12 +572,12 @@ inkeys=freeworlddialup
;
; Peers may also be specified, with a secret and a remote hostname.
;
-[demo]
-type=peer
-username=asterisk
-secret=supersecret
-host=216.207.245.47
-description=Demo System At Digium ; Description of this peer, as listed by
+;[demo]
+;type=peer
+;username=asterisk
+;secret=supersecret
+;host=192.168.10.10
+;description=My IAX2 Peer ; Description of this peer, as listed by
; 'iax2 show peers'
;sendani=no
;host=asterisk.linux-support.net
diff --git a/configs/samples/iaxprov.conf.sample b/configs/samples/iaxprov.conf.sample
index 668809c4d..8b7d8e092 100644
--- a/configs/samples/iaxprov.conf.sample
+++ b/configs/samples/iaxprov.conf.sample
@@ -78,4 +78,3 @@ flags=register,heartbeat
; USE A '*' PROVISIONING ENTRY UNLESS YOU KNOW WHAT YOU'RE DOING.
;
;template=default
-
diff --git a/configs/samples/manager.conf.sample b/configs/samples/manager.conf.sample
index 0eb64c8ae..989441a61 100644
--- a/configs/samples/manager.conf.sample
+++ b/configs/samples/manager.conf.sample
@@ -85,7 +85,7 @@ bindaddr = 0.0.0.0
;permit=209.16.236.73/255.255.255.0
;acl=named_acl_example ; use a named ACL from acl.conf
;
-;
+;
;setvar=PBXACCOUNT=edvina
; The setvar option defines channel variables that will be set when this account
; originates a call. You can define multiple setvar= commands for one manager
@@ -154,4 +154,3 @@ bindaddr = 0.0.0.0
;
;read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
;write = system,call,agent,user,config,command,reporting,originate,message
-
diff --git a/configs/samples/mgcp.conf.sample b/configs/samples/mgcp.conf.sample
index f4bc0dbf2..107a30d92 100644
--- a/configs/samples/mgcp.conf.sample
+++ b/configs/samples/mgcp.conf.sample
@@ -13,7 +13,7 @@
; --------------------- DIGIT TIMEOUTS ----------------------------
firstdigittimeout = 30000 ; default 16000 = 16s
-gendigittimeout = 10000 ; default 8000 = 8s
+gendigittimeout = 10000 ; default 8000 = 8s
matchdigittimeout = 5000 ; defaults 3000 = 3s
; ----------------------------- JITTER BUFFER CONFIGURATION --------------------------
@@ -59,27 +59,27 @@ matchdigittimeout = 5000 ; defaults 3000 = 3s
;; The MGCP channel supports the following service codes:
;; # - Transfer
-;; *67 - Calling Number Delivery Blocking
-;; *70 - Cancel Call Waiting
-;; *72 - Call Forwarding Activation
-;; *73 - Call Forwarding Deactivation
-;; *78 - Do Not Disturb Activation
-;; *79 - Do Not Disturb Deactivation
+;; *67 - Calling Number Delivery Blocking
+;; *70 - Cancel Call Waiting
+;; *72 - Call Forwarding Activation
+;; *73 - Call Forwarding Deactivation
+;; *78 - Do Not Disturb Activation
+;; *79 - Do Not Disturb Deactivation
;; *8 - Call pick-up
;
-; known to work with Swissvoice IP10s
-;[192.168.1.20]
-;context=local
-;host=192.168.1.20
-;callerid = "John Doe" <123>
+; known to work with Swissvoice IP10s
+;[192.168.1.20]
+;context=local
+;host=192.168.1.20
+;callerid = "John Doe" <123>
;callgroup=0 ; in the range from 0 to 63
;pickupgroup=0 ; in the range from 0 to 63
-;nat=no
-;threewaycalling=yes
+;nat=no
+;threewaycalling=yes
;transfer=yes ; transfer requires threewaycalling=yes. Use FLASH to transfer
;callwaiting=yes ; this might be a cause of trouble for ip10s
-;cancallforward=yes
-;line => aaln/1
+;cancallforward=yes
+;line => aaln/1
;
;[dph100]
@@ -102,7 +102,7 @@ matchdigittimeout = 5000 ; defaults 3000 = 3s
; 'documentation', or 'omit'
;context = local
;host = 192.168.1.20
-;wcardep = aaln/* ; enables wildcard endpoint and sets it to 'aaln/*'
+;wcardep = aaln/* ; enables wildcard endpoint and sets it to 'aaln/*'
; another common format is '*'
;callerid = "Duane Cox" <123> ; now lets setup line 1 using per endpoint configuration...
;callwaiting = no
diff --git a/configs/samples/ooh323.conf.sample b/configs/samples/ooh323.conf.sample
index aeeb02fab..563ec9fa8 100644
--- a/configs/samples/ooh323.conf.sample
+++ b/configs/samples/ooh323.conf.sample
@@ -201,8 +201,3 @@ allow=ulaw
e164=12345
rtptimeout=60
dtmfmode=rfc2833
-
-
-
-
-
diff --git a/configs/samples/oss.conf.sample b/configs/samples/oss.conf.sample
index ee169209f..b0b3831ab 100644
--- a/configs/samples/oss.conf.sample
+++ b/configs/samples/oss.conf.sample
@@ -150,4 +150,3 @@
; to add video support, uncomment this and remember to install
; the keypad and keypad_font files to the right place
; [general](+,my_video,skin2)
-
diff --git a/configs/samples/phoneprov.conf.sample b/configs/samples/phoneprov.conf.sample
index 7d14013b2..df3058fe3 100644
--- a/configs/samples/phoneprov.conf.sample
+++ b/configs/samples/phoneprov.conf.sample
@@ -140,4 +140,3 @@ setvar => CUSTOM_CONFIG=/var/lib/asterisk/phoneprov/configs/custom.cfg ; Custom
;snom 300, 320, 360, 370, 820, 821, 870 support
snom-${MAC}.xml => snom-mac.xml
-
diff --git a/configs/samples/queuerules.conf.sample b/configs/samples/queuerules.conf.sample
index 417f52de1..7a562758f 100644
--- a/configs/samples/queuerules.conf.sample
+++ b/configs/samples/queuerules.conf.sample
@@ -28,4 +28,3 @@
; penaltychange => 30,+3 ; 30 seconds into the call increase the QUEUE_MAX_PENALTY by 3, no change to QUEUE_MIN_PENALTY
; penaltychange => 60,10,5 ; 60 seconds into the call increase the QUEUE_MAX_PENALTY to 10 and increase the QUEUE_MIN_PENALTY to 5
; penaltychange => 75,,7 ; 75 seconds into the call keep the QUEUE_MAX_PENALTY the same and increase the QUEUE_MIN_PENALTY to 7
-
diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample
index 7ec8bcf51..5c8a80ffe 100644
--- a/configs/samples/queues.conf.sample
+++ b/configs/samples/queues.conf.sample
@@ -97,7 +97,7 @@ monitor-type = MixMonitor
; fewestcalls - ring the one with fewest completed calls from this queue
; random - ring random interface
; rrmemory - round robin with memory, remember where we left off last ring pass
-; rrordered - same as rrmemory, except the queue member order from config file
+; rrordered - same as rrmemory, except the queue member order from config file
; is preserved
; linear - rings interfaces in the order specified in this configuration file.
; If you use dynamic members, the members will be rung in the order in
diff --git a/configs/samples/res_config_mysql.conf.sample b/configs/samples/res_config_mysql.conf.sample
index ab8ebf095..7d9c78e67 100644
--- a/configs/samples/res_config_mysql.conf.sample
+++ b/configs/samples/res_config_mysql.conf.sample
@@ -5,7 +5,7 @@
; If dbhost is commented out or the string "localhost", a connection
; to the local host is assumed and dbsock is used instead of TCP/IP
; to connect to the server. If no dbcharset is specified, the connection
-; is made with no extra charset configurations sent to MySQL, leaving all
+; is made with no extra charset configurations sent to MySQL, leaving all
; configured MySQL charset options and defaults untouched.
;
; Multiple database contexts may be configured, with the caveat that
diff --git a/configs/samples/res_config_sqlite3.conf.sample b/configs/samples/res_config_sqlite3.conf.sample
index 5416c809e..83569adf6 100644
--- a/configs/samples/res_config_sqlite3.conf.sample
+++ b/configs/samples/res_config_sqlite3.conf.sample
@@ -28,4 +28,3 @@
; to lock for writing.
;
;batch=1000
-
diff --git a/configs/samples/res_fax.conf.sample b/configs/samples/res_fax.conf.sample
index 022a23aad..95e6be811 100644
--- a/configs/samples/res_fax.conf.sample
+++ b/configs/samples/res_fax.conf.sample
@@ -1,4 +1,4 @@
-; Generic Fax Application configuration
+; Generic Fax Application configuration
[general]
; Maximum Transmission Rate
diff --git a/configs/samples/res_ldap.conf.sample b/configs/samples/res_ldap.conf.sample
index ac345cdd4..c8d1286c3 100644
--- a/configs/samples/res_ldap.conf.sample
+++ b/configs/samples/res_ldap.conf.sample
@@ -4,7 +4,7 @@
; Realtime configuration
; ----------------------
-; In order to use this module, you start
+; In order to use this module, you start
; in extconfig.conf with a configuration like this:
;
; sippeers = ldap,"dc=myDomain,dc=myDomainExt",sip
@@ -19,13 +19,13 @@
; TLS support
; -----------
; Note that you can configure an ldaps: url here to get TLS support.
-; Detailed configuration of certificates and supported CAs is done in your
+; Detailed configuration of certificates and supported CAs is done in your
; ldap.conf file for OpenLDAP clients on your system.
; This requires that you have OpenLDAP libraries compiled with TLS support
; *********************************************************************************
; NOTE: res_ldap.conf should be chmod 600 because it contains the plain-text LDAP
-; password to an account with WRITE access to the asterisk configuration.
+; password to an account with WRITE access to the asterisk configuration.
; *********************************************************************************
[_general]
@@ -196,4 +196,3 @@ regcontext = AstAccountRegistrationContext
regexten = AstAccountRegistrationExten
CanCallForward = AstAccountCanCallForward
additionalFilter=(objectClass=AstAccount)
-
diff --git a/configs/samples/res_pgsql.conf.sample b/configs/samples/res_pgsql.conf.sample
index cc7442fd0..015d68c13 100644
--- a/configs/samples/res_pgsql.conf.sample
+++ b/configs/samples/res_pgsql.conf.sample
@@ -18,7 +18,7 @@ dbpass=password
; actual socket is constructed as a combination of dbsock and dbport. For
; example, the values of '/tmp' and '5432', respectively, will specify a socket
; file of '/tmp/.s.PGSQL.5432'.
-;
+;
;dbsock=/tmp
;
; requirements - At startup, each realtime family will make requirements
diff --git a/configs/samples/res_snmp.conf.sample b/configs/samples/res_snmp.conf.sample
index 7f3734910..c017c0ec5 100644
--- a/configs/samples/res_snmp.conf.sample
+++ b/configs/samples/res_snmp.conf.sample
@@ -10,7 +10,7 @@
; If you use the subagent model, you need to enable agentx in snmpd.conf
; Note that you can only run one Asterisk on the system in this case.
;
-; See https://wiki.asterisk.org/wiki/display/AST/Simple+Network+Management+Protocol+(SNMP)+Support
+; See https://wiki.asterisk.org/wiki/display/AST/Simple+Network+Management+Protocol+(SNMP)+Support
; to get more information about
; snmp support in Asterisk
diff --git a/configs/samples/rtp.conf.sample b/configs/samples/rtp.conf.sample
index 9bc3de3cf..de9d59007 100644
--- a/configs/samples/rtp.conf.sample
+++ b/configs/samples/rtp.conf.sample
@@ -21,9 +21,17 @@ rtpend=20000
; rtcpinterval = 5000 ; Milliseconds between rtcp reports
;(min 500, max 60000, default 5000)
;
-; Enable strict RTP protection. This will drop RTP packets that
-; do not come from the source of the RTP stream. This option is
-; enabled by default.
+; Enable strict RTP protection. This will drop RTP packets that do not come
+; from the recoginized source of the RTP stream. Strict RTP qualifies RTP
+; packet stream sources before accepting them upon initial connection and
+; when the connection is renegotiated (e.g., transfers and direct media).
+; Initial connection and renegotiation starts a learning mode to qualify
+; stream source addresses. Once Asterisk has recognized a stream it will
+; allow other streams to qualify and replace the current stream for 5
+; seconds after starting learning mode. Once learning mode completes the
+; current stream is locked in and cannot change until the next
+; renegotiation.
+; This option is enabled by default.
; strictrtp=yes
;
; Number of packets containing consecutive sequence values needed
diff --git a/configs/samples/say.conf.sample b/configs/samples/say.conf.sample
index 6285dbe1e..de35ee4a6 100644
--- a/configs/samples/say.conf.sample
+++ b/configs/samples/say.conf.sample
@@ -271,7 +271,7 @@ mode=old ; method for playing numbers and dates
_[n]um:1XX => digits/hundred, num:${SAY:1}
_[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred
_[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
-
+
_[n]um:1000 => digits/thousand
_[n]um:1XXX => digits/thousand, num:${SAY:1}
_[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousand
@@ -280,7 +280,7 @@ mode=old ; method for playing numbers and dates
_[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
_[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
_[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
-
+
_[n]um:1000000 => num:${SAY:0:1}, digits/million
_[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
_[n]um:[2-9]000000 => num:${SAY:0:1}, digits/million
@@ -289,11 +289,11 @@ mode=old ; method for playing numbers and dates
_[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2}
_[n]um:XXX000000 => num:${SAY:0:3}, digits/million
_[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3}
-
- _datetime::. => date:AdBY 'digits/at' H 'hours' M 'perc':${SAY}
+
+ _datetime::. => date:AdBY 'digits/at' H 'hours' M 'perc':${SAY}
_date::. => date:AdBY:${SAY}
_time::. => date:H 'hours' M 'perc':${SAY}
-
+
_pho[n]e:XXXX => num:${SAY:0:2}, num:${SAY:2:2}
_pho[n]e:0[1-9]XXXXXXXX => num:${SAY:0:1}, num:${SAY:1:1}, num:${SAY:2:2}, num:${SAY:4:2}, num:${SAY:6:2}, num:${SAY:8:2}
_pho[n]e:. => digit:${SAY}
diff --git a/configs/samples/sip.conf.sample b/configs/samples/sip.conf.sample
index 75543036d..f8aa12f42 100644
--- a/configs/samples/sip.conf.sample
+++ b/configs/samples/sip.conf.sample
@@ -104,7 +104,7 @@
; ** Old configuration options **
; The "call-limit" configuation option is considered old is replaced
-; by new functionality. To enable callcounters, you use the new
+; by new functionality. To enable callcounters, you use the new
; "callcounter" setting (for extension states in queue and subscriptions)
; You are encouraged to use the dialplan groupcount functionality
; to enforce call limits instead of using this channel-specific method.
@@ -139,7 +139,7 @@ allowoverlap=no ; Disable overlap dialing support. (Default is y
; Set this to your host name or domain name
;domainsasrealm=no ; Use domains list as realms
; You can serve multiple Realms specifying several
- ; 'domain=...' directives (see below).
+ ; 'domain=...' directives (see below).
; In this case Realm will be based on request 'From'/'To' header
; and should match one of domain names.
; Otherwise default 'realm=...' will be used.
@@ -187,8 +187,8 @@ udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0
; makes the assumption that the endpoint supports all known SIP methods.
; If you know that your SIP endpoint does not provide support for a specific
; method, then you may provide a comma-separated list of methods that your
-; endpoint does not implement in the disallowed_methods option. Note that
-; if your endpoint is truthful with its Allow header, then there is no need
+; endpoint does not implement in the disallowed_methods option. Note that
+; if your endpoint is truthful with its Allow header, then there is no need
; to set this option. This option may be set in the general section or may
; be set per endpoint. If this option is set both in the general section and
; in a peer section, then the peer setting completely overrides the general
@@ -216,7 +216,7 @@ tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0
; Optionally add a port number, 192.168.1.1:5063 (default is port 5061)
; Remember that the IP address must match the common name (hostname) in the
; certificate, so you don't want to bind a TLS socket to multiple IP addresses.
- ; For details how to construct a certificate for SIP see
+ ; For details how to construct a certificate for SIP see
; http://tools.ietf.org/html/draft-ietf-sip-domain-certs
;tcpauthtimeout = 30 ; tcpauthtimeout specifies the maximum number
@@ -371,14 +371,14 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; but the remote party's domain will be anonymized. The way legacy
; behaves may violate RFC-3325, but it follows historic behavior.
; This option is set to 'legacy' by default
-;prematuremedia=no ; Some ISDN links send empty media frames before
- ; the call is in ringing or progress state. The SIP
+;prematuremedia=no ; Some ISDN links send empty media frames before
+ ; the call is in ringing or progress state. The SIP
; channel will then send 183 indicating early media
; which will be empty - thus users get no ring signal.
; Setting this to "yes" will stop any media before we have
; call progress (meaning the SIP channel will not send 183 Session
; Progress for early media). Default is "yes". Also make sure that
- ; the SIP peer is configured with progressinband=never.
+ ; the SIP peer is configured with progressinband=never.
;
; In order for "noanswer" applications to work, you need to run
; the progress() application in the priority before the app.
@@ -881,10 +881,10 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; externaddr = 12.34.56.78 ; use this address.
; externaddr = 12.34.56.78:9900 ; use this address and port.
; externaddr = mynat.my.org:12600 ; Public address of my nat box.
-; externtcpport = 9900 ; The externally mapped tcp port, when Asterisk is behind a static NAT or PAT.
-; ; externtcpport will default to the externaddr or externhost port if either one is set.
+; externtcpport = 9900 ; The externally mapped tcp port, when Asterisk is behind a static NAT or PAT.
+; ; externtcpport will default to the externaddr or externhost port if either one is set.
; externtlsport = 12600 ; The externally mapped tls port, when Asterisk is behind a static NAT or PAT.
-; ; externtlsport port will default to the RFC designated port of 5061.
+; ; externtlsport port will default to the RFC designated port of 5061.
;
; b. "externhost = hostname[:port]" is similar to "externaddr" except
; that the hostname is looked up every "externrefresh" seconds
@@ -1004,7 +1004,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; It only controls Asterisk generating reINVITEs for the specific
; purpose of setting up a direct media path. If a reINVITE is
; needed to switch a media stream to inactive (when placed on
- ; hold) or to T.38, it will still be done, regardless of this
+ ; hold) or to T.38, it will still be done, regardless of this
; setting. Note that direct T.38 is not supported.
;directmedia=nonat ; An additional option is to allow media path redirection
@@ -1031,11 +1031,11 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; callers INVITE. This will also fail if directmedia is enabled when
; the device is actually behind NAT.
-;directmediadeny=0.0.0.0/0 ; Use directmediapermit and directmediadeny to restrict
+;directmediadeny=0.0.0.0/0 ; Use directmediapermit and directmediadeny to restrict
;directmediapermit=172.16.0.0/16; which peers should be able to pass directmedia to each other
; (There is no default setting, this is just an example)
; Use this if some of your phones are on IP addresses that
- ; can not reach each other directly. This way you can force
+ ; can not reach each other directly. This way you can force
; RTP to always flow through asterisk in such cases.
;directmediaacl=acl_example ; Use named ACLs defined in acl.conf
@@ -1220,10 +1220,10 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; matches rather than the IP address. Since it is also a peer, a friend entity can
; be called as long as its IP is known to Asterisk. In the case of host=dynamic,
; this means it is necessary for the entity to register before Asterisk can call it.
-;
+;
; Use remotesecret for outbound authentication, and secret for authenticating
; inbound requests. For historical reasons, if no remotesecret is supplied for an
-; outbound registration or call, the secret will be used.
+; outbound registration or call, the secret will be used.
;
; For device names, we recommend using only a-z, numerics (0-9) and underscore
;
diff --git a/configs/samples/skinny.conf.sample b/configs/samples/skinny.conf.sample
index 2bf06fbc8..9ee602e95 100644
--- a/configs/samples/skinny.conf.sample
+++ b/configs/samples/skinny.conf.sample
@@ -205,4 +205,3 @@ keepalive=120
;speeddial => 112@hints,Bob Peterson ; When a context is specified, the speeddial watches a dialplan hint.
;addon => 7914
;addon => 7914
-
diff --git a/configs/samples/sla.conf.sample b/configs/samples/sla.conf.sample
index b5e1ef614..1f5a56e7b 100644
--- a/configs/samples/sla.conf.sample
+++ b/configs/samples/sla.conf.sample
@@ -36,7 +36,7 @@
; NOTE: You can not just put any type of channel here.
; DAHDI channels can be directly used. IP trunks
; require some indirect configuration which is
- ; described in
+ ; described in
; https://wiki.asterisk.org/wiki/display/AST/SLA+Trunk+Configuration
;autocontext=line1 ; This supports automatic generation of the dialplan entries
@@ -148,4 +148,3 @@
;[station5](station)
;device=SIP/station5
; --------------------------------------
-
diff --git a/configs/samples/users.conf.sample b/configs/samples/users.conf.sample
index 50b80a1c5..52f02b5ba 100644
--- a/configs/samples/users.conf.sample
+++ b/configs/samples/users.conf.sample
@@ -111,4 +111,3 @@ pickupgroup = 1
;LINEKEYS = 1
;linenumber = 1
;cid_number = 6000
-
diff --git a/configs/samples/voicemail.conf.sample b/configs/samples/voicemail.conf.sample
index 84e83a344..c90f8513c 100644
--- a/configs/samples/voicemail.conf.sample
+++ b/configs/samples/voicemail.conf.sample
@@ -245,7 +245,7 @@ pagerdateformat=%A, %B %d, %Y at %r
; overridden in the per-mailbox settings, unless listed otherwise.
;
; tz=central ; Timezone from zonemessages below. Irrelevant if envelope=no.
-; locale=de_DE.UTF-8 ; set the locale for generation of the date/time strings (make
+; locale=de_DE.UTF-8 ; set the locale for generation of the date/time strings (make
; sure the locales are installed in your operating system; e.g
; on Debian Linux you can use "dpkg-reconfigure locales").
; If you use UTF-8 locales, make sure to set the "charset" option
@@ -259,8 +259,8 @@ pagerdateformat=%A, %B %d, %Y at %r
; Useful if Windows users want wav49, but Linux users want gsm.
; [per-mailbox only]
; saycid=yes ; Say the caller id information before the message. If not described,
- ; or set to no, it will be in the envelope. When enabled, if a recorded file
- ; with the same name as the caller id exists in
+ ; or set to no, it will be in the envelope. When enabled, if a recorded file
+ ; with the same name as the caller id exists in
; <astspooldir>/recordings/callerids, then that file will be played as a name
; rather than saying each digit as a phone number.
; cidinternalcontexts=intern ; Internal Context for Name Playback instead of
diff --git a/configs/samples/xmpp.conf.sample b/configs/samples/xmpp.conf.sample
index e3a4be142..4bd9a9275 100644
--- a/configs/samples/xmpp.conf.sample
+++ b/configs/samples/xmpp.conf.sample
@@ -62,4 +62,3 @@
; "default" will be used.
;forceoldssl=no ; Force the use of old-style SSL.
;keepalive=
-
diff --git a/configure b/configure
index 2dd027720..cc39661f6 100755
--- a/configure
+++ b/configure
@@ -18425,7 +18425,7 @@ LDFLAGS="${saved_sanitize_LDFLAGS}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wdeclaration-after-statement support" >&5
$as_echo_n "checking for -Wdeclaration-after-statement support... " >&6; }
-if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wdeclaration-after-statement -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
@@ -18477,7 +18477,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wno-format-truncation" >&5
$as_echo_n "checking for -Wno-format-truncation... " >&6; }
-if $(${CC} -O2 -Wno-format-truncation -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wno-format-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
AST_NO_FORMAT_TRUNCATION=-Wno-format-truncation
@@ -18490,7 +18490,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wshadow" >&5
$as_echo_n "checking for -Wshadow... " >&6; }
-if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wshadow -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
AST_SHADOW_WARNINGS=-Wshadow
@@ -28858,7 +28858,7 @@ else
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/local/bin$PATH_SEPARATOR/usr/local/share/pwlib/make
+for as_dir in /usr/local/bin$PATH_SEPARATOR/usr/local/share/ptlib/make$PATH_SEPARATOR/usr/local/share/pwlib/make
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@@ -28920,7 +28920,7 @@ else
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /usr/bin$PATH_SEPARATOR/usr/share/pwlib/make
+for as_dir in /usr/bin$PATH_SEPARATOR/usr/share/ptlib/make$PATH_SEPARATOR/usr/share/pwlib/make
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
diff --git a/configure.ac b/configure.ac
index c617cf084..e333fafa1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1196,7 +1196,7 @@ LDFLAGS="${saved_sanitize_LDFLAGS}"
AC_SUBST(AST_UNDEFINED_SANITIZER)
AC_MSG_CHECKING(for -Wdeclaration-after-statement support)
-if $(${CC} -Wdeclaration-after-statement -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wdeclaration-after-statement -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
AC_MSG_RESULT(yes)
AST_DECLARATION_AFTER_STATEMENT=-Wdeclaration-after-statement
else
@@ -1236,7 +1236,7 @@ fi
AC_SUBST(AST_NO_STRICT_OVERFLOW)
AC_MSG_CHECKING(for -Wno-format-truncation)
-if $(${CC} -O2 -Wno-format-truncation -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wno-format-truncation -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
AC_MSG_RESULT(yes)
AST_NO_FORMAT_TRUNCATION=-Wno-format-truncation
else
@@ -1246,7 +1246,7 @@ fi
AC_SUBST(AST_NO_FORMAT_TRUNCATION)
AC_MSG_CHECKING(for -Wshadow)
-if $(${CC} -Wshadow -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
+if $(${CC} -Wshadow -Werror -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
AC_MSG_RESULT(yes)
AST_SHADOW_WARNINGS=-Wshadow
else
diff --git a/contrib/README.festival b/contrib/README.festival
index 24912827c..bd9d17bde 100644
--- a/contrib/README.festival
+++ b/contrib/README.festival
@@ -1,15 +1,15 @@
app_festival is an application that allows one to send text-to-speech commands
to a background festival server, and to obtain the resulting waveform which
-gets sent down to the respective channel. app_festival also employs a waveform
-cache, so invariant text-to-speech strings ("Please press 1 for instructions")
-do not need to be dynamically generated all the time.
+gets sent down to the respective channel. app_festival also employs a waveform
+cache, so invariant text-to-speech strings ("Please press 1 for instructions")
+do not need to be dynamically generated all the time.
-You need :
+You need :
1) festival, patched to produce 8khz waveforms on output. Patch for Festival
-1.4.2 RELEASE are included. The patch adds a new command to festival
-(asterisk_tts).
+1.4.2 RELEASE are included. The patch adds a new command to festival
+(asterisk_tts).
It is possible to run Festival without patches in the source-code. Just
add this to your /etc/festival.scm or /usr/share/festival/festival/scm:
@@ -30,7 +30,7 @@ add this to your /etc/festival.scm or /usr/share/festival/festival/scm:
original mentioning of it]
2) You may wish to obtain and install the asterisk-perl
-module by James Golovich <james@gnuinter.net>, from
+module by James Golovich <james@gnuinter.net>, from
either CPAN, or his site: http://asterisk.gnuinter.net,
as this contains a good example of how variable text
can be tts'd via asterisk, namely the examples/tts-*.agi
@@ -41,7 +41,7 @@ can be ideal for these sorts of needs. For simpler usage,
fixed, pre-recorded messages may be more amenable for your
purposes.
-3) Before running asterisk, you have to run festival-server with a command
-like :
+3) Before running asterisk, you have to run festival-server with a command
+like :
/usr/local/festival/bin/festival --server > /dev/null 2>&1 &
diff --git a/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py b/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
index 3ea9ed153..650015f2a 100644
--- a/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
+++ b/contrib/ast-db-manage/cdr/versions/210693f3123d_create_cdr_table.py
@@ -61,4 +61,3 @@ def upgrade():
def downgrade():
op.drop_table('cdr')
-
diff --git a/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py b/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
index 215726fa0..9fa09f061 100644
--- a/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
+++ b/contrib/ast-db-manage/config/versions/1758e8bbf6b_increase_useragent_column_size.py
@@ -38,4 +38,3 @@ def upgrade():
def downgrade():
op.alter_column('sippeers', 'useragent', type_=sa.String(20))
-
diff --git a/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py b/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
index 59ddac7cd..084952d71 100644
--- a/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
+++ b/contrib/ast-db-manage/config/versions/28887f25a46f_create_queue_tables.py
@@ -138,4 +138,3 @@ def downgrade():
sa.Enum(name=QUEUE_STRATEGY_NAME).drop(op.get_bind(), checkfirst=False)
sa.Enum(name=QUEUE_AUTOPAUSE_NAME).drop(op.get_bind(), checkfirst=False)
-
diff --git a/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
index 91774c447..42f39779c 100644
--- a/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
+++ b/contrib/ast-db-manage/config/versions/4a6c67fa9b7a_add_fax_detect_timeout_option.py
@@ -20,4 +20,3 @@ def upgrade():
def downgrade():
op.drop_column('ps_endpoints', 'fax_detect_timeout')
-
diff --git a/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
index 033a999af..5fde44ffb 100644
--- a/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
+++ b/contrib/ast-db-manage/config/versions/837aa67461fb_ps_contacts_add_authenticate_qualify.py
@@ -31,4 +31,3 @@ def downgrade():
if op.get_context().bind.dialect.name == 'mssql':
op.drop_constraint('ck_ps_contacts_authenticate_qualify_yesno_values','ps_contacts')
op.drop_column('ps_contacts', 'authenticate_qualify')
-
diff --git a/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py b/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
index 4daa42215..fe689ff3c 100644
--- a/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
+++ b/contrib/ast-db-manage/config/versions/a6ef36f1309_ps_globals_add_ignore_uri_user_options.py
@@ -31,4 +31,3 @@ def downgrade():
if op.get_context().bind.dialect.name == 'mssql':
op.drop_constraint('ck_ps_globals_ignore_uri_user_options_yesno_values','ps_globals')
op.drop_column('ps_globals', 'ignore_uri_user_options')
-
diff --git a/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py b/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
index 740972103..fd0f35ad4 100644
--- a/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
+++ b/contrib/ast-db-manage/config/versions/d39508cb8d8_create_queue_rules.py
@@ -28,4 +28,3 @@ def downgrade():
########################## drop tables ###########################
op.drop_table('queue_rules')
-
diff --git a/contrib/ast-db-manage/env.py b/contrib/ast-db-manage/env.py
index 186423913..5036f4ccf 100644
--- a/contrib/ast-db-manage/env.py
+++ b/contrib/ast-db-manage/env.py
@@ -150,4 +150,3 @@ if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()
-
diff --git a/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py b/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
index f06cbf10e..2b8942761 100644
--- a/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
+++ b/contrib/ast-db-manage/voicemail/versions/39428242f7f5_increase_recording_column_size.py
@@ -41,4 +41,3 @@ def upgrade():
def downgrade():
op.alter_column('voicemail_messages', 'recording', type_=sa.LargeBinary)
-
diff --git a/contrib/asterisk-ices.xml b/contrib/asterisk-ices.xml
index abc028c75..afbc87db7 100644
--- a/contrib/asterisk-ices.xml
+++ b/contrib/asterisk-ices.xml
@@ -70,7 +70,7 @@
and samplerate given in the parameters to the oss input
module above or the remsaple/downmix section below. -->
- <encode>
+ <encode>
<quality>0</quality>
<samplerate>8000</samplerate>
<channels>1</channels>
@@ -80,9 +80,9 @@
<downmix>0</downmix>
<!-- resampling.
-
+
Set to the frequency (in Hz) you wish to resample to, -->
-
+
<!-- <resample>
<in-rate>44100</in-rate>
<out-rate>22050</out-rate>
diff --git a/contrib/init.d/rc.debian.asterisk b/contrib/init.d/rc.debian.asterisk
index 211737fa9..6c1474ac8 100755
--- a/contrib/init.d/rc.debian.asterisk
+++ b/contrib/init.d/rc.debian.asterisk
@@ -15,7 +15,7 @@
# - Added test for safe_asterisk
# - Changed "stop gracefully" to "stop now"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=asterisk
diff --git a/contrib/init.d/rc.mandriva.asterisk b/contrib/init.d/rc.mandriva.asterisk
index e095ccf75..8ac3aefe8 100755
--- a/contrib/init.d/rc.mandriva.asterisk
+++ b/contrib/init.d/rc.mandriva.asterisk
@@ -1,14 +1,14 @@
#!/bin/sh
-#
+#
# asterisk: Starts the asterisk service
-#
+#
# Version: @(#) /etc/rc.d/init.d/asterisk 1.0
-#
+#
# chkconfig: 2345 95 10
# description: Starts the asterisk service
-#
+#
# processname: asterisk
-#
+#
### BEGIN INIT INFO
# Provides: asterisk
@@ -75,7 +75,7 @@ if [ "$TTY" != "" ]; then
ASTARGS="${ASTARGS} -c"
fi
fi
-if [ ! -w ${DUMPDROP} ]; then
+if [ ! -w ${DUMPDROP} ]; then
echo "Cannot write to ${DUMPDROP}" >&2
exit 1
fi
@@ -93,7 +93,7 @@ SIGMSG=("None", "Hangup" "Interrupt" "Quit" "Illegal instruction" "Trace trap" "
run_asterisk()
{
- while :; do
+ while :; do
if [ "$TTY" != "" ]; then
cd /tmp
@@ -204,4 +204,3 @@ case "$1" in
esac
exit 0
-
diff --git a/contrib/init.d/rc.mandriva.zaptel b/contrib/init.d/rc.mandriva.zaptel
index 14a658b41..f55ef7f5e 100755
--- a/contrib/init.d/rc.mandriva.zaptel
+++ b/contrib/init.d/rc.mandriva.zaptel
@@ -105,4 +105,3 @@ case "$1" in
esac
exit 0
-
diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk
index 45ea9bccf..4b2a289b1 100755
--- a/contrib/init.d/rc.redhat.asterisk
+++ b/contrib/init.d/rc.redhat.asterisk
@@ -18,7 +18,7 @@
# - Added test for safe_asterisk
# - Verified SIGTERM issued by "killproc" ensures "stop gracefully"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
### BEGIN INIT INFO
# Provides: asterisk
diff --git a/contrib/init.d/rc.slackware.asterisk b/contrib/init.d/rc.slackware.asterisk
index 79c2b927f..5f5058f5e 100755
--- a/contrib/init.d/rc.slackware.asterisk
+++ b/contrib/init.d/rc.slackware.asterisk
@@ -60,4 +60,3 @@ case "$1" in
*)
echo "usage $0 start|stop|restart" ;;
esac
-
diff --git a/contrib/init.d/rc.suse.asterisk b/contrib/init.d/rc.suse.asterisk
index 16530968e..aa54930de 100755
--- a/contrib/init.d/rc.suse.asterisk
+++ b/contrib/init.d/rc.suse.asterisk
@@ -18,7 +18,7 @@
# - Added test for safe_asterisk
# - Verified SIGTERM issued by "killproc" ensures "stop gracefully"
# - Added support for -U and -G command line options
-# - Modified "reload" to call asterisk -rx 'reload'
+# - Modified "reload" to call asterisk -rx 'reload'
### BEGIN INIT INFO
# Provides: asterisk
diff --git a/contrib/scripts/README.messages-expire b/contrib/scripts/README.messages-expire
index 12f2b0e9c..40df8583e 100644
--- a/contrib/scripts/README.messages-expire
+++ b/contrib/scripts/README.messages-expire
@@ -1,10 +1,10 @@
messages-expire.pl
-messages-expire finds messages more than X days old and deletes them.
+messages-expire finds messages more than X days old and deletes them.
Because the older messages will be the lower numbers in the folder (msg0000
-will be older than msg0005), just deleting msg0000 will not work.
+will be older than msg0005), just deleting msg0000 will not work.
expire-messages then runs a routine that goes into every folder in every
-mailbox to reorganize. If the folder contains msg0000, no action is taken.
+mailbox to reorganize. If the folder contains msg0000, no action is taken.
If the folder does not, the rename routine takes the oldest message and
names it msg0000, the next oldest message and names it msg0001 and so on.
diff --git a/contrib/scripts/ast_tls_cert b/contrib/scripts/ast_tls_cert
index fe7d6ab1f..116f110e2 100755
--- a/contrib/scripts/ast_tls_cert
+++ b/contrib/scripts/ast_tls_cert
@@ -93,7 +93,7 @@ OPTIONS:
names.
-O Org name (cert field)
An informational string (company name)
- -o Output filename base (defaults to asterisk)
+ -o Output filename base (defaults to asterisk)
-d Output directory (defaults to the current directory)
Example:
diff --git a/contrib/scripts/astcli b/contrib/scripts/astcli
index 0ea245f14..cb5f81b5d 100755
--- a/contrib/scripts/astcli
+++ b/contrib/scripts/astcli
@@ -102,7 +102,7 @@ if ($action eq '-' || !defined $action || $action eq '') {
while (defined($_ = $term->readline($prompt))) {
(logoff() and exit) if $_ =~ /exit|quit/; # Give them a way to exit the "terminal"
print send_command($_) if $_ !~ m/^\s*$/;
- }
+ }
} else {
while (<>) {
chomp;
@@ -159,9 +159,8 @@ sub tab_completion {
foreach my $item (split /\s+/, $res) {
$items{$item}++ unless ($item eq '_EOF_' or $item eq '' or $item eq $lastword);
}
-
+
#print STDERR "\nword=\"$word\" buffer=\"$buffer\" offset=\"$offset\" res=\"$res\"\n";
return sort keys %items;
}
-
diff --git a/contrib/scripts/astgenkey.8 b/contrib/scripts/astgenkey.8
index b32bf5d91..520c44233 100644
--- a/contrib/scripts/astgenkey.8
+++ b/contrib/scripts/astgenkey.8
@@ -49,31 +49,31 @@
.ds f2\"
.ds f3\"
.ds f4\"
-'\" t
-.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+'\" t
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH ASTGENKEY 8 "May 14th, 2005" "Asterisk" "Linux Programmer's Manual"
.SH NAME
.B astgenkey \- generates keys for for Asterisk IAX2 RSA authentication
.SH SYNOPSIS
-.PP
+.PP
.B astgenkey
[ \-q ] [ \-n ] [ \fIkeyname\fP ]
.SH DESCRIPTION
-.B astgenkey
-This script generates an RSA private and public key pair in PEM format
-for use by Asterisk. The private key should be kept a secret, as it can
-be used to fake your system's identity. Thus by default (without the
-option
+.B astgenkey
+This script generates an RSA private and public key pair in PEM format
+for use by Asterisk. The private key should be kept a secret, as it can
+be used to fake your system's identity. Thus by default (without the
+option
.I \-n
-) the script will create a passphrase-encrypted copy of your secret key:
-without entering the passphrase you won't be able to use it.
+) the script will create a passphrase-encrypted copy of your secret key:
+without entering the passphrase you won't be able to use it.
-However if you want to use such a key with Asterisk, you'll have to start
+However if you want to use such a key with Asterisk, you'll have to start
it interactively, because the scripts that start asterisk can't use that
encrypted key.
-The key is identified by a name. If you don't write the name on the
+The key is identified by a name. If you don't write the name on the
command-line you'll be prompted for one. The outputs of the script are:
.I name\fB.pub
@@ -86,7 +86,7 @@ The public key: not secret. Send this to the other side.
The private key: secret.
.RE
-Those files should be copied to
+Those files should be copied to
.I /var/lib/asterisk/keys
(The private key: on your system. The public key: on other systems)
@@ -128,16 +128,16 @@ user "asterisk").
.RS
.RE
-.SH "SEE ALSO"
-asterisk(8), genrsa(1), rsa(1),
+.SH "SEE ALSO"
+asterisk(8), genrsa(1), rsa(1),
http://www.voip\-info.org/wiki\-Asterisk+iax+rsa+auth
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/autosupport b/contrib/scripts/autosupport
index 948f628c9..414cb49f6 100755
--- a/contrib/scripts/autosupport
+++ b/contrib/scripts/autosupport
@@ -208,26 +208,26 @@ if [ -e /var/run/asterisk.ctl ] || [ -e /var/run/asterisk/asterisk.ctl ]; then
fi
-for type in alerts applications firmwares lines networks phones translations;
-do
- echo "------------------" >> $OUTPUT;
- echo "DIGIUM PHONE: $type " >> $OUTPUT;
- echo "------------------" >> $OUTPUT;
- TEMP=$(asterisk -rx "digium_phones show $type");
+for type in alerts applications firmwares lines networks phones translations;
+do
+ echo "------------------" >> $OUTPUT;
+ echo "DIGIUM PHONE: $type " >> $OUTPUT;
+ echo "------------------" >> $OUTPUT;
+ TEMP=$(asterisk -rx "digium_phones show $type");
if [ "$type" = "lines" ];
then
NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-4)}');
if [ $NUM -gt 0 ];
then
- for l in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
- s/Lines \(Un-\)\?Mapped to Phones --- //g;
- s/ Internal//g;
+ for l in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
+ s/Lines \(Un-\)\?Mapped to Phones --- //g;
+ s/ Internal//g;
s/---- [a-zA-Z0-9 ]\+ ----$//;
s/--- //g');
do
- asterisk -rx "digium_phones show line $l" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
+ asterisk -rx "digium_phones show line $l" >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
done
else
echo "No configurations of type $type..." >> $OUTPUT;
@@ -238,28 +238,28 @@ do
for f in $(echo $TEMP | sed 's/--- Configured Firmware Options --- //');
do
asterisk -rx "digium_phones show firmware $f" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
done
elif [ "$type" = "translations" ];
then
for t in $(echo $TEMP | sed 's/--- Translation tables ---//');
do
- asterisk -rx "digium_phones show translation $t"
+ asterisk -rx "digium_phones show translation $t"
done
else
- NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-3)}');
- if [ $NUM -gt 0 ];
- then
- for t in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
+ NUM=$(echo $TEMP | tail -n 1 | awk -F' ' '{print $(NF-3)}');
+ if [ $NUM -gt 0 ];
+ then
+ for t in $(echo $TEMP | sed 's/^--- [[:alpha:]]\+ --- //;
s/---- [a-zA-Z0-9 ]\+ ----$//
- s/---- Digium Phones ---- //');
- do
- asterisk -rx "digium_phones show $(echo $type | sed 's/s\b//') $t" >> $OUTPUT;
- echo "--------" >> $OUTPUT;
- echo >> $OUTPUT;
- done;
- else
+ s/---- Digium Phones ---- //');
+ do
+ asterisk -rx "digium_phones show $(echo $type | sed 's/s\b//') $t" >> $OUTPUT;
+ echo "--------" >> $OUTPUT;
+ echo >> $OUTPUT;
+ done;
+ else
echo "No configurations of type $type..." >> $OUTPUT;
echo >> $OUTPUT;
fi;
diff --git a/contrib/scripts/autosupport.8 b/contrib/scripts/autosupport.8
index d0e9d1c93..9de1f6ef2 100644
--- a/contrib/scripts/autosupport.8
+++ b/contrib/scripts/autosupport.8
@@ -3,7 +3,7 @@
.B autosupport
\(em interactive script to provide Digium[tm]'s support with information
.SH SYNOPSIS
-.PP
+.PP
.B autosupport [OPTION] [prefix]
.SH DESCRIPTION
@@ -13,11 +13,11 @@ system for some run\-time and system information, and generate a backup
of Asterisk related configuration. An optional parameter for a prefix
may be specified which is typically used to specify a Digium Technical
Support Ticket ID.
-.PP
-The script requires root privileges to run, and writes all output in the
-home directory of the user running the script. For the purposes of this
+.PP
+The script requires root privileges to run, and writes all output in the
+home directory of the user running the script. For the purposes of this
document, this will be referred to as /root/ henceforth.
-.PP
+.PP
The system information is written to /root/digiuminfo.txt and the backup
of configuration (and the system information file) are written to a tarball
in /root/ with a base name of digium\-info. A Date Stamp will be appended,
@@ -38,7 +38,7 @@ Run without requiring user input
Show help about options
.SH FILES
.B /root/digiuminfo.txt
-.br
+.br
.B /root/digium\-info_YYYYMMDD.tar.gz
.SH SEE ALSO
@@ -50,7 +50,7 @@ Charles Moye and Trey Blancher. This manual page was written by
Tzafrir Cohen <tzafrir.cohen@xorcom.com> and updated by Charles Moye. Permission
is granted to copy, distribute and/or modify this document under the terms of
the GNU General Public License, Version 2 any later version published by the
-Free Software Foundation.
-.PP
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+Free Software Foundation.
+.PP
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/dbsep.cgi b/contrib/scripts/dbsep.cgi
index d15390c23..a9448e183 100755
--- a/contrib/scripts/dbsep.cgi
+++ b/contrib/scripts/dbsep.cgi
@@ -248,4 +248,3 @@ sub throw_error {
print STDERR $msg . "\n";
exit;
}
-
diff --git a/contrib/scripts/managerproxy.pl b/contrib/scripts/managerproxy.pl
index cdf79a239..9752cc654 100644
--- a/contrib/scripts/managerproxy.pl
+++ b/contrib/scripts/managerproxy.pl
@@ -1,15 +1,15 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl -w
#
# Simple Asterisk Manager Proxy, Version 1.01
# 2004-09-26
# Copyright (c) 2004 David C. Troy <dave@popvox.com>
#
# This code is based on Flash Operator Panel 'op_server.pl'
-# by Nicolas Gudino
-#  Copyright (C) 2004.
+# by Nicolás Gudiño
+# Copyright (C) 2004.
#
# David C. Troy <dave@popvox.com>
-# Nicolas Gudino <nicolas@house.com.ar>
+# Nicolás Gudiño <nicolas@house.com.ar>
#
# This program is free software, distributed under the terms of
# the GNU General Public License.
@@ -132,7 +132,7 @@ while (1)
{
log_debug("** New client connection", 16);
my $C = $m->accept;
- $proxy_clients{$C} = \$C;
+ $proxy_clients{$C} = \$C;
print "New Connection: $C\n" if $debug;
$O->add($C);
} else {
@@ -239,4 +239,3 @@ sub list_clients()
}
print "$cnt clients.\n\n";
}
-
diff --git a/contrib/scripts/messages-expire.pl b/contrib/scripts/messages-expire.pl
index 993997899..4862171b7 100644
--- a/contrib/scripts/messages-expire.pl
+++ b/contrib/scripts/messages-expire.pl
@@ -2,7 +2,7 @@
#
# Script to expire voicemail after a specified number of days
# by Steve Creel <screel@turbs.com>
-#
+#
# Directory housing the voicemail spool for asterisk
$dir = "/var/spool/asterisk/voicemail";
@@ -19,7 +19,7 @@ $unheardage = $age;
# Delete all files older than $age and $unheardage
-# (named msg????.??? to get the audio and txt files,
+# (named msg????.??? to get the audio and txt files,
# but we don't delete greetings or the user's name)
if($age==$unheardage) {
@@ -50,7 +50,7 @@ $fnbase = sprintf "msg%04d", $start;
# Make $dir include the context too
$dir.="/".$context;
-( -d $dir ) || die "Can't read list of mailboxes ($dir): $!\n";
+( -d $dir ) || die "Can't read list of mailboxes ($dir): $!\n";
@mailboxes = `ls -A1 $dir`;
chomp(@mailboxes);
diff --git a/contrib/scripts/retrieve_extensions_from_mysql.pl b/contrib/scripts/retrieve_extensions_from_mysql.pl
index ca195cfe5..0f7d3f7d3 100644
--- a/contrib/scripts/retrieve_extensions_from_mysql.pl
+++ b/contrib/scripts/retrieve_extensions_from_mysql.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl -Tw
# Use these commands to create the appropriate tables in MySQL
# If flags is 1 then this record is not included in the output extensions file
-#
+#
#CREATE TABLE extensions (
# context CHAR(20) DEFAULT 'default' NOT NULL,
# extension CHAR(20) NOT NULL,
@@ -92,7 +92,7 @@ foreach my $row ( @{ $result } ) {
}
my @resSet = @{$result};
- if ( $#resSet == -1 ) {
+ if ( $#resSet == -1 ) {
print "no results\n";
exit;
}
@@ -105,9 +105,8 @@ foreach my $row ( @{ $result } ) {
print EXTEN "\t; $result[5]" if defined $result[5];
print EXTEN "\n";
}
- }
+ }
print EXTEN "\n";
}
exit 0;
-
diff --git a/contrib/scripts/retrieve_extensions_from_sql.pl b/contrib/scripts/retrieve_extensions_from_sql.pl
index cf17d0351..47210ebf3 100644
--- a/contrib/scripts/retrieve_extensions_from_sql.pl
+++ b/contrib/scripts/retrieve_extensions_from_sql.pl
@@ -20,7 +20,7 @@
#
# Use these commands to create the appropriate SQL tables
# If flags is 1 then the record is not included in the output extensions file
-#
+#
#CREATE TABLE extensions (
# context VARCHAR(20) DEFAULT 'default' NOT NULL,
# extension VARCHAR(20) NOT NULL,
diff --git a/contrib/scripts/retrieve_sip_conf_from_mysql.pl b/contrib/scripts/retrieve_sip_conf_from_mysql.pl
index 03395a125..6bf775eac 100644
--- a/contrib/scripts/retrieve_sip_conf_from_mysql.pl
+++ b/contrib/scripts/retrieve_sip_conf_from_mysql.pl
@@ -78,16 +78,15 @@ foreach my $row ( @{ $result } ) {
}
my @resSet = @{$result};
- if ( $#resSet == -1 ) {
+ if ( $#resSet == -1 ) {
print "no results\n";
exit;
}
foreach my $row ( @{ $result } ) {
my @result = @{ $row };
print EXTEN "$result[0]=$result[1]\n";
- }
+ }
print EXTEN "$additional\n";
}
exit 0;
-
diff --git a/contrib/scripts/safe_asterisk.8 b/contrib/scripts/safe_asterisk.8
index b5395cd81..19e1728a6 100644
--- a/contrib/scripts/safe_asterisk.8
+++ b/contrib/scripts/safe_asterisk.8
@@ -3,30 +3,30 @@
.B safe_asterisk
\(em A wrapper to run the asterisk executable in a loop
.SH SYNOPSIS
-.PP
+.PP
.B safe_asterisk
.I [ asterisk_params ]
.SH DESCRIPTION
-.B safe_asterisk
-is a script that runs asterisk in a loop, which can be useful if you
+.B safe_asterisk
+is a script that runs asterisk in a loop, which can be useful if you
fear asterisk may crash.
-The script does not run in the background like a standard service. Rather,
+The script does not run in the background like a standard service. Rather,
it runs in its own linux virtual console (9, by default).
-It also uses the option '\-c' of asterisk(8) to avoid detaching asterisk
+It also uses the option '\-c' of asterisk(8) to avoid detaching asterisk
from that terminal.
-safe_asterisk also runs asterisk with unlimited core file size, and thus
+safe_asterisk also runs asterisk with unlimited core file size, and thus
asterisk will dump core in case of a crash.
-To get a "picture" of console 9, from another terminal (e.g: from a
+To get a "picture" of console 9, from another terminal (e.g: from a
remote shell session) you can use:
screendump 9
-The init script of the Debian package should be able to run safe_asterisk
-as the asterisk service, if so configured. See coments in
+The init script of the Debian package should be able to run safe_asterisk
+as the asterisk service, if so configured. See coments in
/etc/default/asterisk
.SH FILES
@@ -37,7 +37,7 @@ safe_asterisk runs in that directory, rather than in / as usual.
.B /tmp/core
.RS
-If core files were generated there, they may be
+If core files were generated there, they may be
.RE
.B /etc/asterisk/startup.d
@@ -48,22 +48,22 @@ or run any other steps that are needed for your system.
.RE
.SH BUGS
-While showing the output on a console is useful, using screen(1) as
+While showing the output on a console is useful, using screen(1) as
the terminal may be better.
The script does not read configuration from standard location under /etc
-It uses fixed locations under /tmp , and thus may be exposed to a
+It uses fixed locations under /tmp , and thus may be exposed to a
symlink attacks.
.SH SEE ALSO
asterisk(8), screendump(9)
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common\-licenses/GPL\-2.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common\-licenses/GPL\-2.
diff --git a/contrib/scripts/sip_nat_settings b/contrib/scripts/sip_nat_settings
index 09e0ac858..2a4fc07ea 100755
--- a/contrib/scripts/sip_nat_settings
+++ b/contrib/scripts/sip_nat_settings
@@ -3,16 +3,16 @@
# sip_nat_settings: generate NAT settings for sip.conf of an Asterisk system
# that is behind a NAT router.
#
-# This is a script to generate sane defaults for externip and localnet
-# of sip.conf. The output should be included in the [general] section of
+# This is a script to generate sane defaults for externip and localnet
+# of sip.conf. The output should be included in the [general] section of
# sip.conf .
#
-# Multiple network interfaces: If you have multiple network interfaces,
-# this script will generate a 'localnet' line for each of them that has a
-# broadcast (ipv4) address, except the loopback interface (lo). You can
+# Multiple network interfaces: If you have multiple network interfaces,
+# this script will generate a 'localnet' line for each of them that has a
+# broadcast (ipv4) address, except the loopback interface (lo). You can
# later rem-out all of those you don't need.
-#
-# Alternatively, provide a network interface as a parameter an a localnet
+#
+# Alternatively, provide a network interface as a parameter an a localnet
# line will only be generated for its network.
#
# Copyright (C) 2005 by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
diff --git a/contrib/upstart/asterisk.user.conf b/contrib/upstart/asterisk.user.conf
index 0161d2ee0..62d9296c3 100644
--- a/contrib/upstart/asterisk.user.conf
+++ b/contrib/upstart/asterisk.user.conf
@@ -37,4 +37,3 @@ end script
#console output
respawn
exec /usr/sbin/asterisk -U asterisk -g -f
-
diff --git a/contrib/utils/README.rawplayer b/contrib/utils/README.rawplayer
index 146898a5c..46211fd8b 100644
--- a/contrib/utils/README.rawplayer
+++ b/contrib/utils/README.rawplayer
@@ -23,15 +23,12 @@ and set up a class in musiconhold.conf like so:
default => custom:/var/lib/asterisk/holdmusic_raw,/usr/bin/rawplayer
-This is the most efficient way to implement moh because no cpu usage is required to
+This is the most efficient way to implement moh because no cpu usage is required to
explode the very compressed mp3 data then downsample the music to the 8khz mono on the fly
-instead the data is already stored on the disk in the format that asterisk needs it to be
-and the player does little more than pick up frames from the file and hand them to right
+instead the data is already stored on the disk in the format that asterisk needs it to be
+and the player does little more than pick up frames from the file and hand them to right
to the asterisk pipe where the audio is shared into all the channels who require it.
If you have cpu to spare and want a simple mp3 solution consider the format_mp3 from
asterisk-addons and the files based moh.
-
-
-
diff --git a/contrib/utils/eagi_proxy.c b/contrib/utils/eagi_proxy.c
index 0a96d5a2f..117d51e72 100644
--- a/contrib/utils/eagi_proxy.c
+++ b/contrib/utils/eagi_proxy.c
@@ -71,10 +71,10 @@ char window[WINSIZE];
#define WINBUF_NUM 2400 /* number of WINSIZE windows = 1 minute */
char* winbuf;
char *end, *bs, *be;
-/* winbuf - start of buffer
- * end - end of buffer
+/* winbuf - start of buffer
+ * end - end of buffer
* bs - start of data
- * be - end of data
+ * be - end of data
*/
int command_desc; /* command transfer descriptor */
@@ -107,7 +107,7 @@ void* readSignal(void* ptr);
int main()
{
int ret;
-
+
atexit(finalize);
setlinebuf(stdin);
@@ -118,7 +118,7 @@ int main()
bs=be=winbuf;
speech_desc=connect_to_host("localhost",SIGNAL_PORT);
- if(speech_desc<0)
+ if(speech_desc<0)
{
perror("signal socket");
return -1;
@@ -126,7 +126,7 @@ int main()
command_desc=connect_to_host("localhost",COMMAND_PORT);
- if(command_desc<0)
+ if(command_desc<0)
{
perror("command socket");
return -1;
@@ -137,14 +137,14 @@ int main()
pthread_create(&signal_thread,NULL,readSignal,NULL);
while(connected)
- {
+ {
pthread_mutex_lock(&command_mutex);
ret=read_some(command_desc,buf,BUFSIZE);
pthread_mutex_unlock(&command_mutex);
if(ret>0)
{
buf[ret]=0;
- printf("%s",buf);
+ printf("%s",buf);
}
}
@@ -155,7 +155,7 @@ void finalize()
{
close(command_desc);
close(speech_desc);
- free(winbuf);
+ free(winbuf);
}
void* readStdin(void* ptr)
@@ -168,7 +168,7 @@ void* readStdin(void* ptr)
write_buf(command_desc,buf,strlen(buf));
pthread_mutex_unlock(&command_mutex);
#endif
- if(feof(stdin) || buf[0]=='\n')
+ if(feof(stdin) || buf[0]=='\n')
{
break;
}
@@ -221,9 +221,9 @@ int connect_to_host(char* name, int port)
int res,desc;
int opts;
struct sockaddr_in host;
-
- /* get address */
+
+ /* get address */
if(!strcmp(name,"localhost"))
address=htonl(2130706433); /*127.0.0.1*/
else
@@ -232,7 +232,7 @@ int connect_to_host(char* name, int port)
if(address==(in_addr_t)-1)
{
host_entity = gethostbyname(name); /* search for the host under this name */
-
+
if(!host_entity)
{
fprintf(stderr,"EAGI proxy: Wrong address!\n"); /* can't find anything*/
@@ -250,11 +250,11 @@ int connect_to_host(char* name, int port)
}
memset((void*)&host,0,sizeof(struct sockaddr_in));
-
+
host.sin_family=AF_INET;
host.sin_port=htons(port);
host.sin_addr.s_addr=address;
-
+
res=connect(desc,(struct sockaddr*)&host,sizeof(host));
if(res<0)
{
@@ -292,15 +292,15 @@ int read_some(int desc, char* buffer, int size)
{
perror("Error reading");
connected=0;
- }
+ }
break;
}
- if(res==0)
+ if(res==0)
{
connected=0;
break;
}
-
+
buffer[i]=c;
i++;
}
@@ -385,7 +385,7 @@ int write_amap(int desc, char* buf, int size)
ret=write(desc,buf,size);
if(ret<0)
{
- if(errno!=EAGAIN)
+ if(errno!=EAGAIN)
{
perror("Error writing");
connected=0;
@@ -402,7 +402,7 @@ int write_amap(int desc, char* buf, int size)
void setnonblocking(int desc)
{
int opts;
-
+
opts = fcntl(desc,F_GETFL);
if(opts < 0)
{
diff --git a/contrib/utils/rawplayer.c b/contrib/utils/rawplayer.c
index 2733264a0..14f9de435 100644
--- a/contrib/utils/rawplayer.c
+++ b/contrib/utils/rawplayer.c
@@ -27,9 +27,9 @@ static int deliver_file(char *path, int fdout) {
}
if(fd)
close(fd);
- } else
+ } else
return -1;
-
+
return error;
}
@@ -43,4 +43,3 @@ int main(int argc, char *argv[]) {
exit(1);
}
}
-
diff --git a/contrib/utils/zones2indications.c b/contrib/utils/zones2indications.c
index 74c937527..d1def5300 100644
--- a/contrib/utils/zones2indications.c
+++ b/contrib/utils/zones2indications.c
@@ -18,7 +18,7 @@
/*! \file
* \brief print libtonozone data as Asterisk indications.conf
- */
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -27,7 +27,7 @@
#define PROGRAM "zones2indication"
-void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
+void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
int toneid) {
int i;
for (i=0; i<DAHDI_TONE_MAX; i++) {
@@ -40,7 +40,7 @@ void print_tone_zone_sound(struct ind_tone_zone *zone_data, const char* name,
void print_indications(struct ind_tone_zone *zone_data) {
int i;
-
+
printf (
"[%s]\n"
"; Source: libtonezone.\n"
@@ -48,8 +48,8 @@ void print_indications(struct ind_tone_zone *zone_data) {
"\n",
zone_data->country, zone_data->description
);
-
- printf(
+
+ printf(
"ringcadence = "
);
for(i=0; ; i++) {
@@ -60,7 +60,7 @@ void print_indications(struct ind_tone_zone *zone_data) {
printf("%d",zone_data->ringcadence[i]);
}
putchar('\n');
-
+
print_tone_zone_sound(zone_data, "dial", DAHDI_TONE_DIALTONE);
print_tone_zone_sound(zone_data, "busy", DAHDI_TONE_BUSY);
print_tone_zone_sound(zone_data, "ring", DAHDI_TONE_RINGTONE);
@@ -122,7 +122,7 @@ int main(int argc, char* argv[]){
int opt_print_all = 0;
int opt;
char* endptr = NULL;
-
+
while((opt = getopt(argc, argv, "ac:hn:")) != -1) {
switch(opt) {
case 'a':
@@ -146,7 +146,7 @@ int main(int argc, char* argv[]){
break;
}
}
-
+
/* If we got here, the user selected no option */
usage();
return 2;
diff --git a/doc/Makefile b/doc/Makefile
index 13f6f7639..636275904 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -3,4 +3,3 @@ all: asterisk.8
asterisk.8: asterisk.sgml
docbook2x-man asterisk.sgml
-
diff --git a/doc/README.txt b/doc/README.txt
index 5adea8687..e9b935cf0 100644
--- a/doc/README.txt
+++ b/doc/README.txt
@@ -1,6 +1,6 @@
The vast majority of the Asterisk project documentation has been moved to the
project wiki:
-
+
https://wiki.asterisk.org/
Asterisk release tarballs contain an export of the wiki in PDF and plain text
diff --git a/doc/api-1.6.0-changes.odt b/doc/api-1.6.0-changes.odt
deleted file mode 100644
index 0f37a33cb..000000000
--- a/doc/api-1.6.0-changes.odt
+++ /dev/null
Binary files differ
diff --git a/doc/api-1.6.2-changes.txt b/doc/api-1.6.2-changes.txt
deleted file mode 100644
index 34a3e5fc0..000000000
--- a/doc/api-1.6.2-changes.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-PBX changes
------------
- * If you use ast_build_timing() in your application, you should start calling
- ast_destroy_timing() upon destruction of the structure, to avoid a memory
- leak.
-
diff --git a/doc/astdb2bdb.8 b/doc/astdb2bdb.8
index 735bf2102..a50da220c 100644
--- a/doc/astdb2bdb.8
+++ b/doc/astdb2bdb.8
@@ -43,4 +43,3 @@ tools to use it independently of Asterisk.
astdb2bdb was written by Terry Wilson <twilson@digium.com>.
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>.
-
diff --git a/doc/astdb2sqlite3.8 b/doc/astdb2sqlite3.8
index 406d9665c..da8003cbe 100644
--- a/doc/astdb2sqlite3.8
+++ b/doc/astdb2sqlite3.8
@@ -36,4 +36,3 @@ which will create \fB/var/lib/asterisk/astdb.sqlite3\fR.
astdb2sqlite3 was written by Terry Wilson <twilson@digium.com>.
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>.
-
diff --git a/doc/asterisk.8 b/doc/asterisk.8
index 466a5ae91..3a88fc6fc 100644
--- a/doc/asterisk.8
+++ b/doc/asterisk.8
@@ -8,7 +8,7 @@
.TH "asterisk " 8 2011-02-08 "asterisk Trunk" ""
.SH NAME
asterisk
-\- All-purpose telephony server.
+\- All-purpose telephony server.
.SH SYNOPSIS
'nh
.fi
@@ -43,7 +43,7 @@ asterisk
.SH DESCRIPTION
\fBasterisk\fR is a full-featured telephony server which
provides Private Branch eXchange (PBX), Interactive Voice Response (IVR),
-Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying,
+Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying,
Conferencing, and a plethora of other telephony applications to a broad
range of telephony devices including packet voice (SIP, IAX2, MGCP, Skinny,
H.323, Unistim) devices (both endpoints and proxies), as well as traditional TDM
@@ -69,26 +69,26 @@ Running Asterisk starts the asterisk daemon (optionally running it
in the foreground). However running it with \*(T<\fB\-r\fR\*(T> or
\*(T<\fB\-R\fR\*(T> connects to an existing Asterisk instance through
a remote console.
-.TP
+.TP
\-B
Force the background of the terminal to be black, in order for
terminal colors to show up properly. Equivalent to
\*(T<\fBforceblackbackground = yes\fR\*(T> in
\*(T<\fIasterisk.conf\fR\*(T>. See also
\*(T<\fB\-n\fR\*(T> and \*(T<\fB\-W\fR\*(T>.
-.TP
+.TP
\-C \fIfile\fR
Use \*(T<\fIfile\fR\*(T> as master configuration file
instead of the default, /etc/asterisk/asterisk.conf
-.TP
+.TP
\-c
Provide a control console on the calling terminal. The
console is similar to the remote console provided by
-\*(T<\fB\-r\fR\*(T>. Specifying this option implies
-\fB\-f\fR and will cause asterisk to no longer
-fork or detach from the controlling terminal. Equivalent
+\*(T<\fB\-r\fR\*(T>. Specifying this option implies
+\fB\-f\fR and will cause asterisk to no longer
+fork or detach from the controlling terminal. Equivalent
to \*(T<\fBconsole = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>.
-.TP
+.TP
\-d
Enable extra debugging statements. This parameter may be used several
times, and each increases the debug level. Equivalent to \*(T<\fBdebug = \fR\*(T>\fInum\fR
@@ -97,68 +97,68 @@ level to \fInum\fR. When given at startup, this
option also implies \*(T<\fB\-f\fR\*(T> (no forking). However when
connecting to an existing Asterisk instance (\*(T<\fB\-r\fR\*(T> or
\*(T<\fB\-R\fR\*(T>), it may only increase the debug level.
-.TP
+.TP
\-e \fImemory\fR
-Limit the generation of new channels when the amount of free memory
+Limit the generation of new channels when the amount of free memory
has decreased to under \fImemory\fR megabytes.
Equivalent to \*(T<\fBminmemfree = \fR\*(T>\fImemory\fR in
\*(T<\fIasterisk.conf\fR\*(T>.
-.TP
+.TP
\-f
Do not fork or detach from controlling terminal. Overrides any
preceding specification of \fB\-F\fR on the command line.
Equivalent to \*(T<\fBnofork = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>.
See also \*(T<\fB\-c\fR\*(T>.
-.TP
+.TP
\-F
Always fork and detach from controlling terminal. Overrides any
preceding specification of \fB\-f\fR on the command line.
May also be used to prevent \*(T<\fB\-d\fR\*(T> and \*(T<\fB\-v\fR\*(T> to imply
no forking. Equivalent to \*(T<\fBalwaysfork = yes\fR\*(T> in \*(T<\fIasterisk.conf\fR\*(T>.
-.TP
+.TP
\-g
Remove resource limit on core size, thus forcing Asterisk to dump
core in the unlikely event of a segmentation fault or abort signal.
\fBNOTE:\fR in some cases this may be incompatible
with the \fB\-U\fR or \fB\-G\fR flags.
-.TP
+.TP
\-G \fIgroup\fR
Run as group \fIgroup\fR instead of the
calling group. \fBNOTE:\fR this requires substantial work
to be sure that Asterisk's environment has permission to write
the files required for its operation, including logs, its comm
socket, the asterisk database, etc.
-.TP
+.TP
\-h
Provide brief summary of command line arguments and terminate.
-.TP
+.TP
\-i
Prompt user to intialize any encrypted private keys for IAX2
secure authentication during startup.
-.TP
+.TP
\-I
Enable internal timing if DAHDI timing is available.
The default behaviour is that outbound packets are phase locked
to inbound packets. Enabling this switch causes them to be
locked to the internal DAHDI timer instead.
-.TP
+.TP
\-L \fIloadaverage\fR
Limits the maximum load average before rejecting new calls. This can
be useful to prevent a system from being brought down by terminating
too many simultaneous calls.
-.TP
+.TP
\-m
Temporarily mutes output to the console and logs. To return to normal,
use \fBlogger mute\fR.
-.TP
+.TP
\-M \fIvalue\fR
Limits the maximum number of calls to the specified value. This can
be useful to prevent a system from being brought down by terminating
too many simultaneous calls.
-.TP
+.TP
\-n
Disable ANSI colors even on terminals capable of displaying them.
-.TP
+.TP
\-p
If supported by the operating system (and executing as root),
attempt to run with realtime priority for increased performance and
@@ -169,41 +169,41 @@ Note: \fBastcanary\fR will run concurrently with
\fBasterisk\fR. If \fBastcanary\fR stops
running or is killed, \fBasterisk\fR will slow down to
normal process priority, to avoid locking up the machine.
-.TP
+.TP
\-q
Reduce default console output when running in conjunction with
console mode (\fB\-c\fR).
-.TP
+.TP
\-r
Instead of running a new Asterisk process, attempt to connect
to a running Asterisk process and provide a console interface
for controlling it.
-.TP
+.TP
\-R
Much like \fB\-r\fR. Instead of running a new Asterisk process, attempt to connect
to a running Asterisk process and provide a console interface
-for controlling it. Additionally, if connection to the Asterisk
+for controlling it. Additionally, if connection to the Asterisk
process is lost, attempt to reconnect for as long as 30 seconds.
-.TP
+.TP
\-s \fIsocket file name\fR
In combination with \fB\-r\fR, connect directly to a specified
Asterisk server socket.
-.TP
+.TP
\-t
-When recording files, write them first into a temporary holding directory,
+When recording files, write them first into a temporary holding directory,
then move them into the final location when done.
-.TP
+.TP
\-T
Add timestamp to all non-command related output going to the console
when running with verbose and/or logging to the console.
-.TP
+.TP
\-U \fIuser\fR
Run as user \fIuser\fR instead of the
calling user. \fBNOTE:\fR this requires substantial work
to be sure that Asterisk's environment has permission to write
the files required for its operation, including logs, its comm
socket, the asterisk database, etc.
-.TP
+.TP
\-v
Increase the level of verboseness on the console. The more times
\fB\-v\fR is specified, the more verbose the output is.
@@ -215,22 +215,22 @@ and \fB\-R\fR.
Note: This always sets the verbose level in the asterisk process,
even if it is running in the background. This will affect the size
of your log files.
-.TP
+.TP
\-V
Display version information and exit immediately.
-.TP
+.TP
\-W
Display colored terminal text as if the background were white
or otherwise light in color. Normally, terminal text is displayed
as if the background were black or otherwise dark in color.
-.TP
+.TP
\-x \fIcommand\fR
Connect to a running Asterisk process and execute a command on
a command line, passing any output through to standard out and
then terminating when the command execution completes. Implies
\fB\-r\fR when \fB\-R\fR is not explicitly
supplied.
-.TP
+.TP
\-X
Enables executing of includes via \fB#exec\fR directive.
This can be useful if You want to do \fB#exec\fR inside
diff --git a/doc/asterisk.sgml b/doc/asterisk.sgml
index c684d2245..60450a014 100644
--- a/doc/asterisk.sgml
+++ b/doc/asterisk.sgml
@@ -50,7 +50,7 @@
<para>
<command>asterisk</command> is a full-featured telephony server which
provides Private Branch eXchange (PBX), Interactive Voice Response (IVR),
- Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying,
+ Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying,
Conferencing, and a plethora of other telephony applications to a broad
range of telephony devices including packet voice (SIP, IAX2, MGCP, Skinny,
H.323, Unistim) devices (both endpoints and proxies), as well as traditional TDM
@@ -112,9 +112,9 @@
<para>
Provide a control console on the calling terminal. The
console is similar to the remote console provided by
- <option>-r</option>. Specifying this option implies
- <command>-f</command> and will cause asterisk to no longer
- fork or detach from the controlling terminal. Equivalent
+ <option>-r</option>. Specifying this option implies
+ <command>-f</command> and will cause asterisk to no longer
+ fork or detach from the controlling terminal. Equivalent
to <option>console = yes</option> in <filename>asterisk.conf</filename>.
</para>
</listitem>
@@ -137,7 +137,7 @@
<term>-e <replaceable class="parameter">memory</replaceable></term>
<listitem>
<para>
- Limit the generation of new channels when the amount of free memory
+ Limit the generation of new channels when the amount of free memory
has decreased to under <replaceable>memory</replaceable> megabytes.
Equivalent to <option>minmemfree = <replaceable>memory</replaceable></option> in
<filename>asterisk.conf</filename>.
@@ -296,7 +296,7 @@
<para>
Much like <command>-r</command>. Instead of running a new Asterisk process, attempt to connect
to a running Asterisk process and provide a console interface
- for controlling it. Additionally, if connection to the Asterisk
+ for controlling it. Additionally, if connection to the Asterisk
process is lost, attempt to reconnect for as long as 30 seconds.
</para>
</listitem>
@@ -314,7 +314,7 @@
<term>-t</term>
<listitem>
<para>
- When recording files, write them first into a temporary holding directory,
+ When recording files, write them first into a temporary holding directory,
then move them into the final location when done.
</para>
</listitem>
@@ -437,12 +437,12 @@
<title>AUTHOR</title>
<para>
<author>
- <firstname>Mark Spencer &lt;markster@digium.com&gt;</firstname>
+ <firstname>Mark Spencer &lt;markster@digium.com&gt;</firstname>
</author>
</para>
<para>
<author>
- <firstname>Countless other contributors, see CREDITS with distribution for more information.</firstname>
+ <firstname>Countless other contributors, see CREDITS with distribution for more information.</firstname>
</author>
</para>
</refsect1>
diff --git a/doc/lang/language-criteria.txt b/doc/lang/language-criteria.txt
index 2ad5ab1e1..4020a82ea 100644
--- a/doc/lang/language-criteria.txt
+++ b/doc/lang/language-criteria.txt
@@ -87,7 +87,7 @@ Example:
bash-3.2# more CREDITS
Recorded by:
Allison Smith (https://www.theivrvoice.com)
-
+
Financial Contributions by: Digium, Inc. (https://www.digium.com)
bash-3.2#
diff --git a/formats/Makefile b/formats/Makefile
index 069d30be4..08c627fa3 100644
--- a/formats/Makefile
+++ b/formats/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for file format modules
#
# Copyright (C) 1999-2006, Digium, Inc.
diff --git a/formats/format_g719.c b/formats/format_g719.c
index e27822df7..505ab97f6 100644
--- a/formats/format_g719.c
+++ b/formats/format_g719.c
@@ -26,7 +26,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -158,4 +158,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "ITU G.719",
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND
);
-
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 9b770336d..ffff83410 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -16,11 +16,11 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
*
* \brief Old-style G.723.1 frame/timestamp format.
- *
+ *
* \arg Extensions: g723, g723sf
* \ingroup formats
*/
@@ -28,7 +28,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -46,7 +46,7 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext)
int delay;
/* Read the delay for the next packet, and schedule again if necessary */
/* XXX is this ignored ? */
- if (fread(&delay, 1, 4, s->f) == 4)
+ if (fread(&delay, 1, 4, s->f) == 4)
delay = ntohl(delay);
else
delay = -1;
@@ -60,7 +60,7 @@ static struct ast_frame *g723_read(struct ast_filestream *s, int *whennext)
if (size > G723_MAX_SIZE) {
ast_log(LOG_WARNING, "Size %d is invalid\n", size);
/* The file is apparently no longer any good, as we
- shouldn't ever get frames even close to this
+ shouldn't ever get frames even close to this
size. */
return NULL;
}
@@ -101,7 +101,7 @@ static int g723_write(struct ast_filestream *s, struct ast_frame *f)
if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
ast_log(LOG_WARNING, "Unable to write frame: res=%d (%s)\n", res, strerror(errno));
return -1;
- }
+ }
return 0;
}
diff --git a/formats/format_g726.c b/formats/format_g726.c
index 50b558ec4..8379925c2 100644
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -19,7 +19,7 @@
/*!\file
*
* \brief Headerless G.726 (16/24/32/40kbps) data format for Asterisk.
- *
+ *
* File name extensions:
* \arg 40 kbps: g726-40
* \arg 32 kbps: g726-32
@@ -31,7 +31,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -51,7 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define BUF_SIZE (5*FRAME_TIME) /* max frame size in bytes ? */
/* Frame sizes in bytes */
-static int frame_size[4] = {
+static int frame_size[4] = {
FRAME_TIME * 5,
FRAME_TIME * 4,
FRAME_TIME * 3,
@@ -143,12 +143,12 @@ static int g726_write(struct ast_filestream *s, struct ast_frame *f)
struct g726_desc *fs = (struct g726_desc *)s->_private;
if (f->datalen % frame_size[fs->rate]) {
- ast_log(LOG_WARNING, "Invalid data length %d, should be multiple of %d\n",
+ ast_log(LOG_WARNING, "Invalid data length %d, should be multiple of %d\n",
f->datalen, frame_size[fs->rate]);
return -1;
}
if ((res = fwrite(f->data.ptr, 1, f->datalen, s->f)) != f->datalen) {
- ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n",
+ ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n",
res, frame_size[fs->rate], strerror(errno));
return -1;
}
diff --git a/formats/format_g729.c b/formats/format_g729.c
index 35c68bd0c..946bbc52c 100644
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -22,14 +22,14 @@
* \note This is not an encoder/decoder. The codec for g729 is only
* available with a commercial license from Digium, due to patent
* restrictions. Check http://www.digium.com for information.
- * \arg Extensions: g729
+ * \arg Extensions: g729
* \ingroup formats
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -88,7 +88,7 @@ static int g729_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
cur = ftello(fs->f);
fseeko(fs->f, 0, SEEK_END);
max = ftello(fs->f);
-
+
bytes = BUF_SIZE * (sample_offset / G729A_SAMPLES);
if (whence == SEEK_SET)
offset = bytes;
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index 783d9553e..b16c8aadd 100644
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -26,7 +26,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_h263.c b/formats/format_h263.c
index be8e1df7a..ba1f331cc 100644
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -27,7 +27,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_h264.c b/formats/format_h264.c
index 30604004e..9c89af8a0 100644
--- a/formats/format_h264.c
+++ b/formats/format_h264.c
@@ -27,7 +27,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c
index d4fbe96e7..42d2281d0 100644
--- a/formats/format_ilbc.c
+++ b/formats/format_ilbc.c
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Brian K. West <brian@bkw.org>
- *
+ *
* Copyright (C) 1999 - 2005, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
@@ -85,7 +85,7 @@ static int ilbc_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
cur = ftello(fs->f);
fseeko(fs->f, 0, SEEK_END);
max = ftello(fs->f);
-
+
bytes = ILBC_BUF_SIZE * (sample_offset / ILBC_SAMPLES);
if (whence == SEEK_SET)
offset = bytes;
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c
index 04125d7bd..5ae77e37d 100644
--- a/formats/format_jpeg.c
+++ b/formats/format_jpeg.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief JPEG File format support.
- *
+ *
* \arg File name extension: jpeg, jpg
* \ingroup formats
*/
@@ -27,7 +27,7 @@
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index a7a9447e7..cb0798ae2 100644
--- a/formats/format_ogg_vorbis.c
+++ b/formats/format_ogg_vorbis.c
@@ -64,13 +64,13 @@ struct ogg_vorbis_desc { /* format specific parameters */
ogg_stream_state os;
ogg_page og;
ogg_packet op;
-
+
/* structures for handling Vorbis audio data */
vorbis_info vi;
vorbis_comment vc;
vorbis_dsp_state vd;
vorbis_block vb;
-
+
/*! \brief Indicates whether this filestream is set up for reading or writing. */
int writing;
@@ -372,7 +372,7 @@ static off_t ogg_vorbis_tell(struct ast_filestream *fs)
* \brief Seek to a specific position in an OGG/Vorbis filestream.
* \param fs The filestream to take action on.
* \param sample_offset New position for the filestream, measured in 8KHz samples.
- * \param whence Location to measure
+ * \param whence Location to measure
* \return 0 on success, -1 on failure.
*/
static int ogg_vorbis_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 7b0648234..8710370ad 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -20,14 +20,14 @@
*
* \brief Flat, binary, ulaw PCM file format.
* \arg File name extension: alaw, al, alw, pcm, ulaw, ul, mu, ulw, g722, au
- *
+ *
* \ingroup formats
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -195,7 +195,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
/* Check if we have written to this position yet. If we have, then increment pos by one frame
* for some degree of protection against receiving packets in the same clock tick.
*/
-
+
fstat(fileno(fs->f), &stat_buf );
if (stat_buf.st_size > fpos )
fpos += f->datalen; /* Incrementing with the size of this current frame */
@@ -229,7 +229,7 @@ static int pcm_write(struct ast_filestream *fs, struct ast_frame *f)
}
}
#endif /* REALTIME_WRITE */
-
+
if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
return -1;
diff --git a/formats/format_siren14.c b/formats/format_siren14.c
index 3e42bef9a..b63ec2ad6 100644
--- a/formats/format_siren14.c
+++ b/formats/format_siren14.c
@@ -26,7 +26,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_siren7.c b/formats/format_siren7.c
index f1bde0012..c459cefca 100644
--- a/formats/format_siren7.c
+++ b/formats/format_siren7.c
@@ -26,7 +26,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_sln.c b/formats/format_sln.c
index 48bad8ae7..b81046cc6 100644
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -24,7 +24,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_vox.c b/formats/format_vox.c
index 813dabf21..6073a131b 100644
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -20,14 +20,14 @@
*
* \brief Flat, binary, ADPCM vox file format.
* \arg File name extensions: vox
- *
+ *
* \ingroup formats
*/
/*** MODULEINFO
<support_level>extended</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -124,7 +124,7 @@ static off_t vox_tell(struct ast_filestream *fs)
{
off_t offset;
offset = ftello(fs->f) << 1;
- return offset;
+ return offset;
}
static struct ast_format_def vox_f = {
diff --git a/formats/format_wav.c b/formats/format_wav.c
index cead61c5b..9e92e6a35 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -23,7 +23,7 @@
* \arg File name extension: wav (lower case)
* \ingroup formats
*/
-
+
/*** MODULEINFO
<support_level>core</support_level>
***/
@@ -168,9 +168,9 @@ static int check_header(FILE *f, int hz)
}
/* Skip any facts and get the first data block */
for(;;)
- {
+ {
char buf[4];
-
+
/* Begin data chunk */
if (fread(&buf, 1, 4, f) != 4) {
ast_log(LOG_WARNING, "Read failed (block header format)\n");
@@ -189,7 +189,7 @@ static int check_header(FILE *f, int hz)
return -1;
continue;
}
- if(memcmp(buf, "data", 4) == 0 )
+ if(memcmp(buf, "data", 4) == 0 )
break;
ast_log(LOG_DEBUG, "Skipping unknown block '%.4s'\n", buf);
if (fseek(f,data,SEEK_CUR) == -1 ) {
@@ -202,7 +202,7 @@ static int check_header(FILE *f, int hz)
truelength = lseek(fd, 0, SEEK_END);
lseek(fd, curpos, SEEK_SET);
truelength -= curpos;
-#endif
+#endif
return data;
}
@@ -210,7 +210,7 @@ static int update_header(FILE *f)
{
off_t cur,end;
int datalen,filelen,bytes;
-
+
cur = ftello(f);
fseek(f, 0, SEEK_END);
end = ftello(f);
@@ -219,7 +219,7 @@ static int update_header(FILE *f)
datalen = htoll(bytes);
/* chunk size is bytes of data plus 36 bytes of header */
filelen = htoll(36 + bytes);
-
+
if (cur < 0) {
ast_log(LOG_WARNING, "Unable to find our position\n");
return -1;
@@ -434,7 +434,7 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
return -1;
}
tmpi = f->data.ptr;
- for (x=0; x < f->datalen/2; x++)
+ for (x=0; x < f->datalen/2; x++)
tmp[x] = (tmpi[x] << 8) | ((tmpi[x] & 0xff00) >> 8);
if ((res = fwrite(tmp, 1, f->datalen, fs->f)) != f->datalen ) {
@@ -447,7 +447,7 @@ static int wav_write(struct ast_filestream *fs, struct ast_frame *f)
}
s->bytes += f->datalen;
-
+
return 0;
}
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index 423dfe48a..1329d1a06 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Save GSM in the proprietary Microsoft format.
- *
+ *
* Microsoft WAV format (Proprietary GSM)
* \arg File name extension: WAV,wav49 (Upper case WAV, lower case is another format)
* This format can be played on Windows systems, used for
@@ -30,7 +30,7 @@
/*** MODULEINFO
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/msgsm.h b/formats/msgsm.h
index ba7738f1d..bb46a3a61 100644
--- a/formats/msgsm.h
+++ b/formats/msgsm.h
@@ -115,7 +115,7 @@ static inline void conv66(gsm_byte * d, wav_byte * c) {
gsm_byte frame_chain;
unsigned int sr;
unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
-
+
readGSM_33(d);
sr = 0;
sr = (sr >> 6) | (LARc[0] << 10);
@@ -459,7 +459,7 @@ static inline void conv65( wav_byte * c, gsm_byte * d){
unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4];
/* silence bogus compiler warning */
unsigned int xmc[13*4] = { 0, };
-
+
sr = *c++;
LARc[0] = sr & 0x3f; sr >>= 6;
sr |= (uword)*c++ << 2;
diff --git a/funcs/Makefile b/funcs/Makefile
index 1caa7c3e4..3f65070e3 100644
--- a/funcs/Makefile
+++ b/funcs/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for dialplan functions
#
# Copyright (C) 2005-2006, Digium, Inc.
diff --git a/funcs/func_audiohookinherit.c b/funcs/func_audiohookinherit.c
index 737f04e18..2d79abaaf 100644
--- a/funcs/func_audiohookinherit.c
+++ b/funcs/func_audiohookinherit.c
@@ -87,4 +87,3 @@ static int load_module(void)
}
}
AST_MODULE_INFO_STANDARD_DEPRECATED(ASTERISK_GPL_KEY, "Audiohook inheritance placeholder function");
-
diff --git a/funcs/func_base64.c b/funcs/func_base64.c
index 1a7619d91..5575f0778 100644
--- a/funcs/func_base64.c
+++ b/funcs/func_base64.c
@@ -18,7 +18,7 @@
/*! \file
*
* \brief Use the base64 as functions
- *
+ *
* \ingroup functions
*/
diff --git a/funcs/func_blacklist.c b/funcs/func_blacklist.c
index bb045059b..cd57e9975 100644
--- a/funcs/func_blacklist.c
+++ b/funcs/func_blacklist.c
@@ -23,7 +23,7 @@
* \author Mark Spencer <markster@digium.com>
*
* \ingroup functions
- *
+ *
*/
/*** MODULEINFO
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 4db985ecb..aabd70fea 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -980,7 +980,7 @@ static int callerpres_write(struct ast_channel *chan, const char *cmd, char *dat
static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
char *parms;
- struct ast_party_members member;
+ struct ast_party_members member = { 0, };
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(member); /*!< Member name */
AST_APP_ARG(cid); /*!< Optional caller id to parse instead of from the channel. */
@@ -1137,8 +1137,8 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data,
enum ID_FIELD_STATUS status;
char *val;
char *parms;
- struct ast_party_func_args args;
- struct ast_party_members member;
+ struct ast_party_func_args args = { 0, };
+ struct ast_party_members member = { 0, };
if (!value || !chan) {
return -1;
@@ -1293,7 +1293,7 @@ static int callerid_write(struct ast_channel *chan, const char *cmd, char *data,
*/
static int connectedline_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
- struct ast_party_members member;
+ struct ast_party_members member = { 0, };
char *read_what;
enum ID_FIELD_STATUS status;
@@ -1361,8 +1361,8 @@ static int connectedline_write(struct ast_channel *chan, const char *cmd, char *
char *val;
char *parms;
void (*set_it)(struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update);
- struct ast_party_func_args args;
- struct ast_party_members member;
+ struct ast_party_func_args args = { 0, };
+ struct ast_party_members member = { 0, };
struct ast_flags opts;
char *opt_args[CONNECTED_LINE_OPT_ARG_ARRAY_SIZE];
enum ID_FIELD_STATUS status;
@@ -1466,7 +1466,7 @@ static int connectedline_write(struct ast_channel *chan, const char *cmd, char *
*/
static int redirecting_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
- struct ast_party_members member;
+ struct ast_party_members member = { 0, };
char *read_what;
const struct ast_party_redirecting *ast_redirecting;
enum ID_FIELD_STATUS status;
@@ -1603,8 +1603,8 @@ static int redirecting_write(struct ast_channel *chan, const char *cmd, char *da
char *val;
char *parms;
void (*set_it)(struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update);
- struct ast_party_func_args args;
- struct ast_party_members member;
+ struct ast_party_func_args args = { 0, };
+ struct ast_party_members member = { 0, };
struct ast_flags opts;
char *opt_args[REDIRECTING_OPT_ARG_ARRAY_SIZE];
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index 3005d31b1..793ea3f89 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -69,8 +69,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
Gets or sets variables on the master channel
</synopsis>
<description>
- <para>Allows access to the channel which created the current channel, if any. If the channel is already
- a master channel, then accesses local channel variables.</para>
+ <para>Allows access to the oldest channel associated with the current
+ channel if it still exists. If the channel is the master channel or
+ the master channel no longer exists then access local channel variables
+ instead. In other words, the master channel is the channel identified by
+ the channel's linkedid.</para>
</description>
</function>
<function name="CHANNEL" language="en_US">
diff --git a/funcs/func_config.c b/funcs/func_config.c
index ca6dad1a1..c1f468540 100644
--- a/funcs/func_config.c
+++ b/funcs/func_config.c
@@ -23,7 +23,7 @@
*
* \author Russell Bryant <russell@digium.com>
* \author Tilghman Lesher <func_config__200803@the-tilghman.com>
- *
+ *
* \ingroup functions
*/
@@ -107,7 +107,7 @@ static int config_function_read(struct ast_channel *chan, const char *cmd, char
ast_log(LOG_ERROR, "AST_CONFIG() requires a category\n");
return -1;
}
-
+
if (ast_strlen_zero(args.variable)) {
ast_log(LOG_ERROR, "AST_CONFIG() requires a variable\n");
return -1;
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index c7a1c6e42..b1bb75964 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -18,18 +18,18 @@
*/
/*! \file
- *
+ *
* \brief Curl - Load a URL
*
* \author Tilghman Lesher <curl-20050919@the-tilghman.com>
*
- * \note Brian Wilkins <bwilkins@cfl.rr.com> (Added POST option)
+ * \note Brian Wilkins <bwilkins@cfl.rr.com> (Added POST option)
*
* \extref Depends on the CURL library - http://curl.haxx.se/
- *
+ *
* \ingroup functions
*/
-
+
/*** MODULEINFO
<depend>curl</depend>
<support_level>core</support_level>
@@ -881,4 +881,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Load external URL",
.unload = unload_module,
.load_pri = AST_MODPRI_REALTIME_DEPEND2,
);
-
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 4b6dc9d48..693c67595 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -16,7 +16,7 @@
*/
/*! \file
- *
+ *
* \brief CUT function
*
* \author Tilghman Lesher <app_cut__v003@the-tilghman.com>
@@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*** DOCUMENTATION
<function name="SORT" language="en_US">
<synopsis>
- Sorts a list of key/vals into a list of keys, based upon the vals.
+ Sorts a list of key/vals into a list of keys, based upon the vals.
</synopsis>
<syntax>
<parameter name="keyval" required="true" argsep=":">
@@ -61,7 +61,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</function>
<function name="CUT" language="en_US">
<synopsis>
- Slices and dices strings, based upon a named delimiter.
+ Slices and dices strings, based upon a named delimiter.
</synopsis>
<syntax>
<parameter name="varname" required="true">
@@ -77,7 +77,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</syntax>
<description>
<para>Cut out information from a string (<replaceable>varname</replaceable>), based upon a named delimiter.</para>
- </description>
+ </description>
</function>
***/
diff --git a/funcs/func_db.c b/funcs/func_db.c
index b56fef9f5..37c760045 100644
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
@@ -1,9 +1,9 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 2005-2006, Russell Bryant <russelb@clemson.edu>
+ * Copyright (C) 2005-2006, Russell Bryant <russelb@clemson.edu>
*
- * func_db.c adapted from the old app_db.c, copyright by the following people
+ * func_db.c adapted from the old app_db.c, copyright by the following people
* Copyright (C) 2005, Mark Spencer <markster@digium.com>
* Copyright (C) 2003, Jefferson Noxon <jeff@debian.org>
*
diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c
index 21759bc33..48f5c08c4 100644
--- a/funcs/func_devstate.c
+++ b/funcs/func_devstate.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2007, Digium, Inc.
*
- * Russell Bryant <russell@digium.com>
+ * Russell Bryant <russell@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,7 +20,7 @@
*
* \brief Manually controlled blinky lights
*
- * \author Russell Bryant <russell@digium.com>
+ * \author Russell Bryant <russell@digium.com>
*
* \ingroup functions
*
diff --git a/funcs/func_dialplan.c b/funcs/func_dialplan.c
index 0f3c0f823..e1a4f7a2c 100644
--- a/funcs/func_dialplan.c
+++ b/funcs/func_dialplan.c
@@ -20,7 +20,7 @@
*
* \author Gregory Nietsky AKA irroot <gregory@networksentry.co.za>
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \ingroup functions
*/
diff --git a/funcs/func_enum.c b/funcs/func_enum.c
index 4b5fb9f7b..95e8d21f4 100644
--- a/funcs/func_enum.c
+++ b/funcs/func_enum.c
@@ -81,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="resultnum" required="true">
<para>The number of the result that you want to retrieve.</para>
<para>Results start at <literal>1</literal>. If this argument is specified
- as <literal>getnum</literal>, then it will return the total number of results
+ as <literal>getnum</literal>, then it will return the total number of results
that are available or -1 on error.</para>
</parameter>
</syntax>
@@ -89,7 +89,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<para>This function will retrieve results from a previous use
of the ENUMQUERY function.</para>
</description>
- </function>
+ </function>
<function name="ENUMLOOKUP" language="en_US">
<synopsis>
General or specific querying of NAPTR records for ENUM or ENUM-like DNS pointers.
@@ -119,10 +119,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<option name="d">
<para>for a direct DNS lookup without any flipping of digits.</para>
</option>
- </optionlist>
+ </optionlist>
</parameter>
<parameter name="record#">
- <para>If no <replaceable>record#</replaceable> is given,
+ <para>If no <replaceable>record#</replaceable> is given,
defaults to <literal>1</literal>.</para>
</parameter>
<parameter name="zone-suffix">
@@ -226,7 +226,7 @@ struct enum_result_datastore {
unsigned int id;
};
-static void erds_destroy(struct enum_result_datastore *data)
+static void erds_destroy(struct enum_result_datastore *data)
{
int k;
@@ -240,7 +240,7 @@ static void erds_destroy(struct enum_result_datastore *data)
ast_free(data);
}
-static void erds_destroy_cb(void *data)
+static void erds_destroy_cb(void *data)
{
struct enum_result_datastore *erds = data;
erds_destroy(erds);
@@ -249,7 +249,7 @@ static void erds_destroy_cb(void *data)
static const struct ast_datastore_info enum_result_datastore_info = {
.type = "ENUMQUERY",
.destroy = erds_destroy_cb,
-};
+};
static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
@@ -270,7 +270,7 @@ static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data
}
parse = ast_strdupa(data);
-
+
AST_STANDARD_APP_ARGS(args, parse);
if (!chan) {
@@ -308,9 +308,9 @@ static int enum_query_read(struct ast_channel *chan, const char *cmd, char *data
ast_channel_lock(chan);
ast_channel_datastore_add(chan, datastore);
ast_channel_unlock(chan);
-
+
res = 0;
-
+
finish:
return res;
@@ -323,7 +323,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
char *parse, *p;
unsigned int num;
int res = -1, k;
- AST_DECLARE_APP_ARGS(args,
+ AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(id);
AST_APP_ARG(resultnum);
);
@@ -337,7 +337,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
ast_log(LOG_ERROR, "ENUMRESULT can not be used without a channel!\n");
goto finish;
}
-
+
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
@@ -383,7 +383,7 @@ static int enum_result_read(struct ast_channel *chan, const char *cmd, char *dat
continue;
p = strchr(erds->context->naptr_rrs[k].result, ':');
-
+
if (p && strcasecmp(erds->context->naptr_rrs[k].tech, "ALL"))
ast_copy_string(buf, p + 1, len);
else
diff --git a/funcs/func_extstate.c b/funcs/func_extstate.c
index 940c455c2..75771082e 100644
--- a/funcs/func_extstate.c
+++ b/funcs/func_extstate.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2007, Digium, Inc.
*
- * Modified from func_devstate.c by Russell Bryant <russell@digium.com>
+ * Modified from func_devstate.c by Russell Bryant <russell@digium.com>
* Adam Gundy <adam@starsilk.net>
* See http://www.asterisk.org for more information about
@@ -21,7 +21,7 @@
*
* \brief Get the state of a hinted extension for dialplan control
*
- * \author Adam Gundy <adam@starsilk.net>
+ * \author Adam Gundy <adam@starsilk.net>
*
* \ingroup functions
*/
@@ -44,7 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<function name="EXTENSION_STATE" language="en_US">
<synopsis>
Get an extension's state.
- </synopsis>
+ </synopsis>
<syntax argsep="@">
<parameter name="extension" required="true" />
<parameter name="context">
@@ -117,7 +117,7 @@ static int extstate_read(struct ast_channel *chan, const char *cmd, char *data,
return -1;
}
- ast_copy_string(buf,
+ ast_copy_string(buf,
ast_extstate_str(ast_extension_state(chan, context, exten)), len);
return 0;
diff --git a/funcs/func_frame_trace.c b/funcs/func_frame_trace.c
index 512d685f1..80156fee0 100644
--- a/funcs/func_frame_trace.c
+++ b/funcs/func_frame_trace.c
@@ -429,5 +429,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Frame Trace for internal ast_frame debugging.");
-
-
diff --git a/funcs/func_global.c b/funcs/func_global.c
index a2329c46e..1e58e75c1 100644
--- a/funcs/func_global.c
+++ b/funcs/func_global.c
@@ -72,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<para>Implements a shared variable area, in which you may share variables between
channels.</para>
<para>The variables used in this space are separate from the general namespace of
- the channel and thus <variable>SHARED(foo)</variable> and <variable>foo</variable>
+ the channel and thus <variable>SHARED(foo)</variable> and <variable>foo</variable>
represent two completely different variables, despite sharing the same name.</para>
<para>Finally, realize that there is an inherent race between channels operating
at the same time, fiddling with each others' internal variables, which is why
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index fd775d994..5c6439ba4 100644
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -17,7 +17,7 @@
/*! \file
*
* \brief Channel group related dialplan functions
- *
+ *
* \ingroup functions
*/
@@ -81,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</parameter>
</syntax>
<description>
- <para><replaceable>category</replaceable> can be employed for more fine grained group management. Each channel
+ <para><replaceable>category</replaceable> can be employed for more fine grained group management. Each channel
can only be member of exactly one group per <replaceable>category</replaceable>.</para>
</description>
</function>
@@ -195,14 +195,14 @@ static int group_function_read(struct ast_channel *chan, const char *cmd,
if (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, data))
break;
}
-
+
if (gi) {
ast_copy_string(buf, gi->group, len);
ret = 0;
}
-
+
ast_app_group_list_unlock();
-
+
return ret;
}
@@ -267,7 +267,7 @@ static int group_list_function_read(struct ast_channel *chan, const char *cmd,
snprintf(tmp1, sizeof(tmp1), "%s", gi->group);
}
}
-
+
ast_app_group_list_unlock();
ast_copy_string(buf, tmp1, len);
diff --git a/funcs/func_iconv.c b/funcs/func_iconv.c
index 0a8e57dd7..f2ff80389 100644
--- a/funcs/func_iconv.c
+++ b/funcs/func_iconv.c
@@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*** DOCUMENTATION
<function name="ICONV" language="en_US">
<synopsis>
- Converts charsets of strings.
+ Converts charsets of strings.
</synopsis>
<syntax>
<parameter name="in-charset" required="true">
@@ -68,10 +68,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
***/
-/*!
+/*!
* Some systems define the second arg to iconv() as (const char *),
- * while others define it as (char *). Cast it to a (void *) to
- * suppress compiler warnings about it.
+ * while others define it as (char *). Cast it to a (void *) to
+ * suppress compiler warnings about it.
*/
#define AST_ICONV_CAST void *
@@ -143,4 +143,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Charset conversions");
-
diff --git a/funcs/func_jitterbuffer.c b/funcs/func_jitterbuffer.c
index e33b2c23a..57e0e4f4e 100644
--- a/funcs/func_jitterbuffer.c
+++ b/funcs/func_jitterbuffer.c
@@ -181,4 +181,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Jitter buffer for read side of channel.");
-
diff --git a/funcs/func_lock.c b/funcs/func_lock.c
index 2102d5c9a..e56d56dcb 100644
--- a/funcs/func_lock.c
+++ b/funcs/func_lock.c
@@ -23,7 +23,7 @@
* \author Tilghman Lesher <func_lock_2007@the-tilghman.com>
*
* \ingroup functions
- *
+ *
*/
/*** MODULEINFO
@@ -75,7 +75,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</syntax>
<description>
<para>Attempts to grab a named lock exclusively, and prevents other channels
- from obtaining the same lock. Returns <literal>1</literal> if the lock was
+ from obtaining the same lock. Returns <literal>1</literal> if the lock was
available or <literal>0</literal> otherwise.</para>
<note>
<para>If <literal>live_dangerously</literal> in <literal>asterisk.conf</literal>
@@ -92,9 +92,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="lockname" required="true" />
</syntax>
<description>
- <para>Unlocks a previously locked mutex. Returns <literal>1</literal> if the channel
+ <para>Unlocks a previously locked mutex. Returns <literal>1</literal> if the channel
had a lock or <literal>0</literal> otherwise.</para>
- <note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
+ <note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
held are automatically freed when the channel is destroyed.</para></note>
<note>
<para>If <literal>live_dangerously</literal> in <literal>asterisk.conf</literal>
diff --git a/funcs/func_logic.c b/funcs/func_logic.c
index e371f7ec1..dd55cb903 100644
--- a/funcs/func_logic.c
+++ b/funcs/func_logic.c
@@ -16,9 +16,9 @@
*/
/*! \file
- *
+ *
* \brief Conditional logic dialplan functions
- *
+ *
* \author Anthony Minessale II
*
* \ingroup functions
@@ -85,7 +85,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</syntax>
<description>
<para>Returns the data following <literal>?</literal> if true, else the data following <literal>:</literal></para>
- </description>
+ </description>
</function>
<function name="IFTIME" language="en_US">
<synopsis>
@@ -184,7 +184,7 @@ static int acf_if(struct ast_channel *chan, const char *cmd, char *data, char *b
-- and if you mod the ast_app_separate_args func instead, you'll really
mess things up badly, because the rest of everything depends on null args
for non-specified stuff. */
-
+
AST_NONSTANDARD_APP_ARGS(args1, data, '?');
AST_NONSTANDARD_APP_ARGS(args2, args1.remainder, ':');
diff --git a/funcs/func_md5.c b/funcs/func_md5.c
index 2e6018586..85b9c4905 100644
--- a/funcs/func_md5.c
+++ b/funcs/func_md5.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2005-2006, Digium, Inc.
* Copyright (C) 2005, Olle E. Johansson, Edvina.net
- * Copyright (C) 2005, Russell Bryant <russelb@clemson.edu>
+ * Copyright (C) 2005, Russell Bryant <russelb@clemson.edu>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -19,7 +19,7 @@
/*! \file
*
* \brief MD5 digest related dialplan functions
- *
+ *
* \author Olle E. Johansson <oej@edvina.net>
* \author Russell Bryant <russelb@clemson.edu>
*
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 84b6e686b..a8f2c8d0b 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -56,8 +56,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="result-id" required="true" />
</syntax>
<description>
- <para>For queries which are marked as mode=multirow, the original
- query returns a <replaceable>result-id</replaceable> from which results
+ <para>For queries which are marked as mode=multirow, the original
+ query returns a <replaceable>result-id</replaceable> from which results
may be fetched. This function implements the actual fetch of the results.</para>
<para>This also sets <variable>ODBC_FETCH_STATUS</variable>.</para>
<variablelist>
@@ -80,7 +80,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="result-id" required="true" />
</syntax>
<description>
- <para>For queries which are marked as mode=multirow, this will clear
+ <para>For queries which are marked as mode=multirow, this will clear
any remaining rows of the specified resultset.</para>
</description>
</application>
@@ -92,7 +92,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="string" required="true" />
</syntax>
<description>
- <para>Used in SQL templates to escape data which may contain single ticks
+ <para>Used in SQL templates to escape data which may contain single ticks
<literal>'</literal> which are otherwise used to delimit data.</para>
<para>Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'</para>
</description>
@@ -793,6 +793,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (!(resultset = ast_calloc(1, sizeof(*resultset)))) {
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
+ AST_RWLIST_UNLOCK(&queries);
ast_autoservice_stop(chan);
return -1;
}
@@ -809,6 +810,7 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (!(resultset = ast_calloc(1, sizeof(*resultset)))) {
pbx_builtin_setvar_helper(chan, "ODBCROWS", rowcount);
pbx_builtin_setvar_helper(chan, "ODBCSTATUS", status);
+ AST_RWLIST_UNLOCK(&queries);
ast_autoservice_stop(chan);
return -1;
}
@@ -1919,4 +1921,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ODBC lookups",
.unload = unload_module,
.reload = reload,
);
-
diff --git a/funcs/func_pitchshift.c b/funcs/func_pitchshift.c
index bec5f71dd..88c2ef19a 100644
--- a/funcs/func_pitchshift.c
+++ b/funcs/func_pitchshift.c
@@ -510,4 +510,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Audio Effects Dialplan Functions");
-
diff --git a/funcs/func_presencestate.c b/funcs/func_presencestate.c
index ad452df66..ffde81578 100644
--- a/funcs/func_presencestate.c
+++ b/funcs/func_presencestate.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2011, Digium, Inc.
*
- * David Vossel <dvossel@digium.com>
+ * David Vossel <dvossel@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -455,7 +455,7 @@ struct test_string {
int value;
const char *subtype;
const char *message;
- const char *options;
+ const char *options;
} outputs;
};
@@ -467,7 +467,7 @@ AST_TEST_DEFINE(test_valid_parse_data)
char *message;
char *options;
enum ast_test_result_state res = AST_TEST_PASS;
-
+
struct test_string tests [] = {
{ "away",
{ AST_PRESENCE_AWAY,
@@ -884,4 +884,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Gets or sets a presen
.unload = unload_module,
.load_pri = AST_MODPRI_DEVSTATE_PROVIDER,
);
-
diff --git a/funcs/func_rand.c b/funcs/func_rand.c
index 6491b371d..2d2a85f7a 100644
--- a/funcs/func_rand.c
+++ b/funcs/func_rand.c
@@ -18,7 +18,7 @@
/*! \file
*
* \brief Generate Random Number
- *
+ *
* \author Claude Patry <cpatry@gmail.com>
* \author Tilghman Lesher ( http://asterisk.drunkcoder.com/ )
* \ingroup functions
@@ -41,15 +41,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*** DOCUMENTATION
<function name="RAND" language="en_US">
<synopsis>
- Choose a random number in a range.
+ Choose a random number in a range.
</synopsis>
<syntax>
<parameter name="min" />
<parameter name="max" />
</syntax>
<description>
- <para>Choose a random number between <replaceable>min</replaceable> and <replaceable>max</replaceable>.
- <replaceable>min</replaceable> defaults to <literal>0</literal>, if not specified, while <replaceable>max</replaceable> defaults
+ <para>Choose a random number between <replaceable>min</replaceable> and <replaceable>max</replaceable>.
+ <replaceable>min</replaceable> defaults to <literal>0</literal>, if not specified, while <replaceable>max</replaceable> defaults
to <literal>RAND_MAX</literal> (2147483647 on many systems).</para>
<para>Example: Set(junky=${RAND(1,8)});
Sets junky to a random number between 1 and 8, inclusive.</para>
diff --git a/funcs/func_sha1.c b/funcs/func_sha1.c
index c6b757545..3e3c36526 100644
--- a/funcs/func_sha1.c
+++ b/funcs/func_sha1.c
@@ -18,7 +18,7 @@
/*! \file
*
* \brief SHA1 digest related dialplan functions
- *
+ *
* \author Claude Patry <cpatry@gmail.com>
*
* \ingroup functions
@@ -49,7 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<para>Generate a SHA1 digest via the SHA1 algorythm.</para>
<para>Example: Set(sha1hash=${SHA1(junky)})</para>
<para>Sets the asterisk variable sha1hash to the string <literal>60fa5675b9303eb62f99a9cd47f9f5837d18f9a0</literal>
- which is known as his hash</para>
+ which is known as his hash</para>
</description>
</function>
***/
diff --git a/funcs/func_sorcery.c b/funcs/func_sorcery.c
index 1671b3f05..8f631c5ea 100644
--- a/funcs/func_sorcery.c
+++ b/funcs/func_sorcery.c
@@ -218,4 +218,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get a field from a sorcery object");
-
diff --git a/funcs/func_speex.c b/funcs/func_speex.c
index d0d451bd1..816868ffc 100644
--- a/funcs/func_speex.c
+++ b/funcs/func_speex.c
@@ -4,7 +4,7 @@
* Copyright (C) 2008, Digium, Inc.
*
* Brian Degenhardt <bmd@digium.com>
- * Brett Bryant <bbryant@digium.com>
+ * Brett Bryant <bbryant@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -21,8 +21,8 @@
*
* \brief Noise reduction and automatic gain control (AGC)
*
- * \author Brian Degenhardt <bmd@digium.com>
- * \author Brett Bryant <bbryant@digium.com>
+ * \author Brian Degenhardt <bmd@digium.com>
+ * \author Brett Bryant <bbryant@digium.com>
*
* \ingroup functions
*
@@ -65,7 +65,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
channel that it is executed on. Using <literal>rx</literal> for audio received
and <literal>tx</literal> for audio transmitted to the channel. When using this
function you set a target audio level. It is primarily intended for use with
- analog lines, but could be useful for other channels as well. The target volume
+ analog lines, but could be useful for other channels as well. The target volume
is set with a number between <literal>1-32768</literal>. The larger the number
the louder (more gain) the channel will receive.</para>
<para>Examples:</para>
@@ -79,7 +79,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</synopsis>
<syntax>
<parameter name="channeldirection" required="true">
- <para>This can be either <literal>rx</literal> or <literal>tx</literal>
+ <para>This can be either <literal>rx</literal> or <literal>tx</literal>
the values that can be set to this are either <literal>on</literal> and
<literal>off</literal></para>
</parameter>
@@ -110,7 +110,7 @@ struct speex_info {
struct speex_direction_info *tx, *rx;
};
-static void destroy_callback(void *data)
+static void destroy_callback(void *data)
{
struct speex_info *si = data;
@@ -253,13 +253,13 @@ static int speex_write(struct ast_channel *chan, const char *cmd, char *data, co
if (!strcasecmp(cmd, "agc")) {
if (!sscanf(value, "%30f", &(*sdi)->agclevel))
(*sdi)->agclevel = ast_true(value) ? DEFAULT_AGC_LEVEL : 0.0;
-
+
if ((*sdi)->agclevel > 32768.0) {
- ast_log(LOG_WARNING, "AGC(%s)=%.01f is greater than 32768... setting to 32768 instead\n",
+ ast_log(LOG_WARNING, "AGC(%s)=%.01f is greater than 32768... setting to 32768 instead\n",
((*sdi == si->rx) ? "rx" : "tx"), (*sdi)->agclevel);
(*sdi)->agclevel = 32768.0;
}
-
+
(*sdi)->agc = !!((*sdi)->agclevel);
if ((*sdi)->state) {
@@ -294,11 +294,11 @@ static int speex_write(struct ast_channel *chan, const char *cmd, char *data, co
ast_audiohook_remove(chan, &si->audiohook);
ast_audiohook_detach(&si->audiohook);
}
-
+
ast_datastore_free(datastore);
}
- if (is_new) {
+ if (is_new) {
datastore->data = si;
ast_channel_lock(chan);
ast_channel_datastore_add(chan, datastore);
diff --git a/funcs/func_sprintf.c b/funcs/func_sprintf.c
index 4d5fc7a6c..101eefc7e 100644
--- a/funcs/func_sprintf.c
+++ b/funcs/func_sprintf.c
@@ -21,7 +21,7 @@
* \brief String manipulation dialplan functions
*
* \author Tilghman Lesher
- * \author Anothony Minessale II
+ * \author Anothony Minessale II
* \ingroup functions
*/
@@ -55,7 +55,7 @@ AST_THREADSTORAGE(result_buf);
<parameter name="argN" />
</syntax>
<description>
- <para>Parses the format string specified and returns a string matching
+ <para>Parses the format string specified and returns a string matching
that format. Supports most options found in <emphasis>sprintf(3)</emphasis>.
Returns a shortened string if a format specifier is not recognized.</para>
</description>
diff --git a/funcs/func_srv.c b/funcs/func_srv.c
index 3786a2fa2..c21dd9814 100644
--- a/funcs/func_srv.c
+++ b/funcs/func_srv.c
@@ -140,7 +140,7 @@ static int srv_query_read(struct ast_channel *chan, const char *cmd, char *data,
ast_log(LOG_WARNING, "%s requires a service as an argument\n", cmd);
return -1;
}
-
+
/* If they already called SRVQUERY for this service once,
* we need to kill the old datastore.
*/
@@ -152,7 +152,7 @@ static int srv_query_read(struct ast_channel *chan, const char *cmd, char *data,
ast_channel_datastore_remove(chan, datastore);
ast_datastore_free(datastore);
}
-
+
if (!srv_datastore_setup(data, chan)) {
return -1;
}
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index c76bddc51..eecbb5806 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -21,7 +21,7 @@
* \brief String manipulation dialplan functions
*
* \author Tilghman Lesher
- * \author Anothony Minessale II
+ * \author Anothony Minessale II
* \ingroup functions
*/
@@ -108,13 +108,13 @@ AST_THREADSTORAGE(tmp_buf);
<parameter name="string" required="true" />
</syntax>
<description>
- <para>Permits all characters listed in <replaceable>allowed-chars</replaceable>,
- filtering all others outs. In addition to literally listing the characters,
+ <para>Permits all characters listed in <replaceable>allowed-chars</replaceable>,
+ filtering all others outs. In addition to literally listing the characters,
you may also use ranges of characters (delimited by a <literal>-</literal></para>
<para>Hexadecimal characters started with a <literal>\x</literal>(i.e. \x20)</para>
<para>Octal characters started with a <literal>\0</literal> (i.e. \040)</para>
- <para>Also <literal>\t</literal>,<literal>\n</literal> and <literal>\r</literal> are recognized.</para>
- <note><para>If you want the <literal>-</literal> character it needs to be prefixed with a
+ <para>Also <literal>\t</literal>,<literal>\n</literal> and <literal>\r</literal> are recognized.</para>
+ <note><para>If you want the <literal>-</literal> character it needs to be prefixed with a
<literal>\</literal></para></note>
</description>
</function>
@@ -181,9 +181,9 @@ AST_THREADSTORAGE(tmp_buf);
</syntax>
<description>
<para>Return <literal>1</literal> on regular expression match or <literal>0</literal> otherwise</para>
- <para>Please note that the space following the double quotes separating the
- regex from the data is optional and if present, is skipped. If a space is
- desired at the beginning of the data, then put two spaces there; the second
+ <para>Please note that the space following the double quotes separating the
+ regex from the data is optional and if present, is skipped. If a space is
+ desired at the beginning of the data, then put two spaces there; the second
will not be skipped.</para>
</description>
</function>
@@ -220,8 +220,8 @@ AST_THREADSTORAGE(tmp_buf);
<parameter name="hashname" required="true" />
</syntax>
<description>
- <para>Returns a comma-delimited list of the current keys of the associative array
- defined by the HASH() function. Note that if you iterate over the keys of
+ <para>Returns a comma-delimited list of the current keys of the associative array
+ defined by the HASH() function. Note that if you iterate over the keys of
the result, adding keys during iteration will cause the result of the HASHKEYS()
function to change.</para>
</description>
@@ -247,8 +247,8 @@ AST_THREADSTORAGE(tmp_buf);
<parameter name="varN" required="false" />
</syntax>
<description>
- <para>The comma-delimited list passed as a value to which the function is set will
- be interpreted as a set of values to which the comma-delimited list of
+ <para>The comma-delimited list passed as a value to which the function is set will
+ be interpreted as a set of values to which the comma-delimited list of
variable names in the argument should be set.</para>
<para>Example: Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2</para>
</description>
@@ -263,7 +263,7 @@ AST_THREADSTORAGE(tmp_buf);
<parameter name="format" required="true" />
</syntax>
<description>
- <para>This is useful for converting a date into <literal>EPOCH</literal> time,
+ <para>This is useful for converting a date into <literal>EPOCH</literal> time,
possibly to pass to an application like SayUnixTime or to calculate the difference
between the two date strings</para>
<para>Example: ${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)} returns 1141219835</para>
@@ -386,7 +386,7 @@ AST_THREADSTORAGE(tmp_buf);
NoOp(var is three) being executed.
</para>
</description>
- </function>
+ </function>
<function name="POP" language="en_US">
<synopsis>
Removes and returns the last item off of a variable containing delimited text
@@ -406,7 +406,7 @@ AST_THREADSTORAGE(tmp_buf);
NoOp(var is one) being executed.
</para>
</description>
- </function>
+ </function>
<function name="PUSH" language="en_US">
<synopsis>
Appends one or more values to the end of a variable containing delimited text
@@ -976,7 +976,7 @@ static int regex(struct ast_channel *chan, const char *cmd, char *parse, char *b
ast_log(LOG_WARNING, "Malformed input %s(%s): %s\n", cmd, parse, buf);
return -1;
}
-
+
strcpy(buf, regexec(&regexbuf, args.str, 0, NULL, 0) ? "0" : "1");
regfree(&regexbuf);
@@ -1903,7 +1903,7 @@ AST_TEST_DEFINE(test_STRREPLACE)
ast_channel_release(chan);
return AST_TEST_FAIL;
}
-
+
AST_LIST_INSERT_HEAD(ast_channel_varshead(chan), var, entries);
if (test_strings[i][3]) {
diff --git a/funcs/func_sysinfo.c b/funcs/func_sysinfo.c
index 8da94dd33..a2d0aabdd 100644
--- a/funcs/func_sysinfo.c
+++ b/funcs/func_sysinfo.c
@@ -17,7 +17,7 @@
/*! \file
*
* SYSINFO function to return various system data.
- *
+ *
* \note Inspiration and Guidance from Russell
*
* \author Jeff Peeler
@@ -132,7 +132,7 @@ static int sysinfo_helper(struct ast_channel *chan, const char *cmd, char *data,
ast_log(LOG_ERROR, "Unknown sysinfo parameter type '%s'.\n", data);
return -1;
}
-
+
return 0;
}
@@ -153,4 +153,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "System information related functions");
-
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index b757e998f..748e04e5d 100644
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -20,7 +20,7 @@
*
* \brief Channel timeout related dialplan functions
*
- * \author Mark Spencer <markster@digium.com>
+ * \author Mark Spencer <markster@digium.com>
* \ingroup functions
*/
@@ -46,7 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<syntax>
<parameter name="timeouttype" required="true">
<para>The timeout that will be manipulated. The possible timeout types
- are: <literal>absolute</literal>, <literal>digit</literal> or
+ are: <literal>absolute</literal>, <literal>digit</literal> or
<literal>response</literal></para>
</parameter>
</syntax>
diff --git a/funcs/func_uri.c b/funcs/func_uri.c
index f53b75fa3..bcf64bb89 100644
--- a/funcs/func_uri.c
+++ b/funcs/func_uri.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 1999 - 2006, Digium, Inc.
*
- * Created by Olle E. Johansson, Edvina.net
+ * Created by Olle E. Johansson, Edvina.net
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -21,10 +21,10 @@
* \brief URI encoding / decoding
*
* \author Olle E. Johansson <oej@edvina.net>
- *
+ *
* \note For now this code only supports 8 bit characters, not unicode,
which we ultimately will need to support.
- *
+ *
* \ingroup functions
*/
diff --git a/funcs/func_version.c b/funcs/func_version.c
index da733d1e3..cf4533f0e 100644
--- a/funcs/func_version.c
+++ b/funcs/func_version.c
@@ -17,7 +17,7 @@
/*! \file
*
* \brief Return the current Version strings
- *
+ *
* \author Steve Murphy (murf@digium.com)
* \ingroup functions
*/
diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c
index 6c98e72f6..889d210a1 100644
--- a/funcs/func_vmcount.c
+++ b/funcs/func_vmcount.c
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2006 Tilghman Lesher. All rights reserved.
- *
+ *
* Tilghman Lesher <asterisk-vmcount-func@the-tilghman.com>
*
* See http://www.asterisk.org for more information about
@@ -55,7 +55,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
</parameter>
</syntax>
<description>
- <para>Count the number of voicemails in a specified mailbox, you could also specify
+ <para>Count the number of voicemails in a specified mailbox, you could also specify
the mailbox <replaceable>folder</replaceable>.</para>
<para>Example: <literal>exten => s,1,Set(foo=${VMCOUNT(125@default)})</literal></para>
</description>
@@ -85,7 +85,7 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
}
snprintf(buf, len, "%d", ast_app_messagecount(args.vmbox, args.folder));
-
+
return 0;
}
diff --git a/funcs/func_volume.c b/funcs/func_volume.c
index 9fd02008f..f381c413b 100644
--- a/funcs/func_volume.c
+++ b/funcs/func_volume.c
@@ -3,7 +3,7 @@
*
* Copyright (C) 2011, Digium, Inc.
*
- * Joshua Colp <jcolp@digium.com>
+ * Joshua Colp <jcolp@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,7 +20,7 @@
*
* \brief Technology independent volume control
*
- * \author Joshua Colp <jcolp@digium.com>
+ * \author Joshua Colp <jcolp@digium.com>
*
* \ingroup functions
*
@@ -126,7 +126,7 @@ static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *
if (frame->frametype == AST_FRAME_DTMF) {
/* Only use DTMF coming from the source... not going to it */
if (direction != AST_AUDIOHOOK_DIRECTION_READ)
- return 0;
+ return 0;
if (frame->subclass.integer == '*') {
vi->tx_gain += 1;
vi->rx_gain += 1;
@@ -137,7 +137,7 @@ static int volume_callback(struct ast_audiohook *audiohook, struct ast_channel *
}
}
-
+
if (frame->frametype == AST_FRAME_VOICE) {
/* Based on direction of frame grab the gain, and confirm it is applicable */
if (!(gain = (direction == AST_AUDIOHOOK_DIRECTION_READ) ? &vi->rx_gain : &vi->tx_gain) || !*gain)
@@ -194,8 +194,8 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c
return -1;
}
- if (!strcasecmp(args.direction, "tx")) {
- vi->tx_gain = atoi(value);
+ if (!strcasecmp(args.direction, "tx")) {
+ vi->tx_gain = atoi(value);
} else if (!strcasecmp(args.direction, "rx")) {
vi->rx_gain = atoi(value);
} else {
@@ -211,13 +211,13 @@ static int volume_write(struct ast_channel *chan, const char *cmd, char *data, c
}
/* Add Option data to struct */
-
+
if (!ast_strlen_zero(args.options)) {
struct ast_flags flags = { 0 };
ast_app_parse_options(volume_opts, &flags, NULL, args.options);
vi->flags = flags.flags;
- } else {
- vi->flags = 0;
+ } else {
+ vi->flags = 0;
}
return 0;
diff --git a/include/asterisk/abstract_jb.h b/include/asterisk/abstract_jb.h
index 173b22a5c..b300d1295 100644
--- a/include/asterisk/abstract_jb.h
+++ b/include/asterisk/abstract_jb.h
@@ -23,7 +23,7 @@
/*! \file
*
* \brief Common implementation-independent jitterbuffer stuff.
- *
+ *
* \author Slav Klenov <slav@securax.org>
*/
diff --git a/include/asterisk/adsi.h b/include/asterisk/adsi.h
index 31db2acb9..9834b9122 100644
--- a/include/asterisk/adsi.h
+++ b/include/asterisk/adsi.h
@@ -377,4 +377,3 @@ struct adsi_funcs {
void ast_adsi_install_funcs(const struct adsi_funcs *funcs);
#endif /* _ASTERISK_ADSI_H */
-
diff --git a/include/asterisk/ael_structs.h b/include/asterisk/ael_structs.h
index 592439346..205249b79 100644
--- a/include/asterisk/ael_structs.h
+++ b/include/asterisk/ael_structs.h
@@ -63,7 +63,7 @@ pval *linku1(pval *head, pval *tail);
void ael2_print(char *fname, pval *tree);
struct pval *ael2_parse(char *fname, int *errs); /* in ael.flex */
void destroy_pval(pval *item);
-
+
extern char *prev_word; /* in ael.flex */
#ifndef YY_TYPEDEF_YY_SCANNER_T
@@ -80,7 +80,7 @@ struct parse_io
};
/* for CODE GENERATION */
-
+
typedef enum { AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_RAND_CONTROL, AEL_LABEL, AEL_RETURN } ael_priority_type;
@@ -88,13 +88,13 @@ struct ael_priority
{
int priority_num;
ael_priority_type type;
-
+
char *app;
char *appargs;
-
+
struct pval *origin;
struct ael_extension *exten;
-
+
struct ael_priority *goto_true;
struct ael_priority *goto_false;
struct ael_priority *next;
@@ -109,9 +109,9 @@ struct ael_extension
int is_switch;
int has_switch; /* set if a switch exists in the extension */
int checked_switch; /* set if we checked for a switch in the extension -- so we don't have to do it again */
-
+
struct ast_context *context;
-
+
struct ael_priority *plist;
struct ael_priority *plist_last;
struct ael_extension *next_exten;
diff --git a/include/asterisk/agi.h b/include/asterisk/agi.h
index 329521aeb..cb80f9570 100644
--- a/include/asterisk/agi.h
+++ b/include/asterisk/agi.h
@@ -41,7 +41,7 @@ typedef struct agi_state {
typedef struct agi_command {
const char * const cmda[AST_MAX_CMD_LEN]; /*!< Null terminated list of the words of the command */
- /*! Handler for the command (channel, AGI state, # of arguments, argument list).
+ /*! Handler for the command (channel, AGI state, # of arguments, argument list).
Returns RESULT_SHOWUSAGE for improper arguments */
int (* const handler)(struct ast_channel *chan, AGI *agi, int argc, const char * const argv[]);
/*! Summary of the command (< 60 characters) */
diff --git a/include/asterisk/ast_expr.h b/include/asterisk/ast_expr.h
index 2dcb71f63..18cfcf534 100644
--- a/include/asterisk/ast_expr.h
+++ b/include/asterisk/ast_expr.h
@@ -17,8 +17,8 @@
*/
/*! \file
- *
- * ???????
+ *
+ * ???????
* \todo Explain this file!
*/
diff --git a/include/asterisk/ast_version.h b/include/asterisk/ast_version.h
index 1ceac30fe..ff9c42f74 100644
--- a/include/asterisk/ast_version.h
+++ b/include/asterisk/ast_version.h
@@ -41,7 +41,7 @@ const char *ast_get_version(void);
*/
const char *ast_get_version_num(void);
-/*! Retreive the Asterisk build options */
+/*! Retrieve the Asterisk build options */
const char *ast_get_build_opts(void);
#endif /* __AST_VERSION_H */
diff --git a/include/asterisk/astdb.h b/include/asterisk/astdb.h
index 8a870ae83..383864baf 100644
--- a/include/asterisk/astdb.h
+++ b/include/asterisk/astdb.h
@@ -83,6 +83,16 @@ int ast_db_deltree(const char *family, const char *keytree);
*/
struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree);
+/*!
+ * \brief Get a list of values with the given key prefix
+ *
+ * \param family The family to search under
+ * \param key_prefix The key prefix to search under
+ *
+ * \retval NULL An error occurred
+ */
+struct ast_db_entry *ast_db_gettree_by_prefix(const char *family, const char *key_prefix);
+
/*! \brief Free structure created by ast_db_gettree() */
void ast_db_freetree(struct ast_db_entry *entry);
diff --git a/include/asterisk/astobj.h b/include/asterisk/astobj.h
index 5959d40d0..e9f00713c 100644
--- a/include/asterisk/astobj.h
+++ b/include/asterisk/astobj.h
@@ -72,13 +72,13 @@
* found_obj = ASTOBJ_CONTAINER_FIND(&super_container, "obj1");
*
* if(found_obj) {
- * printf("Found object: %s", found_obj->name);
+ * printf("Found object: %s", found_obj->name);
* ASTOBJ_UNREF(found_obj,sample_object_destroy);
* }
*
* ASTOBJ_CONTAINER_DESTROYALL(&super_container,sample_object_destroy);
* ASTOBJ_CONTAINER_DESTROY(&super_container);
- *
+ *
* return 0;
* }
* \endcode
@@ -110,13 +110,13 @@ extern "C" {
/*! \brief Unlock a locked object. */
#define ASTOBJ_UNLOCK(object) ast_mutex_unlock(&(object)->_lock)
-#ifdef ASTOBJ_CONTAINER_HASHMODEL
+#ifdef ASTOBJ_CONTAINER_HASHMODEL
#define __ASTOBJ_HASH(type,hashes) \
- type *next[hashes]
-#else
+ type *next[hashes]
+#else
#define __ASTOBJ_HASH(type,hashes) \
- type *next[1]
-#endif
+ type *next[1]
+#endif
/*! \brief Add ASTOBJ components to a struct (without locking support).
*
@@ -140,14 +140,14 @@ extern "C" {
unsigned int refcount; \
unsigned int objflags; \
__ASTOBJ_HASH(type,hashes)
-
+
/*! \brief Add ASTOBJ components to a struct (without locking support).
*
* \param type The datatype of the object.
*
* This macro works like #ASTOBJ_COMPONENTS_NOLOCK_FULL() except it only accepts a
* type and uses default values for namelen and hashes.
- *
+ *
* <b>Sample Usage:</b>
* \code
* struct sample_struct_componets {
@@ -174,8 +174,8 @@ extern "C" {
*/
#define ASTOBJ_COMPONENTS(type) \
ASTOBJ_COMPONENTS_NOLOCK(type); \
- ast_mutex_t _lock;
-
+ ast_mutex_t _lock;
+
/*! \brief Add ASTOBJ components to a struct (with locking support).
*
* \param type The datatype of the object.
@@ -194,7 +194,7 @@ extern "C" {
*/
#define ASTOBJ_COMPONENTS_FULL(type,namelen,hashes) \
ASTOBJ_COMPONENTS_NOLOCK_FULL(type,namelen,hashes); \
- ast_mutex_t _lock;
+ ast_mutex_t _lock;
/*! \brief Increment an object reference count.
* \param object A pointer to the object to operate on.
@@ -207,7 +207,7 @@ extern "C" {
ASTOBJ_UNLOCK(object); \
(object); \
})
-
+
/*! \brief Decrement the reference count on an object.
*
* \param object A pointer the object to operate on.
@@ -233,12 +233,12 @@ extern "C" {
(object) = NULL; \
} while(0)
-/*! \brief Mark an ASTOBJ by adding the #ASTOBJ_FLAG_MARKED flag to its objflags mask.
+/*! \brief Mark an ASTOBJ by adding the #ASTOBJ_FLAG_MARKED flag to its objflags mask.
* \param object A pointer to the object to operate on.
*
* This macro "marks" an object. Marked objects can later be unlinked from a container using
* #ASTOBJ_CONTAINER_PRUNE_MARKED().
- *
+ *
*/
#define ASTOBJ_MARK(object) \
do { \
@@ -246,7 +246,7 @@ extern "C" {
(object)->objflags |= ASTOBJ_FLAG_MARKED; \
ASTOBJ_UNLOCK(object); \
} while(0)
-
+
/*! \brief Unmark an ASTOBJ by subtracting the #ASTOBJ_FLAG_MARKED flag from its objflags mask.
* \param object A pointer to the object to operate on.
*/
@@ -277,7 +277,7 @@ extern "C" {
*/
#define ASTOBJ_CONTAINER_RDLOCK(container) ast_mutex_lock(&(container)->_lock)
-/*! \brief Lock an ASTOBJ_CONTAINER for writing.
+/*! \brief Lock an ASTOBJ_CONTAINER for writing.
*/
#define ASTOBJ_CONTAINER_WRLOCK(container) ast_mutex_lock(&(container)->_lock)
@@ -316,7 +316,7 @@ extern "C" {
*
* This macro initializes a container. It should only be used on containers
* that support locking.
- *
+ *
* <b>Sample Usage:</b>
* \code
* struct sample_struct_container {
@@ -333,7 +333,7 @@ extern "C" {
do { \
ast_mutex_init(&(container)->_lock); \
} while(0)
-
+
/*! \brief Destroy a container.
*
* \param container A pointer to the container to destroy.
@@ -411,7 +411,7 @@ extern "C" {
})
/*! \brief Find an object in a container.
- *
+ *
* \param container A pointer to the container to search.
* \param data The data to search for.
* \param field The field/member of the container's objects to search.
@@ -421,7 +421,7 @@ extern "C" {
*
* This macro iterates through a container passing the specified field and data
* elements to the specified comparefunc. The function should return 0 when a match is found.
- *
+ *
* \note When the returned object is no longer in use, #ASTOBJ_UNREF() should
* be used to free the additional reference created by this macro.
*
@@ -498,7 +498,7 @@ extern "C" {
})
/*! \brief Find and remove an object from a container.
- *
+ *
* \param container A pointer to the container to operate on.
* \param namestr The name of the object to remove.
*
@@ -532,7 +532,7 @@ extern "C" {
})
/*! \brief Find and remove an object in a container.
- *
+ *
* \param container A pointer to the container to search.
* \param data The data to search for.
* \param field The field/member of the container's objects to search.
@@ -542,7 +542,7 @@ extern "C" {
*
* This macro iterates through a container passing the specified field and data
* elements to the specified comparefunc. The function should return 0 when a match is found.
- * If a match is found it is removed from the list.
+ * If a match is found it is removed from the list.
*
* \note This macro does not destroy any objects, it simply unlinks
* them. No destructors are called.
@@ -646,7 +646,7 @@ extern "C" {
*
* \param container A pointer to the container to prune.
* \param destructor A destructor function to call on each marked object.
- *
+ *
* This macro iterates through the specfied container and prunes any marked
* objects executing the specfied destructor if necessary.
*/
@@ -738,7 +738,7 @@ extern "C" {
*
* This macro initializes a container. It should only be used on containers
* that support locking.
- *
+ *
* <b>Sample Usage:</b>
* \code
* struct sample_struct_container {
diff --git a/include/asterisk/astobj2.h b/include/asterisk/astobj2.h
index 390e0ea1b..74f8f61f9 100644
--- a/include/asterisk/astobj2.h
+++ b/include/asterisk/astobj2.h
@@ -164,7 +164,7 @@ each case is supposed to be a string pointer, a "tag", that should contain
enough of an explanation, that you can pair operations that increment the
ref count, with operations that are meant to decrement the refcount.
-Each of these calls will generate at least one line of output in in the refs
+Each of these calls will generate at least one line of output in the refs
log files. These lines look like this:
...
0x8756f00,+1,1234,chan_sip.c,22240,load_module,**constructor**,allocate users
@@ -977,7 +977,7 @@ enum search_flags {
OBJ_NODATA = (1 << 1),
/*!
* Don't stop at the first match in ao2_callback() unless the
- * result of of the callback function has the CMP_STOP bit set.
+ * result of the callback function has the CMP_STOP bit set.
*/
OBJ_MULTIPLE = (1 << 2),
/*!
@@ -2027,14 +2027,16 @@ void ao2_iterator_cleanup(struct ao2_iterator *iter);
int ao2_iterator_count(struct ao2_iterator *iter);
/*!
- * \brief Creates a hash function for a structure string field.
+ * \brief Creates a hash function for a structure field.
* \param stype The structure type
* \param field The string field in the structure to hash
+ * \param hash_fn Function which hashes the field
*
- * AO2_STRING_FIELD_HASH_CB(mystruct, myfield) will produce a function
- * named mystruct_hash_fn which hashes mystruct->myfield.
+ * AO2_FIELD_HASH_FN(mystruct, myfield, ast_str_hash) will
+ * produce a function named mystruct_hash_fn which hashes
+ * mystruct->myfield with ast_str_hash.
*/
-#define AO2_STRING_FIELD_HASH_FN(stype, field) \
+#define AO2_FIELD_HASH_FN(stype, field, hash_fn) \
static int stype ## _hash_fn(const void *obj, const int flags) \
{ \
const struct stype *object = obj; \
@@ -2050,19 +2052,33 @@ static int stype ## _hash_fn(const void *obj, const int flags) \
ast_assert(0); \
return 0; \
} \
- return ast_str_hash(key); \
+ return hash_fn(key); \
}
+
+#define AO2_FIELD_TRANSFORM_CMP_FN(cmp) ((cmp) ? 0 : CMP_MATCH)
+#define AO2_FIELD_TRANSFORM_SORT_FN(cmp) (cmp)
+
/*!
+ * \internal
+ *
* \brief Creates a compare function for a structure string field.
* \param stype The structure type
+ * \param fn_suffix Function name suffix
* \param field The string field in the structure to compare
+ * \param key_cmp Key comparison function like strcmp
+ * \param partial_key_cmp Partial key comparison function like strncmp
+ * \param transform A macro that takes the cmp result as an argument
+ * and transforms it to a return value.
*
- * AO2_STRING_FIELD_CMP_FN(mystruct, myfield) will produce a function
- * named mystruct_cmp_fn which compares mystruct->myfield.
+ * Do not use this macro directly, instead use macro's starting with
+ * AST_STRING_FIELD.
+ *
+ * \warning The macro is an internal implementation detail, the API
+ * may change at any time.
*/
-#define AO2_STRING_FIELD_CMP_FN(stype, field) \
-static int stype ## _cmp_fn(void *obj, void *arg, int flags) \
+#define AO2_FIELD_CMP_FN(stype, fn_suffix, field, key_cmp, partial_key_cmp, transform, argconst) \
+static int stype ## fn_suffix(argconst void *obj, argconst void *arg, int flags) \
{ \
const struct stype *object_left = obj, *object_right = arg; \
const char *right_key = arg; \
@@ -2071,52 +2087,64 @@ static int stype ## _cmp_fn(void *obj, void *arg, int flags) \
case OBJ_SEARCH_OBJECT: \
right_key = object_right->field; \
case OBJ_SEARCH_KEY: \
- cmp = strcmp(object_left->field, right_key); \
+ cmp = key_cmp(object_left->field, right_key); \
break; \
case OBJ_SEARCH_PARTIAL_KEY: \
- cmp = strncmp(object_left->field, right_key, strlen(right_key)); \
+ cmp = partial_key_cmp(object_left->field, right_key, strlen(right_key)); \
break; \
default: \
cmp = 0; \
break; \
} \
- if (cmp) { \
- return 0; \
- } \
- return CMP_MATCH; \
+ return transform(cmp); \
}
/*!
+ * \brief Creates a hash function for a structure string field.
+ * \param stype The structure type
+ * \param field The string field in the structure to hash
+ *
+ * AO2_STRING_FIELD_HASH_FN(mystruct, myfield) will produce a function
+ * named mystruct_hash_fn which hashes mystruct->myfield.
+ *
+ * AO2_STRING_FIELD_HASH_FN(mystruct, myfield) would do the same except
+ * it uses the hash function which ignores case.
+ */
+#define AO2_STRING_FIELD_HASH_FN(stype, field) \
+ AO2_FIELD_HASH_FN(stype, field, ast_str_hash)
+#define AO2_STRING_FIELD_CASE_HASH_FN(stype, field) \
+ AO2_FIELD_HASH_FN(stype, field, ast_str_case_hash)
+
+/*!
+ * \brief Creates a compare function for a structure string field.
+ * \param stype The structure type
+ * \param field The string field in the structure to compare
+ *
+ * AO2_STRING_FIELD_CMP_FN(mystruct, myfield) will produce a function
+ * named mystruct_cmp_fn which compares mystruct->myfield.
+ *
+ * AO2_STRING_FIELD_CASE_CMP_FN(mystruct, myfield) would do the same
+ * except it performs case insensitive comparisons.
+ */
+#define AO2_STRING_FIELD_CMP_FN(stype, field) \
+ AO2_FIELD_CMP_FN(stype, _cmp_fn, field, strcmp, strncmp, AO2_FIELD_TRANSFORM_CMP_FN,)
+#define AO2_STRING_FIELD_CASE_CMP_FN(stype, field) \
+ AO2_FIELD_CMP_FN(stype, _cmp_fn, field, strcasecmp, strncasecmp, AO2_FIELD_TRANSFORM_CMP_FN,)
+
+/*!
* \brief Creates a sort function for a structure string field.
* \param stype The structure type
* \param field The string field in the structure to compare
*
* AO2_STRING_FIELD_SORT_FN(mystruct, myfield) will produce a function
* named mystruct_sort_fn which compares mystruct->myfield.
+ *
+ * AO2_STRING_FIELD_CASE_SORT_FN(mystruct, myfield) would do the same
+ * except it performs case insensitive comparisons.
*/
#define AO2_STRING_FIELD_SORT_FN(stype, field) \
-static int stype ## _sort_fn(const void *obj, const void *arg, int flags) \
-{ \
- const struct stype *object_left = obj; \
- const struct stype *object_right = arg; \
- const char *right_key = arg; \
- int cmp; \
-\
- switch (flags & OBJ_SEARCH_MASK) { \
- case OBJ_SEARCH_OBJECT: \
- right_key = object_right->field; \
- /* Fall through */ \
- case OBJ_SEARCH_KEY: \
- cmp = strcmp(object_left->field, right_key); \
- break; \
- case OBJ_SEARCH_PARTIAL_KEY: \
- cmp = strncmp(object_left->field, right_key, strlen(right_key)); \
- break; \
- default: \
- cmp = 0; \
- break; \
- } \
- return cmp; \
-}
+ AO2_FIELD_CMP_FN(stype, _sort_fn, field, strcmp, strncmp, AO2_FIELD_TRANSFORM_SORT_FN, const)
+#define AO2_STRING_FIELD_CASE_SORT_FN(stype, field) \
+ AO2_FIELD_CMP_FN(stype, _sort_fn, field, strcasecmp, strncasecmp, AO2_FIELD_TRANSFORM_SORT_FN, const)
#endif /* _ASTERISK_ASTOBJ2_H */
diff --git a/include/asterisk/astosp.h b/include/asterisk/astosp.h
index d5c7da1a7..4faa2b4e7 100644
--- a/include/asterisk/astosp.h
+++ b/include/asterisk/astosp.h
@@ -16,7 +16,7 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief Open Settlement Protocol (OSP)
*/
diff --git a/include/asterisk/autochan.h b/include/asterisk/autochan.h
index 128377b57..782f68f37 100644
--- a/include/asterisk/autochan.h
+++ b/include/asterisk/autochan.h
@@ -35,7 +35,7 @@ struct ast_autochan {
ast_mutex_t lock;
};
-/*!
+/*!
* \par Just what the $!@# is an autochan?
*
* An ast_autochan is a structure which contains an ast_channel. The pointer
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 00846ebab..c7a9f78ba 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -1443,4 +1443,3 @@
#undef volatile
#endif
-
diff --git a/include/asterisk/bridge_after.h b/include/asterisk/bridge_after.h
index 045168571..d4fcbeaf6 100644
--- a/include/asterisk/bridge_after.h
+++ b/include/asterisk/bridge_after.h
@@ -33,7 +33,7 @@
extern "C" {
#endif
-/*! Reason the the after bridge callback will not be called. */
+/*! Reason the after bridge callback will not be called. */
enum ast_bridge_after_cb_reason {
/*! The datastore is being destroyed. Likely due to hangup. (Enum value must be zero.) */
AST_BRIDGE_AFTER_CB_REASON_DESTROY,
diff --git a/include/asterisk/bridge_features.h b/include/asterisk/bridge_features.h
index df01a0dca..38b478e7a 100644
--- a/include/asterisk/bridge_features.h
+++ b/include/asterisk/bridge_features.h
@@ -719,7 +719,7 @@ int ast_bridge_features_limits_construct(struct ast_bridge_features_limits *limi
* \param limits pointer to an ast_bridge_features_limits struct that needs to be destroyed
*
* This function does not free memory allocated to the ast_bridge_features_limits struct, it only frees elements within the struct.
- * You must still call ast_free on the the struct if you allocated it with malloc.
+ * You must still call ast_free on the struct if you allocated it with malloc.
*/
void ast_bridge_features_limits_destroy(struct ast_bridge_features_limits *limits);
diff --git a/include/asterisk/calendar.h b/include/asterisk/calendar.h
index 57140bae2..26722937c 100644
--- a/include/asterisk/calendar.h
+++ b/include/asterisk/calendar.h
@@ -176,7 +176,7 @@ struct ao2_container *ast_calendar_event_container_alloc(void);
*/
void ast_calendar_merge_events(struct ast_calendar *cal, struct ao2_container *new_events);
-/*! \brief Unreference an ast_calendar_event
+/*! \brief Unreference an ast_calendar_event
*
* \param event event to unref
*
@@ -184,7 +184,7 @@ void ast_calendar_merge_events(struct ast_calendar *cal, struct ao2_container *n
*/
struct ast_calendar_event *ast_calendar_unref_event(struct ast_calendar_event *event);
-/*! \brief Remove all events from calendar
+/*! \brief Remove all events from calendar
*
* \param cal calendar whose events need to be cleared
*/
diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h
index f7d7719d2..143ffae23 100644
--- a/include/asterisk/callerid.h
+++ b/include/asterisk/callerid.h
@@ -240,7 +240,7 @@ void ast_shrink_phone_number(char *n);
int ast_isphonenumber(const char *n);
/*!
- * \brief Check if a string consists only of digits and and + \# ( ) - .
+ * \brief Check if a string consists only of digits and + \# ( ) - .
* (meaning it can be cleaned with ast_shrink_phone_number)
* \param exten The extension (or URI) to be checked.
* \retval 1 if string is valid AST shrinkable phone number
diff --git a/include/asterisk/ccss.h b/include/asterisk/ccss.h
index d8101cddf..fb17500b6 100644
--- a/include/asterisk/ccss.h
+++ b/include/asterisk/ccss.h
@@ -1556,7 +1556,7 @@ void ast_cc_busy_interface(struct ast_channel *inbound, struct ast_cc_config_par
* ready, and then based on set flags, creates the proper frame type. For chan_dahdi, we
* provide this function. It provides us the data we need, and we'll make its frame for it.
*
- * \param chan A channel involved in the call. What we want is on a datastore on both incoming
+ * \param chan A channel involved in the call. What we want is on a datastore on both incoming
* and outgoing so either may be provided
* \param cc_params The CC configuration parameters for the outbound target
* \param monitor_type The type of monitor to use when CC is requested
@@ -1567,7 +1567,7 @@ void ast_cc_busy_interface(struct ast_channel *inbound, struct ast_cc_config_par
* data has been allocated, then this parameter should contain a pointer to that data. If using a generic
* monitor, this parameter should remain NULL. Note that if this function should fail at some point,
* it is the responsibility of the caller to free the private data upon return.
- * \param[out] frame The frame we will be returning to the caller. It is vital that ast_frame_free be
+ * \param[out] frame The frame we will be returning to the caller. It is vital that ast_frame_free be
* called on this frame since the payload will be allocated on the heap.
* \retval -1 Failure. At some point there was a failure. Do not attempt to use the frame in this case.
* \retval 0 Success
diff --git a/include/asterisk/cel.h b/include/asterisk/cel.h
index c77a3538c..fed2085f4 100644
--- a/include/asterisk/cel.h
+++ b/include/asterisk/cel.h
@@ -14,9 +14,9 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
- * \brief Call Event Logging API
+ * \brief Call Event Logging API
*
* \todo TODO: There some event types that have been defined here, but are not
* yet used anywhere in the code. It would be really awesome if someone
diff --git a/include/asterisk/cli.h b/include/asterisk/cli.h
index c2401a85d..9b39892ec 100644
--- a/include/asterisk/cli.h
+++ b/include/asterisk/cli.h
@@ -105,7 +105,7 @@ void ast_cli(int fd, const char *fmt, ...)
char *new_setdebug(const struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
...
- // this is how we create the entry to register
+ // this is how we create the entry to register
AST_CLI_DEFINE(new_setdebug, "short description")
...
@@ -132,7 +132,7 @@ static char *test_new_cli(struct ast_cli_entry *e, int cmd, struct ast_cli_args
return NULL;
return ast_cli_complete(a->word, choices, a->n);
- default:
+ default:
// we are guaranteed to be called with argc >= e->args;
if (a->argc > e->args + 1) // we accept one extra argument
return CLI_SHOWUSAGE;
@@ -142,10 +142,10 @@ static char *test_new_cli(struct ast_cli_entry *e, int cmd, struct ast_cli_args
}
\endcode
-
+
*/
-/*! \brief calling arguments for new-style handlers.
+/*! \brief calling arguments for new-style handlers.
* \arg \ref CLI_command_API
*/
enum ast_cli_command {
@@ -165,7 +165,7 @@ struct ast_cli_args {
const int n; /* the iteration count (n-th entry we generate) */
};
-/*! \brief descriptor for a cli entry.
+/*! \brief descriptor for a cli entry.
* \arg \ref CLI_command_API
*/
struct ast_cli_entry {
@@ -215,7 +215,7 @@ struct ast_cli_entry {
*/
char *ast_cli_complete(const char *word, const char * const choices[], int pos);
-/*!
+/*!
* \brief Interprets a command
* Interpret a command s, sending output to fd if uid:gid has permissions
* to run this command. uid = CLI_NO_PERMS to avoid checking user permissions
@@ -229,9 +229,9 @@ char *ast_cli_complete(const char *word, const char * const choices[], int pos);
*/
int ast_cli_command_full(int uid, int gid, int fd, const char *s);
-#define ast_cli_command(fd,s) ast_cli_command_full(CLI_NO_PERMS, CLI_NO_PERMS, fd, s)
+#define ast_cli_command(fd,s) ast_cli_command_full(CLI_NO_PERMS, CLI_NO_PERMS, fd, s)
-/*!
+/*!
* \brief Executes multiple CLI commands
* Interpret strings separated by NULL and execute each one, sending output to fd
* if uid has permissions, uid = CLI_NO_PERMS to avoid checking users permissions.
@@ -262,7 +262,7 @@ int ast_cli_register(struct ast_cli_entry *e);
*/
int ast_cli_register_multiple(struct ast_cli_entry *e, int len);
-/*!
+/*!
* \brief Unregisters a command or an array of commands
* \param e which cli entry to unregister
* Unregister your own command. You must pass a completed ast_cli_entry structure
@@ -277,7 +277,7 @@ int ast_cli_unregister(struct ast_cli_entry *e);
*/
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len);
-/*!
+/*!
* \brief Readline madness
* Useful for readline, that's about it
* \retval 0 on success
diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index c7bc5b093..de131f55f 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -1,6 +1,6 @@
/*
* Asterisk -- An open source telephony toolkit.
- *
+ *
* Copyright (C) 1999-2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
@@ -205,7 +205,7 @@ typedef unsigned int uint;
typedef unsigned long long uint64_t;
#endif
-/* glob compat stuff */
+/* glob compat stuff */
#if defined(__Darwin__) || defined(__CYGWIN__)
#define GLOB_ABORTED GLOB_ABEND
#endif
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index c61cee5d2..5ab1f683f 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -856,7 +856,7 @@ struct ast_category *ast_category_new_template(const char *name, const char *in_
/*!
* \brief Inserts new category
- *
+ *
* \param config which config to use
* \param cat newly created category to insert
* \param match which category to insert above
diff --git a/include/asterisk/config_options.h b/include/asterisk/config_options.h
index f4c3db188..420eb97dd 100644
--- a/include/asterisk/config_options.h
+++ b/include/asterisk/config_options.h
@@ -40,18 +40,30 @@ struct aco_type_internal;
enum aco_type_t {
ACO_GLOBAL,
ACO_ITEM,
+ ACO_IGNORE,
};
-/*! \brief Whether a category regex is a blackist or a whitelist */
+/*! Type of category matching to perform */
enum aco_category_op {
+ /*! Regex based blacklist. */
ACO_BLACKLIST = 0,
+ /*! Regex based whitelist. */
ACO_WHITELIST,
+ /*! Blacklist with a single string matched with strcasecmp. */
+ ACO_BLACKLIST_EXACT,
+ /*! Whitelist with a single string matched with strcasecmp. */
+ ACO_WHITELIST_EXACT,
+ /*! Blacklist with a NULL terminated array of strings matched with strcasecmp. */
+ ACO_BLACKLIST_ARRAY,
+ /*! Whitelist with a NULL terminated array of strings matched with strcasecmp. */
+ ACO_WHITELIST_ARRAY,
};
/*! \brief What kind of matching should be done on an option name */
enum aco_matchtype {
ACO_EXACT = 1,
ACO_REGEX,
+ ACO_PREFIX,
};
/*! Callback functions for option parsing via aco_process_config() */
@@ -772,11 +784,11 @@ intptr_t aco_option_get_argument(const struct aco_option *option, unsigned int p
* VA_NARGS(one, two, three) -> v
* VA_NARGS1(one, two, three, 8, 7, 6, 5, 4, 3, 2, 1, 0) ->
* VA_NARGS1( _1, _2, _3, _4, _5, _6, _7, _8, N, ... ) N -> 3
- *
+ *
* Note that VA_NARGS *does not* work when there are no arguments passed. Pasting an empty
* __VA_ARGS__ with a comma like ", ##__VA_ARGS__" will delete the leading comma, but it
* does not work when __VA_ARGS__ is the first argument. Instead, 1 is returned instead of 0:
- *
+ *
* VA_NARGS() -> v
* VA_NARGS1( , 8, 7, 6, 5, 4, 3, 2, 1, 0) ->
* VA_NARGS1(_1, _2, _3, _4, _5, _6, _7, _8, N) -> 1
diff --git a/include/asterisk/core_unreal.h b/include/asterisk/core_unreal.h
index e118c74bd..229bace09 100644
--- a/include/asterisk/core_unreal.h
+++ b/include/asterisk/core_unreal.h
@@ -206,7 +206,7 @@ struct ast_unreal_pvt *ast_unreal_alloc(size_t size, ao2_destructor_fn destructo
*/
struct ast_channel *ast_unreal_new_channels(struct ast_unreal_pvt *p,
const struct ast_channel_tech *tech, int semi1_state, int semi2_state,
- const char *exten, const char *context, const struct ast_assigned_ids *assignedids,
+ const char *exten, const char *context, const struct ast_assigned_ids *assignedids,
const struct ast_channel *requestor, struct ast_callid *callid);
/*!
diff --git a/include/asterisk/doxygen/architecture.h b/include/asterisk/doxygen/architecture.h
index 0809d6b2e..315187016 100644
--- a/include/asterisk/doxygen/architecture.h
+++ b/include/asterisk/doxygen/architecture.h
@@ -715,4 +715,3 @@ The implementation of this memory debugging system can be found in
<hr>
Return to the \ref ArchTOC
*/
-
diff --git a/include/asterisk/doxygen/licensing.h b/include/asterisk/doxygen/licensing.h
index 27d55bfa0..10e5e4020 100644
--- a/include/asterisk/doxygen/licensing.h
+++ b/include/asterisk/doxygen/licensing.h
@@ -40,7 +40,7 @@
* \arg <b>Website</b>: http://www.openssl.org
* \arg <b>Used by</b>: Asterisk core (TLS for manager and HTTP), res_crypto
* \arg <b>License</b>: Apache 2.0
- * \arg <b>Note</b>: An exception has been granted to allow linking of
+ * \arg <b>Note</b>: An exception has been granted to allow linking of
* OpenSSL with Asterisk.
*
* \subsection curl_lib Curl
diff --git a/include/asterisk/doxyref.h b/include/asterisk/doxyref.h
index f5a87687f..73da18702 100644
--- a/include/asterisk/doxyref.h
+++ b/include/asterisk/doxyref.h
@@ -14,21 +14,21 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
*
* This is the main header file used for generating miscellaneous documentation
- * using Doxygen. This also utilizes the documentation in
+ * using Doxygen. This also utilizes the documentation in
* include/asterisk/doxygen/ header files.
*/
-/*
+/*
* The following is for Doxygen Developer's documentation generated
* by running "make progdocs" with doxygen installed on your
* system.
*/
-/*!
+/*!
* \page DevDoc Asterisk Developer's Documentation - Appendices
*
* \section devpolicy Development and Release Policies
@@ -53,7 +53,7 @@
*
* \section debugconfig Debugging and Configuration References
* \arg \ref AstDebug : Hints on debugging
- * \arg \ref extref
+ * \arg \ref extref
* \arg \ref ConfigFiles
* \arg \ref SoundFiles included in the Asterisk distribution
*
@@ -66,7 +66,7 @@
* \arg \b Digium: The Asterisk Company https://www.digium.com
*/
-/*!
+/*!
* \page CodeGuide Coding Guidelines
* \AsteriskTrunkWarning
* \section Coding Guidelines
@@ -75,7 +75,7 @@
* \verbinclude CODING-GUIDELINES
*/
-/*!
+/*!
* \page AstAPI Asterisk API
* \section Asteriskapi Asterisk API
* Some generic documents on the Asterisk architecture
@@ -89,7 +89,7 @@
* \arg See \ref Def_Channel
*/
-/*!
+/*!
* \page AstAPIChanges Asterisk API Changes
*
* \section Changes161 Version 1.6.1
@@ -122,7 +122,7 @@
* \li ast_channel_alloc()
*/
-/*!
+/*!
* \page AstAMI AMI - The Manager Interface
* \section ami AMI - The manager Interface
* \arg \link Config_ami Configuration file \endlink
@@ -133,23 +133,23 @@
/*!
* \page AstARA ARA - The Asterisk Realtime Interface
* \section realtime ARA - a generic API to storage and retrieval
- * Implemented in \ref config.c
- * Implemented in \ref pbx_realtime.c
+ * Implemented in \ref config.c
+ * Implemented in \ref pbx_realtime.c
* \todo include missing realtime txt
* \todo include missing extconfig txt
*/
-/*!
+/*!
* \page AstDUNDi DUNDi
*
- * DUNDi is a peer-to-peer system for locating Internet gateways to telephony
- * services. Unlike traditional centralized services (such as the remarkably
- * simple and concise ENUM standard), DUNDi is fully-distributed with no
+ * DUNDi is a peer-to-peer system for locating Internet gateways to telephony
+ * services. Unlike traditional centralized services (such as the remarkably
+ * simple and concise ENUM standard), DUNDi is fully-distributed with no
* centralized authority whatsoever.
*
- * DUNDi is not itself a Voice-over IP signaling or media protocol. Instead,
- * it publishes routes which are in turn accessed via industry standard
- * protocols such as IAX, SIP and H.323.
+ * DUNDi is not itself a Voice-over IP signaling or media protocol. Instead,
+ * it publishes routes which are in turn accessed via industry standard
+ * protocols such as IAX, SIP and H.323.
*
* \par References
* \arg DUNDi is documented at http://www.dundi.com
@@ -157,7 +157,7 @@
* \arg Configuration in \ref dundi.conf
*/
-/*!
+/*!
* \page AstCDR CDR - Call Data Records and billing
* \section cdr Call Data Records
* \par See also
@@ -168,18 +168,18 @@
* \todo include missing cdrdriver txt
*/
-/*!
+/*!
* \page AstCREDITS CREDITS
* \verbinclude CREDITS
*/
-/*!
+/*!
* \page AstVideo Video support in Asterisk
* \section sectAstVideo Video support in Asterisk
* \todo include missing video txt
*/
-/*!
+/*!
* \page AstVar Globally predefined channel variables
* \section globchan Globally predefined channel variables
*
@@ -193,7 +193,7 @@
*
*/
-/*!
+/*!
* \page AstChanVar Asterisk Dialplan Variables
* Asterisk Dialplan variables are divided into three groups:
* - Predefined global variables, handled by the PBX core
@@ -204,7 +204,7 @@
* Channel variables are only reachable within the channel.
*
* For more information on the predefined variables, see \ref AstVar
- *
+ *
* Global and Channel variables:
* - Names are Case insensitive
* - Names that start with a character, but are alphanumeric
@@ -226,7 +226,7 @@
* Global variables can also be set in the [globals] section of extensions.conf. The
* setting \b clearglobalvars in extensions.conf [general] section affects whether
* or not the global variables defined in \b globals are reset at dialplan reload.
- *
+ *
* There are CLI commands to change and read global variables. This can be handy
* to reset counters at midnight from an external script.
*
@@ -240,7 +240,7 @@
* with the list starting at varshead in struct ast_channel
*/
-/*!
+/*!
* \page Config_mod Modules configuration
* All res_ resource modules are loaded with globals on, which means
* that non-static functions are callable from other modules.
@@ -251,11 +251,11 @@
/*!
* \page Config_ext Extensions.conf - the Dial Plan
- * \section dialplan Extensions.conf
+ * \section dialplan Extensions.conf
* \verbinclude extensions.conf.sample
*/
-/*!
+/*!
* \page Config_rtp RTP configuration
* \arg Implemented in \ref rtp.c
* Used in \ref chan_sip.c and \ref chan_mgcp.c (and various H.323 channels)
@@ -263,27 +263,27 @@
* \verbinclude rtp.conf.sample
*/
-/*!
+/*!
* \page Config_codec CODEC Configuration
* \section codecsconf codecs.conf
* \verbinclude codecs.conf.sample
*/
-/*!
+/*!
* \page Config_ara REALTIME Configuration
* \arg See also: \arg \link AstARA \endlink
* \section extconf extconfig.conf
* \verbinclude extconfig.conf.sample
*/
-/*!
+/*!
* \page Config_ami AMI configuration
* \arg See also: \arg \link AstAMI \endlink
* \section amiconf manager.conf
* \verbinclude manager.conf.sample
*/
-/*!
+/*!
* \page SoundFiles Sound files
* \section SecSound Asterisk Sound files
* Asterisk includes a large number of sound files. Many of these
@@ -308,59 +308,59 @@
/*! \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \addtogroup cdr_drivers Module: CDR Drivers
* \section CDR_generic Asterisk CDR Drivers
- * \brief CDR drivers are loaded dynamically, each loaded CDR driver produce
+ * \brief CDR drivers are loaded dynamically, each loaded CDR driver produce
* a billing record for each call.
* \arg \ref Config_mod "Modules Configuration"
* \arg \ref Config_cdr "CDR Configuration"
*/
-/*!
+/*!
* \addtogroup channel_drivers Module: Asterisk Channel Drivers
* \section channel_generic Asterisk Channel Drivers
- * \brief Channel drivers are loaded dynamically.
+ * \brief Channel drivers are loaded dynamically.
* \arg \ref Config_mod "Modules Configuration"
*/
-/*!
+/*!
* \addtogroup applications Dial plan applications
* \section app_generic Asterisk Dial Plan Applications
- * \brief Applications support the dialplan. They register dynamically with
- * \see ast_register_application() and unregister with
+ * \brief Applications support the dialplan. They register dynamically with
+ * \see ast_register_application() and unregister with
* \see ast_unregister_application()
* \par See also
* \arg \ref functions
*/
-/*!
+/*!
* \addtogroup functions Module: Dial plan functions
* \section func_generic Asterisk Dial Plan Functions
* \brief Functions support the dialplan. They do not change any property of a channel
* or touch a channel in any way.
* \par See also
* \arg \ref applications
- *
+ *
*/
-/*!
+/*!
* \addtogroup codecs Module: Codecs
* \section codec_generic Asterisk Codec Modules
- * Codecs are referenced in configuration files by name
- * \par See also
- * \arg \ref formats
+ * Codecs are referenced in configuration files by name
+ * \par See also
+ * \arg \ref formats
*/
-/*!
- * \addtogroup formats Module: Media File Formats
+/*!
+ * \addtogroup formats Module: Media File Formats
* \section codec_generic Asterisk Format drivers
* Formats are modules that read or write media files to disk.
* \par See also
- * \arg \ref codecs
+ * \arg \ref codecs
*/
-/*!
+/*!
* \addtogroup rtp_engines Module: RTP Engines
* \section rtp_engine_blah Asterisk RTP Engines
*/
diff --git a/include/asterisk/dundi.h b/include/asterisk/dundi.h
index 2bffd0246..3f73c1937 100644
--- a/include/asterisk/dundi.h
+++ b/include/asterisk/dundi.h
@@ -21,7 +21,7 @@
* See also \arg \ref AstDUNDi
*/
-#ifndef _ASTERISK_DUNDI_H
+#ifndef _ASTERISK_DUNDI_H
#define _ASTERISK_DUNDI_H
#include "asterisk/channel.h"
@@ -131,7 +131,7 @@ enum {
DUNDI_CAUSE_BADENCRYPT = 7,
};
-struct dundi_cause {
+struct dundi_cause {
unsigned char causecode; /*!< Numerical cause (DUNDI_CAUSE_*) */
char desc[0]; /*!< Textual description */
} __attribute__((__packed__));
@@ -240,16 +240,16 @@ struct dundi_entity_info {
char org[80];
char orgunit[80];
char email[80];
- char phone[80];
+ char phone[80];
char ipaddr[80];
};
-/*!
+/*!
* \brief Lookup the given number in the given dundi context.
- * Lookup number in a given dundi context (if unspecified use e164), the given callerid (if specified)
+ * Lookup number in a given dundi context (if unspecified use e164), the given callerid (if specified)
* and return up to maxret results in the array specified.
* \retval the number of results found.
- * \retval -1 on a hangup of the channel.
+ * \retval -1 on a hangup of the channel.
*/
int dundi_lookup(struct dundi_result *result, int maxret, struct ast_channel *chan, const char *dcontext, const char *number, int nocache);
diff --git a/include/asterisk/endian.h b/include/asterisk/endian.h
index a1f388c71..fd3eb60f0 100644
--- a/include/asterisk/endian.h
+++ b/include/asterisk/endian.h
@@ -70,4 +70,3 @@
#endif /* __BYTE_ORDER */
#endif /* _ASTERISK_ENDIAN_H */
-
diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h
index 2d5c75a44..fd8330e80 100644
--- a/include/asterisk/event_defs.h
+++ b/include/asterisk/event_defs.h
@@ -83,7 +83,7 @@ enum ast_event_ie_type {
AST_EVENT_IE_OLDMSGS = 0x0002,
/*!
* \brief Mailbox name \verbatim (mailbox[@context]) \endverbatim
- * Used by: AST_EVENT_MWI
+ * Used by: AST_EVENT_MWI
* Payload type: STR
*/
AST_EVENT_IE_MAILBOX = 0x0003,
diff --git a/include/asterisk/file.h b/include/asterisk/file.h
index 01e5797f5..453dc0746 100644
--- a/include/asterisk/file.h
+++ b/include/asterisk/file.h
@@ -99,8 +99,8 @@ int ast_stream_and_wait(struct ast_channel *chan, const char *file, const char *
*/
int ast_stopstream(struct ast_channel *c);
-/*!
- * \brief Checks for the existence of a given file
+/*!
+ * \brief Checks for the existence of a given file
* \param filename name of the file you wish to check, minus the extension
* \param fmt the format you wish to check (the extension)
* \param preflang (the preferred language you wisht to find the file in)
@@ -110,12 +110,12 @@ int ast_stopstream(struct ast_channel *c);
*/
int ast_fileexists(const char *filename, const char *fmt, const char *preflang);
-/*!
- * \brief Renames a file
+/*!
+ * \brief Renames a file
* \param oldname the name of the file you wish to act upon (minus the extension)
* \param newname the name you wish to rename the file to (minus the extension)
* \param fmt the format of the file
- * Rename a given file in a given format, or if fmt is NULL, then do so for all
+ * Rename a given file in a given format, or if fmt is NULL, then do so for all
* \return -1 on failure
*/
int ast_filerename(const char *oldname, const char *newname, const char *fmt);
@@ -124,16 +124,16 @@ int ast_filerename(const char *oldname, const char *newname, const char *fmt);
* \brief Deletes a file
* \param filename name of the file you wish to delete (minus the extension)
* \param fmt of the file
- * Delete a given file in a given format, or if fmt is NULL, then do so for all
+ * Delete a given file in a given format, or if fmt is NULL, then do so for all
*/
int ast_filedelete(const char *filename, const char *fmt);
-/*!
- * \brief Copies a file
+/*!
+ * \brief Copies a file
* \param oldname name of the file you wish to copy (minus extension)
* \param newname name you wish the file to be copied to (minus extension)
* \param fmt the format of the file
- * Copy a given file in a given format, or if fmt is NULL, then do so for all
+ * Copy a given file in a given format, or if fmt is NULL, then do so for all
*/
int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
@@ -229,13 +229,13 @@ int ast_waitstream_fr_w_cb(struct ast_channel *c,
ast_waitstream_fr_cb cb);
/*!
- * Same as waitstream, but with audio output to fd and monitored fd checking.
+ * Same as waitstream, but with audio output to fd and monitored fd checking.
*
- * \return 1 if monfd is ready for reading
+ * \return 1 if monfd is ready for reading
*/
int ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd, int monfd);
-/*!
+/*!
* \brief Starts reading from a file
* \param filename the name of the file to read from
* \param type format of file you wish to read from
@@ -243,8 +243,8 @@ int ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd,
* \param flags file flags
* \param check (unimplemented, hence negligible)
* \param mode Open mode
- * Open an incoming file stream. flags are flags for the open() command, and
- * if check is non-zero, then it will not read a file if there are any files that
+ * Open an incoming file stream. flags are flags for the open() command, and
+ * if check is non-zero, then it will not read a file if there are any files that
* start with that name and have an extension
* Please note, this is a blocking function. Program execution will not return until ast_waitstream completes it's execution.
* \retval a struct ast_filestream on success.
@@ -252,16 +252,16 @@ int ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd,
*/
struct ast_filestream *ast_readfile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode);
-/*!
- * \brief Starts writing a file
+/*!
+ * \brief Starts writing a file
* \param filename the name of the file to write to
* \param type format of file you wish to write out to
* \param comment comment to go with
* \param flags output file flags
* \param check (unimplemented, hence negligible)
* \param mode Open mode
- * Create an outgoing file stream. oflags are flags for the open() command, and
- * if check is non-zero, then it will not write a file if there are any files that
+ * Create an outgoing file stream. oflags are flags for the open() command, and
+ * if check is non-zero, then it will not write a file if there are any files that
* start with that name and have an extension
* Please note, this is a blocking function. Program execution will not return until ast_waitstream completes it's execution.
* \retval a struct ast_filestream on success.
@@ -269,8 +269,8 @@ struct ast_filestream *ast_readfile(const char *filename, const char *type, cons
*/
struct ast_filestream *ast_writefile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode);
-/*!
- * \brief Writes a frame to a stream
+/*!
+ * \brief Writes a frame to a stream
* \param fs filestream to write to
* \param f frame to write to the filestream
* Send a frame to a filestream -- note: does NOT free the frame, call ast_frfree manually
@@ -279,8 +279,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con
*/
int ast_writestream(struct ast_filestream *fs, struct ast_frame *f);
-/*!
- * \brief Closes a stream
+/*!
+ * \brief Closes a stream
* \param f filestream to close
* Close a playback or recording stream
* \retval 0 on success.
@@ -288,8 +288,8 @@ int ast_writestream(struct ast_filestream *fs, struct ast_frame *f);
*/
int ast_closestream(struct ast_filestream *f);
-/*!
- * \brief Opens stream for use in seeking, playing
+/*!
+ * \brief Opens stream for use in seeking, playing
* \param chan channel to work with
* \param filename to use
* \param preflang prefered language to use
@@ -298,8 +298,8 @@ int ast_closestream(struct ast_filestream *f);
*/
struct ast_filestream *ast_openstream(struct ast_channel *chan, const char *filename, const char *preflang);
-/*!
- * \brief Opens stream for use in seeking, playing
+/*!
+ * \brief Opens stream for use in seeking, playing
* \param chan channel to work with
* \param filename to use
* \param preflang prefered language to use
@@ -308,8 +308,8 @@ struct ast_filestream *ast_openstream(struct ast_channel *chan, const char *file
* \retval NULL on error.
*/
struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const char *filename, const char *preflang, int asis);
-/*!
- * \brief Opens stream for use in seeking, playing
+/*!
+ * \brief Opens stream for use in seeking, playing
* \param chan channel to work with
* \param filename to use
* \param preflang prefered language to use
@@ -318,8 +318,8 @@ struct ast_filestream *ast_openstream_full(struct ast_channel *chan, const char
*/
struct ast_filestream *ast_openvstream(struct ast_channel *chan, const char *filename, const char *preflang);
-/*!
- * \brief Applys a open stream to a channel.
+/*!
+ * \brief Applys a open stream to a channel.
* \param chan channel to work
* \param s ast_filestream to apply
* \retval 0 on success.
@@ -327,34 +327,34 @@ struct ast_filestream *ast_openvstream(struct ast_channel *chan, const char *fil
*/
int ast_applystream(struct ast_channel *chan, struct ast_filestream *s);
-/*!
- * \brief Play a open stream on a channel.
+/*!
+ * \brief Play a open stream on a channel.
* \param s filestream to play
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_playstream(struct ast_filestream *s);
-/*!
- * \brief Seeks into stream
+/*!
+ * \brief Seeks into stream
* \param fs ast_filestream to perform seek on
* \param sample_offset numbers of samples to seek
- * \param whence SEEK_SET, SEEK_CUR, SEEK_END
+ * \param whence SEEK_SET, SEEK_CUR, SEEK_END
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_seekstream(struct ast_filestream *fs, off_t sample_offset, int whence);
-/*!
- * \brief Trunc stream at current location
+/*!
+ * \brief Trunc stream at current location
* \param fs filestream to act on
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_truncstream(struct ast_filestream *fs);
-/*!
- * \brief Fast forward stream ms
+/*!
+ * \brief Fast forward stream ms
* \param fs filestream to act on
* \param ms milliseconds to move
* \retval 0 on success.
@@ -362,8 +362,8 @@ int ast_truncstream(struct ast_filestream *fs);
*/
int ast_stream_fastforward(struct ast_filestream *fs, off_t ms);
-/*!
- * \brief Rewind stream ms
+/*!
+ * \brief Rewind stream ms
* \param fs filestream to act on
* \param ms milliseconds to move
* \retval 0 on success.
@@ -371,8 +371,8 @@ int ast_stream_fastforward(struct ast_filestream *fs, off_t ms);
*/
int ast_stream_rewind(struct ast_filestream *fs, off_t ms);
-/*!
- * \brief Tell where we are in a stream
+/*!
+ * \brief Tell where we are in a stream
* \param fs fs to act on
* \return a long as a sample offset into stream
*/
@@ -385,12 +385,12 @@ off_t ast_tellstream(struct ast_filestream *fs);
*/
int ast_ratestream(struct ast_filestream *fs);
-/*!
- * \brief Read a frame from a filestream
+/*!
+ * \brief Read a frame from a filestream
* \param s ast_filestream to act on
* \return a frame.
* \retval NULL if read failed.
- */
+ */
struct ast_frame *ast_readframe(struct ast_filestream *s);
/*! Initialize file stuff */
diff --git a/include/asterisk/format.h b/include/asterisk/format.h
index 3b48af80d..d63074643 100644
--- a/include/asterisk/format.h
+++ b/include/asterisk/format.h
@@ -71,7 +71,7 @@ struct ast_format_interface {
enum ast_format_cmp_res (* const format_cmp)(const struct ast_format *format1,
const struct ast_format *format2);
- /*!
+ /*!
* \brief Get a format with the joint compatible attributes of both provided formats.
*
* \param format1 The first format
diff --git a/include/asterisk/framehook.h b/include/asterisk/framehook.h
index d388f2e1b..8e5afaeae 100644
--- a/include/asterisk/framehook.h
+++ b/include/asterisk/framehook.h
@@ -162,7 +162,7 @@ enum ast_framehook_event {
* \details Two events are guaranteed to occur once the ast_framehook_attach()
* function is called. These events are AST_FRAMEHOOK_EVENT_ATTACHED, which occurs
* immediately after the framehook is attached to a channel, and
- * AST_FRAMEHOOK_EVENT_DETACHED, which occurs right after the framehook is
+ * AST_FRAMEHOOK_EVENT_DETACHED, which occurs right after the framehook is
* detached.
*
* It is completely valid for the frame variable to be set to NULL. Always do a NULL
@@ -276,7 +276,7 @@ int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interfac
/*!
* \brief Detach an framehook from a channel.
* \since 1.8
- *
+ *
* \pre The Channel must be locked during this function call.
* If this function is never called after attaching an framehook,
* the framehook will be detached and destroyed during channel
@@ -297,7 +297,7 @@ int ast_framehook_detach(struct ast_channel *chan, int framehook_id);
* \since 1.8
*
* \pre The Channel must be locked during this function call.
- *
+ *
* \param chan channel containing the framehook list to destroy.
* \retval 0 success
* \retval -1 failure
diff --git a/include/asterisk/fskmodem.h b/include/asterisk/fskmodem.h
index 81d4e386f..dcbf94630 100644
--- a/include/asterisk/fskmodem.h
+++ b/include/asterisk/fskmodem.h
@@ -28,4 +28,3 @@
#else
#include "fskmodem_float.h"
#endif
-
diff --git a/include/asterisk/fskmodem_int.h b/include/asterisk/fskmodem_int.h
index d50e8abde..6a4db8bc8 100644
--- a/include/asterisk/fskmodem_int.h
+++ b/include/asterisk/fskmodem_int.h
@@ -48,7 +48,7 @@ typedef struct {
int xi0;
int xi1;
int xi2;
-
+
int ispb;
int icont;
int bw; /*!< Band Selector*/
@@ -59,7 +59,7 @@ typedef struct {
int pllispb; /*!<Pll autosense */
int pllids;
int pllispb2;
-
+
struct filter_struct mark_filter;
struct filter_struct space_filter;
struct filter_struct demod_filter;
diff --git a/include/asterisk/http.h b/include/asterisk/http.h
index d5f54cc65..63fb223bf 100644
--- a/include/asterisk/http.h
+++ b/include/asterisk/http.h
@@ -316,7 +316,7 @@ int ast_http_response_status_line(const char *buf, const char *version, int code
* \param name out parameter pointing to the header name
* \param value out parameter pointing to header value
* \return -1 if buf is empty
- * \return 0 if buf could be separated into into name and value
+ * \return 0 if buf could be separated into name and value
* \return 1 if name or value portion don't exist
* \since 13
*/
diff --git a/include/asterisk/image.h b/include/asterisk/image.h
index 9e358ad52..f159b41c7 100644
--- a/include/asterisk/image.h
+++ b/include/asterisk/image.h
@@ -35,16 +35,16 @@ struct ast_imager {
AST_LIST_ENTRY(ast_imager) list; /*!< For linked list */
};
-/*!
- * \brief Check for image support on a channel
+/*!
+ * \brief Check for image support on a channel
* \param chan channel to check
* Checks the channel to see if it supports the transmission of images
* \return non-zero if image transmission is supported
*/
int ast_supports_images(struct ast_channel *chan);
-/*!
- * \brief Sends an image
+/*!
+ * \brief Sends an image
* \param chan channel to send image on
* \param filename filename of image to send (minus extension)
* Sends an image on the given channel.
@@ -53,8 +53,8 @@ int ast_supports_images(struct ast_channel *chan);
*/
int ast_send_image(struct ast_channel *chan, const char *filename);
-/*!
- * \brief Make an image
+/*!
+ * \brief Make an image
* \param filename filename of image to prepare
* \param preflang preferred language to get the image...?
* \param format the format of the file, NULL for any image format
@@ -64,7 +64,7 @@ int ast_send_image(struct ast_channel *chan, const char *filename);
*/
struct ast_frame *ast_read_image(const char *filename, const char *preflang, struct ast_format *format);
-/*!
+/*!
* \brief Register image format
* \param imgdrv Populated ast_imager structure with info to register
* Registers an image format
@@ -72,15 +72,15 @@ struct ast_frame *ast_read_image(const char *filename, const char *preflang, str
*/
int ast_image_register(struct ast_imager *imgdrv);
-/*!
- * \brief Unregister an image format
+/*!
+ * \brief Unregister an image format
* \param imgdrv pointer to the ast_imager structure you wish to unregister
* Unregisters the image format passed in.
* Returns nothing
*/
void ast_image_unregister(struct ast_imager *imgdrv);
-/*!
+/*!
* \brief Initialize image stuff
* Initializes all the various image stuff. Basically just registers the cli stuff
* \return 0 all the time
diff --git a/include/asterisk/indications.h b/include/asterisk/indications.h
index b02be1fdf..a8069bd9c 100644
--- a/include/asterisk/indications.h
+++ b/include/asterisk/indications.h
@@ -75,7 +75,7 @@ struct ast_tone_zone_sound {
struct ast_tone_zone {
/*! \brief Country code that this set of tones is for */
char country[MAX_TONEZONE_COUNTRY];
- /*!
+ /*!
* \brief Text description of the given country.
*
* This is for nothing more than friendly display to a human.
@@ -83,7 +83,7 @@ struct ast_tone_zone {
char description[40];
/*! \brief Number of ring cadence elements in the ringcadence array */
unsigned int nrringcadence;
- /*!
+ /*!
* \brief Array of ring cadence parts
*
* Each element is an amount of time in milliseconds. The first element
diff --git a/include/asterisk/io.h b/include/asterisk/io.h
index 6ee8450bd..1893475ec 100644
--- a/include/asterisk/io.h
+++ b/include/asterisk/io.h
@@ -52,16 +52,16 @@ extern "C" {
struct io_context;
-/*!
- * \brief Creates a context
+/*!
+ * \brief Creates a context
* Create a context for I/O operations
* Basically mallocs an IO structure and sets up some default values.
* \return an allocated io_context structure
*/
struct io_context *io_context_create(void);
-/*!
- * \brief Destroys a context
+/*!
+ * \brief Destroys a context
* \param ioc structure to destroy
* Destroy a context for I/O operations
* Frees all memory associated with the given io_context structure along with the structure itself
@@ -71,57 +71,57 @@ void io_context_destroy(struct io_context *ioc);
typedef int (*ast_io_cb)(int *id, int fd, short events, void *cbdata);
#define AST_IO_CB(a) ((ast_io_cb)(a))
-/*!
- * \brief Adds an IO context
+/*!
+ * \brief Adds an IO context
* \param ioc which context to use
* \param fd which fd to monitor
* \param callback callback function to run
* \param events event mask of events to wait for
* \param data data to pass to the callback
* Watch for any of revents activites on fd, calling callback with data as
- * callback data.
+ * callback data.
* \retval a pointer to ID of the IO event
* \retval NULL on failure
*/
int *ast_io_add(struct io_context *ioc, int fd, ast_io_cb callback, short events, void *data);
-/*!
- * \brief Changes an IO handler
+/*!
+ * \brief Changes an IO handler
* \param ioc which context to use
* \param id
* \param fd the fd you wish it to contain now
* \param callback new callback function
* \param events event mask to wait for
* \param data data to pass to the callback function
- * Change an I/O handler, updating fd if > -1, callback if non-null,
+ * Change an I/O handler, updating fd if > -1, callback if non-null,
* and revents if >-1, and data if non-null.
* \retval a pointer to the ID of the IO event
* \retval NULL on failure
*/
int *ast_io_change(struct io_context *ioc, int *id, int fd, ast_io_cb callback, short events, void *data);
-/*!
- * \brief Removes an IO context
+/*!
+ * \brief Removes an IO context
* \param ioc which io_context to remove it from
* \param id which ID to remove
- * Remove an I/O id from consideration
+ * Remove an I/O id from consideration
* \retval 0 on success
* \retval -1 on failure
*/
int ast_io_remove(struct io_context *ioc, int *id);
-/*!
- * \brief Waits for IO
+/*!
+ * \brief Waits for IO
* \param ioc which context to act upon
* \param howlong how many milliseconds to wait
* Wait for I/O to happen, returning after
* howlong milliseconds, and after processing
- * any necessary I/O.
+ * any necessary I/O.
* \return he number of I/O events which took place.
*/
int ast_io_wait(struct io_context *ioc, int howlong);
-/*!
+/*!
* \brief Dumps the IO array.
* Debugging: Dump everything in the I/O array
*/
@@ -131,7 +131,7 @@ void ast_io_dump(struct io_context *ioc);
int ast_hide_password(int fd);
-/*!
+/*!
* \brief Restores TTY mode.
* Call with result from previous ast_hide_password
*/
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 27944add8..c4550dfa8 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -54,7 +54,7 @@
- \ref manager.c Main manager code file
*/
-#define AMI_VERSION "2.10.2"
+#define AMI_VERSION "2.10.3"
#define DEFAULT_MANAGER_PORT 5038 /* Default port for Asterisk management via TCP */
#define DEFAULT_MANAGER_TLS_PORT 5039 /* Default port for Asterisk management via TCP */
@@ -120,7 +120,7 @@ int check_manager_enabled(void);
/*! \brief Check if AMI/HTTP is enabled */
int check_webmanager_enabled(void);
-/*! Add a custom hook to be called when an event is fired
+/*! Add a custom hook to be called when an event is fired
\param hook struct manager_custom_hook object to add
*/
void ast_manager_register_hook(struct manager_custom_hook *hook);
@@ -178,7 +178,7 @@ struct manager_action {
unsigned int registered:1;
};
-/*! \brief External routines may register/unregister manager callbacks this way
+/*! \brief External routines may register/unregister manager callbacks this way
* \note Use ast_manager_register2() to register with help text for new manager commands */
#define ast_manager_register(action, authority, func, synopsis) ast_manager_register2(action, authority, func, ast_module_info->self, synopsis, NULL)
@@ -219,8 +219,8 @@ int ast_manager_register2(
*/
int ast_manager_unregister(const char *action);
-/*!
- * \brief Verify a session's read permissions against a permission mask.
+/*!
+ * \brief Verify a session's read permissions against a permission mask.
* \param ident session identity
* \param perm permission mask to verify
* \retval 1 if the session has the permission mask capabilities
@@ -229,7 +229,7 @@ int ast_manager_unregister(const char *action);
int astman_verify_session_readpermissions(uint32_t ident, int perm);
/*!
- * \brief Verify a session's write permissions against a permission mask.
+ * \brief Verify a session's write permissions against a permission mask.
* \param ident session identity
* \param perm permission mask to verify
* \retval 1 if the session has the permission mask capabilities, otherwise 0
@@ -237,7 +237,7 @@ int astman_verify_session_readpermissions(uint32_t ident, int perm);
*/
int astman_verify_session_writepermissions(uint32_t ident, int perm);
-/*! \brief External routines may send asterisk manager events this way
+/*! \brief External routines may send asterisk manager events this way
* \param category Event category, matches manager authorization
\param event Event name
\param contents Contents of event
@@ -362,7 +362,7 @@ int init_manager(void);
/*! \brief Called by Asterisk module functions and the CLI command */
int reload_manager(void);
-/*!
+/*!
* \brief Add a datastore to a session
*
* \retval 0 success
@@ -372,7 +372,7 @@ int reload_manager(void);
int astman_datastore_add(struct mansession *s, struct ast_datastore *datastore);
-/*!
+/*!
* \brief Remove a datastore from a session
*
* \retval 0 success
@@ -381,7 +381,7 @@ int astman_datastore_add(struct mansession *s, struct ast_datastore *datastore);
*/
int astman_datastore_remove(struct mansession *s, struct ast_datastore *datastore);
-/*!
+/*!
* \brief Find a datastore on a session
*
* \retval pointer to the datastore if found
diff --git a/include/asterisk/message.h b/include/asterisk/message.h
index f81574c9b..ae6533c46 100644
--- a/include/asterisk/message.h
+++ b/include/asterisk/message.h
@@ -283,7 +283,7 @@ const char *ast_msg_get_var(struct ast_msg *msg, const char *name);
/*!
* \brief Get the body of a message.
* \note The return value is valid only as long as the ast_message is valid. Hold a reference
- * to the message if you plan on storing the return value.
+ * to the message if you plan on storing the return value.
*
* \return The body of the messsage, encoded in UTF-8.
*/
diff --git a/include/asterisk/mod_format.h b/include/asterisk/mod_format.h
index d76be5eca..2bf75925f 100644
--- a/include/asterisk/mod_format.h
+++ b/include/asterisk/mod_format.h
@@ -42,7 +42,7 @@ extern "C" {
*/
struct ast_format_def {
char name[80]; /*!< Name of format */
- char exts[80]; /*!< Extensions (separated by | if more than one)
+ char exts[80]; /*!< Extensions (separated by | if more than one)
* this format can read. First is assumed for writing (e.g. .mp3) */
struct ast_format *format; /*!< Format of frames it uses/provides (one only) */
/*!
@@ -53,11 +53,11 @@ struct ast_format_def {
* function can be omitted.
*/
int (*open)(struct ast_filestream *s);
- /*!
+ /*!
* \brief Prepare a stream for output, and comment it appropriately if applicable.
- * \return 0 on success, -1 on error.
- * Same as the open, the FILE is already open so the function just needs to
- * prepare any header and other fields, if any.
+ * \return 0 on success, -1 on error.
+ * Same as the open, the FILE is already open so the function just needs to
+ * prepare any header and other fields, if any.
* The function can be omitted if nothing is needed.
*/
int (*rewrite)(struct ast_filestream *s, const char *comment);
@@ -125,7 +125,7 @@ struct ast_filestream {
char *write_buffer;
};
-/*!
+/*!
* \brief Register a new file format capability.
* Adds a format to Asterisk's format abilities.
* \retval 0 on success
@@ -134,8 +134,8 @@ struct ast_filestream {
int __ast_format_def_register(const struct ast_format_def *f, struct ast_module *mod);
#define ast_format_def_register(f) __ast_format_def_register(f, ast_module_info->self)
-/*!
- * \brief Unregisters a file format
+/*!
+ * \brief Unregisters a file format
* \param name the name of the format you wish to unregister
* Unregisters a format based on the name of the format.
* \retval 0 on success
diff --git a/include/asterisk/module.h b/include/asterisk/module.h
index b9d7de64d..0b8fbad84 100644
--- a/include/asterisk/module.h
+++ b/include/asterisk/module.h
@@ -69,7 +69,7 @@ enum ast_module_load_result {
AST_MODULE_LOAD_SUCCESS = 0, /*!< Module loaded and configured */
AST_MODULE_LOAD_DECLINE = 1, /*!< Module is not configured */
AST_MODULE_LOAD_SKIP = 2, /*!< Module was skipped for some reason (For loader.c use only. Should never be returned by modules)*/
- AST_MODULE_LOAD_PRIORITY = 3, /*!< Module is not loaded yet, but is added to prioity heap */
+ AST_MODULE_LOAD_PRIORITY = 3, /*!< Module is not loaded yet, but is added to priority list */
AST_MODULE_LOAD_FAILURE = -1, /*!< Module could not be loaded properly */
};
@@ -108,7 +108,7 @@ enum ast_module_helper_type {
AST_MODULE_HELPER_RUNNING,
};
-/*!
+/*!
* \brief Load a module.
* \param resource_name The name of the module to load.
*
@@ -120,13 +120,13 @@ enum ast_module_helper_type {
*/
enum ast_module_load_result ast_load_resource(const char *resource_name);
-/*!
+/*!
* \brief Unload a module.
* \param resource_name The name of the module to unload.
* \param ast_module_unload_mode The force flag. This should be set using one of the AST_FORCE flags.
*
* This function unloads a module. It will only unload modules that are not in
- * use (usecount not zero), unless #AST_FORCE_FIRM or #AST_FORCE_HARD is
+ * use (usecount not zero), unless #AST_FORCE_FIRM or #AST_FORCE_HARD is
* specified. Setting #AST_FORCE_FIRM or #AST_FORCE_HARD will unload the
* module regardless of consequences (NOT RECOMMENDED).
*
@@ -149,7 +149,7 @@ int ast_unload_resource(const char *resource_name, enum ast_module_unload_mode);
*/
enum ast_module_reload_result ast_module_reload(const char *name);
-/*!
+/*!
* \brief Notify when usecount has been changed.
*
* This function calulates use counts and notifies anyone trying to keep track
@@ -214,39 +214,39 @@ int ast_update_module_list_condition(int (*modentry)(const char *module, const c
/*!
* \brief Check if module with the name given is loaded
* \param name Module name, like "chan_sip.so"
- * \retval 1 if true
+ * \retval 1 if true
* \retval 0 if false
*/
int ast_module_check(const char *name);
-/*!
+/*!
* \brief Add a procedure to be run when modules have been updated.
* \param updater The function to run when modules have been updated.
*
* This function adds the given function to a linked list of functions to be
- * run when the modules are updated.
+ * run when the modules are updated.
*
- * \retval 0 on success
+ * \retval 0 on success
* \retval -1 on failure.
*/
int ast_loader_register(int (*updater)(void));
-/*!
+/*!
* \brief Remove a procedure to be run when modules are updated.
* \param updater The updater function to unregister.
*
* This removes the given function from the updater list.
- *
+ *
* \retval 0 on success
* \retval -1 on failure.
*/
int ast_loader_unregister(int (*updater)(void));
-/*!
+/*!
* \brief Match modules names for the Asterisk cli.
* \param line Unused by this function, but this should be the line we are
* matching.
- * \param word The partial name to match.
+ * \param word The partial name to match.
* \param pos The position the word we are completing is in.
* \param state The possible match to return.
* \param rpos The position we should be matching. This should be the same as
@@ -322,7 +322,7 @@ struct ast_module_info {
const char *name; /*!< name of the module for loader reference and CLI commands */
const char *description; /*!< user friendly description of the module. */
- /*!
+ /*!
* This holds the ASTERISK_GPL_KEY, signifiying that you agree to the terms of
* the Asterisk license as stated in the ASTERISK_GPL_KEY. Your module will not
* load if it does not return the EXACT key string.
@@ -493,37 +493,37 @@ static const __attribute__((unused)) struct ast_module_info *ast_module_info;
#endif /* plain C */
-/*!
+/*!
* \brief Register an application.
*
* \param app Short name of the application
* \param execute a function callback to execute the application. It should return
* non-zero if the channel needs to be hung up.
* \param synopsis a short description (one line synopsis) of the application
- * \param description long description with all of the details about the use of
+ * \param description long description with all of the details about the use of
* the application
- *
- * This registers an application with Asterisk's internal application list.
+ *
+ * This registers an application with Asterisk's internal application list.
* \note The individual applications themselves are responsible for registering and unregistering
* and unregistering their own CLI commands.
- *
- * \retval 0 success
+ *
+ * \retval 0 success
* \retval -1 failure.
*/
#define ast_register_application(app, execute, synopsis, description) ast_register_application2(app, execute, synopsis, description, ast_module_info->self)
-/*!
+/*!
* \brief Register an application using XML documentation.
*
* \param app Short name of the application
* \param execute a function callback to execute the application. It should return
* non-zero if the channel needs to be hung up.
- *
- * This registers an application with Asterisk's internal application list.
+ *
+ * This registers an application with Asterisk's internal application list.
* \note The individual applications themselves are responsible for registering and unregistering
* and unregistering their own CLI commands.
- *
- * \retval 0 success
+ *
+ * \retval 0 success
* \retval -1 failure.
*/
#define ast_register_application_xml(app, execute) ast_register_application(app, execute, NULL, NULL)
@@ -550,14 +550,14 @@ static const __attribute__((unused)) struct ast_module_info *ast_module_info;
int ast_register_application2(const char *app, int (*execute)(struct ast_channel *, const char *),
const char *synopsis, const char *description, void *mod);
-/*!
+/*!
* \brief Unregister an application
- *
+ *
* \param app name of the application (does not have to be the same string as the one that was registered)
- *
+ *
* This unregisters an application from Asterisk's internal application list.
- *
- * \retval 0 success
+ *
+ * \retval 0 success
* \retval -1 failure
*/
int ast_unregister_application(const char *app);
diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h
index 3ede99087..5c6c7333c 100644
--- a/include/asterisk/netsock2.h
+++ b/include/asterisk/netsock2.h
@@ -373,7 +373,7 @@ int ast_sockaddr_split_hostport(char *str, char **host, char **port, int flags);
*
* Host names are NOT allowed.
*
- * \param[out] addr The resulting ast_sockaddr. This MAY be NULL from
+ * \param[out] addr The resulting ast_sockaddr. This MAY be NULL from
* functions that are performing validity checks only, e.g. ast_parse_arg().
* \param str The string to parse
* \param flags If set to zero, a port MAY be present. If set to
diff --git a/include/asterisk/parking.h b/include/asterisk/parking.h
index 1cf750c08..afe12c914 100644
--- a/include/asterisk/parking.h
+++ b/include/asterisk/parking.h
@@ -164,7 +164,7 @@ struct ast_parking_bridge_feature_fn_table {
* \param parker The \ref bridge_channel object that is initiating the parking
* \param context The context to blind transfer to
* \param exten The extension to blind transfer to
- * \param parked_channel_cb Execute the following function on the the channel that gets parked
+ * \param parked_channel_cb Execute the following function on the channel that gets parked
* \param parked_channel_data Data for the parked_channel_cb
*
* \note If the bridge \ref parker is in has more than one other occupant, the entire
@@ -236,7 +236,7 @@ int ast_parking_park_call(struct ast_bridge_channel *parker, char *exten, size_t
* \param context The context to blind transfer to
* \param exten The extension to blind transfer to
* \param exten The extension to blind transfer to
- * \param parked_channel_cb Execute the following function on the the channel that gets parked
+ * \param parked_channel_cb Execute the following function on the channel that gets parked
* \param parked_channel_data Data for the parked_channel_cb
*
* \note If the bridge \ref parker is in has more than one other occupant, the entire
diff --git a/include/asterisk/paths.h b/include/asterisk/paths.h
index ea0c56123..3e3b8eae0 100644
--- a/include/asterisk/paths.h
+++ b/include/asterisk/paths.h
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Paths to configurable Asterisk directories
- *
+ *
* Copyright (C) 1999-2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 770a1a984..f177b09aa 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -85,7 +85,7 @@ struct ast_exten;
struct ast_include;
struct ast_ignorepat;
struct ast_sw;
-
+
enum ast_state_cb_update_reason {
/*! The extension state update is a result of a device state changing on the extension. */
AST_HINT_UPDATE_DEVICE = 1,
@@ -1094,7 +1094,7 @@ int ast_rdlock_context(struct ast_context *con);
int ast_unlock_context(struct ast_context *con);
/*!
- * \brief locks the macrolock in the given given context
+ * \brief locks the macrolock in the given context
*
* \param macrocontext name of the macro-context to lock
*
diff --git a/include/asterisk/pktccops.h b/include/asterisk/pktccops.h
index 8f1a0dbc5..14c71b48b 100644
--- a/include/asterisk/pktccops.h
+++ b/include/asterisk/pktccops.h
@@ -19,7 +19,7 @@
/*! \file
*
* \brief PacketCable COPS
- *
+ *
* \author Attila Domjan <attila.domjan.hu@gmail.com>
*/
diff --git a/include/asterisk/presencestate.h b/include/asterisk/presencestate.h
index 1cdf73eda..87deda766 100644
--- a/include/asterisk/presencestate.h
+++ b/include/asterisk/presencestate.h
@@ -192,4 +192,3 @@ struct ast_presence_state_message {
int ast_presence_state_engine_init(void);
#endif
-
diff --git a/include/asterisk/pval.h b/include/asterisk/pval.h
index cd8c5d366..cb5a7da60 100644
--- a/include/asterisk/pval.h
+++ b/include/asterisk/pval.h
@@ -3,7 +3,7 @@
/* whatever includes this, better include asterisk/lock.h and asterisk/hashtab.h */
-typedef enum
+typedef enum
{
PV_WORD, /* an ident, string, name, label, etc. A user-supplied string. */ /* 0 */
PV_MACRO, /* 1 */
@@ -53,7 +53,7 @@ struct pval
int startcol;
int endcol;
char *filename;
-
+
union
{
char *str; /* wow, used almost everywhere! */
@@ -62,7 +62,7 @@ struct pval
char *for_init; /* used in FOR */
} u1;
struct pval *u1_last; /* to build in-order lists -- looks like we only need one */
-
+
union
{
struct pval *arglist; /* used in macro_call, application_call, MACRO def, also attached to PWORD, the 4 timevals for includes */
@@ -71,7 +71,7 @@ struct pval
char *for_test; /* used in FOR */
struct pval *goto_target; /* used in GOTO */
} u2;
-
+
union
{
char *for_inc; /* used in FOR */
@@ -83,16 +83,16 @@ struct pval
struct ael_extension *compiled_label;
struct pval *extend; /* to link extended contexts to the 'original' */
} u3;
-
+
union
{
struct pval *for_statements; /* used in PV_FOR */
int regexten; /* used in EXTENSION */
} u4;
-
- struct pval *next; /* the pval at the end of this ptr will ALWAYS be of the same type as this one!
+
+ struct pval *next; /* the pval at the end of this ptr will ALWAYS be of the same type as this one!
EXCEPT for objects of the different types, that are in the same list, like contexts & macros, etc */
-
+
struct pval *dad; /* the 'container' of this struct instance */
struct pval *prev; /* the opposite of the 'next' pointer */
} ;
@@ -102,8 +102,8 @@ typedef struct pval pval;
#ifndef AAL_ARGCHECK
/* for the time being, short circuit all the AAL related structures
- without permanently removing the code; after/during the AAL
- development, this code can be properly re-instated
+ without permanently removing the code; after/during the AAL
+ development, this code can be properly re-instated
*/
/* null definitions for structs passed down the infrastructure */
diff --git a/include/asterisk/res_fax.h b/include/asterisk/res_fax.h
index e88d8002f..c1dd37847 100644
--- a/include/asterisk/res_fax.h
+++ b/include/asterisk/res_fax.h
@@ -144,7 +144,7 @@ struct ast_fax_session_details {
unsigned int pages_transferred;
/*! session details flags for options */
union {
- /*! dontuse dummy variable - do not ever use */
+ /*! dontuse dummy variable - do not ever use */
uint32_t dontuse;
struct {
/*! flag to send debug manager events */
diff --git a/include/asterisk/res_odbc.h b/include/asterisk/res_odbc.h
index 137f7d4a5..4286272fc 100644
--- a/include/asterisk/res_odbc.h
+++ b/include/asterisk/res_odbc.h
@@ -75,7 +75,7 @@ struct odbc_cache_tables {
/* functions */
-/*!
+/*!
* \brief Executes a prepared statement handle
* \param obj The non-NULL result of odbc_request_obj()
* \param stmt The prepared statement handle
@@ -120,13 +120,13 @@ struct odbc_obj *_ast_odbc_request_obj(const char *name, int check, const char *
#define ast_odbc_request_obj2(a, b) _ast_odbc_request_obj2(a, b, __FILE__, __PRETTY_FUNCTION__, __LINE__)
#define ast_odbc_request_obj(a, b) _ast_odbc_request_obj(a, b, __FILE__, __PRETTY_FUNCTION__, __LINE__)
-/*!
+/*!
* \brief Releases an ODBC object previously allocated by ast_odbc_request_obj()
* \param obj The ODBC object
*/
void ast_odbc_release_obj(struct odbc_obj *obj);
-/*!
+/*!
* \brief Checks an ODBC object to ensure it is still connected
* \param obj The ODBC object
* \retval 0 if connected
@@ -150,12 +150,12 @@ int ast_odbc_backslash_is_escape(struct odbc_obj *obj);
*/
SQLHSTMT ast_odbc_direct_execute(struct odbc_obj *obj, SQLHSTMT (*exec_cb)(struct odbc_obj *obj, void *data), void *data);
-/*!
+/*!
* \brief Prepares, executes, and returns the resulting statement handle.
* \param obj The ODBC object
* \param prepare_cb A function callback, which, when called, should return a statement handle prepared, with any necessary parameters or result columns bound.
* \param data A parameter to be passed to the prepare_cb parameter function, indicating which statement handle is to be prepared.
- * \retval a statement handle
+ * \retval a statement handle
* \retval NULL on error
*/
SQLHSTMT ast_odbc_prepare_and_execute(struct odbc_obj *obj, SQLHSTMT (*prepare_cb)(struct odbc_obj *obj, void *data), void *data);
diff --git a/include/asterisk/res_pjsip_session.h b/include/asterisk/res_pjsip_session.h
index 073cd2e7a..464167c55 100644
--- a/include/asterisk/res_pjsip_session.h
+++ b/include/asterisk/res_pjsip_session.h
@@ -159,6 +159,8 @@ struct ast_sip_session {
unsigned int ended_while_deferred:1;
/*! DTMF mode to use with this session, from endpoint but can change */
enum ast_sip_dtmf_mode dtmf;
+ /*! Initial incoming INVITE Request-URI. NULL otherwise. */
+ pjsip_uri *request_uri;
};
typedef int (*ast_sip_session_request_creation_cb)(struct ast_sip_session *session, pjsip_tx_data *tdata);
@@ -211,7 +213,7 @@ struct ast_sip_session_supplement {
* This method will always be called from a SIP servant thread.
*/
void (*session_begin)(struct ast_sip_session *session);
- /*!
+ /*!
* \brief Notification that the session has ended
*
* This method may or may not be called from a SIP servant thread. Do
@@ -241,7 +243,7 @@ struct ast_sip_session_supplement {
* There is no guarantee that a channel will be present on the session when this is called.
*/
int (*incoming_request)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
- /*!
+ /*!
* \brief Called on an incoming SIP response
* This method is always called from a SIP servant thread.
*
@@ -262,7 +264,7 @@ struct ast_sip_session_supplement {
* This method is always called from a SIP servant thread.
*/
void (*outgoing_request)(struct ast_sip_session *session, struct pjsip_tx_data *tdata);
- /*!
+ /*!
* \brief Called on an outgoing SIP response
* This method is always called from a SIP servant thread.
*/
@@ -613,7 +615,7 @@ void ast_sip_session_remove_datastore(struct ast_sip_session *session, const cha
* Note: The on_request_creation callback may or may not be called in the same
* thread where this function is called. Request creation may need to be delayed
* due to the current INVITE transaction state.
- *
+ *
* \param session The session on which the reinvite will be sent
* \param on_request_creation Callback called when request is created
* \param on_sdp_creation Callback called when SDP is created
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index 0b29f3485..7daff6738 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -1348,6 +1348,16 @@ int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs,
void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload);
/*!
+ * \brief Determine the type of RTP stream media from the codecs mapped.
+ * \since 13.19.0
+ *
+ * \param codecs Codecs structure to look in
+ *
+ * \return Media type or AST_MEDIA_TYPE_UNKNOWN if no codecs mapped.
+ */
+enum ast_media_type ast_rtp_codecs_get_stream_type(struct ast_rtp_codecs *codecs);
+
+/*!
* \brief Retrieve payload information by payload
*
* \param codecs Codecs structure to look in
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h
index b775095ad..fb630813e 100644
--- a/include/asterisk/sched.h
+++ b/include/asterisk/sched.h
@@ -28,7 +28,7 @@
extern "C" {
#endif
-/*!
+/*!
* \brief Remove a scheduler entry
*
* This is a loop construct to ensure that
@@ -39,8 +39,8 @@ extern "C" {
*
* Since macro expansion essentially works like pass-by-name
* parameter passing, this macro will still work correctly even
- * if the id of the task to delete changes. This holds as long as
- * the name of the id which could change is passed to the macro
+ * if the id of the task to delete changes. This holds as long as
+ * the name of the id which could change is passed to the macro
* and not a copy of the value of the id.
*/
#define AST_SCHED_DEL(sched, id) \
@@ -260,8 +260,8 @@ int ast_sched_add_variable(struct ast_sched_context *con, int when, ast_sched_cb
*/
int ast_sched_replace_variable(int old_id, struct ast_sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) attribute_warn_unused_result;
-/*!
- * \brief Find a sched structure and return the data field associated with it.
+/*!
+ * \brief Find a sched structure and return the data field associated with it.
*
* \param con scheduling context in which to search fro the matching id
* \param id ID of the scheduled item to find
diff --git a/include/asterisk/select.h b/include/asterisk/select.h
index d6f9d32cc..07580a58d 100644
--- a/include/asterisk/select.h
+++ b/include/asterisk/select.h
@@ -66,7 +66,7 @@ typedef struct {
} while (0)
#endif /* HAVE_VARIABLE_FDSET */
-/*! \brief Waits for activity on a group of channels
+/*! \brief Waits for activity on a group of channels
* \param nfds the maximum number of file descriptors in the sets
* \param rfds file descriptors to check for read availability
* \param wfds file descriptors to check for write availability
diff --git a/include/asterisk/smdi.h b/include/asterisk/smdi.h
index c3a5c7eb0..429982ed5 100644
--- a/include/asterisk/smdi.h
+++ b/include/asterisk/smdi.h
@@ -17,7 +17,7 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief SMDI support for Asterisk.
* \author Matthew A. Nicholson <mnicholson@digium.com>
@@ -46,7 +46,7 @@
*
* The ast_smdi_mwi_message structure contains the parsed out parts of an smdi
* message. Each ast_smdi_interface structure has a message queue consisting
- * ast_smdi_mwi_message structures.
+ * ast_smdi_mwi_message structures.
*/
struct ast_smdi_mwi_message {
char name[SMDI_MESG_NAME_LEN];
@@ -60,7 +60,7 @@ struct ast_smdi_mwi_message {
*
* The ast_smdi_md_message structure contains the parsed out parts of an smdi
* message. Each ast_smdi_interface structure has a message queue consisting
- * ast_smdi_md_message structures.
+ * ast_smdi_md_message structures.
*/
struct ast_smdi_md_message {
char name[SMDI_MESG_NAME_LEN];
@@ -72,7 +72,7 @@ struct ast_smdi_md_message {
struct timeval timestamp; /* a timestamp for the message */
};
-/*!
+/*!
* \brief SMDI interface structure.
*
* The ast_smdi_interface structure holds information on a serial port that
@@ -81,7 +81,7 @@ struct ast_smdi_md_message {
*/
struct ast_smdi_interface;
-/*!
+/*!
* \brief Get the next SMDI message from the queue.
* \param iface a pointer to the interface to use.
*
@@ -164,7 +164,7 @@ AST_OPTIONAL_API(int, ast_smdi_mwi_set,
(struct ast_smdi_interface *iface, const char *mailbox),
{ return -1; });
-/*!
+/*!
* \brief Unset the MWI indicator for a mailbox.
* \param iface the interface to use.
* \param mailbox the mailbox to use.
diff --git a/include/asterisk/speech.h b/include/asterisk/speech.h
index 0da6f5cfc..7af7e998d 100644
--- a/include/asterisk/speech.h
+++ b/include/asterisk/speech.h
@@ -68,7 +68,7 @@ struct ast_speech {
/*! Pointer to the engine used by this speech structure */
struct ast_speech_engine *engine;
};
-
+
/* Speech recognition engine structure */
struct ast_speech_engine {
/*! Name of speech engine */
diff --git a/include/asterisk/srv.h b/include/asterisk/srv.h
index f8fa8649b..79c112680 100644
--- a/include/asterisk/srv.h
+++ b/include/asterisk/srv.h
@@ -54,7 +54,7 @@ extern int ast_srv_lookup(struct srv_context **context, const char *service, con
*/
void ast_srv_cleanup(struct srv_context **context);
-/*! \brief Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup
+/*! \brief Lookup entry in SRV records Returns 1 if found, 0 if not found, -1 on hangup
*
* Only do SRV record lookup if you get a domain without a port. If you get a port #, it's a DNS host name.
*
@@ -97,7 +97,7 @@ unsigned int ast_srv_get_record_count(struct srv_context *context);
* \param[out] priority The priority portion of the record
* \param[out] weight The weight portion of the record
*
- * \retval -1 Failed to retrieve information.
+ * \retval -1 Failed to retrieve information.
* Likely due to an out of range record_num
* \retval 0 Success
*/
diff --git a/include/asterisk/statsd.h b/include/asterisk/statsd.h
index 4cbd213ad..4dbfb77eb 100644
--- a/include/asterisk/statsd.h
+++ b/include/asterisk/statsd.h
@@ -147,4 +147,3 @@ AST_OPTIONAL_API(void, ast_statsd_log_sample, (const char *metric_name,
#endif /* _ASTERISK_STATSD_H */
-
diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h
index c24424b0a..0e0d20aca 100644
--- a/include/asterisk/stringfields.h
+++ b/include/asterisk/stringfields.h
@@ -27,7 +27,7 @@
Using this functionality is quite simple. An example structure
with three fields is defined like this:
-
+
\code
struct sample_fields {
int x1;
@@ -39,14 +39,14 @@
long x2;
};
\endcode
-
+
When an instance of this structure is allocated (either statically or
dynamically), the fields and the pool of storage for them must be
initialized:
-
+
\code
struct sample_fields *x;
-
+
x = ast_calloc(1, sizeof(*x));
if (x == NULL || ast_string_field_init(x, 252)) {
if (x)
@@ -62,7 +62,7 @@
ast_string_field_init(x, 0) will reset fields to the
initial value while keeping the pool allocated.
-
+
Reading the fields is much like using 'const char * const' fields in the
structure: you cannot write to the field or to the memory it points to.
@@ -88,7 +88,7 @@
When the structure instance is no longer needed, the fields
and their storage pool must be freed:
-
+
\code
ast_string_field_free_memory(x);
ast_free(x);
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 963519dc7..85393b4f9 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -168,7 +168,7 @@ char *ast_trim_blanks(char *str),
if (work) {
work += strlen(work) - 1;
- /* It's tempting to only want to erase after we exit this loop,
+ /* It's tempting to only want to erase after we exit this loop,
but since ast_trim_blanks *could* receive a constant string
(which we presumably wouldn't have to touch), we shouldn't
actually set anything unless we must, and it's easier just
@@ -198,7 +198,7 @@ char * attribute_pure ast_skip_nonblanks(const char *str),
return (char *) str;
}
)
-
+
/*!
\brief Strip leading/trailing whitespace from a string.
\param s The string to be stripped (will be modified).
@@ -215,7 +215,7 @@ char *ast_strip(char *s),
ast_trim_blanks(s);
}
return s;
-}
+}
)
/*!
@@ -256,7 +256,7 @@ enum ast_strsep_flags {
/*!
\brief Act like strsep but ignore separators inside quotes.
- \param s Pointer to address of the the string to be processed.
+ \param s Pointer to address of the string to be processed.
Will be modified and can't be constant.
\param sep A single character delimiter.
\param flags Controls post-processing of the result.
@@ -305,7 +305,7 @@ enum ast_strsep_flags {
char *ast_strsep(char **s, const char sep, uint32_t flags);
/*!
- \brief Strip backslash for "escaped" semicolons,
+ \brief Strip backslash for "escaped" semicolons,
the string to be stripped (will be modified).
\return The stripped string.
*/
@@ -402,7 +402,7 @@ void ast_copy_string(char *dst, const char *src, size_t size),
/*!
\brief Build a string in a buffer, designed to be called repeatedly
-
+
\note This method is not recommended. New code should use ast_str_*() instead.
This is a wrapper for snprintf, that properly handles the buffer pointer
@@ -418,7 +418,7 @@ int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attri
/*!
\brief Build a string in a buffer, designed to be called repeatedly
-
+
This is a wrapper for snprintf, that properly handles the buffer pointer
and buffer space available.
@@ -442,11 +442,11 @@ int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list a
*/
int attribute_pure ast_true(const char *val);
-/*!
+/*!
* \brief Make sure something is false.
* Determine if a string containing a boolean value is "false".
- * This function checks to see whether a string passed to it is an indication of an "false" value.
- * It checks to see if the string is "no", "false", "n", "f", "off" or "0".
+ * This function checks to see whether a string passed to it is an indication of an "false" value.
+ * It checks to see if the string is "no", "false", "n", "f", "off" or "0".
*
* \retval 0 if val is a NULL pointer.
* \retval -1 if "true".
@@ -754,7 +754,7 @@ char *ast_str_truncate(struct ast_str *buf, ssize_t len),
return buf->__AST_STR_STR;
}
)
-
+
/*
* AST_INLINE_API() is a macro that takes a block of code as an argument.
* Using preprocessor #directives in the argument is not supported by all
@@ -778,7 +778,7 @@ int _ast_str_make_space(struct ast_str **buf, size_t new_len, const char *file,
{
struct ast_str *old_buf = *buf;
- if (new_len <= (*buf)->__AST_STR_LEN)
+ if (new_len <= (*buf)->__AST_STR_LEN)
return 0; /* success */
if ((*buf)->__AST_STR_TS == DS_ALLOCA || (*buf)->__AST_STR_TS == DS_STATIC)
return -1; /* cannot extend */
@@ -803,7 +803,7 @@ int ast_str_make_space(struct ast_str **buf, size_t new_len),
{
struct ast_str *old_buf = *buf;
- if (new_len <= (*buf)->__AST_STR_LEN)
+ if (new_len <= (*buf)->__AST_STR_LEN)
return 0; /* success */
if ((*buf)->__AST_STR_TS == DS_ALLOCA || (*buf)->__AST_STR_TS == DS_STATIC)
return -1; /* cannot extend */
@@ -855,8 +855,8 @@ int ast_str_copy_string(struct ast_str **dst, struct ast_str *src),
* \brief Retrieve a thread locally stored dynamic string
*
* \param ts This is a pointer to the thread storage structure declared by using
- * the AST_THREADSTORAGE macro. If declared with
- * AST_THREADSTORAGE(my_buf, my_buf_init), then this argument would be
+ * the AST_THREADSTORAGE macro. If declared with
+ * AST_THREADSTORAGE(my_buf, my_buf_init), then this argument would be
* (&my_buf).
* \param init_len This is the initial length of the thread's dynamic string. The
* current length may be bigger if previous operations in this thread have
@@ -1008,7 +1008,7 @@ char *__ast_str_helper2(struct ast_str **buf, ssize_t max_len,
* va_start(fmt, ap);
* ast_str_set_va(&buf, 0, fmt, ap);
* va_end(ap);
- *
+ *
* printf("This is the string we just built: %s\n", buf->str);
* ...
* }
diff --git a/include/asterisk/tcptls.h b/include/asterisk/tcptls.h
index d19ec529a..b47682928 100644
--- a/include/asterisk/tcptls.h
+++ b/include/asterisk/tcptls.h
@@ -26,7 +26,7 @@
*
* TLS/SSL support is basically implemented by reading from a config file
* (currently manager.conf, http.conf and sip.conf) the names of the certificate
- * files and cipher to use, and then run ssl_setup() to create an appropriate
+ * files and cipher to use, and then run ssl_setup() to create an appropriate
* data structure named ssl_ctx.
*
* If we support multiple domains, presumably we need to read multiple
@@ -44,7 +44,7 @@
* and their setup should be moved to a more central place, e.g. asterisk.conf
* and the source files that processes it. Similarly, ssl_setup() should
* be run earlier in the startup process so modules have it available.
- *
+ *
* \ref AstTlsOverview
*
* \todo For SIP, the SubjectAltNames should be checked on verification
@@ -246,7 +246,7 @@ struct ast_tcptls_session_instance {
#define LEN_T size_t
#endif
-/*!
+/*!
* \brief attempts to connect and start tcptls session, on error the tcptls_session's
* ref count is decremented, fd and file are closed, and NULL is returned.
*/
diff --git a/include/asterisk/tdd.h b/include/asterisk/tdd.h
index 6fb7e3e27..7ae81490d 100644
--- a/include/asterisk/tdd.h
+++ b/include/asterisk/tdd.h
@@ -29,7 +29,7 @@
struct tdd_state;
typedef struct tdd_state TDDSTATE;
-/*! CallerID Initialization
+/*! CallerID Initialization
* Initializes the TDD system. Mostly stuff for inverse FFT
*/
void tdd_init(void);
@@ -43,7 +43,7 @@ void tdd_init(void);
*/
int tdd_generate(struct tdd_state *tdd, unsigned char *buf, const char *string);
-/*! Create a TDD state machine
+/*! Create a TDD state machine
* This function returns a malloc'd instance of the tdd_state data structure.
* Returns a pointer to a malloc'd tdd_state structure, or NULL on error.
*/
@@ -60,13 +60,13 @@ struct tdd_state *tdd_new(void);
*/
int tdd_feed(struct tdd_state *tdd, unsigned char *ubuf, int samples);
-/*! Free a TDD state machine
+/*! Free a TDD state machine
* \param tdd This is the tdd_state state machine to free
* This function frees tdd_state tdd.
*/
void tdd_free(struct tdd_state *tdd);
-/*! Generate Echo Canceller disable tone (2100HZ)
+/*! Generate Echo Canceller disable tone (2100HZ)
* \param outbuf This is the buffer to receive the tone data
* \param len This is the length (in samples) of the tone data to generate
* Returns 0 if no error, and -1 if error.
@@ -74,7 +74,7 @@ void tdd_free(struct tdd_state *tdd);
int ast_tdd_gen_ecdisa(unsigned char *outbuf, int len);
-/*! Generate hold tone
+/*! Generate hold tone
* \param outbuf This is the buffer to receive the tone data
*/
int tdd_gen_holdtone(unsigned char* outbuf);
diff --git a/include/asterisk/threadstorage.h b/include/asterisk/threadstorage.h
index 4e61f42d2..8c3ca0045 100644
--- a/include/asterisk/threadstorage.h
+++ b/include/asterisk/threadstorage.h
@@ -82,9 +82,9 @@ void __ast_threadstorage_object_replace(void *key_old, void *key_new, size_t len
* \endcode
*/
#define AST_THREADSTORAGE(name) \
- AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, ast_free_ptr, static)
+ AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, ast_free_ptr, static)
#define AST_THREADSTORAGE_PUBLIC(name) \
- AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, ast_free_ptr,)
+ AST_THREADSTORAGE_CUSTOM_SCOPE(name, NULL, ast_free_ptr,)
#define AST_THREADSTORAGE_EXTERNAL(name) \
extern struct ast_threadstorage name
#define AST_THREADSTORAGE_RAW(name) \
@@ -149,7 +149,7 @@ static void __init_##name(void) \
* \brief Retrieve thread storage
*
* \param ts This is a pointer to the thread storage structure declared by using
- * the AST_THREADSTORAGE macro. If declared with
+ * the AST_THREADSTORAGE macro. If declared with
* AST_THREADSTORAGE(my_buf), then this argument would be (&my_buf).
* \param init_size This is the amount of space to be allocated the first time
* this thread requests its data. Thus, this should be the size that the
diff --git a/include/asterisk/timing.h b/include/asterisk/timing.h
index ff4947a0a..c0fd96709 100644
--- a/include/asterisk/timing.h
+++ b/include/asterisk/timing.h
@@ -88,7 +88,7 @@ struct ast_timing_interface {
* \param i An instance of the \c ast_timing_interfaces structure with pointers
* to the functions provided by the timing implementation.
*
- * \retval NULL failure
+ * \retval NULL failure
* \retval non-Null handle to be passed to ast_unregister_timing_interface() on success
* \since 1.6.1
*/
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h
index ce46cd083..54c6d9f44 100644
--- a/include/asterisk/translate.h
+++ b/include/asterisk/translate.h
@@ -107,7 +107,7 @@ enum ast_trans_cost_table {
};
/*! \brief
- * Descriptor of a translator.
+ * Descriptor of a translator.
*
* Name, callbacks, and various options
* related to run-time operation (size of buffers, auxiliary
@@ -148,19 +148,19 @@ struct ast_translator {
* on computation time. This cost value is computed based
* on the time required to translate sample data. */
- int (*newpvt)(struct ast_trans_pvt *); /*!< initialize private data
+ int (*newpvt)(struct ast_trans_pvt *); /*!< initialize private data
* associated with the translator */
int (*framein)(struct ast_trans_pvt *pvt, struct ast_frame *in);
- /*!< Input frame callback. Store
+ /*!< Input frame callback. Store
* (and possibly convert) input frame. */
struct ast_frame * (*frameout)(struct ast_trans_pvt *pvt);
- /*!< Output frame callback. Generate a frame
+ /*!< Output frame callback. Generate a frame
* with outbuf content. */
void (*destroy)(struct ast_trans_pvt *pvt);
- /*!< cleanup private data, if needed
+ /*!< cleanup private data, if needed
* (often unnecessary). */
struct ast_frame * (*sample)(void); /*!< Generate an example frame */
@@ -296,9 +296,9 @@ int ast_translator_best_choice(struct ast_format_cap *dst_cap,
struct ast_format **dst_fmt_out,
struct ast_format **src_fmt_out);
-/*!
+/*!
* \brief Builds a translator path
- * Build a path (possibly NULL) from source to dest
+ * Build a path (possibly NULL) from source to dest
* \param dst dest destination format
* \param src source source format
* \return ast_trans_pvt on success, NULL on failure
diff --git a/include/asterisk/udptl.h b/include/asterisk/udptl.h
index 456a5adbc..7137ff936 100644
--- a/include/asterisk/udptl.h
+++ b/include/asterisk/udptl.h
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* UDPTL support for T.38
- *
+ *
* Copyright (C) 2005, Steve Underwood, partly based on RTP code which is
* Copyright (C) 1999-2004, Digium, Inc.
*
@@ -54,7 +54,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct ast_sched_context *sched, s
* \brief Associates a character string 'tag' with a UDPTL session.
* \param udptl The UDPTL session.
* \param format printf-style format string used to construct the tag
- *
+ *
* This function formats a tag for the specified UDPTL
* session, so that any log messages generated by the UDPTL stack
* related to that session will include the tag and the reader of
@@ -98,15 +98,15 @@ void ast_udptl_set_error_correction_scheme(struct ast_udptl *udptl, enum ast_t38
void ast_udptl_set_local_max_ifp(struct ast_udptl *udptl, unsigned int max_ifp);
-/*!
+/*!
* \brief retrieves local_max_datagram.
- *
+ *
* \retval positive value representing max datagram size.
* \retval 0 if no value is present
*/
unsigned int ast_udptl_get_local_max_datagram(struct ast_udptl *udptl);
-/*!
+/*!
* \brief sets far max datagram size. If max_datagram is = 0, the far max datagram
* size is set to a default value.
*/
@@ -114,9 +114,9 @@ void ast_udptl_set_far_max_datagram(struct ast_udptl *udptl, unsigned int max_da
unsigned int ast_udptl_get_far_max_datagram(const struct ast_udptl *udptl);
-/*!
+/*!
* \brief retrieves far max ifp
- *
+ *
* \retval positive value representing max ifp size
* \retval 0 if no value is present
*/
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 03705b321..876e53c29 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -1142,4 +1142,44 @@ int ast_compare_versions(const char *version1, const char *version2);
*/
int ast_check_ipv6(void);
+enum ast_fd_flag_operation {
+ AST_FD_FLAG_SET,
+ AST_FD_FLAG_CLEAR,
+};
+
+/*
+ * \brief Set flags on the given file descriptor
+ * \since 13.19
+ *
+ * If getting or setting flags of the given file descriptor fails, logs an
+ * error message.
+ *
+ * \param fd File descriptor to set flags on
+ * \param flags The flag(s) to set
+ *
+ * \return -1 on error
+ * \return 0 if successful
+ */
+#define ast_fd_set_flags(fd, flags) \
+ __ast_fd_set_flags((fd), (flags), AST_FD_FLAG_SET, __FILE__, __LINE__, __PRETTY_FUNCTION__)
+
+/*
+ * \brief Clear flags on the given file descriptor
+ * \since 13.19
+ *
+ * If getting or setting flags of the given file descriptor fails, logs an
+ * error message.
+ *
+ * \param fd File descriptor to clear flags on
+ * \param flags The flag(s) to clear
+ *
+ * \return -1 on error
+ * \return 0 if successful
+ */
+#define ast_fd_clear_flags(fd, flags) \
+ __ast_fd_set_flags((fd), (flags), AST_FD_FLAG_CLEAR, __FILE__, __LINE__, __PRETTY_FUNCTION__)
+
+int __ast_fd_set_flags(int fd, int flags, enum ast_fd_flag_operation op,
+ const char *file, int lineno, const char *function);
+
#endif /* _ASTERISK_UTILS_H */
diff --git a/include/asterisk/xml.h b/include/asterisk/xml.h
index ab7b630a2..d80fb26f7 100644
--- a/include/asterisk/xml.h
+++ b/include/asterisk/xml.h
@@ -247,4 +247,3 @@ struct ast_xml_node *ast_xml_xpath_get_first_result(struct ast_xml_xpath_results
struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char *xpath_str);
#endif /* _ASTERISK_XML_H */
-
diff --git a/include/jitterbuf.h b/include/jitterbuf.h
index 32579fc6c..9e453a966 100644
--- a/include/jitterbuf.h
+++ b/include/jitterbuf.h
@@ -14,7 +14,7 @@
*/
/*! \file
- * \brief
+ * \brief
* jitterbuf: an application-independent jitterbuffer
* \ref jitterbuf.c
*/
@@ -30,14 +30,14 @@ extern "C" {
/*! \name configuration constants */
/*@{ */
/*! Number of historical timestamps to use in calculating jitter and drift */
-#define JB_HISTORY_SZ 500
+#define JB_HISTORY_SZ 500
/*! what percentage of timestamps should we drop from the history when we examine it;
* this might eventually be something made configurable */
#define JB_HISTORY_DROPPCT 3
/*! the maximum droppct we can handle (say it was configurable). */
#define JB_HISTORY_DROPPCT_MAX 4
/*! the size of the buffer we use to keep the top and botton timestamps for dropping */
-#define JB_HISTORY_MAXBUF_SZ JB_HISTORY_SZ * JB_HISTORY_DROPPCT_MAX / 100
+#define JB_HISTORY_MAXBUF_SZ JB_HISTORY_SZ * JB_HISTORY_DROPPCT_MAX / 100
/*! amount of additional jitterbuffer adjustment */
#define JB_TARGET_EXTRA 40
/*! ms between growing and shrinking; may not be honored if jitterbuffer runs out of space */
@@ -131,10 +131,10 @@ void jb_destroy(jitterbuf *jb);
* you will leak queued frames, and some internal structures */
void jb_reset(jitterbuf *jb);
-/*!\brief queue a frame
- *
- * data=frame data, timings (in ms): ms=length of frame (for voice), ts=ts (sender's time)
- * now=now (in receiver's time) return value is one of
+/*!\brief queue a frame
+ *
+ * data=frame data, timings (in ms): ms=length of frame (for voice), ts=ts (sender's time)
+ * now=now (in receiver's time) return value is one of
* JB_OK: Frame added. Last call to jb_next() still valid
* JB_DROP: Drop this frame immediately
* JB_SCHED: Frame added. Call jb_next() to get a new time for the next frame
@@ -145,7 +145,7 @@ enum jb_return_code jb_put(jitterbuf *jb, void *data, const enum jb_frame_type t
* JB_OK: You've got frame!
* JB_DROP: Here's an audio frame you should just drop. Ask me again for this time..
* JB_NOFRAME: There's no frame scheduled for this time.
- * JB_INTERP: Please interpolate an interpl-length frame for this time (either we need to grow, or there was a lost frame)
+ * JB_INTERP: Please interpolate an interpl-length frame for this time (either we need to grow, or there was a lost frame)
* JB_EMPTY: The jb is empty.
*/
enum jb_return_code jb_get(jitterbuf *jb, jb_frame *frame, long now, long interpl);
@@ -153,7 +153,7 @@ enum jb_return_code jb_get(jitterbuf *jb, jb_frame *frame, long now, long interp
/*! \brief unconditionally get frames from jitterbuf until empty */
enum jb_return_code jb_getall(jitterbuf *jb, jb_frame *frameout);
-/*! \brief when is the next frame due out, in receiver's time (0=EMPTY)
+/*! \brief when is the next frame due out, in receiver's time (0=EMPTY)
* This value may change as frames are added (esp non-audio frames) */
long jb_next(jitterbuf *jb);
diff --git a/include/solaris-compat/sys/queue.h b/include/solaris-compat/sys/queue.h
index ac273dfe3..2176b9664 100644
--- a/include/solaris-compat/sys/queue.h
+++ b/include/solaris-compat/sys/queue.h
@@ -117,12 +117,12 @@ struct name { \
#define SLIST_HEAD_INITIALIZER(head) \
{ NULL }
-
+
#define SLIST_ENTRY(type) \
struct { \
struct type *sle_next; /* next element */ \
}
-
+
/*
* Singly-linked List functions.
*/
@@ -537,4 +537,3 @@ void remque __P((void *a));
#endif /* KERNEL */
#endif /* !_SYS_QUEUE_H_ */
-
diff --git a/install-sh b/install-sh
index d4744f0c7..7a2965892 100755
--- a/install-sh
+++ b/install-sh
@@ -133,7 +133,7 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
+
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
@@ -143,7 +143,7 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
@@ -153,7 +153,7 @@ else
echo "install: $src does not exist"
exit 1
fi
-
+
if [ x"$dst" = x ]
then
echo "install: no destination specified"
@@ -181,7 +181,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
-defaultIFS='
+defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
@@ -220,17 +220,17 @@ else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
@@ -261,7 +261,7 @@ else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
diff --git a/main/acl.c b/main/acl.c
index 43035329c..1d628e6b2 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -1028,4 +1028,3 @@ int ast_find_ourip(struct ast_sockaddr *ourip, const struct ast_sockaddr *bindad
ast_sockaddr_set_port(ourip, port);
return res;
}
-
diff --git a/main/alaw.c b/main/alaw.c
index c5069f358..ced9f16a2 100644
--- a/main/alaw.c
+++ b/main/alaw.c
@@ -214,4 +214,3 @@ void ast_alaw_init(void)
#endif /* TEST_TANDEM_TRANSCODING */
}
-
diff --git a/main/alertpipe.c b/main/alertpipe.c
index fa6ec7bcc..7932a7346 100644
--- a/main/alertpipe.c
+++ b/main/alertpipe.c
@@ -55,17 +55,8 @@ int ast_alertpipe_init(int alert_pipe[2])
ast_log(LOG_WARNING, "Failed to create alert pipe: %s\n", strerror(errno));
return -1;
} else {
- int flags = fcntl(alert_pipe[0], F_GETFL);
- if (fcntl(alert_pipe[0], F_SETFL, flags | O_NONBLOCK) < 0) {
- ast_log(LOG_WARNING, "Failed to set non-blocking mode on alert pipe: %s\n",
- strerror(errno));
- ast_alertpipe_close(alert_pipe);
- return -1;
- }
- flags = fcntl(alert_pipe[1], F_GETFL);
- if (fcntl(alert_pipe[1], F_SETFL, flags | O_NONBLOCK) < 0) {
- ast_log(LOG_WARNING, "Failed to set non-blocking mode on alert pipe: %s\n",
- strerror(errno));
+ if (ast_fd_set_flags(alert_pipe[0], O_NONBLOCK)
+ || ast_fd_set_flags(alert_pipe[1], O_NONBLOCK)) {
ast_alertpipe_close(alert_pipe);
return -1;
}
diff --git a/main/app.c b/main/app.c
index 04aca2b8c..331c82750 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1029,30 +1029,42 @@ int ast_linear_stream(struct ast_channel *chan, const char *filename, int fd, in
{
struct linear_state *lin;
char tmpf[256];
- int res = -1;
int autoclose = 0;
+
if (fd < 0) {
if (ast_strlen_zero(filename)) {
return -1;
}
+
autoclose = 1;
+
if (filename[0] == '/') {
ast_copy_string(tmpf, filename, sizeof(tmpf));
} else {
snprintf(tmpf, sizeof(tmpf), "%s/%s/%s", ast_config_AST_DATA_DIR, "sounds", filename);
}
- if ((fd = open(tmpf, O_RDONLY)) < 0) {
+
+ fd = open(tmpf, O_RDONLY);
+ if (fd < 0) {
ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", tmpf, strerror(errno));
return -1;
}
}
- if ((lin = ast_calloc(1, sizeof(*lin)))) {
- lin->fd = fd;
- lin->allowoverride = allowoverride;
- lin->autoclose = autoclose;
- res = ast_activate_generator(chan, &linearstream, lin);
+
+ lin = ast_calloc(1, sizeof(*lin));
+ if (!lin) {
+ if (autoclose) {
+ close(fd);
+ }
+
+ return -1;
}
- return res;
+
+ lin->fd = fd;
+ lin->allowoverride = allowoverride;
+ lin->autoclose = autoclose;
+
+ return ast_activate_generator(chan, &linearstream, lin);
}
static int control_streamfile(struct ast_channel *chan,
@@ -1351,10 +1363,10 @@ int ast_control_tone(struct ast_channel *chan, const char *tone)
ts = ast_get_indication_tone(zone ? zone : ast_channel_zone(chan), tone_indication);
if (ast_playtones_start(chan, 0, ts ? ts->data : tone_indication, 0)) {
- return -1;
+ res = -1;
}
- for (;;) {
+ while (!res) {
struct ast_frame *fr;
if (ast_waitfor(chan, -1) < 0) {
@@ -3428,4 +3440,3 @@ int app_init(void)
}
return 0;
}
-
diff --git a/main/ast_expr2.c b/main/ast_expr2.c
index 1b866facf..4699b46ce 100644
--- a/main/ast_expr2.c
+++ b/main/ast_expr2.c
@@ -2,20 +2,20 @@
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -78,14 +78,14 @@
/* Line 189 of yacc.c */
#line 1 "ast_expr2.y"
-/* Written by Pace Willisson (pace@blitz.com)
+/* Written by Pace Willisson (pace@blitz.com)
* and placed in the public domain.
*
* Largely rewritten by J.T. Conklin (jtc@wimsey.com)
*
* And then overhauled twice by Steve Murphy (murf@digium.com)
* to add double-quoted strings, allow mult. spaces, improve
- * error messages, and then to fold in a flex scanner for the
+ * error messages, and then to fold in a flex scanner for the
* yylex operation.
*
* $FreeBSD: src/bin/expr/expr.y,v 1.16 2000/07/22 10:59:36 se Exp $
@@ -98,7 +98,7 @@
#include <stdio.h>
#if !defined(STANDALONE) && !defined(STANDALONE2) \
-
+
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#else
#ifndef __USE_ISOC99
@@ -337,7 +337,7 @@ enum node_type {
AST_EXPR_NODE_COMMA, AST_EXPR_NODE_STRING, AST_EXPR_NODE_VAL
} ;
-struct expr_node
+struct expr_node
{
enum node_type type;
struct val *val;
@@ -355,7 +355,7 @@ struct parse_io
yyscan_t scanner;
struct ast_channel *chan;
};
-
+
static int chk_div __P((FP___TYPE, FP___TYPE));
static int chk_minus __P((FP___TYPE, FP___TYPE, FP___TYPE));
static int chk_plus __P((FP___TYPE, FP___TYPE, FP___TYPE));
@@ -407,7 +407,7 @@ typedef struct yyltype
define it here, we have no definition yet for YYSTYPE. */
int ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
-
+
/* I wanted to add args to the yyerror routine, so I could print out
some useful info about the error. Not as easy as it looks, but it
is possible. */
@@ -1229,7 +1229,7 @@ int yydebug;
# define YYMAXDEPTH 10000
#endif
-
+
#if YYERROR_VERBOSE
@@ -1440,7 +1440,7 @@ yysyntax_error (char *yyresult, int yystate, int yychar)
}
}
#endif /* YYERROR_VERBOSE */
-
+
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
@@ -2011,7 +2011,7 @@ yyreduce:
if( (yyvsp[(1) - (1)].val)->type == AST_EXPR_number )
((struct parse_io *)parseio)->val->u.i = (yyvsp[(1) - (1)].val)->u.i;
else
- ((struct parse_io *)parseio)->val->u.s = (yyvsp[(1) - (1)].val)->u.s;
+ ((struct parse_io *)parseio)->val->u.s = (yyvsp[(1) - (1)].val)->u.s;
free((yyvsp[(1) - (1)].val));
;}
break;
@@ -2022,7 +2022,7 @@ yyreduce:
#line 382 "ast_expr2.y"
{/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
((struct parse_io *)parseio)->val->type = AST_EXPR_string;
- ((struct parse_io *)parseio)->val->u.s = strdup("");
+ ((struct parse_io *)parseio)->val->u.s = strdup("");
;}
break;
@@ -2081,7 +2081,7 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 412 "ast_expr2.y"
{ (yyval.val) = (yyvsp[(2) - (3)].val);
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;
DESTROY((yyvsp[(1) - (3)].val)); DESTROY((yyvsp[(3) - (3)].val)); ;}
break;
@@ -2091,8 +2091,8 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 416 "ast_expr2.y"
{ (yyval.val) = op_or ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2100,9 +2100,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 420 "ast_expr2.y"
- { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2111,7 +2111,7 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 424 "ast_expr2.y"
{ (yyval.val) = op_eq ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
(yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2121,7 +2121,7 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 428 "ast_expr2.y"
{ (yyval.val) = op_gt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
(yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2130,9 +2130,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 432 "ast_expr2.y"
- { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2140,9 +2140,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 436 "ast_expr2.y"
- { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2150,9 +2150,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 440 "ast_expr2.y"
- { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2160,9 +2160,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 444 "ast_expr2.y"
- { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2170,9 +2170,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 448 "ast_expr2.y"
- { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2180,9 +2180,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 452 "ast_expr2.y"
- { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2190,9 +2190,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 456 "ast_expr2.y"
- { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val));
- DESTROY((yyvsp[(1) - (2)].val));
- (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column;
+ { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val));
+ DESTROY((yyvsp[(1) - (2)].val));
+ (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2200,9 +2200,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 460 "ast_expr2.y"
- { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val));
- DESTROY((yyvsp[(1) - (2)].val));
- (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column;
+ { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val));
+ DESTROY((yyvsp[(1) - (2)].val));
+ (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2210,9 +2210,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 464 "ast_expr2.y"
- { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2220,9 +2220,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 468 "ast_expr2.y"
- { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2230,9 +2230,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 472 "ast_expr2.y"
- { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2240,9 +2240,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 476 "ast_expr2.y"
- { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2250,9 +2250,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 480 "ast_expr2.y"
- { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2260,10 +2260,10 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 484 "ast_expr2.y"
- { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val));
- DESTROY((yyvsp[(2) - (5)].val));
- DESTROY((yyvsp[(4) - (5)].val));
- (yyloc).first_column = (yylsp[(1) - (5)]).first_column; (yyloc).last_column = (yylsp[(3) - (5)]).last_column;
+ { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val));
+ DESTROY((yyvsp[(2) - (5)].val));
+ DESTROY((yyvsp[(4) - (5)].val));
+ (yyloc).first_column = (yylsp[(1) - (5)]).first_column; (yyloc).last_column = (yylsp[(3) - (5)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2271,9 +2271,9 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 489 "ast_expr2.y"
- { (yyval.val) = op_tildetilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
- DESTROY((yyvsp[(2) - (3)].val));
- (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
+ { (yyval.val) = op_tildetilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
+ DESTROY((yyvsp[(2) - (3)].val));
+ (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
(yyloc).first_line=0; (yyloc).last_line=0;;}
break;
@@ -2528,7 +2528,7 @@ make_number (FP___TYPE i)
vp->type = AST_EXPR_number;
vp->u.i = i;
- return vp;
+ return vp;
}
static struct val *
@@ -2556,7 +2556,7 @@ make_str (const char *s)
}
if (isint)
vp->type = AST_EXPR_numeric_string;
- else
+ else
vp->type = AST_EXPR_string;
return vp;
@@ -2565,12 +2565,12 @@ make_str (const char *s)
static void
free_value (struct val *vp)
-{
+{
if (vp==NULL) {
return;
}
if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string)
- free (vp->u.s);
+ free (vp->u.s);
free(vp);
}
@@ -2579,7 +2579,7 @@ static int
to_number (struct val *vp)
{
FP___TYPE i;
-
+
if (vp == NULL) {
ast_log(LOG_WARNING,"vp==NULL in to_number()\n");
return(0);
@@ -2611,13 +2611,13 @@ strip_quotes(struct val *vp)
{
if (vp->type != AST_EXPR_string && vp->type != AST_EXPR_numeric_string)
return;
-
+
if( vp->u.s[0] == '"' && vp->u.s[strlen(vp->u.s)-1] == '"' )
{
char *f, *t;
f = vp->u.s;
t = vp->u.s;
-
+
while( *f )
{
if( *f && *f != '"' )
@@ -2672,7 +2672,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -2685,14 +2685,14 @@ int main(int argc,char **argv) {
char s[4096];
char out[4096];
FILE *infile;
-
+
if( !argv[1] )
exit(20);
-
+
if( access(argv[1],F_OK)== 0 )
{
int ret;
-
+
infile = fopen(argv[1],"r");
if( !infile )
{
@@ -2703,7 +2703,7 @@ int main(int argc,char **argv) {
{
if( s[strlen(s)-1] == '\n' )
s[strlen(s)-1] = 0;
-
+
ret = ast_expr(s, out, sizeof(out), NULL);
printf("Expression: %s Result: [%d] '%s'\n",
s, ret, out);
@@ -2733,7 +2733,7 @@ int main(int argc,char **argv) {
static void destroy_arglist(struct expr_node *arglist)
{
struct expr_node *arglist_next;
-
+
while (arglist)
{
arglist_next = arglist->right;
@@ -2752,7 +2752,7 @@ static char *compose_func_args(struct expr_node *arglist)
struct expr_node *t = arglist;
char *argbuf;
int total_len = 0;
-
+
while (t) {
if (t != arglist)
total_len += 1; /* for the sep */
@@ -2762,7 +2762,7 @@ static char *compose_func_args(struct expr_node *arglist)
else
total_len += strlen(t->val->u.s);
}
-
+
t = t->right;
}
total_len++; /* for the null */
@@ -2772,10 +2772,10 @@ static char *compose_func_args(struct expr_node *arglist)
t = arglist;
while (t) {
char numbuf[30];
-
+
if (t != arglist)
strcat(argbuf,",");
-
+
if (t->val) {
if (t->val->type == AST_EXPR_number) {
sprintf(numbuf,FP___PRINTF,t->val->u.i);
@@ -3055,7 +3055,7 @@ static struct val *op_func(struct val *funcname, struct expr_node *arglist, stru
ast_log(LOG_WARNING,"Hey! chan is NULL.\n");
if (!f)
ast_log(LOG_WARNING,"Hey! could not find func %s.\n", funcname->u.s);
-
+
if (f && chan) {
if (f->read) {
char workspace[512];
@@ -3070,7 +3070,7 @@ static struct val *op_func(struct val *funcname, struct expr_node *arglist, stru
ast_log(LOG_ERROR,"Error! Function '%s' cannot be read!\n", funcname->u.s);
return (make_number ((FP___TYPE)0.0));
}
-
+
} else {
ast_log(LOG_ERROR, "Error! '%s' doesn't appear to be an available function!\n", funcname->u.s);
return (make_number ((FP___TYPE)0.0));
@@ -3101,7 +3101,7 @@ op_or (struct val *a, struct val *b)
return (a);
}
}
-
+
static struct val *
op_and (struct val *a, struct val *b)
{
@@ -3118,11 +3118,11 @@ op_and (struct val *a, struct val *b)
static struct val *
op_eq (struct val *a, struct val *b)
{
- struct val *r;
+ struct val *r;
if (isstring (a) || isstring (b)) {
to_string (a);
- to_string (b);
+ to_string (b);
r = make_number ((FP___TYPE)(strcoll (a->u.s, b->u.s) == 0));
} else {
#ifdef DEBUG_FOR_CONVERSIONS
@@ -3397,7 +3397,7 @@ op_compl (struct val *a)
{
int v1 = 1;
struct val *r;
-
+
if( !a )
{
v1 = 0;
@@ -3410,7 +3410,7 @@ op_compl (struct val *a)
if( a->u.i == 0 )
v1 = 0;
break;
-
+
case AST_EXPR_string:
if( a->u.s == 0 )
v1 = 0;
@@ -3424,7 +3424,7 @@ op_compl (struct val *a)
v1 = atoi(a->u.s);
}
break;
-
+
case AST_EXPR_numeric_string:
if( a->u.s == 0 )
v1 = 0;
@@ -3440,7 +3440,7 @@ op_compl (struct val *a)
break;
}
}
-
+
r = make_number (!v1);
free_value (a);
return r;
@@ -3511,7 +3511,7 @@ op_div (struct val *a, struct val *b)
}
if (b->u.i == 0) {
- ast_log(LOG_WARNING, "division by zero\n");
+ ast_log(LOG_WARNING, "division by zero\n");
free_value(a);
free_value(b);
return make_number(INT_MAX);
@@ -3525,7 +3525,7 @@ op_div (struct val *a, struct val *b)
free_value (b);
return r;
}
-
+
static struct val *
op_rem (struct val *a, struct val *b)
{
@@ -3551,7 +3551,7 @@ op_rem (struct val *a, struct val *b)
free_value (b);
return r;
}
-
+
static struct val *
op_colon (struct val *a, struct val *b)
@@ -3574,7 +3574,7 @@ op_colon (struct val *a, struct val *b)
ast_log(LOG_WARNING, "regcomp() error : %s\n", errbuf);
free_value(a);
free_value(b);
- return make_str("");
+ return make_str("");
}
/* compare string against pattern */
@@ -3602,7 +3602,7 @@ op_colon (struct val *a, struct val *b)
return v;
}
-
+
static struct val *
op_eqtilde (struct val *a, struct val *b)
@@ -3625,7 +3625,7 @@ op_eqtilde (struct val *a, struct val *b)
ast_log(LOG_WARNING, "regcomp() error : %s\n", errbuf);
free_value(a);
free_value(b);
- return make_str("");
+ return make_str("");
}
/* compare string against pattern */
@@ -3688,4 +3688,3 @@ op_tildetilde (struct val *a, struct val *b)
return v;
}
-
diff --git a/main/ast_expr2.h b/main/ast_expr2.h
index 1fefe11f7..628283405 100644
--- a/main/ast_expr2.h
+++ b/main/ast_expr2.h
@@ -2,20 +2,20 @@
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -28,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -101,6 +101,3 @@ typedef struct YYLTYPE
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
-
-
-
diff --git a/main/ast_expr2.y b/main/ast_expr2.y
index 7163a7132..08ed76a43 100644
--- a/main/ast_expr2.y
+++ b/main/ast_expr2.y
@@ -1,12 +1,12 @@
%{
-/* Written by Pace Willisson (pace@blitz.com)
+/* Written by Pace Willisson (pace@blitz.com)
* and placed in the public domain.
*
* Largely rewritten by J.T. Conklin (jtc@wimsey.com)
*
* And then overhauled twice by Steve Murphy (murf@digium.com)
* to add double-quoted strings, allow mult. spaces, improve
- * error messages, and then to fold in a flex scanner for the
+ * error messages, and then to fold in a flex scanner for the
* yylex operation.
*
* $FreeBSD: src/bin/expr/expr.y,v 1.16 2000/07/22 10:59:36 se Exp $
@@ -19,7 +19,7 @@
#include <stdio.h>
#if !defined(STANDALONE) && !defined(STANDALONE2) \
-
+
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#else
#ifndef __USE_ISOC99
@@ -258,7 +258,7 @@ enum node_type {
AST_EXPR_NODE_COMMA, AST_EXPR_NODE_STRING, AST_EXPR_NODE_VAL
} ;
-struct expr_node
+struct expr_node
{
enum node_type type;
struct val *val;
@@ -276,7 +276,7 @@ struct parse_io
yyscan_t scanner;
struct ast_channel *chan;
};
-
+
static int chk_div __P((FP___TYPE, FP___TYPE));
static int chk_minus __P((FP___TYPE, FP___TYPE, FP___TYPE));
static int chk_plus __P((FP___TYPE, FP___TYPE, FP___TYPE));
@@ -328,14 +328,14 @@ typedef struct yyltype
define it here, we have no definition yet for YYSTYPE. */
int ast_yyerror(const char *,YYLTYPE *, struct parse_io *);
-
+
/* I wanted to add args to the yyerror routine, so I could print out
some useful info about the error. Not as easy as it looks, but it
is possible. */
#define ast_yyerror(x) ast_yyerror(x,&yyloc,parseio)
#define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
%}
-
+
%pure-parser
%locations
/* %debug for when you are having big problems */
@@ -357,7 +357,7 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
%left <val> TOK_AND
%left <val> TOK_EQ TOK_GT TOK_LT TOK_GE TOK_LE TOK_NE
%left <val> TOK_PLUS TOK_MINUS
-%left <val> TOK_MULT TOK_DIV TOK_MOD
+%left <val> TOK_MULT TOK_DIV TOK_MOD
%right <val> TOK_COMPL
%left <val> TOK_COLON TOK_EQTILDE TOK_TILDETILDE
%left <val> TOK_RP TOK_LP
@@ -366,8 +366,8 @@ extern int ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
%type <arglist> arglist
%type <val> start expr
-%destructor { free_value($$); } expr TOKEN TOK_COND TOK_COLONCOLON TOK_OR TOK_AND TOK_EQ
- TOK_GT TOK_LT TOK_GE TOK_LE TOK_NE TOK_PLUS TOK_MINUS TOK_MULT TOK_DIV TOK_MOD TOK_COMPL TOK_COLON TOK_EQTILDE
+%destructor { free_value($$); } expr TOKEN TOK_COND TOK_COLONCOLON TOK_OR TOK_AND TOK_EQ
+ TOK_GT TOK_LT TOK_GE TOK_LE TOK_NE TOK_PLUS TOK_MINUS TOK_MULT TOK_DIV TOK_MOD TOK_COMPL TOK_COLON TOK_EQTILDE
TOK_RP TOK_LP TOK_TILDETILDE
%%
@@ -377,12 +377,12 @@ start: expr { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(st
if( $1->type == AST_EXPR_number )
((struct parse_io *)parseio)->val->u.i = $1->u.i;
else
- ((struct parse_io *)parseio)->val->u.s = $1->u.s;
+ ((struct parse_io *)parseio)->val->u.s = $1->u.s;
free($1);
}
| {/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
((struct parse_io *)parseio)->val->type = AST_EXPR_string;
- ((struct parse_io *)parseio)->val->u.s = strdup("");
+ ((struct parse_io *)parseio)->val->u.s = strdup("");
}
;
@@ -402,7 +402,7 @@ arglist: expr { $$ = alloc_expr_node(AST_EXPR_NODE_VAL); $$->val = $1;}
$$ = $1; t->right = x; x->val = make_str("");}
;
-expr:
+expr:
TOKEN TOK_LP arglist TOK_RP { $$ = op_func($1,$3, ((struct parse_io *)parseio)->chan);
DESTROY($2);
DESTROY($4);
@@ -411,85 +411,85 @@ expr:
}
| TOKEN {$$ = $1;}
| TOK_LP expr TOK_RP { $$ = $2;
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;
DESTROY($1); DESTROY($3); }
| expr TOK_OR expr { $$ = op_or ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_AND expr { $$ = op_and ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_AND expr { $$ = op_and ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
| expr TOK_EQ expr { $$ = op_eq ($1, $3);
- DESTROY($2);
+ DESTROY($2);
@$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
| expr TOK_GT expr { $$ = op_gt ($1, $3);
- DESTROY($2);
+ DESTROY($2);
@$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_LT expr { $$ = op_lt ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_LT expr { $$ = op_lt ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_GE expr { $$ = op_ge ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_GE expr { $$ = op_ge ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_LE expr { $$ = op_le ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_LE expr { $$ = op_le ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_NE expr { $$ = op_ne ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_NE expr { $$ = op_ne ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_PLUS expr { $$ = op_plus ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_PLUS expr { $$ = op_plus ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_MINUS expr { $$ = op_minus ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_MINUS expr { $$ = op_minus ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | TOK_MINUS expr %prec TOK_COMPL { $$ = op_negate ($2);
- DESTROY($1);
- @$.first_column = @1.first_column; @$.last_column = @2.last_column;
+ | TOK_MINUS expr %prec TOK_COMPL { $$ = op_negate ($2);
+ DESTROY($1);
+ @$.first_column = @1.first_column; @$.last_column = @2.last_column;
@$.first_line=0; @$.last_line=0;}
- | TOK_COMPL expr { $$ = op_compl ($2);
- DESTROY($1);
- @$.first_column = @1.first_column; @$.last_column = @2.last_column;
+ | TOK_COMPL expr { $$ = op_compl ($2);
+ DESTROY($1);
+ @$.first_column = @1.first_column; @$.last_column = @2.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_MULT expr { $$ = op_times ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_MULT expr { $$ = op_times ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_DIV expr { $$ = op_div ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_DIV expr { $$ = op_div ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_MOD expr { $$ = op_rem ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_MOD expr { $$ = op_rem ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_COLON expr { $$ = op_colon ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_COLON expr { $$ = op_colon ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_EQTILDE expr { $$ = op_eqtilde ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_EQTILDE expr { $$ = op_eqtilde ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_COND expr TOK_COLONCOLON expr { $$ = op_cond ($1, $3, $5);
- DESTROY($2);
- DESTROY($4);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_COND expr TOK_COLONCOLON expr { $$ = op_cond ($1, $3, $5);
+ DESTROY($2);
+ DESTROY($4);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
- | expr TOK_TILDETILDE expr { $$ = op_tildetilde ($1, $3);
- DESTROY($2);
- @$.first_column = @1.first_column; @$.last_column = @3.last_column;
+ | expr TOK_TILDETILDE expr { $$ = op_tildetilde ($1, $3);
+ DESTROY($2);
+ @$.first_column = @1.first_column; @$.last_column = @3.last_column;
@$.first_line=0; @$.last_line=0;}
;
@@ -521,7 +521,7 @@ make_number (FP___TYPE i)
vp->type = AST_EXPR_number;
vp->u.i = i;
- return vp;
+ return vp;
}
static struct val *
@@ -549,7 +549,7 @@ make_str (const char *s)
}
if (isint)
vp->type = AST_EXPR_numeric_string;
- else
+ else
vp->type = AST_EXPR_string;
return vp;
@@ -558,12 +558,12 @@ make_str (const char *s)
static void
free_value (struct val *vp)
-{
+{
if (vp==NULL) {
return;
}
if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string)
- free (vp->u.s);
+ free (vp->u.s);
free(vp);
}
@@ -572,7 +572,7 @@ static int
to_number (struct val *vp)
{
FP___TYPE i;
-
+
if (vp == NULL) {
ast_log(LOG_WARNING,"vp==NULL in to_number()\n");
return(0);
@@ -604,13 +604,13 @@ strip_quotes(struct val *vp)
{
if (vp->type != AST_EXPR_string && vp->type != AST_EXPR_numeric_string)
return;
-
+
if( vp->u.s[0] == '"' && vp->u.s[strlen(vp->u.s)-1] == '"' )
{
char *f, *t;
f = vp->u.s;
t = vp->u.s;
-
+
while( *f )
{
if( *f && *f != '"' )
@@ -665,7 +665,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -678,14 +678,14 @@ int main(int argc,char **argv) {
char s[4096];
char out[4096];
FILE *infile;
-
+
if( !argv[1] )
exit(20);
-
+
if( access(argv[1],F_OK)== 0 )
{
int ret;
-
+
infile = fopen(argv[1],"r");
if( !infile )
{
@@ -696,7 +696,7 @@ int main(int argc,char **argv) {
{
if( s[strlen(s)-1] == '\n' )
s[strlen(s)-1] = 0;
-
+
ret = ast_expr(s, out, sizeof(out), NULL);
printf("Expression: %s Result: [%d] '%s'\n",
s, ret, out);
@@ -726,7 +726,7 @@ int main(int argc,char **argv) {
static void destroy_arglist(struct expr_node *arglist)
{
struct expr_node *arglist_next;
-
+
while (arglist)
{
arglist_next = arglist->right;
@@ -745,7 +745,7 @@ static char *compose_func_args(struct expr_node *arglist)
struct expr_node *t = arglist;
char *argbuf;
int total_len = 0;
-
+
while (t) {
if (t != arglist)
total_len += 1; /* for the sep */
@@ -755,7 +755,7 @@ static char *compose_func_args(struct expr_node *arglist)
else
total_len += strlen(t->val->u.s);
}
-
+
t = t->right;
}
total_len++; /* for the null */
@@ -765,10 +765,10 @@ static char *compose_func_args(struct expr_node *arglist)
t = arglist;
while (t) {
char numbuf[30];
-
+
if (t != arglist)
strcat(argbuf,",");
-
+
if (t->val) {
if (t->val->type == AST_EXPR_number) {
sprintf(numbuf,FP___PRINTF,t->val->u.i);
@@ -1048,7 +1048,7 @@ static struct val *op_func(struct val *funcname, struct expr_node *arglist, stru
ast_log(LOG_WARNING,"Hey! chan is NULL.\n");
if (!f)
ast_log(LOG_WARNING,"Hey! could not find func %s.\n", funcname->u.s);
-
+
if (f && chan) {
if (f->read) {
char workspace[512];
@@ -1063,7 +1063,7 @@ static struct val *op_func(struct val *funcname, struct expr_node *arglist, stru
ast_log(LOG_ERROR,"Error! Function '%s' cannot be read!\n", funcname->u.s);
return (make_number ((FP___TYPE)0.0));
}
-
+
} else {
ast_log(LOG_ERROR, "Error! '%s' doesn't appear to be an available function!\n", funcname->u.s);
return (make_number ((FP___TYPE)0.0));
@@ -1094,7 +1094,7 @@ op_or (struct val *a, struct val *b)
return (a);
}
}
-
+
static struct val *
op_and (struct val *a, struct val *b)
{
@@ -1111,11 +1111,11 @@ op_and (struct val *a, struct val *b)
static struct val *
op_eq (struct val *a, struct val *b)
{
- struct val *r;
+ struct val *r;
if (isstring (a) || isstring (b)) {
to_string (a);
- to_string (b);
+ to_string (b);
r = make_number ((FP___TYPE)(strcoll (a->u.s, b->u.s) == 0));
} else {
#ifdef DEBUG_FOR_CONVERSIONS
@@ -1390,7 +1390,7 @@ op_compl (struct val *a)
{
int v1 = 1;
struct val *r;
-
+
if( !a )
{
v1 = 0;
@@ -1403,7 +1403,7 @@ op_compl (struct val *a)
if( a->u.i == 0 )
v1 = 0;
break;
-
+
case AST_EXPR_string:
if( a->u.s == 0 )
v1 = 0;
@@ -1417,7 +1417,7 @@ op_compl (struct val *a)
v1 = atoi(a->u.s);
}
break;
-
+
case AST_EXPR_numeric_string:
if( a->u.s == 0 )
v1 = 0;
@@ -1433,7 +1433,7 @@ op_compl (struct val *a)
break;
}
}
-
+
r = make_number (!v1);
free_value (a);
return r;
@@ -1504,7 +1504,7 @@ op_div (struct val *a, struct val *b)
}
if (b->u.i == 0) {
- ast_log(LOG_WARNING, "division by zero\n");
+ ast_log(LOG_WARNING, "division by zero\n");
free_value(a);
free_value(b);
return make_number(INT_MAX);
@@ -1518,7 +1518,7 @@ op_div (struct val *a, struct val *b)
free_value (b);
return r;
}
-
+
static struct val *
op_rem (struct val *a, struct val *b)
{
@@ -1544,7 +1544,7 @@ op_rem (struct val *a, struct val *b)
free_value (b);
return r;
}
-
+
static struct val *
op_colon (struct val *a, struct val *b)
@@ -1567,7 +1567,7 @@ op_colon (struct val *a, struct val *b)
ast_log(LOG_WARNING, "regcomp() error : %s\n", errbuf);
free_value(a);
free_value(b);
- return make_str("");
+ return make_str("");
}
/* compare string against pattern */
@@ -1595,7 +1595,7 @@ op_colon (struct val *a, struct val *b)
return v;
}
-
+
static struct val *
op_eqtilde (struct val *a, struct val *b)
@@ -1618,7 +1618,7 @@ op_eqtilde (struct val *a, struct val *b)
ast_log(LOG_WARNING, "regcomp() error : %s\n", errbuf);
free_value(a);
free_value(b);
- return make_str("");
+ return make_str("");
}
/* compare string against pattern */
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c
index 1f67d460d..f52b92953 100644
--- a/main/ast_expr2f.c
+++ b/main/ast_expr2f.c
@@ -36,7 +36,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -53,7 +53,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -186,7 +186,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -248,7 +248,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -603,7 +603,7 @@ struct parse_io
yyscan_t scanner;
struct ast_channel *chan;
};
-
+
void ast_yyset_column(int column_no, yyscan_t yyscanner);
int ast_yyget_column(yyscan_t yyscanner);
static int curlycount = 0;
@@ -670,9 +670,9 @@ static int yy_init_globals (yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval yyg->yylval_r
-
+
# define yylloc yyg->yylloc_r
-
+
int ast_yylex_init (yyscan_t* scanner);
int ast_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -711,9 +711,9 @@ YYSTYPE * ast_yyget_lval (yyscan_t yyscanner );
void ast_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner );
-
+
void ast_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -727,7 +727,7 @@ extern int ast_yywrap (yyscan_t yyscanner );
#endif
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
@@ -1726,7 +1726,7 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE ast_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) ast_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in ast_yy_create_buffer()" );
@@ -1770,7 +1770,7 @@ static void ast_yy_load_buffer_state (yyscan_t yyscanner)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a ast_yyrestart() or at EOF.
@@ -1796,7 +1796,7 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
@@ -1902,9 +1902,9 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in ast_yyensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -1933,12 +1933,12 @@ static void ast_yyensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -1974,7 +1974,7 @@ YY_BUFFER_STATE ast_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
*/
YY_BUFFER_STATE ast_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
-
+
return ast_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
@@ -1991,7 +1991,7 @@ YY_BUFFER_STATE ast_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ,
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) ast_yyalloc(n ,yyscanner );
@@ -2059,10 +2059,10 @@ YY_EXTRA_TYPE ast_yyget_extra (yyscan_t yyscanner)
int ast_yyget_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
@@ -2072,10 +2072,10 @@ int ast_yyget_lineno (yyscan_t yyscanner)
int ast_yyget_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
@@ -2136,8 +2136,8 @@ void ast_yyset_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
-
+ yy_fatal_error( "ast_yyset_lineno called with no buffer" , yyscanner);
+
yylineno = line_number;
}
@@ -2151,8 +2151,8 @@ void ast_yyset_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
-
+ yy_fatal_error( "ast_yyset_column called with no buffer" , yyscanner);
+
yycolumn = column_no;
}
@@ -2205,13 +2205,13 @@ YYLTYPE *ast_yyget_lloc (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-
+
void ast_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
}
-
+
/* User-visible API */
/* ast_yylex_init is special because it creates the scanner itself, so it is
@@ -2259,20 +2259,20 @@ int ast_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
errno = EINVAL;
return 1;
}
-
+
*ptr_yy_globals = (yyscan_t) ast_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+
ast_yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+
return yy_init_globals ( *ptr_yy_globals );
}
@@ -2487,7 +2487,7 @@ void ast_expr_clear_extra_error_info(void)
extra_error_message[0] = 0;
}
-static const char * const expr2_token_equivs1[] =
+static const char * const expr2_token_equivs1[] =
{
"TOKEN",
"TOK_COND",
@@ -2513,7 +2513,7 @@ static const char * const expr2_token_equivs1[] =
"TOK_LP"
};
-static const char * const expr2_token_equivs2[] =
+static const char * const expr2_token_equivs2[] =
{
"<token>",
"?",
@@ -2624,4 +2624,3 @@ int ast_yyerror (const char *s, yyltype *loc, struct parse_io *parseio )
free(s2);
return(0);
}
-
diff --git a/main/asterisk.c b/main/asterisk.c
index 0026b36d7..01107e217 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -795,12 +795,35 @@ static int swapmode(int *used, int *total)
static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
uint64_t physmem, freeram;
+#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL)
uint64_t freeswap = 0;
+#endif
int nprocs = 0;
long uptime = 0;
int totalswap = 0;
#if defined(HAVE_SYSINFO)
struct sysinfo sys_info;
+#elif defined(HAVE_SYSCTL)
+ static int pageshift;
+ struct vmtotal vmtotal;
+ struct timeval boottime;
+ time_t now;
+ int mib[2], pagesize, usedswap = 0;
+ size_t len;
+#endif
+
+ switch (cmd) {
+ case CLI_INIT:
+ e->command = "core show sysinfo";
+ e->usage =
+ "Usage: core show sysinfo\n"
+ " List current system information.\n";
+ return NULL;
+ case CLI_GENERATE:
+ return NULL;
+ }
+
+#if defined(HAVE_SYSINFO)
sysinfo(&sys_info);
uptime = sys_info.uptime / 3600;
physmem = sys_info.totalram * sys_info.mem_unit;
@@ -809,12 +832,6 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl
freeswap = (sys_info.freeswap * sys_info.mem_unit) / 1024;
nprocs = sys_info.procs;
#elif defined(HAVE_SYSCTL)
- static int pageshift;
- struct vmtotal vmtotal;
- struct timeval boottime;
- time_t now;
- int mib[2], pagesize, usedswap = 0;
- size_t len;
/* calculate the uptime by looking at boottime */
time(&now);
mib[0] = CTL_KERN;
@@ -862,17 +879,6 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl
#endif
#endif
- switch (cmd) {
- case CLI_INIT:
- e->command = "core show sysinfo";
- e->usage =
- "Usage: core show sysinfo\n"
- " List current system information.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
ast_cli(a->fd, "\nSystem Statistics\n");
ast_cli(a->fd, "-----------------\n");
ast_cli(a->fd, " System Uptime: %ld hours\n", uptime);
@@ -881,7 +887,7 @@ static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cl
#if defined(HAVE_SYSINFO)
ast_cli(a->fd, " Buffer RAM: %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024);
#endif
-#if defined(HAVE_SWAPCTL) || defined(HAVE_SYSINFO)
+#if defined(HAVE_SYSINFO) || defined(HAVE_SWAPCTL)
ast_cli(a->fd, " Total Swap Space: %d KiB\n", totalswap);
ast_cli(a->fd, " Free Swap Space: %" PRIu64 " KiB\n\n", freeswap);
#endif
@@ -1691,18 +1697,21 @@ static void *listener(void *unused)
int s;
socklen_t len;
int x;
- int flags;
+ int poll_result;
struct pollfd fds[1];
+
for (;;) {
- if (ast_socket < 0)
+ if (ast_socket < 0) {
return NULL;
+ }
fds[0].fd = ast_socket;
fds[0].events = POLLIN;
- s = ast_poll(fds, 1, -1);
+ poll_result = ast_poll(fds, 1, -1);
pthread_testcancel();
- if (s < 0) {
- if (errno != EINTR)
+ if (poll_result < 0) {
+ if (errno != EINTR) {
ast_log(LOG_WARNING, "poll returned error: %s\n", strerror(errno));
+ }
continue;
}
len = sizeof(sunaddr);
@@ -1716,6 +1725,7 @@ static void *listener(void *unused)
/* turn on socket credentials passing. */
if (setsockopt(s, SOL_SOCKET, SO_PASSCRED, &sckopt, sizeof(sckopt)) < 0) {
ast_log(LOG_WARNING, "Unable to turn on socket credentials passing\n");
+ close(s);
} else
#endif
{
@@ -1729,8 +1739,7 @@ static void *listener(void *unused)
close(s);
break;
}
- flags = fcntl(consoles[x].p[1], F_GETFL);
- fcntl(consoles[x].p[1], F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(consoles[x].p[1], O_NONBLOCK);
consoles[x].mute = 1; /* Default is muted, we will un-mute if necessary */
/* Default uid and gid to -2, so then in cli.c/cli_has_permissions() we will be able
to know if the user didn't send the credentials. */
@@ -2517,52 +2526,6 @@ static int remoteconsolehandler(const char *s)
(s[4] == '\0' || isspace(s[4]))) {
quit_handler(0, SHUTDOWN_FAST, 0);
ret = 1;
- } else if (s[0]) {
- char *shrunk = ast_strdupa(s);
- char *cur;
- char *prev;
-
- /*
- * Remove duplicate spaces from shrunk for matching purposes.
- *
- * shrunk has at least one character in it to start with or we
- * couldn't get here.
- */
- for (prev = shrunk, cur = shrunk + 1; *cur; ++cur) {
- if (*prev == ' ' && *cur == ' ') {
- /* Skip repeated space delimiter. */
- continue;
- }
- *++prev = *cur;
- }
- *++prev = '\0';
-
- if (strncasecmp(shrunk, "core set verbose ", 17) == 0) {
- /*
- * We need to still set the rasterisk option_verbose in case we are
- * talking to an earlier version which doesn't prefilter verbose
- * levels. This is really a compromise as we should always take
- * whatever the server sends.
- */
-
- if (!strncasecmp(shrunk + 17, "off", 3)) {
- ast_verb_console_set(0);
- } else {
- int verbose_new;
- int atleast;
-
- atleast = 8;
- if (strncasecmp(shrunk + 17, "atleast ", atleast)) {
- atleast = 0;
- }
-
- if (sscanf(shrunk + 17 + atleast, "%30d", &verbose_new) == 1) {
- if (!atleast || ast_verb_console_get() < verbose_new) {
- ast_verb_console_set(verbose_new);
- }
- }
- }
- }
}
return ret;
@@ -2887,6 +2850,9 @@ static void send_rasterisk_connect_commands(void)
fdsend(ast_consock, buf);
}
+ /* Leave verbose filtering to the server. */
+ option_verbose = INT_MAX;
+
if (!ast_opt_mute) {
fdsend(ast_consock, "logger mute silent");
} else {
@@ -3236,20 +3202,10 @@ static char *cli_complete(EditLine *editline, int ch)
#define CMD_MATCHESARRAY "_COMMAND MATCHESARRAY \"%s\" \"%s\""
char *mbuf;
char *new_mbuf;
- int mlen = 0, maxmbuf = 2048;
-
- /* Start with a 2048 byte buffer */
- mbuf = ast_malloc(maxmbuf);
-
- /* This will run snprintf twice at most. */
- while (mbuf && (mlen = snprintf(mbuf, maxmbuf, CMD_MATCHESARRAY, lf->buffer, ptr)) > maxmbuf) {
- /* Return value does not include space for NULL terminator. */
- maxmbuf = mlen + 1;
- ast_free(mbuf);
- mbuf = ast_malloc(maxmbuf);
- }
+ int mlen = 0;
+ int maxmbuf = ast_asprintf(&mbuf, CMD_MATCHESARRAY, lf->buffer, ptr);
- if (!mbuf) {
+ if (maxmbuf == -1) {
*((char *) lf->cursor) = savechr;
return (char *)(CC_ERROR);
@@ -3262,9 +3218,9 @@ static char *cli_complete(EditLine *editline, int ch)
while (!strstr(mbuf, AST_CLI_COMPLETE_EOF) && res != -1) {
if (mlen + 1024 > maxmbuf) {
- /* Expand buffer to the next 1024 byte increment. */
+ /* Expand buffer to the next 1024 byte increment plus a NULL terminator. */
maxmbuf = mlen + 1024;
- new_mbuf = ast_realloc(mbuf, maxmbuf);
+ new_mbuf = ast_realloc(mbuf, maxmbuf + 1);
if (!new_mbuf) {
ast_free(mbuf);
*((char *) lf->cursor) = savechr;
@@ -3277,6 +3233,7 @@ static char *cli_complete(EditLine *editline, int ch)
res = read(ast_consock, mbuf + mlen, 1024);
if (res > 0) {
mlen += res;
+ mbuf[mlen] = '\0';
}
}
mbuf[mlen] = '\0';
diff --git a/main/astfd.c b/main/astfd.c
index a96471d60..e9bc142f1 100644
--- a/main/astfd.c
+++ b/main/astfd.c
@@ -306,4 +306,3 @@ int ast_fd_init(void)
return 0;
}
#endif /* defined(DEBUG_FD_LEAKS) */
-
diff --git a/main/astmm.c b/main/astmm.c
index d53323aba..59baa4221 100644
--- a/main/astmm.c
+++ b/main/astmm.c
@@ -1466,7 +1466,7 @@ static void mm_atexit_dump(void)
/*
* Put the alloced list back into regions[].
*
- * We have do do this because we can get called before all other
+ * We have do this because we can get called before all other
* threads have terminated.
*/
mm_atexit_hash_restore(&alloced_atexit);
diff --git a/main/astobj2_container.c b/main/astobj2_container.c
index 466c10372..ae20fa639 100644
--- a/main/astobj2_container.c
+++ b/main/astobj2_container.c
@@ -1236,4 +1236,3 @@ int container_init(void)
return 0;
}
-
diff --git a/main/astobj2_hash.c b/main/astobj2_hash.c
index f5c678740..da0ae8dea 100644
--- a/main/astobj2_hash.c
+++ b/main/astobj2_hash.c
@@ -1153,4 +1153,3 @@ struct ao2_container *__ao2_container_alloc_list_debug(unsigned int ao2_options,
return __ao2_container_alloc_hash_debug(ao2_options, container_options, 1, NULL,
sort_fn, cmp_fn, tag, file, line, func, ref_debug);
}
-
diff --git a/main/astobj2_rbtree.c b/main/astobj2_rbtree.c
index 4362b83cb..d2c2ebf3f 100644
--- a/main/astobj2_rbtree.c
+++ b/main/astobj2_rbtree.c
@@ -2097,4 +2097,3 @@ struct ao2_container *__ao2_container_alloc_rbtree_debug(unsigned int ao2_option
tag, file, line, func, ref_debug);
return rb_ao2_container_init(self, container_options, sort_fn, cmp_fn);
}
-
diff --git a/main/bridge.c b/main/bridge.c
index f689b297f..8284fd3af 100644
--- a/main/bridge.c
+++ b/main/bridge.c
@@ -2495,6 +2495,8 @@ int ast_bridge_add_channel(struct ast_bridge *bridge, struct ast_channel *chan,
RAII_VAR(struct ast_bridge *, chan_bridge, NULL, ao2_cleanup);
RAII_VAR(struct ast_channel *, yanked_chan, NULL, ao2_cleanup);
+ ast_moh_stop(chan);
+
ast_channel_lock(chan);
chan_bridge = ast_channel_get_bridge(chan);
ast_channel_unlock(chan);
@@ -3806,7 +3808,7 @@ void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct a
data->average_talking_energy = talker_energy;
} else if ((data->average_talking_energy < talker_energy) && is_keyframe) {
if (data->chan_old_vsrc) {
- ast_channel_unref(data->chan_old_vsrc);
+ data->chan_old_vsrc = ast_channel_unref(data->chan_old_vsrc);
}
if (data->chan_vsrc) {
data->chan_old_vsrc = data->chan_vsrc;
diff --git a/main/bridge_basic.c b/main/bridge_basic.c
index 93da8cecb..53a4be703 100644
--- a/main/bridge_basic.c
+++ b/main/bridge_basic.c
@@ -3666,4 +3666,3 @@ void ast_bridging_init_basic(void)
ast_bridge_features_register(AST_BRIDGE_BUILTIN_ATTENDEDTRANSFER, feature_attended_transfer, NULL);
ast_bridge_features_register(AST_BRIDGE_BUILTIN_BLINDTRANSFER, feature_blind_transfer, NULL);
}
-
diff --git a/main/bucket.c b/main/bucket.c
index 7618761b9..084d25368 100644
--- a/main/bucket.c
+++ b/main/bucket.c
@@ -560,33 +560,10 @@ struct ast_json *ast_bucket_json(const struct ast_bucket *bucket)
}
/*! \brief Hashing function for file metadata */
-static int bucket_file_metadata_hash(const void *obj, const int flags)
-{
- const struct ast_bucket_metadata *object;
- const char *key;
-
- switch (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
- case OBJ_KEY:
- key = obj;
- return ast_str_hash(key);
- case OBJ_POINTER:
- object = obj;
- return ast_str_hash(object->name);
- default:
- /* Hash can only work on something with a full key */
- ast_assert(0);
- return 0;
- }
-}
+AO2_STRING_FIELD_HASH_FN(ast_bucket_metadata, name)
/*! \brief Comparison function for file metadata */
-static int bucket_file_metadata_cmp(void *obj, void *arg, int flags)
-{
- struct ast_bucket_metadata *metadata1 = obj, *metadata2 = arg;
- const char *name = arg;
-
- return !strcmp(metadata1->name, flags & OBJ_KEY ? name : metadata2->name) ? CMP_MATCH | CMP_STOP : 0;
-}
+AO2_STRING_FIELD_CMP_FN(ast_bucket_metadata, name)
/*! \brief Destructor for bucket files */
static void bucket_file_destroy(void *obj)
@@ -616,7 +593,7 @@ static void *bucket_file_alloc(const char *name)
}
file->metadata = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_NOLOCK, METADATA_BUCKETS,
- bucket_file_metadata_hash, bucket_file_metadata_cmp);
+ ast_bucket_metadata_hash_fn, ast_bucket_metadata_cmp_fn);
if (!file->metadata) {
return NULL;
}
@@ -851,33 +828,10 @@ void ast_bucket_file_temporary_destroy(struct ast_bucket_file *file)
}
/*! \brief Hashing function for scheme container */
-static int bucket_scheme_hash(const void *obj, const int flags)
-{
- const struct ast_bucket_scheme *object;
- const char *key;
-
- switch (flags & (OBJ_POINTER | OBJ_KEY | OBJ_PARTIAL_KEY)) {
- case OBJ_KEY:
- key = obj;
- return ast_str_hash(key);
- case OBJ_POINTER:
- object = obj;
- return ast_str_hash(object->name);
- default:
- /* Hash can only work on something with a full key */
- ast_assert(0);
- return 0;
- }
-}
+AO2_STRING_FIELD_HASH_FN(ast_bucket_scheme, name)
/*! \brief Comparison function for scheme container */
-static int bucket_scheme_cmp(void *obj, void *arg, int flags)
-{
- struct ast_bucket_scheme *scheme1 = obj, *scheme2 = arg;
- const char *name = arg;
-
- return !strcmp(scheme1->name, flags & OBJ_KEY ? name : scheme2->name) ? CMP_MATCH | CMP_STOP : 0;
-}
+AO2_STRING_FIELD_CMP_FN(ast_bucket_scheme, name)
/*! \brief Cleanup function for graceful shutdowns */
static void bucket_cleanup(void)
@@ -910,8 +864,8 @@ int ast_bucket_init(void)
{
ast_register_cleanup(&bucket_cleanup);
- schemes = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, SCHEME_BUCKETS, bucket_scheme_hash,
- bucket_scheme_cmp);
+ schemes = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, SCHEME_BUCKETS,
+ ast_bucket_scheme_hash_fn, ast_bucket_scheme_cmp_fn);
if (!schemes) {
ast_log(LOG_ERROR, "Failed to create container for Bucket schemes\n");
return -1;
diff --git a/main/ccss.c b/main/ccss.c
index 2a939abfd..f11fe1db6 100644
--- a/main/ccss.c
+++ b/main/ccss.c
@@ -1386,19 +1386,8 @@ struct generic_monitor_pvt {
int core_id;
};
-static int generic_monitor_hash_fn(const void *obj, const int flags)
-{
- const struct generic_monitor_instance_list *generic_list = obj;
- return ast_str_hash(generic_list->device_name);
-}
-
-static int generic_monitor_cmp_fn(void *obj, void *arg, int flags)
-{
- const struct generic_monitor_instance_list *generic_list1 = obj;
- const struct generic_monitor_instance_list *generic_list2 = arg;
-
- return !strcmp(generic_list1->device_name, generic_list2->device_name) ? CMP_MATCH | CMP_STOP : 0;
-}
+AO2_STRING_FIELD_HASH_FN(generic_monitor_instance_list, device_name)
+AO2_STRING_FIELD_CMP_FN(generic_monitor_instance_list, device_name)
static struct generic_monitor_instance_list *find_generic_monitor_instance_list(const char * const device_name)
{
@@ -2859,7 +2848,7 @@ static void *generic_recall(void *data)
return NULL;
}
ao2_ref(tmp_cap, -1);
-
+
/* We have a channel. It's time now to set up the datastore of recalled CC interfaces.
* This will be a common task for all recall functions. If it were possible, I'd have
* the core do it automatically, but alas I cannot. Instead, I will provide a public
@@ -4671,8 +4660,8 @@ int ast_cc_init(void)
return -1;
}
if (!(generic_monitors = ao2_t_container_alloc(CC_CORE_INSTANCES_BUCKETS,
- generic_monitor_hash_fn, generic_monitor_cmp_fn,
- "Create generic monitor container"))) {
+ generic_monitor_instance_list_hash_fn, generic_monitor_instance_list_cmp_fn,
+ "Create generic monitor container"))) {
return -1;
}
if (!(cc_core_taskprocessor = ast_taskprocessor_get("CCSS_core", TPS_REF_DEFAULT))) {
diff --git a/main/cdr.c b/main/cdr.c
index 60532fe9f..90371a46a 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -241,8 +241,29 @@ static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct module_config, general),
- .category = "^general$",
- .category_match = ACO_WHITELIST,
+ .category = "general",
+ .category_match = ACO_WHITELIST_EXACT,
+};
+
+/*! Config sections used by existing modules. Do not add to this list. */
+static const char *ignore_categories[] = {
+ "csv",
+ "custom",
+ "manager",
+ "odbc",
+ "pgsql",
+ "radius",
+ "sqlite",
+ "tds",
+ "mysql",
+ NULL,
+};
+
+static struct aco_type ignore_option = {
+ .type = ACO_IGNORE,
+ .name = "modules",
+ .category = (const char*)ignore_categories,
+ .category_match = ACO_WHITELIST_ARRAY,
};
static void *module_config_alloc(void);
@@ -252,8 +273,7 @@ static void module_config_post_apply(void);
/*! \brief The file definition */
static struct aco_file module_file_conf = {
.filename = "cdr.conf",
- .skip_category = "(^csv$|^custom$|^manager$|^odbc$|^pgsql$|^radius$|^sqlite$|^tds$|^mysql$)",
- .types = ACO_TYPES(&general_option),
+ .types = ACO_TYPES(&general_option, &ignore_option),
};
CONFIG_INFO_CORE("cdr", cfg_info, module_configs, module_config_alloc,
@@ -2074,7 +2094,12 @@ static void handle_dial_message(void *data, struct stasis_subscription *sub, str
if (!peer && !caller) {
return;
}
- if (filter_channel_snapshot(peer) || (caller && filter_channel_snapshot(caller))) {
+
+ if (peer && filter_channel_snapshot(peer)) {
+ return;
+ }
+
+ if (caller && filter_channel_snapshot(caller)) {
return;
}
@@ -2454,12 +2479,12 @@ static void bridge_candidate_add_to_cdr(struct cdr_object *cdr,
* \param cand_cdr The \ref cdr_object that is a candidate
*
*/
-static int bridge_candidate_process(struct cdr_object *cdr, struct cdr_object *base_cand_cdr)
+static void bridge_candidate_process(struct cdr_object *cdr, struct cdr_object *base_cand_cdr)
{
struct cdr_object_snapshot *party_a;
struct cdr_object *cand_cdr;
- SCOPED_AO2LOCK(lock, base_cand_cdr);
+ ao2_lock(base_cand_cdr);
for (cand_cdr = base_cand_cdr; cand_cdr; cand_cdr = cand_cdr->next) {
/* Skip any records that are not in this bridge */
@@ -2471,7 +2496,7 @@ static int bridge_candidate_process(struct cdr_object *cdr, struct cdr_object *b
if (!strcasecmp(cdr->party_a.snapshot->name, cand_cdr->party_a.snapshot->name)
|| (cdr->party_b.snapshot
&& !strcasecmp(cdr->party_b.snapshot->name, cand_cdr->party_a.snapshot->name))) {
- return 0;
+ break;
}
party_a = cdr_object_pick_party_a(&cdr->party_a, &cand_cdr->party_a);
@@ -2479,7 +2504,7 @@ static int bridge_candidate_process(struct cdr_object *cdr, struct cdr_object *b
* Party B */
if (!strcasecmp(party_a->snapshot->name, cdr->party_a.snapshot->name)) {
bridge_candidate_add_to_cdr(cdr, &cand_cdr->party_a);
- return 0;
+ break;
}
/* We're Party B. Check if we can add ourselves immediately or if we need
@@ -2499,9 +2524,11 @@ static int bridge_candidate_process(struct cdr_object *cdr, struct cdr_object *b
*/
memset(&cand_cdr->end, 0, sizeof(cand_cdr->end));
}
- return 0;
+
+ break;
}
- return 0;
+
+ ao2_unlock(base_cand_cdr);
}
/*!
@@ -2584,6 +2611,7 @@ static void handle_standard_bridge_enter_message(struct cdr_object *cdr,
ao2_lock(cdr);
+try_again:
for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
if (it_cdr->fn_table->process_party_a) {
CDR_DEBUG("%p - Updating Party A %s snapshot\n", it_cdr,
@@ -2636,7 +2664,7 @@ static void handle_standard_bridge_enter_message(struct cdr_object *cdr,
/* This is guaranteed to succeed: the new CDR is created in the single state
* and will be able to handle the bridge enter message
*/
- handle_standard_bridge_enter_message(cdr, bridge, channel);
+ goto try_again;
}
}
ao2_unlock(cdr);
@@ -2845,32 +2873,39 @@ int ast_cdr_backend_unsuspend(const char *name)
int ast_cdr_register(const char *name, const char *desc, ast_cdrbe be)
{
- struct cdr_beitem *i = NULL;
+ struct cdr_beitem *i;
+ struct cdr_beitem *cur;
- if (!name)
+ if (!name) {
return -1;
+ }
if (!be) {
ast_log(LOG_WARNING, "CDR engine '%s' lacks backend\n", name);
+
+ return -1;
+ }
+
+ i = ast_calloc(1, sizeof(*i));
+ if (!i) {
return -1;
}
+ i->be = be;
+ ast_copy_string(i->name, name, sizeof(i->name));
+ ast_copy_string(i->desc, desc, sizeof(i->desc));
+
AST_RWLIST_WRLOCK(&be_list);
- AST_RWLIST_TRAVERSE(&be_list, i, list) {
- if (!strcasecmp(name, i->name)) {
+ AST_RWLIST_TRAVERSE(&be_list, cur, list) {
+ if (!strcasecmp(name, cur->name)) {
ast_log(LOG_WARNING, "Already have a CDR backend called '%s'\n", name);
AST_RWLIST_UNLOCK(&be_list);
+ ast_free(i);
+
return -1;
}
}
- if (!(i = ast_calloc(1, sizeof(*i))))
- return -1;
-
- i->be = be;
- ast_copy_string(i->name, name, sizeof(i->name));
- ast_copy_string(i->desc, desc, sizeof(i->desc));
-
AST_RWLIST_INSERT_HEAD(&be_list, i, list);
AST_RWLIST_UNLOCK(&be_list);
@@ -4146,7 +4181,7 @@ static char *handle_cli_submit(struct ast_cli_entry *e, int cmd, struct ast_cli_
if (!ast_test_flag(&mod_cfg->general->settings, CDR_ENABLED)) {
ast_cli(a->fd, "Cannot submit CDR batch: CDR engine disabled.\n");
- } else if (ast_test_flag(&mod_cfg->general->settings, CDR_BATCHMODE)) {
+ } else if (!ast_test_flag(&mod_cfg->general->settings, CDR_BATCHMODE)) {
ast_cli(a->fd, "Cannot submit CDR batch: batch mode not enabled.\n");
} else {
submit_unscheduled_batch();
diff --git a/main/cel.c b/main/cel.c
index 0cdf1be00..31cd04542 100644
--- a/main/cel.c
+++ b/main/cel.c
@@ -244,15 +244,28 @@ static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct cel_config, general),
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
+};
+
+/*! Config sections used by existing modules. Do not add to this list. */
+static const char *ignore_categories[] = {
+ "manager",
+ "radius",
+ NULL,
+};
+
+static struct aco_type ignore_option = {
+ .type = ACO_IGNORE,
+ .name = "modules",
+ .category = (const char*)ignore_categories,
+ .category_match = ACO_WHITELIST_ARRAY,
};
/*! \brief The config file to be processed for the module. */
static struct aco_file cel_conf = {
.filename = "cel.conf", /*!< The name of the config file */
- .types = ACO_TYPES(&general_option), /*!< The mapping object types to be processed */
- .skip_category = "(^manager$|^radius$)", /*!< Config sections used by existing modules. Do not add to this list. */
+ .types = ACO_TYPES(&general_option, &ignore_option), /*!< The mapping object types to be processed */
};
static int cel_pre_apply_config(void);
@@ -318,129 +331,16 @@ struct cel_backend {
};
/*! \brief Hashing function for cel_backend */
-static int cel_backend_hash(const void *obj, int flags)
-{
- const struct cel_backend *backend;
- const char *name;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- backend = obj;
- name = backend->name;
- break;
- case OBJ_SEARCH_KEY:
- name = obj;
- break;
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
-
- return ast_str_hash(name);
-}
+AO2_STRING_FIELD_HASH_FN(cel_backend, name)
/*! \brief Comparator function for cel_backend */
-static int cel_backend_cmp(void *obj, void *arg, int flags)
-{
- const struct cel_backend *object_left = obj;
- const struct cel_backend *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->name;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->name, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- /*
- * We could also use a partial key struct containing a length
- * so strlen() does not get called for every comparison instead.
- */
- cmp = strncmp(object_left->name, right_key, strlen(right_key));
- break;
- default:
- /*
- * What arg points to is specific to this traversal callback
- * and has no special meaning to astobj2.
- */
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- /*
- * At this point the traversal callback is identical to a sorted
- * container.
- */
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_CMP_FN(cel_backend, name)
/*! \brief Hashing function for dialstatus container */
-static int dialstatus_hash(const void *obj, int flags)
-{
- const struct cel_dialstatus *dialstatus;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- dialstatus = obj;
- key = dialstatus->uniqueid;
- break;
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
+AO2_STRING_FIELD_HASH_FN(cel_dialstatus, uniqueid)
/*! \brief Comparator function for dialstatus container */
-static int dialstatus_cmp(void *obj, void *arg, int flags)
-{
- struct cel_dialstatus *object_left = obj;
- struct cel_dialstatus *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->uniqueid;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->uniqueid, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- /*
- * We could also use a partial key struct containing a length
- * so strlen() does not get called for every comparison instead.
- */
- cmp = strncmp(object_left->uniqueid, right_key, strlen(right_key));
- break;
- default:
- /*
- * What arg points to is specific to this traversal callback
- * and has no special meaning to astobj2.
- */
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- /*
- * At this point the traversal callback is identical to a sorted
- * container.
- */
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_CMP_FN(cel_dialstatus, uniqueid)
unsigned int ast_cel_check_enabled(void)
{
@@ -1654,71 +1554,14 @@ static int create_routes(void)
return ret;
}
-static int lid_hash(const void *obj, const int flags)
-{
- const struct cel_linkedid *lid;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- lid = obj;
- key = lid->id;
- break;
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
-
-static int lid_cmp(void *obj, void *arg, int flags)
-{
- const struct cel_linkedid *object_left = obj;
- const struct cel_linkedid *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->id;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->id, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- /*
- * We could also use a partial key struct containing a length
- * so strlen() does not get called for every comparison instead.
- */
- cmp = strncmp(object_left->id, right_key, strlen(right_key));
- break;
- default:
- /*
- * What arg points to is specific to this traversal callback
- * and has no special meaning to astobj2.
- */
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- /*
- * At this point the traversal callback is identical to a sorted
- * container.
- */
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_HASH_FN(cel_linkedid, id)
+AO2_STRING_FIELD_CMP_FN(cel_linkedid, id)
int ast_cel_engine_init(void)
{
struct ao2_container *container;
- container = ao2_container_alloc(NUM_APP_BUCKETS, lid_hash, lid_cmp);
+ container = ao2_container_alloc(NUM_APP_BUCKETS, cel_linkedid_hash_fn, cel_linkedid_cmp_fn);
ao2_global_obj_replace_unref(cel_linkedids, container);
ao2_cleanup(container);
if (!container) {
@@ -1727,7 +1570,7 @@ int ast_cel_engine_init(void)
}
container = ao2_container_alloc(NUM_DIALSTATUS_BUCKETS,
- dialstatus_hash, dialstatus_cmp);
+ cel_dialstatus_hash_fn, cel_dialstatus_cmp_fn);
ao2_global_obj_replace_unref(cel_dialstatus_store, container);
ao2_cleanup(container);
if (!container) {
@@ -1745,7 +1588,7 @@ int ast_cel_engine_init(void)
return -1;
}
- container = ao2_container_alloc(BACKEND_BUCKETS, cel_backend_hash, cel_backend_cmp);
+ container = ao2_container_alloc(BACKEND_BUCKETS, cel_backend_hash_fn, cel_backend_cmp_fn);
ao2_global_obj_replace_unref(cel_backends, container);
ao2_cleanup(container);
if (!container) {
@@ -1824,9 +1667,9 @@ void ast_cel_publish_event(struct ast_channel *chan,
struct ast_json *cel_blob;
struct stasis_message *message;
- cel_blob = ast_json_pack("{s: i, s: O}",
+ cel_blob = ast_json_pack("{s: i, s: o}",
"event_type", event_type,
- "event_details", blob);
+ "event_details", ast_json_ref(blob));
message = ast_channel_blob_create_from_cache(ast_channel_uniqueid(chan), cel_generic_type(), cel_blob);
if (message) {
diff --git a/main/channel.c b/main/channel.c
index d22c98738..48963c729 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -11033,4 +11033,3 @@ void ast_channel_clear_flag(struct ast_channel *chan, unsigned int flag)
ast_clear_flag(ast_channel_flags(chan), flag);
ast_channel_unlock(chan);
}
-
diff --git a/main/cli.c b/main/cli.c
index 8e0cc3bd3..fe20c3401 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -1418,6 +1418,8 @@ static char *handle_core_set_debug_channel(struct ast_cli_entry *e, int cmd, str
} else if (a->pos == 5) {
return ast_cli_complete(a->word, completions_off, a->n);
}
+
+ return NULL;
}
if (cmd == (CLI_HANDLER + 1000)) {
@@ -1520,17 +1522,20 @@ static char *handle_showchan(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
return CLI_FAILURE;
}
- output = ast_str_create(8192);
- if (!output) {
- return CLI_FAILURE;
- }
-
chan = ast_channel_get_by_name(a->argv[3]);
if (!chan) {
ast_cli(a->fd, "%s is not a known channel\n", a->argv[3]);
+
return CLI_SUCCESS;
}
+ output = ast_str_create(8192);
+ if (!output) {
+ ast_channel_unref(chan);
+
+ return CLI_FAILURE;
+ }
+
now = ast_tvnow();
ast_channel_lock(chan);
diff --git a/main/codec.c b/main/codec.c
index d0e63682b..05cee4ab6 100644
--- a/main/codec.c
+++ b/main/codec.c
@@ -75,24 +75,7 @@ struct internal_ast_codec {
int __ast_codec_register_with_format(struct ast_codec *codec, const char *format_name,
struct ast_module *mod);
-static int codec_hash(const void *obj, int flags)
-{
- const struct ast_codec *codec;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- return ast_str_hash(key);
- case OBJ_SEARCH_OBJECT:
- codec = obj;
- return ast_str_hash(codec->name);
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
-}
+AO2_STRING_FIELD_HASH_FN(ast_codec, name)
static int codec_cmp(void *obj, void *arg, int flags)
{
@@ -267,7 +250,8 @@ static void codec_shutdown(void)
int ast_codec_init(void)
{
- codecs = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, CODEC_BUCKETS, codec_hash, codec_cmp);
+ codecs = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, CODEC_BUCKETS,
+ ast_codec_hash_fn, codec_cmp);
if (!codecs) {
return -1;
}
diff --git a/main/config_options.c b/main/config_options.c
index f52d3c410..3ac5590ec 100644
--- a/main/config_options.c
+++ b/main/config_options.c
@@ -98,6 +98,7 @@ static char *aco_option_type_string[] = {
"String", /* OPT_STRINGFIELD_T, */
"Unsigned Integer", /* OPT_UINT_T, */
"Boolean", /* OPT_YESNO_T, */
+ "Time Length", /* OPT_TIMELEN_T, */
};
#endif /* AST_XML_DOCS */
@@ -133,7 +134,7 @@ static int noop_handler_fn(const struct aco_option *opt, struct ast_variable *va
static int chararray_handler_fn(const struct aco_option *opt, struct ast_variable *var, void *obj);
#ifdef AST_XML_DOCS
-static int xmldoc_update_config_type(const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, unsigned int matches);
+static int xmldoc_update_config_type(const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, enum aco_category_op category_match);
static int xmldoc_update_config_option(struct aco_type **types, const char *module, const char *name, const char *object_name, const char *default_value, unsigned int regex, enum aco_option_type type);
#endif
@@ -375,6 +376,8 @@ static int find_option_cb(void *obj, void *arg, int flags)
switch (match->match_type) {
case ACO_EXACT:
return strcasecmp(name, match->name) ? 0 : CMP_MATCH | CMP_STOP;
+ case ACO_PREFIX:
+ return strncasecmp(name, match->name, strlen(match->name)) ? 0 : CMP_MATCH | CMP_STOP;
case ACO_REGEX:
return regexec(match->name_regex, name, 0, NULL, 0) ? 0 : CMP_MATCH | CMP_STOP;
}
@@ -404,6 +407,45 @@ struct ao2_container *aco_option_container_alloc(void)
return ao2_container_alloc(CONFIG_OPT_BUCKETS, config_opt_hash, config_opt_cmp);
}
+static int internal_aco_type_category_check(struct aco_type *match, const char *category)
+{
+ const char **categories = (const char **)match->category;
+
+ switch (match->category_match) {
+ case ACO_WHITELIST:
+ return regexec(match->internal->regex, category, 0, NULL, 0);
+
+ case ACO_BLACKLIST:
+ return !regexec(match->internal->regex, category, 0, NULL, 0);
+
+ case ACO_WHITELIST_EXACT:
+ return strcasecmp(match->category, category);
+
+ case ACO_BLACKLIST_EXACT:
+ return !strcasecmp(match->category, category);
+
+ case ACO_WHITELIST_ARRAY:
+ while (*categories) {
+ if (!strcasecmp(*categories, category)) {
+ return 0;
+ }
+ categories++;
+ }
+ return -1;
+
+ case ACO_BLACKLIST_ARRAY:
+ while (*categories) {
+ if (!strcasecmp(*categories, category)) {
+ return -1;
+ }
+ categories++;
+ }
+ return 0;
+ }
+
+ return -1;
+}
+
static struct aco_type *internal_aco_type_find(struct aco_file *file, struct ast_config *cfg, const char *category)
{
size_t x;
@@ -412,7 +454,7 @@ static struct aco_type *internal_aco_type_find(struct aco_file *file, struct ast
for (x = 0, match = file->types[x]; match; match = file->types[++x]) {
/* First make sure we are an object that can service this category */
- if (!regexec(match->internal->regex, category, 0, NULL, 0) == !match->category_match) {
+ if (internal_aco_type_category_check(match, category)) {
continue;
}
@@ -485,6 +527,10 @@ static int process_category(struct ast_config *cfg, struct aco_info *info, struc
return -1;
}
+ if (type->type == ACO_IGNORE) {
+ return 0;
+ }
+
field = info->internal->pending + type->item_offset;
if (!*field) {
ast_log(LOG_ERROR, "In %s: %s - No object to update!\n", file->filename, cat);
@@ -570,7 +616,7 @@ enum aco_process_status aco_process_ast_config(struct aco_info *info, struct aco
{
if (!info->internal) {
ast_log(LOG_ERROR, "Attempt to process %s with uninitialized aco_info\n", file->filename);
- goto error;
+ return ACO_PROCESS_ERROR;
}
if (!(info->internal->pending = info->snapshot_alloc())) {
@@ -633,6 +679,10 @@ enum aco_process_status aco_process_config(struct aco_info *info, int reload)
for (i = 0, match = file->types[i]; match; match = file->types[++i]) {
void **field = info->internal->pending + match->item_offset;
+ if (match->type == ACO_IGNORE) {
+ continue;
+ }
+
if (match->type != ACO_GLOBAL || !*field) {
continue;
}
@@ -799,9 +849,19 @@ static int internal_type_init(struct aco_type *type)
return -1;
}
- if (!(type->internal->regex = build_regex(type->category))) {
- internal_type_destroy(type);
- return -1;
+ switch (type->category_match) {
+ case ACO_BLACKLIST:
+ case ACO_WHITELIST:
+ if (!(type->internal->regex = build_regex(type->category))) {
+ internal_type_destroy(type);
+ return -1;
+ }
+ break;
+ case ACO_BLACKLIST_EXACT:
+ case ACO_WHITELIST_EXACT:
+ case ACO_BLACKLIST_ARRAY:
+ case ACO_WHITELIST_ARRAY:
+ break;
}
if (!(type->internal->opts = aco_option_container_alloc())) {
@@ -830,7 +890,8 @@ int aco_info_init(struct aco_info *info)
#ifdef AST_XML_DOCS
if (!info->hidden &&
!type->hidden &&
- xmldoc_update_config_type(info->module, type->name, type->category, type->matchfield, type->matchvalue, type->category_match == ACO_WHITELIST)) {
+ type->type != ACO_IGNORE &&
+ xmldoc_update_config_type(info->module, type->name, type->category, type->matchfield, type->matchvalue, type->category_match)) {
goto error;
}
#endif /* AST_XML_DOCS */
@@ -991,7 +1052,7 @@ static char *complete_config_option(const char *module, const char *option, cons
/*! \internal
* \brief Update the XML documentation for a config type based on its registration
*/
-static int xmldoc_update_config_type(const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, unsigned int matches)
+static int xmldoc_update_config_type(const char *module, const char *name, const char *category, const char *matchfield, const char *matchvalue, enum aco_category_op category_match)
{
RAII_VAR(struct ast_xml_xpath_results *, results, NULL, ast_xml_xpath_results_free);
RAII_VAR(struct ast_xml_doc_item *, config_info, ao2_find(xmldocs, module, OBJ_KEY), ao2_cleanup);
@@ -1030,7 +1091,18 @@ static int xmldoc_update_config_type(const char *module, const char *name, const
}
ast_xml_set_text(tmp, category);
- ast_xml_set_attribute(tmp, "match", matches ? "true" : "false");
+ switch (category_match) {
+ case ACO_WHITELIST:
+ case ACO_WHITELIST_EXACT:
+ case ACO_WHITELIST_ARRAY:
+ ast_xml_set_attribute(tmp, "match", "true");
+ break;
+ case ACO_BLACKLIST:
+ case ACO_BLACKLIST_EXACT:
+ case ACO_BLACKLIST_ARRAY:
+ ast_xml_set_attribute(tmp, "match", "false");
+ break;
+ }
if (!ast_strlen_zero(matchfield) && !(tmp = ast_xml_new_child(matchinfo, "field"))) {
ast_log(LOG_WARNING, "Could not add %s attribute for type '%s' in module '%s'\n", matchfield, name, module);
diff --git a/main/db.c b/main/db.c
index ab5f7a07c..bf730207c 100644
--- a/main/db.c
+++ b/main/db.c
@@ -129,6 +129,20 @@ DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb ORDER BY ke
DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ? ORDER BY key")
DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))")
+/* This query begs an explanation:
+ *
+ * First, the parameter binding syntax used here is slightly different than the other
+ * queries in that we use a numbered parameter so that we can bind once and get the same
+ * value substituted multiple times within the executed query.
+ *
+ * Second, the key comparison is being used to find all keys that are lexicographically
+ * greater than the provided key, but less than the provided key with a high (but
+ * invalid) Unicode codepoint appended to it. This will give us all keys in the database
+ * that have 'key' as a prefix and performs much better than the equivalent "LIKE key ||
+ * '%'" operation.
+ */
+DEFINE_SQL_STATEMENT(gettree_prefix_stmt, "SELECT key, value FROM astdb WHERE key > ?1 AND key <= ?1 || X'ffff'")
+
static int init_stmt(sqlite3_stmt **stmt, const char *sql, size_t len)
{
ast_mutex_lock(&dblock);
@@ -169,6 +183,7 @@ static void clean_statements(void)
clean_stmt(&deltree_all_stmt, deltree_all_stmt_sql);
clean_stmt(&gettree_stmt, gettree_stmt_sql);
clean_stmt(&gettree_all_stmt, gettree_all_stmt_sql);
+ clean_stmt(&gettree_prefix_stmt, gettree_prefix_stmt_sql);
clean_stmt(&showkey_stmt, showkey_stmt_sql);
clean_stmt(&put_stmt, put_stmt_sql);
clean_stmt(&create_astdb_stmt, create_astdb_stmt_sql);
@@ -184,6 +199,7 @@ static int init_statements(void)
|| init_stmt(&deltree_all_stmt, deltree_all_stmt_sql, sizeof(deltree_all_stmt_sql))
|| init_stmt(&gettree_stmt, gettree_stmt_sql, sizeof(gettree_stmt_sql))
|| init_stmt(&gettree_all_stmt, gettree_all_stmt_sql, sizeof(gettree_all_stmt_sql))
+ || init_stmt(&gettree_prefix_stmt, gettree_prefix_stmt_sql, sizeof(gettree_prefix_stmt_sql))
|| init_stmt(&showkey_stmt, showkey_stmt_sql, sizeof(showkey_stmt_sql))
|| init_stmt(&put_stmt, put_stmt_sql, sizeof(put_stmt_sql));
}
@@ -475,19 +491,64 @@ int ast_db_deltree(const char *family, const char *keytree)
return res;
}
+static struct ast_db_entry *db_gettree_common(sqlite3_stmt *stmt)
+{
+ struct ast_db_entry *head = NULL, *prev = NULL, *cur;
+
+ while (sqlite3_step(stmt) == SQLITE_ROW) {
+ const char *key, *value;
+ size_t key_len, value_len;
+
+ key = (const char *) sqlite3_column_text(stmt, 0);
+ value = (const char *) sqlite3_column_text(stmt, 1);
+
+ if (!key || !value) {
+ break;
+ }
+
+ key_len = strlen(key);
+ value_len = strlen(value);
+
+ cur = ast_malloc(sizeof(*cur) + key_len + value_len + 2);
+ if (!cur) {
+ break;
+ }
+
+ cur->next = NULL;
+ cur->key = cur->data + value_len + 1;
+ memcpy(cur->data, value, value_len + 1);
+ memcpy(cur->key, key, key_len + 1);
+
+ if (prev) {
+ prev->next = cur;
+ } else {
+ head = cur;
+ }
+ prev = cur;
+ }
+
+ return head;
+}
+
struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree)
{
char prefix[MAX_DB_FIELD];
sqlite3_stmt *stmt = gettree_stmt;
- struct ast_db_entry *cur, *last = NULL, *ret = NULL;
+ size_t res = 0;
+ struct ast_db_entry *ret;
if (!ast_strlen_zero(family)) {
if (!ast_strlen_zero(keytree)) {
/* Family and key tree */
- snprintf(prefix, sizeof(prefix), "/%s/%s", family, keytree);
+ res = snprintf(prefix, sizeof(prefix), "/%s/%s", family, keytree);
} else {
/* Family only */
- snprintf(prefix, sizeof(prefix), "/%s", family);
+ res = snprintf(prefix, sizeof(prefix), "/%s", family);
+ }
+
+ if (res >= sizeof(prefix)) {
+ ast_log(LOG_WARNING, "Requested prefix is too long: %s\n", keytree);
+ return NULL;
}
} else {
prefix[0] = '\0';
@@ -495,41 +556,47 @@ struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree)
}
ast_mutex_lock(&dblock);
- if (!ast_strlen_zero(prefix) && (sqlite3_bind_text(stmt, 1, prefix, -1, SQLITE_STATIC) != SQLITE_OK)) {
- ast_log(LOG_WARNING, "Could bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
+ if (res && (sqlite3_bind_text(stmt, 1, prefix, res, SQLITE_STATIC) != SQLITE_OK)) {
+ ast_log(LOG_WARNING, "Could not bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
sqlite3_reset(stmt);
ast_mutex_unlock(&dblock);
return NULL;
}
- while (sqlite3_step(stmt) == SQLITE_ROW) {
- const char *key_s, *value_s;
- if (!(key_s = (const char *) sqlite3_column_text(stmt, 0))) {
- break;
- }
- if (!(value_s = (const char *) sqlite3_column_text(stmt, 1))) {
- break;
- }
- if (!(cur = ast_malloc(sizeof(*cur) + strlen(key_s) + strlen(value_s) + 2))) {
- break;
- }
- cur->next = NULL;
- cur->key = cur->data + strlen(value_s) + 1;
- strcpy(cur->data, value_s);
- strcpy(cur->key, key_s);
- if (last) {
- last->next = cur;
- } else {
- ret = cur;
- }
- last = cur;
- }
+ ret = db_gettree_common(stmt);
sqlite3_reset(stmt);
ast_mutex_unlock(&dblock);
return ret;
}
+struct ast_db_entry *ast_db_gettree_by_prefix(const char *family, const char *key_prefix)
+{
+ char prefix[MAX_DB_FIELD];
+ size_t res;
+ struct ast_db_entry *ret;
+
+ res = snprintf(prefix, sizeof(prefix), "/%s/%s", family, key_prefix);
+ if (res >= sizeof(prefix)) {
+ ast_log(LOG_WARNING, "Requested key prefix is too long: %s\n", key_prefix);
+ return NULL;
+ }
+
+ ast_mutex_lock(&dblock);
+ if (sqlite3_bind_text(gettree_prefix_stmt, 1, prefix, res, SQLITE_STATIC) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Could not bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
+ sqlite3_reset(gettree_prefix_stmt);
+ ast_mutex_unlock(&dblock);
+ return NULL;
+ }
+
+ ret = db_gettree_common(gettree_prefix_stmt);
+ sqlite3_reset(gettree_prefix_stmt);
+ ast_mutex_unlock(&dblock);
+
+ return ret;
+}
+
void ast_db_freetree(struct ast_db_entry *dbe)
{
struct ast_db_entry *last;
@@ -962,8 +1029,8 @@ static void *db_sync_thread(void *data)
ast_mutex_lock(&dblock);
ast_db_begin_transaction();
for (;;) {
- /* If dosync is set, db_sync() was called during sleep(1),
- * and the pending transaction should be committed.
+ /* If dosync is set, db_sync() was called during sleep(1),
+ * and the pending transaction should be committed.
* Otherwise, block until db_sync() is called.
*/
while (!dosync) {
diff --git a/main/dns.c b/main/dns.c
index 320d91768..de26c8d7c 100644
--- a/main/dns.c
+++ b/main/dns.c
@@ -340,4 +340,3 @@ struct ao2_container *ast_dns_get_nameservers(void)
return nameservers;
}
-
diff --git a/main/editline/INSTALL b/main/editline/INSTALL
index 16fb6ffd1..05e00f71c 100644
--- a/main/editline/INSTALL
+++ b/main/editline/INSTALL
@@ -29,7 +29,7 @@ Optionally, pass any of the following (not a definitive list) arguments to
--prefix=<install-root-dir>
Set the base directory in which to install. For example:
-
+
./configure --prefix=/usr/local
will cause files to be installed into /usr/local/bin, /usr/local/man,
@@ -51,7 +51,7 @@ CFLAGS="?"
CPPFLAGS="?"
Pass these flags to the C preprocessor. Note that CFLAGS is not passed
- to 'cpp' when 'configure' is looking for include files, so you must use
+ to 'cpp' when 'configure' is looking for include files, so you must use
CPPFLAGS instead if you need to help 'configure' find header files.
LD_LIBRARY_PATH="?"
diff --git a/main/editline/chared.c b/main/editline/chared.c
index 8eaeb3b54..d0a03e2ad 100644
--- a/main/editline/chared.c
+++ b/main/editline/chared.c
@@ -515,7 +515,7 @@ ch_enlargebufs(el, addlen)
/* zero the newly added memory, leave old data in */
(void) memset(&newbuffer[sz], 0, newsz - sz);
-
+
oldbuf = el->el_line.buffer;
el->el_line.buffer = newbuffer;
@@ -554,7 +554,7 @@ ch_enlargebufs(el, addlen)
el->el_chared.c_undo.ptr = el->el_line.buffer +
(el->el_chared.c_undo.ptr - oldbuf);
el->el_chared.c_undo.buf = newbuffer;
-
+
if (!hist_enlargebuf(el, sz, newsz))
return 0;
diff --git a/main/editline/configure b/main/editline/configure
index d5d0a4dea..ea180bce2 100755
--- a/main/editline/configure
+++ b/main/editline/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
+# Generated automatically using autoconf version 2.13
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -932,15 +932,15 @@ case "${host}" in
if echo ${host} | grep -q cygwin ; then \
echo "cygwin detected"; \
S_CFLAGS=""; \
- echo "/* cygdef.h. Generated automatically by configure. */
+ echo "/* cygdef.h. Generated automatically by configure. */
#ifndef _CYGDEF_H_
#define _CYGDEF_H_ 1
#include <sys/ioctl.h>
#define __linux__ 1
-
+
typedef void (*sig_t)(int);
-
+
#endif /* _CYGDEF_H_ */" > cygdef.h; \
echo "
@@ -1092,13 +1092,13 @@ else
/*)
ac_cv_path_AR="$AR" # Let the user override the test with a path.
;;
- ?:/*)
+ ?:/*)
ac_cv_path_AR="$AR" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
+ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_AR="$ac_dir/$ac_word"
@@ -1348,7 +1348,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
\
@@ -1386,7 +1386,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
\
@@ -1428,7 +1428,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
\
@@ -1466,7 +1466,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
\
@@ -1515,7 +1515,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
fi
@@ -1571,7 +1571,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
fi
@@ -1626,7 +1626,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
CCSRCS="$CCSRCS np/fgetln.c"
@@ -1682,7 +1682,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
CCSRCS="$CCSRCS np/vis.c"
@@ -1738,7 +1738,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
CCSRCS="$CCSRCS np/unvis.c"
@@ -1794,7 +1794,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
CCSRCS="$CCSRCS np/strlcpy.c"
@@ -1850,7 +1850,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
-
+
else
echo "$ac_t""no" 1>&6
CCSRCS="$CCSRCS np/strlcat.c"
@@ -2460,5 +2460,3 @@ EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-
diff --git a/main/editline/configure.in b/main/editline/configure.in
index d8bc706b1..bd99b5a86 100644
--- a/main/editline/configure.in
+++ b/main/editline/configure.in
@@ -1,6 +1,6 @@
-dnl
+dnl
dnl Process this file with autoconf to produce a configure script.
-dnl
+dnl
AC_INIT(Makefile.in)
dnl If CFLAGS isn't defined and using gcc, set CFLAGS to something reasonable.
@@ -36,15 +36,15 @@ case "${host}" in
if echo ${host} | grep -q cygwin ; then \
echo "cygwin detected"; \
S_CFLAGS=""; \
- echo "/* cygdef.h. Generated automatically by configure. */
+ echo "/* cygdef.h. Generated automatically by configure. */
#ifndef _CYGDEF_H_
#define _CYGDEF_H_ 1
#include <sys/ioctl.h>
#define __linux__ 1
-
+
typedef void (*sig_t)(int);
-
+
#endif /* _CYGDEF_H_ */" > cygdef.h; \
echo "
@@ -155,10 +155,10 @@ else
fi
-dnl
+dnl
dnl File lists. This is done here instead of in the Makefile in order to avoid
dnl the need for conditionals.
-dnl
+dnl
dnl .c files.
ACSRCS="common.c emacs.c vi.c"
@@ -275,4 +275,3 @@ AC_SUBST(TCSRCS)
AC_CONFIG_HEADER(config.h)
AC_OUTPUT([Makefile makelist])
-
diff --git a/main/editline/install-sh b/main/editline/install-sh
index ebc66913e..058b26c82 100755
--- a/main/editline/install-sh
+++ b/main/editline/install-sh
@@ -115,7 +115,7 @@ fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
+
if [ -d $dst ]; then
instcmd=:
else
@@ -124,7 +124,7 @@ if [ x"$dir_arg" != x ]; then
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
@@ -134,7 +134,7 @@ else
echo "install: $src does not exist"
exit 1
fi
-
+
if [ x"$dst" = x ]
then
echo "install: no destination specified"
@@ -162,7 +162,7 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
-defaultIFS='
+defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
@@ -201,17 +201,17 @@ else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
@@ -242,7 +242,7 @@ else
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
diff --git a/main/editline/map.c b/main/editline/map.c
index 4187cb597..448c3c0ca 100644
--- a/main/editline/map.c
+++ b/main/editline/map.c
@@ -369,7 +369,7 @@ private const el_action_t el_map_vi_insert[] = {
* NOTE: These mappings do NOT Correspond well
* to the KSH VI editing assignments.
* On the other and they are convenient and
- * many people have have gotten used to them.
+ * many people have gotten used to them.
*/
/* 0 */ ED_UNASSIGNED, /* ^@ */
/* 1 */ ED_MOVE_TO_BEG, /* ^A */
diff --git a/main/editline/np/unvis.c b/main/editline/np/unvis.c
index 844a5581b..0a26e3d63 100644
--- a/main/editline/np/unvis.c
+++ b/main/editline/np/unvis.c
@@ -105,7 +105,7 @@ __unvis13(cp, c, astate, flag)
|| *astate == S_HEX2) {
*astate = S_GROUND;
return (UNVIS_VALID);
- }
+ }
return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
}
@@ -116,7 +116,7 @@ __unvis13(cp, c, astate, flag)
if (c == '\\') {
*astate = S_START;
return (0);
- }
+ }
if ((flag & VIS_HTTPSTYLE) && c == '%') {
*astate = S_HEX1;
return (0);
@@ -193,7 +193,7 @@ __unvis13(cp, c, astate, flag)
}
*astate = S_GROUND;
return (UNVIS_SYNBAD);
-
+
case S_META:
if (c == '-')
*astate = S_META1;
@@ -204,12 +204,12 @@ __unvis13(cp, c, astate, flag)
return (UNVIS_SYNBAD);
}
return (0);
-
+
case S_META1:
*astate = S_GROUND;
*cp |= c;
return (UNVIS_VALID);
-
+
case S_CTRL:
if (c == '?')
*cp |= 0177;
@@ -220,15 +220,15 @@ __unvis13(cp, c, astate, flag)
case S_OCTAL2: /* second possible octal digit */
if (isoctal(c)) {
- /*
- * yes - and maybe a third
+ /*
+ * yes - and maybe a third
*/
*cp = (*cp << 3) + (c - '0');
- *astate = S_OCTAL3;
+ *astate = S_OCTAL3;
return (0);
- }
- /*
- * no - done with current sequence, push back passed char
+ }
+ /*
+ * no - done with current sequence, push back passed char
*/
*astate = S_GROUND;
return (UNVIS_VALIDPUSH);
@@ -249,8 +249,8 @@ __unvis13(cp, c, astate, flag)
*astate = S_HEX2;
return (0);
}
- /*
- * no - done with current sequence, push back passed char
+ /*
+ * no - done with current sequence, push back passed char
*/
*astate = S_GROUND;
return (UNVIS_VALIDPUSH);
@@ -261,9 +261,9 @@ __unvis13(cp, c, astate, flag)
return (UNVIS_VALID);
}
return (UNVIS_VALIDPUSH);
- default:
- /*
- * decoder in unknown state - (probably uninitialized)
+ default:
+ /*
+ * decoder in unknown state - (probably uninitialized)
*/
*astate = S_GROUND;
return (UNVIS_SYNBAD);
@@ -271,7 +271,7 @@ __unvis13(cp, c, astate, flag)
}
/*
- * strunvis - decode src into dst
+ * strunvis - decode src into dst
*
* Number of chars decoded into dst is returned, -1 on error.
* Dst is null terminated.
diff --git a/main/editline/np/vis.c b/main/editline/np/vis.c
index bd8192440..264dce629 100644
--- a/main/editline/np/vis.c
+++ b/main/editline/np/vis.c
@@ -111,7 +111,7 @@ do \
SVIS(dst, c, flag, nextc, extra); \
} \
while (/*CONSTCOND*/0)
-
+
/*
* This is SVIS, the central macro of vis.
* dst: Pointer to the destination buffer
@@ -219,10 +219,10 @@ svis(dst, c, flag, nextc, extra)
* be encoded, too. These functions are useful e. g. to
* encode strings in such a way so that they are not interpreted
* by a shell.
- *
+ *
* Dst must be 4 times the size of src to account for possible
* expansion. The length of dst, not including the trailing NULL,
- * is returned.
+ * is returned.
*
* Strsvisx encodes exactly len bytes from src into dst.
* This is useful for encoding a block of data.
@@ -294,7 +294,7 @@ char *
vis(dst, c, flag, nextc)
char *dst;
int c, flag, nextc;
-
+
{
char *extra;
@@ -312,10 +312,10 @@ vis(dst, c, flag, nextc)
/*
* strvis, strvisx - visually encode characters from src into dst
- *
+ *
* Dst must be 4 times the size of src to account for possible
* expansion. The length of dst, not including the trailing NULL,
- * is returned.
+ * is returned.
*
* Strvisx encodes exactly len bytes from src into dst.
* This is useful for encoding a block of data.
diff --git a/main/editline/read.h b/main/editline/read.h
index b01e77db2..716a51693 100644
--- a/main/editline/read.h
+++ b/main/editline/read.h
@@ -47,7 +47,7 @@ typedef int (*el_rfunc_t)(EditLine *, char *);
typedef struct el_read_t {
el_rfunc_t read_char; /* Function to read a character */
} el_read_t;
-
+
protected int read_init(EditLine *);
protected int el_read_setfn(EditLine *, el_rfunc_t);
protected el_rfunc_t el_read_getfn(EditLine *);
diff --git a/main/editline/readline.c b/main/editline/readline.c
index 48a843df2..7389c1886 100644
--- a/main/editline/readline.c
+++ b/main/editline/readline.c
@@ -250,7 +250,7 @@ rl_initialize(void)
break;
}
}
-
+
/* read settings from configuration file */
el_source(e, NULL);
@@ -1531,7 +1531,7 @@ rl_complete_internal(int what_to_do)
maxlen = match_len;
}
matches_num = i - 1;
-
+
/* newline to get on next line from command line */
fprintf(e->el_outfile, "\n");
diff --git a/main/editline/refresh.c b/main/editline/refresh.c
index fcebe1253..fe3ac440f 100644
--- a/main/editline/refresh.c
+++ b/main/editline/refresh.c
@@ -166,7 +166,7 @@ re_putc(EditLine *el, int c, int shift)
for(i=1; i < lins; i++)
el->el_vdisplay[i-1] = el->el_vdisplay[i];
- firstline[0] = '\0'; /* empty the string */
+ firstline[0] = '\0'; /* empty the string */
el->el_vdisplay[i-1] = firstline;
} else
el->el_refresh.r_cursor.v++;
@@ -1002,7 +1002,7 @@ re_fastputc(EditLine *el, int c)
if (el->el_cursor.v + 1 >= el->el_term.t_size.v) {
int i, lins = el->el_term.t_size.v;
char *firstline = el->el_display[0];
-
+
for(i=1; i < lins; i++)
el->el_display[i-1] = el->el_display[i];
@@ -1064,7 +1064,7 @@ re_fastaddc(EditLine *el)
/* re_clear_display():
- * clear the screen buffers so that new new prompt starts fresh.
+ * clear the screen buffers so that new prompt starts fresh.
*/
protected void
re_clear_display(EditLine *el)
diff --git a/main/editline/term.c b/main/editline/term.c
index 00b68ed33..6814cc4ca 100644
--- a/main/editline/term.c
+++ b/main/editline/term.c
@@ -428,7 +428,7 @@ term_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
*/
tlen = 0;
for (tmp = tlist; tmp < &tlist[T_str]; tmp++)
- if (*tmp != NULL && *tmp != '\0' && *tmp != *str) {
+ if (*tmp != NULL && **tmp != '\0' && *tmp != *str) {
char *ptr;
for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++)
@@ -640,7 +640,7 @@ mc_again:
(el->el_cursor.h & 0370);
i < (where & 0370);
i += 8)
- term__putc('\t');
+ term__putc('\t');
/* then tab over */
el->el_cursor.h = where & 0370;
}
diff --git a/main/endpoints.c b/main/endpoints.c
index 80e7f87fd..88506a4c8 100644
--- a/main/endpoints.c
+++ b/main/endpoints.c
@@ -78,53 +78,8 @@ struct ast_endpoint {
struct stasis_forward *tech_forward;
};
-static int endpoint_hash(const void *obj, int flags)
-{
- const struct ast_endpoint *endpoint;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- return ast_str_hash(key);
- case OBJ_SEARCH_OBJECT:
- endpoint = obj;
- return ast_str_hash(endpoint->id);
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
-}
-
-static int endpoint_cmp(void *obj, void *arg, int flags)
-{
- const struct ast_endpoint *left = obj;
- const struct ast_endpoint *right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = right->id;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(left->id, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(left->id, right_key, strlen(right_key));
- break;
- default:
- ast_assert(0);
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
-
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_HASH_FN(ast_endpoint, id)
+AO2_STRING_FIELD_CMP_FN(ast_endpoint, id)
struct ast_endpoint *ast_endpoint_find_by_id(const char *id)
{
@@ -524,14 +479,14 @@ int ast_endpoint_init(void)
{
ast_register_cleanup(endpoint_cleanup);
- endpoints = ao2_container_alloc(ENDPOINT_BUCKETS, endpoint_hash,
- endpoint_cmp);
+ endpoints = ao2_container_alloc(ENDPOINT_BUCKETS, ast_endpoint_hash_fn,
+ ast_endpoint_cmp_fn);
if (!endpoints) {
return -1;
}
- tech_endpoints = ao2_container_alloc(TECH_ENDPOINT_BUCKETS, endpoint_hash,
- endpoint_cmp);
+ tech_endpoints = ao2_container_alloc(TECH_ENDPOINT_BUCKETS, ast_endpoint_hash_fn,
+ ast_endpoint_cmp_fn);
if (!tech_endpoints) {
return -1;
}
diff --git a/main/features_config.c b/main/features_config.c
index 2689687cc..e2d405740 100644
--- a/main/features_config.c
+++ b/main/features_config.c
@@ -219,7 +219,7 @@
The <replaceable>DYNAMIC_FEATURES</replaceable> is a <literal>#</literal> separated list of
either applicationmap item names or featuregroup names.</para>
</description>
- <configOption name="^.*$" regex="true">
+ <configOption name="">
<synopsis>A custom feature to invoke during a bridged call</synopsis>
<description>
<para>Each item listed here is a comma-separated list of parameters that determine
@@ -272,7 +272,7 @@
DTMF sequence used to invoke an applicationmap item to be overridden with
a different sequence.</para>
</description>
- <configOption name="^.*$" regex="true">
+ <configOption name="">
<synopsis>Applicationmap item to place in the feature group</synopsis>
<description>
<para>Each item here must be a name of an item in the applicationmap. The
@@ -578,24 +578,24 @@ struct features_config {
static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "globals",
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
.item_offset = offsetof(struct features_config, global),
};
static struct aco_type featuremap_option = {
.type = ACO_GLOBAL,
.name = "featuremap",
- .category_match = ACO_WHITELIST,
- .category = "^featuremap$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "featuremap",
.item_offset = offsetof(struct features_config, featuremap),
};
static struct aco_type applicationmap_option = {
.type = ACO_GLOBAL,
.name = "applicationmap",
- .category_match = ACO_WHITELIST,
- .category = "^applicationmap$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "applicationmap",
.item_offset = offsetof(struct features_config, applicationmap),
};
@@ -1851,13 +1851,13 @@ static int load_config(void)
aco_option_register_custom(&cfg_info, "automixmon", ACO_EXACT, featuremap_options,
DEFAULT_FEATUREMAP_AUTOMIXMON, featuremap_handler, 0);
- aco_option_register_custom(&cfg_info, "^.*$", ACO_REGEX, applicationmap_options,
+ aco_option_register_custom(&cfg_info, "", ACO_PREFIX, applicationmap_options,
"", applicationmap_handler, 0);
- aco_option_register_custom(&cfg_info, "^.*$", ACO_REGEX, featuregroup_options,
+ aco_option_register_custom(&cfg_info, "", ACO_PREFIX, featuregroup_options,
"", featuregroup_handler, 0);
- aco_option_register_custom_nodoc(&cfg_info, "^.*$", ACO_REGEX, parkinglot_options,
+ aco_option_register_custom_nodoc(&cfg_info, "", ACO_PREFIX, parkinglot_options,
"", unsupported_handler, 0);
if (aco_process_config(&cfg_info, 0) == ACO_PROCESS_ERROR) {
diff --git a/main/format.c b/main/format.c
index 758a7fc5e..b81a1f1d4 100644
--- a/main/format.c
+++ b/main/format.c
@@ -64,53 +64,8 @@ struct format_interface {
/*! \brief Container for registered format interfaces */
static struct ao2_container *interfaces;
-static int format_interface_hash(const void *obj, int flags)
-{
- const struct format_interface *format_interface;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- return ast_str_hash(key);
- case OBJ_SEARCH_OBJECT:
- format_interface = obj;
- return ast_str_hash(format_interface->codec);
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
-}
-
-static int format_interface_cmp(void *obj, void *arg, int flags)
-{
- const struct format_interface *left = obj;
- const struct format_interface *right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- cmp = strcmp(left->codec, right->codec);
- break;
- case OBJ_SEARCH_KEY:
- cmp = strcmp(left->codec, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(left->codec, right_key, strlen(right_key));
- break;
- default:
- ast_assert(0);
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
-
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_HASH_FN(format_interface, codec)
+AO2_STRING_FIELD_CMP_FN(format_interface, codec)
/*! \brief Function called when the process is shutting down */
static void format_shutdown(void)
@@ -121,8 +76,8 @@ static void format_shutdown(void)
int ast_format_init(void)
{
- interfaces = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, FORMAT_INTERFACE_BUCKETS, format_interface_hash,
- format_interface_cmp);
+ interfaces = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, FORMAT_INTERFACE_BUCKETS,
+ format_interface_hash_fn, format_interface_cmp_fn);
if (!interfaces) {
return -1;
}
diff --git a/main/format_cache.c b/main/format_cache.c
index 00563e899..3de1951a3 100644
--- a/main/format_cache.c
+++ b/main/format_cache.c
@@ -541,4 +541,3 @@ int ast_format_cache_is_slinear(struct ast_format *format)
return 0;
}
-
diff --git a/main/format_compatibility.c b/main/format_compatibility.c
index 0f1dff7c8..6a4dacbb1 100644
--- a/main/format_compatibility.c
+++ b/main/format_compatibility.c
@@ -271,4 +271,3 @@ struct ast_format *ast_format_compatibility_bitfield2format(uint64_t bitfield)
}
return NULL;
}
-
diff --git a/main/fskmodem.c b/main/fskmodem.c
index dee5f5cf7..63f7ce8e1 100644
--- a/main/fskmodem.c
+++ b/main/fskmodem.c
@@ -32,4 +32,3 @@
#else
#include "fskmodem_float.c"
#endif
-
diff --git a/main/http.c b/main/http.c
index d1a443a4f..e8d395b15 100644
--- a/main/http.c
+++ b/main/http.c
@@ -1955,9 +1955,7 @@ static void *httpd_helper_thread(void *data)
}
/* make sure socket is non-blocking */
- flags = fcntl(ser->fd, F_GETFL);
- flags |= O_NONBLOCK;
- fcntl(ser->fd, F_SETFL, flags);
+ ast_fd_set_flags(ser->fd, O_NONBLOCK);
/* Setup HTTP worker private data to keep track of request body reading. */
ao2_cleanup(ser->private_data);
diff --git a/main/indications.c b/main/indications.c
index 02a68b7ca..488868076 100644
--- a/main/indications.c
+++ b/main/indications.c
@@ -1194,4 +1194,3 @@ int ast_indications_reload(void)
{
return load_indications(1);
}
-
diff --git a/main/jitterbuf.c b/main/jitterbuf.c
index df3164f39..21c11043b 100644
--- a/main/jitterbuf.c
+++ b/main/jitterbuf.c
@@ -358,7 +358,7 @@ static int queue_put(jitterbuf *jb, void *data, const enum jb_frame_type type, l
frame->type = type;
/*
- * frames are a circular list, jb-frames points to to the lowest ts,
+ * frames are a circular list, jb-frames points to the lowest ts,
* jb->frames->prev points to the highest ts
*/
diff --git a/main/loader.c b/main/loader.c
index 7d792b08e..b9baf3e93 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -54,7 +54,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/features_config.h"
#include "asterisk/dsp.h"
#include "asterisk/udptl.h"
-#include "asterisk/heap.h"
+#include "asterisk/vector.h"
#include "asterisk/app.h"
#include "asterisk/test.h"
#include "asterisk/sounds_index.h"
@@ -112,6 +112,8 @@ static const unsigned char expected_key[] =
static char buildopt_sum[33] = AST_BUILDOPT_SUM;
+AST_VECTOR(module_vector, struct ast_module *);
+
/*!
* \brief Internal flag to indicate all modules have been initially loaded.
*/
@@ -137,13 +139,34 @@ struct ast_module {
/*! This module is being held open until it's time to shutdown. */
unsigned int keepuntilshutdown:1;
} flags;
- AST_LIST_ENTRY(ast_module) list_entry;
AST_DLLIST_ENTRY(ast_module) entry;
char resource[0];
};
static AST_DLLIST_HEAD_STATIC(module_list, ast_module);
+static int module_vector_strcasecmp(struct ast_module *a, struct ast_module *b)
+{
+ return strcasecmp(a->resource, b->resource);
+}
+
+static int module_vector_cmp(struct ast_module *a, struct ast_module *b)
+{
+ /* if load_pri is not set, default is 128. Lower is better */
+ int a_pri = ast_test_flag(a->info, AST_MODFLAG_LOAD_ORDER)
+ ? a->info->load_pri : AST_MODPRI_DEFAULT;
+ int b_pri = ast_test_flag(b->info, AST_MODFLAG_LOAD_ORDER)
+ ? b->info->load_pri : AST_MODPRI_DEFAULT;
+
+ /*
+ * Returns comparison values for a vector sorted by priority.
+ * <0 a_pri < b_pri
+ * =0 a_pri == b_pri
+ * >0 a_pri > b_pri
+ */
+ return a_pri - b_pri;
+}
+
const char *ast_module_name(const struct ast_module *mod)
{
if (!mod || !mod->info) {
@@ -171,38 +194,51 @@ static int do_full_reload = 0;
static AST_DLLIST_HEAD_STATIC(reload_queue, reload_queue_item);
-/* when dynamic modules are being loaded, ast_module_register() will
- need to know what filename the module was loaded from while it
- is being registered
-*/
-static struct ast_module *resource_being_loaded;
-
-/* XXX: should we check for duplicate resource names here? */
+/*!
+ * \internal
+ *
+ * This variable is set by load_dynamic_module so ast_module_register
+ * can know what pointer is being registered.
+ *
+ * This is protected by the module_list lock.
+ */
+static struct ast_module * volatile resource_being_loaded;
+/*!
+ * \internal
+ * \brief Used by AST_MODULE_INFO to register with the module loader.
+ *
+ * This function is automatically called when each module is opened.
+ * It must never be used from outside AST_MODULE_INFO.
+ */
void ast_module_register(const struct ast_module_info *info)
{
- struct ast_module *mod = resource_being_loaded;
+ struct ast_module *mod;
+
+ /*
+ * This lock protects resource_being_loaded as well as the module
+ * list. Normally we already have a lock on module_list when we
+ * begin the load but locking again from here prevents corruption
+ * if an asterisk module is dlopen'ed from outside the module loader.
+ */
+ AST_DLLIST_LOCK(&module_list);
+ mod = resource_being_loaded;
+ if (!mod) {
+ AST_DLLIST_UNLOCK(&module_list);
+ return;
+ }
ast_debug(5, "Registering module %s\n", info->name);
+ /* This tells load_dynamic_module that we're registered. */
+ resource_being_loaded = NULL;
+
mod->info = info;
#ifdef REF_DEBUG
mod->ref_debug = ao2_t_alloc(0, NULL, info->name);
#endif
AST_LIST_HEAD_INIT(&mod->users);
- /* during startup, before the loader has been initialized,
- there are no threads, so there is no need to take the lock
- on this list to manipulate it. it is also possible that it
- might be unsafe to use the list lock at that point... so
- let's avoid it altogether
- */
- AST_DLLIST_LOCK(&module_list);
- /* it is paramount that the new entry be placed at the tail of
- the list, otherwise the code that uses dlopen() to load
- dynamic modules won't be able to find out if the module it
- just opened was registered or failed to load
- */
AST_DLLIST_INSERT_TAIL(&module_list, mod, entry);
AST_DLLIST_UNLOCK(&module_list);
@@ -210,6 +246,15 @@ void ast_module_register(const struct ast_module_info *info)
*((struct ast_module **) &(info->self)) = mod;
}
+static void module_destroy(struct ast_module *mod)
+{
+ AST_LIST_HEAD_DESTROY(&mod->users);
+#ifdef REF_DEBUG
+ ao2_cleanup(mod->ref_debug);
+#endif
+ ast_free(mod);
+}
+
void ast_module_unregister(const struct ast_module_info *info)
{
struct ast_module *mod = NULL;
@@ -230,11 +275,7 @@ void ast_module_unregister(const struct ast_module_info *info)
if (mod) {
ast_debug(5, "Unregistering module %s\n", info->name);
- AST_LIST_HEAD_DESTROY(&mod->users);
-#ifdef REF_DEBUG
- ao2_cleanup(mod->ref_debug);
-#endif
- ast_free(mod);
+ module_destroy(mod);
}
}
@@ -382,35 +423,39 @@ static int verify_key(const unsigned char *key)
return -1;
}
-static int resource_name_match(const char *name1_in, const char *name2_in)
+static size_t resource_name_baselen(const char *name)
{
- char *name1 = (char *) name1_in;
- char *name2 = (char *) name2_in;
+ size_t len = strlen(name);
- /* trim off any .so extensions */
- if (!strcasecmp(name1 + strlen(name1) - 3, ".so")) {
- name1 = ast_strdupa(name1);
- name1[strlen(name1) - 3] = '\0';
+ if (len > 3 && !strcasecmp(name + len - 3, ".so")) {
+ return len - 3;
}
- if (!strcasecmp(name2 + strlen(name2) - 3, ".so")) {
- name2 = ast_strdupa(name2);
- name2[strlen(name2) - 3] = '\0';
+
+ return len;
+}
+
+static int resource_name_match(const char *name1, size_t baselen1, const char *name2)
+{
+ if (baselen1 != resource_name_baselen(name2)) {
+ return -1;
}
- return strcasecmp(name1, name2);
+ return strncasecmp(name1, name2, baselen1);
}
static struct ast_module *find_resource(const char *resource, int do_lock)
{
struct ast_module *cur;
+ size_t resource_baselen = resource_name_baselen(resource);
if (do_lock) {
AST_DLLIST_LOCK(&module_list);
}
AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
- if (!resource_name_match(resource, cur->resource))
+ if (!resource_name_match(resource, resource_baselen, cur->resource)) {
break;
+ }
}
if (do_lock) {
@@ -500,96 +545,93 @@ static void unload_dynamic_module(struct ast_module *mod)
#endif
}
-static enum ast_module_load_result load_resource(const char *resource_name, unsigned int global_symbols_only, unsigned int suppress_logging, struct ast_heap *resource_heap, int required);
-
#define MODULE_LOCAL_ONLY (void *)-1
-static struct ast_module *load_dynamic_module(const char *resource_in, unsigned int global_symbols_only, unsigned int suppress_logging, struct ast_heap *resource_heap)
+/*!
+ * \internal
+ * \brief Attempt to dlopen a module.
+ *
+ * \param resource_in The module name to load.
+ * \param so_ext ".so" or blank if ".so" is already part of resource_in.
+ * \param filename Passed directly to dlopen.
+ * \param flags Passed directly to dlopen.
+ * \param suppress_logging Do not log any error from dlopen.
+ *
+ * \return Pointer to opened module, NULL on error.
+ *
+ * \warning module_list must be locked before calling this function.
+ */
+static struct ast_module *load_dlopen(const char *resource_in, const char *so_ext,
+ const char *filename, int flags, unsigned int suppress_logging)
{
- char fn[PATH_MAX] = "";
- void *lib = NULL;
struct ast_module *mod;
- unsigned int wants_global;
- int space; /* room needed for the descriptor */
- int missing_so = 0;
- space = sizeof(*resource_being_loaded) + strlen(resource_in) + 1;
- if (strcasecmp(resource_in + strlen(resource_in) - 3, ".so")) {
- missing_so = 1;
- space += 3; /* room for the extra ".so" */
- }
-
- snprintf(fn, sizeof(fn), "%s/%s%s", ast_config_AST_MODULE_DIR, resource_in, missing_so ? ".so" : "");
+ ast_assert(!resource_being_loaded);
- /* make a first load of the module in 'quiet' mode... don't try to resolve
- any symbols, and don't export any symbols. this will allow us to peek into
- the module's info block (if available) to see what flags it has set */
-
- resource_being_loaded = ast_calloc(1, space);
- if (!resource_being_loaded)
+ mod = ast_calloc(1, sizeof(*mod) + strlen(resource_in) + strlen(so_ext) + 1);
+ if (!mod) {
return NULL;
- strcpy(resource_being_loaded->resource, resource_in);
- if (missing_so)
- strcat(resource_being_loaded->resource, ".so");
+ }
+
+ sprintf(mod->resource, "%s%s", resource_in, so_ext); /* safe */
- if (!(lib = dlopen(fn, RTLD_LAZY | RTLD_GLOBAL))) {
- if (!suppress_logging) {
+ resource_being_loaded = mod;
+ mod->lib = dlopen(filename, flags);
+ if (resource_being_loaded) {
+ resource_being_loaded = NULL;
+ if (mod->lib) {
+ ast_log(LOG_ERROR, "Module '%s' did not register itself during load\n", resource_in);
+ logged_dlclose(resource_in, mod->lib);
+ } else if (!suppress_logging) {
ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in, dlerror());
}
- ast_free(resource_being_loaded);
- return NULL;
- }
+ ast_free(mod);
- /* the dlopen() succeeded, let's find out if the module
- registered itself */
- /* note that this will only work properly as long as
- ast_module_register() (which is called by the module's
- constructor) places the new module at the tail of the
- module_list
- */
- if (resource_being_loaded != (mod = AST_DLLIST_LAST(&module_list))) {
- ast_log(LOG_WARNING, "Module '%s' did not register itself during load\n", resource_in);
- /* no, it did not, so close it and return */
- logged_dlclose(resource_in, lib);
- /* note that the module's destructor will call ast_module_unregister(),
- which will free the structure we allocated in resource_being_loaded */
return NULL;
}
- wants_global = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);
+ return mod;
+}
+
+static struct ast_module *load_dynamic_module(const char *resource_in, unsigned int global_symbols_only, unsigned int suppress_logging)
+{
+ char fn[PATH_MAX];
+ struct ast_module *mod;
+ size_t resource_in_len = strlen(resource_in);
+ int exports_globals;
+ const char *so_ext = "";
- /* if we are being asked only to load modules that provide global symbols,
- and this one does not, then close it and return */
- if (global_symbols_only && !wants_global) {
- logged_dlclose(resource_in, lib);
- return MODULE_LOCAL_ONLY;
+ if (resource_in_len < 4 || strcasecmp(resource_in + resource_in_len - 3, ".so")) {
+ so_ext = ".so";
}
- logged_dlclose(resource_in, lib);
- resource_being_loaded = NULL;
+ snprintf(fn, sizeof(fn), "%s/%s%s", ast_config_AST_MODULE_DIR, resource_in, so_ext);
- /* start the load process again */
- resource_being_loaded = ast_calloc(1, space);
- if (!resource_being_loaded)
- return NULL;
- strcpy(resource_being_loaded->resource, resource_in);
- if (missing_so)
- strcat(resource_being_loaded->resource, ".so");
+ /* Try loading in quiet mode first with flags to export global symbols.
+ * If the module does not want to export globals we will close and reopen. */
+ mod = load_dlopen(resource_in, so_ext, fn,
+ global_symbols_only ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL,
+ suppress_logging);
- if (!(lib = dlopen(fn, wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) {
- ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in, dlerror());
- ast_free(resource_being_loaded);
+ if (!mod) {
return NULL;
}
- /* since the module was successfully opened, and it registered itself
- the previous time we did that, we're going to assume it worked this
- time too :) */
+ exports_globals = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);
+ if ((global_symbols_only && exports_globals) || (!global_symbols_only && !exports_globals)) {
+ /* The first dlopen had the correct flags. */
+ return mod;
+ }
- AST_DLLIST_LAST(&module_list)->lib = lib;
- resource_being_loaded = NULL;
+ /* Close the module so we can reopen with correct flags. */
+ logged_dlclose(resource_in, mod->lib);
+ if (global_symbols_only) {
+ return MODULE_LOCAL_ONLY;
+ }
- return AST_DLLIST_LAST(&module_list);
+ return load_dlopen(resource_in, so_ext, fn,
+ exports_globals ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL,
+ 0);
}
int modules_shutdown(void)
@@ -623,11 +665,7 @@ int modules_shutdown(void)
ast_verb(1, "Unloading %s\n", mod->resource);
mod->info->unload();
}
- AST_LIST_HEAD_DESTROY(&mod->users);
-#ifdef REF_DEBUG
- ao2_cleanup(mod->ref_debug);
-#endif
- free(mod);
+ module_destroy(mod);
somethingchanged = 1;
}
AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END;
@@ -947,6 +985,7 @@ enum ast_module_reload_result ast_module_reload(const char *name)
struct ast_module *cur;
enum ast_module_reload_result res = AST_MODULE_RELOAD_NOT_FOUND;
int i;
+ size_t name_baselen = name ? resource_name_baselen(name) : 0;
/* If we aren't fully booted, we just pretend we reloaded but we queue this
up to run once we are booted up. */
@@ -1000,8 +1039,9 @@ enum ast_module_reload_result ast_module_reload(const char *name)
AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
const struct ast_module_info *info = cur->info;
- if (name && resource_name_match(name, cur->resource))
+ if (name && resource_name_match(name, name_baselen, cur->resource)) {
continue;
+ }
if (!cur->flags.running || cur->flags.declined) {
if (res == AST_MODULE_RELOAD_NOT_FOUND) {
@@ -1122,13 +1162,13 @@ static enum ast_module_load_result start_resource(struct ast_module *mod)
/*! loads a resource based upon resource_name. If global_symbols_only is set
* only modules with global symbols will be loaded.
*
- * If the ast_heap is provided (not NULL) the module is found and added to the
- * heap without running the module's load() function. By doing this, modules
- * added to the resource_heap can be initialized later in order by priority.
+ * If the module_vector is provided (not NULL) the module is found and added to the
+ * vector without running the module's load() function. By doing this, modules
+ * can be initialized later in order by priority and dependencies.
*
- * If the ast_heap is not provided, the module's load function will be executed
+ * If the module_vector is not provided, the module's load function will be executed
* immediately */
-static enum ast_module_load_result load_resource(const char *resource_name, unsigned int global_symbols_only, unsigned int suppress_logging, struct ast_heap *resource_heap, int required)
+static enum ast_module_load_result load_resource(const char *resource_name, unsigned int global_symbols_only, unsigned int suppress_logging, struct module_vector *resource_heap, int required)
{
struct ast_module *mod;
enum ast_module_load_result res = AST_MODULE_LOAD_SUCCESS;
@@ -1141,7 +1181,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
if (global_symbols_only && !ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS))
return AST_MODULE_LOAD_SKIP;
} else {
- mod = load_dynamic_module(resource_name, global_symbols_only, suppress_logging, resource_heap);
+ mod = load_dynamic_module(resource_name, global_symbols_only, suppress_logging);
if (mod == MODULE_LOCAL_ONLY) {
return AST_MODULE_LOAD_SKIP;
}
@@ -1154,21 +1194,26 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
}
if (inspect_module(mod)) {
- ast_log(LOG_WARNING, "Module '%s' could not be loaded.\n", resource_name);
- unload_dynamic_module(mod);
- return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
+ goto prestart_error;
}
mod->flags.declined = 0;
if (resource_heap) {
- ast_heap_push(resource_heap, mod);
+ if (AST_VECTOR_ADD_SORTED(resource_heap, mod, module_vector_cmp)) {
+ goto prestart_error;
+ }
res = AST_MODULE_LOAD_PRIORITY;
} else {
res = start_resource(mod);
}
return res;
+
+prestart_error:
+ ast_log(LOG_WARNING, "Module '%s' could not be loaded.\n", resource_name);
+ unload_dynamic_module(mod);
+ return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}
int ast_load_resource(const char *resource_name)
@@ -1195,9 +1240,10 @@ AST_LIST_HEAD_NOLOCK(load_order, load_order_entry);
static struct load_order_entry *add_to_load_order(const char *resource, struct load_order *load_order, int required)
{
struct load_order_entry *order;
+ size_t resource_baselen = resource_name_baselen(resource);
AST_LIST_TRAVERSE(load_order, order, entry) {
- if (!resource_name_match(order->resource, resource)) {
+ if (!resource_name_match(resource, resource_baselen, order->resource)) {
/* Make sure we have the proper setting for the required field
(we might have both load= and required= lines in modules.conf) */
order->required |= required;
@@ -1215,23 +1261,6 @@ static struct load_order_entry *add_to_load_order(const char *resource, struct l
return order;
}
-static int mod_load_cmp(void *a, void *b)
-{
- struct ast_module *a_mod = (struct ast_module *) a;
- struct ast_module *b_mod = (struct ast_module *) b;
- /* if load_pri is not set, default is 128. Lower is better */
- int a_pri = ast_test_flag(a_mod->info, AST_MODFLAG_LOAD_ORDER) ? a_mod->info->load_pri : 128;
- int b_pri = ast_test_flag(b_mod->info, AST_MODFLAG_LOAD_ORDER) ? b_mod->info->load_pri : 128;
-
- /*
- * Returns comparison values for a min-heap
- * <0 a_pri > b_pri
- * =0 a_pri == b_pri
- * >0 a_pri < b_pri
- */
- return b_pri - a_pri;
-}
-
AST_LIST_HEAD_NOLOCK(load_retries, load_order_entry);
/*! loads modules in order by load_pri, updates mod_count
@@ -1239,9 +1268,8 @@ AST_LIST_HEAD_NOLOCK(load_retries, load_order_entry);
*/
static int load_resource_list(struct load_order *load_order, unsigned int global_symbols, int *mod_count)
{
- struct ast_heap *resource_heap;
+ struct module_vector resource_heap;
struct load_order_entry *order;
- struct ast_module *mod;
struct load_retries load_retries;
int count = 0;
int res = 0;
@@ -1250,7 +1278,9 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
AST_LIST_HEAD_INIT_NOLOCK(&load_retries);
- if(!(resource_heap = ast_heap_create(8, mod_load_cmp, -1))) {
+ if (AST_VECTOR_INIT(&resource_heap, 500)) {
+ ast_log(LOG_ERROR, "Failed to initialize module loader.\n");
+
return -1;
}
@@ -1259,7 +1289,7 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
enum ast_module_load_result lres;
/* Suppress log messages unless this is the last pass */
- lres = load_resource(order->resource, global_symbols, 1, resource_heap, order->required);
+ lres = load_resource(order->resource, global_symbols, 1, &resource_heap, order->required);
ast_debug(3, "PASS 0: %-46s %d %d\n", order->resource, lres, global_symbols);
switch (lres) {
case AST_MODULE_LOAD_SUCCESS:
@@ -1283,7 +1313,7 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
*/
break;
case AST_MODULE_LOAD_PRIORITY:
- /* load_resource worked and the module was added to the priority heap */
+ /* load_resource worked and the module was added to the priority vector */
AST_LIST_REMOVE_CURRENT(entry);
ast_free(order->resource);
ast_free(order);
@@ -1298,7 +1328,7 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
enum ast_module_load_result lres;
/* Suppress log messages unless this is the last pass */
- lres = load_resource(order->resource, global_symbols, (i < LOAD_RETRIES - 1), resource_heap, order->required);
+ lres = load_resource(order->resource, global_symbols, (i < LOAD_RETRIES - 1), &resource_heap, order->required);
ast_debug(3, "PASS %d %-46s %d %d\n", i + 1, order->resource, lres, global_symbols);
switch (lres) {
/* These are all retryable. */
@@ -1336,7 +1366,8 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
}
/* second remove modules from heap sorted by priority */
- while ((mod = ast_heap_pop(resource_heap))) {
+ for (i = 0; i < AST_VECTOR_SIZE(&resource_heap); i++) {
+ struct ast_module *mod = AST_VECTOR_GET(&resource_heap, i);
enum ast_module_load_result lres;
lres = start_resource(mod);
@@ -1366,7 +1397,7 @@ done:
if (mod_count) {
*mod_count += count;
}
- ast_heap_destroy(resource_heap);
+ AST_VECTOR_FREE(&resource_heap);
return res;
}
@@ -1444,11 +1475,15 @@ int load_modules(unsigned int preload_only)
/* now scan the config for any modules we are prohibited from loading and
remove them from the load order */
for (v = ast_variable_browse(cfg, "modules"); v; v = v->next) {
- if (strcasecmp(v->name, "noload"))
+ size_t baselen;
+
+ if (strcasecmp(v->name, "noload")) {
continue;
+ }
+ baselen = resource_name_baselen(v->value);
AST_LIST_TRAVERSE_SAFE_BEGIN(&load_order, order, entry) {
- if (!resource_name_match(order->resource, v->value)) {
+ if (!resource_name_match(v->value, baselen, order->resource)) {
AST_LIST_REMOVE_CURRENT(entry);
ast_free(order->resource);
ast_free(order);
@@ -1500,33 +1535,57 @@ void ast_update_use_count(void)
AST_LIST_UNLOCK(&updaters);
}
+/*!
+ * \internal
+ * \brief Build an alpha sorted list of modules.
+ *
+ * \param alpha_module_list Pointer to uninitialized module_vector.
+ *
+ * This function always initializes alpha_module_list.
+ *
+ * \pre module_list must be locked.
+ */
+static int alpha_module_list_create(struct module_vector *alpha_module_list)
+{
+ struct ast_module *cur;
+
+ if (AST_VECTOR_INIT(alpha_module_list, 32)) {
+ return -1;
+ }
+
+ AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
+ if (AST_VECTOR_ADD_SORTED(alpha_module_list, cur, module_vector_strcasecmp)) {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
int ast_update_module_list(int (*modentry)(const char *module, const char *description,
int usecnt, const char *status, const char *like,
enum ast_module_support_level support_level),
const char *like)
{
- struct ast_module *cur;
- int unlock = -1;
int total_mod_loaded = 0;
- AST_LIST_HEAD_NOLOCK(, ast_module) alpha_module_list = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
+ struct module_vector alpha_module_list;
- if (AST_DLLIST_TRYLOCK(&module_list)) {
- unlock = 0;
- }
+ AST_DLLIST_LOCK(&module_list);
- AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
- AST_LIST_INSERT_SORTALPHA(&alpha_module_list, cur, list_entry, resource);
- }
+ if (!alpha_module_list_create(&alpha_module_list)) {
+ int idx;
- while ((cur = AST_LIST_REMOVE_HEAD(&alpha_module_list, list_entry))) {
- total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
- cur->flags.running ? "Running" : "Not Running", like, cur->info->support_level);
- }
+ for (idx = 0; idx < AST_VECTOR_SIZE(&alpha_module_list); idx++) {
+ struct ast_module *cur = AST_VECTOR_GET(&alpha_module_list, idx);
- if (unlock) {
- AST_DLLIST_UNLOCK(&module_list);
+ total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
+ cur->flags.running ? "Running" : "Not Running", like, cur->info->support_level);
+ }
}
+ AST_DLLIST_UNLOCK(&module_list);
+ AST_VECTOR_FREE(&alpha_module_list);
+
return total_mod_loaded;
}
@@ -1536,22 +1595,24 @@ int ast_update_module_list_data(int (*modentry)(const char *module, const char *
void *data),
const char *like, void *data)
{
- struct ast_module *cur;
int total_mod_loaded = 0;
- AST_LIST_HEAD_NOLOCK(, ast_module) alpha_module_list = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
+ struct module_vector alpha_module_list;
AST_DLLIST_LOCK(&module_list);
- AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
- AST_LIST_INSERT_SORTALPHA(&alpha_module_list, cur, list_entry, resource);
- }
+ if (!alpha_module_list_create(&alpha_module_list)) {
+ int idx;
- while ((cur = AST_LIST_REMOVE_HEAD(&alpha_module_list, list_entry))) {
- total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
- cur->flags.running? "Running" : "Not Running", like, cur->info->support_level, data);
+ for (idx = 0; idx < AST_VECTOR_SIZE(&alpha_module_list); idx++) {
+ struct ast_module *cur = AST_VECTOR_GET(&alpha_module_list, idx);
+
+ total_mod_loaded += modentry(cur->resource, cur->info->description, cur->usecount,
+ cur->flags.running? "Running" : "Not Running", like, cur->info->support_level, data);
+ }
}
AST_DLLIST_UNLOCK(&module_list);
+ AST_VECTOR_FREE(&alpha_module_list);
return total_mod_loaded;
}
@@ -1563,23 +1624,25 @@ int ast_update_module_list_condition(int (*modentry)(const char *module, const c
void *data, const char *condition),
const char *like, void *data, const char *condition)
{
- struct ast_module *cur;
int conditions_met = 0;
- AST_LIST_HEAD_NOLOCK(, ast_module) alpha_module_list = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
+ struct module_vector alpha_module_list;
AST_DLLIST_LOCK(&module_list);
- AST_DLLIST_TRAVERSE(&module_list, cur, entry) {
- AST_LIST_INSERT_SORTALPHA(&alpha_module_list, cur, list_entry, resource);
- }
+ if (!alpha_module_list_create(&alpha_module_list)) {
+ int idx;
- while ((cur = AST_LIST_REMOVE_HEAD(&alpha_module_list, list_entry))) {
- conditions_met += modentry(cur->resource, cur->info->description, cur->usecount,
- cur->flags.running? "Running" : "Not Running", like, cur->info->support_level, data,
- condition);
+ for (idx = 0; idx < AST_VECTOR_SIZE(&alpha_module_list); idx++) {
+ struct ast_module *cur = AST_VECTOR_GET(&alpha_module_list, idx);
+
+ conditions_met += modentry(cur->resource, cur->info->description, cur->usecount,
+ cur->flags.running? "Running" : "Not Running", like, cur->info->support_level, data,
+ condition);
+ }
}
AST_DLLIST_UNLOCK(&module_list);
+ AST_VECTOR_FREE(&alpha_module_list);
return conditions_met;
}
diff --git a/main/manager.c b/main/manager.c
index 5bc87d547..4e611a085 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -247,14 +247,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="DNID">
<para>Dialed number identifier</para>
</parameter>
+ <parameter name="EffectiveConnectedLineNum">
+ </parameter>
+ <parameter name="EffectiveConnectedLineName">
+ </parameter>
<parameter name="TimeToHangup">
<para>Absolute lifetime of the channel</para>
</parameter>
<parameter name="BridgeID">
<para>Identifier of the bridge the channel is in, may be empty if not in one</para>
</parameter>
- <parameter name="Linkedid">
- </parameter>
<parameter name="Application">
<para>Application currently executing on the channel</para>
</parameter>
@@ -2344,11 +2346,12 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
AST_RWLIST_UNLOCK(&actions);
return ret;
}
- authority = ast_str_alloca(MAX_AUTH_PERM_STRING);
if (a->argc < 4) {
return CLI_SHOWUSAGE;
}
+ authority = ast_str_alloca(MAX_AUTH_PERM_STRING);
+
#ifdef AST_XML_DOCS
/* setup the titles */
term_color(synopsis_title, "[Synopsis]\n", COLOR_MAGENTA, 0, 40);
@@ -2376,6 +2379,22 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
char *seealso = ast_xmldoc_printable(S_OR(cur->seealso, "Not available"), 1);
char *privilege = ast_xmldoc_printable(S_OR(auth_str, "Not available"), 1);
char *responses = ast_xmldoc_printable("None", 1);
+
+ if (!syntax || !synopsis || !description || !arguments
+ || !seealso || !privilege || !responses) {
+ ast_free(syntax);
+ ast_free(synopsis);
+ ast_free(description);
+ ast_free(arguments);
+ ast_free(seealso);
+ ast_free(privilege);
+ ast_free(responses);
+ ast_cli(a->fd, "Allocation failure.\n");
+ AST_RWLIST_UNLOCK(&actions);
+
+ return CLI_FAILURE;
+ }
+
ast_cli(a->fd, "%s%s\n\n%s%s\n\n%s%s\n\n%s%s\n\n%s%s\n\n%s%s\n\n%s",
syntax_title, syntax,
synopsis_title, synopsis,
@@ -2403,6 +2422,14 @@ static char *handle_showmancmd(struct ast_cli_entry *e, int cmd, struct ast_cli_
ast_cli(a->fd, "Event: %s\n", cur->final_response->name);
print_event_instance(a, cur->final_response);
}
+
+ ast_free(syntax);
+ ast_free(synopsis);
+ ast_free(description);
+ ast_free(arguments);
+ ast_free(seealso);
+ ast_free(privilege);
+ ast_free(responses);
} else
#endif
{
@@ -4558,6 +4585,7 @@ static int action_status(struct mansession *s, const struct message *m)
struct timeval now;
long elapsed_seconds;
struct ast_bridge *bridge;
+ struct ast_party_id effective_id;
ast_channel_lock(chan);
@@ -4586,10 +4614,12 @@ static int action_status(struct mansession *s, const struct message *m)
channels++;
bridge = ast_channel_get_bridge(chan);
+ effective_id = ast_channel_connected_effective_id(chan);
astman_append(s,
"Event: Status\r\n"
"Privilege: Call\r\n"
+ /* v-- Start channel snapshot headers */
"Channel: %s\r\n"
"ChannelState: %u\r\n"
"ChannelStateDesc: %s\r\n"
@@ -4602,13 +4632,14 @@ static int action_status(struct mansession *s, const struct message *m)
"Exten: %s\r\n"
"Priority: %d\r\n"
"Uniqueid: %s\r\n"
+ "Linkedid: %s\r\n"
+ /* ^-- End channel snapshot headers */
"Type: %s\r\n"
"DNID: %s\r\n"
"EffectiveConnectedLineNum: %s\r\n"
"EffectiveConnectedLineName: %s\r\n"
"TimeToHangup: %ld\r\n"
"BridgeID: %s\r\n"
- "Linkedid: %s\r\n"
"Application: %s\r\n"
"Data: %s\r\n"
"Nativeformats: %s\r\n"
@@ -4622,6 +4653,7 @@ static int action_status(struct mansession *s, const struct message *m)
"%s"
"%s"
"\r\n",
+ /* v-- Start channel snapshot headers */
ast_channel_name(chan),
ast_channel_state(chan),
ast_state2str(ast_channel_state(chan)),
@@ -4634,13 +4666,14 @@ static int action_status(struct mansession *s, const struct message *m)
ast_channel_exten(chan),
ast_channel_priority(chan),
ast_channel_uniqueid(chan),
+ ast_channel_linkedid(chan),
+ /* ^-- End channel snapshot headers */
ast_channel_tech(chan)->type,
S_OR(ast_channel_dialed(chan)->number.str, ""),
- S_COR(ast_channel_connected_effective_id(chan).number.valid, ast_channel_connected_effective_id(chan).number.str, "<unknown>"),
- S_COR(ast_channel_connected_effective_id(chan).name.valid, ast_channel_connected_effective_id(chan).name.str, "<unknown>"),
+ S_COR(effective_id.number.valid, effective_id.number.str, "<unknown>"),
+ S_COR(effective_id.name.valid, effective_id.name.str, "<unknown>"),
(long)ast_channel_whentohangup(chan)->tv_sec,
bridge ? bridge->uniqueid : "",
- ast_channel_linkedid(chan),
ast_channel_appl(chan),
ast_channel_data(chan),
ast_format_cap_get_names(ast_channel_nativeformats(chan), &codec_buf),
@@ -6684,9 +6717,7 @@ static void *session_do(void *data)
}
/* make sure socket is non-blocking */
- flags = fcntl(ser->fd, F_GETFL);
- flags |= O_NONBLOCK;
- fcntl(ser->fd, F_SETFL, flags);
+ ast_fd_set_flags(ser->fd, O_NONBLOCK);
ao2_lock(session);
/* Hook to the tail of the event queue */
diff --git a/main/manager_channels.c b/main/manager_channels.c
index ffcd7f7e5..71c17322a 100644
--- a/main/manager_channels.c
+++ b/main/manager_channels.c
@@ -1300,4 +1300,3 @@ int manager_channels_init(void)
return 0;
}
-
diff --git a/main/manager_endpoints.c b/main/manager_endpoints.c
index b2a45734a..4d997e622 100644
--- a/main/manager_endpoints.c
+++ b/main/manager_endpoints.c
@@ -87,4 +87,3 @@ int manager_endpoints_init(void)
return 0;
}
-
diff --git a/main/manager_system.c b/main/manager_system.c
index b852c52e6..7a4896a68 100644
--- a/main/manager_system.c
+++ b/main/manager_system.c
@@ -44,7 +44,6 @@ static void manager_system_shutdown(void)
int manager_system_init(void)
{
- int ret = 0;
struct stasis_topic *manager_topic;
struct stasis_topic *system_topic;
struct stasis_message_router *message_router;
@@ -69,13 +68,5 @@ int manager_system_init(void)
ast_register_cleanup(manager_system_shutdown);
- /* If somehow we failed to add any routes, just shut down the whole
- * thing and fail it.
- */
- if (ret) {
- manager_system_shutdown();
- return -1;
- }
-
return 0;
}
diff --git a/main/media_index.c b/main/media_index.c
index 60bdfe3fd..72bc1ccbe 100644
--- a/main/media_index.c
+++ b/main/media_index.c
@@ -589,4 +589,3 @@ int ast_media_index_update(struct ast_media_index *index,
{
return media_index_update(index, variant, NULL);
}
-
diff --git a/main/named_acl.c b/main/named_acl.c
index 3b81c8c38..9ea89903e 100644
--- a/main/named_acl.c
+++ b/main/named_acl.c
@@ -82,8 +82,8 @@ static void *named_acl_find(struct ao2_container *container, const char *cat);
static struct aco_type named_acl_type = {
.type = ACO_ITEM, /*!< named_acls are items stored in containers, not individual global objects */
.name = "named_acl",
- .category_match = ACO_BLACKLIST,
- .category = "^general$", /*!< Match everything but "general" */
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general", /*!< Match everything but "general" */
.item_alloc = named_acl_alloc, /*!< A callback to allocate a new named_acl based on category */
.item_find = named_acl_find, /*!< A callback to find a named_acl in some container of named_acls */
.item_offset = offsetof(struct named_acl_config, named_acl_list), /*!< Could leave this out since 0 */
@@ -107,19 +107,8 @@ struct named_acl {
char name[ACL_NAME_LENGTH]; /* Same max length as a configuration category */
};
-static int named_acl_hash_fn(const void *obj, const int flags)
-{
- const struct named_acl *entry = obj;
- return ast_str_hash(entry->name);
-}
-
-static int named_acl_cmp_fn(void *obj, void *arg, const int flags)
-{
- struct named_acl *entry1 = obj;
- struct named_acl *entry2 = arg;
-
- return (!strcmp(entry1->name, entry2->name)) ? (CMP_MATCH | CMP_STOP) : 0;
-}
+AO2_STRING_FIELD_HASH_FN(named_acl, name)
+AO2_STRING_FIELD_CMP_FN(named_acl, name)
/*! \brief destructor for named_acl_config */
static void named_acl_config_destructor(void *obj)
@@ -403,7 +392,7 @@ static int publish_acl_change(const char *name)
return 0;
publish_failure:
- ast_log(LOG_ERROR, "Failed to to issue ACL change message for %s.\n",
+ ast_log(LOG_ERROR, "Failed to issue ACL change message for %s.\n",
ast_strlen_zero(name) ? "all named ACLs" : name);
return -1;
}
diff --git a/main/named_locks.c b/main/named_locks.c
index 596048388..6b41f2adb 100644
--- a/main/named_locks.c
+++ b/main/named_locks.c
@@ -39,46 +39,8 @@ struct ast_named_lock {
char key[0];
};
-static int named_locks_hash(const void *obj, const int flags)
-{
- const struct ast_named_lock *lock = obj;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- return ast_str_hash(obj);
- case OBJ_SEARCH_OBJECT:
- return ast_str_hash(lock->key);
- default:
- /* Hash can only work on something with a full key. */
- ast_assert(0);
- return 0;
- }
-}
-
-static int named_locks_cmp(void *obj_left, void *obj_right, int flags)
-{
- const struct ast_named_lock *object_left = obj_left;
- const struct ast_named_lock *object_right = obj_right;
- const char *right_key = obj_right;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->key;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->key, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(object_left->key, right_key, strlen(right_key));
- break;
- default:
- cmp = 0;
- break;
- }
-
- return cmp ? 0 : CMP_MATCH;
-}
+AO2_STRING_FIELD_HASH_FN(ast_named_lock, key)
+AO2_STRING_FIELD_CMP_FN(ast_named_lock, key)
static void named_locks_shutdown(void)
{
@@ -88,7 +50,7 @@ static void named_locks_shutdown(void)
int ast_named_locks_init(void)
{
named_locks = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0,
- NAMED_LOCKS_BUCKETS, named_locks_hash, NULL, named_locks_cmp);
+ NAMED_LOCKS_BUCKETS, ast_named_lock_hash_fn, NULL, ast_named_lock_cmp_fn);
if (!named_locks) {
return -1;
}
diff --git a/main/netsock2.c b/main/netsock2.c
index 73595fe84..5f94a750a 100644
--- a/main/netsock2.c
+++ b/main/netsock2.c
@@ -609,7 +609,7 @@ int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
/* If the sock address is IPv6, the TCLASS field must be set. */
set_tclass = !ast_getsockname(sockfd, &addr) && ast_sockaddr_is_ipv6(&addr) ? 1 : 0;
- /* If the the sock address is IPv4 or (IPv6 set to any address [::]) set TOS bits */
+ /* If the sock address is IPv4 or (IPv6 set to any address [::]) set TOS bits */
set_tos = (!set_tclass || (set_tclass && ast_sockaddr_is_any(&addr))) ? 1 : 0;
if (set_tos) {
diff --git a/main/pbx.c b/main/pbx.c
index cfc5f7f9f..b313e0528 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2823,7 +2823,6 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
struct ast_exten *e;
struct ast_app *app;
char *substitute = NULL;
- int res;
struct pbx_find_info q = { .stacklen = 0 }; /* the rest is reset in pbx_find_extension */
char passdata[EXT_DATA_SIZE];
int matching_action = (action == E_MATCH || action == E_CANMATCH || action == E_MATCHMORE);
@@ -2840,9 +2839,12 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
ast_unlock_contexts();
return -1; /* success, we found it */
} else if (action == E_FINDLABEL) { /* map the label to a priority */
- res = e->priority;
+ int res = e->priority;
+
ast_unlock_contexts();
- return res; /* the priority we were looking for */
+
+ /* the priority we were looking for */
+ return res;
} else { /* spawn */
if (!e->cached_app)
e->cached_app = pbx_findapp(e->app);
@@ -2892,7 +2894,7 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
} else {
if (!q.swo->exec) {
ast_log(LOG_WARNING, "No execution engine for switch %s\n", q.swo->name);
- res = -1;
+ return -1;
}
return q.swo->exec(c, q.foundcontext ? q.foundcontext : context, exten, priority, callerid, q.data);
}
@@ -5256,8 +5258,8 @@ static char *handle_show_hint(struct ast_cli_entry *e, int cmd, struct ast_cli_a
ast_cli(a->fd, "%-20.20s: %-20.20s State:%-15.15s Presence:%-15.15s Watchers %2d\n",
buf,
ast_get_extension_app(hint->exten),
- ast_extension_state2str(hint->laststate),
- ast_presence_state2str(hint->last_presence_state),
+ ast_extension_state2str(hint->laststate),
+ ast_presence_state2str(hint->last_presence_state),
watchers);
num++;
}
diff --git a/main/plc.c b/main/plc.c
index 4421e7a0c..ade8161ea 100644
--- a/main/plc.c
+++ b/main/plc.c
@@ -138,7 +138,7 @@ int plc_rx(plc_state_t *s, int16_t amp[], int len)
float old_weight;
float new_weight;
float gain;
-
+
if (s->missing_samples) {
/* Although we have a real signal, we need to smooth it to fit well
with the synthetic signal we used for the previous block */
diff --git a/main/poll.c b/main/poll.c
index e0f695504..166e570b4 100644
--- a/main/poll.c
+++ b/main/poll.c
@@ -303,5 +303,3 @@ int ast_poll2(struct pollfd *pArray, unsigned long n_fds, struct timeval *tv)
return ready_descriptors;
#endif
}
-
-
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index e7032724b..6bedd1767 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -887,6 +887,25 @@ void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp
ast_rwlock_unlock(&codecs->codecs_lock);
}
+enum ast_media_type ast_rtp_codecs_get_stream_type(struct ast_rtp_codecs *codecs)
+{
+ enum ast_media_type stream_type = AST_MEDIA_TYPE_UNKNOWN;
+ int payload;
+ struct ast_rtp_payload_type *type;
+
+ ast_rwlock_rdlock(&codecs->codecs_lock);
+ for (payload = 0; payload < AST_VECTOR_SIZE(&codecs->payloads); ++payload) {
+ type = AST_VECTOR_GET(&codecs->payloads, payload);
+ if (type && type->asterisk_format) {
+ stream_type = ast_format_get_type(type->format);
+ break;
+ }
+ }
+ ast_rwlock_unlock(&codecs->codecs_lock);
+
+ return stream_type;
+}
+
struct ast_rtp_payload_type *ast_rtp_codecs_get_payload(struct ast_rtp_codecs *codecs, int payload)
{
struct ast_rtp_payload_type *type = NULL;
@@ -2217,7 +2236,7 @@ static void set_next_mime_type(struct ast_format *format, int rtp_code, const ch
}
/* Make sure any previous value in ast_rtp_mime_types is cleaned up */
- memset(&ast_rtp_mime_types[x], 0, sizeof(struct ast_rtp_mime_type));
+ memset(&ast_rtp_mime_types[x], 0, sizeof(struct ast_rtp_mime_type));
if (format) {
ast_rtp_mime_types[x].payload_type.asterisk_format = 1;
ast_rtp_mime_types[x].payload_type.format = ao2_bump(format);
@@ -2482,10 +2501,10 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
const struct stasis_message_sanitizer *sanitize)
{
struct rtcp_message_payload *payload = stasis_message_data(msg);
- RAII_VAR(struct ast_json *, json_rtcp_report, NULL, ast_json_unref);
- RAII_VAR(struct ast_json *, json_rtcp_report_blocks, NULL, ast_json_unref);
- RAII_VAR(struct ast_json *, json_rtcp_sender_info, NULL, ast_json_unref);
- RAII_VAR(struct ast_json *, json_channel, NULL, ast_json_unref);
+ struct ast_json *json_rtcp_report = NULL;
+ struct ast_json *json_rtcp_report_blocks;
+ struct ast_json *json_rtcp_sender_info = NULL;
+ struct ast_json *json_channel = NULL;
int i;
json_rtcp_report_blocks = ast_json_array_create();
@@ -2496,20 +2515,19 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
for (i = 0; i < payload->report->reception_report_count && payload->report->report_block[i]; i++) {
struct ast_json *json_report_block;
char str_lsr[32];
+
snprintf(str_lsr, sizeof(str_lsr), "%u", payload->report->report_block[i]->lsr);
json_report_block = ast_json_pack("{s: i, s: i, s: i, s: i, s: i, s: s, s: i}",
- "source_ssrc", payload->report->report_block[i]->source_ssrc,
- "fraction_lost", payload->report->report_block[i]->lost_count.fraction,
- "packets_lost", payload->report->report_block[i]->lost_count.packets,
- "highest_seq_no", payload->report->report_block[i]->highest_seq_no,
- "ia_jitter", payload->report->report_block[i]->ia_jitter,
- "lsr", str_lsr,
- "dlsr", payload->report->report_block[i]->dlsr);
- if (!json_report_block) {
- return NULL;
- }
-
- if (ast_json_array_append(json_rtcp_report_blocks, json_report_block)) {
+ "source_ssrc", payload->report->report_block[i]->source_ssrc,
+ "fraction_lost", payload->report->report_block[i]->lost_count.fraction,
+ "packets_lost", payload->report->report_block[i]->lost_count.packets,
+ "highest_seq_no", payload->report->report_block[i]->highest_seq_no,
+ "ia_jitter", payload->report->report_block[i]->ia_jitter,
+ "lsr", str_lsr,
+ "dlsr", payload->report->report_block[i]->dlsr);
+ if (!json_report_block
+ || ast_json_array_append(json_rtcp_report_blocks, json_report_block)) {
+ ast_json_unref(json_rtcp_report_blocks);
return NULL;
}
}
@@ -2517,25 +2535,27 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
if (payload->report->type == AST_RTP_RTCP_SR) {
char sec[32];
char usec[32];
+
snprintf(sec, sizeof(sec), "%lu", (unsigned long)payload->report->sender_information.ntp_timestamp.tv_sec);
snprintf(usec, sizeof(usec), "%lu", (unsigned long)payload->report->sender_information.ntp_timestamp.tv_usec);
json_rtcp_sender_info = ast_json_pack("{s: s, s: s, s: i, s: i, s: i}",
- "ntp_timestamp_sec", sec,
- "ntp_timestamp_usec", usec,
- "rtp_timestamp", payload->report->sender_information.rtp_timestamp,
- "packets", payload->report->sender_information.packet_count,
- "octets", payload->report->sender_information.octet_count);
+ "ntp_timestamp_sec", sec,
+ "ntp_timestamp_usec", usec,
+ "rtp_timestamp", payload->report->sender_information.rtp_timestamp,
+ "packets", payload->report->sender_information.packet_count,
+ "octets", payload->report->sender_information.octet_count);
if (!json_rtcp_sender_info) {
+ ast_json_unref(json_rtcp_report_blocks);
return NULL;
}
}
json_rtcp_report = ast_json_pack("{s: i, s: i, s: i, s: o, s: o}",
- "ssrc", payload->report->ssrc,
- "type", payload->report->type,
- "report_count", payload->report->reception_report_count,
- "sender_information", json_rtcp_sender_info ? ast_json_ref(json_rtcp_sender_info) : ast_json_ref(ast_json_null()),
- "report_blocks", ast_json_ref(json_rtcp_report_blocks));
+ "ssrc", payload->report->ssrc,
+ "type", payload->report->type,
+ "report_count", payload->report->reception_report_count,
+ "sender_information", json_rtcp_sender_info ?: ast_json_null(),
+ "report_blocks", json_rtcp_report_blocks);
if (!json_rtcp_report) {
return NULL;
}
@@ -2543,14 +2563,15 @@ static struct ast_json *rtcp_report_to_json(struct stasis_message *msg,
if (payload->snapshot) {
json_channel = ast_channel_snapshot_to_json(payload->snapshot, sanitize);
if (!json_channel) {
+ ast_json_unref(json_rtcp_report);
return NULL;
}
}
return ast_json_pack("{s: o, s: o, s: o}",
- "channel", payload->snapshot ? ast_json_ref(json_channel) : ast_json_ref(ast_json_null()),
- "rtcp_report", ast_json_ref(json_rtcp_report),
- "blob", ast_json_deep_copy(payload->blob));
+ "channel", payload->snapshot ? json_channel : ast_json_null(),
+ "rtcp_report", json_rtcp_report,
+ "blob", ast_json_deep_copy(payload->blob) ?: ast_json_null());
}
static void rtp_rtcp_report_dtor(void *obj)
diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c
index 3d1d85039..4116f20cc 100644
--- a/main/sdp_srtp.c
+++ b/main/sdp_srtp.c
@@ -438,4 +438,3 @@ char *ast_sdp_get_rtp_profile(unsigned int sdes_active, struct ast_rtp_instance
}
}
}
-
diff --git a/main/security_events.c b/main/security_events.c
index d549d6201..392b2b459 100644
--- a/main/security_events.c
+++ b/main/security_events.c
@@ -314,7 +314,7 @@
<parameter name="ReceivedChallenge" required="false">
<para>The challenge that was received.</para>
</parameter>
- <parameter name="RecievedHash" required="false">
+ <parameter name="ReceivedHash" required="false">
<para>The hash that was received.</para>
</parameter>
</syntax>
@@ -1196,5 +1196,3 @@ int ast_security_event_report(const struct ast_security_event_common *sec)
return 0;
}
-
-
diff --git a/main/smoother.c b/main/smoother.c
index 720ad8549..36fa74373 100644
--- a/main/smoother.c
+++ b/main/smoother.c
@@ -224,4 +224,3 @@ void ast_smoother_free(struct ast_smoother *s)
ao2_cleanup(s->format);
ast_free(s);
}
-
diff --git a/main/sorcery.c b/main/sorcery.c
index cb0aff538..c20854f88 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -336,101 +336,14 @@ static sorcery_field_handler sorcery_field_default_handler(enum aco_option_type
}
/*! \brief Hashing function for sorcery wizards */
-static int sorcery_wizard_hash(const void *obj, const int flags)
-{
- const struct ast_sorcery_internal_wizard *object;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- object = obj;
- key = object->callbacks.name;
- break;
- default:
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
+AO2_STRING_FIELD_HASH_FN(ast_sorcery_internal_wizard, callbacks.name)
/*! \brief Comparator function for sorcery wizards */
-static int sorcery_wizard_cmp(void *obj, void *arg, int flags)
-{
- const struct ast_sorcery_internal_wizard *object_left = obj;
- const struct ast_sorcery_internal_wizard *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->callbacks.name;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->callbacks.name, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(object_left->callbacks.name, right_key, strlen(right_key));
- break;
- default:
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_CMP_FN(ast_sorcery_internal_wizard, callbacks.name)
/*! \brief Hashing function for sorcery wizards */
-static int object_type_field_hash(const void *obj, const int flags)
-{
- const struct ast_sorcery_object_field *object_field;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- object_field = obj;
- key = object_field->name;
- break;
- default:
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
-
-static int object_type_field_cmp(void *obj, void *arg, int flags)
-{
- const struct ast_sorcery_object_field *field_left = obj;
- const struct ast_sorcery_object_field *field_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = field_right->name;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(field_left->name, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(field_left->name, right_key, strlen(right_key));
- break;
- default:
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_HASH_FN(ast_sorcery_object_field, name)
+AO2_STRING_FIELD_CMP_FN(ast_sorcery_object_field, name)
/*! \brief Cleanup function for graceful shutdowns */
static void sorcery_cleanup(void)
@@ -446,53 +359,10 @@ static void sorcery_cleanup(void)
}
/*! \brief Compare function for sorcery instances */
-static int sorcery_instance_cmp(void *obj, void *arg, int flags)
-{
- const struct ast_sorcery *object_left = obj;
- const struct ast_sorcery *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->module_name;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->module_name, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(object_left->module_name, right_key, strlen(right_key));
- break;
- default:
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_CMP_FN(ast_sorcery, module_name)
/*! \brief Hashing function for sorcery instances */
-static int sorcery_instance_hash(const void *obj, const int flags)
-{
- const struct ast_sorcery *object;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- object = obj;
- key = object->module_name;
- break;
- default:
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
+AO2_STRING_FIELD_HASH_FN(ast_sorcery, module_name)
int ast_sorcery_init(void)
{
@@ -511,7 +381,7 @@ int ast_sorcery_init(void)
}
wizards = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, WIZARD_BUCKETS,
- sorcery_wizard_hash, NULL, sorcery_wizard_cmp);
+ ast_sorcery_internal_wizard_hash_fn, NULL, ast_sorcery_internal_wizard_cmp_fn);
if (!wizards) {
sorcery_cleanup();
return -1;
@@ -524,7 +394,7 @@ int ast_sorcery_init(void)
}
instances = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK, 0, INSTANCE_BUCKETS,
- sorcery_instance_hash, NULL, sorcery_instance_cmp);
+ ast_sorcery_hash_fn, NULL, ast_sorcery_cmp_fn);
if (!instances) {
sorcery_cleanup();
return -1;
@@ -724,53 +594,10 @@ static void sorcery_destructor(void *obj)
}
/*! \brief Hashing function for sorcery types */
-static int sorcery_type_hash(const void *obj, const int flags)
-{
- const struct ast_sorcery_object_type *object;
- const char *key;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_KEY:
- key = obj;
- break;
- case OBJ_SEARCH_OBJECT:
- object = obj;
- key = object->name;
- break;
- default:
- ast_assert(0);
- return 0;
- }
- return ast_str_hash(key);
-}
+AO2_STRING_FIELD_HASH_FN(ast_sorcery_object_type, name)
/*! \brief Comparator function for sorcery types */
-static int sorcery_type_cmp(void *obj, void *arg, int flags)
-{
- const struct ast_sorcery_object_type *object_left = obj;
- const struct ast_sorcery_object_type *object_right = arg;
- const char *right_key = arg;
- int cmp;
-
- switch (flags & OBJ_SEARCH_MASK) {
- case OBJ_SEARCH_OBJECT:
- right_key = object_right->name;
- /* Fall through */
- case OBJ_SEARCH_KEY:
- cmp = strcmp(object_left->name, right_key);
- break;
- case OBJ_SEARCH_PARTIAL_KEY:
- cmp = strncmp(object_left->name, right_key, strlen(right_key));
- break;
- default:
- cmp = 0;
- break;
- }
- if (cmp) {
- return 0;
- }
- return CMP_MATCH;
-}
+AO2_STRING_FIELD_CMP_FN(ast_sorcery_object_type, name)
struct ast_sorcery *__ast_sorcery_open(const char *module_name)
{
@@ -787,7 +614,9 @@ struct ast_sorcery *__ast_sorcery_open(const char *module_name)
goto done;
}
- if (!(sorcery->types = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, TYPE_BUCKETS, sorcery_type_hash, sorcery_type_cmp))) {
+ sorcery->types = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, TYPE_BUCKETS,
+ ast_sorcery_object_type_hash_fn, ast_sorcery_object_type_cmp_fn);
+ if (!sorcery->types) {
ao2_ref(sorcery, -1);
sorcery = NULL;
goto done;
@@ -863,7 +692,7 @@ static struct ast_sorcery_object_type *sorcery_object_type_alloc(const char *typ
}
object_type->fields = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_NOLOCK, 0,
- OBJECT_FIELD_BUCKETS, object_type_field_hash, NULL, object_type_field_cmp);
+ OBJECT_FIELD_BUCKETS, ast_sorcery_object_field_hash_fn, NULL, ast_sorcery_object_field_cmp_fn);
if (!object_type->fields) {
ao2_ref(object_type, -1);
return NULL;
diff --git a/main/stasis.c b/main/stasis.c
index 63d17dfaf..5f080d1a3 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -1436,8 +1436,8 @@ static struct aco_type threadpool_option = {
.type = ACO_GLOBAL,
.name = "threadpool",
.item_offset = offsetof(struct stasis_config, threadpool_options),
- .category = "^threadpool$",
- .category_match = ACO_WHITELIST,
+ .category = "threadpool",
+ .category_match = ACO_WHITELIST_EXACT,
};
static struct aco_type *threadpool_options[] = ACO_TYPES(&threadpool_option);
@@ -1447,8 +1447,8 @@ static struct aco_type declined_option = {
.type = ACO_GLOBAL,
.name = "declined_message_types",
.item_offset = offsetof(struct stasis_config, declined_message_types),
- .category_match = ACO_WHITELIST,
- .category = "^declined_message_types$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "declined_message_types",
};
struct aco_type *declined_options[] = ACO_TYPES(&declined_option);
@@ -1651,4 +1651,3 @@ int stasis_init(void)
return 0;
}
-
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index b0973b984..f5037a42e 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -930,4 +930,3 @@ int stasis_cache_init(void)
return 0;
}
-
diff --git a/main/stasis_cache_pattern.c b/main/stasis_cache_pattern.c
index 7ccf1c181..3106cb33e 100644
--- a/main/stasis_cache_pattern.c
+++ b/main/stasis_cache_pattern.c
@@ -212,4 +212,3 @@ struct stasis_topic *stasis_cp_single_topic_cached(
}
return stasis_caching_get_topic(one->topic_cached);
}
-
diff --git a/main/stasis_channels.c b/main/stasis_channels.c
index 0479bd9e9..ed460cca4 100644
--- a/main/stasis_channels.c
+++ b/main/stasis_channels.c
@@ -174,9 +174,21 @@ static const char *channel_snapshot_get_name(struct stasis_message *message)
*/
static int channel_snapshot_hash_cb(const void *obj, const int flags)
{
- const struct ast_channel_snapshot *snapshot = obj;
- const char *name = (flags & OBJ_KEY) ? obj : snapshot->name;
- return ast_str_case_hash(name);
+ const struct ast_channel_snapshot *object = obj;
+ const char *key;
+
+ switch (flags & OBJ_SEARCH_MASK) {
+ case OBJ_SEARCH_KEY:
+ key = obj;
+ break;
+ case OBJ_SEARCH_OBJECT:
+ key = object->name;
+ break;
+ default:
+ ast_assert(0);
+ return 0;
+ }
+ return ast_str_case_hash(key);
}
/*!
@@ -185,10 +197,28 @@ static int channel_snapshot_hash_cb(const void *obj, const int flags)
*/
static int channel_snapshot_cmp_cb(void *obj, void *arg, int flags)
{
- struct ast_channel_snapshot *left = obj;
- struct ast_channel_snapshot *right = arg;
- const char *match = (flags & OBJ_KEY) ? arg : right->name;
- return strcasecmp(left->name, match) ? 0 : (CMP_MATCH | CMP_STOP);
+ const struct ast_channel_snapshot *object_left = obj;
+ const struct ast_channel_snapshot *object_right = arg;
+ const char *right_key = arg;
+ int cmp;
+
+ switch (flags & OBJ_SEARCH_MASK) {
+ case OBJ_SEARCH_OBJECT:
+ right_key = object_right->name;
+ case OBJ_SEARCH_KEY:
+ cmp = strcasecmp(object_left->name, right_key);
+ break;
+ case OBJ_SEARCH_PARTIAL_KEY:
+ cmp = strncasecmp(object_left->name, right_key, strlen(right_key));
+ break;
+ default:
+ cmp = 0;
+ break;
+ }
+ if (cmp) {
+ return 0;
+ }
+ return CMP_MATCH;
}
static void channel_snapshot_dtor(void *obj)
@@ -237,22 +267,24 @@ struct ast_channel_snapshot *ast_channel_snapshot_create(struct ast_channel *cha
S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, ""));
ast_string_field_set(snapshot, caller_number,
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, ""));
- ast_string_field_set(snapshot, caller_dnid, S_OR(ast_channel_dialed(chan)->number.str, ""));
ast_string_field_set(snapshot, caller_subaddr,
S_COR(ast_channel_caller(chan)->id.subaddress.valid, ast_channel_caller(chan)->id.subaddress.str, ""));
- ast_string_field_set(snapshot, dialed_subaddr,
- S_COR(ast_channel_dialed(chan)->subaddress.valid, ast_channel_dialed(chan)->subaddress.str, ""));
ast_string_field_set(snapshot, caller_ani,
S_COR(ast_channel_caller(chan)->ani.number.valid, ast_channel_caller(chan)->ani.number.str, ""));
+
ast_string_field_set(snapshot, caller_rdnis,
S_COR(ast_channel_redirecting(chan)->from.number.valid, ast_channel_redirecting(chan)->from.number.str, ""));
+
ast_string_field_set(snapshot, caller_dnid,
S_OR(ast_channel_dialed(chan)->number.str, ""));
+ ast_string_field_set(snapshot, dialed_subaddr,
+ S_COR(ast_channel_dialed(chan)->subaddress.valid, ast_channel_dialed(chan)->subaddress.str, ""));
ast_string_field_set(snapshot, connected_name,
S_COR(ast_channel_connected(chan)->id.name.valid, ast_channel_connected(chan)->id.name.str, ""));
ast_string_field_set(snapshot, connected_number,
S_COR(ast_channel_connected(chan)->id.number.valid, ast_channel_connected(chan)->id.number.str, ""));
+
ast_string_field_set(snapshot, language, ast_channel_language(chan));
if ((bridge = ast_channel_get_bridge(chan))) {
@@ -295,31 +327,33 @@ static void ast_channel_publish_dial_internal(struct ast_channel *caller,
struct ast_channel *peer, struct ast_channel *forwarded, const char *dialstring,
const char *dialstatus, const char *forward)
{
- RAII_VAR(struct ast_multi_channel_blob *, payload, NULL, ao2_cleanup);
- RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
- RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
- RAII_VAR(struct ast_channel_snapshot *, caller_snapshot, NULL, ao2_cleanup);
- RAII_VAR(struct ast_channel_snapshot *, peer_snapshot, NULL, ao2_cleanup);
- RAII_VAR(struct ast_channel_snapshot *, forwarded_snapshot, NULL, ao2_cleanup);
+ struct ast_multi_channel_blob *payload;
+ struct stasis_message *msg;
+ struct ast_json *blob;
+ struct ast_channel_snapshot *peer_snapshot;
if (!ast_channel_dial_type()) {
return;
}
ast_assert(peer != NULL);
+
blob = ast_json_pack("{s: s, s: s, s: s}",
- "dialstatus", S_OR(dialstatus, ""),
- "forward", S_OR(forward, ""),
- "dialstring", S_OR(dialstring, ""));
+ "dialstatus", S_OR(dialstatus, ""),
+ "forward", S_OR(forward, ""),
+ "dialstring", S_OR(dialstring, ""));
if (!blob) {
return;
}
payload = ast_multi_channel_blob_create(blob);
+ ast_json_unref(blob);
if (!payload) {
return;
}
if (caller) {
+ struct ast_channel_snapshot *caller_snapshot;
+
ast_channel_lock(caller);
if (ast_strlen_zero(dialstatus)) {
caller_snapshot = ast_channel_snapshot_get_latest(ast_channel_uniqueid(caller));
@@ -328,9 +362,11 @@ static void ast_channel_publish_dial_internal(struct ast_channel *caller,
}
ast_channel_unlock(caller);
if (!caller_snapshot) {
+ ao2_ref(payload, -1);
return;
}
ast_multi_channel_blob_add_channel(payload, "caller", caller_snapshot);
+ ao2_ref(caller_snapshot, -1);
}
ast_channel_lock(peer);
@@ -341,26 +377,32 @@ static void ast_channel_publish_dial_internal(struct ast_channel *caller,
}
ast_channel_unlock(peer);
if (!peer_snapshot) {
+ ao2_ref(payload, -1);
return;
}
ast_multi_channel_blob_add_channel(payload, "peer", peer_snapshot);
+ ao2_ref(peer_snapshot, -1);
if (forwarded) {
+ struct ast_channel_snapshot *forwarded_snapshot;
+
ast_channel_lock(forwarded);
forwarded_snapshot = ast_channel_snapshot_create(forwarded);
ast_channel_unlock(forwarded);
if (!forwarded_snapshot) {
+ ao2_ref(payload, -1);
return;
}
ast_multi_channel_blob_add_channel(payload, "forwarded", forwarded_snapshot);
+ ao2_ref(forwarded_snapshot, -1);
}
msg = stasis_message_create(ast_channel_dial_type(), payload);
- if (!msg) {
- return;
+ ao2_ref(payload, -1);
+ if (msg) {
+ publish_message_for_channel_topics(msg, caller);
+ ao2_ref(msg, -1);
}
-
- publish_message_for_channel_topics(msg, caller);
}
static void remove_dial_masquerade(struct ast_channel *peer);
@@ -454,33 +496,33 @@ struct stasis_message *ast_channel_blob_create_from_cache(const char *channel_id
struct stasis_message_type *type,
struct ast_json *blob)
{
- RAII_VAR(struct ast_channel_snapshot *, snapshot,
- NULL,
- ao2_cleanup);
+ struct ast_channel_snapshot *snapshot;
+ struct stasis_message *msg;
if (!type) {
return NULL;
}
snapshot = ast_channel_snapshot_get_latest(channel_id);
-
- return create_channel_blob_message(snapshot, type, blob);
+ msg = create_channel_blob_message(snapshot, type, blob);
+ ao2_cleanup(snapshot);
+ return msg;
}
struct stasis_message *ast_channel_blob_create(struct ast_channel *chan,
struct stasis_message_type *type, struct ast_json *blob)
{
- RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup);
+ struct ast_channel_snapshot *snapshot;
+ struct stasis_message *msg;
if (!type) {
return NULL;
}
- if (chan) {
- snapshot = ast_channel_snapshot_create(chan);
- }
-
- return create_channel_blob_message(snapshot, type, blob);
+ snapshot = chan ? ast_channel_snapshot_create(chan) : NULL;
+ msg = create_channel_blob_message(snapshot, type, blob);
+ ao2_cleanup(snapshot);
+ return msg;
}
/*! \brief A channel snapshot wrapper object used in \ref ast_multi_channel_blob objects */
@@ -492,31 +534,37 @@ struct channel_role_snapshot {
/*! \brief A multi channel blob data structure for multi_channel_blob stasis messages */
struct ast_multi_channel_blob {
struct ao2_container *channel_snapshots; /*!< A container holding the snapshots */
- struct ast_json *blob; /*< A blob of JSON data */
+ struct ast_json *blob; /*!< A blob of JSON data */
};
/*!
* \internal
- * \brief Standard comparison function for \ref channel_role_snapshot objects
+ * \brief Comparison function for \ref channel_role_snapshot objects
*/
-static int channel_role_single_cmp_cb(void *obj, void *arg, int flags)
-{
- struct channel_role_snapshot *left = obj;
- struct channel_role_snapshot *right = arg;
- const char *match = (flags & OBJ_KEY) ? arg : right->role;
- return strcasecmp(left->role, match) ? 0 : (CMP_MATCH | CMP_STOP);
-}
-
-/*!
- * \internal
- * \brief Multi comparison function for \ref channel_role_snapshot objects
- */
-static int channel_role_multi_cmp_cb(void *obj, void *arg, int flags)
-{
- struct channel_role_snapshot *left = obj;
- struct channel_role_snapshot *right = arg;
- const char *match = (flags & OBJ_KEY) ? arg : right->role;
- return strcasecmp(left->role, match) ? 0 : (CMP_MATCH);
+static int channel_role_cmp_cb(void *obj, void *arg, int flags)
+{
+ const struct channel_role_snapshot *object_left = obj;
+ const struct channel_role_snapshot *object_right = arg;
+ const char *right_key = arg;
+ int cmp;
+
+ switch (flags & OBJ_SEARCH_MASK) {
+ case OBJ_SEARCH_OBJECT:
+ right_key = object_right->role;
+ case OBJ_SEARCH_KEY:
+ cmp = strcasecmp(object_left->role, right_key);
+ break;
+ case OBJ_SEARCH_PARTIAL_KEY:
+ cmp = strncasecmp(object_left->role, right_key, strlen(right_key));
+ break;
+ default:
+ cmp = 0;
+ break;
+ }
+ if (cmp) {
+ return 0;
+ }
+ return CMP_MATCH;
}
/*!
@@ -525,9 +573,21 @@ static int channel_role_multi_cmp_cb(void *obj, void *arg, int flags)
*/
static int channel_role_hash_cb(const void *obj, const int flags)
{
- const struct channel_role_snapshot *snapshot = obj;
- const char *name = (flags & OBJ_KEY) ? obj : snapshot->role;
- return ast_str_case_hash(name);
+ const struct channel_role_snapshot *object = obj;
+ const char *key;
+
+ switch (flags & OBJ_SEARCH_MASK) {
+ case OBJ_SEARCH_KEY:
+ key = obj;
+ break;
+ case OBJ_SEARCH_OBJECT:
+ key = object->role;
+ break;
+ default:
+ ast_assert(0);
+ return 0;
+ }
+ return ast_str_case_hash(key);
}
/*!
@@ -544,89 +604,80 @@ static void multi_channel_blob_dtor(void *obj)
struct ast_multi_channel_blob *ast_multi_channel_blob_create(struct ast_json *blob)
{
- RAII_VAR(struct ast_multi_channel_blob *, obj,
- ao2_alloc(sizeof(*obj), multi_channel_blob_dtor),
- ao2_cleanup);
+ struct ast_multi_channel_blob *obj;
ast_assert(blob != NULL);
+ obj = ao2_alloc(sizeof(*obj), multi_channel_blob_dtor);
if (!obj) {
return NULL;
}
obj->channel_snapshots = ao2_container_alloc(NUM_MULTI_CHANNEL_BLOB_BUCKETS,
- channel_role_hash_cb, channel_role_single_cmp_cb);
+ channel_role_hash_cb, channel_role_cmp_cb);
if (!obj->channel_snapshots) {
+ ao2_ref(obj, -1);
return NULL;
}
obj->blob = ast_json_ref(blob);
-
- ao2_ref(obj, +1);
return obj;
}
struct ast_channel_snapshot *ast_channel_snapshot_get_latest(const char *uniqueid)
{
- RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
+ struct stasis_message *message;
struct ast_channel_snapshot *snapshot;
ast_assert(!ast_strlen_zero(uniqueid));
- message = stasis_cache_get(ast_channel_cache(),
- ast_channel_snapshot_type(),
- uniqueid);
+ message = stasis_cache_get(ast_channel_cache(), ast_channel_snapshot_type(),
+ uniqueid);
if (!message) {
return NULL;
}
- snapshot = stasis_message_data(message);
- if (!snapshot) {
- return NULL;
- }
- ao2_ref(snapshot, +1);
+ snapshot = ao2_bump(stasis_message_data(message));
+ ao2_ref(message, -1);
return snapshot;
}
struct ast_channel_snapshot *ast_channel_snapshot_get_latest_by_name(const char *name)
{
- RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
+ struct stasis_message *message;
struct ast_channel_snapshot *snapshot;
ast_assert(!ast_strlen_zero(name));
- message = stasis_cache_get(ast_channel_cache_by_name(),
- ast_channel_snapshot_type(),
- name);
+ message = stasis_cache_get(ast_channel_cache_by_name(), ast_channel_snapshot_type(),
+ name);
if (!message) {
return NULL;
}
- snapshot = stasis_message_data(message);
- if (!snapshot) {
- return NULL;
- }
- ao2_ref(snapshot, +1);
+ snapshot = ao2_bump(stasis_message_data(message));
+ ao2_ref(message, -1);
return snapshot;
}
static void channel_role_snapshot_dtor(void *obj)
{
struct channel_role_snapshot *role_snapshot = obj;
+
ao2_cleanup(role_snapshot->snapshot);
}
void ast_multi_channel_blob_add_channel(struct ast_multi_channel_blob *obj, const char *role, struct ast_channel_snapshot *snapshot)
{
- RAII_VAR(struct channel_role_snapshot *, role_snapshot, NULL, ao2_cleanup);
+ struct channel_role_snapshot *role_snapshot;
int role_len = strlen(role) + 1;
if (!obj || ast_strlen_zero(role) || !snapshot) {
return;
}
- role_snapshot = ao2_alloc_options(sizeof(*role_snapshot) + role_len, channel_role_snapshot_dtor,
- AO2_ALLOC_OPT_LOCK_NOLOCK);
+ role_snapshot = ao2_alloc_options(sizeof(*role_snapshot) + role_len,
+ channel_role_snapshot_dtor, AO2_ALLOC_OPT_LOCK_NOLOCK);
if (!role_snapshot) {
return;
}
@@ -634,40 +685,49 @@ void ast_multi_channel_blob_add_channel(struct ast_multi_channel_blob *obj, cons
role_snapshot->snapshot = snapshot;
ao2_ref(role_snapshot->snapshot, +1);
ao2_link(obj->channel_snapshots, role_snapshot);
+ ao2_ref(role_snapshot, -1);
}
struct ast_channel_snapshot *ast_multi_channel_blob_get_channel(struct ast_multi_channel_blob *obj, const char *role)
{
struct channel_role_snapshot *role_snapshot;
+ struct ast_channel_snapshot *snapshot;
if (!obj || ast_strlen_zero(role)) {
return NULL;
}
- role_snapshot = ao2_find(obj->channel_snapshots, role, OBJ_KEY);
+ role_snapshot = ao2_find(obj->channel_snapshots, role, OBJ_SEARCH_KEY);
/* Note that this function does not increase the ref count on snapshot */
if (!role_snapshot) {
return NULL;
}
+ snapshot = role_snapshot->snapshot;
ao2_ref(role_snapshot, -1);
- return role_snapshot->snapshot;
+ return snapshot;
}
struct ao2_container *ast_multi_channel_blob_get_channels(struct ast_multi_channel_blob *obj, const char *role)
{
- RAII_VAR(struct ao2_container *, ret_container,
- ao2_container_alloc(NUM_MULTI_CHANNEL_BLOB_BUCKETS, channel_snapshot_hash_cb, channel_snapshot_cmp_cb),
- ao2_cleanup);
+ struct ao2_container *ret_container;
struct ao2_iterator *it_role_snapshots;
struct channel_role_snapshot *role_snapshot;
char *arg;
- if (!obj || ast_strlen_zero(role) || !ret_container) {
+ if (!obj || ast_strlen_zero(role)) {
return NULL;
}
- arg = ast_strdupa(role);
- it_role_snapshots = ao2_callback(obj->channel_snapshots, OBJ_MULTIPLE | OBJ_KEY, channel_role_multi_cmp_cb, arg);
+ ret_container = ao2_container_alloc(NUM_MULTI_CHANNEL_BLOB_BUCKETS,
+ channel_snapshot_hash_cb, channel_snapshot_cmp_cb);
+ if (!ret_container) {
+ return NULL;
+ }
+
+ arg = ast_strdupa(role);
+ it_role_snapshots = ao2_callback(obj->channel_snapshots,
+ OBJ_MULTIPLE | OBJ_SEARCH_KEY, channel_role_cmp_cb, arg);
if (!it_role_snapshots) {
+ ao2_ref(ret_container, -1);
return NULL;
}
@@ -677,7 +737,6 @@ struct ao2_container *ast_multi_channel_blob_get_channels(struct ast_multi_chann
}
ao2_iterator_destroy(it_role_snapshots);
- ao2_ref(ret_container, +1);
return ret_container;
}
@@ -702,8 +761,8 @@ void ast_channel_stage_snapshot_done(struct ast_channel *chan)
void ast_channel_publish_snapshot(struct ast_channel *chan)
{
- RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup);
- RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
+ struct ast_channel_snapshot *snapshot;
+ struct stasis_message *message;
if (!ast_channel_snapshot_type()) {
return;
@@ -719,12 +778,14 @@ void ast_channel_publish_snapshot(struct ast_channel *chan)
}
message = stasis_message_create(ast_channel_snapshot_type(), snapshot);
+ ao2_ref(snapshot, -1);
if (!message) {
return;
}
ast_assert(ast_channel_topic(chan) != NULL);
stasis_publish(ast_channel_topic(chan), message);
+ ao2_ref(message, -1);
}
void ast_channel_publish_cached_blob(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
@@ -738,8 +799,8 @@ void ast_channel_publish_cached_blob(struct ast_channel *chan, struct stasis_mes
message = ast_channel_blob_create_from_cache(ast_channel_uniqueid(chan), type, blob);
if (message) {
stasis_publish(ast_channel_topic(chan), message);
+ ao2_ref(message, -1);
}
- ao2_cleanup(message);
}
void ast_channel_publish_blob(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
@@ -753,8 +814,8 @@ void ast_channel_publish_blob(struct ast_channel *chan, struct stasis_message_ty
message = ast_channel_blob_create(chan, type, blob);
if (message) {
stasis_publish(ast_channel_topic(chan), message);
+ ao2_ref(message, -1);
}
- ao2_cleanup(message);
}
void ast_channel_publish_varset(struct ast_channel *chan, const char *name, const char *value)
@@ -789,78 +850,88 @@ void ast_channel_publish_varset(struct ast_channel *chan, const char *name, cons
static struct ast_manager_event_blob *varset_to_ami(struct stasis_message *msg)
{
- RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
+ struct ast_str *channel_event_string;
struct ast_channel_blob *obj = stasis_message_data(msg);
const char *variable =
ast_json_string_get(ast_json_object_get(obj->blob, "variable"));
- RAII_VAR(char *, value, ast_escape_c_alloc(
- ast_json_string_get(ast_json_object_get(obj->blob, "value"))), ast_free);
+ char *value;
+ struct ast_manager_event_blob *ev;
+ value = ast_escape_c_alloc(ast_json_string_get(ast_json_object_get(obj->blob,
+ "value")));
if (!value) {
return NULL;
}
if (obj->snapshot) {
- channel_event_string =
- ast_manager_build_channel_state_string(obj->snapshot);
+ channel_event_string = ast_manager_build_channel_state_string(obj->snapshot);
} else {
channel_event_string = ast_str_create(35);
ast_str_set(&channel_event_string, 0,
- "Channel: none\r\n"
- "Uniqueid: none\r\n");
+ "Channel: none\r\n"
+ "Uniqueid: none\r\n");
}
-
if (!channel_event_string) {
+ ast_free(value);
return NULL;
}
- return ast_manager_event_blob_create(EVENT_FLAG_DIALPLAN, "VarSet",
+ ev = ast_manager_event_blob_create(EVENT_FLAG_DIALPLAN, "VarSet",
"%s"
"Variable: %s\r\n"
"Value: %s\r\n",
ast_str_buffer(channel_event_string), variable, value);
+ ast_free(channel_event_string);
+ ast_free(value);
+ return ev;
}
static struct ast_manager_event_blob *agent_login_to_ami(struct stasis_message *msg)
{
- RAII_VAR(struct ast_str *, channel_string, NULL, ast_free);
+ struct ast_str *channel_string;
struct ast_channel_blob *obj = stasis_message_data(msg);
const char *agent = ast_json_string_get(ast_json_object_get(obj->blob, "agent"));
+ struct ast_manager_event_blob *ev;
channel_string = ast_manager_build_channel_state_string(obj->snapshot);
if (!channel_string) {
return NULL;
}
- return ast_manager_event_blob_create(EVENT_FLAG_AGENT, "AgentLogin",
+ ev = ast_manager_event_blob_create(EVENT_FLAG_AGENT, "AgentLogin",
"%s"
"Agent: %s\r\n",
ast_str_buffer(channel_string), agent);
+ ast_free(channel_string);
+ return ev;
}
static struct ast_manager_event_blob *agent_logoff_to_ami(struct stasis_message *msg)
{
- RAII_VAR(struct ast_str *, channel_string, NULL, ast_free);
+ struct ast_str *channel_string;
struct ast_channel_blob *obj = stasis_message_data(msg);
const char *agent = ast_json_string_get(ast_json_object_get(obj->blob, "agent"));
long logintime = ast_json_integer_get(ast_json_object_get(obj->blob, "logintime"));
+ struct ast_manager_event_blob *ev;
channel_string = ast_manager_build_channel_state_string(obj->snapshot);
if (!channel_string) {
return NULL;
}
- return ast_manager_event_blob_create(EVENT_FLAG_AGENT, "AgentLogoff",
+ ev = ast_manager_event_blob_create(EVENT_FLAG_AGENT, "AgentLogoff",
"%s"
"Agent: %s\r\n"
"Logintime: %ld\r\n",
ast_str_buffer(channel_string), agent, logintime);
+ ast_free(channel_string);
+ return ev;
}
void ast_publish_channel_state(struct ast_channel *chan)
{
- RAII_VAR(struct ast_channel_snapshot *, snapshot, NULL, ao2_cleanup);
- RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
+ struct ast_channel_snapshot *snapshot;
+ struct stasis_message *message;
if (!ast_channel_snapshot_type()) {
return;
@@ -877,12 +948,14 @@ void ast_publish_channel_state(struct ast_channel *chan)
}
message = stasis_message_create(ast_channel_snapshot_type(), snapshot);
+ ao2_ref(snapshot, -1);
if (!message) {
return;
}
ast_assert(ast_channel_topic(chan) != NULL);
stasis_publish(ast_channel_topic(chan), message);
+ ao2_ref(message, -1);
}
struct ast_json *ast_channel_snapshot_to_json(
@@ -892,8 +965,9 @@ struct ast_json *ast_channel_snapshot_to_json(
struct ast_json *json_chan;
if (snapshot == NULL
- || (sanitize && sanitize->channel_snapshot
- && sanitize->channel_snapshot(snapshot))) {
+ || (sanitize
+ && sanitize->channel_snapshot
+ && sanitize->channel_snapshot(snapshot))) {
return NULL;
}
@@ -967,7 +1041,7 @@ static struct ast_json *channel_blob_to_json(
const char *type,
const struct stasis_message_sanitizer *sanitize)
{
- RAII_VAR(struct ast_json *, out, NULL, ast_json_unref);
+ struct ast_json *to_json;
struct ast_channel_blob *channel_blob = stasis_message_data(message);
struct ast_json *blob = channel_blob->blob;
struct ast_channel_snapshot *snapshot = channel_blob->snapshot;
@@ -975,36 +1049,38 @@ static struct ast_json *channel_blob_to_json(
int res = 0;
if (blob == NULL || ast_json_is_null(blob)) {
- out = ast_json_object_create();
+ to_json = ast_json_object_create();
} else {
/* blobs are immutable, so shallow copies are fine */
- out = ast_json_copy(blob);
+ to_json = ast_json_copy(blob);
}
-
- if (!out) {
+ if (!to_json) {
return NULL;
}
- res |= ast_json_object_set(out, "type", ast_json_string_create(type));
- res |= ast_json_object_set(out, "timestamp",
+ res |= ast_json_object_set(to_json, "type", ast_json_string_create(type));
+ res |= ast_json_object_set(to_json, "timestamp",
ast_json_timeval(*tv, NULL));
/* For global channel messages, the snapshot is optional */
if (snapshot) {
- struct ast_json *json_channel = ast_channel_snapshot_to_json(snapshot, sanitize);
+ struct ast_json *json_channel;
+ json_channel = ast_channel_snapshot_to_json(snapshot, sanitize);
if (!json_channel) {
+ ast_json_unref(to_json);
return NULL;
}
- res |= ast_json_object_set(out, "channel", json_channel);
+ res |= ast_json_object_set(to_json, "channel", json_channel);
}
if (res != 0) {
+ ast_json_unref(to_json);
return NULL;
}
- return ast_json_ref(out);
+ return to_json;
}
static struct ast_json *dtmf_end_to_json(
diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c
index 5b5526e6f..f8050c95c 100644
--- a/main/stdtime/localtime.c
+++ b/main/stdtime/localtime.c
@@ -1057,7 +1057,7 @@ static int tzload(const char *name, struct state * const sp, const int doextend)
int result;
/* for temporary struct state --
- * macro flags the the struct as a stack temp.
+ * macro flags the struct as a stack temp.
* to prevent use within add_notify()
*/
SP_STACK_INIT(ts);
@@ -1508,16 +1508,14 @@ static int tzparse(const char *name, struct state *sp, const int lastditch)
}
} else {
long theirstdoffset;
- long theirdstoffset;
long theiroffset;
- int isdst;
int i;
int j;
if (*name != '\0')
return -1;
/*
- ** Initial values of theirstdoffset and theirdstoffset.
+ ** Initial values of theirstdoffset.
*/
theirstdoffset = 0;
for (i = 0; i < sp->timecnt; ++i) {
@@ -1528,19 +1526,6 @@ static int tzparse(const char *name, struct state *sp, const int lastditch)
break;
}
}
- theirdstoffset = 0;
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- if (sp->ttis[j].tt_isdst) {
- theirdstoffset =
- -sp->ttis[j].tt_gmtoff;
- break;
- }
- }
- /*
- ** Initially we're assumed to be in standard time.
- */
- isdst = FALSE;
theiroffset = theirstdoffset;
/*
** Now juggle transition times and types
@@ -1552,32 +1537,13 @@ static int tzparse(const char *name, struct state *sp, const int lastditch)
if (sp->ttis[j].tt_ttisgmt) {
/* No adjustment to transition time */
} else {
- /*
- ** If summer time is in effect, and the
- ** transition time was not specified as
- ** standard time, add the summer time
- ** offset to the transition time;
- ** otherwise, add the standard time
- ** offset to the transition time.
- */
- /*
- ** Transitions from DST to DDST
- ** will effectively disappear since
- ** POSIX provides for only one DST
- ** offset.
- */
- if (isdst && !sp->ttis[j].tt_ttisstd) {
- sp->ats[i] += dstoffset -
- theirdstoffset;
- } else {
- sp->ats[i] += stdoffset -
- theirstdoffset;
- }
+ /* Add the standard time offset to the transition time. */
+ sp->ats[i] += stdoffset - theirstdoffset;
}
theiroffset = -sp->ttis[j].tt_gmtoff;
- if (sp->ttis[j].tt_isdst)
- theirdstoffset = theiroffset;
- else theirstdoffset = theiroffset;
+ if (!sp->ttis[j].tt_isdst) {
+ theirstdoffset = theiroffset;
+ }
}
/*
** Finally, fill in ttis.
@@ -1811,7 +1777,7 @@ void ast_get_dst_info(const time_t * const timep, int *dst_enabled, time_t *dst_
return;
/* If the desired time exceeds the bounds of the defined time transitions
- * then give give up on determining DST info and simply look for gmt offset
+ * then give up on determining DST info and simply look for gmt offset
* This requires that I adjust the given time using increments of Gregorian
* repeats to place the time within the defined time transitions in the
* timezone structure.
@@ -2587,4 +2553,3 @@ char *ast_strptime(const char *s, const char *format, struct ast_tm *tm)
{
return ast_strptime_locale(s, format, tm, NULL);
}
-
diff --git a/main/tcptls.c b/main/tcptls.c
index ef22094bf..3c2d6788f 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -805,7 +805,7 @@ void *ast_tcptls_server_root(void *data)
pthread_t launched;
for (;;) {
- int i, flags;
+ int i;
if (desc->periodic_fn) {
desc->periodic_fn(desc);
@@ -843,8 +843,7 @@ void *ast_tcptls_server_root(void *data)
close(fd);
continue;
}
- flags = fcntl(fd, F_GETFL);
- fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
+ ast_fd_clear_flags(fd, O_NONBLOCK);
tcptls_session->fd = fd;
tcptls_session->parent = desc;
ast_sockaddr_copy(&tcptls_session->remote_address, &addr);
@@ -1061,7 +1060,6 @@ void ast_ssl_teardown(struct ast_tls_config *cfg)
struct ast_tcptls_session_instance *ast_tcptls_client_start(struct ast_tcptls_session_instance *tcptls_session)
{
struct ast_tcptls_session_args *desc;
- int flags;
if (!(desc = tcptls_session->parent)) {
goto client_start_error;
@@ -1075,8 +1073,7 @@ struct ast_tcptls_session_instance *ast_tcptls_client_start(struct ast_tcptls_se
goto client_start_error;
}
- flags = fcntl(desc->accept_fd, F_GETFL);
- fcntl(desc->accept_fd, F_SETFL, flags & ~O_NONBLOCK);
+ ast_fd_clear_flags(desc->accept_fd, O_NONBLOCK);
if (desc->tls_cfg) {
desc->tls_cfg->enabled = 1;
@@ -1164,7 +1161,6 @@ error:
void ast_tcptls_server_start(struct ast_tcptls_session_args *desc)
{
- int flags;
int x = 1;
int tls_changed = 0;
@@ -1267,8 +1263,7 @@ void ast_tcptls_server_start(struct ast_tcptls_session_args *desc)
ast_log(LOG_ERROR, "Unable to listen for %s!\n", desc->name);
goto error;
}
- flags = fcntl(desc->accept_fd, F_GETFL);
- fcntl(desc->accept_fd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(desc->accept_fd, O_NONBLOCK);
if (ast_pthread_create_background(&desc->master, NULL, desc->accept_fn, desc)) {
ast_log(LOG_ERROR, "Unable to launch thread for %s on %s: %s\n",
desc->name,
diff --git a/main/tdd.c b/main/tdd.c
index a590e3b2f..4f4d75061 100644
--- a/main/tdd.c
+++ b/main/tdd.c
@@ -362,4 +362,3 @@ int tdd_generate(struct tdd_state *tdd, unsigned char *buf, const char *str)
}
return bytes;
}
-
diff --git a/main/threadpool.c b/main/threadpool.c
index 6240b7329..e3d0e40fd 100644
--- a/main/threadpool.c
+++ b/main/threadpool.c
@@ -702,7 +702,7 @@ static int kill_threads(void *obj, void *arg, int flags)
/*!
* \brief ao2 callback to zombify a set number of threads.
*
- * Threads will be zombified as long as as the counter has not reached
+ * Threads will be zombified as long as the counter has not reached
* zero. The counter is decremented with each thread that is zombified.
*
* Zombifying a thread involves removing it from its current container,
@@ -1093,7 +1093,7 @@ static void worker_active(struct worker_thread *worker)
{
int alive;
- /* The following is equivalent to
+ /* The following is equivalent to
*
* while (threadpool_execute(worker->pool));
*
diff --git a/main/threadstorage.c b/main/threadstorage.c
index 4c46a0f58..c97dca921 100644
--- a/main/threadstorage.c
+++ b/main/threadstorage.c
@@ -167,7 +167,7 @@ static char *handle_cli_threadstorage_show_allocations(struct ast_cli_entry *e,
pthread_mutex_unlock(&threadstoragelock);
ast_cli(a->fd, "%10d bytes allocated in %d allocation%s\n", (int) len, count, count > 1 ? "s" : "");
-
+
return CLI_SUCCESS;
}
@@ -226,7 +226,7 @@ static char *handle_cli_threadstorage_show_summary(struct ast_cli_entry *e, int
}
pthread_mutex_unlock(&threadstoragelock);
-
+
AST_LIST_TRAVERSE(&file_summary, file, entry) {
len += file->len;
count += file->count;
@@ -262,4 +262,3 @@ void threadstorage_init(void)
}
#endif /* !defined(DEBUG_THREADLOCALS) */
-
diff --git a/main/translate.c b/main/translate.c
index 4ffe27c33..240e4956a 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -34,7 +34,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/time.h>
#include <sys/resource.h>
#include <math.h>
-#include <stdlib.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
@@ -499,6 +498,7 @@ struct ast_trans_pvt *ast_translator_build_path(struct ast_format *dst, struct a
ast_log(LOG_WARNING, "No translator path from %s to %s\n",
ast_format_get_name(src), ast_format_get_name(dst));
AST_RWLIST_UNLOCK(&translators);
+ ast_translator_free_path(head);
return NULL;
}
if ((t->dst_codec.sample_rate == ast_format_get_sample_rate(dst)) && (t->dst_codec.type == ast_format_get_type(dst))) {
@@ -507,9 +507,7 @@ struct ast_trans_pvt *ast_translator_build_path(struct ast_format *dst, struct a
if (!(cur = newpvt(t, explicit_dst))) {
ast_log(LOG_WARNING, "Failed to build translator step from %s to %s\n",
ast_format_get_name(src), ast_format_get_name(dst));
- if (head) {
- ast_translator_free_path(head);
- }
+ ast_translator_free_path(head);
AST_RWLIST_UNLOCK(&translators);
return NULL;
}
@@ -1323,6 +1321,13 @@ void ast_translator_deactivate(struct ast_translator *t)
AST_RWLIST_UNLOCK(&translators);
}
+/*! Calculate the absolute difference between sample rate of two formats. */
+#define format_sample_rate_absdiff(fmt1, fmt2) ({ \
+ unsigned int rate1 = ast_format_get_sample_rate(fmt1); \
+ unsigned int rate2 = ast_format_get_sample_rate(fmt2); \
+ (rate1 > rate2 ? rate1 - rate2 : rate2 - rate1); \
+})
+
/*! \brief Calculate our best translator source format, given costs, and a desired destination */
int ast_translator_best_choice(struct ast_format_cap *dst_cap,
struct ast_format_cap *src_cap,
@@ -1407,10 +1412,8 @@ int ast_translator_best_choice(struct ast_format_cap *dst_cap,
beststeps = matrix_get(x, y)->multistep;
} else if (matrix_get(x, y)->table_cost == besttablecost
&& matrix_get(x, y)->multistep == beststeps) {
- int gap_selected = abs(ast_format_get_sample_rate(best)
- - ast_format_get_sample_rate(bestdst));
- int gap_current = abs(ast_format_get_sample_rate(src)
- - ast_format_get_sample_rate(dst));
+ unsigned int gap_selected = format_sample_rate_absdiff(best, bestdst);
+ unsigned int gap_current = format_sample_rate_absdiff(src, dst);
if (gap_current < gap_selected) {
/* better than what we have so far */
diff --git a/main/udptl.c b/main/udptl.c
index a568cd1ec..83989f738 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -239,9 +239,9 @@ static int udptl_pre_apply_config(void);
static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "global",
- .category_match = ACO_WHITELIST,
+ .category_match = ACO_WHITELIST_EXACT,
.item_offset = offsetof(struct udptl_config, general),
- .category = "^general$",
+ .category = "general",
};
static struct aco_type *general_options[] = ACO_TYPES(&general_option);
@@ -1014,7 +1014,6 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct ast_sched_context *sched, s
int x;
int startplace;
int i;
- long int flags;
RAII_VAR(struct udptl_config *, cfg, ao2_global_obj_ref(globals), ao2_cleanup);
if (!cfg || !cfg->general) {
@@ -1045,8 +1044,7 @@ struct ast_udptl *ast_udptl_new_with_bindaddr(struct ast_sched_context *sched, s
ast_log(LOG_WARNING, "Unable to allocate socket: %s\n", strerror(errno));
return NULL;
}
- flags = fcntl(udptl->fd, F_GETFL);
- fcntl(udptl->fd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(udptl->fd, O_NONBLOCK);
#ifdef SO_NO_CHECK
if (cfg->general->nochecksums)
diff --git a/main/ulaw.c b/main/ulaw.c
index 76e4b0419..a067845cc 100644
--- a/main/ulaw.c
+++ b/main/ulaw.c
@@ -248,4 +248,3 @@ void ast_ulaw_init(void)
ast_log(LOG_NOTICE, "u-Law tandem transcoding test complete.\n");
#endif /* TEST_TANDEM_TRANSCODING */
}
-
diff --git a/main/utils.c b/main/utils.c
index 034203046..b4ecffd7e 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -2664,7 +2664,7 @@ void ast_set_default_eid(struct ast_eid *eid)
unsigned char full_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
s = socket(AF_INET, SOCK_STREAM, 0);
- if (s <= 0) {
+ if (s < 0) {
ast_log(LOG_WARNING, "Unable to open socket for seeding global EID. "
"You will have to set it manually.\n");
return;
@@ -2798,3 +2798,37 @@ int ast_compare_versions(const char *version1, const char *version2)
}
return extra[0] - extra[1];
}
+
+int __ast_fd_set_flags(int fd, int flags, enum ast_fd_flag_operation op,
+ const char *file, int lineno, const char *function)
+{
+ int f;
+
+ f = fcntl(fd, F_GETFL);
+ if (f == -1) {
+ ast_log(__LOG_ERROR, file, lineno, function,
+ "Failed to get fcntl() flags for file descriptor: %s\n", strerror(errno));
+ return -1;
+ }
+
+ switch (op) {
+ case AST_FD_FLAG_SET:
+ f |= flags;
+ break;
+ case AST_FD_FLAG_CLEAR:
+ f &= ~flags;
+ break;
+ default:
+ ast_assert(0);
+ break;
+ }
+
+ f = fcntl(fd, F_SETFL, f);
+ if (f == -1) {
+ ast_log(__LOG_ERROR, file, lineno, function,
+ "Failed to set fcntl() flags for file descriptor: %s\n", strerror(errno));
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/main/xml.c b/main/xml.c
index bd82b5cbf..46fe198e4 100644
--- a/main/xml.c
+++ b/main/xml.c
@@ -386,4 +386,3 @@ struct ast_xml_xpath_results *ast_xml_query(struct ast_xml_doc *doc, const char
}
#endif /* defined(HAVE_LIBXML2) */
-
diff --git a/main/xmldoc.c b/main/xmldoc.c
index da753cd15..86ccec020 100644
--- a/main/xmldoc.c
+++ b/main/xmldoc.c
@@ -1413,7 +1413,7 @@ static int xmldoc_parse_example(struct ast_xml_node *fixnode, struct ast_str **b
static int xmldoc_parse_specialtags(struct ast_xml_node *fixnode, const char *tabs, const char *posttabs, struct ast_str **buffer)
{
struct ast_xml_node *node = fixnode;
- int ret = 0, i, count = 0;
+ int ret = 0, i;
if (!node || !ast_xml_node_get_children(node)) {
return ret;
@@ -1440,8 +1440,8 @@ static int xmldoc_parse_specialtags(struct ast_xml_node *fixnode, const char *ta
/* parse <para> elements inside special tags. */
for (node = ast_xml_node_get_children(node); node; node = ast_xml_node_get_next(node)) {
/* first <para> just print it without tabs at the begining. */
- if ((xmldoc_parse_para(node, (!count ? "" : tabs), posttabs, buffer) == 2)
- || (xmldoc_parse_info(node, (!count ? "": tabs), posttabs, buffer) == 2)) {
+ if ((xmldoc_parse_para(node, "", posttabs, buffer) == 2)
+ || (xmldoc_parse_info(node, "", posttabs, buffer) == 2)) {
ret = 2;
}
}
@@ -2950,5 +2950,3 @@ int ast_xmldoc_load_documentation(void)
}
#endif /* AST_XML_DOCS */
-
-
diff --git a/menuselect/Makefile b/menuselect/Makefile
index 96c574eb8..c2c9373f4 100644
--- a/menuselect/Makefile
+++ b/menuselect/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- A telephony toolkit for Linux.
-#
+#
# Makefile for Menuselect
#
# Copyright (C) 2005-2008, Digium, Inc.
@@ -64,7 +64,7 @@ all: $(ALL_TGTS)
$(OBJS) $(C_OBJS) $(N_OBJS) $(G_OBJS) $(M_OBJS): autoconfig.h menuselect.h
-makeopts autoconfig.h: autoconfig.h.in makeopts.in
+makeopts: configure
@./configure $(CONFIGURE_SILENT)
@echo "****"
@echo "**** The configure script was just executed, so 'make' needs to be"
diff --git a/menuselect/README b/menuselect/README
index 022ee52e3..37b0e193b 100644
--- a/menuselect/README
+++ b/menuselect/README
@@ -35,7 +35,7 @@ MENUSELECT DEPENDENCIES
libncurses -- This is needed for the curses frontend.
libnewt -- This is needed for the newt frontend (optional).
libxml2 -- This library, the XML C parser and toolkit of Gnome, is used for
- XML parsing.
+ XML parsing.
(http://xmlsoft.org/)
ENVIRONMENT SETUP
@@ -116,7 +116,7 @@ Category Attributes:
name="MENUSELECT_APPS"
The name attribute is required. This is the name of the variable that will
be in the output from menuselect.
-
+
displayname="Applications"
If this is specfied, this is what will be shown in the menu to the user.
@@ -125,7 +125,7 @@ Category Attributes:
that are *not* selected. This is because it is often convenient to be able
to define a full list in the Makefile and then filter out the results from
menuselect. Using GNU make, an example of this would be:
- APPS:=$(filter-out $(MENUSELECT_APPS),$(APPS))
+ APPS:=$(filter-out $(MENUSELECT_APPS),$(APPS))
remove_on_change=".lastclean"
This attribute can contain a space delimited list of files to be deleted
@@ -139,10 +139,10 @@ Members:
Member Attributes:
name="app_meetme"
- The name attribute is required. This is the value that will be added to the
+ The name attribute is required. This is the value that will be added to the
variable specified by the category when selected (or not selected) depending
on the setting of the positive_output attribute of the category.
-
+
displayname="Call Conferencing Application"
If this is specified, this will be provided as a description of this member
when the cursor is on it in the menu.
@@ -159,7 +159,7 @@ Dependencies:
example of specifying a dependency for a member:
<member name="app_meetme">
<depend>zaptel</depend>
- </member>
+ </member>
Conflicts:
A conflict for a <member> is specified using a <conflict> tag. The name of
diff --git a/menuselect/autoconfig.h.in b/menuselect/autoconfig.h.in
index 590ce6161..3e1e18990 100644
--- a/menuselect/autoconfig.h.in
+++ b/menuselect/autoconfig.h.in
@@ -125,4 +125,3 @@
#undef size_t
#endif
-
diff --git a/menuselect/configure.ac b/menuselect/configure.ac
index 5945f5c9f..2dd4ed652 100644
--- a/menuselect/configure.ac
+++ b/menuselect/configure.ac
@@ -61,9 +61,7 @@ AH_TOP(
#endif
)
-AH_BOTTOM(
-#endif
-)
+AH_BOTTOM([#endif])
# Checks for programs.
AC_PROG_CC
diff --git a/menuselect/contrib/Makefile-dummy b/menuselect/contrib/Makefile-dummy
index 7b677fc6a..33dfb84f0 100644
--- a/menuselect/contrib/Makefile-dummy
+++ b/menuselect/contrib/Makefile-dummy
@@ -14,4 +14,3 @@ menuselect:
dummies:
touch linkedlists.h menuselect.c menuselect_curses.c \
menuselect.h menuselect_stub.c
-
diff --git a/menuselect/contrib/menuselect-dummy b/menuselect/contrib/menuselect-dummy
index 993ab273f..4c3952efb 100755
--- a/menuselect/contrib/menuselect-dummy
+++ b/menuselect/contrib/menuselect-dummy
@@ -30,7 +30,7 @@
# By default all modules will be built (except those marked not be
# used by default)
#
-# # exclude: Don't try to build the following modules.
+# # exclude: Don't try to build the following modules.
# #exclude app_test
#
# # You can have multiple items in each line, and multiple lines.
@@ -49,7 +49,7 @@
# # idea.
# #require chan_h323 app_directory
#
-# # random - the value for this keyword is a number between 1 and
+# # random - the value for this keyword is a number between 1 and
# # 100. The higher it is, more chances not to include each module.
# # Writes the list of modules that got hit to
# # build_tools/mods_removed_random .
@@ -72,7 +72,7 @@ my %ModInfo = ();
my $AutoconfDepsFile = "build_tools/menuselect-deps";
my $AutoconfOptsFile = "makeopts";
-my %ConfigureOpts = (); #
+my %ConfigureOpts = (); #
# configuration file to read for some directives:
my $ConfFile = "build_tools/conf";
@@ -143,9 +143,9 @@ sub get_subdir_module_info {
$src =~ m|.*/([^/]*)\.c|;
my $mod_name = $1;
my %data = (
- Type=>'module',
- Module=>$mod_name,
- Dir=> $dir,
+ Type=>'module',
+ Module=>$mod_name,
+ Dir=> $dir,
Avail=>1
);
@@ -153,7 +153,7 @@ sub get_subdir_module_info {
next unless (m|^/\*\*\* MODULEINFO| .. m|^ *[*]+/|);
next unless (m|^[A-Z]| || m|^\s*<|);
- # At this point we can assume we're in the module
+ # At this point we can assume we're in the module
# info section.
chomp;
my ($var, $val, %attr) = extract_xml_key($_);
@@ -162,7 +162,7 @@ sub get_subdir_module_info {
}
if ($var =~ /^(Depend|Use)$/i) {
# use uppercase for dependency names;
- $val = uc($val);
+ $val = uc($val);
}
if ( ! exists $data{$var} ) {
$data{$var} = [$val];
@@ -183,15 +183,15 @@ sub extract_subdirs {
}
}
-# parse a partial XML document that is included as an input
+# parse a partial XML document that is included as an input
# for menuselect in a few places. Naturally a full-fledged XML parsing
# will not be done here. A line-based parsing that happens to work will
# have to do.
sub parse_menuselect_xml_file($) {
my $file_name = shift;
- open XML,$file_name or
+ open XML,$file_name or
die "Failed opening XML file $file_name: $!.\n";
-
+
my $header = <XML>;
$header =~ /^\s*<category\s+name="MENUSELECT_([^"]+)"\s/;
my $category = $1;
@@ -214,7 +214,7 @@ sub parse_menuselect_xml_file($) {
Module => $1,
DisplayName => $2,
Defaultenabled => ['no'],
- Avail => 1,
+ Avail => 1,
};
} elsif ($tag eq '/member') {
@@ -234,13 +234,13 @@ sub parse_menuselect_xml_file($) {
if (! exists $member->{$key}) {
$member->{$key} = [];
}
-
+
# Make sure dependencies are upper-case.
# FIXME: this is not the proper place for such a fix
$val = uc($val) if ($key =~ /Depend|Use/);
# Using "unshift' rather than 'push'.
- # For a singleton value this makes the action an
+ # For a singleton value this makes the action an
# override, as only the first value counts.
# For a list value, however, it means a reversed
# order.
@@ -248,17 +248,17 @@ sub parse_menuselect_xml_file($) {
}
}
-
+
close XML;
}
# Dump our data structure to a file.
sub dump_deps($) {
my $file = shift;
- open OUTPUT,">$file" or
+ open OUTPUT,">$file" or
die "cannot open category file $file for writing: $!\n";
- foreach my $mod_name (sort keys %ModInfo) {
+ foreach my $mod_name (sort keys %ModInfo) {
print OUTPUT "Key: $mod_name\n";
my $data = $ModInfo{$mod_name};
foreach my $var (sort keys %{$data} ) {
@@ -285,7 +285,7 @@ sub get_autoconf_deps() {
my ($lib, $avail_val) = split(/=/);
my ($avail, $avail_old) = split(/:/, $avail_val);
my $disabled = 0;
- if ($avail == -1) {
+ if ($avail == -1) {
$disabled = 1;
$avail = 0;
}
@@ -295,7 +295,7 @@ sub get_autoconf_deps() {
if (defined $avail_old) {
$ModInfo{$lib}{AvailOld} = $avail_old;
}
- # FIXME:
+ # FIXME:
if (($avail ne "0") && ($avail ne "1")) {
warning "Library $lib has invalid availability ".
"value <$avail> (check $AutoconfDepsFile).\n";
@@ -367,13 +367,13 @@ sub gen_makedeps() {
my $mod = $ModInfo{$mod_name};
my @deps = ();
- # if we have Depend or Use, put their values into
+ # if we have Depend or Use, put their values into
# @deps . If we have none, move on.
push @deps, @{$mod->{Depend}} if (exists $mod->{Depend});
push @deps, @{$mod->{Use}} if (exists $mod->{Use});
- next unless @deps;
+ next unless @deps;
- # TODO: don't print dependencies that are not external libs.
+ # TODO: don't print dependencies that are not external libs.
# Not done yet until I figure out if this is safe.
my $dep = join(' ', @deps);
print MAKEDEPSS "MENUSELECT_DEPENDS_".$mod->{Module}."=$dep\n";
@@ -420,7 +420,7 @@ sub apply_random_drop() {
}
close MODS_LIST;
-
+
}
@@ -442,7 +442,7 @@ sub check_required_patterns() {
die("Missing dependencies for the following modules: $failed_str\n");
}
-# Disable building for modules that were marked in the embedded module
+# Disable building for modules that were marked in the embedded module
# information as disabled for building by default.
sub apply_default_enabled() {
foreach my $mod (keys %ModInfo) {
@@ -529,7 +529,7 @@ sub resolve_deps() {
}
}
-# generate menuselect.makeopts.
+# generate menuselect.makeopts.
# The values in this file obey to different semantics:
# 1. For modules, a module will be built unles listed here
# 2. For XML values (sounds, CFLAGS) it will be enabled if listed here
@@ -570,7 +570,7 @@ sub check_dependencies() {
parse_menuselect_xml_file('build_tools/cflags.xml');
if ($ConfigureOpts{AST_DEVMODE} eq 'yes') {
parse_menuselect_xml_file('build_tools/cflags-devmode.xml');
- }
+ }
parse_menuselect_xml_file('sounds/sounds.xml');
apply_random_drop();
@@ -590,7 +590,7 @@ sub check_dependencies() {
gen_makeopts();
}
-#
+#
# The main program start here
#
@@ -606,7 +606,7 @@ sub read_dump() {
my ($var, $value) = split /: /, $_, 2;
$item{$var} = $value;
}
- # FIXME: dependencies are a list. This should not be a
+ # FIXME: dependencies are a list. This should not be a
# special case.
if (exists $item{Depend}) {
$item{Depend} = [split /\s*,\s*/,$item{Depend}];
@@ -631,7 +631,7 @@ sub fail_reason($) {
return "Missing dependencies";
}
} elsif ($item->{Type} eq 'module') {
- if (exists ($item->{Defaultenabled}) &&
+ if (exists ($item->{Defaultenabled}) &&
$item->{Defaultenabled} =~ /^n/) {
return "Disabled";
} else {
diff --git a/menuselect/linkedlists.h b/menuselect/linkedlists.h
index 02c23a028..4727ef0b5 100644
--- a/menuselect/linkedlists.h
+++ b/menuselect/linkedlists.h
@@ -98,7 +98,7 @@ struct name { \
struct { \
struct type *next; \
}
-
+
/*!
\brief Returns the first entry contained in a list.
\param head This is a pointer to the list head structure
diff --git a/menuselect/make_version b/menuselect/make_version
index c6bef89ff..43e177753 100755
--- a/menuselect/make_version
+++ b/menuselect/make_version
@@ -8,15 +8,15 @@ elif [ -d .svn ]; then
PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/menuselect/::' | sed -e 's:/: :g'`
BRANCH=0
TEAM=0
-
+
REV=`svnversion -c ${1} | cut -d: -f2`
-
+
if [ "${PARTS}" = "trunk" ]
then
echo SVN-'trunk'-r${REV}
exit 0
fi
-
+
for PART in $PARTS
do
if [ ${BRANCH} != 0 ]
@@ -24,33 +24,33 @@ elif [ -d .svn ]; then
RESULT="${RESULT}-${PART}"
break
fi
-
+
if [ ${TEAM} != 0 ]
then
RESULT="${RESULT}-${PART}"
continue
fi
-
+
if [ "${PART}" = "branches" ]
then
BRANCH=1
RESULT="branch"
continue
fi
-
+
if [ "${PART}" = "tags" ]
then
BRANCH=1
RESULT="tag"
continue
fi
-
+
if [ "${PART}" = "team" ]
then
TEAM=1
continue
fi
done
-
+
echo SVN-${RESULT##-}-r${REV}
fi
diff --git a/menuselect/makeopts.in b/menuselect/makeopts.in
index d1ddcfdcd..495555d6b 100644
--- a/menuselect/makeopts.in
+++ b/menuselect/makeopts.in
@@ -23,4 +23,3 @@ NEWT_LIB=@NEWT_LIB@
LIBXML2_INCLUDE=@LIBXML2_INCLUDE@
LIBXML2_LIB=@LIBXML2_LIB@
-
diff --git a/menuselect/menuselect_curses.c b/menuselect/menuselect_curses.c
index 260cf69a7..97f1f1714 100644
--- a/menuselect/menuselect_curses.c
+++ b/menuselect/menuselect_curses.c
@@ -20,7 +20,7 @@
* \file
*
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \brief curses frontend for selection maintenance
*/
@@ -291,7 +291,7 @@ static void draw_category_menu(WINDOW *menu, struct category *cat, int start, in
char buf[64];
if (!changed) {
- /* If all we have to do is move the cursor,
+ /* If all we have to do is move the cursor,
* then don't clear the screen and start over */
AST_LIST_TRAVERSE(&cat->members, mem, list) {
i++;
@@ -327,7 +327,7 @@ static void draw_category_menu(WINDOW *menu, struct category *cat, int start, in
snprintf(buf, sizeof(buf), "[%s] %s", mem->enabled ? "*" : " ", mem->name);
}
waddstr(menu, buf);
-
+
if (curopt + 1 == i)
display_mem_info(menu, mem, start, end);
@@ -467,7 +467,7 @@ static int run_category_menu(WINDOW *menu, int cat_num)
set_all(cat, 1);
changed = 1;
default:
- break;
+ break;
}
if (c == 'x' || c == 'X' || c == 'Q' || c == 'q')
break;
@@ -533,13 +533,13 @@ int run_menu(void)
refresh();
maxopt = count_categories() - 1;
-
+
/* We have two windows - the title window at the top, and the menu window gets the rest */
title = newwin(TITLE_HEIGHT, max_x, 0, 0);
menu = newwin(max_y - TITLE_HEIGHT, max_x, TITLE_HEIGHT, 0);
- draw_title_window(title);
+ draw_title_window(title);
draw_main_menu(menu, curopt);
-
+
while ((c = getch())) {
switch (c) {
case KEY_UP:
@@ -571,7 +571,7 @@ int run_menu(void)
play_space();
draw_title_window(title);
default:
- break;
+ break;
}
if (c == 'q' || c == 'Q' || c == 27 || c == 3) {
if (changes_made) {
@@ -586,7 +586,7 @@ int run_menu(void)
}
}
if (c == 'x' || c == 'X' || c == 's' || c == 'S')
- break;
+ break;
draw_main_menu(menu, curopt);
}
@@ -729,7 +729,7 @@ static int repaint_screen(void)
wmove(stdscr, cur->oy, cur->ox);
waddch(stdscr, ' ');
wmove(stdscr, cur->y, cur->x);
- waddch(stdscr, type2chtype(cur->type));
+ waddch(stdscr, type2chtype(cur->type));
cur->ox = cur->x;
cur->oy = cur->y;
}
@@ -746,7 +746,7 @@ static int tank_move_left(void)
{
if (tank->x > 0)
tank->x--;
-
+
return 0;
}
diff --git a/menuselect/menuselect_gtk.c b/menuselect/menuselect_gtk.c
index 9379d7de6..4f0360913 100644
--- a/menuselect/menuselect_gtk.c
+++ b/menuselect/menuselect_gtk.c
@@ -208,7 +208,7 @@ static GtkWidget *get_menubar_menu(GtkWidget *window)
/* This function generates the menu items. Pass the item factory,
the number of items in the array, the array itself, and any
- callback data for the the menu items. */
+ callback data for the menu items. */
gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL);
/* Attach the new accelerator group to the window. */
@@ -232,13 +232,13 @@ int run_menu(void)
GtkWidget *menubar;
gtk_init(&argc, &argv);
-
+
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_size_request(window, 640, 480);
gtk_window_set_title(GTK_WINDOW(window), "GMenuselect");
main_vbox = gtk_vbox_new(FALSE, 1);
- gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 1);
+ gtk_container_set_border_width(GTK_CONTAINER(main_vbox), 1);
gtk_container_add(GTK_CONTAINER(window), main_vbox);
menubar = get_menubar_menu(window);
@@ -347,7 +347,7 @@ int run_menu(void)
column = gtk_tree_view_column_new_with_attributes("Conflicts With",
renderer, "text", COLUMN_CNFS, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
-
+
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes("Description",
renderer, "text", COLUMN_DESC, NULL);
@@ -360,7 +360,7 @@ int run_menu(void)
gtk_box_pack_end(GTK_BOX(main_vbox), s_window, TRUE, TRUE, 0);
gtk_widget_show_all(window);
-
+
gtk_main();
return main_res;
diff --git a/menuselect/menuselect_stub.c b/menuselect/menuselect_stub.c
index 8d91c44da..29f731eac 100644
--- a/menuselect/menuselect_stub.c
+++ b/menuselect/menuselect_stub.c
@@ -20,7 +20,7 @@
* \file
*
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \brief Menu stub
*/
diff --git a/menuselect/strcompat.c b/menuselect/strcompat.c
index 81ce083de..c25609f4b 100644
--- a/menuselect/strcompat.c
+++ b/menuselect/strcompat.c
@@ -16,7 +16,7 @@
/*! \file
*
- * \brief Compatibility functions for strsep and strtoq missing on Solaris
+ * \brief Compatibility functions for strsep and strtoq missing on Solaris
*/
#include "autoconfig.h"
@@ -191,7 +191,7 @@ int vasprintf(char **strp, const char *fmt, va_list ap)
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
+#if !defined(HAVE_ASPRINTF) && !defined(__AST_DEBUG_MALLOC)
int asprintf(char **str, const char *fmt, ...)
{
va_list ap;
diff --git a/pbx/Makefile b/pbx/Makefile
index d1a401463..090789fb8 100644
--- a/pbx/Makefile
+++ b/pbx/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for PBX modules
#
# Copyright (C) 1999-2006, Digium, Inc.
diff --git a/pbx/ael/ael-test/ael-ntest12/extensions.ael b/pbx/ael/ael-test/ael-ntest12/extensions.ael
index 1e3183358..ab2263ec2 100644
--- a/pbx/ael/ael-test/ael-ntest12/extensions.ael
+++ b/pbx/ael/ael-test/ael-ntest12/extensions.ael
@@ -1,8 +1,8 @@
context test1
{
771 => {
- for( i=0;
- ${i} <= 3;
+ for( i=0;
+ ${i} <= 3;
i = ${i} + 1 )
NoOp(i is '${i}');
}
diff --git a/pbx/ael/ael-test/ael-ntest22/extensions.ael b/pbx/ael/ael-test/ael-ntest22/extensions.ael
index b787f4b03..f476bd532 100644
--- a/pbx/ael/ael-test/ael-ntest22/extensions.ael
+++ b/pbx/ael/ael-test/ael-ntest22/extensions.ael
@@ -1,6 +1,6 @@
#include "t1/*.ael"
-context z
+context z
{
123 => NoOp(hi there, z);
124 => NoOp(hi there, z);
diff --git a/pbx/ael/ael-test/ael-ntest22/t2/f.ael b/pbx/ael/ael-test/ael-ntest22/t2/f.ael
index ba15a6389..e47698ed5 100644
--- a/pbx/ael/ael-test/ael-ntest22/t2/f.ael
+++ b/pbx/ael/ael-test/ael-ntest22/t2/f.ael
@@ -6,4 +6,3 @@ context f
}
#include "t3/*.ael"
-
diff --git a/pbx/ael/ael-test/ael-ntest23/t2/f.ael b/pbx/ael/ael-test/ael-ntest23/t2/f.ael
index ba15a6389..e47698ed5 100644
--- a/pbx/ael/ael-test/ael-ntest23/t2/f.ael
+++ b/pbx/ael/ael-test/ael-ntest23/t2/f.ael
@@ -6,4 +6,3 @@ context f
}
#include "t3/*.ael"
-
diff --git a/pbx/ael/ael-test/ael-ntest24/extensions.ael b/pbx/ael/ael-test/ael-ntest24/extensions.ael
index ea14aff6e..a428ed7ea 100644
--- a/pbx/ael/ael-test/ael-ntest24/extensions.ael
+++ b/pbx/ael/ael-test/ael-ntest24/extensions.ael
@@ -23,5 +23,3 @@ _X. => {
}
}
}
-
-
diff --git a/pbx/ael/ael-test/ael-ntest9/extensions.ael b/pbx/ael/ael-test/ael-ntest9/extensions.ael
index b9762ed54..d4c07b4ff 100755
--- a/pbx/ael/ael-test/ael-ntest9/extensions.ael
+++ b/pbx/ael/ael-test/ael-ntest9/extensions.ael
@@ -9,4 +9,3 @@ context workext {
Verbose(2|${query}) ;
}
}
-
diff --git a/pbx/ael/ael-test/ael-test1/extensions.ael b/pbx/ael/ael-test/ael-test1/extensions.ael
index e1943f67c..b41d75085 100644
--- a/pbx/ael/ael-test/ael-test1/extensions.ael
+++ b/pbx/ael/ael-test/ael-test1/extensions.ael
@@ -66,7 +66,7 @@ context testloop {
includes {
other|16:00-23:59|m0n-fri|*|*;
};
-
+
1 => {
for (x=0; ${x} < 3; x=${x} + 1) {
Verbose(x is ${x} !);
@@ -93,9 +93,9 @@ context testloop {
return;
y=${y}-1;
};
- };
+ };
regexten hint(nasty/Thingy&nasty/Thingamabob) 3 => {
- for (x=0; ${x} < 3; x=${x} + 1)
+ for (x=0; ${x} < 3; x=${x} + 1)
{
Verbose(x is ${x} !);
if( ${x} = 4 )
@@ -106,7 +106,7 @@ context testloop {
return;
y=10;
- while (${y} >= 0)
+ while (${y} >= 0)
{
Verbose(y is ${y} !);
if( ${y} = 4 )
@@ -118,10 +118,10 @@ context testloop {
y=${y}-1;
};
};
- };
+ };
4 => {
y=10;
- while (${y} >= 0)
+ while (${y} >= 0)
{
Verbose(y is ${y} !);
if( ${y} = 4 )
@@ -130,7 +130,7 @@ context testloop {
continue;
if( ${y} = 6 )
return;
- for (x=0; ${x} < 3; x=${x} + 1)
+ for (x=0; ${x} < 3; x=${x} + 1)
{
Verbose(x is ${x} !);
if( ${x} = 4 )
@@ -139,7 +139,7 @@ context testloop {
continue;
if( ${x} = 6 )
return;
- for (z=0; ${z} < 17; z=${z} + 1)
+ for (z=0; ${z} < 17; z=${z} + 1)
{
Verbose(z is ${z} !);
Verbose(z is ${z} !);
@@ -152,11 +152,11 @@ context testloop {
Verbose(z is ${z} !);
Verbose(z is ${z} !);
};
-
+
};
y=${y}-1;
};
- };
+ };
5 => {
&exten-gen(axel,brain);
};
diff --git a/pbx/ael/ael-test/ael-test11/extensions.ael b/pbx/ael/ael-test/ael-test11/extensions.ael
index a6b2226f8..e5461b702 100644
--- a/pbx/ael/ael-test/ael-test11/extensions.ael
+++ b/pbx/ael/ael-test/ael-test11/extensions.ael
@@ -1,6 +1,6 @@
context test1
{
- s =>
+ s =>
{
goto lab1;
if( ${testnotnull} )
diff --git a/pbx/ael/ael-test/ael-test16/extensions.ael b/pbx/ael/ael-test/ael-test16/extensions.ael
index 5f3b2e4e9..69774adcc 100644
--- a/pbx/ael/ael-test/ael-test16/extensions.ael
+++ b/pbx/ael/ael-test/ael-test16/extensions.ael
@@ -1,4 +1,3 @@
context real-small {
}
-
diff --git a/pbx/ael/ael-test/ael-test18/extensions.ael b/pbx/ael/ael-test/ael-test18/extensions.ael
index ee03d5909..c1ea6a1ff 100644
--- a/pbx/ael/ael-test/ael-test18/extensions.ael
+++ b/pbx/ael/ael-test/ael-test18/extensions.ael
@@ -37,4 +37,3 @@ context default
};
}
-
diff --git a/pbx/ael/ael-test/ael-test19/extensions.ael b/pbx/ael/ael-test/ael-test19/extensions.ael
index 07af91482..8e42a9844 100644
--- a/pbx/ael/ael-test/ael-test19/extensions.ael
+++ b/pbx/ael/ael-test/ael-test19/extensions.ael
@@ -1,12 +1,12 @@
context dialextens
{
- /*
+ /*
101 thru 123, 149 thru 152
*/
_10X => Dial(Zap/${EXTEN:2},30,Ttw);
_1ZX => Dial(Zap/${EXTEN:1},30,Ttw);
}
-/*
+/*
Due to extenal wiring:
dialing 125 will ring 101
@@ -183,7 +183,7 @@ macro funcC(a,b)
goto y,lab1;
catch y
{ lab1:
- &funcB(${a},${b});
+ &funcB(${a},${b});
}
}
@@ -196,7 +196,7 @@ macro funcB(a,b)
goto z,lab2;
catch z
{ lab2:
- &funcC(${a},${b});
+ &funcC(${a},${b});
}
}
@@ -236,7 +236,7 @@ context extension
Verbose(Finished 100000 levels deep call!);
}
83 => {
- switch (${EXTEN})
+ switch (${EXTEN})
{
pattern 8X:
Verbose(do something to prepare it);
@@ -288,7 +288,7 @@ context extension
Verbose(ChannelOnly=${ChannelOnly}; neat huh?);
Set(ChannelOnly=${CUT(CHANNEL,,1)});
Verbose(ChannelOnly=${ChannelOnly}; neat huh?);
- }
+ }
873 => {
NOOP(this is a forkcdr test);
Set(CALLERID(num)=1234567890);
diff --git a/pbx/ael/ael-test/ael-test2/extensions.ael b/pbx/ael/ael-test/ael-test2/extensions.ael
index 176338872..074ff9e0b 100644
--- a/pbx/ael/ael-test/ael-test2/extensions.ael
+++ b/pbx/ael/ael-test/ael-test2/extensions.ael
@@ -1,8 +1,7 @@
context test1
{
- s =>
+ s =>
{
#include "apptest.ael2";
}
}
-
diff --git a/pbx/ael/ael-test/ael-test20/extensions.ael b/pbx/ael/ael-test/ael-test20/extensions.ael
index 8ec219864..2265aaced 100644
--- a/pbx/ael/ael-test/ael-test20/extensions.ael
+++ b/pbx/ael/ael-test/ael-test20/extensions.ael
@@ -5,4 +5,3 @@ context interesting {
}
13 => NoOp(LuckyNumber!);
}
-
diff --git a/pbx/ael/ael-test/ael-test3/extensions.ael b/pbx/ael/ael-test/ael-test3/extensions.ael
index ff1f6aea5..95492116b 100755
--- a/pbx/ael/ael-test/ael-test3/extensions.ael
+++ b/pbx/ael/ael-test/ael-test3/extensions.ael
@@ -11,11 +11,11 @@ globals
FWDVMBOX=1 ; // the VM box for this user
}
-macro std-exten( ext , dev )
+macro std-exten( ext , dev )
{
Dial(${dev}/${ext},20);
goto privacyManagerFailed|s|begin;
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case BUSY:
Voicemail(b${ext});
@@ -33,11 +33,11 @@ macro std-exten( ext , dev )
}
}
-macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -59,11 +59,11 @@ macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -85,11 +85,11 @@ macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -111,11 +111,11 @@ macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -137,11 +137,11 @@ macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -163,11 +163,11 @@ macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -189,11 +189,11 @@ macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -215,11 +215,11 @@ macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -241,11 +241,11 @@ macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -267,11 +267,11 @@ macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -293,11 +293,11 @@ macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -319,11 +319,11 @@ macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -345,11 +345,11 @@ macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -371,11 +371,11 @@ macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -397,11 +397,11 @@ macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -423,11 +423,11 @@ macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -449,11 +449,11 @@ macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -475,11 +475,11 @@ macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -501,11 +501,11 @@ macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -527,11 +527,11 @@ macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -553,11 +553,11 @@ macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -579,11 +579,11 @@ macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -605,11 +605,11 @@ macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -631,11 +631,11 @@ macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -657,11 +657,11 @@ macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -683,11 +683,11 @@ macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -709,11 +709,11 @@ macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -735,11 +735,11 @@ macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -761,11 +761,11 @@ macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -787,11 +787,11 @@ macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -813,11 +813,11 @@ macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -839,11 +839,11 @@ macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -865,11 +865,11 @@ macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -891,11 +891,11 @@ macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -917,11 +917,11 @@ macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -943,11 +943,11 @@ macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -969,11 +969,11 @@ macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -995,11 +995,11 @@ macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1021,11 +1021,11 @@ macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1047,11 +1047,11 @@ macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1073,11 +1073,11 @@ macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1099,11 +1099,11 @@ macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1125,11 +1125,11 @@ macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1151,11 +1151,11 @@ macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1177,11 +1177,11 @@ macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1203,11 +1203,11 @@ macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1229,11 +1229,11 @@ macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1255,11 +1255,11 @@ macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1281,11 +1281,11 @@ macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1307,11 +1307,11 @@ macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1333,11 +1333,11 @@ macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1359,11 +1359,11 @@ macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1385,11 +1385,11 @@ macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1411,11 +1411,11 @@ macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1437,11 +1437,11 @@ macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1463,11 +1463,11 @@ macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1489,11 +1489,11 @@ macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1515,11 +1515,11 @@ macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1541,11 +1541,11 @@ macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1567,11 +1567,11 @@ macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1593,11 +1593,11 @@ macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1619,11 +1619,11 @@ macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1645,11 +1645,11 @@ macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1671,11 +1671,11 @@ macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1697,11 +1697,11 @@ macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1723,11 +1723,11 @@ macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1749,11 +1749,11 @@ macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1775,11 +1775,11 @@ macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1801,11 +1801,11 @@ macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1827,11 +1827,11 @@ macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1853,11 +1853,11 @@ macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1879,11 +1879,11 @@ macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1905,11 +1905,11 @@ macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1931,11 +1931,11 @@ macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1963,33 +1963,33 @@ macro fillcidname()
Set(cidn=${DB(cidname/${CALLERID(num)})});
if( "${CALLERID(name)}" != "" )
{
- if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database,
+ if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database,
// or if an entry exists, and it's "Privacy Manager", empty, (or add other useless possibilities).
- {
+ {
Set(DB(cidname/${CALLERID(num)})=${CALLERID(name)}); // then set or override what's in the DB
}
}
// Now, we fill in the callerid info from the incoming entry, if it's stuff worth using
// Ignore fundamentally semi-anonymous information from local cell phones
// if the db has an entry for this number, and it's not a canned string from a cell phone company
- if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = ""
- | "${CALLERID(name)}" = "CODY,WY "
- | "${CALLERID(name)}" = "POWELL,WY "
- | "${CALLERID(name)}" = "WIRELESS CALLER"
- | "${CALLERID(name)}" = "SUBSCRIBER,WIRE"
- | "${CALLERID(name)}" = "CELLULAR ONE"
- | "${CALLERID(name)}" = "Cellular One Customer"
- | "${CALLERID(name)}" = "CELLULAR ONE "
- | "${CALLERID(name)}" = "Privacy Manager"
- | "${CALLERID(name)}" = "RIVERTON,WY "
- | "${CALLERID(name)}" = "BASIN,WY "
+ if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = ""
+ | "${CALLERID(name)}" = "CODY,WY "
+ | "${CALLERID(name)}" = "POWELL,WY "
+ | "${CALLERID(name)}" = "WIRELESS CALLER"
+ | "${CALLERID(name)}" = "SUBSCRIBER,WIRE"
+ | "${CALLERID(name)}" = "CELLULAR ONE"
+ | "${CALLERID(name)}" = "Cellular One Customer"
+ | "${CALLERID(name)}" = "CELLULAR ONE "
+ | "${CALLERID(name)}" = "Privacy Manager"
+ | "${CALLERID(name)}" = "RIVERTON,WY "
+ | "${CALLERID(name)}" = "BASIN,WY "
| "${CALLERID(name)}" = "BILLINGS,MT "
- | "${CALLERID(name)}" = "PROVO,UT "
- | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid,
+ | "${CALLERID(name)}" = "PROVO,UT "
+ | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid,
// that you would rather override with DB info
// there's no way to guess them all, but you can get the most popular ones...
// why cell phones can't do CID like everybody else, ....?
- {
+ {
Set(CALLERID(name)=${cidn}); // Override what the phone company provides with what's in the DB for this number.
}
}
@@ -2008,7 +2008,7 @@ macro ciddial(dialnum, lookup, waittime, dialopts, ddev)
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
{
BackGround(try_cell);
- CALLERID(num)=${cidnu}; // put the original number back
+ CALLERID(num)=${cidnu}; // put the original number back
Dial(Zap/2/${lookup},${waittime},${dialopts});
}
}
@@ -2036,7 +2036,7 @@ macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tc
Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts});
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
{
- Set(CALLERID(num)=${cidnu}); // put the original number back
+ Set(CALLERID(num)=${cidnu}); // put the original number back
BackGround(try_zap);
Dial(${ddev}/${dialnum},${waittime}|${dialopts});
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
@@ -2050,14 +2050,14 @@ macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tc
macro callerid-liar()
{
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&);
- Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their
+ Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their
// faces to get in the front door, and unidentified callers won't fair
// any better. You entered *MY* phone number. That won't work.
// If you are telemarketing, cross me off the list, and don't call again.
// If you did this by mistake, forgive my defenses, and call again.
// Alternate: (priv-liar2)
// Script: You have chosen to try to deceive my system and withold your CallerID,
- // by entering my own phone number as YOUR CallerID. I find this
+ // by entering my own phone number as YOUR CallerID. I find this
// offensive because you are being dishonest. I will not do business nor
// waste my time talking to anyone who is less than honest and forthcoming.
// Take me off your call list and do not call me again.
@@ -2074,7 +2074,7 @@ macro callerid-bad()
context privacyManagerFailed {
s => {
begin:
- Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit
+ Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit
// phone number, for a total of 10 digits, or you'll be handed over to the monkeys. Let's
// try this again, and hopefully you can get past our front-line defenses!
PrivacyManager();
@@ -2154,13 +2154,13 @@ context homeline {
}
}
loopback:
- ifTime(*|*|20-25|dec)
- {
- Playback(greetings/christmas);
+ ifTime(*|*|20-25|dec)
+ {
+ Playback(greetings/christmas);
}
- else ifTime(*|*|31|dec)
- {
- Playback(greetings/newyear);
+ else ifTime(*|*|31|dec)
+ {
+ Playback(greetings/newyear);
}
else ifTime(*|*|1|jan)
{
@@ -2170,15 +2170,15 @@ context homeline {
{
Playback(greetings/valentines);
}
- else ifTime(*|*|17|mar)
+ else ifTime(*|*|17|mar)
{
Playback(greetings/stPat);
}
- else ifTime(*|*|31|oct)
+ else ifTime(*|*|31|oct)
{
Playback(greetings/halloween);
}
- else ifTime(*|mon|15-21|jan)
+ else ifTime(*|mon|15-21|jan)
{
Playback(greetings/mlkDay);
}
@@ -2205,11 +2205,11 @@ context homeline {
else ifTime(*|sun|15-21|jun)
{
Playback(greetings/fathers);
- }
- else
+ }
+ else
{
Playback(greetings/hello); // None of the above? Just a plain hello will do
- }
+ }
Background(murphy-homeline-intro1); // Script: Hello-- Welcome to the Murphy's! If you already know what
// option you want, you don't have to wait for this entire spiel-- just
// have at it.
@@ -2220,7 +2220,7 @@ context homeline {
// to play with your introduction, dial 5.
// If we don't seem to be giving you the time of day, try 7.
// Have a good day!
-
+
}
1 => { // Sonya
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
@@ -2238,7 +2238,7 @@ context homeline {
&std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket);
goto s|loopback;
}
- 4 => { // Voicemail
+ 4 => { // Voicemail
VoicemailMain();
goto s|loopback;
}
@@ -2363,7 +2363,7 @@ context home-introduction-record {
begin:
Background(intro-record-choices); // Script:
// If you want some advice about recording your
- // introduction, dial 1.
+ // introduction, dial 1.
// otherwise, dial 2, and introduce yourself after
// the beep.
}
@@ -2374,10 +2374,10 @@ context home-introduction-record {
// This is NOT meant to be a voice mail message, so
// please, don't say anything about why you are calling.
// After we are done making the recording, your introduction
- // will be saved for playback.
- // If you are the only person that would call from this number,
+ // will be saved for playback.
+ // If you are the only person that would call from this number,
// please state your name. Otherwise, state your business
- // or residence name instead. For instance, if you are
+ // or residence name instead. For instance, if you are
// friend of the family, say, Olie McPherson, and both
// you and your kids might call here a lot, you might
// say: "This is the distinguished Olie McPherson Residence!"
@@ -2388,8 +2388,8 @@ context home-introduction-record {
// "John, from the Park County Morgue. You stab 'em, we slab 'em!".
// Just one caution: the kids will hear what you record every time
// you call. So watch your language!
- // I will begin recording after the tone.
- // When you are done, hit the # key. Gather your thoughts and get
+ // I will begin recording after the tone.
+ // When you are done, hit the # key. Gather your thoughts and get
// ready. Remember, the # key will end the recording, and play back
// your intro. Good Luck, and Thank you!"
goto 2|begin;
@@ -2432,7 +2432,7 @@ context homeline-kids {
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
Voicemail(u4);
goto homeline|s|loopback;
-
+
// SetMusicOnHold(erics);
// TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
// TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
@@ -2456,7 +2456,7 @@ context homeline-kids {
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&);
&std-priv-exten(Zap/3r2&Zap/5r2,7,35,mtw,telemarket,telemarket);
goto homeline|s|loopback;
-
+
}
6 => {
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
@@ -2519,12 +2519,12 @@ context workline {
1 => {
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&);
-
+
&std-priv-exten(Zap/6&Sip/murf,1,30,mtw,telemarket,telemarket);
- goto s|loopback;
+ goto s|loopback;
}
4 => {
- VoicemailMain();
+ VoicemailMain();
goto s|loopback;
}
6 => {
@@ -2543,7 +2543,7 @@ context workline {
Hangup();
}
i => {
- Background(invalid);
+ Background(invalid);
goto s|loopback;
}
o => {
@@ -2827,7 +2827,7 @@ context homeext {
Wait(2);
Playtones(info);
Wait(5);
- Hangup();
+ Hangup();
}
790 => {
MeetMe(790,p);
@@ -3180,5 +3180,3 @@ context announce-all {
// now include the telemarketer torture scripts!
#include "telemarket_torture.ael2"
-
-
diff --git a/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2 b/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2
index ebd8e9f2f..1f6ffed83 100755
--- a/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2
+++ b/pbx/ael/ael-test/ael-test3/telemarket_torture.ael2
@@ -16,7 +16,7 @@
// WORSE DESIGN: Instead of using the Background application, the Playback
// application is used. After taking so much time and trouble
-// to record this material, the caller must listen and enjoy
+// to record this material, the caller must listen and enjoy
// every syllable before they can make an option choice. None
// of that interrupting with a choice. We want them to savour
// every word!
@@ -29,18 +29,18 @@
context telemarket {
s => {
begin:
- Playback(telemarketer-intro); // ; Script:
+ Playback(telemarketer-intro); // ; Script:
// Due to the extremely high volume of calls from everything from telemarketers
// to Septic System Bacteria vendors, we are asking all such organizations
// to remove this number from their call list, or as need be, to add this
- // number to their No-Call list, whichever is relevent.
+ // number to their No-Call list, whichever is relevent.
// [THE CARROT:]
// We HAVE made some exceptions, and if you wish to see if your organization
// has been exempted, please listen to and follow the following prompts.
- //
+ //
// Otherwise, please Cease calling this number!
- //
+ //
Playback(telemarketer-choices);
// if you represent a charitable organization, please dial 1,
// if you represent a political organization, please dial 2.
@@ -70,22 +70,22 @@ context telemarket-charity {
// have sold our name and phone number to each other until we are now hounded
// day and night by literally hundreds of such organizations.
// Enough is Enough!
- //
- // If we have contributed to your cause in the past, we may, perhaps, be disposed to
+ //
+ // If we have contributed to your cause in the past, we may, perhaps, be disposed to
// do so in the future, at our option,
// we give no pledges nor make any commitments here.
// Send us material via the post if you feel this necessary
// but do not even consider email. Any email or further phone calls from your organization
- // in the future, will be considered an act of aggression, and we will
+ // in the future, will be considered an act of aggression, and we will
// blacklist your organization for the rest of our natural lives.
- //
+ //
// To see if your organization is exempt from these prohibitions, please
// comply with the following options.
Playback(telemark-charity-choices);
// If your organization is disease or genetic defect related, dial 1,
// If your organization is handicap related, dial 2.
// If your organization is a police or fireman or other similar support entity, please dial 3.
- // If your organization is a grade school to high school related
+ // If your organization is a grade school to high school related
// fund raiser or other type of activity, please dial 4.
// If your organization is a college or univerity or alumnis organization, please dial 5.
// If your organization is animal rights or ecology related organization, please dial 6.
@@ -176,7 +176,7 @@ context telemarket-char-other {
context telemarket-sorry {
s => {
begin:
- Playback(telemarket-sorry);
+ Playback(telemarket-sorry);
// Sorry -- your organization is not exempt. Please stop calling us.
// Thank you. goodbye.
Hangup();
@@ -190,7 +190,7 @@ context telemarket-exception {
s => {
begin:
Playback(telemarket-success);
- // Congratulations. Your organization IS exempt. Please call us back,
+ // Congratulations. Your organization IS exempt. Please call us back,
// but this time, just act like a normal caller. Thank you. Goodbye.
Hangup();
}
@@ -244,7 +244,7 @@ context telemarket-political2 {
Playback(telemark-politx-intro);
// Thank you for your patience, and I congratulate you for your persistence.
// Just a few more options!
- //
+ //
Playback(telemark-polit2-choices);
// if You represent the Communist Party USA, dial 1.
// if You represent the Constitution Party, dial 2.
@@ -644,7 +644,7 @@ context telemarket-pollster {
s => {
begin:
Playback(telemark-poll-intro);
- // I'm sorry-- We are just not available for doing any polling at the moment. So,
+ // I'm sorry-- We are just not available for doing any polling at the moment. So,
// please remove us from your list.
goto telemarket-sorry|s|begin;
}
@@ -660,7 +660,7 @@ context telemarket-research {
Playback(telemark-research-intro);
// I'd like to say I'd love to help you with your market survey, but that would be a complete
// and total lie. I am not interested in helping you with Market Surveys.
- //
+ //
// Please remove me from your call list. It just doesn't pay enough. But Thank you.
goto telemarket-sorry|s|begin;
}
@@ -674,12 +674,12 @@ context telemarket-magazine {
s => {
begin:
Playback(telemark-mag-choices);
- // If you are calling to see if I would like a NEW free subscription
+ // If you are calling to see if I would like a NEW free subscription
// to your magazine or newsletter, please dial 1.
// If you are calling to see if I want to Renew an existing subscription, please dial 2.
// If you are representing some publisher, and want my opinion about something, or are doing
// some kind of survey, please dial 3.
- // If you are calling to verify that some previous caller actually called me, and the
+ // If you are calling to verify that some previous caller actually called me, and the
// verification information is correct, please dial 4.
// and if your call purpose doesn't match any of the above, please dial 5.
}
@@ -698,8 +698,8 @@ context telemark-mag-new {
s => {
begin:
Playback(telemark-mag-new);
- // I'm sorry, I'm maxed out, and the answer is NO.
- // If you really think I'd LOVE to add your publication to the pile I already get,
+ // I'm sorry, I'm maxed out, and the answer is NO.
+ // If you really think I'd LOVE to add your publication to the pile I already get,
// Send something via the post. Don't call me.
// Thank you. bye.
Hangup();
@@ -715,9 +715,9 @@ context telemark-mag-renew {
begin:
Playback(telemark-mag-renew);
// So, you want to see if I want to Renew, do you? The answer is most likely "YES".
- //
- // But, I will not answer a long list of questions over the phone. Send such
- // categorization info via the post, and stop bothering me over the phone,
+ //
+ // But, I will not answer a long list of questions over the phone. Send such
+ // categorization info via the post, and stop bothering me over the phone,
// if this is what you want.
// Do you need verification information? Normally I opt out of such nonsense, if possible.
// If not, use whatever of the following you can:
@@ -752,7 +752,7 @@ context telemark-mag-verify {
begin:
Playback(telemark-mag-verify);
// If you are calling to verify that your own agents aren't ripping you off,
- // sorry, I can't help you. I opt out whenever I can, mainly because I'm not
+ // sorry, I can't help you. I opt out whenever I can, mainly because I'm not
// paid enough for this kind of thing. I always lie, and I can't remember
// what I might have said. Sorry. Goodbye.
Hangup();
@@ -785,7 +785,7 @@ context telemarket-commercial {
begin:
Playback(telemark-comm-intro); // Script: Please leave your name, organization, and phone number, plus
// a short description of the purpose of your call, at the prompt.
- // We will do our best to respond to your call! And, in the mean time,
+ // We will do our best to respond to your call! And, in the mean time,
// do not forget to add us to your no-call list!
Voicemail(u82);
goto telemarket-sorry|s|begin;
@@ -801,7 +801,7 @@ context telemarket-other {
begin:
Playback(telemark-other-intro);
// Please review the previous menu options, and see if you really don't
- // fit in one of the previous categories.
+ // fit in one of the previous categories.
// If you do not, go ahead, and call me again, and let me know what category
// I should have included in the above list. I appreciate this. Thank you much!
Hangup();
diff --git a/pbx/ael/ael-test/ael-test4/extensions.ael b/pbx/ael/ael-test/ael-test4/extensions.ael
index 838aa2489..29868d840 100644
--- a/pbx/ael/ael-test/ael-test4/extensions.ael
+++ b/pbx/ael/ael-test/ael-test4/extensions.ael
@@ -1,8 +1,7 @@
context test1
{
- test2 =>
+ test2 =>
{
#include "apptest.ael2";
}
}
-
diff --git a/pbx/ael/ael-test/ael-test7/extensions.ael b/pbx/ael/ael-test/ael-test7/extensions.ael
index 27ed374f5..e951bf29a 100644
--- a/pbx/ael/ael-test/ael-test7/extensions.ael
+++ b/pbx/ael/ael-test/ael-test7/extensions.ael
@@ -63,7 +63,7 @@ macro checkanddial(prov,proto,ext,arg1,arg2,arg3,arg4) {
if(${DB_EXISTS(Provider/${prov}/used)})
Set(MINUTES_USED=${DB_RESULT});
-
+
country_c = 0;
switch(${LEN(${ext})}) { //assuming all international numbers are 11 digits long.
case 10: //NXXNXXXXXX
@@ -76,7 +76,7 @@ macro checkanddial(prov,proto,ext,arg1,arg2,arg3,arg4) {
country_c = ${ext:3:1};
break;
};
-
+
if("${prov}" = "${TRUNK}" & ${country_c} != 1) { // SunRocket international calls
Set(MINUTES_LIMIT=${DB(Provider/${prov}/limit)});
&announce_minutes($[${MINUTES_LIMIT} - ${MINUTES_USED}]);
@@ -258,7 +258,7 @@ context outbound {
_012. => { //fwdOUT
Set(CALLERID(name)=Central NJ);
Dial(IAX2/14301@fwdOUT/q${EXTEN:3},60,T);
- };
+ };
_013X. => { //NECC
Dial(${PSTNPROTO}/011${EXTEN:3}@${PSTN},60,T);
};
@@ -339,7 +339,7 @@ context tario.net-in {
} else if("${SIP_HEADER(To)}" = "<sip:2271653@sipnet.ru>") {
jump 1@default;
} else
- jump 2@default;
+ jump 2@default;
};
};
@@ -457,4 +457,3 @@ instructions:
t => jump #;
i => Playback(invalid);
};
-
diff --git a/pbx/ael/ael-test/ael-test8/extensions.ael b/pbx/ael/ael-test/ael-test8/extensions.ael
index 17bc74e6f..290444aaa 100644
--- a/pbx/ael/ael-test/ael-test8/extensions.ael
+++ b/pbx/ael/ael-test/ael-test8/extensions.ael
@@ -24,4 +24,3 @@ context default
};
}
-
diff --git a/pbx/ael/ael-test/ael-vtest13/extensions.ael b/pbx/ael/ael-test/ael-vtest13/extensions.ael
index b7e953e62..2d2ec12ca 100755
--- a/pbx/ael/ael-test/ael-vtest13/extensions.ael
+++ b/pbx/ael/ael-test/ael-vtest13/extensions.ael
@@ -11,10 +11,10 @@ globals
FWDVMBOX=1 ; // the VM box for this user
}
-macro std-exten( ext , dev )
+macro std-exten( ext , dev )
{
Dial(${dev}/${ext},20);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case BUSY:
Voicemail(b${ext});
@@ -32,11 +32,11 @@ macro std-exten( ext , dev )
}
}
-macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -58,11 +58,11 @@ macro std-priv-exten_1( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -84,11 +84,11 @@ macro std-priv-exten_2( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -110,11 +110,11 @@ macro std-priv-exten_3( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -136,11 +136,11 @@ macro std-priv-exten_4( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -162,11 +162,11 @@ macro std-priv-exten_5( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -188,11 +188,11 @@ macro std-priv-exten_6( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -214,11 +214,11 @@ macro std-priv-exten_7( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -240,11 +240,11 @@ macro std-priv-exten_8( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -266,11 +266,11 @@ macro std-priv-exten_9( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -292,11 +292,11 @@ macro std-priv-exten_10( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -318,11 +318,11 @@ macro std-priv-exten_11( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -344,11 +344,11 @@ macro std-priv-exten_12( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -370,11 +370,11 @@ macro std-priv-exten_13( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -396,11 +396,11 @@ macro std-priv-exten_14( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -422,11 +422,11 @@ macro std-priv-exten_15( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -448,11 +448,11 @@ macro std-priv-exten_16( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -474,11 +474,11 @@ macro std-priv-exten_17( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -500,11 +500,11 @@ macro std-priv-exten_18( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -526,11 +526,11 @@ macro std-priv-exten_19( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -552,11 +552,11 @@ macro std-priv-exten_20( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -578,11 +578,11 @@ macro std-priv-exten_21( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -604,11 +604,11 @@ macro std-priv-exten_22( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -630,11 +630,11 @@ macro std-priv-exten_23( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -656,11 +656,11 @@ macro std-priv-exten_24( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -682,11 +682,11 @@ macro std-priv-exten_25( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -708,11 +708,11 @@ macro std-priv-exten_26( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -734,11 +734,11 @@ macro std-priv-exten_27( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -760,11 +760,11 @@ macro std-priv-exten_28( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -786,11 +786,11 @@ macro std-priv-exten_29( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -812,11 +812,11 @@ macro std-priv-exten_30( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -838,11 +838,11 @@ macro std-priv-exten_31( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -864,11 +864,11 @@ macro std-priv-exten_32( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -890,11 +890,11 @@ macro std-priv-exten_33( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -916,11 +916,11 @@ macro std-priv-exten_34( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -942,11 +942,11 @@ macro std-priv-exten_35( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -968,11 +968,11 @@ macro std-priv-exten_36( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -994,11 +994,11 @@ macro std-priv-exten_37( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1020,11 +1020,11 @@ macro std-priv-exten_38( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1046,11 +1046,11 @@ macro std-priv-exten_39( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1072,11 +1072,11 @@ macro std-priv-exten_40( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1098,11 +1098,11 @@ macro std-priv-exten_41( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1124,11 +1124,11 @@ macro std-priv-exten_42( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1150,11 +1150,11 @@ macro std-priv-exten_43( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1176,11 +1176,11 @@ macro std-priv-exten_44( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1202,11 +1202,11 @@ macro std-priv-exten_45( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1228,11 +1228,11 @@ macro std-priv-exten_46( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1254,11 +1254,11 @@ macro std-priv-exten_47( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1280,11 +1280,11 @@ macro std-priv-exten_48( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1306,11 +1306,11 @@ macro std-priv-exten_49( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1332,11 +1332,11 @@ macro std-priv-exten_50( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1358,11 +1358,11 @@ macro std-priv-exten_51( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1384,11 +1384,11 @@ macro std-priv-exten_52( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1410,11 +1410,11 @@ macro std-priv-exten_53( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1436,11 +1436,11 @@ macro std-priv-exten_54( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1462,11 +1462,11 @@ macro std-priv-exten_55( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1488,11 +1488,11 @@ macro std-priv-exten_56( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1514,11 +1514,11 @@ macro std-priv-exten_57( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1540,11 +1540,11 @@ macro std-priv-exten_58( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1566,11 +1566,11 @@ macro std-priv-exten_59( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1592,11 +1592,11 @@ macro std-priv-exten_60( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1618,11 +1618,11 @@ macro std-priv-exten_61( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1644,11 +1644,11 @@ macro std-priv-exten_62( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1670,11 +1670,11 @@ macro std-priv-exten_63( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1696,11 +1696,11 @@ macro std-priv-exten_64( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1722,11 +1722,11 @@ macro std-priv-exten_65( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1748,11 +1748,11 @@ macro std-priv-exten_66( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1774,11 +1774,11 @@ macro std-priv-exten_67( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1800,11 +1800,11 @@ macro std-priv-exten_68( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1826,11 +1826,11 @@ macro std-priv-exten_69( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1852,11 +1852,11 @@ macro std-priv-exten_70( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1878,11 +1878,11 @@ macro std-priv-exten_71( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1904,11 +1904,11 @@ macro std-priv-exten_72( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1930,11 +1930,11 @@ macro std-priv-exten_73( dev, ext , timeout, opts, torcont, dontcont )
}
-macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont )
+macro std-priv-exten( dev, ext , timeout, opts, torcont, dontcont )
{
Dial(${dev},${timeout},${opts});
NoOp(${DIALSTATUS} was chosen);
- switch(${DIALSTATUS})
+ switch(${DIALSTATUS})
{
case TORTURE:
goto ${torcont}|s|begin;
@@ -1962,33 +1962,33 @@ macro fillcidname()
Set(cidn=${DB(cidname/${CALLERID(num)})});
if( "${CALLERID(name)}" != "" )
{
- if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database,
+ if( ("${cidn}" = "Privacy Manager" & "${CALLERID(name)}" != "Privacy Manager") | "${cidn}" = "" ) // if the entry isn't in the database,
// or if an entry exists, and it's "Privacy Manager", empty, (or add other useless possibilities).
- {
+ {
Set(DB(cidname/${CALLERID(num)})=${CALLERID(name)}); // then set or override what's in the DB
}
}
// Now, we fill in the callerid info from the incoming entry, if it's stuff worth using
// Ignore fundamentally semi-anonymous information from local cell phones
// if the db has an entry for this number, and it's not a canned string from a cell phone company
- if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = ""
- | "${CALLERID(name)}" = "CODY,WY "
- | "${CALLERID(name)}" = "POWELL,WY "
- | "${CALLERID(name)}" = "WIRELESS CALLER"
- | "${CALLERID(name)}" = "SUBSCRIBER,WIRE"
- | "${CALLERID(name)}" = "CELLULAR ONE"
- | "${CALLERID(name)}" = "Cellular One Customer"
- | "${CALLERID(name)}" = "CELLULAR ONE "
- | "${CALLERID(name)}" = "Privacy Manager"
- | "${CALLERID(name)}" = "RIVERTON,WY "
- | "${CALLERID(name)}" = "BASIN,WY "
+ if( ( "${cidn}" != "" ) & ( "${CALLERID(name)}" = ""
+ | "${CALLERID(name)}" = "CODY,WY "
+ | "${CALLERID(name)}" = "POWELL,WY "
+ | "${CALLERID(name)}" = "WIRELESS CALLER"
+ | "${CALLERID(name)}" = "SUBSCRIBER,WIRE"
+ | "${CALLERID(name)}" = "CELLULAR ONE"
+ | "${CALLERID(name)}" = "Cellular One Customer"
+ | "${CALLERID(name)}" = "CELLULAR ONE "
+ | "${CALLERID(name)}" = "Privacy Manager"
+ | "${CALLERID(name)}" = "RIVERTON,WY "
+ | "${CALLERID(name)}" = "BASIN,WY "
| "${CALLERID(name)}" = "BILLINGS,MT "
- | "${CALLERID(name)}" = "PROVO,UT "
- | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid,
+ | "${CALLERID(name)}" = "PROVO,UT "
+ | "${CALLERID(name)}" = "TOLL FREE " ) ) // put stuff in the above, that the phone company tends to put in your callerid,
// that you would rather override with DB info
// there's no way to guess them all, but you can get the most popular ones...
// why cell phones can't do CID like everybody else, ....?
- {
+ {
Set(CALLERID(name)=${cidn}); // Override what the phone company provides with what's in the DB for this number.
}
}
@@ -2007,7 +2007,7 @@ macro ciddial(dialnum, lookup, waittime, dialopts, ddev)
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
{
BackGround(try_cell);
- CALLERID(num)=${cidnu}; // put the original number back
+ CALLERID(num)=${cidnu}; // put the original number back
Dial(Zap/2/${lookup},${waittime},${dialopts});
}
}
@@ -2035,7 +2035,7 @@ macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tc
Dial(SIP/1${lookup}@tctwest,${waittime},${dialopts});
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
{
- Set(CALLERID(num)=${cidnu}); // put the original number back
+ Set(CALLERID(num)=${cidnu}); // put the original number back
BackGround(try_zap);
Dial(${ddev}/${dialnum},${waittime}|${dialopts});
if( "${DIALSTATUS}" = "CHANUNAVAIL" )
@@ -2049,14 +2049,14 @@ macro ciddial2(dialnum, lookup, waittime, dialopts, ddev) // give priority to tc
macro callerid-liar()
{
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/priv-callerintros/LIAR.gsm&);
- Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their
+ Background(priv-liar); // Script: OOOps! Sorry! I don't allow men with ski masks pulled over their
// faces to get in the front door, and unidentified callers won't fair
// any better. You entered *MY* phone number. That won't work.
// If you are telemarketing, cross me off the list, and don't call again.
// If you did this by mistake, forgive my defenses, and call again.
// Alternate: (priv-liar2)
// Script: You have chosen to try to deceive my system and withold your CallerID,
- // by entering my own phone number as YOUR CallerID. I find this
+ // by entering my own phone number as YOUR CallerID. I find this
// offensive because you are being dishonest. I will not do business nor
// waste my time talking to anyone who is less than honest and forthcoming.
// Take me off your call list and do not call me again.
@@ -2073,7 +2073,7 @@ macro callerid-bad()
context privacyManagerFailed {
s => {
begin:
- Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit
+ Background(PrivManInstructions); // Script: OOps, that didn't go well. You need to enter *your* area code, and *your* 7 digit
// phone number, for a total of 10 digits, or you'll be handed over to the monkeys. Let's
// try this again, and hopefully you can get past our front-line defenses!
PrivacyManager();
@@ -2153,13 +2153,13 @@ context homeline {
}
}
loopback:
- ifTime(*|*|20-25|dec)
- {
- Playback(greetings/christmas);
+ ifTime(*|*|20-25|dec)
+ {
+ Playback(greetings/christmas);
}
- else ifTime(*|*|31|dec)
- {
- Playback(greetings/newyear);
+ else ifTime(*|*|31|dec)
+ {
+ Playback(greetings/newyear);
}
else ifTime(*|*|1|jan)
{
@@ -2169,15 +2169,15 @@ context homeline {
{
Playback(greetings/valentines);
}
- else ifTime(*|*|17|mar)
+ else ifTime(*|*|17|mar)
{
Playback(greetings/stPat);
}
- else ifTime(*|*|31|oct)
+ else ifTime(*|*|31|oct)
{
Playback(greetings/halloween);
}
- else ifTime(*|mon|15-21|jan)
+ else ifTime(*|mon|15-21|jan)
{
Playback(greetings/mlkDay);
}
@@ -2204,11 +2204,11 @@ context homeline {
else ifTime(*|sun|15-21|jun)
{
Playback(greetings/fathers);
- }
- else
+ }
+ else
{
Playback(greetings/hello); // None of the above? Just a plain hello will do
- }
+ }
Background(murphy-homeline-intro1); // Script: Hello-- Welcome to the Murphy's! If you already know what
// option you want, you don't have to wait for this entire spiel-- just
// have at it.
@@ -2219,7 +2219,7 @@ context homeline {
// to play with your introduction, dial 5.
// If we don't seem to be giving you the time of day, try 7.
// Have a good day!
-
+
}
1 => { // Sonya
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
@@ -2237,7 +2237,7 @@ context homeline {
&std-priv-exten(Zap/6r3&Sip/murf,1,25,mpA(beep)tw,telemarket,telemarket);
goto s|loopback;
}
- 4 => { // Voicemail
+ 4 => { // Voicemail
VoicemailMain();
goto s|loopback;
}
@@ -2362,7 +2362,7 @@ context home-introduction-record {
begin:
Background(intro-record-choices); // Script:
// If you want some advice about recording your
- // introduction, dial 1.
+ // introduction, dial 1.
// otherwise, dial 2, and introduce yourself after
// the beep.
}
@@ -2373,10 +2373,10 @@ context home-introduction-record {
// This is NOT meant to be a voice mail message, so
// please, don't say anything about why you are calling.
// After we are done making the recording, your introduction
- // will be saved for playback.
- // If you are the only person that would call from this number,
+ // will be saved for playback.
+ // If you are the only person that would call from this number,
// please state your name. Otherwise, state your business
- // or residence name instead. For instance, if you are
+ // or residence name instead. For instance, if you are
// friend of the family, say, Olie McPherson, and both
// you and your kids might call here a lot, you might
// say: "This is the distinguished Olie McPherson Residence!"
@@ -2387,8 +2387,8 @@ context home-introduction-record {
// "John, from the Park County Morgue. You stab 'em, we slab 'em!".
// Just one caution: the kids will hear what you record every time
// you call. So watch your language!
- // I will begin recording after the tone.
- // When you are done, hit the # key. Gather your thoughts and get
+ // I will begin recording after the tone.
+ // When you are done, hit the # key. Gather your thoughts and get
// ready. Remember, the # key will end the recording, and play back
// your intro. Good Luck, and Thank you!"
goto 2|begin;
@@ -2431,7 +2431,7 @@ context homeline-kids {
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
Voicemail(u4);
goto homeline|s|loopback;
-
+
// SetMusicOnHold(erics);
// TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
// TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/4/greet.wav&);
@@ -2455,7 +2455,7 @@ context homeline-kids {
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/7/greet.wav&);
&std-priv-exten(Zap/3r2&Zap/5r2,7,35,mtw,telemarket,telemarket);
goto homeline|s|loopback;
-
+
}
6 => {
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
@@ -2518,12 +2518,12 @@ context workline {
1 => {
TrySystem(/usr/bin/play /var/lib/asterisk/sounds/call-for.gsm);
TrySystem(/usr/bin/play /var/spool/asterisk/voicemail/default/1/greet.wav&);
-
+
&std-priv-exten(Zap/6&Sip/murf,1,30,mtw,telemarket,telemarket);
- goto s|loopback;
+ goto s|loopback;
}
4 => {
- VoicemailMain();
+ VoicemailMain();
goto s|loopback;
}
6 => {
@@ -2542,7 +2542,7 @@ context workline {
Hangup();
}
i => {
- Background(invalid);
+ Background(invalid);
goto s|loopback;
}
o => {
@@ -2826,7 +2826,7 @@ context homeext {
Wait(2);
Playtones(info);
Wait(5);
- Hangup();
+ Hangup();
}
790 => {
MeetMe(790,p);
@@ -3179,5 +3179,3 @@ context announce-all {
// now include the telemarketer torture scripts!
#include "telemarket_torture.ael2"
-
-
diff --git a/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2 b/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2
index ebd8e9f2f..1f6ffed83 100755
--- a/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2
+++ b/pbx/ael/ael-test/ael-vtest13/telemarket_torture.ael2
@@ -16,7 +16,7 @@
// WORSE DESIGN: Instead of using the Background application, the Playback
// application is used. After taking so much time and trouble
-// to record this material, the caller must listen and enjoy
+// to record this material, the caller must listen and enjoy
// every syllable before they can make an option choice. None
// of that interrupting with a choice. We want them to savour
// every word!
@@ -29,18 +29,18 @@
context telemarket {
s => {
begin:
- Playback(telemarketer-intro); // ; Script:
+ Playback(telemarketer-intro); // ; Script:
// Due to the extremely high volume of calls from everything from telemarketers
// to Septic System Bacteria vendors, we are asking all such organizations
// to remove this number from their call list, or as need be, to add this
- // number to their No-Call list, whichever is relevent.
+ // number to their No-Call list, whichever is relevent.
// [THE CARROT:]
// We HAVE made some exceptions, and if you wish to see if your organization
// has been exempted, please listen to and follow the following prompts.
- //
+ //
// Otherwise, please Cease calling this number!
- //
+ //
Playback(telemarketer-choices);
// if you represent a charitable organization, please dial 1,
// if you represent a political organization, please dial 2.
@@ -70,22 +70,22 @@ context telemarket-charity {
// have sold our name and phone number to each other until we are now hounded
// day and night by literally hundreds of such organizations.
// Enough is Enough!
- //
- // If we have contributed to your cause in the past, we may, perhaps, be disposed to
+ //
+ // If we have contributed to your cause in the past, we may, perhaps, be disposed to
// do so in the future, at our option,
// we give no pledges nor make any commitments here.
// Send us material via the post if you feel this necessary
// but do not even consider email. Any email or further phone calls from your organization
- // in the future, will be considered an act of aggression, and we will
+ // in the future, will be considered an act of aggression, and we will
// blacklist your organization for the rest of our natural lives.
- //
+ //
// To see if your organization is exempt from these prohibitions, please
// comply with the following options.
Playback(telemark-charity-choices);
// If your organization is disease or genetic defect related, dial 1,
// If your organization is handicap related, dial 2.
// If your organization is a police or fireman or other similar support entity, please dial 3.
- // If your organization is a grade school to high school related
+ // If your organization is a grade school to high school related
// fund raiser or other type of activity, please dial 4.
// If your organization is a college or univerity or alumnis organization, please dial 5.
// If your organization is animal rights or ecology related organization, please dial 6.
@@ -176,7 +176,7 @@ context telemarket-char-other {
context telemarket-sorry {
s => {
begin:
- Playback(telemarket-sorry);
+ Playback(telemarket-sorry);
// Sorry -- your organization is not exempt. Please stop calling us.
// Thank you. goodbye.
Hangup();
@@ -190,7 +190,7 @@ context telemarket-exception {
s => {
begin:
Playback(telemarket-success);
- // Congratulations. Your organization IS exempt. Please call us back,
+ // Congratulations. Your organization IS exempt. Please call us back,
// but this time, just act like a normal caller. Thank you. Goodbye.
Hangup();
}
@@ -244,7 +244,7 @@ context telemarket-political2 {
Playback(telemark-politx-intro);
// Thank you for your patience, and I congratulate you for your persistence.
// Just a few more options!
- //
+ //
Playback(telemark-polit2-choices);
// if You represent the Communist Party USA, dial 1.
// if You represent the Constitution Party, dial 2.
@@ -644,7 +644,7 @@ context telemarket-pollster {
s => {
begin:
Playback(telemark-poll-intro);
- // I'm sorry-- We are just not available for doing any polling at the moment. So,
+ // I'm sorry-- We are just not available for doing any polling at the moment. So,
// please remove us from your list.
goto telemarket-sorry|s|begin;
}
@@ -660,7 +660,7 @@ context telemarket-research {
Playback(telemark-research-intro);
// I'd like to say I'd love to help you with your market survey, but that would be a complete
// and total lie. I am not interested in helping you with Market Surveys.
- //
+ //
// Please remove me from your call list. It just doesn't pay enough. But Thank you.
goto telemarket-sorry|s|begin;
}
@@ -674,12 +674,12 @@ context telemarket-magazine {
s => {
begin:
Playback(telemark-mag-choices);
- // If you are calling to see if I would like a NEW free subscription
+ // If you are calling to see if I would like a NEW free subscription
// to your magazine or newsletter, please dial 1.
// If you are calling to see if I want to Renew an existing subscription, please dial 2.
// If you are representing some publisher, and want my opinion about something, or are doing
// some kind of survey, please dial 3.
- // If you are calling to verify that some previous caller actually called me, and the
+ // If you are calling to verify that some previous caller actually called me, and the
// verification information is correct, please dial 4.
// and if your call purpose doesn't match any of the above, please dial 5.
}
@@ -698,8 +698,8 @@ context telemark-mag-new {
s => {
begin:
Playback(telemark-mag-new);
- // I'm sorry, I'm maxed out, and the answer is NO.
- // If you really think I'd LOVE to add your publication to the pile I already get,
+ // I'm sorry, I'm maxed out, and the answer is NO.
+ // If you really think I'd LOVE to add your publication to the pile I already get,
// Send something via the post. Don't call me.
// Thank you. bye.
Hangup();
@@ -715,9 +715,9 @@ context telemark-mag-renew {
begin:
Playback(telemark-mag-renew);
// So, you want to see if I want to Renew, do you? The answer is most likely "YES".
- //
- // But, I will not answer a long list of questions over the phone. Send such
- // categorization info via the post, and stop bothering me over the phone,
+ //
+ // But, I will not answer a long list of questions over the phone. Send such
+ // categorization info via the post, and stop bothering me over the phone,
// if this is what you want.
// Do you need verification information? Normally I opt out of such nonsense, if possible.
// If not, use whatever of the following you can:
@@ -752,7 +752,7 @@ context telemark-mag-verify {
begin:
Playback(telemark-mag-verify);
// If you are calling to verify that your own agents aren't ripping you off,
- // sorry, I can't help you. I opt out whenever I can, mainly because I'm not
+ // sorry, I can't help you. I opt out whenever I can, mainly because I'm not
// paid enough for this kind of thing. I always lie, and I can't remember
// what I might have said. Sorry. Goodbye.
Hangup();
@@ -785,7 +785,7 @@ context telemarket-commercial {
begin:
Playback(telemark-comm-intro); // Script: Please leave your name, organization, and phone number, plus
// a short description of the purpose of your call, at the prompt.
- // We will do our best to respond to your call! And, in the mean time,
+ // We will do our best to respond to your call! And, in the mean time,
// do not forget to add us to your no-call list!
Voicemail(u82);
goto telemarket-sorry|s|begin;
@@ -801,7 +801,7 @@ context telemarket-other {
begin:
Playback(telemark-other-intro);
// Please review the previous menu options, and see if you really don't
- // fit in one of the previous categories.
+ // fit in one of the previous categories.
// If you do not, go ahead, and call me again, and let me know what category
// I should have included in the above list. I appreciate this. Thank you much!
Hangup();
diff --git a/pbx/ael/ael-test/ael-vtest17/extensions.ael b/pbx/ael/ael-test/ael-vtest17/extensions.ael
index d13fe99d7..8f4c7d39a 100644
--- a/pbx/ael/ael-test/ael-vtest17/extensions.ael
+++ b/pbx/ael/ael-test/ael-vtest17/extensions.ael
@@ -1,12 +1,12 @@
context dialextens
{
- /*
+ /*
101 thru 123, 149 thru 152
*/
_10X => Dial(Zap/${EXTEN:2},30,tw);
_1ZX => Dial(Zap/${EXTEN:1},30,tw);
}
-/*
+/*
Due to extenal wiring:
dialing 125 will ring 101
@@ -90,7 +90,7 @@ context extension
Verbose(Finished 100000 levels deep call!);
}
83 => {
- switch (${EXTEN})
+ switch (${EXTEN})
{
pattern 8X:
Verbose(do something to prepare it);
diff --git a/pbx/ael/ael-test/ael-vtest21/extensions.ael b/pbx/ael/ael-test/ael-vtest21/extensions.ael
index 95f25302a..a5e7436e6 100644
--- a/pbx/ael/ael-test/ael-vtest21/extensions.ael
+++ b/pbx/ael/ael-test/ael-vtest21/extensions.ael
@@ -11,4 +11,3 @@ context from-enum {
goto ${EXTEN:3}|1;
}
}
-
diff --git a/pbx/ael/ael-test/runtests b/pbx/ael/ael-test/runtests
index 9209f0a54..f9b29f571 100755
--- a/pbx/ael/ael-test/runtests
+++ b/pbx/ael/ael-test/runtests
@@ -41,7 +41,7 @@ done
for i in ael-vtest*; do
echo -n Test: $i.................
(cd $i; ../../../../utils/aelparse -d -w -n | grep -v -i 'seconds' > ../res2.$i)
-
+
if (diff -q ref.$i $i/extensions.conf.aeldump > /dev/null 2>&1 ) then
echo PASSED
rm res2.$i
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index c178fd654..9ca0dfb0b 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -223,7 +223,7 @@ static void dump_byte(char *output, int maxlen, void *value, int len)
}
static char *proto2str(int proto, char *buf, int bufsiz)
-{
+{
switch(proto) {
case DUNDI_PROTO_NONE:
strncpy(buf, "None", bufsiz - 1);
@@ -306,10 +306,10 @@ static void dump_answer(char *output, int maxlen, void *value, int len)
tmp[datalen] = '\0';
ast_eid_to_str(eid_str, sizeof(eid_str), &answer->eid);
- snprintf(output, maxlen, "[%s] %d <%s/%s> from [%s]",
- dundi_flags2str(flags, sizeof(flags), ntohs(answer->flags)),
+ snprintf(output, maxlen, "[%s] %d <%s/%s> from [%s]",
+ dundi_flags2str(flags, sizeof(flags), ntohs(answer->flags)),
ntohs(answer->weight),
- proto2str(answer->protocol, proto, sizeof(proto)),
+ proto2str(answer->protocol, proto, sizeof(proto)),
tmp, eid_str);
}
@@ -466,12 +466,12 @@ void dundi_showframe(struct dundi_hdr *fhi, int rx, struct sockaddr_in *sin, int
}
snprintf(subclass2, (int)sizeof(subclass2), "%02hhx", (unsigned char)fhi->cmdflags);
subclass = subclass2;
- snprintf(tmp, (int)sizeof(tmp),
+ snprintf(tmp, (int)sizeof(tmp),
"%s-Frame -- OSeqno: %3.3d ISeqno: %3.3d Type: %s (%s)\n",
pref[rx],
fhi->oseqno, fhi->iseqno, class, fhi->cmdresp & 0x40 ? "Response" : "Command");
outputf(tmp);
- snprintf(tmp, (int)sizeof(tmp),
+ snprintf(tmp, (int)sizeof(tmp),
"%s Flags: %s STrans: %5.5d DTrans: %5.5d [%s:%d]%s\n", (rx > 1) ? " " : "",
subclass, ntohs(fhi->strans) & ~DUNDI_FLAG_RESERVED, ntohs(fhi->dtrans) & ~DUNDI_FLAG_RETRANS,
ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port),
@@ -587,14 +587,14 @@ int dundi_ie_append_addr(struct dundi_ie_data *ied, unsigned char ie, struct soc
return dundi_ie_append_raw(ied, ie, sin, (int)sizeof(struct sockaddr_in));
}
-int dundi_ie_append_int(struct dundi_ie_data *ied, unsigned char ie, unsigned int value)
+int dundi_ie_append_int(struct dundi_ie_data *ied, unsigned char ie, unsigned int value)
{
unsigned int newval;
newval = htonl(value);
return dundi_ie_append_raw(ied, ie, &newval, (int)sizeof(newval));
}
-int dundi_ie_append_short(struct dundi_ie_data *ied, unsigned char ie, unsigned short value)
+int dundi_ie_append_short(struct dundi_ie_data *ied, unsigned char ie, unsigned short value)
{
unsigned short newval;
newval = htons(value);
@@ -616,7 +616,7 @@ int dundi_ie_append_byte(struct dundi_ie_data *ied, unsigned char ie, unsigned c
return dundi_ie_append_raw(ied, ie, &dat, 1);
}
-int dundi_ie_append(struct dundi_ie_data *ied, unsigned char ie)
+int dundi_ie_append(struct dundi_ie_data *ied, unsigned char ie)
{
return dundi_ie_append_raw(ied, ie, NULL, 0);
}
@@ -680,7 +680,7 @@ int dundi_parse_ies(struct dundi_ies *ies, unsigned char *data, int datalen)
} else {
if (ies->anscount < DUNDI_MAX_ANSWERS)
ies->answers[ies->anscount++]= (struct dundi_answer *)(data + 2);
- else
+ else
errorf("Ignoring extra answers!\n");
}
break;
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 5cc07cfa2..37daeb612 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -1,4 +1,4 @@
-/*
+/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Digium, Inc.
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Compile symbolic Asterisk Extension Logic into Asterisk extensions, version 2.
- *
+ *
*/
/*** MODULEINFO
@@ -89,8 +89,8 @@ static int pbx_load_module(void);
#ifndef AAL_ARGCHECK
/* for the time being, short circuit all the AAL related structures
- without permanently removing the code; after/during the AAL
- development, this code can be properly re-instated
+ without permanently removing the code; after/during the AAL
+ development, this code can be properly re-instated
*/
#endif
@@ -158,7 +158,7 @@ static int pbx_load_module(void)
char *rfilename;
struct ast_context *local_contexts=NULL, *con;
struct ast_hashtab *local_table=NULL;
-
+
struct pval *parse_tree;
ast_debug(1, "Starting AEL load process.\n");
@@ -172,7 +172,7 @@ static int pbx_load_module(void)
ast_log(LOG_NOTICE, "File %s not found; AEL declining load\n", rfilename);
return AST_MODULE_LOAD_DECLINE;
}
-
+
parse_tree = ael2_parse(rfilename, &errs);
ast_debug(1, "AEL load process: parsed config file name '%s'.\n", rfilename);
ael2_semantic_check(parse_tree, &sem_err, &sem_warn, &sem_note);
@@ -185,7 +185,7 @@ static int pbx_load_module(void)
return AST_MODULE_LOAD_DECLINE;
}
ast_debug(1, "AEL load process: compiled config file name '%s'.\n", rfilename);
-
+
ast_merge_contexts_and_delete(&local_contexts, local_table, registrar);
local_table = NULL; /* it's the dialplan global now */
local_contexts = NULL;
@@ -199,7 +199,7 @@ static int pbx_load_module(void)
return AST_MODULE_LOAD_DECLINE;
}
destroy_pval(parse_tree); /* free up the memory */
-
+
return AST_MODULE_LOAD_SUCCESS;
}
@@ -368,11 +368,11 @@ int ael_is_funcname(char *name)
int s,t;
t = sizeof(ael_funclist)/sizeof(char*);
s = 0;
- while ((s < t) && strcasecmp(name, ael_funclist[s]))
+ while ((s < t) && strcasecmp(name, ael_funclist[s]))
s++;
if ( s < t )
return 1;
else
return 0;
}
-#endif
+#endif
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index c4a0e6c28..65daa2a07 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -20,7 +20,7 @@
*
* \brief Populate and remember extensions from static config file
*
- *
+ *
*/
/*** MODULEINFO
@@ -303,8 +303,10 @@ static char *complete_dialplan_remove_include(struct ast_cli_args *a)
while ( (nc = ast_walk_contexts(nc)) && nc != c && !already_served)
already_served = lookup_ci(nc, i_name);
- if (!already_served && ++which > a->n)
+ if (!already_served && ++which > a->n) {
res = strdup(i_name);
+ break;
+ }
}
ast_unlock_context(c);
}
@@ -345,7 +347,7 @@ static char *complete_dialplan_remove_include(struct ast_cli_args *a)
return res;
} else if (a->pos == 5) { /* "dialplan remove include CTX from _X_" */
/*
- * Context from which we removing include ...
+ * Context from which we removing include ...
*/
char *context, *dupline, *from;
const char *s = skip_words(a->line, 3); /* skip 'dialplan' 'remove' 'include' */
@@ -376,7 +378,7 @@ static char *complete_dialplan_remove_include(struct ast_cli_args *a)
const char *c_name = ast_get_context_name(c);
if (!partial_match(c_name, a->word, len)) /* not a good target */
continue;
- /* walk through all includes and check if it is our context */
+ /* walk through all includes and check if it is our context */
if (lookup_ci(c, context) && ++which > a->n)
res = strdup(c_name);
}
@@ -464,7 +466,7 @@ static char *handle_cli_dialplan_remove_extension(struct ast_cli_entry *e, int c
else
ast_cli(a->fd, "Extension %s@%s with priority %d removed\n",
exten, context, removing_priority);
-
+
ret = CLI_SUCCESS;
} else {
if (cid) {
@@ -644,7 +646,7 @@ static char *complete_dialplan_remove_extension(struct ast_cli_args *a)
error3:
free(exten);
}
- return ret;
+ return ret;
}
/*!
@@ -894,7 +896,7 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
}
ast_config_destroy(cfg);
-
+
#define PUT_CTX_HDR do { \
if (!context_header_written) { \
fprintf(output, "[%s]\n", ast_get_context_name(c)); \
@@ -910,7 +912,7 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
struct ast_ignorepat *ip;
struct ast_sw *sw;
- /* try to lock context and fireout all info */
+ /* try to lock context and fireout all info */
if (ast_rdlock_context(c)) { /* lock failure */
incomplete = 1;
continue;
@@ -930,14 +932,14 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
while ( (p = ast_walk_extension_priorities(ext, p)) ) {
if (strcmp(ast_get_extension_registrar(p), registrar) != 0) /* not this source */
continue;
-
- /* make empty line between different extensions */
+
+ /* make empty line between different extensions */
if (last_written_e != NULL &&
strcmp(ast_get_extension_name(last_written_e),
ast_get_extension_name(p)))
fprintf(output, "\n");
last_written_e = p;
-
+
PUT_CTX_HDR;
if (ast_get_extension_priority(p) == PRIORITY_HINT) { /* easy */
@@ -1014,7 +1016,7 @@ static char *handle_cli_dialplan_save(struct ast_cli_entry *e, int cmd, struct a
}
ast_unlock_context(c);
- }
+ }
ast_unlock_contexts();
ast_mutex_unlock(&save_dialplan_lock);
@@ -1476,7 +1478,7 @@ static char *complete_dialplan_remove_ignorepat(struct ast_cli_args *a)
if (ast_rdlock_context(c)) /* error, skip it */
continue;
-
+
for (ip = NULL; !ret && (ip = ast_walk_context_ignorepats(c, ip));) {
if (partial_match(ast_get_ignorepat_name(ip), a->word, len) && ++which > a->n) {
/* n-th match */
@@ -1523,17 +1525,21 @@ static char *complete_dialplan_remove_ignorepat(struct ast_cli_args *a)
}
for (c = NULL; !ret && (c = ast_walk_contexts(c)); ) {
- if (ast_rdlock_context(c)) /* fail, skip it */
+ if (ast_rdlock_context(c)) {
+ /* fail, skip it */
continue;
- if (!partial_match(ast_get_context_name(c), a->word, len))
+ }
+ if (!partial_match(ast_get_context_name(c), a->word, len)) {
+ ast_unlock_context(c);
continue;
+ }
if (lookup_c_ip(c, ignorepat) && ++which > a->n)
ret = strdup(ast_get_context_name(c));
ast_unlock_context(c);
}
ast_unlock_contexts();
free(dupline);
- return NULL;
+ return ret;
}
return NULL;
@@ -1682,7 +1688,7 @@ static int pbx_load_config(const char *config_file)
}
ast_copy_string(userscontext, ast_variable_retrieve(cfg, "general", "userscontext") ?: "default", sizeof(userscontext));
-
+
for (v = ast_variable_browse(cfg, "globals"); v; v = v->next) {
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
pbx_builtin_setvar_helper(NULL, v->name, realvalue);
@@ -1887,7 +1893,7 @@ process_extension:
} else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch") || !strcasecmp(v->name, "eswitch")) {
char *appl, *data;
stringp = realvalue;
-
+
if (!strcasecmp(v->name, "switch")) {
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
} else {
@@ -1938,7 +1944,7 @@ static void pbx_load_users(void)
int start, finish, x;
struct ast_context *con = NULL;
struct ast_flags config_flags = { 0 };
-
+
cfg = ast_config_load("users.conf", config_flags);
if (!cfg)
return;
@@ -2046,7 +2052,7 @@ static int pbx_load_module(void)
ast_mutex_unlock(&reload_lock);
return AST_MODULE_LOAD_DECLINE;
}
-
+
pbx_load_users();
ast_merge_contexts_and_delete(&local_contexts, local_table, registrar);
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index bd999e42a..7ec144de5 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -99,8 +99,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
in the DUNDi lookup. If no results were found, the result will be blank.</para>
</description>
</function>
-
-
+
+
<function name="DUNDIQUERY" language="en_US">
<synopsis>
Initiate a DUNDi query.
@@ -562,7 +562,7 @@ static int get_mapping_weight(struct dundi_mapping *map, struct varshead *headp)
if (map->weightstr) {
if (headp) {
pbx_substitute_variables_varshead(headp, map->weightstr, buf, sizeof(buf) - 1);
- } else {
+ } else {
pbx_substitute_variables_helper(NULL, map->weightstr, buf, sizeof(buf) - 1);
}
@@ -5067,4 +5067,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Distributed Universal Nu
.reload = reload,
.nonoptreq = "res_crypto",
);
-
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index 77762e226..e1f559059 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -16,7 +16,7 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
*
* \author Matthew Nicholson <mnicholson@digium.com>
@@ -157,7 +157,7 @@ static void lua_datastore_fixup(void *data, struct ast_channel *old_chan, struct
static int lua_pbx_findapp(lua_State *L)
{
const char *app_name = luaL_checkstring(L, 2);
-
+
lua_newtable(L);
lua_pushstring(L, "name");
@@ -198,7 +198,7 @@ static int lua_pbx_exec(lua_State *L)
lua_getfield(L, 1, "name");
app_name = ast_strdupa(lua_tostring(L, -1));
lua_pop(L, 1);
-
+
if (!(app = pbx_findapp(app_name))) {
lua_pushstring(L, "application '");
lua_pushstring(L, app_name);
@@ -206,16 +206,16 @@ static int lua_pbx_exec(lua_State *L)
lua_concat(L, 3);
return lua_error(L);
}
-
+
lua_getfield(L, LUA_REGISTRYINDEX, "channel");
chan = lua_touserdata(L, -1);
lua_pop(L, 1);
-
+
context = ast_strdupa(ast_channel_context(chan));
exten = ast_strdupa(ast_channel_exten(chan));
priority = ast_channel_priority(chan);
-
+
lua_concat_args(L, 2, nargs);
data = lua_tostring(L, -1);
@@ -268,20 +268,20 @@ static int lua_pbx_exec(lua_State *L)
/* goto detected - construct error message */
lua_insert(L, -3);
-
- lua_pushliteral(L, " changed from ");
- lua_insert(L, -3);
-
- lua_pushliteral(L, " to ");
- lua_insert(L, -2);
-
- lua_concat(L, 5);
-
- ast_debug(2, "Goto detected: %s\n", lua_tostring(L, -1));
- lua_pop(L, 1);
-
- /* let the lua engine know it needs to return control to the pbx */
- lua_pushinteger(L, LUA_GOTO_DETECTED);
+
+ lua_pushliteral(L, " changed from ");
+ lua_insert(L, -3);
+
+ lua_pushliteral(L, " to ");
+ lua_insert(L, -2);
+
+ lua_concat(L, 5);
+
+ ast_debug(2, "Goto detected: %s\n", lua_tostring(L, -1));
+ lua_pop(L, 1);
+
+ /* let the lua engine know it needs to return control to the pbx */
+ lua_pushinteger(L, LUA_GOTO_DETECTED);
lua_error(L);
return 0;
@@ -312,7 +312,7 @@ static int lua_get_variable_value(lua_State *L)
lua_pushstring(L, "User probably used '.' instead of ':' for retrieving a channel variable value");
return lua_error(L);
}
-
+
lua_getfield(L, LUA_REGISTRYINDEX, "channel");
chan = lua_touserdata(L, -1);
lua_pop(L, 1);
@@ -320,14 +320,14 @@ static int lua_get_variable_value(lua_State *L)
lua_getfield(L, 1, "name");
name = ast_strdupa(lua_tostring(L, -1));
lua_pop(L, 1);
-
+
lua_getfield(L, LUA_REGISTRYINDEX, "autoservice");
autoservice = lua_toboolean(L, -1);
lua_pop(L, 1);
if (autoservice)
ast_autoservice_stop(chan);
-
+
/* if this is a dialplan function then use ast_func_read(), otherwise
* use pbx_retrieve_variable() */
if (!ast_strlen_zero(name) && name[strlen(name) - 1] == ')') {
@@ -335,7 +335,7 @@ static int lua_get_variable_value(lua_State *L)
} else {
pbx_retrieve_variable(chan, name, &value, workspace, LUA_BUF_SIZE, ast_channel_varshead(chan));
}
-
+
if (autoservice)
ast_autoservice_start(chan);
@@ -351,7 +351,7 @@ static int lua_get_variable_value(lua_State *L)
/*!
* \brief [lua_CFunction] Used to set the value of a variable or dialplan
* function (for access from lua, don't call directly)
- *
+ *
* This function is the 'set()' function in the following example as would be
* seen in extensions.lua.
*
@@ -375,7 +375,7 @@ static int lua_set_variable_value(lua_State *L)
lua_pop(L, 1);
value = luaL_checkstring(L, 2);
-
+
lua_getfield(L, LUA_REGISTRYINDEX, "channel");
chan = lua_touserdata(L, -1);
lua_pop(L, 1);
@@ -388,7 +388,7 @@ static int lua_set_variable_value(lua_State *L)
ast_autoservice_stop(chan);
pbx_builtin_setvar_helper(chan, name, value);
-
+
if (autoservice)
ast_autoservice_start(chan);
@@ -431,10 +431,10 @@ static void lua_push_variable_table(lua_State *L)
lua_insert(L, -2); /* move the table after the name */
lua_setfield(L, -2, "name");
-
+
lua_pushcfunction(L, &lua_get_variable_value);
lua_setfield(L, -2, "get");
-
+
lua_pushcfunction(L, &lua_set_variable_value);
lua_setfield(L, -2, "set");
}
@@ -497,7 +497,7 @@ static void lua_create_variable_metatable(lua_State *L)
/*!
* \brief Create the 'application' metatable, used to execute asterisk
- * applications from lua
+ * applications from lua
*
* \param L the lua_State to use
*/
@@ -521,7 +521,7 @@ static void lua_create_autoservice_functions(lua_State *L)
{
lua_pushcfunction(L, &lua_autoservice_start);
lua_setglobal(L, "autoservice_start");
-
+
lua_pushcfunction(L, &lua_autoservice_stop);
lua_setglobal(L, "autoservice_stop");
@@ -546,7 +546,7 @@ static void lua_create_hangup_function(lua_State *L)
/*!
* \brief [lua_CFunction] Return a lua 'variable' object (for access from lua, don't call
* directly)
- *
+ *
* This function is called to lookup a variable construct a 'variable' object.
* It would be called in the following example as would be seen in
* extensions.lua.
@@ -562,14 +562,14 @@ static int lua_get_variable(lua_State *L)
char *value = NULL;
char *workspace = ast_alloca(LUA_BUF_SIZE);
workspace[0] = '\0';
-
+
lua_getfield(L, LUA_REGISTRYINDEX, "channel");
chan = lua_touserdata(L, -1);
lua_pop(L, 1);
lua_pushvalue(L, 2);
lua_push_variable_table(L);
-
+
/* if this is not a request for a dialplan funciton attempt to retrieve
* the value of the variable */
if (!ast_strlen_zero(name) && name[strlen(name) - 1] != ')') {
@@ -581,13 +581,13 @@ static int lua_get_variable(lua_State *L)
lua_setfield(L, -2, "value");
}
- return 1;
+ return 1;
}
/*!
* \brief [lua_CFunction] Set the value of a channel variable or dialplan
* function (for access from lua, don't call directly)
- *
+ *
* This function is called to set a variable or dialplan function. It would be
* called in the following example as would be seen in extensions.lua.
*
@@ -614,7 +614,7 @@ static int lua_set_variable(lua_State *L)
ast_autoservice_stop(chan);
pbx_builtin_setvar_helper(chan, name, value);
-
+
if (autoservice)
ast_autoservice_start(chan);
@@ -656,7 +656,7 @@ static void lua_concat_args(lua_State *L, int start, int nargs) {
/*!
* \brief [lua_CFunction] Create a 'variable' object for accessing a dialplan
* function (for access from lua, don't call directly)
- *
+ *
* This function is called to create a 'variable' object to access a dialplan
* function. It would be called in the following example as would be seen in
* extensions.lua.
@@ -825,7 +825,7 @@ static int lua_error_function(lua_State *L)
/*!
* \brief Store the sort order of each context
-
+
* In the event of an error, an error string will be pushed onto the lua stack.
*
* \retval 0 success
@@ -902,7 +902,7 @@ static int lua_sort_extensions(lua_State *L)
return 1;
}
}
-
+
/* remove the extensions table and the extensions_order table */
lua_pop(L, 2);
return 0;
@@ -960,7 +960,7 @@ static int lua_register_switches(lua_State *L)
return 1;
}
}
-
+
/* remove the extensions table */
lua_pop(L, 1);
return 0;
@@ -1156,11 +1156,11 @@ static char *lua_read_extensions_file(lua_State *L, long *size)
*/
static int lua_load_extensions(lua_State *L, struct ast_channel *chan)
{
-
+
/* store a pointer to this channel */
lua_pushlightuserdata(L, chan);
lua_setfield(L, LUA_REGISTRYINDEX, "channel");
-
+
luaL_openlibs(L);
/* load and sort extensions */
@@ -1215,10 +1215,10 @@ static int lua_reload_extensions(lua_State *L)
config_file_data = data;
config_file_size = size;
-
+
/* merge our new contexts */
ast_merge_contexts_and_delete(&local_contexts, local_table, registrar);
- /* merge_contexts_and_delete will actually, at the correct moment,
+ /* merge_contexts_and_delete will actually, at the correct moment,
set the global dialplan pointers to your local_contexts and local_table.
It then will free up the old tables itself. Just be sure not to
hang onto the pointers. */
@@ -1376,7 +1376,7 @@ static int matchmore(struct ast_channel *chan, const char *context, const char *
ast_module_user_remove(u);
return 0;
}
-
+
res = lua_find_extension(L, context, exten, priority, &matchmore, 0);
if (!chan) lua_close(L);
@@ -1394,7 +1394,7 @@ static int exec(struct ast_channel *chan, const char *context, const char *exten
ast_log(LOG_ERROR, "Error adjusting use count, probably could not allocate memory\n");
return -1;
}
-
+
L = lua_get_state(chan);
if (!L) {
ast_module_user_remove(u);
@@ -1420,10 +1420,10 @@ static int exec(struct ast_channel *chan, const char *context, const char *exten
lua_pop(L, 1);
lua_update_registry(L, context, exten, priority);
-
+
lua_pushstring(L, context);
lua_pushstring(L, exten);
-
+
res = lua_pcall(L, 2, 0, error_func);
if (res) {
if (res == LUA_ERRRUN) {
@@ -1636,9 +1636,6 @@ static int load_or_reload_lua_stuff(void)
res = AST_MODULE_LOAD_DECLINE;
}
- if (!res) {
- ast_log(LOG_NOTICE, "Lua PBX Switch loaded.\n");
- }
lua_close(L);
return res;
}
@@ -1648,7 +1645,6 @@ static int unload_module(void)
ast_context_destroy(NULL, registrar);
ast_unregister_switch(&lua_switch);
lua_free_extensions();
- ast_log(LOG_NOTICE, "Lua PBX Switch unloaded.\n");
return 0;
}
@@ -1678,4 +1674,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Lua PBX Switch",
.unload = unload_module,
.reload = reload,
);
-
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index 2b17cbcee..977898415 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -155,11 +155,11 @@ static int extension_length_comparator(struct ast_category *p, struct ast_catego
[context@][realtimetable][/options]
- If the realtimetable is omitted it is assumed to be "extensions". If no context is
+ If the realtimetable is omitted it is assumed to be "extensions". If no context is
specified the context is assumed to be whatever is the container.
The realtime table should have entries for context,exten,priority,app,args
-
+
The realtime table currently does not support callerid fields.
*/
@@ -196,7 +196,7 @@ static struct ast_variable *realtime_switch_common(const char *table, const char
}
var = ast_load_realtime(table, ematch, rexten, "context", context, "priority", pri, SENTINEL);
if (!var && !ast_test_flag(&flags, OPTION_PATTERNS_DISABLED)) {
- cfg = ast_load_realtime_multientry(table, "exten LIKE", "\\_%", "context", context, "priority", pri, SENTINEL);
+ cfg = ast_load_realtime_multientry(table, "exten LIKE", "\\_%", "context", context, "priority", pri, SENTINEL);
if (cfg) {
char *cat = NULL;
@@ -417,4 +417,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Realtime Switch");
-
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 800217abf..661aa4226 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Full-featured outgoing call spool support
- *
+ *
*/
/*** MODULEINFO
@@ -58,7 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*
* pbx_spool is similar in spirit to qcall, but with substantially enhanced functionality...
- * The spool file contains a header
+ * The spool file contains a header
*/
enum {
diff --git a/res/Makefile b/res/Makefile
index 2b688edc4..5a8f35a85 100644
--- a/res/Makefile
+++ b/res/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for resource modules
#
# Copyright (C) 1999-2006, Digium, Inc.
diff --git a/res/ael/ael.flex b/res/ael/ael.flex
index 0b6ec32f1..8ea881512 100644
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
@@ -269,11 +269,11 @@ includes { STORE_POS; return KW_INCLUDES;}
[ ]+ { my_col += yyleng; }
[\t]+ { my_col += (yyleng*8)-(my_col%8); }
-({KEYWORD}?[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]]|{HIBIT}|(\\.)|(\$\{)|(\$\[)) {
- /* boy did I open a can of worms when I changed the lexical token "word".
+({KEYWORD}?[-a-zA-Z0-9'"_/.\<\>\*\+!$#\[\]]|{HIBIT}|(\\.)|(\$\{)|(\$\[)) {
+ /* boy did I open a can of worms when I changed the lexical token "word".
all the above keywords can be used as a beginning to a "word".-
- before, a "word" would match a longer sequence than the above
- keywords, and all would be well. But now "word" is a single char
+ before, a "word" would match a longer sequence than the above
+ keywords, and all would be well. But now "word" is a single char
and feeds into a statemachine sort of sequence from there on. So...
I added the {KEYWORD}? to the beginning of the word match sequence */
@@ -344,7 +344,7 @@ includes { STORE_POS; return KW_INCLUDES;}
}
}
-<curlystate>{NOPARENS}[\(\[\{] {
+<curlystate>{NOPARENS}[\(\[\{] {
char c = yytext[yyleng-1];
if (c == '{')
parencount2++;
@@ -352,7 +352,7 @@ includes { STORE_POS; return KW_INCLUDES;}
yymore();
}
-<curlystate>{NOPARENS}[\]\)] {
+<curlystate>{NOPARENS}[\]\)] {
char c = yytext[yyleng-1];
if ( pbcpop2(c)) { /* error */
STORE_LOC;
@@ -387,7 +387,7 @@ includes { STORE_POS; return KW_INCLUDES;}
}
}
-<brackstate>{NOPARENS}[\(\[\{] {
+<brackstate>{NOPARENS}[\(\[\{] {
char c = yytext[yyleng-1];
if (c == '[')
parencount3++;
@@ -395,7 +395,7 @@ includes { STORE_POS; return KW_INCLUDES;}
yymore();
}
-<brackstate>{NOPARENS}[\}\)] {
+<brackstate>{NOPARENS}[\}\)] {
char c = yytext[yyleng-1];
if ( pbcpop3(c)) { /* error */
STORE_LOC;
@@ -580,7 +580,7 @@ includes { STORE_POS; return KW_INCLUDES;}
glob_t globbuf; /* the current globbuf */
int globbuf_pos = -1; /* where we are in the current globbuf */
globbuf.gl_offs = 0; /* initialize it to silence gcc */
-
+
p1 = strchr(yytext,'"');
p2 = strrchr(yytext,'"');
if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
@@ -625,8 +625,8 @@ includes { STORE_POS; return KW_INCLUDES;}
yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
include_stack[include_stack_index-1].globbuf_pos++;
setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
- /* finish this */
-
+ /* finish this */
+
} else {
if (include_stack[include_stack_index].fname) {
free(include_stack[include_stack_index].fname);
@@ -641,7 +641,7 @@ includes { STORE_POS; return KW_INCLUDES;}
} else {
globfree(&include_stack[include_stack_index].globbuf);
include_stack[include_stack_index].globbuf_pos = -1;
-
+
yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
yy_switch_to_buffer(include_stack[include_stack_index].bufstate, yyscanner );
my_lineno = include_stack[include_stack_index].lineno;
@@ -811,7 +811,7 @@ struct pval *ael2_parse(char *filename, int *errors)
buffer = (char*)malloc(stats.st_size+2);
if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
- }
+ }
buffer[stats.st_size]=0;
fclose(fin);
@@ -883,7 +883,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
buffer = (char*)malloc(stats.st_size+1);
if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
- }
+ }
buffer[stats.st_size] = 0;
ast_debug(1, " --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
fclose(in1);
diff --git a/res/ael/ael.tab.c b/res/ael/ael.tab.c
index c838d797c..87370a190 100644
--- a/res/ael/ael.tab.c
+++ b/res/ael/ael.tab.c
@@ -1,19 +1,19 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* Bison implementation for Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -120,7 +120,7 @@ static void set_dads(pval *dad, pval *child_list);
void reset_parencount(yyscan_t yyscanner);
void reset_semicount(yyscan_t yyscanner);
void reset_argcount(yyscan_t yyscanner );
-
+
#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
#define YYERROR_VERBOSE 1
@@ -2897,7 +2897,7 @@ yyreduce:
free((yyvsp[(1) - (2)].str));
free((yyvsp[(2) - (2)].str));
prev_word = (yyval.str);
- }
+ }
}
break;
@@ -4002,9 +4002,7 @@ static pval *nword(char *string, YYLTYPE *pos)
static void set_dads(struct pval *dad, struct pval *child_list)
{
struct pval *t;
-
+
for(t=child_list;t;t=t->next) /* simple stuff */
t->dad = dad;
}
-
-
diff --git a/res/ael/ael.tab.h b/res/ael/ael.tab.h
index 93fc23d0c..1647649a8 100644
--- a/res/ael/ael.tab.h
+++ b/res/ael/ael.tab.h
@@ -1,19 +1,19 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* Bison interface for Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -118,6 +118,3 @@ typedef struct YYLTYPE
# define YYLTYPE_IS_DECLARED 1
# define YYLTYPE_IS_TRIVIAL 1
#endif
-
-
-
diff --git a/res/ael/ael.y b/res/ael/ael.y
index 27e04c583..c157c6cb7 100644
--- a/res/ael/ael.y
+++ b/res/ael/ael.y
@@ -43,7 +43,7 @@ static void set_dads(pval *dad, pval *child_list);
void reset_parencount(yyscan_t yyscanner);
void reset_semicount(yyscan_t yyscanner);
void reset_argcount(yyscan_t yyscanner );
-
+
#define YYLEX_PARAM ((struct parse_io *)parseio)->scanner
#define YYERROR_VERBOSE 1
@@ -211,7 +211,7 @@ context : opt_abstract KW_CONTEXT context_name LC elements RC {
$$->u1.str = $3;
$$->u2.statements = $5;
set_dads($$,$5);
- $$->u3.abstract = $1;}
+ $$->u3.abstract = $1;}
;
/* optional "abstract" keyword XXX there is no regression test for this */
@@ -422,7 +422,7 @@ word3_list : word { $$ = $1;}
free($1);
free($2);
prev_word = $$;
- }
+ }
}
| word word word {
if (asprintf(&($$), "%s%s%s", $1, $2, $3) < 0) {
@@ -545,7 +545,7 @@ statement : LC statements RC {
opt_else : KW_ELSE statement { $$ = $2; }
| { $$ = NULL ; }
-
+
target : goto_word { $$ = nword($1, &@1); }
| goto_word BAR goto_word {
$$ = nword($1, &@1);
@@ -884,8 +884,7 @@ static pval *nword(char *string, YYLTYPE *pos)
static void set_dads(struct pval *dad, struct pval *child_list)
{
struct pval *t;
-
+
for(t=child_list;t;t=t->next) /* simple stuff */
t->dad = dad;
}
-
diff --git a/res/ael/ael_lex.c b/res/ael/ael_lex.c
index 6aec03bee..ad79cf257 100644
--- a/res/ael/ael_lex.c
+++ b/res/ael/ael_lex.c
@@ -36,7 +36,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -53,7 +53,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -186,7 +186,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -248,7 +248,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -1027,9 +1027,9 @@ static int yy_init_globals (yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval yyg->yylval_r
-
+
# define yylloc yyg->yylloc_r
-
+
int ael_yylex_init (yyscan_t* scanner);
int ael_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -1068,9 +1068,9 @@ YYSTYPE * ael_yyget_lval (yyscan_t yyscanner );
void ael_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner );
-
+
void ael_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -1084,7 +1084,7 @@ extern int ael_yywrap (yyscan_t yyscanner );
#endif
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
@@ -1562,11 +1562,11 @@ YY_RULE_SETUP
case 51:
YY_RULE_SETUP
#line 272 "ael.flex"
-{
- /* boy did I open a can of worms when I changed the lexical token "word".
+{
+ /* boy did I open a can of worms when I changed the lexical token "word".
all the above keywords can be used as a beginning to a "word".-
- before, a "word" would match a longer sequence than the above
- keywords, and all would be well. But now "word" is a single char
+ before, a "word" would match a longer sequence than the above
+ keywords, and all would be well. But now "word" is a single char
and feeds into a statemachine sort of sequence from there on. So...
I added the {KEYWORD}? to the beginning of the word match sequence */
@@ -1668,7 +1668,7 @@ case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 347 "ael.flex"
-{
+{
char c = yytext[yyleng-1];
if (c == '{')
parencount2++;
@@ -1680,7 +1680,7 @@ case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 355 "ael.flex"
-{
+{
char c = yytext[yyleng-1];
if ( pbcpop2(c)) { /* error */
STORE_LOC;
@@ -1722,7 +1722,7 @@ case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
#line 390 "ael.flex"
-{
+{
char c = yytext[yyleng-1];
if (c == '[')
parencount3++;
@@ -1734,7 +1734,7 @@ case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
#line 398 "ael.flex"
-{
+{
char c = yytext[yyleng-1];
if ( pbcpop3(c)) { /* error */
STORE_LOC;
@@ -1961,7 +1961,7 @@ YY_RULE_SETUP
glob_t globbuf; /* the current globbuf */
int globbuf_pos = -1; /* where we are in the current globbuf */
globbuf.gl_offs = 0; /* initialize it to silence gcc */
-
+
p1 = strchr(yytext,'"');
p2 = strrchr(yytext,'"');
if ( include_stack_index >= MAX_INCLUDE_DEPTH ) {
@@ -2014,8 +2014,8 @@ case YY_STATE_EOF(brackstate):
ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
include_stack[include_stack_index-1].globbuf_pos++;
setup_filestack(fnamebuf, sizeof(fnamebuf), &include_stack[include_stack_index-1].globbuf, include_stack[include_stack_index-1].globbuf_pos, yyscanner, 0);
- /* finish this */
-
+ /* finish this */
+
} else {
if (include_stack[include_stack_index].fname) {
free(include_stack[include_stack_index].fname);
@@ -2030,7 +2030,7 @@ case YY_STATE_EOF(brackstate):
} else {
globfree(&include_stack[include_stack_index].globbuf);
include_stack[include_stack_index].globbuf_pos = -1;
-
+
ael_yy_delete_buffer(YY_CURRENT_BUFFER,yyscanner );
ael_yy_switch_to_buffer(include_stack[include_stack_index].bufstate,yyscanner );
my_lineno = include_stack[include_stack_index].lineno;
@@ -2568,7 +2568,7 @@ static void ael_yy_load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE ael_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) ael_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in ael_yy_create_buffer()" );
@@ -2612,7 +2612,7 @@ static void ael_yy_load_buffer_state (yyscan_t yyscanner)
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
-
+
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a ael_yyrestart() or at EOF.
@@ -2638,7 +2638,7 @@ extern int isatty (int );
}
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-
+
errno = oerrno;
}
@@ -2744,9 +2744,9 @@ static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in ael_yyensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -2775,12 +2775,12 @@ static void ael_yyensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2816,7 +2816,7 @@ YY_BUFFER_STATE ael_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yys
*/
YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
-
+
return ael_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
@@ -2833,7 +2833,7 @@ YY_BUFFER_STATE ael_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ,
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) ael_yyalloc(n ,yyscanner );
@@ -2901,10 +2901,10 @@ YY_EXTRA_TYPE ael_yyget_extra (yyscan_t yyscanner)
int ael_yyget_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
@@ -2914,10 +2914,10 @@ int ael_yyget_lineno (yyscan_t yyscanner)
int ael_yyget_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
@@ -2978,8 +2978,8 @@ void ael_yyset_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
-
+ yy_fatal_error( "ael_yyset_lineno called with no buffer" , yyscanner);
+
yylineno = line_number;
}
@@ -2993,8 +2993,8 @@ void ael_yyset_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
-
+ yy_fatal_error( "ael_yyset_column called with no buffer" , yyscanner);
+
yycolumn = column_no;
}
@@ -3047,13 +3047,13 @@ YYLTYPE *ael_yyget_lloc (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-
+
void ael_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
}
-
+
/* User-visible API */
/* ael_yylex_init is special because it creates the scanner itself, so it is
@@ -3101,20 +3101,20 @@ int ael_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
errno = EINVAL;
return 1;
}
-
+
*ptr_yy_globals = (yyscan_t) ael_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+
ael_yyset_extra (yy_user_defined, *ptr_yy_globals);
-
+
return yy_init_globals ( *ptr_yy_globals );
}
@@ -3384,7 +3384,7 @@ struct pval *ael2_parse(char *filename, int *errors)
buffer = (char*)malloc(stats.st_size+2);
if (fread(buffer, 1, stats.st_size, fin) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
- }
+ }
buffer[stats.st_size]=0;
fclose(fin);
@@ -3456,7 +3456,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
buffer = (char*)malloc(stats.st_size+1);
if (fread(buffer, 1, stats.st_size, in1) != stats.st_size) {
ast_log(LOG_ERROR, "fread() failed: %s\n", strerror(errno));
- }
+ }
buffer[stats.st_size] = 0;
ast_debug(1, " --Read in included file %s, %d chars\n",fnamebuf2, (int)stats.st_size);
fclose(in1);
@@ -3486,4 +3486,3 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf,
}
}
}
-
diff --git a/res/ael/pval.c b/res/ael/pval.c
index 07545f659..bbfeb2d76 100644
--- a/res/ael/pval.c
+++ b/res/ael/pval.c
@@ -20,7 +20,7 @@
/*! \file
*
* \brief Compile symbolic Asterisk Extension Logic into Asterisk extensions, version 2.
- *
+ *
*/
/*** MODULEINFO
@@ -117,16 +117,16 @@ static void print_pval(FILE *fin, pval *item, int depth)
{
int i;
pval *lp;
-
+
for (i=0; i<depth; i++) {
fprintf(fin, "\t"); /* depth == indentation */
}
-
+
switch ( item->type ) {
case PV_WORD:
fprintf(fin,"%s;\n", item->u1.str); /* usually, words are encapsulated in something else */
break;
-
+
case PV_MACRO:
fprintf(fin,"macro %s(", item->u1.str);
for (lp=item->u2.arglist; lp; lp=lp->next) {
@@ -141,7 +141,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"};\n\n");
break;
-
+
case PV_CONTEXT:
if ( item->u3.abstract )
fprintf(fin,"abstract context %s {\n", item->u1.str);
@@ -153,7 +153,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"};\n\n");
break;
-
+
case PV_MACRO_CALL:
fprintf(fin,"&%s(", item->u1.str);
for (lp=item->u2.arglist; lp; lp=lp->next) {
@@ -163,7 +163,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,");\n");
break;
-
+
case PV_APPLICATION_CALL:
fprintf(fin,"%s(", item->u1.str);
for (lp=item->u2.arglist; lp; lp=lp->next) {
@@ -173,22 +173,22 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,");\n");
break;
-
+
case PV_CASE:
fprintf(fin,"case %s:\n", item->u1.str);
print_pval_list(fin,item->u2.statements, depth+1);
break;
-
+
case PV_PATTERN:
fprintf(fin,"pattern %s:\n", item->u1.str);
print_pval_list(fin,item->u2.statements, depth+1);
break;
-
+
case PV_DEFAULT:
fprintf(fin,"default:\n");
print_pval_list(fin,item->u2.statements, depth+1);
break;
-
+
case PV_CATCH:
fprintf(fin,"catch %s {\n", item->u1.str);
print_pval_list(fin,item->u2.statements, depth+1);
@@ -197,7 +197,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"};\n");
break;
-
+
case PV_SWITCHES:
fprintf(fin,"switches {\n");
print_pval_list(fin,item->u1.list,depth+1);
@@ -206,7 +206,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"};\n");
break;
-
+
case PV_ESWITCHES:
fprintf(fin,"eswitches {\n");
print_pval_list(fin,item->u1.list,depth+1);
@@ -215,7 +215,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"};\n");
break;
-
+
case PV_INCLUDES:
fprintf(fin,"includes {\n");
for (lp=item->u1.list; lp; lp=lp->next) {
@@ -224,7 +224,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"%s", lp->u1.str); /* usually, words are encapsulated in something else */
if (lp->u2.arglist)
- fprintf(fin,"|%s|%s|%s|%s",
+ fprintf(fin,"|%s|%s|%s|%s",
lp->u2.arglist->u1.str,
lp->u2.arglist->next->u1.str,
lp->u2.arglist->next->next->u1.str,
@@ -232,13 +232,13 @@ static void print_pval(FILE *fin, pval *item, int depth)
);
fprintf(fin,";\n"); /* usually, words are encapsulated in something else */
}
-
+
for (i=0; i<depth; i++) {
fprintf(fin,"\t"); /* depth == indentation */
}
fprintf(fin,"};\n");
break;
-
+
case PV_STATEMENTBLOCK:
fprintf(fin,"{\n");
print_pval_list(fin,item->u1.list, depth+1);
@@ -247,15 +247,15 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"}\n");
break;
-
+
case PV_VARDEC:
fprintf(fin,"%s=%s;\n", item->u1.str, item->u2.val);
break;
-
+
case PV_LOCALVARDEC:
fprintf(fin,"local %s=%s;\n", item->u1.str, item->u2.val);
break;
-
+
case PV_GOTO:
fprintf(fin,"goto %s", item->u1.list->u1.str);
if ( item->u1.list->next )
@@ -264,42 +264,42 @@ static void print_pval(FILE *fin, pval *item, int depth)
fprintf(fin,",%s", item->u1.list->next->next->u1.str);
fprintf(fin,"\n");
break;
-
+
case PV_LABEL:
fprintf(fin,"%s:\n", item->u1.str);
break;
-
+
case PV_FOR:
fprintf(fin,"for (%s; %s; %s)\n", item->u1.for_init, item->u2.for_test, item->u3.for_inc);
print_pval_list(fin,item->u4.for_statements,depth+1);
break;
-
+
case PV_WHILE:
fprintf(fin,"while (%s)\n", item->u1.str);
print_pval_list(fin,item->u2.statements,depth+1);
break;
-
+
case PV_BREAK:
fprintf(fin,"break;\n");
break;
-
+
case PV_RETURN:
fprintf(fin,"return;\n");
break;
-
+
case PV_CONTINUE:
fprintf(fin,"continue;\n");
break;
-
+
case PV_RANDOM:
case PV_IFTIME:
case PV_IF:
if ( item->type == PV_IFTIME ) {
-
- fprintf(fin,"ifTime ( %s|%s|%s|%s )\n",
- item->u1.list->u1.str,
- item->u1.list->next->u1.str,
- item->u1.list->next->next->u1.str,
+
+ fprintf(fin,"ifTime ( %s|%s|%s|%s )\n",
+ item->u1.list->u1.str,
+ item->u1.list->next->u1.str,
+ item->u1.list->next->next->u1.str,
item->u1.list->next->next->next->u1.str
);
} else if ( item->type == PV_RANDOM ) {
@@ -335,7 +335,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
print_pval_list(fin,item->u3.else_statements, depth);
}
break;
-
+
case PV_SWITCH:
fprintf(fin,"switch( %s ) {\n", item->u1.str);
print_pval_list(fin,item->u2.statements,depth+1);
@@ -344,22 +344,22 @@ static void print_pval(FILE *fin, pval *item, int depth)
}
fprintf(fin,"}\n");
break;
-
+
case PV_EXTENSION:
if ( item->u4.regexten )
fprintf(fin, "regexten ");
if ( item->u3.hints )
fprintf(fin,"hints(%s) ", item->u3.hints);
-
+
fprintf(fin,"%s => ", item->u1.str);
print_pval_list(fin,item->u2.statements,depth+1);
fprintf(fin,"\n");
break;
-
+
case PV_IGNOREPAT:
fprintf(fin,"ignorepat => %s;\n", item->u1.str);
break;
-
+
case PV_GLOBALS:
fprintf(fin,"globals {\n");
print_pval_list(fin,item->u1.statements,depth+1);
@@ -374,7 +374,7 @@ static void print_pval(FILE *fin, pval *item, int depth)
static void print_pval_list(FILE *fin, pval *item, int depth)
{
pval *i;
-
+
for (i=item; i; i=i->next) {
print_pval(fin, i, depth);
}
@@ -402,12 +402,12 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
but you may not need it */
{
pval *lp;
-
+
switch ( item->type ) {
case PV_WORD:
/* fields: item->u1.str == string associated with this (word). */
break;
-
+
case PV_MACRO:
/* fields: item->u1.str == name of macro
item->u2.arglist == pval list of PV_WORD arguments of macro, as given by user
@@ -417,11 +417,11 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
item->u3.macro_statements == pval list of statements in macro body.
*/
for (lp=item->u2.arglist; lp; lp=lp->next) {
-
+
}
traverse_pval_item_template(item->u3.macro_statements,depth+1);
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -429,7 +429,7 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_MACRO_CALL:
/* fields: item->u1.str == name of macro to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -439,7 +439,7 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
for (lp=item->u2.arglist; lp; lp=lp->next) {
}
break;
-
+
case PV_APPLICATION_CALL:
/* fields: item->u1.str == name of application to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -449,47 +449,47 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
for (lp=item->u2.arglist; lp; lp=lp->next) {
}
break;
-
+
case PV_CASE:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_SWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
traverse_pval_item_template(item->u1.list,depth+1);
break;
-
+
case PV_ESWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
traverse_pval_item_template(item->u1.list,depth+1);
break;
-
+
case PV_INCLUDES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
item->u2.arglist == pval list of 4 PV_WORD elements for time values
@@ -497,37 +497,37 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
traverse_pval_item_template(item->u1.list,depth+1);
traverse_pval_item_template(item->u2.arglist,depth+1);
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
traverse_pval_item_template(item->u1.list,depth+1);
break;
-
+
case PV_LOCALVARDEC:
case PV_VARDEC:
/* fields: item->u1.str == variable name
item->u2.val == variable value to assign
*/
break;
-
+
case PV_GOTO:
/* fields: item->u1.list == pval list of PV_WORD target names, up to 3, in order as given by user.
item->u1.list->u1.str == where the data on a PV_WORD will always be.
*/
-
+
if ( item->u1.list->next )
;
if ( item->u1.list->next && item->u1.list->next->next )
;
-
+
break;
-
+
case PV_LABEL:
/* fields: item->u1.str == label name
*/
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -537,7 +537,7 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
*/
traverse_pval_item_template(item->u4.for_statements,depth+1);
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -545,22 +545,22 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_BREAK:
/* fields: none
*/
break;
-
+
case PV_RETURN:
/* fields: none
*/
break;
-
+
case PV_CONTINUE:
/* fields: none
*/
break;
-
+
case PV_IFTIME:
/* fields: item->u1.list == there are 4 linked PV_WORDs here.
@@ -573,7 +573,7 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
traverse_pval_item_template(item->u3.else_statements,depth+1);
}
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random number expression, as supplied by user
@@ -586,7 +586,7 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
traverse_pval_item_template(item->u3.else_statements,depth+1);
}
break;
-
+
case PV_IF:
/* fields: item->u1.str == the if conditional, as supplied by user
@@ -599,16 +599,16 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
traverse_pval_item_template(item->u3.else_statements,depth+1);
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -618,12 +618,12 @@ void traverse_pval_item_template(pval *item, int depth)/* depth comes in handy f
*/
traverse_pval_item_template(item->u2.statements,depth+1);
break;
-
+
case PV_IGNOREPAT:
/* fields: item->u1.str == the ignorepat data
*/
break;
-
+
case PV_GLOBALS:
/* fields: item->u1.statements == pval list of statements, usually vardecs
*/
@@ -636,7 +636,7 @@ void traverse_pval_template(pval *item, int depth) /* depth comes in handy for a
but you may not need it */
{
pval *i;
-
+
for (i=item; i; i=i->next) {
traverse_pval_item_template(i, depth);
}
@@ -696,16 +696,16 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
{
int err1;
regex_t preg;
-
+
/* simple case, they match exactly, the pattern and exten name */
if (strcmp(pattern,exten) == 0)
return 1;
-
+
if (pattern[0] == '_') {
char reg1[2000];
const char *p;
char *r = reg1;
-
+
if ( strlen(pattern)*5 >= 2000 ) /* safety valve */ {
ast_log(LOG_ERROR,"Error: The pattern %s is way too big. Pattern matching cancelled.\n",
pattern);
@@ -725,7 +725,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
*r++ = 'X';
*r++ = ']';
break;
-
+
case 'Z':
*r++ = '[';
*r++ = '1';
@@ -734,7 +734,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
*r++ = 'Z';
*r++ = ']';
break;
-
+
case 'N':
*r++ = '[';
*r++ = '2';
@@ -743,7 +743,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
*r++ = 'N';
*r++ = ']';
break;
-
+
case '[':
while ( *p && *p != ']' ) {
*r++ = *p++;
@@ -754,7 +754,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
here->filename, here->startline, here->endline, pattern);
}
break;
-
+
case '.':
case '!':
*r++ = '.';
@@ -767,7 +767,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
default:
*r++ = *p;
break;
-
+
}
}
*r++ = '$'; /* what if the extension is a pattern ?? */
@@ -783,7 +783,7 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
}
err1 = regexec(&preg, exten, 0, 0, 0);
regfree(&preg);
-
+
if ( err1 ) {
/* ast_log(LOG_NOTICE,"*****************************[%d]Extension %s did not match %s(%s)\n",
err1,exten, pattern, reg1); */
@@ -793,8 +793,8 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
exten, pattern); */
return 1;
}
-
-
+
+
} else {
if ( strcmp(exten,pattern) == 0 ) {
return 1;
@@ -856,7 +856,7 @@ static void check_timerange(pval *p)
}
*e = '\0';
e++;
- while (*e && !isdigit(*e))
+ while (*e && !isdigit(*e))
e++;
if (!*e) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: The time range format (%s) is missing the end time!\n",
@@ -907,7 +907,7 @@ static void check_dow(pval *DOW)
char *c;
/* The following line is coincidence, really! */
int s, e;
-
+
dow = ast_strdupa(DOW->u1.str);
/* Check for all days */
@@ -1013,7 +1013,7 @@ static void check_month(pval *MON)
mon = ast_strdupa(MON->u1.str);
/* Check for all days */
- if (ast_strlen_zero(mon) || !strcmp(mon, "*"))
+ if (ast_strlen_zero(mon) || !strcmp(mon, "*"))
return ;
/* Get start and ending days */
c = strchr(mon, '-');
@@ -1044,11 +1044,11 @@ static void check_month(pval *MON)
static int check_break(pval *item)
{
pval *p = item;
-
+
while( p && p->type != PV_MACRO && p->type != PV_CONTEXT ) /* early cutout, sort of */ {
/* a break is allowed in WHILE, FOR, CASE, DEFAULT, PATTERN; otherwise, it don't make
no sense */
- if( p->type == PV_CASE || p->type == PV_DEFAULT || p->type == PV_PATTERN
+ if( p->type == PV_CASE || p->type == PV_DEFAULT || p->type == PV_PATTERN
|| p->type == PV_WHILE || p->type == PV_FOR ) {
return 1;
}
@@ -1057,14 +1057,14 @@ static int check_break(pval *item)
ast_log(LOG_ERROR,"Error: file %s, line %d-%d: 'break' not in switch, for, or while statement!\n",
item->filename, item->startline, item->endline);
errs++;
-
+
return 0;
}
static int check_continue(pval *item)
{
pval *p = item;
-
+
while( p && p->type != PV_MACRO && p->type != PV_CONTEXT ) /* early cutout, sort of */ {
/* a break is allowed in WHILE, FOR, CASE, DEFAULT, PATTERN; otherwise, it don't make
no sense */
@@ -1076,14 +1076,14 @@ static int check_continue(pval *item)
ast_log(LOG_ERROR,"Error: file %s, line %d-%d: 'continue' not in 'for' or 'while' statement!\n",
item->filename, item->startline, item->endline);
errs++;
-
+
return 0;
}
static struct pval *in_macro(pval *item)
{
struct pval *curr;
- curr = item;
+ curr = item;
while( curr ) {
if( curr->type == PV_MACRO ) {
return curr;
@@ -1096,7 +1096,7 @@ static struct pval *in_macro(pval *item)
static struct pval *in_context(pval *item)
{
struct pval *curr;
- curr = item;
+ curr = item;
while( curr ) {
if( curr->type == PV_MACRO || curr->type == PV_CONTEXT ) {
return curr;
@@ -1114,11 +1114,11 @@ static void check_label(pval *item)
struct pval *curr;
struct pval *x;
int alright = 0;
-
+
/* A label outside an extension just plain does not make sense! */
-
+
curr = item;
-
+
while( curr ) {
if( curr->type == PV_MACRO || curr->type == PV_EXTENSION ) {
alright = 1;
@@ -1130,21 +1130,21 @@ static void check_label(pval *item)
{
ast_log(LOG_ERROR,"Error: file %s, line %d-%d: Label %s is not within an extension or macro!\n",
item->filename, item->startline, item->endline, item->u1.str);
- errs++;
+ errs++;
}
-
-
+
+
/* basically, ensure that a label is not repeated in a context. Period.
The method: well, for each label, find the first label in the context
with the same name. If it's not the current label, then throw an error. */
-
+
/* printf("==== check_label: ====\n"); */
if( !current_extension )
curr = current_context;
else
curr = current_extension;
-
+
x = find_first_label_in_current_context((char *)item->u1.str, curr);
/* printf("Hey, check_label found with item = %x, and x is %x, and currcont is %x, label name is %s\n", item,x, current_context, (char *)item->u1.str); */
if( x && x != item )
@@ -1161,7 +1161,7 @@ static pval *get_goto_target(pval *item)
/* just one item-- the label should be in the current extension */
pval *curr_ext = get_extension_or_contxt(item); /* containing exten, or macro */
pval *curr_cont;
-
+
if (!item->u1.list) {
return NULL;
}
@@ -1175,21 +1175,21 @@ static pval *get_goto_target(pval *item)
/* TWO items */
if (item->u1.list->next && !item->u1.list->next->next) {
- if (!strstr((item->u1.list)->u1.str,"${")
+ if (!strstr((item->u1.list)->u1.str,"${")
&& !strstr(item->u1.list->next->u1.str,"${") ) /* Don't try to match variables */ {
struct pval *x = find_label_in_current_context((char *)item->u1.list->u1.str, (char *)item->u1.list->next->u1.str, curr_cont);
return x;
}
}
-
+
/* All 3 items! */
if (item->u1.list->next && item->u1.list->next->next) {
/* all three */
pval *first = item->u1.list;
pval *second = item->u1.list->next;
pval *third = item->u1.list->next->next;
-
- if (!strstr((item->u1.list)->u1.str,"${")
+
+ if (!strstr((item->u1.list)->u1.str,"${")
&& !strstr(item->u1.list->next->u1.str,"${")
&& !strstr(item->u1.list->next->next->u1.str,"${")) /* Don't try to match variables */ {
struct pval *x = find_label_in_current_db((char*)first->u1.str, (char*)second->u1.str, (char*)third->u1.str);
@@ -1197,7 +1197,7 @@ static pval *get_goto_target(pval *item)
struct pval *p3;
struct pval *that_context = find_context(item->u1.list->u1.str);
-
+
/* the target of the goto could be in an included context!! Fancy that!! */
/* look for includes in the current context */
if (that_context) {
@@ -1257,17 +1257,17 @@ static void check_goto(pval *item)
else
return;
}
-
+
/* TWO items */
if (item->u1.list->next && !item->u1.list->next->next) {
/* two items */
/* printf("Calling find_label_in_current_context with args %s, %s\n",
(char*)((item->u1.list)->u1.str), (char *)item->u1.list->next->u1.str); */
- if (!strstr((item->u1.list)->u1.str,"${")
+ if (!strstr((item->u1.list)->u1.str,"${")
&& !strstr(item->u1.list->next->u1.str,"${") ) /* Don't try to match variables */ {
struct pval *z = get_contxt(item);
struct pval *x = 0;
-
+
if (z)
x = find_label_in_current_context((char *)item->u1.list->u1.str, (char *)item->u1.list->next->u1.str, z);
@@ -1280,17 +1280,17 @@ static void check_goto(pval *item)
return;
}
}
-
+
/* All 3 items! */
if (item->u1.list->next && item->u1.list->next->next) {
/* all three */
pval *first = item->u1.list;
pval *second = item->u1.list->next;
pval *third = item->u1.list->next->next;
-
+
/* printf("Calling find_label_in_current_db with args %s, %s, %s\n",
(char*)first->u1.str, (char*)second->u1.str, (char*)third->u1.str); */
- if (!strstr((item->u1.list)->u1.str,"${")
+ if (!strstr((item->u1.list)->u1.str,"${")
&& !strstr(item->u1.list->next->u1.str,"${")
&& !strstr(item->u1.list->next->next->u1.str,"${")) /* Don't try to match variables */ {
struct pval *x = find_label_in_current_db((char*)first->u1.str, (char*)second->u1.str, (char*)third->u1.str);
@@ -1298,7 +1298,7 @@ static void check_goto(pval *item)
struct pval *p3;
struct pval *found = 0;
struct pval *that_context = find_context(item->u1.list->u1.str);
-
+
/* the target of the goto could be in an included context!! Fancy that!! */
/* look for includes in the current context */
if (that_context) {
@@ -1334,7 +1334,7 @@ static void check_goto(pval *item)
{
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: It's bad form to have a goto in a macro to a target outside the macro!\n",
item->filename, item->startline, item->endline);
- warns++;
+ warns++;
}
}
}
@@ -1343,7 +1343,7 @@ static void check_goto(pval *item)
#ifdef STANDALONE
struct pbx_find_info pfiq = {.stacklen = 0 };
extern int localized_pbx_load_module(void);
- /* if this is a standalone, we will need to make sure the
+ /* if this is a standalone, we will need to make sure the
localized load of extensions.conf is done */
if (!extensions_dot_conf_loaded) {
localized_pbx_load_module();
@@ -1351,9 +1351,9 @@ static void check_goto(pval *item)
}
pbx_find_extension(NULL, NULL, &pfiq, first->u1.str, second->u1.str, atoi(third->u1.str),
- atoi(third->u1.str) ? NULL : third->u1.str, NULL,
+ atoi(third->u1.str) ? NULL : third->u1.str, NULL,
atoi(third->u1.str) ? E_MATCH : E_FINDLABEL);
-
+
if (pfiq.status != STATUS_SUCCESS) {
ast_log(LOG_WARNING,"Warning: file %s, line %d-%d: goto: Couldn't find goto target %s|%s|%s, not even in extensions.conf!\n",
item->filename, item->startline, item->endline, first->u1.str, second->u1.str, third->u1.str);
@@ -1373,24 +1373,24 @@ static void check_goto(pval *item)
{
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: It's bad form to have a goto in a macro to a target outside the macro!\n",
item->filename, item->startline, item->endline);
- warns++;
+ warns++;
}
}
}
}
}
}
-
+
static void find_pval_goto_item(pval *item, int lev)
{
struct pval *p4;
-
+
if (lev>100) {
ast_log(LOG_ERROR,"find_pval_goto in infinite loop! item_type: %u\n\n", item->type);
return;
}
-
+
switch ( item->type ) {
case PV_MACRO:
/* fields: item->u1.str == name of macro
@@ -1400,12 +1400,12 @@ static void find_pval_goto_item(pval *item, int lev)
item->u3.macro_statements == pval list of statements in macro body.
*/
-
+
/* printf("Descending into macro %s at line %d\n", item->u1.str, item->startline); */
find_pval_gotos(item->u3.macro_statements,lev+1); /* if we're just searching for a context, don't bother descending into them */
-
+
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -1420,7 +1420,7 @@ static void find_pval_goto_item(pval *item, int lev)
/* printf("Descending into Case of %s\n", item->u1.str); */
find_pval_gotos(item->u2.statements,lev+1);
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -1428,15 +1428,15 @@ static void find_pval_goto_item(pval *item, int lev)
/* printf("Descending into Pattern of %s\n", item->u1.str); */
find_pval_gotos(item->u2.statements,lev+1);
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
/* printf("Descending into default\n"); */
find_pval_gotos(item->u2.statements,lev+1);
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
@@ -1444,21 +1444,21 @@ static void find_pval_goto_item(pval *item, int lev)
/* printf("Descending into catch of %s\n", item->u1.str); */
find_pval_gotos(item->u2.statements,lev+1);
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
/* printf("Descending into statement block\n"); */
find_pval_gotos(item->u1.list,lev+1);
break;
-
+
case PV_GOTO:
/* fields: item->u1.list == pval list of PV_WORD target names, up to 3, in order as given by user.
item->u1.list->u1.str == where the data on a PV_WORD will always be.
*/
check_goto(item); /* THE WHOLE FUNCTION OF THIS ENTIRE ROUTINE!!!! */
break;
-
+
case PV_INCLUDES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
@@ -1474,7 +1474,7 @@ static void find_pval_goto_item(pval *item, int lev)
}
}
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -1485,7 +1485,7 @@ static void find_pval_goto_item(pval *item, int lev)
/* printf("Descending into for at line %d\n", item->startline); */
find_pval_gotos(item->u4.for_statements,lev+1);
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -1494,7 +1494,7 @@ static void find_pval_goto_item(pval *item, int lev)
/* printf("Descending into while at line %d\n", item->startline); */
find_pval_gotos(item->u2.statements,lev+1);
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random number expression, as supplied by user
@@ -1502,7 +1502,7 @@ static void find_pval_goto_item(pval *item, int lev)
item->u3.else_statements == a pval list of statements in the else
(could be zero)
fall thru to PV_IF */
-
+
case PV_IFTIME:
/* fields: item->u1.list == the time values, 4 of them, as PV_WORD structs in a list
@@ -1525,17 +1525,17 @@ static void find_pval_goto_item(pval *item, int lev)
find_pval_gotos(item->u3.else_statements,lev+1);
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
/* printf("Descending into switch at line %d\n", item->startline); */
find_pval_gotos(item->u3.else_statements,lev+1);
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -1556,7 +1556,7 @@ static void find_pval_goto_item(pval *item, int lev)
static void find_pval_gotos(pval *item,int lev)
{
pval *i;
-
+
for (i=item; i; i=i->next) {
/* printf("About to call pval_goto_item, itemcount=%d, itemtype=%d\n", item_count, i->type); */
find_pval_goto_item(i, lev);
@@ -1569,7 +1569,7 @@ static void find_pval_gotos(pval *item,int lev)
static struct pval *match_pval_item(pval *item)
{
pval *x;
-
+
switch ( item->type ) {
case PV_MACRO:
/* fields: item->u1.str == name of macro
@@ -1581,15 +1581,15 @@ static struct pval *match_pval_item(pval *item)
*/
/* printf(" matching in MACRO %s, match_context=%s; retoncontmtch=%d; \n", item->u1.str, match_context, return_on_context_match); */
if (!strcmp(match_context,"*") || !strcmp(item->u1.str, match_context)) {
-
+
/* printf("MACRO: match context is: %s\n", match_context); */
-
+
if (return_on_context_match && !strcmp(item->u1.str, match_context)) /* if we're just searching for a context, don't bother descending into them */ {
/* printf("Returning on matching macro %s\n", match_context); */
return item;
}
-
-
+
+
if (!return_on_context_match) {
/* printf("Descending into matching macro %s/%s\n", match_context, item->u1.str); */
if ((x=match_pval(item->u3.macro_statements))) {
@@ -1600,9 +1600,9 @@ static struct pval *match_pval_item(pval *item)
} else {
/* printf("Skipping context/macro %s\n", item->u1.str); */
}
-
+
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -1615,7 +1615,7 @@ static struct pval *match_pval_item(pval *item)
/* printf("non-CONTEXT: Responded with pval match %x\n", x); */
return item;
}
-
+
if (!return_on_context_match ) {
/* printf("Descending into matching context %s\n", match_context); */
if ((x=match_pval(item->u2.statements))) /* if we're just searching for a context, don't bother descending into them */ {
@@ -1638,7 +1638,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -1649,9 +1649,9 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
/* printf(" matching in DEFAULT\n"); */
@@ -1660,7 +1660,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
@@ -1671,7 +1671,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
@@ -1681,19 +1681,19 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_LABEL:
/* fields: item->u1.str == label name
*/
- /* printf("PV_LABEL %s (cont=%s, exten=%s\n",
+ /* printf("PV_LABEL %s (cont=%s, exten=%s\n",
item->u1.str, current_context->u1.str, (current_extension?current_extension->u1.str:"<macro>"));*/
-
+
if (count_labels) {
if (!strcmp(match_label, item->u1.str)) {
label_count++;
last_matched_label = item;
}
-
+
} else {
if (!strcmp(match_label, item->u1.str)) {
/* printf("LABEL: Responded with pval match %x\n", x); */
@@ -1701,7 +1701,7 @@ static struct pval *match_pval_item(pval *item)
}
}
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -1715,7 +1715,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -1727,7 +1727,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random number expression, as supplied by user
@@ -1735,7 +1735,7 @@ static struct pval *match_pval_item(pval *item)
item->u3.else_statements == a pval list of statements in the else
(could be zero)
fall thru to PV_IF */
-
+
case PV_IFTIME:
/* fields: item->u1.list == the time values, 4 of them, as PV_WORD structs in a list
@@ -1761,11 +1761,11 @@ static struct pval *match_pval_item(pval *item)
}
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
/* printf(" matching in SWITCH\n"); */
@@ -1774,7 +1774,7 @@ static struct pval *match_pval_item(pval *item)
return x;
}
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -1821,7 +1821,7 @@ struct pval *match_pval(pval *item)
for (i=item; i; i=i->next) {
pval *x;
/* printf(" -- match pval: item %d\n", i->type); */
-
+
if ((x = match_pval_item(i))) {
/* printf("match_pval: returning x=%x\n", (int)x); */
return x; /* cut the search short */
@@ -1837,7 +1837,7 @@ int count_labels_in_current_context(char *label)
count_labels = 1;
return_on_context_match = 0;
match_pval(current_context->u2.statements);
-
+
return label_count;
}
#endif
@@ -1847,17 +1847,17 @@ struct pval *find_first_label_in_current_context(char *label, pval *curr_cont)
/* printf(" --- Got args %s, %s\n", exten, label); */
struct pval *ret;
struct pval *p3;
-
+
count_labels = 0;
return_on_context_match = 0;
match_context = "*";
match_exten = "*";
match_label = label;
-
+
ret = match_pval(curr_cont);
if (ret)
return ret;
-
+
/* the target of the goto could be in an included context!! Fancy that!! */
/* look for includes in the current context */
for (p3=curr_cont->u2.statements; p3; p3=p3->next) {
@@ -1887,7 +1887,7 @@ struct pval *find_label_in_current_context(char *exten, char *label, pval *curr_
/* printf(" --- Got args %s, %s\n", exten, label); */
struct pval *ret;
struct pval *p3;
-
+
count_labels = 0;
return_on_context_match = 0;
match_context = "*";
@@ -1896,7 +1896,7 @@ struct pval *find_label_in_current_context(char *exten, char *label, pval *curr_
ret = match_pval(curr_cont->u2.statements);
if (ret)
return ret;
-
+
/* the target of the goto could be in an included context!! Fancy that!! */
/* look for includes in the current context */
for (p3=curr_cont->u2.statements; p3; p3=p3->next) {
@@ -1941,7 +1941,7 @@ static struct pval *find_label_in_current_db(const char *context, const char *ex
match_context = context;
match_exten = exten;
match_label = label;
-
+
return match_pval(current_db);
}
@@ -2003,12 +2003,12 @@ int option_matches_j( struct argdesc *should, pval *is, struct argapp *app)
{
struct argchoice *ac;
char *opcop,*q,*p;
-
+
switch (should->dtype) {
case ARGD_OPTIONSET:
if ( strstr(is->u1.str,"${") )
return 0; /* no checking anything if there's a var reference in there! */
-
+
opcop = ast_strdupa(is->u1.str);
for (q=opcop;*q;q++) { /* erase the innards of X(innard) type arguments, so we don't get confused later */
@@ -2019,7 +2019,7 @@ int option_matches_j( struct argdesc *should, pval *is, struct argapp *app)
q = p+1;
}
}
-
+
for (ac=app->opts; ac; ac=ac->next) {
if (strlen(ac->name)>1 && strchr(ac->name,'(') == 0 && strcmp(ac->name,is->u1.str) == 0) /* multichar option, no parens, and a match? */
return 0;
@@ -2027,13 +2027,13 @@ int option_matches_j( struct argdesc *should, pval *is, struct argapp *app)
for (ac=app->opts; ac; ac=ac->next) {
if (strlen(ac->name)==1 || strchr(ac->name,'(')) {
char *p = strchr(opcop,ac->name[0]); /* wipe out all matched options in the user-supplied string */
-
+
if (p && *p == 'j') {
ast_log(LOG_ERROR, "Error: file %s, line %d-%d: The j option in the %s application call is not appropriate for AEL!\n",
is->filename, is->startline, is->endline, app->name);
errs++;
}
-
+
if (p) {
*p = '+';
if (ac->name[1] == '(') {
@@ -2058,14 +2058,14 @@ int option_matches_j( struct argdesc *should, pval *is, struct argapp *app)
default:
return 0;
}
-
+
}
int option_matches( struct argdesc *should, pval *is, struct argapp *app)
{
struct argchoice *ac;
char *opcop;
-
+
switch (should->dtype) {
case ARGD_STRING:
if (is_empty(is->u1.str) && should->type == ARGD_REQUIRED)
@@ -2073,21 +2073,21 @@ int option_matches( struct argdesc *should, pval *is, struct argapp *app)
if (is->u1.str && strlen(is->u1.str) > 0) /* most will match */
return 1;
break;
-
+
case ARGD_INT:
if (is_int(is->u1.str))
return 1;
else
return 0;
break;
-
+
case ARGD_FLOAT:
if (is_float(is->u1.str))
return 1;
else
return 0;
break;
-
+
case ARGD_ENUM:
if( !is->u1.str || strlen(is->u1.str) == 0 )
return 1; /* a null arg in the call will match an enum, I guess! */
@@ -2097,10 +2097,10 @@ int option_matches( struct argdesc *should, pval *is, struct argapp *app)
}
return 0;
break;
-
+
case ARGD_OPTIONSET:
opcop = ast_strdupa(is->u1.str);
-
+
for (ac=app->opts; ac; ac=ac->next) {
if (strlen(ac->name)>1 && strchr(ac->name,'(') == 0 && strcmp(ac->name,is->u1.str) == 0) /* multichar option, no parens, and a match? */
return 1;
@@ -2108,7 +2108,7 @@ int option_matches( struct argdesc *should, pval *is, struct argapp *app)
for (ac=app->opts; ac; ac=ac->next) {
if (strlen(ac->name)==1 || strchr(ac->name,'(')) {
char *p = strchr(opcop,ac->name[0]); /* wipe out all matched options in the user-supplied string */
-
+
if (p) {
*p = '+';
if (ac->name[1] == '(') {
@@ -2139,7 +2139,7 @@ int check_app_args(pval* appcall, pval *arglist, struct argapp *app)
struct argdesc *ad = app->args;
pval *pa;
int z;
-
+
for (pa = arglist; pa; pa=pa->next) {
if (!ad) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: Extra argument %s not in application call to %s !\n",
@@ -2151,12 +2151,12 @@ int check_app_args(pval* appcall, pval *arglist, struct argapp *app)
do {
if ( ad->dtype == ARGD_VARARG ) /* once we hit the VARARG, all bets are off. Discontinue the comparisons */
break;
-
+
z= option_matches( ad, pa, app);
if (!z) {
if ( !arglist )
arglist=appcall;
-
+
if (ad->type == ARGD_REQUIRED) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: Required argument %s not in application call to %s !\n",
arglist->filename, arglist->startline, arglist->endline, ad->dtype==ARGD_OPTIONSET?"options":ad->name, app->name);
@@ -2173,7 +2173,7 @@ int check_app_args(pval* appcall, pval *arglist, struct argapp *app)
/* any app nodes left, that are not optional? */
for ( ; ad; ad=ad->next) {
if (ad->type == ARGD_REQUIRED && ad->dtype != ARGD_VARARG) {
- if ( !arglist )
+ if ( !arglist )
arglist=appcall;
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: Required argument %s not in application call to %s !\n",
arglist->filename, arglist->startline, arglist->endline, ad->dtype==ARGD_OPTIONSET?"options":ad->name, app->name);
@@ -2196,11 +2196,11 @@ void check_switch_expr(pval *item, struct argapp *apps)
struct appsetvar *v,*v2;
struct argchoice *c;
pval *t;
-
+
p = item->u1.str;
while (p && *p && (*p == ' ' || *p == '\t' || *p == '$' || *p == '{' ) )
p++;
-
+
buff1 = ast_strdupa(p);
while (strlen(buff1) > 0 && ( buff1[strlen(buff1)-1] == '}' || buff1[strlen(buff1)-1] == ' ' || buff1[strlen(buff1)-1] == '\t'))
@@ -2221,7 +2221,7 @@ void check_switch_expr(pval *item, struct argapp *apps)
int def= 0;
int pat = 0;
int f1 = 0;
-
+
/* first of all, does this switch have a default case ? */
for (t=item->u2.statements; t; t=t->next) {
if (t->type == PV_DEFAULT) {
@@ -2275,7 +2275,7 @@ void check_switch_expr(pval *item, struct argapp *apps)
if (f1)
break;
}
-
+
/* see if it sets the var */
if (!f1) {
ast_log(LOG_WARNING,"Warning: file %s, line %d-%d: Couldn't find an application call in this extension that sets the expression (%s) value!\n",
@@ -2286,7 +2286,7 @@ void check_switch_expr(pval *item, struct argapp *apps)
#else
pval *t,*tl=0,*p2;
int def= 0;
-
+
/* first of all, does this switch have a default case ? */
for (t=item->u2.statements; t; t=t->next) {
if (t->type == PV_DEFAULT) {
@@ -2299,7 +2299,7 @@ void check_switch_expr(pval *item, struct argapp *apps)
return;
/* if no default, warn and insert a default case at the end */
p2 = tl->next = calloc(1, sizeof(struct pval));
-
+
p2->type = PV_DEFAULT;
p2->startline = tl->startline;
p2->endline = tl->endline;
@@ -2309,7 +2309,7 @@ void check_switch_expr(pval *item, struct argapp *apps)
ast_log(LOG_WARNING,"Warning: file %s, line %d-%d: A default case was automatically added to the switch.\n",
p2->filename, p2->startline, p2->endline);
warns++;
-
+
#endif
}
@@ -2336,7 +2336,7 @@ static void check_abstract_reference(pval *abstract_context)
{
pval *i,*j;
/* find some context includes that reference this context */
-
+
/* otherwise, print out a warning */
for (i=current_db; i; i=i->next) {
@@ -2371,13 +2371,13 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
char errmsg[4096];
char *strp;
-
+
switch (item->type) {
case PV_WORD:
/* fields: item->u1.str == string associated with this (word).
item->u2.arglist == pval list of 4 PV_WORD elements for time values (only in PV_INCLUDES) */
break;
-
+
case PV_MACRO:
/* fields: item->u1.str == name of macro
item->u2.arglist == pval list of PV_WORD arguments of macro, as given by user
@@ -2391,13 +2391,13 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
current_extension = 0;
check_macro_returns(item);
-
+
for (lp=item->u2.arglist; lp; lp=lp->next) {
-
+
}
check_pval(item->u3.macro_statements, apps,in_globals);
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -2412,7 +2412,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
in_abstract_context = 0;
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_MACRO_CALL:
/* fields: item->u1.str == name of macro to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -2420,7 +2420,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
item->u2.arglist->next == next arg
*/
#ifdef STANDALONE
- /* if this is a standalone, we will need to make sure the
+ /* if this is a standalone, we will need to make sure the
localized load of extensions.conf is done */
if (!extensions_dot_conf_loaded) {
localized_pbx_load_module();
@@ -2435,14 +2435,14 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
/* look for the macro in the extensions.conf world */
pbx_find_extension(NULL, NULL, &pfiq, item->u1.str, "s", 1, NULL, NULL, E_MATCH);
-
+
if (pfiq.status != STATUS_SUCCESS) {
char namebuf2[256];
snprintf(namebuf2, 256, "macro-%s", item->u1.str);
-
+
/* look for the macro in the extensions.conf world */
pbx_find_extension(NULL, NULL, &pfiq2, namebuf2, "s", 1, NULL, NULL, E_MATCH);
-
+
if (pfiq2.status == STATUS_SUCCESS) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: macro call to non-existent %s! (macro-%s was found in the extensions.conf stuff, but we are using gosubs!)\n",
item->filename, item->startline, item->endline, item->u1.str, item->u1.str);
@@ -2457,7 +2457,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: macro call to %s cannot be found in the AEL code!\n",
item->filename, item->startline, item->endline, item->u1.str);
warns++;
-
+
#endif
#ifdef THIS_IS_1DOT4
char namebuf2[256];
@@ -2465,13 +2465,13 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
/* look for the macro in the extensions.conf world */
pbx_find_extension(NULL, NULL, &pfiq, namebuf2, "s", 1, NULL, NULL, E_MATCH);
-
+
if (pfiq.status != STATUS_SUCCESS) {
ast_log(LOG_WARNING, "Warning: file %s, line %d-%d: macro call to %s was not found in the AEL, nor the extensions.conf !\n",
item->filename, item->startline, item->endline, item->u1.str);
warns++;
}
-
+
#endif
} else if (macro_def->type != PV_MACRO) {
@@ -2482,7 +2482,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
/* macro_def is a MACRO, so do the args match in number? */
int hereargs = 0;
int thereargs = 0;
-
+
for (lp=item->u2.arglist; lp; lp=lp->next) {
hereargs++;
}
@@ -2496,7 +2496,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
}
}
break;
-
+
case PV_APPLICATION_CALL:
/* fields: item->u1.str == name of application to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -2539,7 +2539,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
free(item->u1.str);
item->u1.str = 0;
}
-
+
#ifdef AAL_ARGCHECK
found = 0;
for (app=apps; app; app=app->next) {
@@ -2556,7 +2556,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_app_args(item, item->u2.arglist, app);
#endif
break;
-
+
case PV_CASE:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -2565,44 +2565,44 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
/* find the last statement */
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
*/
/* Make sure sequence of statements under case is terminated with goto, return, or break */
/* find the last statement */
-
+
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
*/
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_SWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
check_pval(item->u1.list, apps,in_globals);
break;
-
+
case PV_ESWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
check_pval(item->u1.list, apps,in_globals);
break;
-
+
case PV_INCLUDES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
@@ -2618,20 +2618,20 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_day(lp->u2.arglist->next->next);
check_month(lp->u2.arglist->next->next->next);
}
-
+
if (that_context) {
find_pval_gotos(that_context->u2.statements,0);
-
+
}
}
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
check_pval(item->u1.list, apps,in_globals);
break;
-
+
case PV_VARDEC:
/* fields: item->u1.str == variable name
item->u2.val == variable value to assign
@@ -2650,7 +2650,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_expr2_input(item,item->u2.val);
}
break;
-
+
case PV_LOCALVARDEC:
/* fields: item->u1.str == variable name
item->u2.val == variable value to assign
@@ -2667,7 +2667,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
}
check_expr2_input(item,item->u2.val);
break;
-
+
case PV_GOTO:
/* fields: item->u1.list == pval list of PV_WORD target names, up to 3, in order as given by user.
item->u1.list->u1.str == where the data on a PV_WORD will always be.
@@ -2675,10 +2675,10 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
/* don't check goto's in abstract contexts */
if ( in_abstract_context )
break;
-
+
check_goto(item);
break;
-
+
case PV_LABEL:
/* fields: item->u1.str == label name
*/
@@ -2690,7 +2690,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_label(item);
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -2722,11 +2722,11 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
}
check_expr2_input(item,item->u2.for_test);
check_expr2_input(item,item->u3.for_inc);
-
+
ast_expr_clear_extra_error_info();
check_pval(item->u4.for_statements, apps,in_globals);
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -2744,24 +2744,24 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_expr2_input(item,item->u1.str);
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_BREAK:
/* fields: none
*/
check_break(item);
break;
-
+
case PV_RETURN:
/* fields: none
*/
break;
-
+
case PV_CONTINUE:
/* fields: none
*/
check_continue(item);
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random number expression, as supplied by user
@@ -2786,7 +2786,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
break;
case PV_IFTIME:
- /* fields: item->u1.list == the if time values, 4 of them, each in PV_WORD, linked list
+ /* fields: item->u1.list == the if time values, 4 of them, each in PV_WORD, linked list
item->u2.statements == a pval list of statements in the if ()
item->u3.else_statements == a pval list of statements in the else
@@ -2804,7 +2804,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_pval(item->u3.else_statements, apps,in_globals);
}
break;
-
+
case PV_IF:
/* fields: item->u1.str == the if conditional, as supplied by user
@@ -2827,11 +2827,11 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_pval(item->u3.else_statements, apps,in_globals);
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
/* we can check the switch expression, see if it matches any of the app variables...
@@ -2839,7 +2839,7 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
check_switch_expr(item, apps);
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -2848,15 +2848,15 @@ void check_pval_item(pval *item, struct argapp *apps, int in_globals)
item->u4.regexten == an int boolean. non-zero says that regexten was specified
*/
current_extension = item ;
-
+
check_pval(item->u2.statements, apps,in_globals);
break;
-
+
case PV_IGNOREPAT:
/* fields: item->u1.str == the ignorepat data
*/
break;
-
+
case PV_GLOBALS:
/* fields: item->u1.statements == pval list of statements, usually vardecs
*/
@@ -2873,16 +2873,16 @@ void check_pval(pval *item, struct argapp *apps, int in_globals)
pval *i;
/* checks to do:
- 1. Do goto's point to actual labels?
+ 1. Do goto's point to actual labels?
2. Do macro calls reference a macro?
3. Does the number of macro args match the definition?
4. Is a macro call missing its & at the front?
5. Application calls-- we could check syntax for existing applications,
- but I need some some sort of universal description bnf for a general
- sort of method for checking arguments, in number, maybe even type, at least.
+ but I need some sort of universal description bnf for a general
+ sort of method for checking arguments, in number, maybe even type, at least.
Don't want to hand code checks for hundreds of applications.
*/
-
+
for (i=item; i; i=i->next) {
check_pval_item(i,apps,in_globals);
}
@@ -2890,7 +2890,7 @@ void check_pval(pval *item, struct argapp *apps, int in_globals)
void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *arg_notes)
{
-
+
#ifdef AAL_ARGCHECK
int argapp_errs =0;
char *rfilename;
@@ -2902,7 +2902,7 @@ void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *arg_not
#ifdef AAL_ARGCHECK
rfilename = ast_alloca(10 + strlen(ast_config_AST_VAR_DIR));
sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);
-
+
apps = argdesc_parse(rfilename, &argapp_errs); /* giveth */
#endif
current_db = item;
@@ -2942,7 +2942,7 @@ struct ael_extension *new_exten(void)
void linkprio(struct ael_extension *exten, struct ael_priority *prio, struct ael_extension *mother_exten)
{
char *p1, *p2;
-
+
if (!exten->plist) {
exten->plist = prio;
exten->plist_last = prio;
@@ -2952,7 +2952,7 @@ void linkprio(struct ael_extension *exten, struct ael_priority *prio, struct ael
}
if( !prio->exten )
prio->exten = exten; /* don't override the switch value */
- /* The following code will cause all priorities within an extension
+ /* The following code will cause all priorities within an extension
to have ${EXTEN} or ${EXTEN: replaced with ~~EXTEN~~, which is
set just before the first switch in an exten. The switches
will muck up the original ${EXTEN} value, so we save it away
@@ -2986,17 +2986,17 @@ void destroy_extensions(struct ael_extension *exten)
struct ael_extension *ne, *nen;
for (ne=exten; ne; ne=nen) {
struct ael_priority *pe, *pen;
-
+
if (ne->name)
free(ne->name);
-
+
/* cidmatch fields are allocated with name, and freed when
the name field is freed. Don't do a free for this field,
unless you LIKE to see a crash! */
if (ne->hints)
free(ne->hints);
-
+
for (pe=ne->plist; pe; pe=pen) {
pen = pe->next;
if (pe->app)
@@ -3024,7 +3024,7 @@ void destroy_extensions(struct ael_extension *exten)
static int label_inside_case(pval *label)
{
pval *p = label;
-
+
while( p && p->type != PV_MACRO && p->type != PV_CONTEXT ) /* early cutout, sort of */ {
if( p->type == PV_CASE || p->type == PV_DEFAULT || p->type == PV_PATTERN ) {
return 1;
@@ -3099,11 +3099,11 @@ int find_switch_item(pval *item)
case PV_LOCALVARDEC:
/* fields: item->u1.str == string associated with this (word). */
break;
-
+
case PV_WORD:
/* fields: item->u1.str == string associated with this (word). */
break;
-
+
case PV_MACRO:
/* fields: item->u1.str == name of macro
item->u2.arglist == pval list of PV_WORD arguments of macro, as given by user
@@ -3116,7 +3116,7 @@ int find_switch_item(pval *item)
if (contains_switch(item->u3.macro_statements))
return 1;
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -3126,7 +3126,7 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_MACRO_CALL:
/* fields: item->u1.str == name of macro to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -3134,7 +3134,7 @@ int find_switch_item(pval *item)
item->u2.arglist->next == next arg
*/
break;
-
+
case PV_APPLICATION_CALL:
/* fields: item->u1.str == name of application to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -3142,7 +3142,7 @@ int find_switch_item(pval *item)
item->u2.arglist->next == next arg
*/
break;
-
+
case PV_CASE:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -3151,7 +3151,7 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -3160,16 +3160,16 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
/* had better not see this */
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
@@ -3178,47 +3178,47 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_SWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
break;
-
+
case PV_ESWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
break;
-
+
case PV_INCLUDES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
item->u2.arglist == pval list of 4 PV_WORD elements for time values
*/
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
if (contains_switch(item->u1.list) )
return 1;
break;
-
+
case PV_VARDEC:
/* fields: item->u1.str == variable name
item->u2.val == variable value to assign
*/
break;
-
+
case PV_GOTO:
/* fields: item->u1.list == pval list of PV_WORD target names, up to 3, in order as given by user.
item->u1.list->u1.str == where the data on a PV_WORD will always be.
*/
break;
-
+
case PV_LABEL:
/* fields: item->u1.str == label name
*/
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -3229,7 +3229,7 @@ int find_switch_item(pval *item)
if (contains_switch(item->u4.for_statements))
return 1;
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -3238,22 +3238,22 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_BREAK:
/* fields: none
*/
break;
-
+
case PV_RETURN:
/* fields: none
*/
break;
-
+
case PV_CONTINUE:
/* fields: none
*/
break;
-
+
case PV_IFTIME:
/* fields: item->u1.list == there are 4 linked PV_WORDs here.
@@ -3268,7 +3268,7 @@ int find_switch_item(pval *item)
return 1;
}
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random number expression, as supplied by user
@@ -3283,7 +3283,7 @@ int find_switch_item(pval *item)
return 1;
}
break;
-
+
case PV_IF:
/* fields: item->u1.str == the if conditional, as supplied by user
@@ -3298,16 +3298,16 @@ int find_switch_item(pval *item)
return 1;
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
return 1; /* JACKPOT */
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -3318,12 +3318,12 @@ int find_switch_item(pval *item)
if (contains_switch(item->u2.statements))
return 1;
break;
-
+
case PV_IGNOREPAT:
/* fields: item->u1.str == the ignorepat data
*/
break;
-
+
case PV_GLOBALS:
/* fields: item->u1.statements == pval list of statements, usually vardecs
*/
@@ -3335,7 +3335,7 @@ int find_switch_item(pval *item)
int contains_switch(pval *item)
{
pval *i;
-
+
for (i=item; i; i=i->next) {
if (find_switch_item(i))
return 1;
@@ -3375,7 +3375,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
if (!(new_label = malloc(BUF_SIZE))) {
return -1;
}
-
+
if ((mother_exten && !mother_exten->checked_switch) || (exten && !exten->checked_switch)) {
if (contains_switch(statement)) { /* only run contains_switch if you haven't checked before */
if (mother_exten) {
@@ -3461,7 +3461,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
pr->origin = p;
linkprio(exten, pr, mother_exten);
break;
-
+
case PV_GOTO:
pr = new_prio();
pr->type = AEL_APPCALL;
@@ -3469,22 +3469,22 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
if( p->u2.goto_target ) {
p->u3.goto_target_in_case = label_inside_case(p->u2.goto_target);
}
-
+
if (!p->u1.list->next) /* just one */ {
pr->app = strdup("Goto");
if (!mother_exten)
pr->appargs = strdup(p->u1.list->u1.str);
- else { /* for the case of simple within-extension gotos in case/pattern/default statement blocks: */
+ else { /* for the case of simple within-extension gotos in case/pattern/default statement blocks: */
snprintf(buf1, BUF_SIZE, "%s,%s", mother_exten->name, p->u1.list->u1.str);
pr->appargs = strdup(buf1);
}
-
+
} else if (p->u1.list->next && !p->u1.list->next->next) /* two */ {
snprintf(buf1, BUF_SIZE, "%s,%s", p->u1.list->u1.str, p->u1.list->next->u1.str);
pr->app = strdup("Goto");
pr->appargs = strdup(buf1);
} else if (p->u1.list->next && p->u1.list->next->next) {
- snprintf(buf1, BUF_SIZE, "%s,%s,%s", p->u1.list->u1.str,
+ snprintf(buf1, BUF_SIZE, "%s,%s,%s", p->u1.list->u1.str,
p->u1.list->next->u1.str,
p->u1.list->next->next->u1.str);
pr->app = strdup("Goto");
@@ -3519,7 +3519,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
for_loop->type = AEL_CONTROL1; /* simple goto */
for_end->type = AEL_APPCALL;
for_init->app = strdup("MSet");
-
+
strcpy(buf2,p->u1.for_init);
remove_spaces_before_equals(buf2);
strp = strchr(buf2, '=');
@@ -3624,20 +3624,20 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
/* link & load! */
linkprio(exten, for_init, mother_exten);
linkprio(exten, for_test, mother_exten);
-
+
/* now, put the body of the for loop here */
exten->loop_break = for_end;
exten->loop_continue = for_inc;
-
+
if (gen_prios(exten, new_label, p->u4.for_statements, mother_exten, this_context)) { /* this will link in all the statements here */
return -1;
}
-
+
linkprio(exten, for_inc, mother_exten);
linkprio(exten, for_loop, mother_exten);
linkprio(exten, for_end, mother_exten);
-
-
+
+
exten->loop_break = loop_break_save;
exten->loop_continue = loop_continue_save;
for_loop->origin = p;
@@ -3664,19 +3664,19 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
while_end->appargs = strdup(buf1);
linkprio(exten, while_test, mother_exten);
-
+
/* now, put the body of the for loop here */
exten->loop_break = while_end;
exten->loop_continue = while_test;
-
+
if (gen_prios(exten, new_label, p->u2.statements, mother_exten, this_context)) { /* this will link in all the while body statements here */
return -1;
}
linkprio(exten, while_loop, mother_exten);
linkprio(exten, while_end, mother_exten);
-
-
+
+
exten->loop_break = loop_break_save;
exten->loop_continue = loop_continue_save;
while_loop->origin = p;
@@ -3703,11 +3703,11 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
linkprio(exten, switch_test, mother_exten);
linkprio(exten, switch_end, mother_exten);
-
+
exten->loop_break = switch_end;
exten->loop_continue = 0;
default_exists = 0;
-
+
for (p2=p->u2.statements; p2; p2=p2->next) {
/* now, for each case/default put the body of the for loop here */
if (p2->type == PV_CASE) {
@@ -3726,12 +3726,12 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
/* the break/continue locations are inherited from parent */
switch_case->loop_break = exten->loop_break;
switch_case->loop_continue = exten->loop_continue;
-
+
linkexten(exten,switch_case);
snprintf(buf1, BUF_SIZE, "sw_%d_%s", local_control_statement_count, p2->u1.str);
switch_case->name = strdup(buf1);
snprintf(new_label, BUF_SIZE, "sw_%s_%s_%d", label, p2->u1.str, local_control_statement_count);
-
+
if (gen_prios(switch_case, new_label, p2->u2.statements, exten, this_context)) { /* this will link in all the case body statements here */
return -1;
}
@@ -3870,7 +3870,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
}
switch_case->context = this_context;
switch_case->is_switch = 1;
-
+
/* new: the default case intros a pattern with ., which covers ALMOST everything.
but it doesn't cover a NULL pattern. So, we'll define a null extension to match
that goto's the default extension. */
@@ -3904,13 +3904,13 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
linkexten(exten,switch_case);
snprintf(buf1, BUF_SIZE, "_sw_%d_.", local_control_statement_count);
switch_case->name = strdup(buf1);
-
+
snprintf(new_label, BUF_SIZE, "sw_%s_default_%d", label, local_control_statement_count);
-
+
if (gen_prios(switch_case, new_label, p2->u2.statements, exten, this_context)) { /* this will link in all the default: body statements here */
return -1;
}
-
+
/* here is where we write code to "fall thru" to the next case... if there is one... */
for (p3=p2->u2.statements; p3; p3=p3->next) {
if (!p3->next)
@@ -3963,7 +3963,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
/* what could it be??? */
}
}
-
+
exten->loop_break = loop_break_save;
exten->loop_continue = loop_continue_save;
switch_test->origin = p;
@@ -4038,13 +4038,13 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
case PV_IFTIME:
control_statement_count++;
snprintf(new_label, BUF_SIZE, "iftime_%s_%d", label, control_statement_count);
-
+
if_test = new_prio();
if_test->type = AEL_IFTIME_CONTROL;
snprintf(buf1, BUF_SIZE, "%s,%s,%s,%s",
- p->u1.list->u1.str,
- p->u1.list->next->u1.str,
- p->u1.list->next->next->u1.str,
+ p->u1.list->u1.str,
+ p->u1.list->next->u1.str,
+ p->u1.list->next->next->u1.str,
p->u1.list->next->next->next->u1.str);
if_test->app = 0;
if_test->appargs = strdup(buf1);
@@ -4075,33 +4075,33 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
} else {
if_false->goto_true = if_end;
}
-
+
/* link & load! */
linkprio(exten, if_test, mother_exten);
linkprio(exten, if_false, mother_exten);
-
+
/* now, put the body of the if here */
-
+
if (gen_prios(exten, new_label, p->u2.statements, mother_exten, this_context)) { /* this will link in all the statements here */
return -1;
}
-
+
if (p->u3.else_statements) {
linkprio(exten, if_skip, mother_exten);
if (gen_prios(exten, new_label, p->u3.else_statements, mother_exten, this_context)) { /* this will link in all the statements here */
return -1;
}
}
-
+
linkprio(exten, if_end, mother_exten);
-
+
break;
case PV_RANDOM:
case PV_IF:
control_statement_count++;
snprintf(new_label, BUF_SIZE, "if_%s_%d", label, control_statement_count);
-
+
if_test = new_prio();
if_end = new_prio();
if_test->type = AEL_IF_CONTROL;
@@ -4116,7 +4116,7 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
if_end->app = strdup("NoOp");
if_end->appargs = strdup(buf1);
if_test->origin = p;
-
+
if (p->u3.else_statements) {
if_skip = new_prio();
if_skip->type = AEL_CONTROL1; /* simple goto */
@@ -4126,25 +4126,25 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
if_skip = 0;
if_test->goto_false = if_end;;
}
-
+
/* link & load! */
linkprio(exten, if_test, mother_exten);
-
+
/* now, put the body of the if here */
-
+
if (gen_prios(exten, new_label, p->u2.statements, mother_exten, this_context)) { /* this will link in all the statements here */
return -1;
}
-
+
if (p->u3.else_statements) {
linkprio(exten, if_skip, mother_exten);
if (gen_prios(exten, new_label, p->u3.else_statements, mother_exten, this_context)) { /* this will link in all the statements here */
return -1;
}
}
-
+
linkprio(exten, if_end, mother_exten);
-
+
break;
case PV_STATEMENTBLOCK:
@@ -4166,12 +4166,12 @@ static int gen_prios(struct ael_extension *exten, char *label, pval *statement,
switch_case->has_switch = exten->has_switch;
switch_case->checked_switch = exten->checked_switch;
}
-
+
switch_case->context = this_context;
linkexten(exten,switch_case);
switch_case->name = strdup(p->u1.str);
snprintf(new_label, BUF_SIZE, "catch_%s_%d",p->u1.str, control_statement_count);
-
+
if (gen_prios(switch_case, new_label, p->u2.statements, mother_exten,this_context)) { /* this will link in all the catch body statements here */
return -1;
}
@@ -4205,17 +4205,17 @@ void set_priorities(struct ael_extension *exten)
i=2;
else
i=1;
-
+
for (pr=exten->plist; pr; pr=pr->next) {
pr->priority_num = i;
-
+
if (!pr->origin || (pr->origin && pr->origin->type != PV_LABEL) ) /* Labels don't show up in the dialplan,
but we want them to point to the right
priority, which would be the next line
after the label; */
i++;
}
-
+
exten = exten->next_exten;
} while ( exten );
}
@@ -4231,16 +4231,16 @@ void add_extensions(struct ael_extension *exten)
}
do {
struct ael_priority *last = 0;
-
+
pbx_substitute_variables_helper(NULL, exten->name, realext, sizeof(realext) - 1);
if (exten->hints) {
- if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, PRIORITY_HINT, NULL, exten->cidmatch,
+ if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, PRIORITY_HINT, NULL, exten->cidmatch,
exten->hints, NULL, ast_free_ptr, registrar)) {
ast_log(LOG_WARNING, "Unable to add step at priority 'hint' of extension '%s'\n",
exten->name);
}
}
-
+
for (pr=exten->plist; pr; pr=pr->next) {
char app[2000];
char appargs[2000];
@@ -4252,7 +4252,7 @@ void add_extensions(struct ael_extension *exten)
last = pr;
continue;
}
-
+
if (pr->app)
strcpy(app, pr->app);
else
@@ -4265,7 +4265,7 @@ void add_extensions(struct ael_extension *exten)
case AEL_APPCALL:
/* easy case. Everything is all set up */
break;
-
+
case AEL_CONTROL1: /* FOR loop, WHILE loop, BREAK, CONTINUE, IF, IFTIME */
/* simple, unconditional goto. */
strcpy(app,"Goto");
@@ -4276,12 +4276,12 @@ void add_extensions(struct ael_extension *exten)
} else
snprintf(appargs,sizeof(appargs),"%d", pr->goto_true->priority_num);
break;
-
+
case AEL_FOR_CONTROL: /* WHILE loop test, FOR loop test */
strcpy(app,"GotoIf");
snprintf(appargs,sizeof(appargs),"%s?%d:%d", pr->appargs, pr->priority_num+1, pr->goto_false->priority_num);
break;
-
+
case AEL_IF_CONTROL:
strcpy(app,"GotoIf");
if (pr->origin->u3.else_statements )
@@ -4304,7 +4304,7 @@ void add_extensions(struct ael_extension *exten)
strcpy(app,"Return");
appargs[0] = 0;
break;
-
+
default:
break;
}
@@ -4313,10 +4313,10 @@ void add_extensions(struct ael_extension *exten)
}
else
label = 0;
-
- if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, pr->priority_num, (label?label:NULL), exten->cidmatch,
+
+ if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, pr->priority_num, (label?label:NULL), exten->cidmatch,
app, strdup(appargs), ast_free_ptr, registrar)) {
- ast_log(LOG_WARNING, "Unable to add step at priority '%d' of extension '%s'\n", pr->priority_num,
+ ast_log(LOG_WARNING, "Unable to add step at priority '%d' of extension '%s'\n", pr->priority_num,
exten->name);
}
last = pr;
@@ -4334,7 +4334,7 @@ static void attach_exten(struct ael_extension **list, struct ael_extension *newm
return;
}
lptr = *list;
-
+
while( lptr->next_exten ) {
lptr = lptr->next_exten;
}
@@ -4345,20 +4345,20 @@ static void attach_exten(struct ael_extension **list, struct ael_extension *newm
static pval *get_extension_or_contxt(pval *p)
{
while( p && p->type != PV_EXTENSION && p->type != PV_CONTEXT && p->type != PV_MACRO ) {
-
+
p = p->dad;
}
-
+
return p;
}
static pval *get_contxt(pval *p)
{
while( p && p->type != PV_CONTEXT && p->type != PV_MACRO ) {
-
+
p = p->dad;
}
-
+
return p;
}
@@ -4369,9 +4369,9 @@ static void fix_gotos_in_extensions(struct ael_extension *exten)
struct ael_priority *p;
for(p=e->plist;p;p=p->next) {
-
+
if( p->origin && p->origin->type == PV_GOTO && p->origin->u3.goto_target_in_case ) {
-
+
/* fix the extension of the goto target to the actual extension in the post-compiled dialplan */
pval *target = p->origin->u2.goto_target;
@@ -4379,24 +4379,24 @@ static void fix_gotos_in_extensions(struct ael_extension *exten)
pval *pv2 = p->origin;
char buf1[500];
char *apparg_save = p->appargs;
-
+
p->appargs = 0;
if (!pv2->u1.list->next) /* just one -- it won't hurt to repeat the extension */ {
snprintf(buf1,sizeof(buf1),"%s,%s", z->name, pv2->u1.list->u1.str);
p->appargs = strdup(buf1);
-
+
} else if (pv2->u1.list->next && !pv2->u1.list->next->next) /* two */ {
snprintf(buf1,sizeof(buf1),"%s,%s", z->name, pv2->u1.list->next->u1.str);
p->appargs = strdup(buf1);
} else if (pv2->u1.list->next && pv2->u1.list->next->next) {
- snprintf(buf1,sizeof(buf1),"%s,%s,%s", pv2->u1.list->u1.str,
+ snprintf(buf1,sizeof(buf1),"%s,%s,%s", pv2->u1.list->u1.str,
z->name,
pv2->u1.list->next->next->u1.str);
p->appargs = strdup(buf1);
}
else
printf("WHAT? The goto doesn't fall into one of three cases for GOTO????\n");
-
+
if( apparg_save ) {
free(apparg_save);
}
@@ -4447,12 +4447,12 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
for (p=root; p; p=p->next ) {
pval *lp;
int argc;
-
+
switch (p->type) {
case PV_MACRO:
-
+
context = ast_context_find_or_create(local_contexts, local_table, p->u1.str, registrar);
-
+
exten = new_exten();
exten->context = context;
exten->name = strdup("~~s~~");
@@ -4467,7 +4467,7 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
np2->appargs = strdup(buf);
linkprio(exten, np2, NULL);
}
-
+
/* CONTAINS APPCALLS, CATCH, just like extensions... */
if (gen_prios(exten, p->u1.str, p->u3.macro_statements, 0, context)) {
return -1;
@@ -4481,35 +4481,35 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
linkprio(exten, np2, NULL);
exten-> return_target = np2;
}
-
+
set_priorities(exten);
attach_exten(&exten_list, exten);
break;
-
+
case PV_GLOBALS:
/* already done */
break;
-
+
case PV_CONTEXT:
context = ast_context_find_or_create(local_contexts, local_table, p->u1.str, registrar);
-
+
/* contexts contain: ignorepat, includes, switches, eswitches, extensions, */
for (p2=p->u2.statements; p2; p2=p2->next) {
pval *p3;
char *s3;
-
+
switch (p2->type) {
case PV_EXTENSION:
exten = new_exten();
exten->name = strdup(p2->u1.str);
exten->context = context;
-
+
if( (s3=strchr(exten->name, '/') ) != 0 )
{
*s3 = 0;
exten->cidmatch = s3+1;
}
-
+
if ( p2->u3.hints )
exten->hints = strdup(p2->u3.hints);
exten->regexten = p2->u4.regexten;
@@ -4538,15 +4538,15 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
set_priorities(exten);
attach_exten(&exten_list, exten);
break;
-
+
case PV_IGNOREPAT:
ast_context_add_ignorepat2(context, p2->u1.str, registrar);
break;
-
+
case PV_INCLUDES:
for (p3 = p2->u1.list; p3 ;p3=p3->next) {
if ( p3->u2.arglist ) {
- snprintf(buf,sizeof(buf), "%s,%s,%s,%s,%s",
+ snprintf(buf,sizeof(buf), "%s,%s,%s,%s,%s",
p3->u1.str,
p3->u2.arglist->u1.str,
p3->u2.arglist->next->u1.str,
@@ -4557,7 +4557,7 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
ast_context_add_include2(context, p3->u1.str, registrar);
}
break;
-
+
case PV_SWITCHES:
for (p3 = p2->u1.list; p3 ;p3=p3->next) {
char *c = strchr(p3->u1.str, '/');
@@ -4587,13 +4587,13 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
break;
}
}
-
+
break;
-
+
default:
/* huh? what? */
break;
-
+
}
}
@@ -4667,7 +4667,7 @@ int ast_compile_ael2(struct ast_context **local_contexts, struct ast_hashtab *lo
fix_gotos_in_extensions(exten_list); /* find and fix extension ref in gotos to labels that are in case statements */
add_extensions(exten_list); /* actually makes calls to create priorities in ast_contexts -- feeds dialplan to asterisk */
destroy_extensions(exten_list); /* all that remains is an empty husk, discard of it as is proper */
-
+
return 0;
}
@@ -4685,7 +4685,7 @@ void destroy_pval_item(pval *item)
if (item->filename)
free(item->filename);
-
+
switch (item->type) {
case PV_WORD:
/* fields: item->u1.str == string associated with this (word). */
@@ -4694,7 +4694,7 @@ void destroy_pval_item(pval *item)
if ( item->u2.arglist )
destroy_pval(item->u2.arglist);
break;
-
+
case PV_MACRO:
/* fields: item->u1.str == name of macro
item->u2.arglist == pval list of PV_WORD arguments of macro, as given by user
@@ -4708,7 +4708,7 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u3.macro_statements);
break;
-
+
case PV_CONTEXT:
/* fields: item->u1.str == name of context
item->u2.statements == pval list of statements in context body
@@ -4718,7 +4718,7 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_MACRO_CALL:
/* fields: item->u1.str == name of macro to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -4729,7 +4729,7 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.arglist);
break;
-
+
case PV_APPLICATION_CALL:
/* fields: item->u1.str == name of application to call
item->u2.arglist == pval list of PV_WORD arguments of macro call, as given by user
@@ -4740,7 +4740,7 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.arglist);
break;
-
+
case PV_CASE:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -4749,7 +4749,7 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_PATTERN:
/* fields: item->u1.str == value of case
item->u2.statements == pval list of statements under the case
@@ -4758,14 +4758,14 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_DEFAULT:
- /* fields:
+ /* fields:
item->u2.statements == pval list of statements under the case
*/
destroy_pval(item->u2.statements);
break;
-
+
case PV_CATCH:
/* fields: item->u1.str == name of extension to catch
item->u2.statements == pval list of statements in context body
@@ -4774,32 +4774,32 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_SWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
destroy_pval(item->u1.list);
break;
-
+
case PV_ESWITCHES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
*/
destroy_pval(item->u1.list);
break;
-
+
case PV_INCLUDES:
/* fields: item->u1.list == pval list of PV_WORD elements, one per entry in the list
item->u2.arglist == pval list of 4 PV_WORD elements for time values
*/
destroy_pval(item->u1.list);
break;
-
+
case PV_STATEMENTBLOCK:
/* fields: item->u1.list == pval list of statements in block, one per entry in the list
*/
destroy_pval(item->u1.list);
break;
-
+
case PV_LOCALVARDEC:
case PV_VARDEC:
/* fields: item->u1.str == variable name
@@ -4810,22 +4810,22 @@ void destroy_pval_item(pval *item)
if (item->u2.val)
free(item->u2.val);
break;
-
+
case PV_GOTO:
/* fields: item->u1.list == pval list of PV_WORD target names, up to 3, in order as given by user.
item->u1.list->u1.str == where the data on a PV_WORD will always be.
*/
-
+
destroy_pval(item->u1.list);
break;
-
+
case PV_LABEL:
/* fields: item->u1.str == label name
*/
if (item->u1.str)
free(item->u1.str);
break;
-
+
case PV_FOR:
/* fields: item->u1.for_init == a string containing the initalizer
item->u2.for_test == a string containing the loop test
@@ -4841,7 +4841,7 @@ void destroy_pval_item(pval *item)
free(item->u3.for_inc);
destroy_pval(item->u4.for_statements);
break;
-
+
case PV_WHILE:
/* fields: item->u1.str == the while conditional, as supplied by user
@@ -4851,22 +4851,22 @@ void destroy_pval_item(pval *item)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_BREAK:
/* fields: none
*/
break;
-
+
case PV_RETURN:
/* fields: none
*/
break;
-
+
case PV_CONTINUE:
/* fields: none
*/
break;
-
+
case PV_IFTIME:
/* fields: item->u1.list == the 4 time values, in PV_WORD structs, linked list
@@ -4880,7 +4880,7 @@ void destroy_pval_item(pval *item)
destroy_pval(item->u3.else_statements);
}
break;
-
+
case PV_RANDOM:
/* fields: item->u1.str == the random percentage, as supplied by user
@@ -4902,18 +4902,18 @@ void destroy_pval_item(pval *item)
destroy_pval(item->u3.else_statements);
}
break;
-
+
case PV_SWITCH:
/* fields: item->u1.str == the switch expression
- item->u2.statements == a pval list of statements in the switch,
+ item->u2.statements == a pval list of statements in the switch,
(will be case statements, most likely!)
*/
if (item->u1.str)
free(item->u1.str);
destroy_pval(item->u2.statements);
break;
-
+
case PV_EXTENSION:
/* fields: item->u1.str == the extension name, label, whatever it's called
@@ -4927,14 +4927,14 @@ void destroy_pval_item(pval *item)
free(item->u3.hints);
destroy_pval(item->u2.statements);
break;
-
+
case PV_IGNOREPAT:
/* fields: item->u1.str == the ignorepat data
*/
if (item->u1.str)
free(item->u1.str);
break;
-
+
case PV_GLOBALS:
/* fields: item->u1.statements == pval list of statements, usually vardecs
*/
@@ -4944,13 +4944,13 @@ void destroy_pval_item(pval *item)
free(item);
}
-void destroy_pval(pval *item)
+void destroy_pval(pval *item)
{
pval *i,*nxt;
-
+
for (i=item; i; i=nxt) {
nxt = i->next;
-
+
destroy_pval_item(i);
}
}
@@ -5020,14 +5020,14 @@ int ael_is_funcname(char *name)
int s,t;
t = sizeof(ael_funclist)/sizeof(char*);
s = 0;
- while ((s < t) && strcasecmp(name, ael_funclist[s]))
+ while ((s < t) && strcasecmp(name, ael_funclist[s]))
s++;
if ( s < t )
return 1;
else
return 0;
}
-#endif
+#endif
/* PVAL PI */
@@ -5130,7 +5130,7 @@ void pvalMacroAddStatement( pval *p, pval *statement )
else
linku1(p->u3.macro_statements, statement);
-
+
}
pval *pvalMacroWalkStatements( pval *p, pval **next_statement )
@@ -5534,35 +5534,35 @@ char* pvalVarDecGetValue( pval *p )
void pvalGotoSetTarget( pval *p, char *context, char *exten, char *label )
{
pval *con, *ext, *pri;
-
+
if (!pvalCheckType(p, "pvalGotoSetTarget", PV_GOTO))
return;
if (context && strlen(context)) {
con = pvalCreateNode(PV_WORD);
ext = pvalCreateNode(PV_WORD);
pri = pvalCreateNode(PV_WORD);
-
+
con->u1.str = context;
ext->u1.str = exten;
pri->u1.str = label;
-
+
con->next = ext;
ext->next = pri;
p->u1.list = con;
} else if (exten && strlen(exten)) {
ext = pvalCreateNode(PV_WORD);
pri = pvalCreateNode(PV_WORD);
-
+
ext->u1.str = exten;
pri->u1.str = label;
-
+
ext->next = pri;
p->u1.list = ext;
} else {
pri = pvalCreateNode(PV_WORD);
-
+
pri->u1.str = label;
-
+
p->u1.list = pri;
}
}
@@ -5575,7 +5575,7 @@ void pvalGotoGetTarget( pval *p, char **context, char **exten, char **label )
*context = p->u1.list->u1.str;
*exten = p->u1.list->next->u1.str;
*label = p->u1.list->next->next->u1.str;
-
+
} else if (p->u1.list && p->u1.list->next ) {
*exten = p->u1.list->u1.str;
*label = p->u1.list->next->u1.str;
@@ -5585,7 +5585,7 @@ void pvalGotoGetTarget( pval *p, char **context, char **exten, char **label )
*label = p->u1.list->u1.str;
*context = 0;
*exten = 0;
-
+
} else {
*context = 0;
*exten = 0;
@@ -5941,4 +5941,3 @@ pval * linku1(pval *head, pval *tail)
}
return head;
}
-
diff --git a/res/ari/ari_model_validators.h b/res/ari/ari_model_validators.h
index 403a5fb17..d40a8c9d6 100644
--- a/res/ari/ari_model_validators.h
+++ b/res/ari/ari_model_validators.h
@@ -148,7 +148,7 @@ int ast_ari_validate_list(struct ast_json *json, int (*fn)(struct ast_json *));
/*! @} */
/*!
- * \brief Function type for validator functions. Allows for
+ * \brief Function type for validator functions. Allows for
*/
typedef int (*ari_validator)(struct ast_json *json);
diff --git a/res/ari/ari_websockets.c b/res/ari/ari_websockets.c
index 6a296dcf6..768e24e80 100644
--- a/res/ari/ari_websockets.c
+++ b/res/ari/ari_websockets.c
@@ -155,7 +155,7 @@ struct ast_json *ast_ari_websocket_session_read(
"{" \
" \"error\": \"InvalidMessage\"," \
" \"message\": \"Message validation failed\"" \
- "}"
+ "}"
int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
struct ast_json *message)
diff --git a/res/ari/config.c b/res/ari/config.c
index 2d3a80d0b..275f41d96 100644
--- a/res/ari/config.c
+++ b/res/ari/config.c
@@ -39,8 +39,8 @@ static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct ast_ari_conf, general),
- .category = "^general$",
- .category_match = ACO_WHITELIST,
+ .category = "general",
+ .category_match = ACO_WHITELIST_EXACT,
};
static struct aco_type *general_options[] = ACO_TYPES(&general_option);
@@ -156,8 +156,8 @@ static void *user_find(struct ao2_container *tmp_container, const char *cat)
static struct aco_type user_option = {
.type = ACO_ITEM,
.name = "user",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.matchfield = "type",
.matchvalue = "user",
.item_alloc = user_alloc,
diff --git a/res/ari/resource_events.c b/res/ari/resource_events.c
index 028144676..fb996f798 100644
--- a/res/ari/resource_events.c
+++ b/res/ari/resource_events.c
@@ -128,7 +128,7 @@ static void app_handler(void *data, const char *app_name,
if (!session) {
return;
}
-
+
/* Determine if we've been replaced */
if (strcmp(msg_type, "ApplicationReplaced") == 0 &&
strcmp(msg_application, app_name) == 0) {
@@ -339,4 +339,3 @@ void ast_ari_events_user_event(struct ast_variable *headers,
"Error processing request");
}
}
-
diff --git a/res/parking/res_parking.h b/res/parking/res_parking.h
index b8be0419b..6fbde0921 100644
--- a/res/parking/res_parking.h
+++ b/res/parking/res_parking.h
@@ -135,7 +135,7 @@ struct parking_lot_cfg *parking_lot_cfg_create(const char *cat);
* \param dynamic non-zero if creating a dynamic parking lot with this. Don't replace existing parking lots. Ever.
*
* \retval A reference to the new parking lot
- * \retval NULL if it was not found and could not be be allocated
+ * \retval NULL if it was not found and could not be allocated
*
* \note The parking lot will need to be unreffed if it ever falls out of scope
* \note The parking lot will automatically be added to the parking lot container if needed as part of this process
diff --git a/res/res_ael_share.c b/res/res_ael_share.c
index bbe870b10..0918f53b3 100644
--- a/res/res_ael_share.c
+++ b/res/res_ael_share.c
@@ -21,7 +21,7 @@
* \brief Shareable AEL code -- mainly between internal and external modules
*
* \author Steve Murphy <murf@digium.com>
- *
+ *
* \ingroup applications
*/
diff --git a/res/res_agi.c b/res/res_agi.c
index 4caa13bb1..f19303f4d 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2048,7 +2048,7 @@ static int handle_connection(const char *agiurl, const struct ast_sockaddr addr,
FastAGI defaults to port 4573 */
static enum agi_result launch_netscript(char *agiurl, char *argv[], int *fds)
{
- int s = 0, flags;
+ int s = 0;
char *host, *script;
int num_addrs = 0, i = 0;
struct ast_sockaddr *addrs;
@@ -2078,14 +2078,7 @@ static enum agi_result launch_netscript(char *agiurl, char *argv[], int *fds)
continue;
}
- if ((flags = fcntl(s, F_GETFL)) < 0) {
- ast_log(LOG_WARNING, "fcntl(F_GETFL) failed: %s\n", strerror(errno));
- close(s);
- continue;
- }
-
- if (fcntl(s, F_SETFL, flags | O_NONBLOCK) < 0) {
- ast_log(LOG_WARNING, "fnctl(F_SETFL) failed: %s\n", strerror(errno));
+ if (ast_fd_set_flags(s, O_NONBLOCK)) {
close(s);
continue;
}
@@ -2251,9 +2244,8 @@ static enum agi_result launch_script(struct ast_channel *chan, char *script, int
close(toast[1]);
return AGI_RESULT_FAILURE;
}
- res = fcntl(audio[1], F_GETFL);
- if (res > -1)
- res = fcntl(audio[1], F_SETFL, res | O_NONBLOCK);
+
+ res = ast_fd_set_flags(audio[1], O_NONBLOCK);
if (res < 0) {
ast_log(LOG_WARNING, "unable to set audio pipe parameters: %s\n", strerror(errno));
close(fromast[0]);
diff --git a/res/res_calendar.c b/res/res_calendar.c
index 16a326563..e8ad49910 100644
--- a/res/res_calendar.c
+++ b/res/res_calendar.c
@@ -18,7 +18,7 @@
/*! \file
* \brief Calendaring API
- *
+ *
* \todo Support responding to a meeting invite
* \todo Support writing attendees
*/
@@ -27,7 +27,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page calendar.conf calendar.conf
* \verbinclude calendar.conf.sample
*/
@@ -1859,8 +1859,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c
index 02a44c72f..0d938d295 100644
--- a/res/res_calendar_caldav.c
+++ b/res/res_calendar_caldav.c
@@ -322,7 +322,7 @@ static struct ast_str *caldav_get_events_between(struct caldav_pvt *pvt, time_t
return response;
}
-static time_t icalfloat_to_timet(icaltimetype time)
+static time_t icalfloat_to_timet(icaltimetype time)
{
struct ast_tm tm = {0,};
struct timeval tv;
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c
index 4e335dd97..e5d80b4b8 100644
--- a/res/res_calendar_icalendar.c
+++ b/res/res_calendar_icalendar.c
@@ -161,7 +161,7 @@ static icalcomponent *fetch_icalendar(struct icalendar_pvt *pvt)
return comp;
}
-static time_t icalfloat_to_timet(icaltimetype time)
+static time_t icalfloat_to_timet(icaltimetype time)
{
struct ast_tm tm = {0,};
struct timeval tv;
diff --git a/res/res_clialiases.c b/res/res_clialiases.c
index 633ed89f4..355d437ab 100644
--- a/res/res_clialiases.c
+++ b/res/res_clialiases.c
@@ -21,7 +21,7 @@
* \brief CLI Aliases
*
* \author\verbatim Joshua Colp <jcolp@digium.com> \endverbatim
- *
+ *
* This module provides the capability to create aliases to other
* CLI commands.
*/
@@ -30,7 +30,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page cli_aliases.conf cli_aliases.conf
* \verbinclude cli_aliases.conf.sample
*/
@@ -105,7 +105,7 @@ static char *cli_alias_passthrough(struct ast_cli_entry *e, int cmd, struct ast_
struct cli_alias tmp = {
.cli_entry.command = e->command,
};
- char *generator;
+ char *generator = NULL;
const char *line;
/* Try to find the alias based on the CLI entry */
@@ -120,14 +120,10 @@ static char *cli_alias_passthrough(struct ast_cli_entry *e, int cmd, struct ast_
case CLI_GENERATE:
line = a->line;
line += (strlen(alias->alias));
- if (!strncasecmp(alias->alias, alias->real_cmd, strlen(alias->alias))) {
- generator = NULL;
- } else if (!ast_strlen_zero(a->word)) {
+ if (strncasecmp(alias->alias, alias->real_cmd, strlen(alias->alias))) {
struct ast_str *real_cmd = ast_str_alloca(strlen(alias->real_cmd) + strlen(line) + 1);
ast_str_append(&real_cmd, 0, "%s%s", alias->real_cmd, line);
generator = ast_cli_generator(ast_str_buffer(real_cmd), a->word, a->n);
- } else {
- generator = ast_cli_generator(alias->real_cmd, a->word, a->n);
}
ao2_ref(alias, -1);
return generator;
@@ -282,8 +278,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_config_curl.c b/res/res_config_curl.c
index bc1a3fb35..61b62452d 100644
--- a/res/res_config_curl.c
+++ b/res/res_config_curl.c
@@ -23,7 +23,7 @@
* \author Tilghman Lesher <res_config_curl_v1@the-tilghman.com>
*
* Depends on the CURL library - http://curl.haxx.se/
- *
+ *
*/
/*** MODULEINFO
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index a21aa31a8..78f1fa80e 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -35,7 +35,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page res_ldap.conf res_ldap.conf
* \verbinclude res_ldap.conf.sample
*/
@@ -92,7 +92,7 @@ struct category_and_metric {
int var_metric; /*!< For organizing variables (particularly includes and switch statments) within a context */
};
-/*! \brief Table configuration
+/*! \brief Table configuration
*/
struct ldap_table_config {
char *table_name; /*!< table name */
@@ -103,7 +103,7 @@ struct ldap_table_config {
/* TODO: Make proxies work */
};
-/*! \brief Should be locked before using it
+/*! \brief Should be locked before using it
*/
static AST_LIST_HEAD_NOLOCK_STATIC(table_configs, ldap_table_config);
static struct ldap_table_config *base_table_config;
@@ -134,7 +134,7 @@ static struct ldap_table_config *table_config_new(const char *table_name)
/*! \brief Find a table_config
*
- * Should be locked before using it
+ * Should be locked before using it
*
* \note This function assumes ldap_lock to be locked.
*/
@@ -180,7 +180,7 @@ static int semicolon_count_str(const char *somestr)
}
/* \brief Count semicolons in variables
- *
+ *
* takes a linked list of \a ast_variable variables, finds the one with the name variable_value
* and returns the number of semicolons in the value for that \a ast_variable
*/
@@ -273,7 +273,7 @@ static const char *convert_attribute_name_to_ldap(struct ldap_table_config *tabl
return attribute_name;
}
-/*! \brief Convert ldap attribute name to variable name
+/*! \brief Convert ldap attribute name to variable name
*
* \note Should be locked before using it
*/
@@ -301,7 +301,7 @@ static const char *convert_attribute_name_from_ldap(struct ldap_table_config *ta
return attribute_name;
}
-/*! \brief Get variables from ldap entry attributes
+/*! \brief Get variables from ldap entry attributes
* \note Should be locked before using it
* \return a linked list of ast_variable variables.
*/
@@ -311,8 +311,10 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
BerElement *ber = NULL;
struct ast_variable *var = NULL;
struct ast_variable *prev = NULL;
+#if 0
int is_delimited = 0;
int i = 0;
+#endif
char *ldap_attribute_name;
struct berval *value;
int pos = 0;
@@ -340,6 +342,7 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
ast_debug(2, "md5: %s\n", valptr);
}
if (valptr) {
+#if 0
/* ok, so looping through all delimited values except the last one (not, last character is not delimited...) */
if (is_delimited) {
i = 0;
@@ -360,6 +363,7 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
i++;
}
}
+#endif
/* for the last delimited value or if the value is not delimited: */
if (prev) {
prev->next = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
@@ -384,7 +388,7 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
/*! \brief Get variables from ldap entry attributes - Should be locked before using it
*
* The results are freed outside this function so is the \a vars array.
- *
+ *
* \return \a vars - an array of ast_variable variables terminated with a null.
*/
static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_config *table_config,
@@ -407,7 +411,7 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
*/
ldap_entry = ldap_first_entry(ldapConn, ldap_result_msg);
- for (tot_count = 0; ldap_entry; tot_count++) {
+ for (tot_count = 0; ldap_entry; tot_count++) {
struct ast_variable *tmp = realtime_ldap_entry_to_var(table_config, ldap_entry);
tot_count += semicolon_count_var(tmp);
ldap_entry = ldap_next_entry(ldapConn, ldap_entry);
@@ -582,7 +586,7 @@ static int is_ldap_connect_error(int err)
/*! \brief Get LDAP entry by dn and return attributes as variables
*
- * Should be locked before using it
+ * Should be locked before using it
*
* This is used for setting the default values of an object
* i.e., with accountBaseDN
@@ -704,7 +708,7 @@ static char *cleaned_basedn(struct ast_channel *channel, const char *basedn)
return cbasedn;
}
-/*! \brief Replace \<search\> by \<by\> in string.
+/*! \brief Replace \<search\> by \<by\> in string.
* \note No check is done on string allocated size !
*/
static int replace_string_in_string(char *string, const char *search, const char *by)
@@ -729,7 +733,7 @@ static int replace_string_in_string(char *string, const char *search, const char
return replaced;
}
-/*! \brief Append a name=value filter string. The filter string can grow.
+/*! \brief Append a name=value filter string. The filter string can grow.
*/
static void append_var_and_value_to_filter(struct ast_str **filter,
struct ldap_table_config *table_config,
@@ -797,7 +801,7 @@ static struct ast_str *create_lookup_filter(struct ldap_table_config *config, co
return filter;
}
-/*! \brief LDAP base function
+/*! \brief LDAP base function
* \return a null terminated array of ast_variable (one per entry) or NULL if no entry is found or if an error occured
* caller should free the returned array and ast_variables
* \param entries_count_ptr is a pointer to found entries count (can be NULL)
@@ -821,7 +825,7 @@ static struct ast_variable **realtime_ldap_base_ap(unsigned int *entries_count_p
ast_log(LOG_ERROR, "No table_name specified.\n");
ast_free(clean_basedn);
return NULL;
- }
+ }
if (!field) {
ast_log(LOG_ERROR, "Realtime retrieval requires at least 1 parameter"
@@ -878,7 +882,7 @@ static struct ast_variable **realtime_ldap_base_ap(unsigned int *entries_count_p
ast_log(LOG_WARNING, "Failed to query directory. Error: %s.\n", ldap_err2string(result));
ast_log(LOG_WARNING, "Query: %s\n", ast_str_buffer(filter));
} else {
- /* this is where we create the variables from the search result
+ /* this is where we create the variables from the search result
* freeing this \a vars outside this function */
if (ldap_count_entries(ldapConn, ldap_result_msg) > 0) {
/* is this a static var or some other? they are handled different for delimited values */
@@ -900,7 +904,7 @@ static struct ast_variable **realtime_ldap_base_ap(unsigned int *entries_count_p
if (strcasecmp(tmp->name, "accountBaseDN") == 0) {
/* Get the variable to compare with for the defaults */
struct ast_variable *base_var = ldap_loadentry(table_config, tmp->value);
-
+
while (base_var) {
struct ast_variable *next = base_var->next;
struct ast_variable *test_var = *p;
@@ -1103,7 +1107,7 @@ static int compare_categories(const void *a, const void *b)
return 1;
} else if (as->metric == bs->metric && strcmp(as->name, bs->name) != 0) {
return strcmp(as->name, bs->name);
- }
+ }
/* if the metric and the category name is the same, we check the variable metric */
if (as->var_metric < bs->var_metric) {
return -1;
@@ -1117,7 +1121,7 @@ static int compare_categories(const void *a, const void *b)
/*! \brief See Asterisk Realtime Documentation
*
* This is for Static Realtime
- *
+ *
* load the configuration stuff for the .conf files
* called on a reload
*/
@@ -1703,8 +1707,8 @@ static struct ast_config_engine ldap_engine = {
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*
* \todo Don't error or warn on a default install. If the config is
@@ -1772,7 +1776,7 @@ static int reload(void)
ast_log(LOG_NOTICE, "Cannot reload LDAP RealTime driver.\n");
ast_mutex_unlock(&ldap_lock);
return 0;
- }
+ }
if (!ldap_reconnect()) {
ast_log(LOG_WARNING, "Couldn't establish connection to your directory server. Check debug.\n");
@@ -1859,7 +1863,7 @@ static int parse_config(void)
if (!(s = ast_variable_retrieve(config, "_general", "basedn"))) {
ast_log(LOG_ERROR, "No LDAP base dn found, using '%s' as default.\n", RES_CONFIG_LDAP_DEFAULT_BASEDN);
ast_copy_string(base_distinguished_name, RES_CONFIG_LDAP_DEFAULT_BASEDN, sizeof(base_distinguished_name));
- } else
+ } else
ast_copy_string(base_distinguished_name, s, sizeof(base_distinguished_name));
if (!(s = ast_variable_retrieve(config, "_general", "version")) && !(s = ast_variable_retrieve(config, "_general", "protocol"))) {
@@ -1875,7 +1879,7 @@ static int parse_config(void)
int is_general = (strcasecmp(category_name, "_general") == 0);
int is_config = (strcasecmp(category_name, "config") == 0); /*!< using the [config] context for Static RealTime */
struct ast_variable *var = ast_variable_browse(config, category_name);
-
+
if (var) {
struct ldap_table_config *table_config =
table_config_for_table_name(category_name);
@@ -1974,7 +1978,7 @@ static char *realtime_ldap_status(struct ast_cli_entry *e, int cmd, struct ast_c
if (!ldapConn)
return CLI_FAILURE;
- if (!ast_strlen_zero(url))
+ if (!ast_strlen_zero(url))
snprintf(status, sizeof(status), "Connected to '%s', baseDN %s", url, base_distinguished_name);
if (!ast_strlen_zero(user))
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 583a84558..e86445088 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -145,7 +145,7 @@ static SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data)
ENCODE_CHUNK(encodebuf, newval);
ast_string_field_set(cps, encoding[x], encodebuf);
newval = cps->encoding[x];
- }
+ }
SQLBindParameter(stmt, x++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(newval), 0, (void *)newval, 0, NULL);
}
@@ -245,7 +245,7 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
for (x = 0; x < colcount; x++) {
colsize = 0;
collen = sizeof(coltitle);
- res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
+ res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Describe Column error! [%s]\n", ast_str_buffer(sql));
@@ -315,7 +315,7 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
* \param ap list containing one or more field/operator/value set.
*
* Select database and preform query on table, prepare the sql statement
- * Sub-in the values to the prepared statement and execute it.
+ * Sub-in the values to the prepared statement and execute it.
* Execute this prepared query against several ODBC connected databases.
* Return results as an ast_config variable.
*
@@ -416,7 +416,7 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
for (x=0;x<colcount;x++) {
colsize = 0;
collen = sizeof(coltitle);
- res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
+ res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen,
&datatype, &colsize, &decimaldigits, &nullable);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Describe Column error! [%s]\n", ast_str_buffer(sql));
@@ -1015,7 +1015,7 @@ static struct ast_config *config_odbc(const char *database, const char *table, c
return NULL;
}
continue;
- }
+ }
if (strcmp(last, q.category) || last_cat_metric != q.cat_metric) {
cur_cat = ast_category_new_dynamic(q.category);
if (!cur_cat) {
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index fa45fec35..1834333a0 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -27,7 +27,7 @@
* res_config_sqlite is a module for the Asterisk Open Source PBX to
* support SQLite 2 databases. It can be used to fetch configuration
* from a database (static configuration files and/or using the Asterisk
- * RealTime Architecture - ARA). It can also be used to log CDR entries.
+ * RealTime Architecture - ARA). It can also be used to log CDR entries.
* Note that Asterisk already comes with a module named cdr_sqlite.
* There are two reasons for including it in res_config_sqlite:
* the first is that rewriting it was a training to learn how to write a
@@ -75,7 +75,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page res_config_sqlite.conf res_config_sqlite.conf
* \verbinclude res_config_sqlite.conf.sample
*/
@@ -431,7 +431,7 @@ static int realtime_destroy_handler(const char *database, const char *table,
* \brief Asterisk callback function for the CLI status command.
*
* \param e CLI command
- * \param cmd
+ * \param cmd
* \param a CLI argument list
* \return RESULT_SUCCESS
*/
@@ -1657,8 +1657,8 @@ static int unload_module(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_config_sqlite3.c b/res/res_config_sqlite3.c
index 56558624f..a03397034 100644
--- a/res/res_config_sqlite3.c
+++ b/res/res_config_sqlite3.c
@@ -33,7 +33,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page res_config_sqlite3.conf res_config_sqlite3.conf
* \verbinclude res_config_sqlite3.conf.sample
*/
@@ -1171,7 +1171,7 @@ static int realtime_sqlite3_require(const char *database, const char *table, va_
struct realtime_sqlite3_db *db;
/* SQLite3 columns are dynamically typed, with type affinity. Built-in functions will
- * return the results as char * anyway. The only field that that cannot contain text
+ * return the results as char * anyway. The only field that cannot contain text
* data is an INTEGER PRIMARY KEY, which must be a 64-bit signed integer. So, for
* the purposes here we really only care whether the column exists and not what its
* type or length is. */
@@ -1352,8 +1352,8 @@ static void discover_sqlite3_caps(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_convert.c b/res/res_convert.c
index c2966a85f..3fa9d515a 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -18,13 +18,13 @@
*/
/*! \file
- *
+ *
* \brief file format conversion CLI command using Asterisk formats and translators
*
* \author redice li <redice_li@yahoo.com>
* \author Russell Bryant <russell@digium.com>
*
- */
+ */
/*** MODULEINFO
<support_level>core</support_level>
@@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
static int split_ext(char *filename, char **name, char **ext)
{
*name = *ext = filename;
-
+
if ((*ext = strrchr(filename, '.'))) {
**ext = '\0';
(*ext)++;
@@ -55,8 +55,8 @@ static int split_ext(char *filename, char **name, char **ext)
return 0;
}
-/*!
- * \brief Convert a file from one format to another
+/*!
+ * \brief Convert a file from one format to another
* \param e CLI entry
* \param cmd command number
* \param a list of cli arguments
@@ -87,13 +87,13 @@ static char *handle_cli_file_convert(struct ast_cli_entry *e, int cmd, struct as
case CLI_GENERATE:
return NULL;
}
-
+
/* ugly, can be removed when CLI entries have ast_module pointers */
ast_module_ref(ast_module_info->self);
if (a->argc != 4 || ast_strlen_zero(a->argv[2]) || ast_strlen_zero(a->argv[3])) {
ret = CLI_SHOWUSAGE;
- goto fail_out;
+ goto fail_out;
}
file_in = ast_strdupa(a->argv[2]);
@@ -107,7 +107,7 @@ static char *handle_cli_file_convert(struct ast_cli_entry *e, int cmd, struct as
ast_cli(a->fd, "Unable to open input file: %s\n", a->argv[2]);
goto fail_out;
}
-
+
if (split_ext(file_out, &name_out, &ext_out)) {
ast_cli(a->fd, "'%s' is an invalid filename!\n", a->argv[3]);
goto fail_out;
@@ -118,7 +118,7 @@ static char *handle_cli_file_convert(struct ast_cli_entry *e, int cmd, struct as
}
start = ast_tvnow();
-
+
while ((f = ast_readframe(fs_in))) {
if (ast_writestream(fs_out, f)) {
ast_frfree(f);
@@ -139,7 +139,7 @@ fail_out:
ast_filedelete(name_out, ext_out);
}
- if (fs_in)
+ if (fs_in)
ast_closestream(fs_in);
ast_module_unref(ast_module_info->self);
diff --git a/res/res_corosync.c b/res/res_corosync.c
index ce94e4151..af8afdb7f 100644
--- a/res/res_corosync.c
+++ b/res/res_corosync.c
@@ -1205,4 +1205,3 @@ static int unload_module(void)
}
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Corosync");
-
diff --git a/res/res_curl.c b/res/res_curl.c
index 4906dde77..aa10eff91 100644
--- a/res/res_curl.c
+++ b/res/res_curl.c
@@ -23,14 +23,14 @@
* \author Tilghman Lesher <res_curl_v1@the-tilghman.com>
*
* Depends on the CURL library - http://curl.haxx.se/
- *
+ *
*/
/*! \li \ref res_curl.c uses the configuration file \ref res_curl.conf
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page res_curl.conf res_curl.conf
* \verbinclude res_curl.conf.sample
*/
@@ -61,7 +61,9 @@ static int unload_module(void)
/* If the dependent modules are still in memory, forbid unload */
for (i = 0; i < ARRAY_LEN(dependents); i++) {
if (ast_module_check(dependents[i])) {
- ast_log(LOG_ERROR, "%s (dependent module) is still loaded. Cannot unload res_curl.so\n", dependents[i]);
+ if (!ast_shutting_down()) {
+ ast_log(LOG_WARNING, "%s (dependent module) is still loaded. Cannot unload res_curl.so\n", dependents[i]);
+ }
res = -1;
}
}
@@ -74,19 +76,9 @@ static int unload_module(void)
return res;
}
-/*!
- * \brief Load the module
- *
- * Module loading including tests for configuration or dependencies.
- * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
- * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
- * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
- */
static int load_module(void)
{
- int res = 0;
+ int res = AST_MODULE_LOAD_SUCCESS;
if (curl_global_init(CURL_GLOBAL_ALL)) {
ast_log(LOG_ERROR, "Unable to initialize the cURL library. Cannot load res_curl.so\n");
diff --git a/res/res_fax.c b/res/res_fax.c
index 6e4451b67..823d560d9 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -365,7 +365,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
'gateway' and state is 'Uninitialized'.</para>
</parameter>
<parameter name="FileName" required="false">
- <para>Filename of the image being sent/recieved for this FAX session. This field is not
+ <para>Filename of the image being sent/received for this FAX session. This field is not
included if Operation isn't 'send' or 'receive'.</para>
</parameter>
<parameter name="PagesTransmitted" required="false">
@@ -377,7 +377,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
Operation is not 'send' or 'receive'. Will be 0 for 'send'.</para>
</parameter>
<parameter name="TotalBadLines" required="false">
- <para>Total number of bad lines sent/recieved during this session. This field is not
+ <para>Total number of bad lines sent/received during this session. This field is not
included if Operation is not 'send' or 'received'.</para>
</parameter>
</syntax>
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c
index 0152b00dd..26f9ed372 100644
--- a/res/res_fax_spandsp.c
+++ b/res/res_fax_spandsp.c
@@ -859,7 +859,7 @@ static int spandsp_fax_gateway_start(struct ast_fax_session *s)
t38_set_fill_bit_removal(p->t38_core_state, t38_param->fill_bit_removal);
t38_set_mmr_transcoding(p->t38_core_state, t38_param->transcoding_mmr);
t38_set_jbig_transcoding(p->t38_core_state, t38_param->transcoding_jbig);
- t38_set_data_rate_management_method(p->t38_core_state,
+ t38_set_data_rate_management_method(p->t38_core_state,
(t38_param->rate_management == AST_T38_RATE_MANAGEMENT_TRANSFERRED_TCF)? 1 : 2);
t38_gateway_set_transmit_on_idle(&p->t38_gw_state, TRUE);
@@ -868,7 +868,7 @@ static int spandsp_fax_gateway_start(struct ast_fax_session *s)
t38_gateway_set_supported_modems(&p->t38_gw_state, spandsp_modems(s->details));
- /* engage udptl nat on other side of T38 line
+ /* engage udptl nat on other side of T38 line
* (Asterisk changes media ports thus we send a few packets to reinitialize
* pinholes in NATs and FWs
*/
diff --git a/res/res_format_attr_opus.c b/res/res_format_attr_opus.c
index 857b9435c..9e5fe6673 100644
--- a/res/res_format_attr_opus.c
+++ b/res/res_format_attr_opus.c
@@ -116,7 +116,7 @@ static void sdp_fmtp_get(const char *attributes, const char *name, int *attr)
/* Skip any preceeding blanks as some implementations separate attributes using spaces too */
kvp = ast_skip_blanks(kvp);
- /* If we are at at the requested attribute get its value and return */
+ /* If we are at the requested attribute get its value and return */
if (!strncmp(kvp, name, strlen(name)) && kvp[strlen(name)] == '=') {
if (sscanf(kvp, "%*[^=]=%30d", &val) == 1) {
*attr = val;
diff --git a/res/res_format_attr_silk.c b/res/res_format_attr_silk.c
index d52ec7410..fcbe7a846 100644
--- a/res/res_format_attr_silk.c
+++ b/res/res_format_attr_silk.c
@@ -111,7 +111,7 @@ static void silk_generate_sdp_fmtp(const struct ast_format *format, unsigned int
return;
}
- if ((attr->maxbitrate > 5000) && (attr->maxbitrate < 40000)) {
+ if ((attr->maxbitrate > 5000) && (attr->maxbitrate < 40000)) {
ast_str_append(str, 0, "a=fmtp:%u maxaveragebitrate=%u\r\n", payload, attr->maxbitrate);
}
diff --git a/res/res_hep.c b/res/res_hep.c
index f3b65ad26..a91b7ec77 100644
--- a/res/res_hep.c
+++ b/res/res_hep.c
@@ -260,8 +260,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct module_config, general),
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -423,7 +423,7 @@ int hepv3_is_loaded(void)
{
RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
- return (config != NULL) ? 1 : 0;
+ return config && config->general->enabled;
}
struct hepv3_capture_info *hepv3_create_capture_info(const void *payload, size_t len)
diff --git a/res/res_http_post.c b/res/res_http_post.c
index 4b864b5d8..f7c4d308f 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -17,7 +17,7 @@
*/
/*!
- * \file
+ * \file
* \brief HTTP POST upload support for Asterisk HTTP server
*
* \author Terry Wilson <twilson@digium.com
@@ -113,7 +113,7 @@ static GMimeMessage *parse_message(FILE *f)
parser = g_mime_parser_new_with_stream(stream);
g_mime_parser_set_respect_content_length(parser, 1);
-
+
g_object_unref(stream);
message = g_mime_parser_construct_message(parser
diff --git a/res/res_http_websocket.c b/res/res_http_websocket.c
index 75a6eba64..956c52c54 100644
--- a/res/res_http_websocket.c
+++ b/res/res_http_websocket.c
@@ -291,6 +291,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_server_remove_protocol)(struct ast_webso
/*! \brief Close function for websocket session */
int AST_OPTIONAL_API_NAME(ast_websocket_close)(struct ast_websocket *session, uint16_t reason)
{
+ enum ast_websocket_opcode opcode = AST_WEBSOCKET_OPCODE_CLOSE;
char frame[4] = { 0, }; /* The header is 2 bytes and the reason code takes up another 2 bytes */
int res;
@@ -298,7 +299,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_close)(struct ast_websocket *session, ui
return 0;
}
- frame[0] = AST_WEBSOCKET_OPCODE_CLOSE | 0x80;
+ frame[0] = opcode | 0x80;
frame[1] = 2; /* The reason code is always 2 bytes */
/* If no reason has been specified assume 1000 which is normal closure */
@@ -445,19 +446,7 @@ int AST_OPTIONAL_API_NAME(ast_websocket_is_secure)(struct ast_websocket *session
int AST_OPTIONAL_API_NAME(ast_websocket_set_nonblock)(struct ast_websocket *session)
{
- int flags;
-
- if ((flags = fcntl(session->fd, F_GETFL)) == -1) {
- return -1;
- }
-
- flags |= O_NONBLOCK;
-
- if ((flags = fcntl(session->fd, F_SETFL, flags)) == -1) {
- return -1;
- }
-
- return 0;
+ return ast_fd_set_flags(session->fd, O_NONBLOCK);
}
int AST_OPTIONAL_API_NAME(ast_websocket_set_timeout)(struct ast_websocket *session, int timeout)
@@ -944,17 +933,11 @@ static struct ast_http_uri websocketuri = {
/*! \brief Simple echo implementation which echoes received text and binary frames */
static void websocket_echo_callback(struct ast_websocket *session, struct ast_variable *parameters, struct ast_variable *headers)
{
- int flags, res;
+ int res;
ast_debug(1, "Entering WebSocket echo loop\n");
- if ((flags = fcntl(ast_websocket_fd(session), F_GETFL)) == -1) {
- goto end;
- }
-
- flags |= O_NONBLOCK;
-
- if (fcntl(ast_websocket_fd(session), F_SETFL, flags) == -1) {
+ if (ast_fd_set_flags(ast_websocket_fd(session), O_NONBLOCK)) {
goto end;
}
diff --git a/res/res_limit.c b/res/res_limit.c
index 5f61f1b09..29e0c9dc3 100644
--- a/res/res_limit.c
+++ b/res/res_limit.c
@@ -2,7 +2,7 @@
* Asterisk -- An open source telephony toolkit.
*
* Resource limits
- *
+ *
* Copyright (c) 2006 Tilghman Lesher. All rights reserved.
*
* Tilghman Lesher <res_limit_200607@the-tilghman.com>
@@ -215,4 +215,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Resource limits");
-
diff --git a/res/res_monitor.c b/res/res_monitor.c
index b7ef2ea88..88fb2d5ba 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -27,7 +27,7 @@
<depend type="module">func_periodic_hook</depend>
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -273,9 +273,9 @@ AST_MUTEX_DEFINE_STATIC(monitorlock);
static unsigned long seq = 0;
-/*!
- * \brief Change state of monitored channel
- * \param chan
+/*!
+ * \brief Change state of monitored channel
+ * \param chan
* \param state monitor state
* \retval 0 on success.
* \retval -1 on failure.
@@ -374,7 +374,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const cha
} else {
monitor->format = ast_strdup("wav");
}
-
+
/* open files */
if (stream_action & X_REC_IN) {
if (ast_fileexists(monitor->read_filename, NULL, NULL) > 0)
@@ -448,13 +448,13 @@ static const char *get_soxmix_format(const char *format)
res = "ul";
if (!strcasecmp(format,"alaw"))
res = "al";
-
+
return res;
}
-/*!
- * \brief Stop monitoring channel
- * \param chan
+/*!
+ * \brief Stop monitoring channel
+ * \param chan
* \param need_lock
* Stop the recording, close any open streams, mix in/out channels if required
* \return Always 0
@@ -514,7 +514,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_stop)(struct ast_channel *chan, int need_l
#endif
format = get_soxmix_format(format);
delfiles = 1;
- }
+ }
execute_args = pbx_builtin_getvar_helper(chan, "MONITOR_EXEC_ARGS");
if (ast_strlen_zero(execute_args)) {
execute_args = "";
@@ -580,8 +580,8 @@ static int unpause_monitor_exec(struct ast_channel *chan, const char *data)
return ast_monitor_unpause(chan);
}
-/*!
- * \brief Change monitored filename of channel
+/*!
+ * \brief Change monitored filename of channel
* \param chan
* \param fname_base new filename
* \param need_lock
@@ -626,7 +626,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_change_fname)(struct ast_channel *chan, co
* and we aren't interfering with the recording itself.
*/
ast_debug(2, "comparing tmpstring %s to filename_base %s\n", tmpstring, ast_channel_monitor(chan)->filename_base);
-
+
if ((fd[0] = open(tmpstring, O_CREAT | O_WRONLY, 0644)) < 0 ||
(fd[1] = open(ast_channel_monitor(chan)->filename_base, O_CREAT | O_EXCL | O_WRONLY, 0644)) < 0) {
if (fd[0] < 0) {
@@ -710,7 +710,7 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(fname_base);
AST_APP_ARG(options);
);
-
+
/* Parse arguments. */
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR, "Monitor requires an argument\n");
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index d79151676..0afacf53c 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -19,7 +19,7 @@
/*! \file
*
* \brief Routines implementing music on hold
- *
+ *
* \author Mark Spencer <markster@digium.com>
*/
@@ -27,7 +27,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page musiconhold.conf musiconhold.conf
* \verbinclude musiconhold.conf.sample
*/
@@ -312,7 +312,7 @@ static void moh_files_release(struct ast_channel *chan, void *data)
state->class = mohclass_unref(state->class, "Unreffing channel's music class upon deactivation of generator");
}
-static int ast_moh_files_next(struct ast_channel *chan)
+static int ast_moh_files_next(struct ast_channel *chan)
{
struct moh_files_state *state = ast_channel_music_state(chan);
int tries;
@@ -331,6 +331,7 @@ static int ast_moh_files_next(struct ast_channel *chan)
}
} else {
state->announcement = 0;
+ state->samples = 0;
}
if (!state->class->total_files) {
@@ -558,7 +559,7 @@ static int spawn_mp3(struct mohclass *class)
DIR *dir = NULL;
struct dirent *de;
-
+
if (!strcasecmp(class->dir, "nodir")) {
files = 1;
} else {
@@ -576,19 +577,19 @@ static int spawn_mp3(struct mohclass *class)
argv[argc++] = "--mono";
argv[argc++] = "-r";
argv[argc++] = "8000";
-
+
if (!ast_test_flag(class, MOH_SINGLE)) {
argv[argc++] = "-b";
argv[argc++] = "2048";
}
-
+
argv[argc++] = "-f";
-
+
if (ast_test_flag(class, MOH_QUIET))
argv[argc++] = "4096";
else
argv[argc++] = "8192";
-
+
/* Look for extra arguments and add them to the list */
ast_copy_string(xargs, class->args, sizeof(xargs));
argptr = xargs;
@@ -612,9 +613,9 @@ static int spawn_mp3(struct mohclass *class)
files++;
} else if (dir) {
while ((de = readdir(dir)) && (files < MAX_MP3S)) {
- if ((strlen(de->d_name) > 3) &&
- ((ast_test_flag(class, MOH_CUSTOM) &&
- (!strcasecmp(de->d_name + strlen(de->d_name) - 4, ".raw") ||
+ if ((strlen(de->d_name) > 3) &&
+ ((ast_test_flag(class, MOH_CUSTOM) &&
+ (!strcasecmp(de->d_name + strlen(de->d_name) - 4, ".raw") ||
!strcasecmp(de->d_name + strlen(de->d_name) - 4, ".sln"))) ||
!strcasecmp(de->d_name + strlen(de->d_name) - 4, ".mp3"))) {
ast_copy_string(fns[files], de->d_name, sizeof(fns[files]));
@@ -627,7 +628,7 @@ static int spawn_mp3(struct mohclass *class)
if (dir) {
closedir(dir);
}
- if (pipe(fds)) {
+ if (pipe(fds)) {
ast_log(LOG_WARNING, "Pipe failed\n");
return -1;
}
@@ -883,7 +884,7 @@ static int start_moh_exec(struct ast_channel *chan, const char *data)
AST_STANDARD_APP_ARGS(args, parse);
class = S_OR(args.class, NULL);
- if (ast_moh_start(chan, class, NULL))
+ if (ast_moh_start(chan, class, NULL))
ast_log(LOG_WARNING, "Unable to start music on hold class '%s' on channel %s\n", class, ast_channel_name(chan));
return 0;
@@ -924,7 +925,6 @@ static struct mohclass *_get_mohbyname(const char *name, int warn, int flags, co
static struct mohdata *mohalloc(struct mohclass *cl)
{
struct mohdata *moh;
- long flags;
if (!(moh = ast_calloc(1, sizeof(*moh))))
return NULL;
@@ -936,10 +936,8 @@ static struct mohdata *mohalloc(struct mohclass *cl)
}
/* Make entirely non-blocking */
- flags = fcntl(moh->pipe[0], F_GETFL);
- fcntl(moh->pipe[0], F_SETFL, flags | O_NONBLOCK);
- flags = fcntl(moh->pipe[1], F_GETFL);
- fcntl(moh->pipe[1], F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(moh->pipe[0], O_NONBLOCK);
+ ast_fd_set_flags(moh->pipe[1], O_NONBLOCK);
moh->f.frametype = AST_FRAME_VOICE;
moh->f.subclass.format = cl->format;
@@ -950,7 +948,7 @@ static struct mohdata *mohalloc(struct mohclass *cl)
ao2_lock(cl);
AST_LIST_INSERT_HEAD(&cl->members, moh, list);
ao2_unlock(cl);
-
+
return moh;
}
@@ -961,9 +959,9 @@ static void moh_release(struct ast_channel *chan, void *data)
struct ast_format *oldwfmt;
ao2_lock(class);
- AST_LIST_REMOVE(&moh->parent->members, moh, list);
+ AST_LIST_REMOVE(&moh->parent->members, moh, list);
ao2_unlock(class);
-
+
close(moh->pipe[0]);
close(moh->pipe[1]);
@@ -1294,8 +1292,8 @@ static int _moh_register(struct mohclass *moh, int reload, int unref, const char
}
return -1;
}
- } else if (!strcasecmp(moh->mode, "mp3") || !strcasecmp(moh->mode, "mp3nb") ||
- !strcasecmp(moh->mode, "quietmp3") || !strcasecmp(moh->mode, "quietmp3nb") ||
+ } else if (!strcasecmp(moh->mode, "mp3") || !strcasecmp(moh->mode, "mp3nb") ||
+ !strcasecmp(moh->mode, "quietmp3") || !strcasecmp(moh->mode, "quietmp3nb") ||
!strcasecmp(moh->mode, "httpmp3") || !strcasecmp(moh->mode, "custom")) {
if (init_app_class(moh)) {
if (unref) {
@@ -1437,7 +1435,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
if (!strcasecmp(tmp->name, "name"))
ast_copy_string(mohclass->name, tmp->value, sizeof(mohclass->name));
else if (!strcasecmp(tmp->name, "mode"))
- ast_copy_string(mohclass->mode, tmp->value, sizeof(mohclass->mode));
+ ast_copy_string(mohclass->mode, tmp->value, sizeof(mohclass->mode));
else if (!strcasecmp(tmp->name, "directory"))
ast_copy_string(mohclass->dir, tmp->value, sizeof(mohclass->dir));
else if (!strcasecmp(tmp->name, "application"))
@@ -1448,7 +1446,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
ast_set2_flag(mohclass, ast_true(tmp->value), MOH_RANDOMIZE);
else if (!strcasecmp(tmp->name, "sort") && !strcasecmp(tmp->value, "random"))
ast_set_flag(mohclass, MOH_RANDOMIZE);
- else if (!strcasecmp(tmp->name, "sort") && !strcasecmp(tmp->value, "alpha"))
+ else if (!strcasecmp(tmp->name, "sort") && !strcasecmp(tmp->value, "alpha"))
ast_set_flag(mohclass, MOH_SORTALPHA);
else if (!strcasecmp(tmp->name, "format")) {
ao2_cleanup(mohclass->format);
@@ -1641,7 +1639,7 @@ static void moh_class_destructor(void *obj)
stime = time(NULL) + 2;
killpid(class->pid, class->kill_delay, class->kill_method);
- while ((ast_wait_for_input(class->srcfd, 100) > 0) &&
+ while ((ast_wait_for_input(class->srcfd, 100) > 0) &&
(bytes = read(class->srcfd, buff, 8192)) && time(NULL) < stime) {
tbytes = tbytes + bytes;
}
@@ -1742,7 +1740,7 @@ static int load_moh_classes(int reload)
}
}
/* These names were deprecated in 1.4 and should not be used until after the next major release. */
- if (!strcasecmp(cat, "classes") || !strcasecmp(cat, "moh_files") ||
+ if (!strcasecmp(cat, "classes") || !strcasecmp(cat, "moh_files") ||
!strcasecmp(cat, "general")) {
continue;
}
@@ -1824,7 +1822,7 @@ static int load_moh_classes(int reload)
ast_config_destroy(cfg);
- ao2_t_callback(mohclasses, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE,
+ ao2_t_callback(mohclasses, OBJ_UNLINK | OBJ_NODATA | OBJ_MULTIPLE,
moh_classes_delete_marked, NULL, "Purge marked classes");
return numclasses;
@@ -1925,6 +1923,9 @@ static char *handle_cli_moh_show_classes(struct ast_cli_entry *e, int cmd, struc
ast_cli(a->fd, "Class: %s\n", class->name);
ast_cli(a->fd, "\tMode: %s\n", S_OR(class->mode, "<none>"));
ast_cli(a->fd, "\tDirectory: %s\n", S_OR(class->dir, "<none>"));
+ if (ast_test_flag(class, MOH_ANNOUNCEMENT)) {
+ ast_cli(a->fd, "\tAnnouncement: %s\n", S_OR(class->announcement, "<none>"));
+ }
if (ast_test_flag(class, MOH_CUSTOM)) {
ast_cli(a->fd, "\tApplication: %s\n", S_OR(class->args, "<none>"));
ast_cli(a->fd, "\tKill Escalation Delay: %zu ms\n", class->kill_delay / 1000);
@@ -1968,8 +1969,8 @@ static int moh_class_cmp(void *obj, void *arg, int flags)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_mwi_external_ami.c b/res/res_mwi_external_ami.c
index 0479f8bcf..92eafb893 100644
--- a/res/res_mwi_external_ami.c
+++ b/res/res_mwi_external_ami.c
@@ -373,4 +373,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "AMI support for external
.load = load_module,
.unload = unload_module,
);
-
diff --git a/res/res_odbc.c b/res/res_odbc.c
index 48273c4ac..7395449c5 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -22,7 +22,7 @@
/*! \file
*
* \brief ODBC resource manager
- *
+ *
* \author Mark Spencer <markster@digium.com>
* \author Anthony Minessale II <anthmct@yahoo.com>
* \author Tilghman Lesher <tilghman@digium.com>
@@ -34,7 +34,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page res_odbc.conf res_odbc.conf
* \verbinclude res_odbc.conf.sample
*/
@@ -1068,16 +1068,6 @@ static int unload_module(void)
return -1;
}
-/*!
- * \brief Load the module
- *
- * Module loading including tests for configuration or dependencies.
- * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
- * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
- * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
- */
static int load_module(void)
{
if (!(class_container = ao2_container_alloc(1, null_hash_fn, ao2_match_by_addr)))
@@ -1086,8 +1076,7 @@ static int load_module(void)
return AST_MODULE_LOAD_DECLINE;
ast_cli_register_multiple(cli_odbc, ARRAY_LEN(cli_odbc));
ast_data_register_multiple(odbc_providers, ARRAY_LEN(odbc_providers));
- ast_log(LOG_NOTICE, "res_odbc loaded.\n");
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "ODBC resource",
diff --git a/res/res_odbc_transaction.c b/res/res_odbc_transaction.c
index 7e48b72cf..b6b303929 100644
--- a/res/res_odbc_transaction.c
+++ b/res/res_odbc_transaction.c
@@ -222,7 +222,7 @@ static struct odbc_txn_frame *find_transaction(struct ast_channel *chan, const c
/* No datastore? Definitely no transaction then */
return NULL;
}
-
+
oldlist = txn_store->data;
AST_LIST_LOCK(oldlist);
diff --git a/res/res_parking.c b/res/res_parking.c
index 593134b60..ddf801245 100644
--- a/res/res_parking.c
+++ b/res/res_parking.c
@@ -291,8 +291,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "globals",
.item_offset = offsetof(struct parking_config, global),
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -300,8 +300,8 @@ struct aco_type *global_options[] = ACO_TYPES(&global_option);
static struct aco_type parking_lot_type = {
.type = ACO_ITEM,
.name = "parking_lot",
- .category_match = ACO_BLACKLIST,
- .category = "^(general)$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.item_alloc = parking_lot_cfg_alloc,
.item_find = named_item_find,
.item_offset = offsetof(struct parking_config, parking_lots),
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c
index 71f875753..89fb29c2d 100644
--- a/res/res_phoneprov.c
+++ b/res/res_phoneprov.c
@@ -33,7 +33,7 @@
* \addtogroup configuration_file Configuration Files
*/
-/*!
+/*!
* \page phoneprov.conf phoneprov.conf
* \verbinclude phoneprov.conf.sample
*/
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 1fce19b8a..842cc20e3 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2573,13 +2573,13 @@ int ast_sip_register_endpoint_identifier_with_name(struct ast_sip_endpoint_ident
id_list_item = ast_calloc(1, sizeof(*id_list_item));
if (!id_list_item) {
- ast_log(LOG_ERROR, "Unabled to add endpoint identifier. Out of memory.\n");
+ ast_log(LOG_ERROR, "Unable to add endpoint identifier. Out of memory.\n");
return -1;
}
id_list_item->identifier = identifier;
id_list_item->name = name;
- ast_debug(1, "Register endpoint identifier %s (%p)\n", name, identifier);
+ ast_debug(1, "Register endpoint identifier %s(%p)\n", name ?: "", identifier);
if (ast_strlen_zero(name)) {
/* if an identifier has no name then place in front */
@@ -2602,7 +2602,8 @@ int ast_sip_register_endpoint_identifier_with_name(struct ast_sip_endpoint_ident
id_list_item->priority = 0;
while ((current = strchr(current, ','))) {
++id_list_item->priority;
- if (!strncmp(prev, name, current - prev)) {
+ if (!strncmp(prev, name, current - prev)
+ && strlen(name) == current - prev) {
break;
}
prev = ++current;
@@ -3241,7 +3242,7 @@ pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint,
ast_assert(status != NULL);
contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, NULL);
- if (ast_sip_set_tpselector_from_ep_or_uri(endpoint, pjsip_uri_get_uri(contact_hdr->uri),
+ if (!contact_hdr || ast_sip_set_tpselector_from_ep_or_uri(endpoint, pjsip_uri_get_uri(contact_hdr->uri),
&selector)) {
return NULL;
}
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 2f29456ab..a9a90ac92 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -917,6 +917,12 @@ static int transport_tls_method_handler(const struct aco_option *opt, struct ast
state->tls.method = PJSIP_SSL_UNSPECIFIED_METHOD;
} else if (!strcasecmp(var->value, "tlsv1")) {
state->tls.method = PJSIP_TLSV1_METHOD;
+#ifdef HAVE_PJSIP_TLS_TRANSPORT_PROTO
+ } else if (!strcasecmp(var->value, "tlsv1_1")) {
+ state->tls.method = PJSIP_TLSV1_1_METHOD;
+ } else if (!strcasecmp(var->value, "tlsv1_2")) {
+ state->tls.method = PJSIP_TLSV1_2_METHOD;
+#endif
} else if (!strcasecmp(var->value, "sslv2")) {
state->tls.method = PJSIP_SSLV2_METHOD;
} else if (!strcasecmp(var->value, "sslv3")) {
@@ -933,6 +939,10 @@ static int transport_tls_method_handler(const struct aco_option *opt, struct ast
static const char *tls_method_map[] = {
[PJSIP_SSL_UNSPECIFIED_METHOD] = "unspecified",
[PJSIP_TLSV1_METHOD] = "tlsv1",
+#ifdef HAVE_PJSIP_TLS_TRANSPORT_PROTO
+ [PJSIP_TLSV1_1_METHOD] = "tlsv1_1",
+ [PJSIP_TLSV1_2_METHOD] = "tlsv1_2",
+#endif
[PJSIP_SSLV2_METHOD] = "sslv2",
[PJSIP_SSLV3_METHOD] = "sslv3",
[PJSIP_SSLV23_METHOD] = "sslv23",
diff --git a/res/res_pjsip/location.c b/res/res_pjsip/location.c
index 2bd40e84f..40490b255 100644
--- a/res/res_pjsip/location.c
+++ b/res/res_pjsip/location.c
@@ -1347,4 +1347,3 @@ int ast_sip_destroy_sorcery_location(void)
return 0;
}
-
diff --git a/res/res_pjsip/pjsip_cli.c b/res/res_pjsip/pjsip_cli.c
index 56ec191ed..4544a1717 100644
--- a/res/res_pjsip/pjsip_cli.c
+++ b/res/res_pjsip/pjsip_cli.c
@@ -82,31 +82,22 @@ int ast_sip_cli_print_sorcery_objectset(void *obj, void *arg, int flags)
return 0;
}
-static char *complete_show_sorcery_object(struct ao2_container *container,
+static void complete_show_sorcery_object(struct ao2_container *container,
struct ast_sip_cli_formatter_entry *formatter_entry,
- const char *word, int state)
+ const char *word)
{
- char *result = NULL;
- int wordlen = strlen(word);
- int which = 0;
-
- struct ao2_iterator i = ao2_iterator_init(container, 0);
+ size_t wordlen = strlen(word);
void *object;
+ struct ao2_iterator i = ao2_iterator_init(container, 0);
while ((object = ao2_t_iterator_next(&i, "iterate thru endpoints table"))) {
const char *id = formatter_entry->get_id(object);
- if (!strncasecmp(word, id, wordlen)
- && ++which > state) {
- result = ast_strdup(id);
+ if (!strncasecmp(word, id, wordlen)) {
+ ast_cli_completion_add(ast_strdup(id));
}
ao2_t_ref(object, -1, "toss iterator endpoint ptr before break");
- if (result) {
- break;
- }
}
ao2_iterator_destroy(&i);
-
- return result;
}
static void dump_str_and_free(int fd, struct ast_str *buf)
@@ -211,7 +202,8 @@ char *ast_sip_cli_traverse_objects(struct ast_cli_entry *e, int cmd, struct ast_
if (cmd == CLI_GENERATE) {
ast_free(context.output_buffer);
- return complete_show_sorcery_object(container, formatter_entry, a->word, a->n);
+ complete_show_sorcery_object(container, formatter_entry, a->word);
+ return NULL;
}
if (is_container) {
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 54c6c4929..9aab75b83 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -1565,8 +1565,8 @@ static int ami_show_endpoint(struct mansession *s, const struct message *m)
return 0;
}
- astman_send_listack(s, m, "Following are Events for each object "
- "associated with the the Endpoint", "start");
+ astman_send_listack(s, m, "Following are Events for each object associated with the Endpoint",
+ "start");
/* the endpoint detail needs to always come first so apply as such */
if (format_ami_endpoint(endpoint, &ami) ||
diff --git a/res/res_pjsip/pjsip_global_headers.c b/res/res_pjsip/pjsip_global_headers.c
index 501f5f523..4de28b586 100644
--- a/res/res_pjsip/pjsip_global_headers.c
+++ b/res/res_pjsip/pjsip_global_headers.c
@@ -55,7 +55,7 @@ struct header {
static struct header *alloc_header(const char *name, const char *value)
{
struct header *alloc;
-
+
alloc = ast_calloc_with_stringfields(1, struct header, 32);
if (!alloc) {
@@ -139,7 +139,7 @@ static int add_header(struct header_list *headers, const char *name, const char
}
AST_RWLIST_WRLOCK(headers);
- if (replace) {
+ if (replace) {
remove_header(headers, name);
}
if (to_add) {
diff --git a/res/res_pjsip/pjsip_message_filter.c b/res/res_pjsip/pjsip_message_filter.c
index 085d9787e..427aec740 100644
--- a/res/res_pjsip/pjsip_message_filter.c
+++ b/res/res_pjsip/pjsip_message_filter.c
@@ -429,15 +429,27 @@ static pj_bool_t on_rx_process_uris(pjsip_rx_data *rdata)
return PJ_TRUE;
}
- while ((contact =
- (pjsip_contact_hdr *) pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT,
- contact ? contact->next : NULL))) {
+
+ contact = (pjsip_contact_hdr *) pjsip_msg_find_hdr(
+ rdata->msg_info.msg, PJSIP_H_CONTACT, NULL);
+
+ if (!contact && pjsip_method_creates_dialog(&rdata->msg_info.msg->line.req.method)) {
+ /* A contact header is required for dialog creating methods */
+ static const pj_str_t missing_contact = { "Missing Contact header", 22 };
+ pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata, 400,
+ &missing_contact, NULL, NULL);
+ return PJ_TRUE;
+ }
+
+ while (contact) {
if (!contact->star && !is_sip_uri(contact->uri)) {
print_uri_debug(URI_TYPE_CONTACT, rdata, (pjsip_hdr *)contact);
pjsip_endpt_respond_stateless(ast_sip_get_pjsip_endpoint(), rdata,
PJSIP_SC_UNSUPPORTED_URI_SCHEME, NULL, NULL, NULL);
return PJ_TRUE;
}
+ contact = (pjsip_contact_hdr *) pjsip_msg_find_hdr(
+ rdata->msg_info.msg, PJSIP_H_CONTACT, contact->next);
}
return PJ_FALSE;
diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c
index d4ea911c9..a0352a6fb 100644
--- a/res/res_pjsip/pjsip_options.c
+++ b/res/res_pjsip/pjsip_options.c
@@ -1157,7 +1157,24 @@ static int qualify_and_schedule_cb_with_aor(void *obj, void *arg, int flags)
static int qualify_and_schedule_cb_without_aor(void *obj, void *arg, int flags)
{
- qualify_and_schedule_contact((struct ast_sip_contact *) obj);
+ /*
+ * These are really dynamic contacts. We need to retrieve the aor associated
+ * with the contact since it's possible some of the aor's fields were updated
+ * since last load.
+ */
+ struct ast_sip_contact *contact = obj;
+ struct ast_sip_aor *aor = ast_sip_location_retrieve_aor(contact->aor);
+
+ if (aor) {
+ qualify_and_schedule_cb_with_aor(obj, aor, flags);
+ ao2_ref(aor, -1);
+ } else {
+ ast_log(LOG_WARNING, "Unable to locate AOR for contact '%s'. Keeping old "
+ "associated settings: frequency=%d, timeout=%f, authenticate=%s\n",
+ contact->uri, contact->qualify_frequency, contact->qualify_timeout,
+ contact->authenticate_qualify ? "yes" : "no");
+ qualify_and_schedule_contact(contact);
+ }
return 0;
}
@@ -1185,32 +1202,21 @@ static int qualify_and_schedule_all_cb(void *obj, void *arg, int flags)
return 0;
}
-/*!
- * \internal
- * \brief Unschedule all existing contacts
- */
-static int unschedule_all_cb(void *obj, void *arg, int flags)
-{
- struct sched_data *data = obj;
-
- AST_SCHED_DEL_UNREF(sched, data->id, ao2_ref(data, -1));
-
- return CMP_MATCH;
-}
-
static void qualify_and_schedule_all(void)
{
- struct ast_variable *var = ast_variable_new("qualify_frequency >", "0", "");
struct ao2_container *aors;
struct ao2_container *contacts;
- if (!var) {
- return;
- }
- aors = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
- "aor", AST_RETRIEVE_FLAG_MULTIPLE, var);
+ /*
+ * It's possible that the AOR had some of it's fields updated prior to a
+ * reload. For instance qualifying could have been turned on or off by
+ * setting the qualify_frequency. Due to this we have to iterate through
+ * all contacts (static and dynamic), and not just ones where the frequency
+ * is greater than zero, updating any contact fields with the AOR's values.
+ */
- ao2_callback(sched_qualifies, OBJ_NODATA | OBJ_MULTIPLE | OBJ_UNLINK, unschedule_all_cb, NULL);
+ aors = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
+ "aor", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL);
if (aors) {
ao2_callback(aors, OBJ_NODATA, qualify_and_schedule_all_cb, NULL);
@@ -1218,14 +1224,11 @@ static void qualify_and_schedule_all(void)
}
contacts = ast_sorcery_retrieve_by_fields(ast_sip_get_sorcery(),
- "contact", AST_RETRIEVE_FLAG_MULTIPLE, var);
+ "contact", AST_RETRIEVE_FLAG_MULTIPLE | AST_RETRIEVE_FLAG_ALL, NULL);
if (contacts) {
ao2_callback(contacts, OBJ_NODATA, qualify_and_schedule_cb_without_aor, NULL);
ao2_ref(contacts, -1);
}
-
- ast_variables_destroy(var);
-
}
int ast_sip_format_contact_ami(void *obj, void *arg, int flags)
@@ -1278,7 +1281,7 @@ int ast_sip_format_contact_ami(void *obj, void *arg, int flags)
astman_append(ami->s, "%s\r\n", ast_str_buffer(buf));
ami->count++;
-
+
ast_free(buf);
ao2_cleanup(status);
return 0;
diff --git a/res/res_pjsip/pjsip_session.c b/res/res_pjsip/pjsip_session.c
index 7460e0a2b..074ec4e0b 100644
--- a/res/res_pjsip/pjsip_session.c
+++ b/res/res_pjsip/pjsip_session.c
@@ -118,4 +118,3 @@ int ast_sip_session_add_supplements(struct ast_sip_session *session)
return 0;
}
-
diff --git a/res/res_pjsip_dlg_options.c b/res/res_pjsip_dlg_options.c
index 564c51fbf..03d7afa18 100644
--- a/res/res_pjsip_dlg_options.c
+++ b/res/res_pjsip_dlg_options.c
@@ -101,6 +101,7 @@ static int unload_module(void)
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "SIP OPTIONS in dialog handler",
+ .support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND,
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 14716234a..5324af7b9 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -105,7 +105,7 @@ struct ip_identify_match {
struct ast_ha *matches;
/*! \brief Perform SRV resolution of hostnames */
unsigned int srv_lookups;
- /*! \brief Hosts to be resolved after applying configuration */
+ /*! \brief Hosts to be resolved when applying configuration */
struct ao2_container *hosts;
};
@@ -150,8 +150,8 @@ static int header_identify_match_check(void *obj, void *arg, int flags)
c_header = ast_strdupa(identify->match_header);
c_value = strchr(c_header, ':');
if (!c_value) {
- ast_log(LOG_WARNING, "Identify '%s' has invalid header_match: No ':' separator found!\n",
- ast_sorcery_object_get_id(identify));
+ /* This should not be possible. The object cannot be created if so. */
+ ast_assert(0);
return 0;
}
*c_value = '\0';
@@ -161,17 +161,19 @@ static int header_identify_match_check(void *obj, void *arg, int flags)
pj_header_name = pj_str(c_header);
header = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &pj_header_name, NULL);
if (!header) {
- ast_debug(3, "SIP message does not contain header '%s'\n", c_header);
+ ast_debug(3, "Identify '%s': SIP message does not have header '%s'\n",
+ ast_sorcery_object_get_id(identify),
+ c_header);
return 0;
}
pj_header_value = pj_str(c_value);
if (pj_strcmp(&pj_header_value, &header->hvalue)) {
- ast_debug(3, "SIP message contains header '%s' but value '%.*s' does not match value '%s' for endpoint '%s'\n",
+ ast_debug(3, "Identify '%s': SIP message has header '%s' but value '%.*s' does not match '%s'\n",
+ ast_sorcery_object_get_id(identify),
c_header,
(int) pj_strlen(&header->hvalue), pj_strbuf(&header->hvalue),
- c_value,
- identify->endpoint_name);
+ c_value);
return 0;
}
@@ -261,7 +263,7 @@ static int ip_identify_match_host_lookup(struct ip_identify_match *identify, con
}
for (i = 0; i < num_addrs; ++i) {
- /* Check if the address is already in the list, if so don't bother adding it again */
+ /* Check if the address is already in the list, if so don't add it again */
if (identify->matches && (ast_apply_ha(identify->matches, &addrs[i]) != AST_SENSE_ALLOW)) {
continue;
}
@@ -283,14 +285,13 @@ static int ip_identify_match_host_lookup(struct ip_identify_match *identify, con
}
/*! \brief Helper function which performs an SRV lookup and then resolves the hostname */
-static int ip_identify_match_srv_lookup(struct ip_identify_match *identify, const char *prefix, const char *host)
+static int ip_identify_match_srv_lookup(struct ip_identify_match *identify, const char *prefix, const char *host, int results)
{
char service[NI_MAXHOST];
struct srv_context *context = NULL;
int srv_ret;
const char *srvhost;
unsigned short srvport;
- int results = 0;
snprintf(service, sizeof(service), "%s.%s", prefix, host);
@@ -372,10 +373,33 @@ static int ip_identify_apply(const struct ast_sorcery *sorcery, void *obj)
char *current_string;
struct ao2_iterator i;
+ /* Validate the identify object configuration */
+ if (ast_strlen_zero(identify->endpoint_name)) {
+ ast_log(LOG_ERROR, "Identify '%s' missing required endpoint name.\n",
+ ast_sorcery_object_get_id(identify));
+ return -1;
+ }
+ if (ast_strlen_zero(identify->match_header) /* No header to match */
+ /* and no static IP addresses with a mask */
+ && !identify->matches
+ /* and no addresses to resolve */
+ && (!identify->hosts || !ao2_container_count(identify->hosts))) {
+ ast_log(LOG_ERROR, "Identify '%s' is not configured to match anything.\n",
+ ast_sorcery_object_get_id(identify));
+ return -1;
+ }
+ if (!ast_strlen_zero(identify->match_header)
+ && !strchr(identify->match_header, ':')) {
+ ast_log(LOG_ERROR, "Identify '%s' missing ':' separator in match_header '%s'.\n",
+ ast_sorcery_object_get_id(identify), identify->match_header);
+ return -1;
+ }
+
if (!identify->hosts) {
return 0;
}
+ /* Resolve the match addresses now */
i = ao2_iterator_init(identify->hosts, 0);
while ((current_string = ao2_iterator_next(&i))) {
struct ast_sockaddr address;
@@ -383,26 +407,29 @@ static int ip_identify_apply(const struct ast_sorcery *sorcery, void *obj)
/* If the provided string is not an IP address perform SRV resolution on it */
if (identify->srv_lookups && !ast_sockaddr_parse(&address, current_string, 0)) {
- results = ip_identify_match_srv_lookup(identify, "_sip._udp", current_string);
+ results = ip_identify_match_srv_lookup(identify, "_sip._udp", current_string,
+ results);
if (results != -1) {
- results += ip_identify_match_srv_lookup(identify, "_sip._tcp", current_string);
+ results = ip_identify_match_srv_lookup(identify, "_sip._tcp",
+ current_string, results);
}
if (results != -1) {
- results += ip_identify_match_srv_lookup(identify, "_sips._tcp", current_string);
+ results = ip_identify_match_srv_lookup(identify, "_sips._tcp",
+ current_string, results);
}
}
- /* If SRV falls fall back to a normal lookup on the host itself */
+ /* If SRV fails fall back to a normal lookup on the host itself */
if (!results) {
results = ip_identify_match_host_lookup(identify, current_string);
}
if (results == 0) {
- ast_log(LOG_ERROR, "Address '%s' provided on ip endpoint identifier '%s' did not resolve to any address\n",
- current_string, ast_sorcery_object_get_id(obj));
+ ast_log(LOG_WARNING, "Identify '%s' provided address '%s' did not resolve to any address\n",
+ ast_sorcery_object_get_id(identify), current_string);
} else if (results == -1) {
- ast_log(LOG_ERROR, "An error occurred when adding resolution results of '%s' on '%s'\n",
- current_string, ast_sorcery_object_get_id(obj));
+ ast_log(LOG_ERROR, "Identify '%s' failed when adding resolution results of '%s'\n",
+ ast_sorcery_object_get_id(identify), current_string);
ao2_ref(current_string, -1);
ao2_iterator_destroy(&i);
return -1;
diff --git a/res/res_pjsip_history.c b/res/res_pjsip_history.c
index bcc4877f6..ffe1a1d88 100644
--- a/res/res_pjsip_history.c
+++ b/res/res_pjsip_history.c
@@ -1282,7 +1282,7 @@ static char *pjsip_show_history(struct ast_cli_entry *e, int cmd, struct ast_cli
}
entry = ao2_bump(AST_VECTOR_GET(vec, 0));
if (vec == &vector_history) {
- ast_mutex_lock(&history_lock);
+ ast_mutex_unlock(&history_lock);
}
}
diff --git a/res/res_pjsip_notify.c b/res/res_pjsip_notify.c
index 8258b3857..fdc7ecf54 100644
--- a/res/res_pjsip_notify.c
+++ b/res/res_pjsip_notify.c
@@ -82,7 +82,7 @@
order; any other header is treated as part of the SIP
request.</para>
</description>
- <configOption name="^.*$">
+ <configOption name="">
<synopsis>A key/value pair to add to a NOTIFY request.</synopsis>
<description>
<para>If the key is <literal>Content</literal>,
@@ -234,8 +234,8 @@ static void *notify_cfg_alloc(void)
static struct aco_type notify_option = {
.type = ACO_ITEM,
.name = "notify",
- .category_match = ACO_BLACKLIST,
- .category = "^general$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.item_offset = offsetof(struct notify_cfg, notify_options),
.item_alloc = notify_option_alloc,
.item_find = notify_option_find
@@ -993,7 +993,7 @@ static int load_module(void)
return AST_MODULE_LOAD_DECLINE;
}
- aco_option_register_custom(&notify_cfg, "^.*$", ACO_REGEX, notify_options,
+ aco_option_register_custom(&notify_cfg, "", ACO_PREFIX, notify_options,
"", notify_option_handler, 0);
if (aco_process_config(&notify_cfg, 0)) {
diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c
index 1c73a0977..6b40ff493 100644
--- a/res/res_pjsip_outbound_publish.c
+++ b/res/res_pjsip_outbound_publish.c
@@ -1334,6 +1334,7 @@ static int reload_module(void)
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "PJSIP Outbound Publish Support",
+ .support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.reload = reload_module,
.unload = unload_module,
diff --git a/res/res_pjsip_phoneprov_provider.c b/res/res_pjsip_phoneprov_provider.c
index 8dafabc53..6cec0870d 100644
--- a/res/res_pjsip_phoneprov_provider.c
+++ b/res/res_pjsip_phoneprov_provider.c
@@ -413,6 +413,7 @@ static int reload_module(void)
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Phoneprov Provider",
+ .support_level = AST_MODULE_SUPPORT_EXTENDED,
.load = load_module,
.reload = reload_module,
.unload = unload_module,
diff --git a/res/res_pjsip_publish_asterisk.c b/res/res_pjsip_publish_asterisk.c
index 72e1e4d7e..53ee60fe4 100644
--- a/res/res_pjsip_publish_asterisk.c
+++ b/res/res_pjsip_publish_asterisk.c
@@ -929,6 +929,7 @@ static int unload_module(void)
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "PJSIP Asterisk Event PUBLISH Support",
+ .support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.reload = reload_module,
.unload = unload_module,
diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index cb0be6127..88005b85c 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -525,7 +525,7 @@ static void pubsub_on_rx_notify(pjsip_evsub *sub, pjsip_rx_data *rdata, int *p_s
pj_str_t **p_st_text, pjsip_hdr *res_hdr, pjsip_msg_body **p_body);
static void pubsub_on_client_refresh(pjsip_evsub *sub);
static void pubsub_on_server_timeout(pjsip_evsub *sub);
-
+
static pjsip_evsub_user pubsub_cb = {
.on_evsub_state = pubsub_on_evsub_state,
.on_rx_refresh = pubsub_on_rx_refresh,
@@ -613,8 +613,12 @@ static void subscription_persistence_update(struct sip_subscription_tree *sub_tr
expires = expires_hdr ? expires_hdr->ivalue : DEFAULT_PUBLISH_EXPIRES;
sub_tree->persistence->expires = ast_tvadd(ast_tvnow(), ast_samp2tv(expires, 1));
- pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, contact_hdr->uri,
- sub_tree->persistence->contact_uri, sizeof(sub_tree->persistence->contact_uri));
+ if (contact_hdr) {
+ pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, contact_hdr->uri,
+ sub_tree->persistence->contact_uri, sizeof(sub_tree->persistence->contact_uri));
+ } else {
+ ast_log(LOG_WARNING, "Contact not updated due to missing contact header\n");
+ }
/* When receiving a packet on an streaming transport, it's possible to receive more than one SIP
* message at a time into the rdata->pkt_info.packet buffer. However, the rdata->msg_info.msg_buf
@@ -895,7 +899,7 @@ static int have_visited(const char *resource, struct resources *visited)
* This iterates through the items on a resource list and creates tree nodes for each one. The
* tree nodes created are children of the supplied parent node. If an item in the resource
* list is itself a list, then this function is called recursively to provide children for
- * the the new node.
+ * the new node.
*
* If an item in a resource list is not a list, then the supplied subscription handler is
* called into as if a new SUBSCRIBE for the list item were presented. The handler's response
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 0fcd509fb..585202787 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -618,7 +618,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
/* Find all of the candidates */
for (attr_i = 0; attr_i < remote_stream->attr_count; ++attr_i) {
- char foundation[32], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
+ char foundation[33], transport[32], address[PJ_INET6_ADDRSTRLEN + 1], cand_type[6], relay_address[PJ_INET6_ADDRSTRLEN + 1] = "";
unsigned int port, relay_port = 0;
struct ast_rtp_engine_ice_candidate candidate = { 0, };
@@ -631,7 +631,7 @@ static void process_ice_attributes(struct ast_sip_session *session, struct ast_s
ast_copy_pj_str(attr_value, (pj_str_t*)&attr->value, sizeof(attr_value));
- if (sscanf(attr_value, "%31s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
+ if (sscanf(attr_value, "%32s %30u %31s %30u %46s %30u typ %5s %*s %23s %*s %30u", foundation, &candidate.id, transport,
(unsigned *)&candidate.priority, address, &port, cand_type, relay_address, &relay_port) < 7) {
/* Candidate did not parse properly */
continue;
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index f2ee3478b..b4fe0be77 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -473,7 +473,7 @@ enum delayed_method {
/*!
* \internal
- * \brief Convert delayed method enum value to to a string.
+ * \brief Convert delayed method enum value to a string.
* \since 13.3.0
*
* \param method Delayed method enum value to convert to a string.
@@ -1507,7 +1507,7 @@ static int sip_session_suspend_task(void *data)
suspender->suspended = 1;
ast_cond_signal(&suspender->cond_suspended);
- /* Wait for the the serializer suspension to be completed. */
+ /* Wait for the serializer suspension to be completed. */
while (!suspender->complete) {
ast_cond_wait(&suspender->cond_complete, ao2_object_get_lockaddr(suspender));
}
@@ -2019,6 +2019,12 @@ static enum sip_get_destination_result get_destination(struct ast_sip_session *s
ast_copy_pj_str(domain, &sip_ruri->host, size);
pbx_builtin_setvar_helper(session->channel, "SIPDOMAIN", domain);
+ /*
+ * Save off the INVITE Request-URI in case it is
+ * needed: CHANNEL(pjsip,request_uri)
+ */
+ session->request_uri = pjsip_uri_clone(session->inv_session->pool, ruri);
+
return SIP_GET_DEST_EXTEN_FOUND;
}
@@ -2502,6 +2508,12 @@ static void handle_outgoing_response(struct ast_sip_session *session, pjsip_tx_d
struct ast_sip_session_supplement *supplement;
struct pjsip_status_line status = tdata->msg->line.status;
pjsip_cseq_hdr *cseq = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL);
+
+ if (!cseq) {
+ ast_log(LOG_ERROR, "Cannot send response due to missing sequence header");
+ return;
+ }
+
ast_debug(3, "Method is %.*s, Response is %d %.*s\n", (int) pj_strlen(&cseq->method.name),
pj_strbuf(&cseq->method.name), status.code, (int) pj_strlen(&status.reason),
pj_strbuf(&status.reason));
diff --git a/res/res_pktccops.c b/res/res_pktccops.c
index 037e533d3..512d706d3 100644
--- a/res/res_pktccops.c
+++ b/res/res_pktccops.c
@@ -19,10 +19,10 @@
/*!\file
*
* \brief PacketCable COPS
- *
+ *
* \author Attila Domjan <attila.domjan.hu@gmail.com>
*
- * \note
+ * \note
* This module is an add-on to chan_mgcp. It adds support for the
* PacketCable MGCP variation called NCS. Res_pktccops implements COPS
* (RFC 2748), a protocol used to manage dynamic bandwith allocation in
@@ -96,7 +96,7 @@ struct pktcobj {
unsigned char cnum;
unsigned char ctype;
char *contents;
- struct pktcobj *next;
+ struct pktcobj *next;
};
struct copsmsg {
@@ -136,7 +136,7 @@ struct cops_cmts {
char name[80];
char host[80];
char port[80];
- uint16_t t1;
+ uint16_t t1;
uint16_t t7;
uint16_t t8;
uint32_t keepalive;
@@ -186,7 +186,7 @@ static uint16_t cops_constructgatespec(struct gatespec *gs, char *res)
if (res == NULL) {
return 0;
}
-
+
*res = (char) gs->direction;
*(res + 1) = (char) gs->protocolid;
*(res + 2) = (char) gs->flags;
@@ -226,7 +226,7 @@ static uint16_t cops_construct_gate (int cmd, char *p, uint16_t trid,
{
struct gatespec gs;
int offset = 0;
-
+
ast_debug(3, "CMD: %d\n", cmd);
/* Transaction Identifier 8 octets */
@@ -246,7 +246,7 @@ static uint16_t cops_construct_gate (int cmd, char *p, uint16_t trid,
*(p + offset++) = 1; /* stype */
*((uint32_t *) (p + offset)) = htonl(mtahost);
offset += 4;
-
+
if (cmd == GATE_INFO || cmd == GATE_SET_HAVE_GATEID || cmd == GATE_DEL) {
/* Gate ID 8 Octets */
*(p + offset++) = 0;
@@ -258,7 +258,7 @@ static uint16_t cops_construct_gate (int cmd, char *p, uint16_t trid,
if (cmd == GATE_INFO || cmd == GATE_DEL) {
return offset;
}
-
+
}
/* Activity Count 8 octets */
@@ -392,7 +392,7 @@ static int cops_sendmsg (int sfd, struct copsmsg * sendmsg)
char *buf;
int bufpos;
struct pktcobj *pobject;
-
+
if (sfd < 0) {
return -1;
}
@@ -435,7 +435,7 @@ static int cops_sendmsg (int sfd, struct copsmsg * sendmsg)
pobject = pobject->next;
}
}
-
+
errno = 0;
#ifdef HAVE_MSG_NOSIGNAL
#define SENDFLAGS MSG_NOSIGNAL | MSG_DONTWAIT
@@ -481,15 +481,15 @@ struct cops_gate * AST_OPTIONAL_API_NAME(ast_pktccops_gate_alloc)(int cmd,
ast_debug(3, "------- gate modify gateid 0x%x ssip: 0x%x\n", gate->gateid, ssip);
/* TODO implement it */
ast_log(LOG_WARNING, "Modify GateID not implemented\n");
- }
-
+ }
+
if ((gate = cops_gate_cmd(cmd, NULL, cops_trid++, mta, actcount, bitrate, psize, ssip, ssport, gate))) {
ast_debug(3, "COPS: Allocating gate for mta: 0x%x\n", mta);
gate->got_dq_gi = got_dq_gi;
gate->gate_remove = gate_remove;
return(gate);
} else {
- ast_debug(3, "COPS: Couldn't allocate gate for mta: 0x%x\n", mta);
+ ast_debug(3, "COPS: Couldn't allocate gate for mta: 0x%x\n", mta);
return NULL;
}
}
@@ -552,7 +552,7 @@ static struct cops_gate *cops_gate_cmd(int cmd, struct cops_cmts *cmts,
gate->trid = trid;
}
}
-
+
gate->in_transaction = time(NULL);
if (!(gateset = malloc(sizeof(struct copsmsg)))) {
@@ -563,7 +563,7 @@ static struct cops_gate *cops_gate_cmd(int cmd, struct cops_cmts *cmts,
gateset->verflag = 0x10;
gateset->opcode = 2; /* Decision */
gateset->clienttype = 0x8008; /* =PacketCable */
-
+
/* Handle object */
gateset->object = malloc(sizeof(struct pktcobj));
if (!gateset->object) {
@@ -629,7 +629,7 @@ static struct cops_gate *cops_gate_cmd(int cmd, struct cops_cmts *cmts,
return NULL;
}
gateset->object->next->next->next->next = NULL;
-
+
gateset->length = COPS_HEADER_SIZE + gateset->object->length + gateset->object->next->length + gateset->object->next->next->length + gateset->object->next->next->next->length;
if ((cmd == GATE_INFO || cmd == GATE_SET_HAVE_GATEID || cmd == GATE_DEL) && gate) {
@@ -650,7 +650,7 @@ static struct cops_gate *cops_gate_cmd(int cmd, struct cops_cmts *cmts,
static int cops_connect(char *host, char *port)
{
- int s, sfd = -1, flags;
+ int s, sfd = -1;
struct addrinfo hints;
struct addrinfo *rp;
struct addrinfo *result;
@@ -660,7 +660,7 @@ static int cops_connect(char *host, char *port)
memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = AF_UNSPEC;
+ hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = 0;
hints.ai_protocol = 0;
@@ -676,8 +676,7 @@ static int cops_connect(char *host, char *port)
if (sfd == -1) {
ast_log(LOG_WARNING, "Failed socket\n");
}
- flags = fcntl(sfd, F_GETFL);
- fcntl(sfd, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(sfd, O_NONBLOCK);
#ifdef HAVE_SO_NOSIGPIPE
setsockopt(sfd, SOL_SOCKET, SO_NOSIGPIPE, &trueval, sizeof(trueval));
#endif
@@ -827,7 +826,7 @@ static void *do_pktccops(void *data)
ast_debug(3, " S-Num S-type: 0x%.4x len: %i\n", (unsigned)snst, sobjlen);
if (snst == 0x0101 ) {
recvtrid = ntohs(*((uint16_t *) (sobjp + 4)));
- scommand = ntohs(*((uint16_t *) (sobjp + 6)));
+ scommand = ntohs(*((uint16_t *) (sobjp + 6)));
ast_debug(3, " Transaction Identifier command: %i trid %i\n", scommand, recvtrid);
} else if (snst == 0x0201) {
subscrid = ntohl(*((uint32_t *) (sobjp + 4)));
@@ -873,7 +872,7 @@ static void *do_pktccops(void *data)
gate->gate_open = NULL;
}
break;
- }
+ }
}
}
AST_LIST_TRAVERSE_SAFE_END;
@@ -944,7 +943,7 @@ static void *do_pktccops(void *data)
cmts->state = 2;
cmts->katimer = time(NULL);
}
- }
+ }
if (len <= 0) {
ast_debug(3, "COPS: lost connection to %s\n", cmts->name);
close(cmts->sfd);
@@ -954,7 +953,7 @@ static void *do_pktccops(void *data)
cops_freemsg(recmsg);
}
}
- AST_LIST_UNLOCK(&cmts_list);
+ AST_LIST_UNLOCK(&cmts_list);
}
if (pktcreload) {
ast_debug(3, "Reloading pktccops...\n");
@@ -1059,7 +1058,7 @@ static int load_pktccops_config(void)
} else {
ast_log(LOG_WARNING, "Unkown option %s in general section of res_ptkccops.conf\n", v->name);
}
- }
+ }
} else {
/* Defaults */
host = NULL;
@@ -1071,7 +1070,7 @@ static int load_pktccops_config(void)
for (v = ast_variable_browse(config, cat); v; v = v->next) {
if (!strcasecmp(v->name, "host")) {
- host = v->value;
+ host = v->value;
} else if (!strcasecmp(v->name, "port")) {
port = v->value;
} else if (!strcasecmp(v->name, "t1")) {
@@ -1155,11 +1154,11 @@ static char *pktccops_show_cmtses(struct ast_cli_entry *e, int cmd, struct ast_c
struct cops_cmts *cmts;
char statedesc[16];
int katimer;
-
+
switch(cmd) {
case CLI_INIT:
e->command = "pktccops show cmtses";
- e->usage =
+ e->usage =
"Usage: pktccops show cmtses\n"
" List PacketCable COPS CMTSes.\n";
@@ -1195,7 +1194,7 @@ static char *pktccops_show_gates(struct ast_cli_entry *e, int cmd, struct ast_cl
switch(cmd) {
case CLI_INIT:
e->command = "pktccops show gates";
- e->usage =
+ e->usage =
"Usage: pktccops show gates\n"
" List PacketCable COPS GATEs.\n";
@@ -1226,8 +1225,8 @@ static char *pktccops_show_gates(struct ast_cli_entry *e, int cmd, struct ast_cl
} else {
ast_copy_string(state_desc, "N/A", sizeof(state_desc));
}
-
- ast_cli(a->fd, "%-16s 0x%.8x 0x%08x %-10s %10i %10i %u\n", (gate->cmts) ? gate->cmts->name : "null" , gate->gateid, gate->mta,
+
+ ast_cli(a->fd, "%-16s 0x%.8x 0x%08x %-10s %10i %10i %u\n", (gate->cmts) ? gate->cmts->name : "null" , gate->gateid, gate->mta,
state_desc, (int) (time(NULL) - gate->allocated), (gate->checked) ? (int) (time(NULL) - gate->checked) : 0, (unsigned int) gate->in_transaction);
}
AST_LIST_UNLOCK(&cmts_list);
@@ -1244,7 +1243,7 @@ static char *pktccops_show_pools(struct ast_cli_entry *e, int cmd, struct ast_cl
switch(cmd) {
case CLI_INIT:
e->command = "pktccops show pools";
- e->usage =
+ e->usage =
"Usage: pktccops show pools\n"
" List PacketCable COPS ip pools of MTAs.\n";
@@ -1277,7 +1276,7 @@ static char *pktccops_gatedel(struct ast_cli_entry *e, int cmd, struct ast_cli_a
switch (cmd) {
case CLI_INIT:
e->command = "pktccops gatedel";
- e->usage =
+ e->usage =
"Usage: pktccops gatedel <cmts> <gateid>\n"
" Send Gate-Del to cmts.\n";
return NULL;
@@ -1297,13 +1296,13 @@ static char *pktccops_gatedel(struct ast_cli_entry *e, int cmd, struct ast_cli_a
}
}
AST_LIST_UNLOCK(&cmts_list);
-
+
if (!found)
return CLI_SHOWUSAGE;
trid = cops_trid++;
if (!sscanf(a->argv[3], "%x", &gateid)) {
- ast_cli(a->fd, "bad gate specification (%s)\n", a->argv[3]);
+ ast_cli(a->fd, "bad gate specification (%s)\n", a->argv[3]);
return CLI_SHOWUSAGE;
}
@@ -1315,7 +1314,7 @@ static char *pktccops_gatedel(struct ast_cli_entry *e, int cmd, struct ast_cli_a
break;
}
}
-
+
if (!found) {
ast_cli(a->fd, "gate not found: %s\n", a->argv[3]);
return CLI_SHOWUSAGE;
@@ -1337,7 +1336,7 @@ static char *pktccops_gateset(struct ast_cli_entry *e, int cmd, struct ast_cli_a
switch (cmd) {
case CLI_INIT:
e->command = "pktccops gateset";
- e->usage =
+ e->usage =
"Usage: pktccops gateset <cmts> <mta> <acctcount> <bitrate> <packet size> <switch ip> <switch port>\n"
" Send Gate-Set to cmts.\n";
return NULL;
@@ -1388,7 +1387,7 @@ static char *pktccops_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
switch (cmd) {
case CLI_INIT:
e->command = "pktccops set debug {on|off}";
- e->usage =
+ e->usage =
"Usage: pktccops set debug {on|off}\n"
" Turn on/off debuging\n";
return NULL;
@@ -1520,4 +1519,3 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "PktcCOPS manager
.unload = unload_module,
.reload = reload_module,
);
-
diff --git a/res/res_realtime.c b/res/res_realtime.c
index b26cde5b3..4291b519c 100644
--- a/res/res_realtime.c
+++ b/res/res_realtime.c
@@ -23,7 +23,7 @@
*
* \author Anthony Minessale <anthmct@yahoo.com>
* \author Mark Spencer <markster@digium.com>
- *
+ *
* \ingroup applications
*/
@@ -44,7 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cli.h"
-static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
+static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
#define CRL_HEADER_FORMAT "%30s %-30s\n"
struct ast_variable *var = NULL, *orig_var = NULL;
@@ -62,7 +62,7 @@ static char *cli_realtime_load(struct ast_cli_entry *e, int cmd, struct ast_cli_
}
- if (a->argc < 5)
+ if (a->argc < 5)
return CLI_SHOWUSAGE;
var = ast_load_realtime_all(a->argv[2], a->argv[3], a->argv[4], SENTINEL);
@@ -100,7 +100,7 @@ static char *cli_realtime_update(struct ast_cli_entry *e, int cmd, struct ast_cl
return NULL;
}
- if (a->argc < 7)
+ if (a->argc < 7)
return CLI_SHOWUSAGE;
res = ast_update_realtime(a->argv[2], a->argv[3], a->argv[4], a->argv[5], a->argv[6], SENTINEL);
@@ -135,7 +135,7 @@ static char *cli_realtime_update2(struct ast_cli_entry *e, int cmd, struct ast_c
return NULL;
}
- if (a->argc < 7)
+ if (a->argc < 7)
return CLI_SHOWUSAGE;
if (a->argc == 7) {
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 5271d1bf4..263dbff18 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -255,6 +255,8 @@ struct rtp_learning_info {
struct timeval received; /*!< The time of the first received packet */
int max_seq; /*!< The highest sequence number received */
int packets; /*!< The number of remaining packets before the source is accepted */
+ /*! Type of media stream carried by the RTP instance */
+ enum ast_media_type stream_type;
};
#ifdef HAVE_OPENSSL_SRTP
@@ -2765,8 +2767,7 @@ static int create_new_socket(const char *type, int af)
}
ast_log(LOG_WARNING, "Unable to allocate %s socket: %s\n", type, strerror(errno));
} else {
- long flags = fcntl(sock, F_GETFL);
- fcntl(sock, F_SETFL, flags | O_NONBLOCK);
+ ast_fd_set_flags(sock, O_NONBLOCK);
#ifdef SO_NO_CHECK
if (nochecksums) {
setsockopt(sock, SOL_SOCKET, SO_NO_CHECK, &nochecksums, sizeof(nochecksums));
@@ -2813,18 +2814,29 @@ static int rtp_learning_rtp_seq_update(struct rtp_learning_info *info, uint16_t
info->received = ast_tvnow();
}
- /*
- * Protect against packet floods by checking that we
- * received the packet sequence in at least the minimum
- * allowed time.
- */
- if (ast_tvzero(info->received)) {
- info->received = ast_tvnow();
- } else if (!info->packets && (ast_tvdiff_ms(ast_tvnow(), info->received) < learning_min_duration )) {
- /* Packet flood; reset */
- info->packets = learning_min_sequential - 1;
- info->received = ast_tvnow();
+ switch (info->stream_type) {
+ case AST_MEDIA_TYPE_UNKNOWN:
+ case AST_MEDIA_TYPE_AUDIO:
+ /*
+ * Protect against packet floods by checking that we
+ * received the packet sequence in at least the minimum
+ * allowed time.
+ */
+ if (ast_tvzero(info->received)) {
+ info->received = ast_tvnow();
+ } else if (!info->packets
+ && ast_tvdiff_ms(ast_tvnow(), info->received) < learning_min_duration) {
+ /* Packet flood; reset */
+ info->packets = learning_min_sequential - 1;
+ info->received = ast_tvnow();
+ }
+ break;
+ case AST_MEDIA_TYPE_VIDEO:
+ case AST_MEDIA_TYPE_IMAGE:
+ case AST_MEDIA_TYPE_TEXT:
+ break;
}
+
info->max_seq = seq;
return info->packets;
@@ -3235,7 +3247,9 @@ static int ast_rtp_destroy(struct ast_rtp_instance *instance)
* entry at this point since it holds a reference to the
* RTP instance while it's active.
*/
- close(rtp->rtcp->s);
+ if (rtp->rtcp->s > -1 && rtp->s != rtp->rtcp->s) {
+ close(rtp->rtcp->s);
+ }
ast_free(rtp->rtcp->local_addr_str);
ast_free(rtp->rtcp);
}
@@ -4743,7 +4757,6 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
unsigned int first_word;
/*! True if we have seen an acceptable SSRC to learn the remote RTCP address */
unsigned int ssrc_seen;
- int report_counter = 0;
struct ast_rtp_rtcp_report_block *report_block;
struct ast_frame *f = &ast_null_frame;
@@ -4957,7 +4970,7 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
if (!report_block) {
return &ast_null_frame;
}
- rtcp_report->report_block[report_counter] = report_block;
+ rtcp_report->report_block[0] = report_block;
report_block->source_ssrc = ntohl(rtcpheader[i]);
report_block->lost_count.packets = ntohl(rtcpheader[i + 1]) & 0x00ffffff;
report_block->lost_count.fraction = ((ntohl(rtcpheader[i + 1]) & 0xff000000) >> 24);
@@ -4994,7 +5007,6 @@ static struct ast_frame *ast_rtcp_interpret(struct ast_rtp_instance *instance, c
ast_verbose(" DLSR: %4.4f (sec)\n",(double)report_block->dlsr / 65536.0);
ast_verbose(" RTT: %4.4f(sec)\n", rtp->rtcp->rtt);
}
- report_counter++;
}
/* If and when we handle more than one report block, this should occur outside
* this loop.
@@ -5433,6 +5445,15 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
* source and we should switch to it.
*/
if (!ast_sockaddr_cmp(&rtp->rtp_source_learn.proposed_address, &addr)) {
+ if (rtp->rtp_source_learn.stream_type == AST_MEDIA_TYPE_UNKNOWN) {
+ struct ast_rtp_codecs *codecs;
+
+ codecs = ast_rtp_instance_get_codecs(instance);
+ rtp->rtp_source_learn.stream_type =
+ ast_rtp_codecs_get_stream_type(codecs);
+ ast_verb(4, "%p -- Strict RTP qualifying stream type: %s\n",
+ rtp, ast_codec_media_type2str(rtp->rtp_source_learn.stream_type));
+ }
if (!rtp_learning_rtp_seq_update(&rtp->rtp_source_learn, seqno)) {
/* Accept the new RTP stream */
ast_verb(4, "%p -- Strict RTP switching source address to %s\n",
diff --git a/res/res_rtp_multicast.c b/res/res_rtp_multicast.c
index fd3ae21ef..70d9f3de4 100644
--- a/res/res_rtp_multicast.c
+++ b/res/res_rtp_multicast.c
@@ -96,7 +96,7 @@ struct multicast_rtp {
unsigned int ssrc;
/*! Sequence number, used when creating/sending the RTP packet */
uint16_t seqno;
- unsigned int lastts;
+ unsigned int lastts;
struct timeval txcore;
struct ast_smoother *smoother;
};
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 7b4c42b17..8622da4a0 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -251,7 +251,7 @@ static void smdi_interface_destroy(void *obj)
ast_module_unref(ast_module_info->self);
}
-/*!
+/*!
* \internal
* \brief Push an SMDI message to the back of an interface's message queue.
* \param iface a pointer to the interface to use.
@@ -326,10 +326,10 @@ static inline int lock_msg_q(struct ast_smdi_interface *iface, enum smdi_message
switch (type) {
case SMDI_MWI:
return ast_mutex_lock(&iface->mwi_q_lock);
- case SMDI_MD:
+ case SMDI_MD:
return ast_mutex_lock(&iface->md_q_lock);
}
-
+
return -1;
}
@@ -377,7 +377,7 @@ static void purge_old_messages(struct ast_smdi_interface *iface, enum smdi_messa
struct timeval now = ast_tvnow();
long elapsed = 0;
void *msg;
-
+
lock_msg_q(iface, type);
msg = unlink_from_msg_q(iface, type);
unlock_msg_q(iface, type);
@@ -391,7 +391,7 @@ static void purge_old_messages(struct ast_smdi_interface *iface, enum smdi_messa
ao2_ref(msg, -1);
ast_log(LOG_NOTICE, "Purged expired message from %s SMDI %s message queue. "
"Message was %ld milliseconds too old.\n",
- iface->name, (type == SMDI_MD) ? "MD" : "MWI",
+ iface->name, (type == SMDI_MD) ? "MD" : "MWI",
elapsed - iface->msg_expiry);
lock_msg_q(iface, type);
@@ -475,7 +475,7 @@ static void *smdi_msg_find(struct ast_smdi_interface *iface,
return msg;
}
-static void *smdi_message_wait(struct ast_smdi_interface *iface, int timeout,
+static void *smdi_message_wait(struct ast_smdi_interface *iface, int timeout,
enum smdi_message_type type, const char *search_key, struct ast_flags options)
{
struct timeval start;
@@ -574,7 +574,7 @@ struct ast_smdi_interface * AST_OPTIONAL_API_NAME(ast_smdi_interface_find)(const
return iface;
}
-/*!
+/*!
* \internal
* \brief Read an SMDI message.
*
@@ -588,9 +588,8 @@ static void *smdi_read(void *iface_p)
struct ast_smdi_interface *iface = iface_p;
struct ast_smdi_md_message *md_msg;
struct ast_smdi_mwi_message *mwi_msg;
- char c = '\0';
char *cp = NULL;
- int i;
+ int i, c;
int start = 0;
/* read an smdi message */
@@ -618,7 +617,14 @@ static void *smdi_read(void *iface_p)
/* read the message desk number */
for (i = 0; i < sizeof(md_msg->mesg_desk_num) - 1; i++) {
- md_msg->mesg_desk_num[i] = fgetc(iface->file);
+ c = fgetc(iface->file);
+ if (c == EOF) {
+ ast_log(LOG_ERROR, "Unexpected EOF while reading MD message\n");
+ ao2_ref(md_msg, -1);
+ ao2_ref(iface, -1);
+ return NULL;
+ }
+ md_msg->mesg_desk_num[i] = (char) c;
ast_debug(1, "Read a '%c'\n", md_msg->mesg_desk_num[i]);
}
@@ -628,7 +634,14 @@ static void *smdi_read(void *iface_p)
/* read the message desk terminal number */
for (i = 0; i < sizeof(md_msg->mesg_desk_term) - 1; i++) {
- md_msg->mesg_desk_term[i] = fgetc(iface->file);
+ c = fgetc(iface->file);
+ if (c == EOF) {
+ ast_log(LOG_ERROR, "Unexpected EOF while reading SMDI message\n");
+ ao2_ref(md_msg, -1);
+ ao2_ref(iface, -1);
+ return NULL;
+ }
+ md_msg->mesg_desk_term[i] = (char) c;
ast_debug(1, "Read a '%c'\n", md_msg->mesg_desk_term[i]);
}
@@ -637,7 +650,14 @@ static void *smdi_read(void *iface_p)
ast_debug(1, "The message desk terminal is '%s'\n", md_msg->mesg_desk_term);
/* read the message type */
- md_msg->type = fgetc(iface->file);
+ c = fgetc(iface->file);
+ if (c == EOF) {
+ ast_log(LOG_ERROR, "Unexpected EOF while reading SMDI message\n");
+ ao2_ref(md_msg, -1);
+ ao2_ref(iface, -1);
+ return NULL;
+ }
+ md_msg->type = (char) c;
ast_debug(1, "Message type is '%c'\n", md_msg->type);
@@ -719,7 +739,7 @@ static void *smdi_read(void *iface_p)
/* discard the 'I' (from 'MWI') */
fgetc(iface->file);
-
+
/* read the forwarding station number (may be blank) */
cp = &mwi_msg->fwd_st[0];
for (i = 0; i < sizeof(mwi_msg->fwd_st) - 1; i++) {
@@ -742,8 +762,16 @@ static void *smdi_read(void *iface_p)
ast_copy_string(mwi_msg->name, mwi_msg->fwd_st, sizeof(mwi_msg->name));
/* read the mwi failure cause */
- for (i = 0; i < sizeof(mwi_msg->cause) - 1; i++)
- mwi_msg->cause[i] = fgetc(iface->file);
+ for (i = 0; i < sizeof(mwi_msg->cause) - 1; i++) {
+ c = fgetc(iface->file);
+ if (c == EOF) {
+ ast_log(LOG_ERROR, "Unexpected EOF while reading MWI message\n");
+ ao2_ref(mwi_msg, -1);
+ ao2_ref(iface, -1);
+ return NULL;
+ }
+ mwi_msg->cause[i] = (char) c;
+ }
mwi_msg->cause[sizeof(mwi_msg->cause) - 1] = '\0';
@@ -943,7 +971,7 @@ static int smdi_load(int reload)
tcflag_t paritybit = PARENB; /* even parity checking */
tcflag_t charsize = CS7; /* seven bit characters */
int stopbits = 0; /* One stop bit */
-
+
int msdstrip = 0; /* strip zero digits */
long msg_expiry = SMDI_MSG_EXPIRY_TIME;
@@ -1026,7 +1054,7 @@ static int smdi_load(int reload)
continue;
}
}
-
+
if (!(iface = alloc_smdi_interface()))
continue;
@@ -1054,19 +1082,19 @@ static int smdi_load(int reload)
ast_log(LOG_ERROR, "Error setting baud rate on %s (%s)\n", iface->name, strerror(errno));
continue;
}
-
+
/* set the stop bits */
if (stopbits)
iface->mode.c_cflag = iface->mode.c_cflag | CSTOPB; /* set two stop bits */
else
iface->mode.c_cflag = iface->mode.c_cflag & ~CSTOPB; /* set one stop bit */
-
+
/* set the parity */
iface->mode.c_cflag = (iface->mode.c_cflag & ~PARENB & ~PARODD) | paritybit;
-
+
/* set the character size */
iface->mode.c_cflag = (iface->mode.c_cflag & ~CSIZE) | charsize;
-
+
/* commit the desired attributes */
if (tcsetattr(iface->fd, TCSAFLUSH, &iface->mode)) {
ast_log(LOG_ERROR, "Error setting attributes on %s (%s)\n", iface->name, strerror(errno));
@@ -1132,7 +1160,7 @@ static int smdi_load(int reload)
if (ao2_container_count(new_ifaces)) {
res = 1;
}
-
+
return res;
}
@@ -1303,7 +1331,7 @@ static int smdi_msg_read(struct ast_channel *chan, const char *cmd, char *data,
ast_channel_lock(chan);
datastore = ast_channel_datastore_find(chan, &smdi_msg_datastore_info, args.id);
ast_channel_unlock(chan);
-
+
if (!datastore) {
ast_log(LOG_WARNING, "No SMDI message found for message ID '%s'\n", args.id);
goto return_error;
@@ -1353,8 +1381,8 @@ static int _unload_module(int fromload);
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
@@ -1379,6 +1407,9 @@ static int load_module(void)
ast_custom_function_register(&smdi_msg_retrieve_function);
ast_custom_function_register(&smdi_msg_function);
+ /* For Optional API. */
+ ast_module_shutdown_ref(ast_module_info->self);
+
return AST_MODULE_LOAD_SUCCESS;
}
@@ -1408,9 +1439,6 @@ static int _unload_module(int fromload)
smdi_loaded = 0;
- /* For Optional API. */
- ast_module_shutdown_ref(ast_module_info->self);
-
return 0;
}
diff --git a/res/res_snmp.c b/res/res_snmp.c
index c7cfa3174..79ff4b1e5 100644
--- a/res/res_snmp.c
+++ b/res/res_snmp.c
@@ -109,8 +109,8 @@ static int load_config(void)
* Module loading including tests for configuration or dependencies.
* This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE,
* or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails
- * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
- * configuration file or other non-critical problem return
+ * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the
+ * configuration file or other non-critical problem return
* AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
*/
static int load_module(void)
diff --git a/res/res_sorcery_astdb.c b/res/res_sorcery_astdb.c
index fee857525..135709ebd 100644
--- a/res/res_sorcery_astdb.c
+++ b/res/res_sorcery_astdb.c
@@ -336,14 +336,14 @@ static void sorcery_astdb_retrieve_prefix(const struct ast_sorcery *sorcery, voi
const char *family_prefix = data;
size_t family_len = strlen(family_prefix) + strlen(type) + 1; /* +1 for slash delimiter */
char family[family_len + 1];
- char tree[prefix_len + sizeof("%")];
+ char tree[prefix_len + 1];
RAII_VAR(struct ast_db_entry *, entries, NULL, ast_db_freetree);
struct ast_db_entry *entry;
- snprintf(tree, sizeof(tree), "%.*s%%", (int) prefix_len, prefix);
+ snprintf(tree, sizeof(tree), "%.*s", (int) prefix_len, prefix);
snprintf(family, sizeof(family), "%s/%s", family_prefix, type);
- if (!(entries = ast_db_gettree(family, tree))) {
+ if (!(entries = ast_db_gettree_by_prefix(family, tree))) {
return;
}
diff --git a/res/res_sorcery_realtime.c b/res/res_sorcery_realtime.c
index 1c52eb90f..9b0b25fb1 100644
--- a/res/res_sorcery_realtime.c
+++ b/res/res_sorcery_realtime.c
@@ -97,7 +97,7 @@ static int sorcery_realtime_create(const struct ast_sorcery *sorcery, void *data
return (ast_store_realtime_fields(config->family, fields) <= 0) ? -1 : 0;
}
-/*! \brief Internal helper function which returns a filtered objectset.
+/*! \brief Internal helper function which returns a filtered objectset.
*
* The following are filtered out of the objectset:
* \li The id field. This is returned to the caller in an out parameter.
diff --git a/res/res_speech.c b/res/res_speech.c
index 7d75985ca..f61588f57 100644
--- a/res/res_speech.c
+++ b/res/res_speech.c
@@ -365,5 +365,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
- .load_pri = AST_MODPRI_APP_DEPEND,
+ .load_pri = AST_MODPRI_APP_DEPEND - 1,
);
diff --git a/res/res_srtp.c b/res/res_srtp.c
index 74587d55d..773d53316 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -196,7 +196,7 @@ static struct ast_srtp *res_srtp_new(void)
ast_free(srtp);
return NULL;
}
-
+
srtp->warned = 1;
return srtp;
@@ -453,7 +453,7 @@ static int ast_srtp_protect(struct ast_srtp *srtp, void **buf, int *len, int rtc
if ((*len + SRTP_MAX_TRAILER_LEN) > sizeof(srtp->buf)) {
return -1;
}
-
+
localbuf = rtcp ? srtp->rtcpbuf : srtp->buf;
memcpy(localbuf, *buf, *len);
diff --git a/res/res_stasis.c b/res/res_stasis.c
index b1cea3ad5..9a06a5287 100644
--- a/res/res_stasis.c
+++ b/res/res_stasis.c
@@ -2124,8 +2124,8 @@ static int load_module(void)
return AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Stasis application support",
- .load_pri = AST_MODPRI_APP_DEPEND,
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER, "Stasis application support",
+ .load_pri = AST_MODPRI_APP_DEPEND - 1,
.support_level = AST_MODULE_SUPPORT_CORE,
.load = load_module,
.unload = unload_module,
diff --git a/res/res_statsd.c b/res/res_statsd.c
index b8e4d0475..67166e820 100644
--- a/res/res_statsd.c
+++ b/res/res_statsd.c
@@ -233,8 +233,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "global",
.item_offset = offsetof(struct conf, global),
- .category = "^general$",
- .category_match = ACO_WHITELIST
+ .category = "general",
+ .category_match = ACO_WHITELIST_EXACT,
};
static struct aco_type *global_options[] = ACO_TYPES(&global_option);
diff --git a/res/res_timing_dahdi.c b/res/res_timing_dahdi.c
index 1ef5117c7..72983fa06 100644
--- a/res/res_timing_dahdi.c
+++ b/res/res_timing_dahdi.c
@@ -16,11 +16,11 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \author Russell Bryant <russell@digium.com>
*
- * \brief DAHDI timing interface
+ * \brief DAHDI timing interface
*/
/*** MODULEINFO
@@ -156,7 +156,7 @@ static enum ast_timer_event dahdi_timer_get_event(void *data)
return AST_TIMING_EVENT_CONTINUOUS;
case DAHDI_EVENT_TIMER_EXPIRED:
default:
- return AST_TIMING_EVENT_EXPIRED;
+ return AST_TIMING_EVENT_EXPIRED;
}
}
@@ -178,7 +178,7 @@ static int dahdi_test_timer(void)
{
int fd;
int x = 160;
-
+
fd = open("/dev/dahdi/timer", O_RDWR);
if (fd < 0) {
diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c
index 1e76720ec..f57c737f6 100644
--- a/res/res_timing_pthread.c
+++ b/res/res_timing_pthread.c
@@ -132,11 +132,9 @@ static void *pthread_timer_open(void)
}
for (i = 0; i < ARRAY_LEN(timer->pipe); ++i) {
- int flags = fcntl(timer->pipe[i], F_GETFL);
- flags |= O_NONBLOCK;
- fcntl(timer->pipe[i], F_SETFL, flags);
+ ast_fd_set_flags(timer->pipe[i], O_NONBLOCK);
}
-
+
ao2_lock(pthread_timers);
if (!ao2_container_count(pthread_timers)) {
ast_mutex_lock(&timing_thread.lock);
diff --git a/res/res_xmpp.c b/res/res_xmpp.c
index 1b0ae427b..41f89961c 100644
--- a/res/res_xmpp.c
+++ b/res/res_xmpp.c
@@ -822,8 +822,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "global",
.item_offset = offsetof(struct xmpp_config, global),
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -831,8 +831,8 @@ struct aco_type *global_options[] = ACO_TYPES(&global_option);
static struct aco_type client_option = {
.type = ACO_ITEM,
.name = "client",
- .category_match = ACO_BLACKLIST,
- .category = "^(general)$",
+ .category_match = ACO_BLACKLIST_EXACT,
+ .category = "general",
.item_alloc = ast_xmpp_client_config_alloc,
.item_find = xmpp_config_find,
.item_prelink = xmpp_config_prelink,
diff --git a/res/snmp/agent.c b/res/snmp/agent.c
index 7cd895559..ffec44406 100644
--- a/res/snmp/agent.c
+++ b/res/snmp/agent.c
@@ -555,7 +555,7 @@ static u_char *ast_var_channel_types_table(struct variable *vp, oid *name, size_
ast_variables_destroy(channel_types);
if (next == NULL || tech == NULL)
return NULL;
-
+
switch (vp->magic) {
case ASTCHANTYPEINDEX:
long_ret = name[*length - 1];
diff --git a/res/stasis/app.c b/res/stasis/app.c
index 1e885c6f8..91b006572 100644
--- a/res/stasis/app.c
+++ b/res/stasis/app.c
@@ -1432,25 +1432,15 @@ int app_unsubscribe_bridge_id(struct stasis_app *app, const char *bridge_id)
int app_is_subscribed_bridge_id(struct stasis_app *app, const char *bridge_id)
{
struct app_forwards *forwards;
- SCOPED_AO2LOCK(lock, app->forwards);
-
- forwards = ao2_find(app->forwards, BRIDGE_ALL, OBJ_SEARCH_KEY | OBJ_NOLOCK);
- if (forwards) {
- ao2_ref(forwards, -1);
- return 1;
- }
if (ast_strlen_zero(bridge_id)) {
bridge_id = BRIDGE_ALL;
}
- forwards = ao2_find(app->forwards, bridge_id, OBJ_SEARCH_KEY | OBJ_NOLOCK);
- if (forwards) {
- ao2_ref(forwards, -1);
- return 1;
- }
+ forwards = ao2_find(app->forwards, bridge_id, OBJ_SEARCH_KEY);
+ ao2_cleanup(forwards);
- return 0;
+ return forwards != NULL;
}
static void *bridge_find(const struct stasis_app *app, const char *id)
@@ -1565,5 +1555,3 @@ void stasis_app_unregister_event_sources(void)
stasis_app_unregister_event_source(&bridge_event_source);
stasis_app_unregister_event_source(&channel_event_source);
}
-
-
diff --git a/rest-api-templates/ari_model_validators.h.mustache b/rest-api-templates/ari_model_validators.h.mustache
index 5a1be4bfc..0223a68a7 100644
--- a/rest-api-templates/ari_model_validators.h.mustache
+++ b/rest-api-templates/ari_model_validators.h.mustache
@@ -146,7 +146,7 @@ int ast_ari_validate_list(struct ast_json *json, int (*fn)(struct ast_json *));
/*! @} */
/*!
- * \brief Function type for validator functions. Allows for
+ * \brief Function type for validator functions. Allows for
*/
typedef int (*ari_validator)(struct ast_json *json);
{{#apis}}
diff --git a/sample.call b/sample.call
index ad11b9cb9..52650ecd2 100644
--- a/sample.call
+++ b/sample.call
@@ -81,4 +81,3 @@ Priority: 1
# Completed, Expired or Failed.
#
#Archive: yes
-
diff --git a/sounds/Makefile b/sounds/Makefile
index 381776f72..a081c3ccf 100644
--- a/sounds/Makefile
+++ b/sounds/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for sound files
#
# Copyright (C) 2006, Digium, Inc.
diff --git a/static-http/ajamdemo.html b/static-http/ajamdemo.html
index 37f8a573d..76996c139 100644
--- a/static-http/ajamdemo.html
+++ b/static-http/ajamdemo.html
@@ -1,10 +1,10 @@
<!--
Asterisk -- An open source telephony toolkit.
-
+
Copyright (C) 1999 - 2012, Digium, Inc.
-
+
Mark Spencer <markster@digium.com>
-
+
See http://www.asterisk.org for more information about
the Asterisk project. Please do not directly contact
any of the maintainers of this project for assistance;
@@ -28,9 +28,9 @@
var selectedchan = null;
var hungupchan = "";
var transferedchan = "";
-
+
var demo = new Object;
-
+
function loggedOn() {
if (loggedon == 1)
return;
@@ -40,7 +40,7 @@
astmanEngine.pollEvents();
astmanEngine.sendRequest('action=status', demo.channels);
}
-
+
function clearChannelList() {
$('channellist').innerHTML = "<i class='light'>Not connected</i>";
}
@@ -54,7 +54,7 @@
astmanEngine.channelClear();
clearChannelList();
}
-
+
function updateButtons()
{
if ($(selectedchan)) {
@@ -79,12 +79,12 @@
$('refresh').disabled = 1;
}
}
-
+
demo.channelCallback = function(target) {
selectedchan = target;
updateButtons();
}
-
+
demo.channels = function(msgs) {
resp = msgs[0].headers['response'];
if (resp == "Success") {
@@ -92,7 +92,7 @@
} else
loggedOff();
- for (i=1;i<msgs.length - 1;i++)
+ for (i=1;i<msgs.length - 1;i++)
astmanEngine.channelUpdate(msgs[i]);
$('channellist').innerHTML = astmanEngine.channelTable(demo.channelCallback);
$('statusbar').innerHTML = "Ready";
@@ -106,8 +106,8 @@
else
loggedOff();
};
-
-
+
+
demo.logoffs = function(msgs) {
$('statusbar').innerHTML = msgs[0].headers['message'];
loggedOff();
@@ -116,7 +116,7 @@
demo.hungup = function(msgs) {
$('statusbar').innerHTML = "Hungup " + hungupchan;
}
-
+
demo.transferred = function(msgs) {
$('statusbar').innerHTML = "Transferred " + transferredchan;
}
@@ -130,13 +130,13 @@
$('statusbar').innerHTML = "<i>Updating channel status...</i>";
astmanEngine.channelClear();
astmanEngine.sendRequest('action=status', demo.channels);
- }
-
+ }
+
function doLogin() {
$('statusbar').innerHTML = "<i>Logging in...</i>";
astmanEngine.sendRequest('action=login&username=' + $('username').value + "&secret=" + $('secret').value, demo.logins);
}
-
+
function doTransfer() {
var channel = astmanEngine.channelInfo(selectedchan);
var exten = prompt("Enter new extension for " + selectedchan);
@@ -155,12 +155,12 @@
}
}
}
-
+
function doLogoff() {
$('statusbar').innerHTML = "<i>Logging off...</i>";
astmanEngine.sendRequest('action=logoff', demo.logoffs);
}
-
+
demo.pongs = function(msgs) {
resp = msgs[0].headers['response'];
if (resp == "Pong") {
@@ -171,7 +171,7 @@
loggedOff();
}
}
-
+
demo.eventcb = function(msgs) {
var x;
if (loggedon) {
@@ -183,7 +183,7 @@
}
updateButtons();
}
-
+
function localajaminit() {
astmanEngine.setURL('../rawman');
astmanEngine.setEventCallback(demo.eventcb);
diff --git a/static-http/astman.css b/static-http/astman.css
index 28ab34306..558dc9006 100644
--- a/static-http/astman.css
+++ b/static-http/astman.css
@@ -41,7 +41,7 @@
.chanlistodd {
background-color : #f0f5ff;
-}
+}
.chanlistselected {
background-color : #ffb13d;
diff --git a/static-http/astman.js b/static-http/astman.js
index e00a2e055..5b53d4659 100644
--- a/static-http/astman.js
+++ b/static-http/astman.js
@@ -36,7 +36,7 @@ function Astman() {
};
this.clickChannel = function(ev) {
var target = ev.target;
- // XXX This is icky, we statically use astmanEngine to call the callback XXX
+ // XXX This is icky, we statically use astmanEngine to call the callback XXX
if (me.selecttarget)
me.restoreTarget(me.selecttarget);
while(!target.id || !target.id.length)
@@ -56,7 +56,7 @@ function Astman() {
other = target.nextSibling.nextSibling.className;
}
if (other) {
- if (other == "chanlisteven")
+ if (other == "chanlisteven")
target.className = "chanlistodd";
else
target.className = "chanlisteven";
@@ -71,7 +71,7 @@ function Astman() {
if (!channels[channame])
channels[channame] = new Array();
-
+
if (msg.headers.event) {
if (msg.headers.event == "Hangup") {
delete channels[channame];
@@ -184,7 +184,7 @@ function Astman() {
var x,y;
var s = t.responseText;
var allheaders = s.split('\r\n');
- if (me.debug)
+ if (me.debug)
me.debug.value = "\n";
for (x=0;x<allheaders.length;x++) {
if (allheaders[x].length) {
diff --git a/static-http/mantest.html b/static-http/mantest.html
index c0affe2bc..f36f675e7 100644
--- a/static-http/mantest.html
+++ b/static-http/mantest.html
@@ -1,10 +1,10 @@
<!--
Asterisk -- An open source telephony toolkit.
-
+
Copyright (C) 1999 - 2012, Digium, Inc.
-
+
Mark Spencer <markster@digium.com>
-
+
See http://www.asterisk.org for more information about
the Asterisk project. Please do not directly contact
any of the maintainers of this project for assistance;
diff --git a/tests/Makefile b/tests/Makefile
index 000da6c94..a65b88bac 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Makefile for test modules
#
# Copyright (C) 2008, Digium, Inc.
diff --git a/tests/test_acl.c b/tests/test_acl.c
index c7a711fe3..c99c8ccc3 100644
--- a/tests/test_acl.c
+++ b/tests/test_acl.c
@@ -122,7 +122,7 @@ struct acl {
#define TACL_A AST_SENSE_ALLOW
#define TACL_D AST_SENSE_DENY
-static int build_ha(const struct acl *acl, size_t len, struct ast_ha **ha, const char *acl_name, int *err, struct ast_test *test, enum ast_test_result_state *res)
+static int build_ha(const struct acl *acl, size_t len, struct ast_ha **ha, const char *acl_name, int *err, struct ast_test *test, enum ast_test_result_state *res)
{
size_t i;
diff --git a/tests/test_ami_security_events.sh b/tests/test_ami_security_events.sh
index 6f125dc5a..8cbc6669b 100755
--- a/tests/test_ami_security_events.sh
+++ b/tests/test_ami_security_events.sh
@@ -44,4 +44,3 @@ printf "Action: Challenge\r\nUsername: russell\r\nAuthType: MD5\r\n\r\nAction: L
# Session Limit
printf "Action: Login\r\nUsername: russell\r\nSecret: blah123\r\n\r\n" | nc -w 5 localhost 5038 &
printf "Action: Login\r\nUsername: russell\r\nSecret: blah123\r\n\r\n" | nc -w 1 localhost 5038
-
diff --git a/tests/test_aoc.c b/tests/test_aoc.c
index 35387df90..119706404 100644
--- a/tests/test_aoc.c
+++ b/tests/test_aoc.c
@@ -359,7 +359,7 @@ AST_TEST_DEFINE(aoc_encode_decode_test)
goto cleanup_aoc_test;
}
- /* Set a currency name larger than 10 characters which is the the maximum
+ /* Set a currency name larger than 10 characters which is the maximum
* length allowed by the ETSI aoc standard. The name is expected to truncate
* to 10 characters. */
if ((ast_aoc_set_currency_info(decoded, 100, AST_AOC_MULT_ONE, "12345678901234567890")) ||
diff --git a/tests/test_config.c b/tests/test_config.c
index c58bdc70d..88e62bd51 100644
--- a/tests/test_config.c
+++ b/tests/test_config.c
@@ -1458,13 +1458,19 @@ static struct aco_type global = {
static struct aco_type global_defaults = {
.type = ACO_GLOBAL,
.item_offset = offsetof(struct test_config, global_defaults),
- .category_match = ACO_WHITELIST,
- .category = "^global_defaults$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "global_defaults",
+};
+static const char *item_blacklist[] = {
+ "global",
+ "global_defaults",
+ NULL,
};
+
static struct aco_type item = {
.type = ACO_ITEM,
- .category_match = ACO_BLACKLIST,
- .category = "^(global|global_defaults)$",
+ .category_match = ACO_BLACKLIST_ARRAY,
+ .category = (const char *)item_blacklist,
.item_alloc = test_item_alloc,
.item_find = test_item_find,
.item_offset = offsetof(struct test_config, items),
@@ -1925,4 +1931,3 @@ static int load_module(void)
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Config test module");
-
diff --git a/tests/test_dlinklists.c b/tests/test_dlinklists.c
index 81760acba..104c9a333 100644
--- a/tests/test_dlinklists.c
+++ b/tests/test_dlinklists.c
@@ -21,7 +21,7 @@
* \brief Doubly-Linked List Tests
*
* \author\verbatim Steve Murphy <murf@digium.com> \endverbatim
- *
+ *
* This module will run some DLL tests at load time
* \ingroup tests
*/
@@ -69,7 +69,7 @@ static void print_list(struct test_container *x, char *expect)
if (t1 != AST_DLLIST_LAST(&x->entries))
strcat(buff," <=> ");
}
-
+
ast_debug(1,"Got: %s [expect %s]\n", buff, expect);
}
@@ -83,7 +83,7 @@ static void print_list_backwards(struct test_container *x, char *expect)
if (t1 != AST_DLLIST_FIRST(&x->entries))
strcat(buff," <=> ");
}
-
+
ast_debug(1,"Got: %s [expect %s]\n", buff, expect);
}
@@ -115,7 +115,7 @@ static void destroy_test_container(struct test_container *x)
/* Macros to test:
AST_DLLIST_LOCK(head)
AST_RWDLLIST_WRLOCK(head)
-AST_RWDLLIST_WRLOCK(head)
+AST_RWDLLIST_WRLOCK(head)
AST_RWDLLIST_RDLOCK(head)
AST_DLLIST_TRYLOCK(head)
AST_RWDLLIST_TRYWRLOCK(head)
@@ -160,7 +160,7 @@ AST_DLLIST_TRAVERSE_SAFE_BEGIN(head, var, field)
AST_DLLIST_TRAVERSE_SAFE_END
AST_DLLIST_REMOVE_CURRENT(field)
AST_DLLIST_MOVE_CURRENT(newhead, field)
-AST_DLLIST_INSERT_BEFORE_CURRENT(elm, field)
+AST_DLLIST_INSERT_BEFORE_CURRENT(elm, field)
AST_DLLIST_MOVE_CURRENT_BACKWARDS(newhead, field)
@@ -179,7 +179,7 @@ static void dll_tests(void)
struct test1 *c;
struct test1 *d;
struct test1 *e;
-
+
ast_debug(1,"Test AST_DLLIST_INSERT_HEAD, AST_DLLIST_TRAVERSE, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END\n");
tc = make_cont();
a = make_test1("A");
@@ -193,7 +193,7 @@ static void dll_tests(void)
print_list(tc, "A <=> B <=> C <=> D");
destroy_test_container(tc);
-
+
tc = make_cont();
if (AST_DLLIST_EMPTY(&tc->entries))
@@ -206,7 +206,7 @@ static void dll_tests(void)
b = make_test1("B");
c = make_test1("C");
d = make_test1("D");
-
+
ast_debug(1,"Test AST_DLLIST_INSERT_TAIL\n");
AST_DLLIST_INSERT_TAIL(&tc->entries, a, list);
AST_DLLIST_INSERT_TAIL(&tc->entries, b, list);
@@ -279,7 +279,7 @@ static void dll_tests(void)
AST_DLLIST_REMOVE(&tc->entries, d, list);
print_list(tc, "B");
AST_DLLIST_REMOVE(&tc->entries, b, list);
-
+
if (AST_DLLIST_EMPTY(&tc->entries))
ast_debug(1,"Test AST_DLLIST_REMOVE....OK\n");
else
@@ -298,7 +298,7 @@ static void dll_tests(void)
ast_debug(1,"Test AST_DLLIST_REMOVE_CURRENT... OK\n");
else
ast_log(LOG_ERROR,"Test AST_DLLIST_REMOVE_CURRENT... PROBLEM\n");
-
+
ast_debug(1,"Test AST_DLLIST_MOVE_CURRENT, AST_DLLIST_INSERT_BEFORE_CURRENT\n");
AST_DLLIST_INSERT_HEAD(&tc->entries, a, list);
AST_DLLIST_INSERT_AFTER(&tc->entries, a, b, list);
@@ -307,15 +307,15 @@ static void dll_tests(void)
if (e == a) {
AST_DLLIST_INSERT_BEFORE_CURRENT(d, list); /* D A B C */
}
-
+
if (e == b) {
AST_DLLIST_MOVE_CURRENT(&tc->entries, list); /* D A C B */
}
-
+
}
AST_DLLIST_TRAVERSE_SAFE_END;
print_list(tc, "D <=> A <=> C <=> B");
-
+
destroy_test_container(tc);
tc = make_cont();
@@ -344,7 +344,7 @@ static void dll_tests(void)
AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS(d, list); /* C A D */
print_list(tc, "C <=> A <=> D");
}
-
+
}
AST_DLLIST_TRAVERSE_SAFE_END;
print_list(tc, "C <=> A <=> D");
diff --git a/tests/test_locale.c b/tests/test_locale.c
index de14a0830..811fa120c 100644
--- a/tests/test_locale.c
+++ b/tests/test_locale.c
@@ -21,7 +21,7 @@
* \brief Locale Test
*
* \author\verbatim Tilghman Lesher <tlesher AT digium DOT com> \endverbatim
- *
+ *
* \ingroup tests
*/
diff --git a/tests/test_skel.c b/tests/test_skel.c
index 122003da3..c35ac4b4e 100644
--- a/tests/test_skel.c
+++ b/tests/test_skel.c
@@ -16,12 +16,12 @@
* at the top of the source tree.
*/
-/*!
+/*!
* \file
* \brief Skeleton Test
*
* \author\verbatim <Your Name Here> <<Your Email Here>> \endverbatim
- *
+ *
* This is a skeleton for development of an Asterisk test module
* \ingroup tests
*/
diff --git a/tests/test_substitution.c b/tests/test_substitution.c
index 96ca29c74..070f825c4 100644
--- a/tests/test_substitution.c
+++ b/tests/test_substitution.c
@@ -21,7 +21,7 @@
* \brief Substitution Test
*
* \author\verbatim Tilghman Lesher <tlesher AT digium DOT com> \endverbatim
- *
+ *
* \ingroup tests
*/
diff --git a/tests/test_taskprocessor.c b/tests/test_taskprocessor.c
index ad2074cb8..273e045d5 100644
--- a/tests/test_taskprocessor.c
+++ b/tests/test_taskprocessor.c
@@ -652,7 +652,7 @@ AST_TEST_DEFINE(taskprocessor_shutdown)
/* Wait for shutdown to complete */
pthread_join(shutdown_thread, NULL);
- /* Should have also also completed task2 */
+ /* Should have also completed task2 */
wait_res = shutdown_has_completed(task2);
if (!wait_res) {
ast_test_status_update(test, "Task2 didn't finish\n");
diff --git a/third-party/Makefile b/third-party/Makefile
index 59b7c0649..3ea84d105 100644
--- a/third-party/Makefile
+++ b/third-party/Makefile
@@ -18,4 +18,3 @@ install uninstall: $(TP_INSTALL_SUBDIRS)
$(TP_SUBDIRS):
+$(CMD_PREFIX) $(SUBMAKE) -C $@ $(MAKECMDGOALS)
-
diff --git a/third-party/configure.m4 b/third-party/configure.m4
index 55b72daf9..6367722d0 100644
--- a/third-party/configure.m4
+++ b/third-party/configure.m4
@@ -7,4 +7,3 @@ AC_DEFUN([THIRD_PARTY_CONFIGURE],
[
PJPROJECT_CONFIGURE()
])
-
diff --git a/third-party/pjproject/apply_patches b/third-party/pjproject/apply_patches
index 134bd306f..23323fbef 100755
--- a/third-party/pjproject/apply_patches
+++ b/third-party/pjproject/apply_patches
@@ -31,4 +31,3 @@ for patchfile in "$patchdir"/*.patch ; do
done
exit 0
-
diff --git a/third-party/pjproject/patches/0050-dont_terminate_session_early.patch b/third-party/pjproject/patches/0050-dont_terminate_session_early.patch
new file mode 100644
index 000000000..718968c79
--- /dev/null
+++ b/third-party/pjproject/patches/0050-dont_terminate_session_early.patch
@@ -0,0 +1,71 @@
+commit ca0b723e92bd76bbda1bbd14477a829eaeeb675e
+Author: Joshua Colp <jcolp@digium.com>
+Date: Wed Dec 13 10:58:57 2017 +0000
+
+ Ignore transport error on completed transaction.
+ Don't disconnect call if transport error happens on transaction that is not initial INVITE transaction.
+
+ Scenario:
+
+ DNS lookup returning two servers.
+ Sending INVITE to first server over TCP.
+ Response received with code 503 (Service Unavailable).
+ Failover to second server, sending second INVITE after restarting the session.
+ TCP connection for the first INVITE getting disconnected and causing call disconnection (while second INVITE is still outstanding).
+
+ This is a backport of 5714 from upstream PJSIP.
+
+diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
+index ac4d1949..0173cb4c 100644
+--- a/pjsip/src/pjsip-ua/sip_inv.c
++++ b/pjsip/src/pjsip-ua/sip_inv.c
+@@ -4254,8 +4254,7 @@ static void inv_on_state_calling( pjsip_inv_session *inv, pjsip_event *e)
+ if ((tsx->status_code == PJSIP_SC_CALL_TSX_DOES_NOT_EXIST &&
+ tsx->method.id != PJSIP_CANCEL_METHOD) ||
+ tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT ||
+- tsx->status_code == PJSIP_SC_TSX_TIMEOUT ||
+- tsx->status_code == PJSIP_SC_TSX_TRANSPORT_ERROR)
++ tsx->status_code == PJSIP_SC_TSX_TIMEOUT)
+ {
+ inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+ inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+diff --git a/pjsip/src/pjsip/sip_transaction.c b/pjsip/src/pjsip/sip_transaction.c
+index 7ac3d1b7..d52b12a7 100644
+--- a/pjsip/src/pjsip/sip_transaction.c
++++ b/pjsip/src/pjsip/sip_transaction.c
+@@ -2044,9 +2044,14 @@ static void transport_callback(void *token, pjsip_tx_data *tdata,
+ */
+ lock_timer(tsx);
+ tsx->transport_err = (pj_status_t)-sent;
+- tsx_cancel_timer(tsx, &tsx->timeout_timer);
+- tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay,
+- TRANSPORT_ERR_TIMER);
++ /* Don't cancel timeout timer if tsx state is already
++ * PJSIP_TSX_STATE_COMPLETED (see #2076).
++ */
++ if (tsx->state < PJSIP_TSX_STATE_COMPLETED) {
++ tsx_cancel_timer(tsx, &tsx->timeout_timer);
++ tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay,
++ TRANSPORT_ERR_TIMER);
++ }
+ unlock_timer(tsx);
+ }
+
+@@ -2077,9 +2082,14 @@ static void tsx_tp_state_callback( pjsip_transport *tp,
+ */
+ lock_timer(tsx);
+ tsx->transport_err = info->status;
+- tsx_cancel_timer(tsx, &tsx->timeout_timer);
+- tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay,
+- TRANSPORT_ERR_TIMER);
++ /* Don't cancel timeout timer if tsx state is already
++ * PJSIP_TSX_STATE_COMPLETED (see #2076).
++ */
++ if (tsx->state < PJSIP_TSX_STATE_COMPLETED) {
++ tsx_cancel_timer(tsx, &tsx->timeout_timer);
++ tsx_schedule_timer(tsx, &tsx->timeout_timer, &delay,
++ TRANSPORT_ERR_TIMER);
++ }
+ unlock_timer(tsx);
+ }
+ }
diff --git a/third-party/pjproject/patches/asterisk_malloc_debug.c b/third-party/pjproject/patches/asterisk_malloc_debug.c
index c41767bd8..aaf79855a 100644
--- a/third-party/pjproject/patches/asterisk_malloc_debug.c
+++ b/third-party/pjproject/patches/asterisk_malloc_debug.c
@@ -68,5 +68,3 @@ int __ast_vasprintf(char **strp, const char *format, va_list ap, const char *fil
{
return vasprintf(strp, format, ap);
}
-
-
diff --git a/utils/Makefile b/utils/Makefile
index af216738b..037abb983 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,6 +1,6 @@
#
# Asterisk -- An open source telephony toolkit.
-#
+#
# Various utilities
#
# Copyright (C) 1999-2006, Digium
@@ -22,7 +22,7 @@ ASTTOPDIR?=..
# the 1.2 days. The neat part is that it will actually evaluate the expressions.
# Users could use this to quickly check expressions in their .ael file.
# to get check_expr2, add it to the ALL_UTILS list -- this is a program that will
-# read in a file containing expressions (as if they were in $[ ]), one per line.
+# read in a file containing expressions (as if they were in $[ ]), one per line.
# It will, of course signal any syntax errors. Devs (like murf) should use this whenever
# changes are made to ast_expr2.y or ast_expr2.fl (or the corresponding .c files),
# as a regression test. Others (mere mortals?) need not bother, but they are
@@ -77,7 +77,7 @@ install:
if [ "$$x" != "none" ]; then \
$(INSTALL) -m 755 $$x "$(DESTDIR)$(ASTSBINDIR)/$$x"; \
fi; \
- done
+ done
uninstall:
for x in $(ALL_UTILS); do rm -f "$(DESTDIR)$(ASTSBINDIR)/$$x"; done
@@ -178,7 +178,7 @@ check_expr2: $(ASTTOPDIR)/main/ast_expr2f.c $(ASTTOPDIR)/main/ast_expr2.c $(ASTT
$(ECHO_PREFIX) echo " [LD] ast_expr2fz.o ast_expr2z.o -> check_expr2"
$(CC) -g -o check_expr2 ast_expr2fz.o ast_expr2z.o -lm
$(ECHO_PREFIX) echo " [RM] ast_expr2fz.o ast_expr2z.o"
- rm ast_expr2z.o ast_expr2fz.o
+ rm ast_expr2z.o ast_expr2fz.o
./check_expr2 expr2.testinput
smsq: smsq.o strcompat.o
diff --git a/utils/ael_main.c b/utils/ael_main.c
index 86588ee4b..0c6ec03b4 100644
--- a/utils/ael_main.c
+++ b/utils/ael_main.c
@@ -48,7 +48,7 @@ struct namelist
struct namelist *next;
};
-struct ast_context
+struct ast_context
{
int extension_count;
char name[100];
@@ -136,7 +136,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -147,21 +147,21 @@ void ast_log(int level, const char *file, int line, const char *function, const
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action);
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action)
{
return localized_find_extension(bypass, q, context, exten, priority, label, callerid, action);
@@ -218,7 +218,7 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char
void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count)
{
if (cp1 && *cp1)
- strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
+ strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
a possible var substitution on extension names,
so....! */
else
@@ -255,15 +255,15 @@ int ast_add_extension2(struct ast_context *con,
if( FIRST_TIME ) {
FIRST_TIME = 0;
-
+
if( globalvars )
fprintf(dumpfile,"[globals]\n");
-
+
for(n=globalvars;n;n=n->next) {
fprintf(dumpfile, "%s\n", n->name);
}
}
-
+
/* print out each extension , possibly the context header also */
if( con != last_context ) {
fprintf(dumpfile,"\n\n[%s]\n", con->name);
@@ -280,7 +280,7 @@ int ast_add_extension2(struct ast_context *con,
for(n=con->eswitches;n;n=n->next) {
fprintf(dumpfile, "eswitch => %s/%s\n", n->name, n->name2);
}
-
+
}
if( data ) {
filter_newlines((char*)data);
@@ -303,7 +303,7 @@ int ast_add_extension2(struct ast_context *con,
fprintf(dumpfile,"exten => %s,%d,%s\n", extension, priority, application);
}
}
-
+
/* since add_extension2 is responsible for the malloc'd data stuff */
free(data);
return 0;
@@ -320,7 +320,7 @@ void pbx_builtin_setvar(void *chan, void *data)
ADD_LAST(globalvars,x);
}
}
-
+
struct ast_context * ast_context_create(void **extcontexts, const char *name, const char *registrar)
{
@@ -458,7 +458,7 @@ void filter_leading_space_from_exprs(char *str)
{
/* Mainly for aesthetics */
char *t, *v, *u = str;
-
+
while ( u && *u ) {
if( *u == '$' && *(u+1) == '[' ) {
@@ -471,7 +471,7 @@ void filter_leading_space_from_exprs(char *str)
}
}
}
-
+
u++;
}
}
@@ -500,7 +500,7 @@ int main(int argc, char **argv)
int i;
struct namelist *n;
struct ast_context *lp,*lp2;
-
+
for(i=1;i<argc;i++) {
if( argv[i][0] == '-' && argv[i][1] == 'n' )
no_comp =1;
@@ -513,7 +513,7 @@ int main(int argc, char **argv)
if( argv[i][0] == '-' && argv[i][1] == 'w' )
dump_extensions =1;
}
-
+
if( !quiet ) {
printf("\n(If you find progress and other non-error messages irritating, you can use -q to suppress them)\n");
if( !no_comp )
@@ -533,30 +533,30 @@ int main(int argc, char **argv)
localized_use_conf_dir();
}
strcpy(var_dir, "/var/lib/asterisk");
-
+
if( dump_extensions ) {
dumpfile = fopen("extensions.conf.aeldump","w");
if( !dumpfile ) {
printf("\n\nSorry, cannot open extensions.conf.aeldump for writing! Correct the situation and try again!\n\n");
exit(10);
}
-
+
}
FIRST_TIME = 1;
-
+
ael_external_load_module();
-
+
ast_log(4, "ael2_parse", __LINE__, "main", "%d contexts, %d extensions, %d priorities\n", conts, extens, priors);
if( dump_extensions && dumpfile ) {
-
+
for( lp = context_list; lp; lp = lp->next ) { /* print out any contexts that didn't have any
extensions in them */
if( lp->extension_count == 0 ) {
-
+
fprintf(dumpfile,"\n\n[%s]\n", lp->name);
-
+
for(n=lp->ignorepats;n;n=n->next) {
fprintf(dumpfile, "ignorepat => %s\n", n->name);
}
@@ -572,10 +572,10 @@ int main(int argc, char **argv)
}
}
}
-
+
if( dump_extensions && dumpfile )
fclose(dumpfile);
-
+
for( lp = context_list; lp; lp = lp2 ) { /* free the ast_context structs */
lp2 = lp->next;
lp->next = 0;
@@ -587,7 +587,7 @@ int main(int argc, char **argv)
free(lp);
}
-
+
return 0;
}
diff --git a/utils/astcanary.c b/utils/astcanary.c
index 9432c57a7..8e6182cff 100644
--- a/utils/astcanary.c
+++ b/utils/astcanary.c
@@ -132,4 +132,3 @@ int main(int argc, char *argv[])
/* Exit when the parent dies */
return 0;
}
-
diff --git a/utils/astman.1 b/utils/astman.1
index 6a36ca4da..3ce46c9be 100644
--- a/utils/astman.1
+++ b/utils/astman.1
@@ -49,14 +49,14 @@
.ds f2\"
.ds f3\"
.ds f4\"
-'\" t
-.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+'\" t
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
.TH ASTMAN 1 "Jun 12th, 2005" "astman" "Linux Programmer's Manual"
.SH NAME
.B astman
-- a client to asterisk's manager interface
.SH SYNOPSIS
-.PP
+.PP
.B astman
.I hostname
@@ -68,23 +68,23 @@ interface.
.SH OPTIONS
.B hostname
-The host name or IP address to connect to (TCP port 5038). If astman
+The host name or IP address to connect to (TCP port 5038). If astman
fails to connect it will exit immidiately.
.SH USAGE
-If \fBastman\fR has successfully cunnected to the manager port it will
-prompt the user for a username and a secret (password) for the manager
-interface on the remote Asterisk manager interface. It will then be able
-to report existing channels (calls). You will then be able to redirect
+If \fBastman\fR has successfully cunnected to the manager port it will
+prompt the user for a username and a secret (password) for the manager
+interface on the remote Asterisk manager interface. It will then be able
+to report existing channels (calls). You will then be able to redirect
calls to or terminate them.
-.SH "SEE ALSO"
+.SH "SEE ALSO"
asterisk(8)
http://www.voip-info.org/wiki-Asterisk+astman
.SH BUGS
-The hostname does not default to localhost.
+The hostname does not default to localhost.
Impossible to use a port other than 5038.
@@ -92,11 +92,11 @@ The username and password cannot be defined from the command-line.
I mean, what's the point in a man page if the syntax is so simple?
-.SH "AUTHOR"
-This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
-Permission is granted to copy, distribute and/or modify this document under
-the terms of the GNU General Public License, Version 2 any
-later version published by the Free Software Foundation.
+.SH "AUTHOR"
+This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com>
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU General Public License, Version 2 any
+later version published by the Free Software Foundation.
-On Debian systems, the complete text of the GNU General Public
-License can be found in /usr/share/common-licenses/GPL.
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL.
diff --git a/utils/astman.c b/utils/astman.c
index 9e0373c7d..2ea68b962 100644
--- a/utils/astman.c
+++ b/utils/astman.c
@@ -56,8 +56,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*
* 2005.05.27 - different versions of newt define the type of the buffer
- * for the 5th argument to newtEntry() as char ** or const char ** . To
- * let the code compile cleanly with -Werror, we cast it to void * through
+ * for the 5th argument to newtEntry() as char ** or const char ** . To
+ * let the code compile cleanly with -Werror, we cast it to void * through
* _NEWT_CAST.
*/
#define _NEWT_CAST (void *)
@@ -281,7 +281,7 @@ static int process_message(struct ast_mansession *s, struct message *m)
for (x=0;x<m->hdrcount;x++) {
printf("Header: %s\n", m->headers[x]);
}
-#endif
+#endif
return 0;
}
@@ -296,8 +296,8 @@ static void rebuild_channels(newtComponent c)
newtListboxClear(c);
AST_LIST_TRAVERSE(&chans, chan, list) {
snprintf(tmpn, sizeof(tmpn), "%s (%s)", chan->name, chan->callerid);
- if (strlen(chan->exten))
- snprintf(tmp, sizeof(tmp), "%-30s %8s -> %s@%s:%s",
+ if (strlen(chan->exten))
+ snprintf(tmp, sizeof(tmp), "%-30s %8s -> %s@%s:%s",
tmpn, chan->state,
chan->exten, chan->context, chan->priority);
else
@@ -314,8 +314,8 @@ static void rebuild_channels(newtComponent c)
static int has_input(struct ast_mansession *s)
{
int x;
- for (x=1;x<s->inlen;x++)
- if ((s->inbuf[x] == '\n') && (s->inbuf[x-1] == '\r'))
+ for (x=1;x<s->inlen;x++)
+ if ((s->inbuf[x] == '\n') && (s->inbuf[x-1] == '\r'))
return 1;
return 0;
}
@@ -338,7 +338,7 @@ static int get_input(struct ast_mansession *s, char *output)
s->inlen -= (x + 1);
return 1;
}
- }
+ }
if (s->inlen >= sizeof(s->inbuf) - 1) {
fprintf(stderr, "Dumping long line with no return from %s: %s\n", inet_ntoa(s->sin.sin_addr), s->inbuf);
s->inlen = 0;
@@ -490,7 +490,7 @@ static void try_status(void)
show_message("Status Failed Failed", get_header(m, "Message"));
}
}
-
+
static void try_hangup(newtComponent c)
{
@@ -507,7 +507,7 @@ static void try_hangup(newtComponent c)
show_message("Hangup Failed", get_header(m, "Message"));
}
}
-
+
}
static int get_user_input(char *msg, char *buf, int buflen)
@@ -529,7 +529,7 @@ static int get_user_input(char *msg, char *buf, int buflen)
newtFormAddComponents(form, inpfield, ok, cancel, NULL);
newtFormRun(form, &es);
strncpy(buf, input, buflen - 1);
- if (es.u.co == ok)
+ if (es.u.co == ok)
res = 0;
else
res = -1;
@@ -551,7 +551,7 @@ static void try_redirect(newtComponent c)
if (chan) {
strncpy(channame, chan->name, sizeof(channame) - 1);
snprintf(tmp, sizeof(tmp), "Enter new extension for %s", channame);
- if (get_user_input(tmp, dest, sizeof(dest)))
+ if (get_user_input(tmp, dest, sizeof(dest)))
return;
if ((context = strchr(dest, '@'))) {
*context = '\0';
@@ -567,7 +567,7 @@ static void try_redirect(newtComponent c)
show_message("Hangup Failed", get_header(m, "Message"));
}
}
-
+
}
static int manage_calls(char *host)
@@ -582,23 +582,23 @@ static int manage_calls(char *host)
/* Mark: If there's one thing you learn from this code, it is this...
Never, ever fly Air France. Their customer service is absolutely
- the worst. I've never heard the words "That's not my problem" as
+ the worst. I've never heard the words "That's not my problem" as
many times as I have from their staff -- It should, without doubt
- be their corporate motto if it isn't already. Don't bother giving
+ be their corporate motto if it isn't already. Don't bother giving
them business because you're just a pain in their side and they
will be sure to let you know the first time you speak to them.
-
+
If you ever want to make me happy just tell me that you, too, will
never fly Air France again either (in spite of their excellent
- cuisine).
-
+ cuisine).
+
Update by oej: The merger with KLM has transferred this
- behaviour to KLM as well.
+ behaviour to KLM as well.
Don't bother giving them business either...
Only if you want to travel randomly without luggage, you
might pick either of them.
-
+
*/
snprintf(tmp, sizeof(tmp), "Asterisk Manager at %s", host);
newtCenteredWindow(74, 20, tmp);
@@ -611,7 +611,7 @@ static int manage_calls(char *host)
channels = newtListbox(1,1,14, NEWT_FLAG_SCROLL);
newtFormAddComponents(form, channels, redirect, hangup, quit, NULL);
newtListboxSetWidth(channels, 72);
-
+
show_doing("Getting Status", "Retrieving system status...");
try_status();
hide_doing();
@@ -655,18 +655,18 @@ static int manager_login(char *hostname)
char tmp[55];
struct hostent *hp;
int res = -1;
-
+
session.fd = socket(AF_INET, SOCK_STREAM, 0);
if (session.fd < 0) {
snprintf(tmp, sizeof(tmp), "socket() failed: %s\n", strerror(errno));
show_message("Socket failed", tmp);
return -1;
}
-
+
snprintf(tmp, sizeof(tmp), "Looking up %s\n", hostname);
show_doing("Connecting....", tmp);
-
-
+
+
hp = gethostbyname(hostname);
if (!hp) {
snprintf(tmp, sizeof(tmp), "No such address: %s\n", hostname);
@@ -686,21 +686,21 @@ static int manager_login(char *hostname)
show_message("Connect Failed", tmp);
return -1;
}
-
+
hide_doing();
-
+
login = newtButton(5, 6, "Login");
cancel = newtButton(25, 6, "Cancel");
newtCenteredWindow(40, 10, "Asterisk Manager Login");
snprintf(tmp, sizeof(tmp), "Host: %s", hostname);
label = newtLabel(4,1, tmp);
-
+
ulabel = newtLabel(4,2,"Username:");
plabel = newtLabel(4,3,"Password:");
-
+
username = newtEntry(14, 2, "", 20, _NEWT_CAST &user, 0);
password = newtEntry(14, 3, "", 20, _NEWT_CAST &pass, NEWT_FLAG_HIDDEN);
-
+
form = newtForm(NULL, NULL, 0);
newtFormAddComponents(form, username, password, login, cancel, label, ulabel, plabel,NULL);
newtFormRun(form, &es);
@@ -737,7 +737,7 @@ static int manager_login(char *hostname)
show_message("Login Failed", get_header(m, "Message"));
}
} else {
- manager_action("Login",
+ manager_action("Login",
"Username: %s\r\n"
"Secret: %s\r\n",
user, pass);
diff --git a/utils/check_expr.c b/utils/check_expr.c
index 6cd535df2..678530876 100644
--- a/utils/check_expr.c
+++ b/utils/check_expr.c
@@ -145,7 +145,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -161,10 +161,10 @@ unsigned int check_expr(char* buffer, char* error_report);
int check_eval(char *buffer, char *error_report);
void parse_file(const char *fname);
-void ast_register_file_version(const char *file, const char *version);
+void ast_register_file_version(const char *file, const char *version);
void ast_register_file_version(const char *file, const char *version) { }
#if !defined(LOW_MEMORY)
-int ast_add_profile(const char *x, uint64_t scale) { return 0;}
+int ast_add_profile(const char *x, uint64_t scale) { return 0;}
#endif
int ast_atomic_fetchadd_int_slow(volatile int *p, int v)
{
@@ -209,7 +209,7 @@ unsigned int check_expr(char* buffer, char* error_report)
unsigned int warn_found = 0;
error_report[0] = 0;
-
+
for (cp = buffer; *cp; ++cp)
{
switch (*cp)
@@ -225,7 +225,7 @@ unsigned int check_expr(char* buffer, char* error_report)
global_lineno);
}
break;
-
+
case '>':
case '<':
case '!':
@@ -242,7 +242,7 @@ unsigned int check_expr(char* buffer, char* error_report)
++warn_found;
}
break;
-
+
case '|':
case '&':
case '=':
@@ -294,13 +294,13 @@ int check_eval(char *buffer, char *error_report)
if (*cp == '$' && *(cp+1) == '{') {
int brack_lev = 1;
char *xp= cp+2;
-
+
while (*xp) {
if (*xp == '{')
brack_lev++;
else if (*xp == '}')
brack_lev--;
-
+
if (brack_lev == 0)
break;
xp++;
@@ -308,7 +308,7 @@ int check_eval(char *buffer, char *error_report)
if (*xp == '}') {
char varname[200];
char *val;
-
+
strncpy(varname,cp+2, xp-cp-2);
varname[xp-cp-2] = 0;
cp = xp;
@@ -360,7 +360,7 @@ void parse_file(const char *fname)
int c1;
char last_char= 0;
char buffer[30000]; /* I sure hope no expr gets this big! */
-
+
if (!f) {
fprintf(stderr,"Couldn't open %s for reading... need an extensions.conf file to parse!\n",fname);
exit(20);
@@ -369,9 +369,9 @@ void parse_file(const char *fname)
fprintf(stderr,"Couldn't open 'expr2_log' file for writing... please fix and re-run!\n");
exit(21);
}
-
+
global_lineno = 1;
-
+
while ((c1 = fgetc(f)) != EOF) {
if (c1 == '\n')
global_lineno++;
@@ -382,7 +382,7 @@ void parse_file(const char *fname)
int bufcount = 0;
int retval;
char error_report[30000];
-
+
while ((c1 = fgetc(f)) != EOF) {
if (c1 == '[')
bracklev++;
@@ -394,7 +394,7 @@ void parse_file(const char *fname)
fclose(l);
printf("--- ERROR --- A newline in the middle of an expression at line %d!\n", global_lineno);
}
-
+
if (bracklev == 0)
break;
buffer[bufcount++] = c1;
@@ -406,18 +406,18 @@ void parse_file(const char *fname)
printf("--- ERROR --- EOF reached in middle of an expression at line %d!\n", global_lineno);
exit(22);
}
-
+
buffer[bufcount] = 0;
/* update stats */
global_expr_tot_size += bufcount;
global_expr_count++;
if (bufcount > global_expr_max_size)
global_expr_max_size = bufcount;
-
+
retval = check_expr(buffer, error_report); /* check_expr should bump the warning counter */
if (retval != 0) {
/* print error report */
- printf("Warning(s) at line %d, expression: $[%s]; see expr2_log file for details\n",
+ printf("Warning(s) at line %d, expression: $[%s]; see expr2_log file for details\n",
global_lineno, buffer);
fprintf(l, "%s", error_report);
}
@@ -438,7 +438,7 @@ void parse_file(const char *fname)
global_warn_count,
global_expr_max_size,
(global_expr_count) ? global_expr_tot_size/global_expr_count : 0);
-
+
fclose(f);
fclose(l);
}
@@ -448,7 +448,7 @@ int main(int argc,char **argv)
{
int argc1;
char *eq;
-
+
if (argc < 2) {
printf("check_expr -- a program to look thru extensions.conf files for $[...] expressions,\n");
printf(" and run them thru the parser, looking for problems\n");
@@ -460,7 +460,7 @@ int main(int argc,char **argv)
printf(" Note that messages about operators not being surrounded by spaces is merely to alert\n");
printf(" you to possible problems where you might be expecting those operators as part of a string.\n");
printf(" (to include operators in a string, wrap with double quotes!)\n");
-
+
exit(19);
}
global_varlist = 0;
@@ -472,7 +472,7 @@ int main(int argc,char **argv)
}
/* parse command args for x=y and set varz */
-
+
parse_file(argv[1]);
return 0;
}
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index 5d36f4231..ae0b604aa 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -1,4 +1,4 @@
-/*
+/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2007, Digium, Inc.
@@ -65,7 +65,7 @@ extern char *months[];
char *config = "extensions.conf";
-/*
+/*
static char *registrar = "conf2ael";
static char userscontext[AST_MAX_EXTENSION] = "default";
static int static_config = 0;
@@ -98,7 +98,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -216,7 +216,7 @@ struct ast_state_cb {
/*! \brief Structure for dial plan hints
\note Hints are pointers from an extension in the dialplan to one or
- more devices (tech/name)
+ more devices (tech/name)
- See \ref AstExtState
*/
struct ast_hint {
@@ -279,10 +279,10 @@ void get_start_stop(unsigned int *word, int bitsperword, int totalbits, int *sta
{
int i;
int thisbit, thatbit = bit_at(word, bitsperword, totalbits-1);
-
+
for (i=0; i<totalbits; i++) {
thisbit = bit_at(word, bitsperword, i);
-
+
if (thisbit != thatbit ) {
if (thisbit) {
*start = i;
@@ -296,14 +296,14 @@ void get_start_stop(unsigned int *word, int bitsperword, int totalbits, int *sta
int all_bits_set(unsigned int *word, int bitsperword, int totalbits )
{
-
+
int i, total=totalbits/bitsperword,bitmask = 0;
-
+
for (i=0; i<bitsperword; i++)
{
bitmask |= (1 << i);
}
-
+
for (i=0; i<total; i++)
{
if (word[i] != bitmask)
@@ -333,9 +333,9 @@ int main(int argc, char **argv)
if (strcmp(argv[i],"-d")==0)
localdir =1;
}
-
+
/* 3 simple steps: */
- /* 1. read in the extensions.conf config file
+ /* 1. read in the extensions.conf config file
* 2. traverse, and build an AEL tree
* 3. Output the AEL tree into a file
*/
@@ -356,9 +356,9 @@ int main(int argc, char **argv)
if (!localdir)
localized_use_conf_dir();
localized_pbx_load_module();
-
+
printf("... Done!\n");
-
+
tmp = 0;
while ((tmp = localized_walk_contexts(tmp)) ) {
printf("Context: %s\n", tmp->name);
@@ -372,9 +372,9 @@ int main(int argc, char **argv)
tree = tmptree;
else
pvalTopLevAddObject(tree, tmptree);
-
+
pvalContextSetName(tmptree, ast_strdup(tmp->name));
-
+
if (tmp->includes) {
incl = pvalCreateNode(PV_INCLUDES);
pvalContextAddStatement(tmptree, incl);
@@ -387,7 +387,7 @@ int main(int argc, char **argv)
char domrange[10];
char monrange[10];
int startbit=0, endbit=0;
-
+
if (all_bits_set(tmpi->timing.minmask, 30, 720))
strcpy(timerange, "*");
else {
@@ -404,7 +404,7 @@ int main(int argc, char **argv)
strcat(timerange,"-");
strcat(timerange,tbuf);
}
-
+
if (all_bits_set(&tmpi->timing.dowmask, 7, 7))
strcpy(dowrange, "*");
else {
@@ -413,7 +413,7 @@ int main(int argc, char **argv)
strcat(dowrange,"-");
strcat(dowrange, days[endbit]);
}
-
+
if (all_bits_set(&tmpi->timing.monthmask, 12, 12))
strcpy(monrange, "*");
else {
@@ -422,7 +422,7 @@ int main(int argc, char **argv)
strcat(monrange,"-");
strcat(monrange, months[endbit]);
}
-
+
if (all_bits_set(&tmpi->timing.daymask, 31, 31))
strcpy(domrange, "*");
else {
@@ -436,7 +436,7 @@ int main(int argc, char **argv)
}
/* now all 4 fields are set; what do we do? */
pvalIncludesAddIncludeWithTimeConstraints(incl, strdup(tmpi->name), strdup(timerange), strdup(domrange), strdup(dowrange), strdup(monrange));
-
+
} else {
pvalIncludesAddInclude(incl, strdup(tmpi->name));
}
@@ -484,23 +484,23 @@ int main(int argc, char **argv)
pval *exten = pvalCreateNode(PV_EXTENSION);
pvalContextAddStatement(tmptree, exten);
pvalExtenSetName(exten, ast_strdup(eroot->exten));
-
+
if (eroot->peer) {
pval *block = pvalCreateNode(PV_STATEMENTBLOCK);
pvalExtenSetStatement(exten, block);
-
+
e = 0;
while ( (e = localized_walk_extension_priorities(eroot, e)) ) {
-
+
pval *statemnt = pvalCreateNode(PV_APPLICATION_CALL);
pval *args = pvalCreateNode(PV_WORD);
-
+
/* printf(" %s(%s)\n", e->app, (char*)e->data); */
pvalAppCallSetAppName(statemnt, ast_strdup(e->app));
pvalWordSetString(args, ast_strdup(e->data));
pvalAppCallAddArg(statemnt, args);
-
+
pvalStatementBlockAddStatement(block, statemnt);
}
} else if (eroot->priority == -1) {
@@ -520,13 +520,13 @@ int main(int argc, char **argv)
pval *statemnt = pvalCreateNode(PV_APPLICATION_CALL);
pval *args = pvalCreateNode(PV_WORD);
-
+
/* printf(" %s (%s)\n", eroot->app, (char *)eroot->data); */
-
+
pvalAppCallSetAppName(statemnt, ast_strdup(eroot->app));
pvalWordSetString(args, ast_strdup(eroot->data));
-
+
pvalAppCallAddArg(statemnt, args);
pvalExtenSetStatement(exten, statemnt);
}
@@ -536,7 +536,7 @@ int main(int argc, char **argv)
if (AST_LIST_FIRST(&tmp->alts)) {
sws = pvalCreateNode(PV_SWITCHES);
pvalContextAddStatement(tmptree,sws);
-
+
sw = 0;
while ((sw = localized_walk_context_switches(tmp,sw)) ) {
pvalSwitchesAddSwitch(sws, ast_strdup(sw->name));
@@ -544,9 +544,9 @@ int main(int argc, char **argv)
}
}
printf("Generating aelout.ael file...\n");
-
+
ael2_print("aelout.ael", tree);
-
+
printf("...Done!\n");
return 0;
}
@@ -563,7 +563,7 @@ void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char
void pbx_substitute_variables_helper(struct ast_channel *c,const char *cp1,char *cp2,int count)
{
if (cp1 && *cp1)
- strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
+ strncpy(cp2,cp1,AST_MAX_EXTENSION); /* Right now, this routine is ONLY being called for
a possible var substitution on extension names,
so....! */
else
@@ -580,28 +580,28 @@ int ast_add_extension2(struct ast_context *con,
int ast_context_add_ignorepat2(struct ast_context *con, const char *value, const char *registrar)
{
-
+
return localized_context_add_ignorepat2(con, value, registrar);
}
int ast_context_add_switch2(struct ast_context *con, const char *value,
const char *data, int eval, const char *registrar)
{
-
+
return localized_context_add_switch2(con, value, data, eval, registrar);
}
int ast_context_add_include2(struct ast_context *con, const char *value,
const char *registrar)
{
-
+
return localized_context_add_include2(con, value,registrar);
}
struct ast_context *ast_context_find_or_create(struct ast_context **extcontexts, struct ast_hashtab *exttable, const char *name, const char *registrar)
{
printf("find/Creating context %s, registrar=%s\n", name, registrar);
-
+
return localized_context_find_or_create(extcontexts, exttable, name, registrar);
}
@@ -685,21 +685,21 @@ struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action);
struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action)
{
return localized_find_extension(bypass, q, context, exten, priority, label, callerid, action);
diff --git a/utils/db1-ast/hash/README b/utils/db1-ast/hash/README
index f29ccf7e1..321de7d5d 100644
--- a/utils/db1-ast/hash/README
+++ b/utils/db1-ast/hash/README
@@ -6,17 +6,17 @@ Test Programs:
All test programs which need key/data pairs expect them entered
with key and data on separate lines
- tcreat3.c
- Takes
- bucketsize (bsize),
+ tcreat3.c
+ Takes
+ bucketsize (bsize),
fill factor (ffactor), and
- initial number of elements (nelem).
- Creates a hash table named hashtest containing the
+ initial number of elements (nelem).
+ Creates a hash table named hashtest containing the
keys/data pairs entered from standard in.
thash4.c
Takes
- bucketsize (bsize),
- fill factor (ffactor),
+ bucketsize (bsize),
+ fill factor (ffactor),
initial number of elements (nelem)
bytes of cache (ncached), and
file from which to read data (fname)
@@ -45,7 +45,7 @@ Test Programs:
NOTES:
The file search.h is provided for using the hsearch compatible interface
-on BSD systems. On System V derived systems, search.h should appear in
+on BSD systems. On System V derived systems, search.h should appear in
/usr/include.
The man page ../man/db.3 explains the interface to the hashing system.
@@ -63,7 +63,7 @@ file, you may lose updates since the package buffers all writes. Also,
the db interface only creates a single database file. To avoid overwriting
the user's original file, the suffix ".db" is appended to the file name
passed to dbm_open. Additionally, if your code "knows" about the historic
-.dir and .pag files, it will break.
+.dir and .pag files, it will break.
There is a fundamental difference between this package and the old hsearch.
Hsearch requires the user to maintain the keys and data in the application's
diff --git a/utils/db1-ast/hash/hash_page.c b/utils/db1-ast/hash/hash_page.c
index 52571c552..6f7fabb7f 100644
--- a/utils/db1-ast/hash/hash_page.c
+++ b/utils/db1-ast/hash/hash_page.c
@@ -688,7 +688,7 @@ overflow_page(hashp)
in_use_bits = free_bit;
else
in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1;
-
+
if (i == first_page) {
bit = hashp->LAST_FREED &
((hashp->BSIZE << BYTE_SHIFT) - 1);
diff --git a/utils/db1-ast/include/db.h b/utils/db1-ast/include/db.h
index a58724bdd..23b9b9575 100644
--- a/utils/db1-ast/include/db.h
+++ b/utils/db1-ast/include/db.h
@@ -182,7 +182,7 @@ typedef struct {
int lorder; /* byte order */
size_t reclen; /* record length (fixed-length records) */
u_char bval; /* delimiting byte (variable-length records */
- char *bfname; /* btree file name */
+ char *bfname; /* btree file name */
} RECNOINFO;
#ifdef __DBINTERFACE_PRIVATE
diff --git a/utils/db1-ast/recno/rec_search.c b/utils/db1-ast/recno/rec_search.c
index e70fe4c13..0679836e4 100644
--- a/utils/db1-ast/recno/rec_search.c
+++ b/utils/db1-ast/recno/rec_search.c
@@ -92,7 +92,7 @@ __rec_search(t, recno, op)
}
BT_PUSH(t, pg, index - 1);
-
+
pg = r->pgno;
switch (op) {
case SDELETE:
diff --git a/utils/db1-ast/recno/rec_seq.c b/utils/db1-ast/recno/rec_seq.c
index ca3451ca6..ebe1e8acd 100644
--- a/utils/db1-ast/recno/rec_seq.c
+++ b/utils/db1-ast/recno/rec_seq.c
@@ -107,7 +107,7 @@ __rec_seq(dbp, key, data, flags)
einval: errno = EINVAL;
return (RET_ERROR);
}
-
+
if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) {
if (!F_ISSET(t, R_EOF | R_INMEM) &&
(status = t->bt_irec(t, nrec)) != RET_SUCCESS)
diff --git a/utils/extconf.c b/utils/extconf.c
index 837971ba2..690d06e7c 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -1,4 +1,4 @@
-/*
+/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2006, Digium, Inc.
@@ -85,7 +85,7 @@ void ast_verbose(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
#endif
#define AST_API_MODULE 1 /* gimme the inline defs! */
-struct ast_channel
+struct ast_channel
{
char x; /* basically empty! */
};
@@ -244,7 +244,7 @@ static void __attribute__((constructor)) init_empty_mutex(void)
static inline int __ast_pthread_mutex_init_attr(const char *filename, int lineno, const char *func,
const char *mutex_name, ast_mutex_t *t,
- pthread_mutexattr_t *attr)
+ pthread_mutexattr_t *attr)
{
#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
int canlog = strcmp(filename, "logger.c");
@@ -463,7 +463,7 @@ static inline int __ast_pthread_mutex_unlock(const char *filename, int lineno, c
}
if ((res = pthread_mutex_unlock(&t->mutex))) {
- __ast_mutex_logger("%s line %d (%s): Error releasing mutex: %s\n",
+ __ast_mutex_logger("%s line %d (%s): Error releasing mutex: %s\n",
filename, lineno, func, strerror(res));
DO_THREAD_CRASH;
}
@@ -504,7 +504,7 @@ static void __attribute__((constructor)) init_##mutex(void) \
ast_mutex_init(&mutex); \
}
#else /* !AST_MUTEX_INIT_W_CONSTRUCTORS */
-/* By default, use static initialization of mutexes. */
+/* By default, use static initialization of mutexes. */
#define __AST_MUTEX_DEFINE(scope, mutex) \
scope ast_mutex_t mutex = AST_MUTEX_INIT_VALUE
#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
@@ -617,7 +617,7 @@ AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
{
__asm __volatile (
" lock xaddl %0, %1 ; "
- : "+r" (v), /* 0 (result) */
+ : "+r" (v), /* 0 (result) */
"=m" (*p) /* 1 */
: "m" (*p)); /* 2 */
return (v);
@@ -863,7 +863,7 @@ char * attribute_malloc _ast_strdup(const char *str, const char *file, int linen
* message in the case that the allocation fails.
*
* ast_strndup(), unlike strndup(), can safely accept a NULL argument for the
- * string to duplicate. If a NULL argument is provided, ast_strdup will return
+ * string to duplicate. If a NULL argument is provided, ast_strdup will return
* NULL without generating any kind of error log message.
*
* The arguments and return value are the same as strndup()
@@ -1032,19 +1032,19 @@ static void LLB_ADD(char *str)
int siz = strlen(str);
if (rem < siz+1) {
lline_buffer = ast_realloc(lline_buffer, lline_buffer_size + CB_INCR + siz + 1);
- if (!lline_buffer)
+ if (!lline_buffer)
return;
lline_buffer_size += CB_INCR + siz + 1;
}
strcat(lline_buffer,str);
}
-static void CB_RESET(void )
-{
- comment_buffer[0] = 0;
+static void CB_RESET(void )
+{
+ comment_buffer[0] = 0;
lline_buffer[0] = 0;
}
-
+
/*! \brief Keep track of how many threads are currently trying to wait*() on
* a child process */
static unsigned int safe_system_level = 0;
@@ -1107,7 +1107,7 @@ int ast_safe_system(const char *s)
pid = fork();
#else
pid = vfork();
-#endif
+#endif
if (pid == 0) {
#ifdef HAVE_WORKING_FORK
@@ -1123,7 +1123,7 @@ int ast_safe_system(const char *s)
if (res > -1) {
res = WIFEXITED(status) ? WEXITSTATUS(status) : -1;
break;
- } else if (errno != EINTR)
+ } else if (errno != EINTR)
break;
}
} else {
@@ -1140,7 +1140,7 @@ int ast_safe_system(const char *s)
}
static struct ast_comment *ALLOC_COMMENT(const char *buffer)
-{
+{
struct ast_comment *x = ast_calloc(1,sizeof(struct ast_comment)+strlen(buffer)+1);
strcpy(x->cmt, buffer);
return x;
@@ -1163,7 +1163,7 @@ static struct ast_config_engine *config_engine_list;
struct ast_category {
char name[80];
int ignored; /*!< do not let user of the config see this category */
- int include_level;
+ int include_level;
char *file; /*!< the file name from whence this declaration was read */
int lineno;
struct ast_comment *precomments;
@@ -1256,7 +1256,7 @@ char *ast_trim_blanks(char *str),
if (work) {
work += strlen(work) - 1;
- /* It's tempting to only want to erase after we exit this loop,
+ /* It's tempting to only want to erase after we exit this loop,
but since ast_trim_blanks *could* receive a constant string
(which we presumably wouldn't have to touch), we shouldn't
actually set anything unless we must, and it's easier just
@@ -1285,7 +1285,7 @@ char *ast_strip(char *s),
if (s)
ast_trim_blanks(s);
return s;
-}
+}
)
@@ -1318,15 +1318,15 @@ void localized_ast_include_rename(struct ast_config *conf, const char *from_file
static struct ast_variable *ast_variable_new(const char *name, const char *value, const char *filename);
-static struct ast_variable *ast_variable_new(const char *name, const char *value, const char *filename)
+static struct ast_variable *ast_variable_new(const char *name, const char *value, const char *filename)
{
struct ast_variable *variable;
- int name_len = strlen(name) + 1;
+ int name_len = strlen(name) + 1;
if ((variable = ast_calloc(1, name_len + strlen(value) + 1 + strlen(filename) + 1 + sizeof(*variable)))) {
variable->name = variable->stuff;
- variable->value = variable->stuff + name_len;
- variable->file = variable->value + strlen(value) + 1;
+ variable->value = variable->stuff + name_len;
+ variable->file = variable->value + strlen(value) + 1;
strcpy(variable->name,name);
strcpy(variable->value,value);
strcpy(variable->file,filename);
@@ -1338,11 +1338,11 @@ static struct ast_variable *ast_variable_new(const char *name, const char *value
static struct ast_config_include *ast_include_new(struct ast_config *conf, const char *from_file, const char *included_file, int is_exec, const char *exec_file, int from_lineno, char *real_included_file_name, int real_included_file_name_size)
{
/* a file should be included ONCE. Otherwise, if one of the instances is changed,
- then all be changed. -- how do we know to include it? -- Handling modified
+ then all be changed. -- how do we know to include it? -- Handling modified
instances is possible, I'd have
to create a new master for each instance. */
struct ast_config_include *inc;
-
+
inc = ast_include_find(conf, included_file);
if (inc)
{
@@ -1351,7 +1351,7 @@ static struct ast_config_include *ast_include_new(struct ast_config *conf, const
ast_log(LOG_WARNING,"'%s', line %d: Same File included more than once! This data will be saved in %s if saved back to disk.\n", from_file, from_lineno, real_included_file_name);
} else
*real_included_file_name = 0;
-
+
inc = ast_calloc(1,sizeof(struct ast_config_include));
inc->include_location_file = ast_strdup(from_file);
inc->include_location_lineno = from_lineno;
@@ -1359,15 +1359,15 @@ static struct ast_config_include *ast_include_new(struct ast_config *conf, const
inc->included_file = ast_strdup(real_included_file_name);
else
inc->included_file = ast_strdup(included_file);
-
+
inc->exec = is_exec;
if (is_exec)
inc->exec_file = ast_strdup(exec_file);
-
+
/* attach this new struct to the conf struct */
inc->next = conf->includes;
conf->includes = inc;
-
+
return inc;
}
@@ -1376,13 +1376,13 @@ void localized_ast_include_rename(struct ast_config *conf, const char *from_file
struct ast_config_include *incl;
struct ast_category *cat;
struct ast_variable *v;
-
+
int from_len = strlen(from_file);
int to_len = strlen(to_file);
-
+
if (strcmp(from_file, to_file) == 0) /* no use wasting time if the name is the same */
return;
-
+
/* the manager code allows you to read in one config file, then
write it back out under a different name. But, the new arrangement
ties output lines to the file name. So, before you try to write
@@ -1391,7 +1391,7 @@ void localized_ast_include_rename(struct ast_config *conf, const char *from_file
*/
/* file names are on categories, includes (of course), and on variables. So,
traverse all this and swap names */
-
+
for (incl = conf->includes; incl; incl=incl->next) {
if (strcmp(incl->include_location_file,from_file) == 0) {
if (from_len >= to_len)
@@ -1522,7 +1522,7 @@ static struct ast_variable *variable_clone(const struct ast_variable *old)
return new;
}
-
+
static void ast_variables_destroy(struct ast_variable *v)
{
struct ast_variable *vn;
@@ -1537,7 +1537,7 @@ static void ast_variables_destroy(struct ast_variable *v)
static void ast_includes_destroy(struct ast_config_include *incls)
{
struct ast_config_include *incl,*inclnext;
-
+
for (incl=incls; incl; incl = inclnext) {
inclnext = incl->next;
if (incl->include_location_file)
@@ -1558,7 +1558,7 @@ static void ast_config_destroy(struct ast_config *cfg)
return;
ast_includes_destroy(cfg->includes);
-
+
cat = cfg->root;
while (cat) {
ast_variables_destroy(cat->root);
@@ -1694,7 +1694,7 @@ extern int ast_language_is_prefix;
*/
#define AST_RWLIST_RDLOCK(head) \
ast_rwlock_rdlock(&(head)->lock)
-
+
/*!
\brief Attempts to unlock a read/write based list.
\param head This is a pointer to the list head structure
@@ -1968,7 +1968,7 @@ struct { \
}
#define AST_RWLIST_ENTRY AST_LIST_ENTRY
-
+
/*!
\brief Returns the first entry contained in a list.
\param head This is a pointer to the list head structure
@@ -2380,7 +2380,7 @@ struct ast_switch {
AST_LIST_ENTRY(ast_switch) list;
const char *name; /*!< Name of the switch */
const char *description; /*!< Description of the switch */
-
+
ast_switch_f *exists;
ast_switch_f *canmatch;
ast_switch_f *exec;
@@ -2454,7 +2454,7 @@ static const char *ast_var_name(const struct ast_var_t *var)
}
/* experiment 1: see if it's easier just to use existing config code
- * to read in the extensions.conf file. In this scenario,
+ * to read in the extensions.conf file. In this scenario,
I have to rip/copy code from other modules, because they
are staticly declared as-is. A solution would be to move
the ripped code to another location and make them available
@@ -2466,7 +2466,7 @@ static void ast_log(int level, const char *file, int line, const char *function,
{
va_list vars;
va_start(vars,fmt);
-
+
printf("LOG: lev:%d file:%s line:%d func: %s ",
level, file, line, function);
vprintf(fmt, vars);
@@ -2478,7 +2478,7 @@ void __attribute__((format(printf, 1, 2))) ast_verbose(const char *fmt, ...)
{
va_list vars;
va_start(vars,fmt);
-
+
printf("VERBOSE: ");
vprintf(fmt, vars);
fflush(stdout);
@@ -2696,7 +2696,7 @@ struct ast_state_cb {
/*! \brief Structure for dial plan hints
\note Hints are pointers from an extension in the dialplan to one or
- more devices (tech/name)
+ more devices (tech/name)
- See \ref AstExtState
*/
struct ast_hint {
@@ -2724,7 +2724,7 @@ AST_LIST_HEAD(store_hints, store_hint);
#define STATUS_SUCCESS 5
static struct ast_var_t *ast_var_assign(const char *name, const char *value)
-{
+{
struct ast_var_t *var;
int name_len = strlen(name) + 1;
int value_len = strlen(value) + 1;
@@ -2736,10 +2736,10 @@ static struct ast_var_t *ast_var_assign(const char *name, const char *value)
ast_copy_string(var->name, name, name_len);
var->value = var->name + name_len;
ast_copy_string(var->value, value, value_len);
-
+
return var;
-}
-
+}
+
static void ast_var_delete(struct ast_var_t *var)
{
free(var);
@@ -3016,7 +3016,7 @@ static void null_datad(void *foo)
}
/*! \brief Find realtime engine for realtime family */
-static struct ast_config_engine *find_engine(const char *family, char *database, int dbsiz, char *table, int tabsiz)
+static struct ast_config_engine *find_engine(const char *family, char *database, int dbsiz, char *table, int tabsiz)
{
struct ast_config_engine *eng, *ret = NULL;
struct ast_config_map *map;
@@ -3039,12 +3039,12 @@ static struct ast_config_engine *find_engine(const char *family, char *database,
ret = eng;
}
}
-
-
+
+
/* if we found a mapping, but the engine is not available, then issue a warning */
if (map && !ret)
ast_log(LOG_WARNING, "Realtime mapping for '%s' found to engine '%s', but the engine is not available\n", map->name, map->driver);
-
+
return ret;
}
@@ -3119,7 +3119,7 @@ static void ast_category_destroy(struct ast_category *cat)
ast_variables_destroy(cat->root);
if (cat->file)
free(cat->file);
-
+
free(cat);
}
@@ -3136,7 +3136,7 @@ static struct ast_config *ast_config_internal_load(const char *filename, struct
char db[256];
char table[256];
struct ast_config_engine *loader = &text_file_engine;
- struct ast_config *result;
+ struct ast_config *result;
if (cfg->include_level == cfg->max_include_level) {
ast_log(LOG_WARNING, "Maximum Include level (%d) exceeded\n", cfg->max_include_level);
@@ -3164,7 +3164,7 @@ static struct ast_config *ast_config_internal_load(const char *filename, struct
}
result = loader->load_func(db, table, filename, cfg, withcomments, suggested_incl_file);
- /* silence is golden
+ /* silence is golden
ast_log(LOG_WARNING, "finished internal loading file %s level=%d\n", filename, cfg->include_level);
*/
@@ -3203,7 +3203,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
return -1;
}
(*cat)->lineno = lineno;
-
+
/* add comments */
if (withcomments && comment_buffer && comment_buffer[0] ) {
newcat->precomments = ALLOC_COMMENT(comment_buffer);
@@ -3213,7 +3213,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
}
if( withcomments )
CB_RESET();
-
+
/* If there are options or categories to inherit from, process them now */
if (c) {
if (!(cur = strchr(c, ')'))) {
@@ -3240,7 +3240,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
}
} else {
struct ast_category *base;
-
+
base = category_get(cfg, cur, 1);
if (!base) {
ast_log(LOG_WARNING, "Inheritance requested, but category '%s' does not exist, line %d of %s\n", cur, lineno, configfile);
@@ -3263,7 +3263,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
c = ast_skip_blanks(c + 1);
if (!*c)
c = NULL;
- } else
+ } else
c = NULL;
do_include = !strcasecmp(cur, "include");
if(!do_include)
@@ -3278,7 +3278,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
if (c) {
char *cur2;
char real_inclusion_name[256];
-
+
/* Strip off leading and trailing "'s and <>'s */
while((*c == '<') || (*c == '>') || (*c == '\"')) c++;
/* Get rid of leading mess */
@@ -3293,7 +3293,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
}
/* #exec </path/to/executable>
We create a tmp file, then we #include it, then we delete it. */
- if (do_exec) {
+ if (do_exec) {
snprintf(exec_file, sizeof(exec_file), "/var/tmp/exec.%d.%ld", (int)time(NULL), (long)pthread_self());
snprintf(cmd, sizeof(cmd), "%s > %s 2>&1", cur, exec_file);
ast_safe_system(cmd);
@@ -3302,26 +3302,26 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
exec_file[0] = '\0';
/* A #include */
/* ast_log(LOG_WARNING, "Reading in included file %s withcomments=%d\n", cur, withcomments); */
-
+
/* record this inclusion */
ast_include_new(cfg, configfile, cur, do_exec, cur2, lineno, real_inclusion_name, sizeof(real_inclusion_name));
-
+
do_include = ast_config_internal_load(cur, cfg, withcomments, real_inclusion_name) ? 1 : 0;
if(!ast_strlen_zero(exec_file))
unlink(exec_file);
if(!do_include)
return 0;
/* ast_log(LOG_WARNING, "Done reading in included file %s withcomments=%d\n", cur, withcomments); */
-
+
} else {
- ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n",
+ ast_log(LOG_WARNING, "Directive '#%s' needs an argument (%s) at line %d of %s\n",
do_exec ? "exec" : "include",
do_exec ? "/path/to/executable" : "filename",
lineno,
configfile);
}
}
- else
+ else
ast_log(LOG_WARNING, "Unknown directive '%s' at line %d of %s\n", cur, lineno, configfile);
} else {
/* Just a line (variable = value) */
@@ -3355,7 +3355,7 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat,
}
if( withcomments )
CB_RESET();
-
+
} else {
return -1;
}
@@ -3393,7 +3393,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
struct ast_category *cat = NULL;
int count = 0;
struct stat statbuf;
-
+
cat = ast_config_get_current_category(cfg);
if (filename[0] == '/') {
@@ -3408,7 +3408,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
if (withcomments && cfg && cfg->include_level < 2 ) {
CB_INIT();
}
-
+
#ifdef AST_INCLUDE_GLOB
{
int glob_ret;
@@ -3459,17 +3459,17 @@ static struct ast_config *config_text_file_load(const char *database, const char
while(!feof(f)) {
lineno++;
if (fgets(buf, sizeof(buf), f)) {
- if ( withcomments ) {
+ if ( withcomments ) {
CB_ADD(lline_buffer); /* add the current lline buffer to the comment buffer */
lline_buffer[0] = 0; /* erase the lline buffer */
}
-
+
new_buf = buf;
- if (comment)
+ if (comment)
process_buf = NULL;
else
process_buf = buf;
-
+
while ((comment_p = strchr(new_buf, COMMENT_META))) {
if ((comment_p > new_buf) && (*(comment_p-1) == '\\')) {
/* Yuck, gotta memmove */
@@ -3501,7 +3501,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
CB_ADD(";");
CB_ADD_LEN(oldptr+1,new_buf-oldptr-1);
}
-
+
memmove(oldptr, new_buf, strlen(new_buf) + 1);
new_buf = oldptr;
} else
@@ -3509,12 +3509,12 @@ static struct ast_config *config_text_file_load(const char *database, const char
}
} else {
if (!comment) {
- /* If ; is found, and we are not nested in a comment,
+ /* If ; is found, and we are not nested in a comment,
we immediately stop all comment processing */
if ( withcomments ) {
LLB_ADD(comment_p);
}
- *comment_p = '\0';
+ *comment_p = '\0';
new_buf = comment_p;
} else
new_buf = comment_p + 1;
@@ -3524,7 +3524,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
{
CB_ADD(buf); /* the whole line is a comment, store it */
}
-
+
if (process_buf) {
char *stripped_process_buf = ast_strip(process_buf);
if (!ast_strlen_zero(stripped_process_buf)) {
@@ -3536,7 +3536,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
}
}
}
- fclose(f);
+ fclose(f);
} while(0);
if (comment) {
ast_log(LOG_WARNING,"Unterminated comment detected beginning on line %d\n", nest[comment]);
@@ -3550,12 +3550,12 @@ static struct ast_config *config_text_file_load(const char *database, const char
}
#endif
if (cfg && cfg->include_level == 1 && withcomments && comment_buffer) {
- if (comment_buffer) {
+ if (comment_buffer) {
free(comment_buffer);
free(lline_buffer);
- comment_buffer=0;
- lline_buffer=0;
- comment_buffer_size=0;
+ comment_buffer=0;
+ lline_buffer=0;
+ comment_buffer_size=0;
lline_buffer_size=0;
}
}
@@ -3568,7 +3568,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
static struct ast_config *ast_config_new(void) ;
-static struct ast_config *ast_config_new(void)
+static struct ast_config *ast_config_new(void)
{
struct ast_config *config;
@@ -3621,7 +3621,7 @@ static struct ast_category *next_available_category(struct ast_category *cat)
}
static char *ast_category_browse(struct ast_config *config, const char *prev)
-{
+{
struct ast_category *cat = NULL;
if (prev && config->last_browse && (config->last_browse->name == prev))
@@ -3644,7 +3644,7 @@ static char *ast_category_browse(struct ast_config *config, const char *prev)
}
}
}
-
+
if (cat)
cat = next_available_category(cat);
@@ -3665,21 +3665,21 @@ void ast_config_set_current_category(struct ast_config *cfg, const struct ast_ca
/* NOTE: categories and variables each have a file and lineno attribute. On a save operation, these are used to determine
which file and line number to write out to. Thus, an entire hierarchy of config files (via #include statements) can be
recreated. BUT, care must be taken to make sure that every cat and var has the proper file name stored, or you may
- be shocked and mystified as to why things are not showing up in the files!
-
+ be shocked and mystified as to why things are not showing up in the files!
+
Also, All #include/#exec statements are recorded in the "includes" LL in the ast_config structure. The file name
and line number are stored for each include, plus the name of the file included, so that these statements may be
- included in the output files on a file_save operation.
-
+ included in the output files on a file_save operation.
+
The lineno's are really just for relative placement in the file. There is no attempt to make sure that blank lines
are included to keep the lineno's the same between input and output. The lineno fields are used mainly to determine
the position of the #include and #exec directives. So, blank lines tend to disappear from a read/rewrite operation,
and a header gets added.
-
+
vars and category heads are output in the order they are stored in the config file. So, if the software
shuffles these at all, then the placement of #include directives might get a little mixed up, because the
file/lineno data probably won't get changed.
-
+
*/
static void gen_header(FILE *f1, const char *configfile, const char *fn, const char *generator)
@@ -3688,7 +3688,7 @@ static void gen_header(FILE *f1, const char *configfile, const char *fn, const c
time_t t;
time(&t);
ast_copy_string(date, ctime(&t), sizeof(date));
-
+
fprintf(f1, ";!\n");
fprintf(f1, ";! Automatically generated configuration file\n");
if (strcmp(configfile, fn))
@@ -3707,7 +3707,7 @@ static void set_fn(char *fn, int fn_size, const char *file, const char *configfi
ast_copy_string(fn, configfile, fn_size);
else
snprintf(fn, fn_size, "%s/%s", ast_config_AST_CONFIG_DIR, configfile);
- } else if (file[0] == '/')
+ } else if (file[0] == '/')
ast_copy_string(fn, file, fn_size);
else
snprintf(fn, fn_size, "%s/%s", ast_config_AST_CONFIG_DIR, file);
@@ -3724,20 +3724,20 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
struct ast_comment *cmt;
struct ast_config_include *incl;
int blanklines = 0;
-
+
/* reset all the output flags, in case this isn't our first time saving this data */
-
+
for (incl=cfg->includes; incl; incl = incl->next)
incl->output = 0;
-
+
/* go thru all the inclusions and make sure all the files involved (configfile plus all its inclusions)
are all truncated to zero bytes and have that nice header*/
-
+
for (incl=cfg->includes; incl; incl = incl->next)
{
if (!incl->exec) { /* leave the execs alone -- we'll write out the #exec directives, but won't zero out the include files or exec files*/
FILE *f1;
-
+
set_fn(fn, sizeof(fn), incl->included_file, configfile); /* normally, fn is just set to incl->included_file, prepended with config dir if relative */
f1 = fopen(fn,"w");
if (f1) {
@@ -3748,24 +3748,24 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
}
}
}
-
+
set_fn(fn, sizeof(fn), 0, configfile); /* just set fn to absolute ver of configfile */
-#ifdef __CYGWIN__
+#ifdef __CYGWIN__
if ((f = fopen(fn, "w+"))) {
#else
if ((f = fopen(fn, "w"))) {
-#endif
+#endif
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Saving '%s': ", fn);
gen_header(f, configfile, fn, generator);
cat = cfg->root;
fclose(f);
-
+
/* from here out, we open each involved file and concat the stuff we need to add to the end and immediately close... */
- /* since each var, cat, and associated comments can come from any file, we have to be
+ /* since each var, cat, and associated comments can come from any file, we have to be
mobile, and open each file, print, and close it on an entry-by-entry basis */
-
+
while(cat) {
set_fn(fn, sizeof(fn), cat->file, configfile);
f = fopen(fn, "a");
@@ -3774,7 +3774,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
ast_verbose(VERBOSE_PREFIX_2 "Unable to write %s (%s)", fn, strerror(errno));
return -1;
}
-
+
/* dump any includes that happen before this category header */
for (incl=cfg->includes; incl; incl = incl->next) {
if (strcmp(incl->include_location_file, cat->file) == 0){
@@ -3787,7 +3787,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
}
}
}
-
+
/* Dump section with any appropriate comment */
for (cmt = cat->precomments; cmt; cmt=cmt->next) {
if (cmt->cmt[0] != ';' || cmt->cmt[1] != '!')
@@ -3802,7 +3802,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
if (!cat->sameline)
fprintf(f,"\n");
fclose(f);
-
+
var = cat->root;
while(var) {
set_fn(fn, sizeof(fn), var->file, configfile);
@@ -3812,7 +3812,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
ast_verbose(VERBOSE_PREFIX_2 "Unable to write %s (%s)", fn, strerror(errno));
return -1;
}
-
+
/* dump any includes that happen before this category header */
for (incl=cfg->includes; incl; incl = incl->next) {
if (strcmp(incl->include_location_file, var->file) == 0){
@@ -3825,24 +3825,24 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
}
}
}
-
+
for (cmt = var->precomments; cmt; cmt=cmt->next) {
if (cmt->cmt[0] != ';' || cmt->cmt[1] != '!')
fprintf(f,"%s", cmt->cmt);
}
- if (var->sameline)
+ if (var->sameline)
fprintf(f, "%s %s %s %s", var->name, (var->object ? "=>" : "="), var->value, var->sameline->cmt);
- else
+ else
fprintf(f, "%s %s %s\n", var->name, (var->object ? "=>" : "="), var->value);
if (var->blanklines) {
blanklines = var->blanklines;
while (blanklines--)
fprintf(f, "\n");
}
-
+
fclose(f);
-
-
+
+
var = var->next;
}
cat = cat->next;
@@ -3859,7 +3859,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
/* Now, for files with trailing #include/#exec statements,
we have to make sure every entry is output */
-
+
for (incl=cfg->includes; incl; incl = incl->next) {
if (!incl->output) {
/* open the respective file */
@@ -3870,7 +3870,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
ast_verbose(VERBOSE_PREFIX_2 "Unable to write %s (%s)", fn, strerror(errno));
return -1;
}
-
+
/* output the respective include */
if (incl->exec)
fprintf(f,"#exec \"%s\"\n", incl->exec_file);
@@ -3880,7 +3880,7 @@ int localized_config_text_file_save(const char *configfile, const struct ast_con
incl->output = 1;
}
}
-
+
return 0;
}
@@ -4206,7 +4206,7 @@ static int ext_cmp1(const char **p)
break;
}
/* locate end of set */
- end = strchr(*p, ']');
+ end = strchr(*p, ']');
if (end == NULL) {
ast_log(LOG_WARNING, "Wrong usage of [] in the extension\n");
@@ -4565,24 +4565,24 @@ static inline int include_valid(struct ast_include *i)
static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
- struct ast_context *bypass,
+ struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action);
static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
- struct ast_context *bypass,
+ struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action)
{
int x;
@@ -4670,7 +4670,7 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
continue;
}
/* No need to Substitute variables now; we shouldn't be here if there's any */
-
+
/* equivalent of extension_match_core() at the switch level */
if (action == E_CANMATCH)
aswf = asw->canmatch;
@@ -4704,20 +4704,20 @@ static struct ast_exten *pbx_find_extension(struct ast_channel *chan,
struct ast_exten *localized_find_extension(struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action);
struct ast_exten *localized_find_extension(struct ast_context *bypass,
struct pbx_find_info *q,
- const char *context,
- const char *exten,
+ const char *context,
+ const char *exten,
int priority,
- const char *label,
- const char *callerid,
+ const char *label,
+ const char *callerid,
enum ext_match_t action)
{
return pbx_find_extension(NULL, bypass, q, context, exten, priority, label, callerid, action);
@@ -5331,7 +5331,7 @@ static void pbx_retrieve_variable(struct ast_channel *c, const char *var, char *
int offset, length;
int i, need_substring;
struct varshead *places[2] = { headp, &globals }; /* list of places where we may look */
-
+
/*
* Make a copy of var because parse_variable_name() modifies the string.
* Then if called directly, we might need to run substring() on the result;
@@ -5339,7 +5339,7 @@ static void pbx_retrieve_variable(struct ast_channel *c, const char *var, char *
*/
tmpvar = ast_strdupa(var); /* parse_variable_name modifies the string */
need_substring = parse_variable_name(tmpvar, &offset, &length, &i /* ignored */);
-
+
/*
* Look first into predefined variables, then into variable lists.
* Variable 's' points to the result, according to the following rules:
@@ -5360,7 +5360,7 @@ static void pbx_retrieve_variable(struct ast_channel *c, const char *var, char *
if (!strcmp(var, "EPOCH")) {
snprintf(workspace, workspacelen, "%u",(int)time(NULL));
}
-
+
s = workspace;
}
/* if not found, look into chanvars or global vars */
@@ -5603,11 +5603,11 @@ static int pbx_load_config(const char *config_file)
autofallthrough_config = ast_true(aft);
clearglobalvars_config = ast_true(ast_variable_retrieve(cfg, "general", "clearglobalvars"));
- if ((cxt = ast_variable_retrieve(cfg, "general", "userscontext")))
+ if ((cxt = ast_variable_retrieve(cfg, "general", "userscontext")))
ast_copy_string(userscontext, cxt, sizeof(userscontext));
else
ast_copy_string(userscontext, "default", sizeof(userscontext));
-
+
for (v = ast_variable_browse(cfg, "globals"); v; v = v->next) {
memset(realvalue, 0, sizeof(realvalue));
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
@@ -5908,7 +5908,7 @@ int localized_pbx_load_module(void)
printf("Context: %s\n", con->name);
}
printf("=========\n");
-
+
return 0;
}
@@ -5921,4 +5921,3 @@ struct timeval ast_tvnow(void)
gettimeofday(&t, NULL);
return t;
}
-
diff --git a/utils/frame.c b/utils/frame.c
index 62dc5f9f0..97b959661 100644
--- a/utils/frame.c
+++ b/utils/frame.c
@@ -7,8 +7,8 @@
* Name: frame.c
* Version: see static char *standardversion, below.
* Author: Mark Roberts <mark@manumark.de>
- * Michael Labuschke <michael@labuschke.de> sys_errlist fixes
- *
+ * Michael Labuschke <michael@labuschke.de> sys_errlist fixes
+ *
****************************************************************************/
/****************************************************************************
* These are useful functions that all DSP programs might find handy
@@ -850,7 +850,7 @@ void parseargs( int argcount, char *args[], int fileswitch)
}
/*-------------------------------------------------*
- * Set samplefrequency, width, wavout,
+ * Set samplefrequency, width, wavout,
*-------------------------------------------------*/
parseintarg( argcount, args, "f", &samplefrequency);
wavout = parseswitcharg( argcount, args, "h");
@@ -1088,4 +1088,3 @@ void readawaysamples( FILE *input, size_t size)
}
free( buffer);
}
-
diff --git a/utils/frame.h b/utils/frame.h
index a07c605ec..4bbc2199b 100644
--- a/utils/frame.h
+++ b/utils/frame.h
@@ -102,7 +102,7 @@ extern int getremainingfilelength( FILE *anyin, long *result);
void readpkheader( FILE *anyin);
/* -----------------------------------------------------------------------
- Read a .WAV header from 'anyin'.
+ Read a .WAV header from 'anyin'.
If it is recognised, the data is used.
Otherwise, we assume it's PCM-data and ignore the header.
The global variable 'iswav' is set on success, otherwise cleared.
diff --git a/utils/muted.c b/utils/muted.c
index a78312e28..ee1de7f54 100644
--- a/utils/muted.c
+++ b/utils/muted.c
@@ -5,7 +5,7 @@
*
* Mark Spencer <markster@digium.com>
*
- * Updated for Mac OSX CoreAudio
+ * Updated for Mac OSX CoreAudio
* by Josh Roberson <josh@asteriasgi.com>
*
* See http://www.asterisk.org for more information about
@@ -25,7 +25,7 @@
*
* \author Mark Spencer <markster@digium.com>
*
- * Updated for Mac OSX CoreAudio
+ * Updated for Mac OSX CoreAudio
* \arg Josh Roberson <josh@asteriasgi.com>
*
* \note Specially written for Malcolm Davenport, but I think I'll use it too
@@ -51,7 +51,7 @@
#include "asterisk/autoconfig.h"
#ifdef __Darwin__
-#include <CoreAudio/AudioHardware.h>
+#include <CoreAudio/AudioHardware.h>
#include <sys/types.h>
#include <pwd.h>
#include <sys/stat.h>
@@ -117,7 +117,7 @@ static void add_channel(char *tech, char *location)
chan->next = channels;
channels = chan;
}
-
+
}
static int load_config(void)
@@ -176,7 +176,7 @@ static int load_config(void)
} else if (!strcasecmp(buf, "mutelevel")) {
if (val && (sscanf(val, "%3d", &x) == 1) && (x > -1) && (x < 101)) {
mutelevel = x;
- } else
+ } else
fprintf(stderr, "mutelevel must be a number from 0 (most muted) to 100 (no mute) at line %d\n", lineno);
} else if (!strcasecmp(buf, "channel")) {
if (val && strlen(val)) {
@@ -199,7 +199,7 @@ static int load_config(void)
fprintf(stderr, "no 'host' specification in config file\n");
else if (!strlen(user))
fprintf(stderr, "no 'user' specification in config file\n");
- else if (!channels)
+ else if (!channels)
fprintf(stderr, "no 'channel' specifications in config file\n");
else
return 0;
@@ -286,7 +286,7 @@ static int login_asterisk(void)
fprintf(stderr, "disconnected (1)\n");
return -1;
}
- fprintf(astf,
+ fprintf(astf,
"Action: Login\r\n"
"Username: %s\r\n"
"Secret: %s\r\n\r\n", user, pass);
@@ -304,7 +304,7 @@ static int login_asterisk(void)
fprintf(stderr, "disconnected (3)\n");
return -1;
}
- fprintf(astf,
+ fprintf(astf,
"Action: Status\r\n\r\n");
if (!(welcome = get_line())) {
fprintf(stderr, "disconnected (4)\n");
@@ -404,7 +404,7 @@ static int setvol(float vol)
{
#ifndef __Darwin__
if (ioctl(mixfd, MIXER_WRITE(mixchan), &vol)) {
-#else
+#else
float volumeL = vol;
float volumeR = vol;
OSStatus err;
@@ -462,7 +462,7 @@ static float mutedlevel(float orig, float level)
master = level * master / 100.0;
return master;
#endif
-
+
}
static void mute(void)
@@ -479,7 +479,7 @@ static void mute(void)
vol = getvol();
oldvol = vol;
if (smoothfade)
-#ifdef __Darwin__
+#ifdef __Darwin__
start = mutelevel;
#else
start = 100;
@@ -587,7 +587,7 @@ static void append_sub(struct channel *chan, char *name)
struct subchannel *sub;
sub = chan->subs;
while(sub) {
- if (!strcasecmp(sub->name, name))
+ if (!strcasecmp(sub->name, name))
return;
sub = sub->next;
}
@@ -650,7 +650,7 @@ static int wait_event(void)
strncpy(oldname, resp + strlen("Oldname: "), sizeof(oldname) - 1);
}
if (strlen(channel)) {
- if (!strcasecmp(event, "Hangup"))
+ if (!strcasecmp(event, "Hangup"))
hangup_chan(channel);
else
offhook_chan(channel);
@@ -711,7 +711,7 @@ int main(int argc, char *argv[])
exit(1);
}
if (login_asterisk()) {
-#ifndef __Darwin__
+#ifndef __Darwin__
close(mixfd);
#endif
fclose(astf);
diff --git a/utils/smsq.c b/utils/smsq.c
index 21ab80d04..051609797 100644
--- a/utils/smsq.c
+++ b/utils/smsq.c
@@ -41,7 +41,7 @@
/*!
* \brief reads next USC character from null terminated UTF-8 string and advanced pointer
* for non valid UTF-8 sequences.
- * \return character as is Does \b NOT advance pointer for null termination
+ * \return character as is Does \b NOT advance pointer for null termination
*/
static int utf8decode (unsigned char **pp)
{
@@ -92,12 +92,12 @@ static int utf8decode (unsigned char **pp)
return *p; /* not sensible */
}
-/*!
+/*!
* \brief check for any queued messages in specific queue (queue="" means any queue)
* \param dir,queue,subaddress,channel,callerid,wait,delay,retries,concurrent
* \retval 0 if nothing queued
* \retval 1 if queued and outgoing set up OK
- * \retval 2 of outgoing exists
+ * \retval 2 of outgoing exists
*/
static char txqcheck (char *dir, char *queue, char subaddress, char *channel, char *callerid, int wait, int delay, int retries, int concurrent)
{
@@ -193,7 +193,7 @@ static char txqcheck (char *dir, char *queue, char subaddress, char *channel, ch
return 2;
}
-/*!
+/*!
* \brief Process received queue entries
* Run through a process, setting environment variables
*/
diff --git a/utils/stereorize.c b/utils/stereorize.c
index 484304037..8f22249cc 100644
--- a/utils/stereorize.c
+++ b/utils/stereorize.c
@@ -109,7 +109,7 @@ int main( int argcount, char *args[])
channels = 2; /* Output files are stereo */
if (wavout)
{
- if ((strcmp(outfilename,"<stdout>")!=0) && (fseek( out, 0, SEEK_SET) != 0))
+ if ((strcmp(outfilename,"<stdout>")!=0) && (fseek( out, 0, SEEK_SET) != 0))
fatalerror("Couldn't navigate output file '%s': %s\n",outfilename, strerror(errno));
makewavheader();
}
diff --git a/utils/streamplayer.c b/utils/streamplayer.c
index 6c70b0840..809bd64b8 100644
--- a/utils/streamplayer.c
+++ b/utils/streamplayer.c
@@ -19,7 +19,7 @@
/*!
* \file
* \author Russell Bryant <russell@digium.com>
- *
+ *
* \brief A utility for reading from a raw TCP stream
*
* This application is intended for use when a raw TCP stream is desired to be
@@ -84,33 +84,33 @@ int main(int argc, char *argv[])
}
memset(&sin, 0, sizeof(sin));
-
+
sin.sin_family = AF_INET;
sin.sin_port = htons(atoi(argv[2]));
memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
-
+
s = socket(AF_INET, SOCK_STREAM, 0);
-
+
if (s < 0) {
fprintf(stderr, "Unable to allocate socket!\n");
exit(1);
- }
+ }
res = connect(s, (struct sockaddr *)&sin, sizeof(sin));
-
+
if (res) {
fprintf(stderr, "Unable to connect to host!\n");
close(s);
- exit(1);
+ exit(1);
}
while (1) {
res = read(s, buf, sizeof(buf));
if (res < 1)
- break;
-
- memset(&tv, 0, sizeof(tv));
+ break;
+
+ memset(&tv, 0, sizeof(tv));
FD_ZERO(&wfds);
FD_SET(1, &wfds);