[Freeswitch-svn] [commit] r10802 - in freeswitch/trunk/libs/sofia-sip: . docs libsofia-sip-ua libsofia-sip-ua-glib libsofia-sip-ua-glib/su-glib libsofia-sip-ua-glib/su-glib/sofia-sip libsofia-sip-ua/bnf libsofia-sip-ua/bnf/sofia-sip libsofia-sip-ua/docs libsofia-sip-ua/features libsofia-sip-ua/http libsofia-sip-ua/http/sofia-sip libsofia-sip-ua/ipt libsofia-sip-ua/ipt/sofia-sip libsofia-sip-ua/iptsec libsofia-sip-ua/iptsec/sofia-sip libsofia-sip-ua/msg libsofia-sip-ua/msg/sofia-sip libsofia-sip-ua/nea libsofia-sip-ua/nea/sofia-sip libsofia-sip-ua/nta libsofia-sip-ua/nta/sofia-sip libsofia-sip-ua/nth libsofia-sip-ua/nth/sofia-sip libsofia-sip-ua/nua libsofia-sip-ua/nua/sofia-sip libsofia-sip-ua/sdp libsofia-sip-ua/sdp/sofia-sip libsofia-sip-ua/sip libsofia-sip-ua/sip/sofia-sip libsofia-sip-ua/soa libsofia-sip-ua/soa/sofia-sip libsofia-sip-ua/sresolv libsofia-sip-ua/sresolv/sofia-resolv libsofia-sip-ua/sresolv/sofia-sip libsofia-sip-ua/stun libsofia-sip-ua/stun/sofia-sip libsofia-sip-ua/su libsofia-sip-ua/su/sofia-sip libsofia-sip-ua/tport libsofia-sip-ua/tport/sofia-sip libsofia-sip-ua/url libsofia-sip-ua/url/sofia-sip m4 open_c packages rules scripts tests utils win32 win32/libsofia-sip-ua win32/sofia-sip
FreeSWITCH SVN
mikej at freeswitch.org
Tue Dec 16 10:05:26 PST 2008
Author: mikej
Date: Tue Dec 16 13:05:22 2008
New Revision: 10802
Log:
merge whitespace fixes from sofia-sip tree
Modified:
freeswitch/trunk/libs/sofia-sip/AUTHORS
freeswitch/trunk/libs/sofia-sip/COPYING
freeswitch/trunk/libs/sofia-sip/COPYRIGHTS
freeswitch/trunk/libs/sofia-sip/ChangeLog
freeswitch/trunk/libs/sofia-sip/ChangeLog.ext-trees
freeswitch/trunk/libs/sofia-sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/README
freeswitch/trunk/libs/sofia-sip/README.developers
freeswitch/trunk/libs/sofia-sip/RELEASE
freeswitch/trunk/libs/sofia-sip/RELEASE.template
freeswitch/trunk/libs/sofia-sip/TODO
freeswitch/trunk/libs/sofia-sip/autogen.sh
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/docs/build_system.txt
freeswitch/trunk/libs/sofia-sip/docs/devel_platform_notes.txt
freeswitch/trunk/libs/sofia-sip/docs/release_management.txt
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_glib.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_source.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_glib.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source_test.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/torture_su_glib_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/bnf.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/hostdomain.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/torture_bnf.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/conformance.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/docguide.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/mainpage.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_basic.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_extra.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_header.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser_table.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_status.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag_class.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_hclasses.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_parser.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_protos.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_status.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/base64.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ipt.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/rc4.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/base64.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/rc4.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/uniqueid.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/utf8.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/token64.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs2.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs4.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8test.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client_ntlm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_common.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_digest.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_http.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_sip.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_ntlm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_delayed.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_ntlm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_common.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_digest.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_module.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_ntlm.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_plugin.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/test_auth_digest.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_auth.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_basic.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_generic.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_make.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mclass.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime_table.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_name_hash.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_addr.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_buffer.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_date.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_header.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass_hash.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_parser.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_protos.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_tag_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_types.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_protos.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_table.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_debug.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_event.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/sofia-sip/nea.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/invite.msc
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/portbind.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/run_test_nta
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_read_payload.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_stateless.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/sl_utils.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/http-client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/test_nth.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_common.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_registrar.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_types.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/errata
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/test_sdp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ADD-A-HEADER
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/GRAMMAR
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run-tests
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run_test_sip_msg
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.doxyaliases
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_bad_mask
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_caller_prefs.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_event.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra_headers.txt
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_feature.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_header.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_mime.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser_table.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_prack.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_pref_util.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_reason.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_refer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_security.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_session.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_status.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag.c.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag_class.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_time.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_parser.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_protos.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_status.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_util.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_date.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_session.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/test_soa.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/127.zone
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/194.2.188
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/3.f.f.e.1.2.0.0.3.0.1.2.c.0.0.0
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/3.f.f.e.1.2.0.0.3.0.1.2.c.0.0.0.arpa
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/example.com
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/resolve_sip.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/root.zone
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_async.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_config.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_record.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-sip/sresolv.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_blocking.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/torture_sresolv.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/lookup_stun_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun_common.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_mini.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/addrinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/foo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/getopt.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/localinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memccpy.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memcspn.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memmem.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memspn.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/smoothsort.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/heap.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable2.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/rbtree.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_addrinfo.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_alloc.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_alloc_stat.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_bm.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_config.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_configure.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_debug.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_errno.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_localinfo.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_log.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_md5.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_os_nw.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_osx_runloop.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_strlst.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_inline.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_io.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tagarg.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_time.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_types.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_uniqueid.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_vector.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/tstdef.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strcasestr.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strtoull.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_addrinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc_lock.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_base_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_bm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_default_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_devpoll_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_errno.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_global_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_md5.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_module_debug.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_open_c_localinfo.cpp
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_os_nw.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_perf.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_proxy.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_sprintf.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strdup.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strlst.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag_io.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time0.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/tag_dll.awk
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable2.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_memmem.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_poll.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su_osx.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_heap.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_rbtree.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_alloc.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_bm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_port.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root_osx.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_time.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/ChangeLog
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_plugins.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_client.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_sigcomp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_sigcomp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_stun.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_threadpool.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_connect.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag_class.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.docs
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.h
freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4
freeswitch/trunk/libs/sofia-sip/m4/sac-general.m4
freeswitch/trunk/libs/sofia-sip/m4/sac-openssl.m4
freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4
freeswitch/trunk/libs/sofia-sip/m4/sac-tport.m4
freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd
freeswitch/trunk/libs/sofia-sip/open_c/version.awk
freeswitch/trunk/libs/sofia-sip/packages/ChangeLog
freeswitch/trunk/libs/sofia-sip/packages/Makefile.am
freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in
freeswitch/trunk/libs/sofia-sip/rules/lcov.am
freeswitch/trunk/libs/sofia-sip/rules/recursive.am
freeswitch/trunk/libs/sofia-sip/rules/valcheck.am
freeswitch/trunk/libs/sofia-sip/scripts/coverage
freeswitch/trunk/libs/sofia-sip/scripts/fix-include-sofia-sip
freeswitch/trunk/libs/sofia-sip/scripts/hide_emails.sh
freeswitch/trunk/libs/sofia-sip/scripts/lcov-report
freeswitch/trunk/libs/sofia-sip/scripts/rpmbuild-snaphot
freeswitch/trunk/libs/sofia-sip/scripts/uncovered
freeswitch/trunk/libs/sofia-sip/tests/check_sofia.c
freeswitch/trunk/libs/sofia-sip/tests/test_100rel.c
freeswitch/trunk/libs/sofia-sip/tests/test_basic_call.c
freeswitch/trunk/libs/sofia-sip/tests/test_call_hold.c
freeswitch/trunk/libs/sofia-sip/tests/test_call_reject.c
freeswitch/trunk/libs/sofia-sip/tests/test_cancel_bye.c
freeswitch/trunk/libs/sofia-sip/tests/test_extension.c
freeswitch/trunk/libs/sofia-sip/tests/test_init.c
freeswitch/trunk/libs/sofia-sip/tests/test_nat.c
freeswitch/trunk/libs/sofia-sip/tests/test_nat.h
freeswitch/trunk/libs/sofia-sip/tests/test_nua.c
freeswitch/trunk/libs/sofia-sip/tests/test_nua.h
freeswitch/trunk/libs/sofia-sip/tests/test_nua_api.c
freeswitch/trunk/libs/sofia-sip/tests/test_nua_params.c
freeswitch/trunk/libs/sofia-sip/tests/test_offer_answer.c
freeswitch/trunk/libs/sofia-sip/tests/test_ops.c
freeswitch/trunk/libs/sofia-sip/tests/test_proxy.c
freeswitch/trunk/libs/sofia-sip/tests/test_proxy.h
freeswitch/trunk/libs/sofia-sip/tests/test_refer.c
freeswitch/trunk/libs/sofia-sip/tests/test_register.c
freeswitch/trunk/libs/sofia-sip/tests/test_session_timer.c
freeswitch/trunk/libs/sofia-sip/tests/test_simple.c
freeswitch/trunk/libs/sofia-sip/tests/test_sip_events.c
freeswitch/trunk/libs/sofia-sip/utils/ChangeLog
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
freeswitch/trunk/libs/sofia-sip/utils/apps_utils.h
freeswitch/trunk/libs/sofia-sip/utils/sip-date.c
freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
freeswitch/trunk/libs/sofia-sip/utils/utils.docs
freeswitch/trunk/libs/sofia-sip/win32/ChangeLog
freeswitch/trunk/libs/sofia-sip/win32/README.txt
freeswitch/trunk/libs/sofia-sip/win32/build_sources.cmd
freeswitch/trunk/libs/sofia-sip/win32/config.h.in
freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/sofia-sip-ua.def
freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h
freeswitch/trunk/libs/sofia-sip/win32/version.awk
Modified: freeswitch/trunk/libs/sofia-sip/AUTHORS
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/AUTHORS (original)
+++ freeswitch/trunk/libs/sofia-sip/AUTHORS Tue Dec 16 13:05:22 2008
@@ -31,7 +31,6 @@
Whittaker, Colin <colinw -at occamnetworks -dot com>
Zabaluev, Mikhail <first.surname at nokia.com>
-Note: for details on who did what, see the version control
+Note: for details on who did what, see the version control
system change history, and release notes for past releases at
http://sofia-sip.sourceforge.net/relnotes/
-
\ No newline at end of file
Modified: freeswitch/trunk/libs/sofia-sip/COPYING
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/COPYING (original)
+++ freeswitch/trunk/libs/sofia-sip/COPYING Tue Dec 16 13:05:22 2008
@@ -146,7 +146,7 @@
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
Modified: freeswitch/trunk/libs/sofia-sip/COPYRIGHTS
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/COPYRIGHTS (original)
+++ freeswitch/trunk/libs/sofia-sip/COPYRIGHTS Tue Dec 16 13:05:22 2008
@@ -1,6 +1,6 @@
This package contains the Sofia-SIP library.
-Copyright (C) 2005-2006 Nokia Corporation and others (see the
+Copyright (C) 2005-2006 Nokia Corporation and others (see the
in individual files for a detailed list of copyright holders).
Contact: Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -102,23 +102,23 @@
The package also contains files licensed by IBM Corporation. These files are
distributed with the following copyright notice:
- This module contains code made available by IBM
- Corporation on an AS IS basis. Any one receiving the
- module is considered to be licensed under IBM copyrights
- to use the IBM-provided source code in any way he or she
- deems fit, including copying it, compiling it, modifying
- it, and redistributing it, with or without
- modifications. No license under any IBM patents or
- patent applications is to be implied from this copyright
- license.
-
- A user of the module should understand that IBM cannot
- provide technical support for the module and will not be
- responsible for any consequences of use of the program.
-
- Any notices, including this one, are not to be removed
- from the module without the prior written consent of
- IBM.
+ This module contains code made available by IBM
+ Corporation on an AS IS basis. Any one receiving the
+ module is considered to be licensed under IBM copyrights
+ to use the IBM-provided source code in any way he or she
+ deems fit, including copying it, compiling it, modifying
+ it, and redistributing it, with or without
+ modifications. No license under any IBM patents or
+ patent applications is to be implied from this copyright
+ license.
+
+ A user of the module should understand that IBM cannot
+ provide technical support for the module and will not be
+ responsible for any consequences of use of the program.
+
+ Any notices, including this one, are not to be removed
+ from the module without the prior written consent of
+ IBM.
----------------------------------------------------------------------------
@@ -149,7 +149,7 @@
The following license.terms for information on usage and redistribution
of this individual file, and for a DISCLAIMER OF ALL WARRANTIES.
-
+
This software is copyrighted by the Regents of the University of
California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
Corporation and other parties. The following terms apply to all files
@@ -181,7 +181,7 @@
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
-in the software and related documentation as defined in the Federal
+in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
@@ -189,7 +189,7 @@
252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
-terms specified in this license.
+terms specified in this license.
----------------------------------------------------------------------------
Modified: freeswitch/trunk/libs/sofia-sip/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/ChangeLog Tue Dec 16 13:05:22 2008
@@ -2,11 +2,11 @@
ChangeLog / Sofia-SIP - SIP User-Agent library
===============================================================
-Sofia-SIP library ChangeLog files are available in the
+Sofia-SIP library ChangeLog files are available in the
following places:
-- per subdirectory ChangeLog files
- - all non-trivial changes to files (unless documented
+- per subdirectory ChangeLog files
+ - all non-trivial changes to files (unless documented
elsewhere)
- version control system changelogs
- darcs and CVS tree repositories (see README.developers
Modified: freeswitch/trunk/libs/sofia-sip/ChangeLog.ext-trees
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/ChangeLog.ext-trees (original)
+++ freeswitch/trunk/libs/sofia-sip/ChangeLog.ext-trees Tue Dec 16 13:05:22 2008
@@ -20,18 +20,18 @@
* Fixed binding problems in nua and nta.c.
Returning more appropriate error code from tport_tbind(), too.
- This patch fixes tracked bugs
- #1485624 (nua not binding to 5060),
- #1485625 (nua_create() fails if STUN init fails) and
+ This patch fixes tracked bugs
+ #1485624 (nua not binding to 5060),
+ #1485625 (nua_create() fails if STUN init fails) and
#1485632 (ncorrect error message for nua bind error).
Nua now also binds both to NUTAG_URL and NUTAG_SIPS_URL() URIs, nua_create()
fails if binding either of them fails.
* Fixed msg_addrlen() usage.
-
+
msg_addrlen() returns a pointer to ai_addrlen field of struct addrinfo
inside the msg_t object. ai_addrlen has type size_t. However, system calls
- taking a return valur pointer to address length, use type socklen_t.
+ taking a return valur pointer to address length, use type socklen_t.
Typically size_t is unsigned long, socklen_t is int, so casting
msg_addrlen() return value to (socklen_t *) will break on (high-endian)
64-bit platforms. svsp.
@@ -74,22 +74,22 @@
- win32/tests/test_nua/test_nat_tags.cpp
* Now building libsofia_sip_ua.dll on win32.
-
+
We define both IN_LIBSOFIA_SIP_UA and IN_LIBSOFIA_SRES in
libsofia_sip_ua.dsp.
-
+
Because of DLL linkage, we compile tags typedefs as C++
(see win32/tests/test_nua/test_nat_tags.cpp).
-
+
Removed LIBSOFIA_SIP_UA_STATIC from win32/sofia-sip/su_configure.h.
-
+
Added libsofia_sip_ua_static.lib, too. If you want to compile against
- that, you need define LIBSOFIA_SIP_UA_STATIC by yourself.
-
+ that, you need define LIBSOFIA_SIP_UA_STATIC by yourself.
+
Added libsofia-sip-ua-static/libsofia_sip_ua_static.dsp.
-
+
Using multithreaded DLL runtime for all projects.
-
+
* Added SOFIAPUBFUN/SOFIAPUBVAR to stun module, too.
* Added test_nat_tags.c to nua module.
@@ -99,11 +99,11 @@
* Added SRESPUBFUN and sres_config.h to sresolv module.
* Updated headers.
-
+
Added sofia-sip/ prefix to documentation entries referring to include files.
-
+
Added SOFIAPUBFUN and SOFIAPUBVAR to files that missed them.
-
+
Removed some deprecated functions and macros.
* Avoid #include ordering problem with sip_parser.h in sip_test_msg.c, too.
@@ -118,7 +118,7 @@
Avoid #include ordering problem with <sofia-sip/http_parser.h>.
* Removed utf8 and unicode-related stuff from library.
-
+
Source files are still included in source tar.
* Reordered #includes in sip module.
@@ -137,9 +137,9 @@
* Fixed includes in outbound.[hc].
- * Added Doxyfiles to libsofia-sip-ua-glib.
-
- Note that the files are not actually commented.
+ * Added Doxyfiles to libsofia-sip-ua-glib.
+
+ Note that the files are not actually commented.
* nua, soa: Adding Warnings to the response if appropriate.
@@ -166,18 +166,18 @@
* nua_register.c: use nua-generated contact for refresh interval calculation.
Allow SIPS uris in contacts, too.
- * nua_register.c: ignoring bad received parameters in Via header.
+ * nua_register.c: ignoring bad received parameters in Via header.
+
+ * Updated config file handling in sresolv/sres.c.
- * Updated config file handling in sresolv/sres.c.
-
Using reference counting with config structure when copying
resolver objects.
-
+
Trying harder to avoid re-parsing resolv.conf and checking for
updated servers.
-
+
Changed SRES_UPDATE_INTERVAL_SECS to 5 for non-WIN32 platforms.
-
+
* su/su_alloc.c, su/sofia-sip/su_alloc.h: su_home_ref() takes const pointer.
2006-05-08 kai.vehmanen at nokia.com
@@ -252,10 +252,10 @@
* test_sresolv.v: added more tests for A6 record parsing.
* sres.c, sres_cache.c: records are now allocated in a single chunk.
-
+
Bug hunted down by Thomas Rosenblatt: strings and domains belonging to
record were allocated from resolver home, not from cache home.
-
+
* Fixed problem with config without search domains in sresolv/sres.c.
* Added information for COPYRIGHTS file to README.developers.
@@ -277,7 +277,7 @@
* Added sofia-sip/auth_ntlm.h auth_ntlm.c to dist in iptsec module.
* Added license to Makefiles (kv)
-
+
Added copyright lines and reference to LGPL license to the Makefile.am and
configure.ac files.
@@ -286,7 +286,7 @@
* Added libsofia-sip-ua-glib/ChangeLog to darcs (kv)
* Added win32 registry name server discovery (kv)
-
+
Based on a patch from Dimitri E. Prado.
Decreased update interval to 180secs (SRES_UPDATE_INTERVAL_SECS).
@@ -371,7 +371,7 @@
const *, too.
* Added SOFIAPUBFUN to auth_struct_copy(), too.
-
+
* iptsec module (by Martti Mela):
* ntlm support now compiles, not working.
@@ -393,7 +393,7 @@
* iptsec module:
* Updated headers in iptsec module.
- Added SOFIAPUBFUN and SOFIAPUBVAR where needed.
+ Added SOFIAPUBFUN and SOFIAPUBVAR where needed.
Removed auc_with_uicc().
* Fixed memory management problems in iptsec module.
@@ -403,7 +403,7 @@
freed.
Now we are actually running the tests in test_auth_digest.c, too.
The problem was reported and patch submitted by Colin Whittaker.
-
+
* sresolv module:
* Updated sresolv API.
@@ -743,7 +743,7 @@
M ./libsofia-sip-ua/nua/test_nua.c +138
- * Fixed NTA API test for SigComp options (they are now always processed).
+ * Fixed NTA API test for SigComp options (they are now always processed).
M ./libsofia-sip-ua/nta/test_nta_api.c -8 +4
@@ -800,7 +800,7 @@
2006-04-11 Kai Vehmanen <kai.vehmanen at nokia.com>
- Synchronizing CVS with darcs (other contributors pp = Pekka Pessi,
+ Synchronizing CVS with darcs (other contributors pp = Pekka Pessi,
mm = Martti Mela).
* NDEBUG oops. (pp)
@@ -897,7 +897,7 @@
M ./libsofia-sip-ua/nua/nua_tag.c -2
M ./libsofia-sip-ua/nua/sofia-sip/nua_tag.h -7 +6
- * Fixed su_root_run() usage in docs. (pp)
+ * Fixed su_root_run() usage in docs. (pp)
Thanks for hint by Julio Auto.
M ./libsofia-sip-ua/nua/nua.docs -1 +1
@@ -915,7 +915,7 @@
M ./libsofia-sip-ua/nua/nua_register.c -7 +11
* Removed obsoleted nua events. (pp)
-
+
Removed nua events nua_i_media_event, nua_r_set_media_param,
nua_r_get_media_param, nua_r_media_setup, nua_r_media_describe,
nua_r_media_event, nua_i_announce, nua_i_describe, nua_i_get_parameter,
@@ -923,7 +923,7 @@
nua_i_setup, nua_i_teardown, nua_r_setup, nua_r_play, nua_r_record,
nua_r_pause, nua_r_describe, nua_r_teardown, nua_r_options2, nua_r_announce,
nua_r_get_parameter, and nua_r_set_parameter.
-
+
Removed nua functions nua_announce(), nua_describe(), nua_get_media_param(),
nua_get_parameter(), nua_media_describe(), nua_media_event(),
nua_media_setup(), nua_options2(), nua_pause(), nua_play(), nua_record(),
@@ -1330,7 +1330,7 @@
A ./libsofia-sip-ua/tport/tport_type_connect.c
* Split tport.c into multiple modules. (pp)
- STUN, UPnP and SigComp still need some polishing.
+ STUN, UPnP and SigComp still need some polishing.
M ./libsofia-sip-ua/tport/Makefile.am -3 +7
M ./libsofia-sip-ua/tport/test_tport.c -13 +11
@@ -1574,12 +1574,12 @@
M ./libsofia-sip-ua/nta/nta.c -3 +9
* Using SOFIAPUBFUN in msg_header.h. Avoiding use of msg_param_t where possible. (pp)
-
+
API CHANGE:
Allowing NULL as message public pointer (using default) in calls to
msg_serialize(), msg_header_add(), msg_header_prepend(),
msg_header_add_dup(), msg_header_add_dup_as(), msg_header_add_make(),
- msg_header_add_str(), msg_header_insert(), msg_header_remove(),
+ msg_header_add_str(), msg_header_insert(), msg_header_remove(),
msg_header_remove_all(), and msg_header_replace().
M ./libsofia-sip-ua/msg/msg_parser.c -155 +182
@@ -1613,7 +1613,7 @@
* nua_dialog_store_peer_info() now optionally removes peer info. (pp)
If the SIP message given to nua_dialog_store_peer_info() is redirection
response, reset peer info.
-
+
M ./libsofia-sip-ua/nua/nua_dialog.c +14
@@ -1645,7 +1645,7 @@
2006-03-16 Pekka Pessi <Pekka.Pessi at nokia.com>
Synchronizing CVS with darcs.
-
+
* Fixed lib-sofia-sip-ua-glib Makefile.ams.
Tried to sanitize glib-less compilation.
@@ -1718,7 +1718,7 @@
* Using alarm() with su_test.c.
* Fixed hc_print usage in msg_header_prepare().
- Some headers use snprintf() which may return -1 on some platforms if
+ Some headers use snprintf() which may return -1 on some platforms if
buffer is too small.
* Fixed problems in test_nua on win32.
@@ -1753,13 +1753,13 @@
M ./libsofia-sip-ua/nua/nua_stack.c -1 +1
2006-03-13 Martti Mela <martti.mela at nokia.com>
-
+
* win32 defs, compiles and installs in mingw environment
2006-03-09 Kai Vehmanen <kai.vehmanen at nokia.com>
- * Synchronized darcs and CVS.
-
+ * Synchronized darcs and CVS.
+
* Added missing su_source_test.c file.
A ./libsofia-sip-ua-glib/su-glib/su_source_test.c
@@ -1978,8 +1978,8 @@
2006-03-01 Pekka Pessi <Pekka.Pessi at nokia.com>
- * Synchronized darcs and CVS.
-
+ * Synchronized darcs and CVS.
+
* Added utils/Doxyfile
A ./utils/Doxyfile
@@ -2122,7 +2122,7 @@
2006-02-15 Pekka Pessi <Pekka.Pessi at nokia.com>
* Release 1.11.6.
-
+
* Fixed problems in doxygen documentation and dist.
* Updated PRACK and nta_outgoing_prack().
@@ -2173,19 +2173,19 @@
<sofia-sip/su.h>.
You can either fix your applications to use the new include file names
- with the fix-include-sofia-sip sed script found in scripts/ directory, or
- add both ${sofiadir} and ${sofiadir}/sofia-sip into your include path,
+ with the fix-include-sofia-sip sed script found in scripts/ directory, or
+ add both ${sofiadir} and ${sofiadir}/sofia-sip into your include path,
e.g.,
- INCLUDES = -I/usr/include/sofia-1.11 -I/usr/include/sofia-1.11/sofia-sip
+ INCLUDES = -I/usr/include/sofia-1.11 -I/usr/include/sofia-1.11/sofia-sip
At the same time, I took the liberty to rename two include files
sofia_sip_features.h => sofia-sip/features.h
- su_memmem.h => sofia-sip/su_bm.h
+ su_memmem.h => sofia-sip/su_bm.h
The fix-include-sofia-sip sed script takes care of both of them.
-
+
* Improved 100rel handling in nua.
Added test_100rel to test_nua.c.
@@ -2193,7 +2193,7 @@
* Improving getaddrinfo replacements.
Testing functions getaddrinfo()/freeaddrinfo(), getnameinfo() and
- gai_strerror() separately.
+ gai_strerror() separately.
There is no gai_strerror() in windows, I think.
2006-02-03 Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -2286,12 +2286,12 @@
M ./libsofia-sip-ua/nea/nea_server.c -1 +1
* Added functions for scanning domain names and IP addresses.
- Added span_ip4_address()/scan_ip4_address(),
- span_ip6_address()/scan_ip6_address(),
+ Added span_ip4_address()/scan_ip4_address(),
+ span_ip6_address()/scan_ip6_address(),
span_ip6_reference()/scan_ip6_reference(),
- span_ip_address()/scan_ip_address(),
+ span_ip_address()/scan_ip_address(),
span_domain()/scan_domain(), and
- span_host()/scan_host().
+ span_host()/scan_host().
M ./libsofia-sip-ua/bnf/bnf.c -2 +588
M ./libsofia-sip-ua/bnf/bnf.h -2 +18
@@ -2393,7 +2393,7 @@
2006-01-03 Pekka Pessi <Pekka.Pessi at nokia.com>
Syncinc darcs and CVS.
-
+
* Added more tests for call hold.
* Using msg_header_replace_param() in nua_stack.c.
@@ -2410,7 +2410,7 @@
* Removed msg_bnf.h
- * Added NTATAG_TCP_RPORT().
+ * Added NTATAG_TCP_RPORT().
Do not use rport with TCP by default.
* Added test for comp=sigcomp.
@@ -2420,7 +2420,7 @@
* Documented TP_AI_ flags.
Test our TP_AI_ assumptions.
- Added a test for asymmetric SigComp on TCP.
+ Added a test for asymmetric SigComp on TCP.
We use TP_AI_COMPRESSED flag in this test.
* Added TPTAG_FRESH() and a test for it.
@@ -2429,7 +2429,7 @@
* Use #include <stdio.h> for FILE.
- * Fixed include_sofiadir handling in pkg-config and rpm files.
+ * Fixed include_sofiadir handling in pkg-config and rpm files.
2005-12-27 Martti Mela <martti.mela at nokia.com
@@ -2559,7 +2559,7 @@
M ./libsofia-sip-ua/sip/torture_sip.c -13 +137
* Added manipulation functions for header parameters.
- msg_header_find_param(), msg_header_add_param(),
+ msg_header_find_param(), msg_header_add_param(),
msg_header_replace_param(), and msg_header_remove_param().
M ./libsofia-sip-ua/http/http_basic.c -1 +1
@@ -2659,7 +2659,7 @@
M ./libsofia-sip-ua/su/su_localinfo.c +3
M ./libsofia-sip-ua/su/su_localinfo.h -2 +3
-
+
2005-12-02 Pekka Pessi <Pekka.Pessi at nokia.com>
Again, syncing darcs and CVS.
@@ -3025,11 +3025,11 @@
* Cleaned up su_addrinfo.c. [pp]
Cleaned up comments.
- Using SU_HAVE_ flags.
+ Using SU_HAVE_ flags.
Added support for SCTP in getaddrinfo() replacement.
M ./libsofia-sip-ua/su/su_addrinfo.c -10 +38
-
+
* Declaring sockaddr_storage in su.h if it is not provided in environment.
M ./libsofia-sip-ua/su/su.h +23
@@ -3052,7 +3052,7 @@
2005-11-30 Pekka Pessi <Pekka.Pessi at nokia.com>
Syncing darcs with CVS.
-
+
* Silenced warning in su_addrinfo.c.
M ./libsofia-sip-ua/su/su_addrinfo.c -1 +2
@@ -3158,16 +3158,16 @@
M ./libsofia-sip-ua/nua/nua_stack.c -10 +18
- * Rewrote uas_check_session_content().
+ * Rewrote uas_check_session_content().
Returning empty Accept-Encoding header in 415/406 responses.
M ./libsofia-sip-ua/nua/nua_stack.c -21 +41
* Do not throttle at termination. [FIX]
-
- nea_server now sends NOTIFYs that terminate subscription even if the
+
+ nea_server now sends NOTIFYs that terminate subscription even if the
previous NOTIFY transaction has not completed yet.
-
+
This fixes the race condition in nua_terminate() (where terminating NOTIFY
was is never sent).
@@ -3203,7 +3203,7 @@
M ./RELEASE -3 +16
* Fixed installing and distributing m4 files.
- Not installing m4/sac-su2.m4.
+ Not installing m4/sac-su2.m4.
Including m4/sac-tport.m4 and m4/sac-openssl.m4 in distribution.
M ./Makefile.am -1 +2
@@ -3219,7 +3219,7 @@
M ./libsofia-sip-ua/docs/mainpage.docs -5 +7
* Updated subscriptuion authorization and nua_terminate() semantics.
- Subscription authorization now rejects SUBSCRIBE if
+ Subscription authorization now rejects SUBSCRIBE if
NUTAG_SUBSTATE(nua_substate_terminated) parameter is set.
Correct status code is relayed to application, too.
nua_terminate() now always terminates whole notifier.
@@ -3253,7 +3253,7 @@
M ./libsofia-sip-ua/docs/Doxyfile -1 +1
M ./libsofia-sip-ua/features/Doxyfile -1 +1
-
+
M ./libsofia-sip-ua/nea/Doxyfile -1 +1
* Moved typedefs nua_t and nua_handle_t into <nua_tag.h>
@@ -3409,9 +3409,9 @@
2005-11-28 Martti Mela <martti.mela at nokia.com>
* nua.h: added event nua_i_subscription
-
+
* nua_commmon.c: added event nua_i_subscription
-
+
* nua_stack.c: ua_event for nua_i_subscription (nea subscribers)
* nea.h, nea_tag.c, nea_tag_ref.c, nea_server.c: support for a new
@@ -3419,7 +3419,7 @@
2005-11-15 Kai Vehmanen <kai.vehmanen at nokia.com>
- * configure.ac: Added VER_LIBSOFIA_SIP_UA variables.
+ * configure.ac: Added VER_LIBSOFIA_SIP_UA variables.
2005-11-14 Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -3469,7 +3469,7 @@
M ./libsofia-sip-ua/soa/test_soa.c -19 +382
* Added funtions for rtp payload type management.
-
+
Added sdp_media_uses_rtp(), sdp_rtpmap_match(), sdp_rtpmap_find_matching()
and sdp_rtpmap_well_known[]. Fixed RTP timestamp rate for G722: it was 16000
but it should be 8000.
@@ -3510,8 +3510,8 @@
M ./libsofia-sip-ua/su/su_wait.h +3
* Fixed tport.c on Win32 port.
- Added a separate "connecting" phase.
- Checking EWOULDBLOCK in addition to EAGAIN.
+ Added a separate "connecting" phase.
+ Checking EWOULDBLOCK in addition to EAGAIN.
Fixed TP_AI_CLOSE and TP_AI_SHUTDOWN flags.
Improved logging.
@@ -3757,7 +3757,7 @@
* Cleaned up nta module interfaces.
Use uint32_t instead of sip_u32_t.
Removed old funtions not using reference counting with messages:
- Replaced nta_outgoing_getresponse() with nta_outgoing_getresponse_ref(),
+ Replaced nta_outgoing_getresponse() with nta_outgoing_getresponse_ref(),
and nta_outgoing_getrequest() with nta_outgoing_getrequest_ref().
Removed nta_incoming_getresponse(), nta_leg_stateful().
Removed nta_outgoing_tmcreate(): use nta_outgoing_mcreate() instead.
@@ -3795,7 +3795,7 @@
M ./libsofia-sip-ua/sip/sip_protos.h.in -1 +1
- * Cleaned up sip types.
+ * Cleaned up sip types.
Not using special typedefs sip_u32_t or sip_u16_t.
M ./libsofia-sip-ua/sip/sip.h -15 +11
@@ -3816,7 +3816,7 @@
* Removed annoying Last modified from iptsec.
2005-11-04 Pekka Pessi <Pekka.Pessi at nokia.com>
-
+
* Removed annoying Last modified from msg module.
* Removed Last modified things from sip module.
@@ -3852,7 +3852,7 @@
M ./libsofia-sip-ua/nua/test_nua.c +409
- * Added nua_unpublish().
+ * Added nua_unpublish().
Some cosmetic changes, too.
M ./libsofia-sip-ua/nua/nua.h -1 +4
@@ -3899,14 +3899,14 @@
* Moved deprecated functions to nta/nta_compat.c.
nta_msg_vsend() and msg_msg_send() should not be used anymore.
-
+
nta_msg_discard() is also deprecated, but getting rid of references to it
takes time.
M ./libsofia-sip-ua/nta/nta.c -43 +42
M ./libsofia-sip-ua/nta/nta_compat.c -1 +31
- * Plugged memory leak in nth_engine_create() in nth/nth_client.c
+ * Plugged memory leak in nth_engine_create() in nth/nth_client.c
Use su_home_new() instead of su_salloc().
M ./libsofia-sip-ua/nth/nth_client.c -3 +2
@@ -4297,7 +4297,7 @@
* Importing darcs-to-cvs-2005-10-04.
- * Using DIST_SUBDIRS when including dist-only dirs
+ * Using DIST_SUBDIRS when including dist-only dirs
M ./Makefile.am -1 +2
M ./libsofia-sip-ua/Makefile.am -1 +4
@@ -4308,7 +4308,7 @@
2005-10-03 Pekka Pessi <Pekka.Pessi at nokia.com>
* Importing darcs-to-cvs-2005-10-03.
-
+
* Removed old .def files.
R ./libsofia-sip-ua/ipt/ipt.def
@@ -4337,7 +4337,7 @@
2005-09-29 Pekka Pessi <Pekka.Pessi at nokia.com>
* Importing darcs-to-cvs-2005-09-29.
-
+
2005-09-28 Pekka Pessi <Pekka.Pessi at nokia.com>
* Added nua improvements.
@@ -4347,7 +4347,7 @@
2005-09-23 Pekka Pessi <Pekka.Pessi at nokia.com>
* darcs changes:
-
+
Fri Sep 23 18:58:29 EEST 2005 Pekka.Pessi at nokia.com
* Building msg_test class into msg_test library, use that in tport.
@@ -4460,7 +4460,7 @@
M ./libsofia-sip-ua/sip/sip_header.h +3
Mon Sep 19 20:12:33 EEST 2005 Pekka.Pessi at nokia.com
- * Updated. Added rules for ignoring SDP. corrected some
+ * Updated. Added rules for ignoring SDP. corrected some
M ./libsofia-sip-ua/soa/soa.docs -8 +18
@@ -4567,7 +4567,7 @@
* Makefile.am: Added requirement for automake-1.6.1
or newer.
- * autogen.sh: Fixed interop problem with older automake
+ * autogen.sh: Fixed interop problem with older automake
versions.
* configure.ac: Do not compile STUN if OpenSSL is not
Modified: freeswitch/trunk/libs/sofia-sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/Makefile.am Tue Dec 16 13:05:22 2008
@@ -21,12 +21,12 @@
VERSION = @VERSION@
EXTRA_DIST = AUTHORS COPYING COPYRIGHTS ChangeLog.ext-trees \
- README README.developers RELEASE TODO
+ README README.developers RELEASE TODO
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST += m4/sac-general.m4 m4/sac-coverage.m4 \
- m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
+ m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
EXTRA_DIST += docs/build_system.txt \
docs/devel_platform_notes.txt \
Modified: freeswitch/trunk/libs/sofia-sip/README
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/README (original)
+++ freeswitch/trunk/libs/sofia-sip/README Tue Dec 16 13:05:22 2008
@@ -5,12 +5,12 @@
Introduction
------------
-Sofia-SIP is an open-source SIP User-Agent library, compliant
-with the IETF RFC3261 specification. It can be used as
-a building block for SIP client software for uses such as VoIP,
-IM, and many other real-time and person-to-person communication
-services. The primary target platform for Sofia-SIP is
-GNU/Linux. Sofia-SIP is based on a SIP stack developed at
+Sofia-SIP is an open-source SIP User-Agent library, compliant
+with the IETF RFC3261 specification. It can be used as
+a building block for SIP client software for uses such as VoIP,
+IM, and many other real-time and person-to-person communication
+services. The primary target platform for Sofia-SIP is
+GNU/Linux. Sofia-SIP is based on a SIP stack developed at
the Nokia Research Center. Sofia-SIP is licensed under the LGPL.
@@ -42,9 +42,9 @@
The Sofia-SIP su submodule also provides some small utilities:
-- addrinfo (libsofia-sip-ua/su), resolve host names
+- addrinfo (libsofia-sip-ua/su), resolve host names
- localinfo (libsofia-sip-ua/su), prints information about
- local network interfaces
+ local network interfaces
References
----------
Modified: freeswitch/trunk/libs/sofia-sip/README.developers
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/README.developers (original)
+++ freeswitch/trunk/libs/sofia-sip/README.developers Tue Dec 16 13:05:22 2008
@@ -6,8 +6,8 @@
============
This file is a collection of practices and rules for Sofia-SIP
-development. If you have questions, or would like to make
-changes, raise the issue on sofia-sip-devel (see
+development. If you have questions, or would like to make
+changes, raise the issue on sofia-sip-devel (see
http://lists.sourceforge.net/lists/listinfo/sofia-sip-devel ).
@@ -15,17 +15,17 @@
==============================
AUTHORS
- List of contributors. When contributing new code, add
+ List of contributors. When contributing new code, add
yourself to AUTHORS, and also remember to update the
per source file copyright statements.
COPYRIGHTS
- List of licenses and related copyright statements. While
+ List of licenses and related copyright statements. While
majority of Sofia-SIP is licensed under LGPL, there are
- a few files with different, but LGPL compatible, licensing
+ a few files with different, but LGPL compatible, licensing
terms.
-
-README.developers
+
+README.developers
This file.
TODO
@@ -33,11 +33,11 @@
<dir>/ChangeLog files
All non-trivial changes to the source code should
- be documented in the ChangeLog files. See also the
+ be documented in the ChangeLog files. See also the
top-level ChangeLog.
-Version numbering
+Version numbering
=================
Package version
@@ -50,8 +50,8 @@
vMAJOR.MINOR.REVISION, where minor is odd
vMAJOR.MINOR.REVISION.YEAR.MONTH.DAY, where minor is odd
-For all releases, the version should be changed in configure.ac
-and committed to Darcs/CVS before making the release package. The person
+For all releases, the version should be changed in configure.ac
+and committed to Darcs/CVS before making the release package. The person
doing the release is responsible for updating the version number.
Library interface versions
@@ -64,14 +64,14 @@
The interface versions are set in top-level 'configure.ac' file.
Additionally, the SONAME version (CURRENT-AGE) is set in the
-same place. These version numbers are available for use as autoconf
-variables (see the library 'Makefile.am' files and
+same place. These version numbers are available for use as autoconf
+variables (see the library 'Makefile.am' files and
'packages/sofia-sip.spec.in').
All changes to the library versions should be marked to the
appropriate library 'ChangeLog' file. The library version should
-be changed at the same time as the first interface change is
-committed since the previous release. The interface version is
+be changed at the same time as the first interface change is
+committed since the previous release. The interface version is
frozen (should be marked to the 'ChangeLog' file) at the time
the next release is tagged (in other words, intra-release changes
need not be tracked with libtool versions).
@@ -95,7 +95,7 @@
- CVS tree (only used to track major releases) at:
http://sourceforge.net/cvs/?group_id=143636
- tags: rel-sofia-sip-x_y_z
- - stable and development releases (matches release
+ - stable and development releases (matches release
version sofia-sip-x.y.z)
- tags: snapshot_rel_YEARMMDD
- snapshot releases at
@@ -113,13 +113,13 @@
People without Darcs access
---------------------------
-Send your patches to sofia-sip-devel. Someone from the
+Send your patches to sofia-sip-devel. Someone from the
development team (see AUTHORS) will handle the patch.
People with Darcs access
------------------------
-Trivial changes can be committed without review. For non-trivial
+Trivial changes can be committed without review. For non-trivial
changes, you should first send a proposal to sofia-sip-devel and
wait for comments. There are no strict approval rules so use of
common sense is recommended. ;)
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE Tue Dec 16 13:05:22 2008
@@ -17,17 +17,17 @@
<see previous release notes at
http://sofia-sip.sourceforge.net/relnotes/ for examples ;
- - should include all changes to public headers, and
- other important information to developers;
+ - should include all changes to public headers, and
+ other important information to developers;
- and should be updated _continuously_! />
**template**: New features in API are marked with Doxytag macro @VERSION_1_XX_X.
libsofia-sip-ua:
- **template**: Added foobar() function (sofia-sip/foobar.h).
-- This release is ABI/API compatible with applications linked against
- any 1.12.x release. However, applications built against this release won't
- work against an older library. The ABI has been tested with the nua module
+- This release is ABI/API compatible with applications linked against
+ any 1.12.x release. However, applications built against this release won't
+ work against an older library. The ABI has been tested with the nua module
unit test (test_nua) built against original 1.12.0 release.
libsofia-sip-ua-glib:
@@ -41,12 +41,12 @@
<list of people who contributed to _this_ release
- update as people's patches are added, or when you commit stuff
- current development team members (see AUTHORS) may be omitted,
- or listed at the end of the contribur list (depending on the scope
+ or listed at the end of the contribur list (depending on the scope
of the work done since the last release)
- name of the contributor should be enough (email addresses in AUTHORS),
plus a _brief_ description of what was contributed
- roughly sorted by number of patches accepted
-/>
+/>
- **template**: First Surname (patch to nua/soa/msg)
@@ -59,7 +59,7 @@
- new/changed/removed functionality
- links to further documentation
- section may be omitted for minor releases
-/>
+/>
Bugs fixed in this release
--------------------------
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE.template
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE.template (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE.template Tue Dec 16 13:05:22 2008
@@ -17,17 +17,17 @@
<see previous release notes at
http://sofia-sip.sourceforge.net/relnotes/ for examples ;
- - should include all changes to public headers, and
- other important information to developers;
+ - should include all changes to public headers, and
+ other important information to developers;
- and should be updated _continuously_! />
**template**: New features in API are marked with Doxytag macro @VERSION_1_XX_X.
libsofia-sip-ua:
- **template**: Added foobar() function (sofia-sip/foobar.h).
-- This release is ABI/API compatible with applications linked against
- any 1.12.x release. However, applications built against this release won't
- work against an older library. The ABI has been tested with the nua module
+- This release is ABI/API compatible with applications linked against
+ any 1.12.x release. However, applications built against this release won't
+ work against an older library. The ABI has been tested with the nua module
unit test (test_nua) built against original 1.12.0 release.
libsofia-sip-ua-glib:
@@ -41,12 +41,12 @@
<list of people who contributed to _this_ release
- update as people's patches are added, or when you commit stuff
- current development team members (see AUTHORS) may be omitted,
- or listed at the end of the contribur list (depending on the scope
+ or listed at the end of the contribur list (depending on the scope
of the work done since the last release)
- name of the contributor should be enough (email addresses in AUTHORS),
plus a _brief_ description of what was contributed
- roughly sorted by number of patches accepted
-/>
+/>
- **template**: First Surname (patch to nua/soa/msg)
@@ -59,7 +59,7 @@
- new/changed/removed functionality
- links to further documentation
- section may be omitted for minor releases
-/>
+/>
Bugs fixed in this release
--------------------------
Modified: freeswitch/trunk/libs/sofia-sip/TODO
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/TODO (original)
+++ freeswitch/trunk/libs/sofia-sip/TODO Tue Dec 16 13:05:22 2008
@@ -8,11 +8,11 @@
---------------
1.11/1.12 series
- - first version of the new nua+soa API
+ - first version of the new nua+soa API
- nua_respond_nit() (non-INVITEs)
- nua_set_hparams()/nua_get_hparams() [DONE]
- session object ownership changes [DONE]
- - allow multiple registrations (lines) and selecting
+ - allow multiple registrations (lines) and selecting
service route, outbound proxy, and transport independently
for each handle; NUTAG_IDENTITY
- doxygen documentation updates [DONE]
Modified: freeswitch/trunk/libs/sofia-sip/autogen.sh
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/autogen.sh (original)
+++ freeswitch/trunk/libs/sofia-sip/autogen.sh Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh
set -x
AUTOMAKE=${AUTOMAKE:-automake-1.9} ACLOCAL=${ACLOCAL:-aclocal-1.9}
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Tue Dec 16 13:05:22 2008
@@ -2,7 +2,7 @@
dnl Contact: Pekka Pessi <pekka.pessi at nokia.com>
dnl Licensed under LGPL. See file COPYING.
-dnl
+dnl
dnl ref: http://www.gnu.org/software/autoconf/manual/autoconf.info.gz
dnl
AC_PREREQ(2.57)
@@ -24,7 +24,7 @@
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_AGE, [0])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_SOVER, [3]) # CUR-AGE
-
+
# dnl calls AC_CANONICAL_ macros that are required by AM_INIT_AUTOMAKE
SAC_CANONICAL_SYSTEM_CACHE_CHECK
@@ -56,7 +56,7 @@
AC_ARG_WITH(doxygen,
[ --with-doxygen[[=CMD]] use doxygen command CMD [[doxygen]]],[
-case $enable_doxygen in
+case $enable_doxygen in
yes ) doxygen=doxygen ;;
no ) doxygen=echo ;;
esac], doxygen=doxygen)
@@ -249,12 +249,12 @@
if test $ac_cv_c_z_format = yes; then
AC_DEFINE([MOD_ZD], ["%ld"], [Define printf() modifier for ssize_t])dnl
AC_DEFINE([MOD_ZU], ["%lu"], [Define printf() modifier for size_t])dnl
-else
+else
dnl Cross fingers
AC_MSG_WARN("printf cannot handle size_t, using long instead")
AC_DEFINE([MOD_ZD], ["%ld"], [Define printf() modifier for ssize_t])dnl
AC_DEFINE([MOD_ZU], ["%lu"], [Define printf() modifier for size_t])dnl
-fi
+fi
fi
@@ -327,7 +327,7 @@
libsofia-sip-ua/soa/Doxyfile
libsofia-sip-ua/soa/Makefile
libsofia-sip-ua/sresolv/Doxyfile
-libsofia-sip-ua/sresolv/Makefile
+libsofia-sip-ua/sresolv/Makefile
libsofia-sip-ua/stun/Doxyfile
libsofia-sip-ua/stun/Makefile
libsofia-sip-ua/su/Doxyfile
Modified: freeswitch/trunk/libs/sofia-sip/docs/build_system.txt
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/docs/build_system.txt (original)
+++ freeswitch/trunk/libs/sofia-sip/docs/build_system.txt Tue Dec 16 13:05:22 2008
@@ -73,8 +73,8 @@
================
Most of the code resides in the libsofia-sip-ua directory.
-The main library, libsofia-sip-ua.so, is created by
-collecting object files (for example bnf/bnf_objs.o) from
+The main library, libsofia-sip-ua.so, is created by
+collecting object files (for example bnf/bnf_objs.o) from
individual modules.
There are some portability issues with the way the
@@ -89,13 +89,13 @@
Developer documentation
=======================
-Generating reference documentation from source code
+Generating reference documentation from source code
---------------------------------------------------
The libsofia-sip-ua library has a top-level make target
"doxygen" for generating the HTML reference documentation.
-The pages will be created to libsofia-sip-ua/docs
-subdirectory.
+The pages will be created to libsofia-sip-ua/docs
+subdirectory.
This special target is primarily meant for use by
the Sofia-SIP website admins, but can be used by anyone
Modified: freeswitch/trunk/libs/sofia-sip/docs/devel_platform_notes.txt
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/docs/devel_platform_notes.txt (original)
+++ freeswitch/trunk/libs/sofia-sip/docs/devel_platform_notes.txt Tue Dec 16 13:05:22 2008
@@ -14,16 +14,16 @@
Notes to distributors
----------------------
-Build options such as "--disable-stun" (HAVE_SOFIA_STUN) and
+Build options such as "--disable-stun" (HAVE_SOFIA_STUN) and
"--disable-nth" (HAVE_SOFIA_NTH) modify the public library API/ABI,
by omitting certain interfaces from the resulting library and installed
header files.
Options such as '--disable-size-compat' modify the library
-ABI by changing the types used in public library function
+ABI by changing the types used in public library function
signatures.
-Generic POSIX (GNU/Linux, BSD, ...)
+Generic POSIX (GNU/Linux, BSD, ...)
-----------------------------------
Sofia-SIP should compile out-of-the-box on generic POSIX
@@ -35,17 +35,17 @@
for the full list.
-Mac OS X
+Mac OS X
--------
TBD
-Win32 / Mingw
+Win32 / Mingw
-------------
-TBD
+TBD
-Win32 / Cygwin
+Win32 / Cygwin
--------------
TBD
Modified: freeswitch/trunk/libs/sofia-sip/docs/release_management.txt
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/docs/release_management.txt (original)
+++ freeswitch/trunk/libs/sofia-sip/docs/release_management.txt Tue Dec 16 13:05:22 2008
@@ -27,8 +27,8 @@
- maintained in sofia-sip/RELEASE
- see diff between cvs/darcs between previous and
this version
- - written in freshmeat.net "Changes:" style
-- notes on API/ABI interface changes
+ - written in freshmeat.net "Changes:" style
+- notes on API/ABI interface changes
- maintained in sofia-sip/RELEASE
- all changes in public interfaces, plus other
notes that developers should be aware of
@@ -41,7 +41,7 @@
See the RELEASE.template file for a full list of release note
sections.
-Making the release tarball
+Making the release tarball
==========================
- basics: check system clock of the build host ;)
@@ -71,15 +71,15 @@
- combine the sofia-sip/RELEASE contents with
the template found from sfnet_www/templates/relnotes.txt
-- store the resulting release notes to
+- store the resulting release notes to
sfnet_www/relnotes/relnotes-sofia-sip-x.y.z.txt
-- add explicit link to the release notes to
+- add explicit link to the release notes to
sfnet_www/download.html (three most recent releases,
see guidelines in the html comments)
- update sfnet_www/index.html to mention the latest
release
-- commit the change to sf.net website CVS, and run the
- sfnet_www/put_online.sh script
+- commit the change to sf.net website CVS, and run the
+ sfnet_www/put_online.sh script
Uploading the release to sourceforge.net
========================================
@@ -104,8 +104,8 @@
- replace the RELEASE file with RELEASE.template, and
commit it to master source repository (see sofia-sip/README.developers)
-- change version in configure.ac from "X.Y.Z" to
- "X.Y.Zdevel" (as it is in many cases unknown what the
+- change version in configure.ac from "X.Y.Z" to
+ "X.Y.Zdevel" (as it is in many cases unknown what the
next version will be)
- make a "tree open for development" commit
@@ -122,15 +122,15 @@
- Always tag the src-tree with "syncuser-fromvcs-to-tovcs-yearmmdd".
-- Add a top-level ChangeLog entry that documents all the
+- Add a top-level ChangeLog entry that documents all the
changes made outside the target tree (what, who and when -
- for example produced with the "darcs changes --summary"
+ for example produced with the "darcs changes --summary"
command).
Checking API/ABI compatibility
==============================
-- Use a unit test binary built against an old library,
+- Use a unit test binary built against an old library,
to verify a new library version (forwards-compatibility).
- Use the 'icheck' tool (in Debian) to make comparison
between two released versions.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am Tue Dec 16 13:05:22 2008
@@ -17,7 +17,7 @@
lib_LTLIBRARIES += libsofia-sip-ua-glib.la
endif
-libsofia_sip_ua_glib_la_SOURCES =
+libsofia_sip_ua_glib_la_SOURCES =
libsofia_sip_ua_glib_la_LIBADD = $(GLIB_TARGETS) $(GLIB_LIBS)
# set the libtool version info version:revision:age for libsofia-sip-ua-glib
@@ -42,7 +42,7 @@
done
${top_srcdir}/scripts/hide_emails.sh docs/html
-PHONY = doxygen
+PHONY = doxygen
include $(top_srcdir)/rules/recursive.am
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_glib.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_glib.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_glib.h Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
/**
* @file su_glib.h
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
* @author Kai Vehmanen <first.surname at nokia.com>
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_source.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_source.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/sofia-sip/su_source.h Tue Dec 16 13:05:22 2008
@@ -27,16 +27,16 @@
/**
* @file su_source.h
- * @brief
+ * @brief
*
- * NOTE: This file (su_source.h) is DEPRECATED as of 1.12.2 release.
+ * NOTE: This file (su_source.h) is DEPRECATED as of 1.12.2 release.
* Please use su_glib.h instead.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
* @author Kai Vehmanen <first.surname at nokia.com>
- *
+ *
* @date Created: Thu Mar 4 19:58:50 2004 ppessi
- *
+ *
*/
#ifndef SU_WAIT_H
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_glib.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_glib.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_glib.docs Tue Dec 16 13:05:22 2008
@@ -4,7 +4,7 @@
@section su_glib_meta Module Meta Information
-The su-glib module provides an interface to connect Sofia-SIP event loop
+The su-glib module provides an interface to connect Sofia-SIP event loop
to an existing glib main loop. Without this interface, a glib based
application would have to create a separate thread for running
the Sofia-SIP event loop.
@@ -29,14 +29,14 @@
#include <sofia-sip/su_glib.h>
/* ... */
-
+
GMainLoop *ptr = g_main_loop_new(NULL, FALSE);
GSource *gsource;
su_root_t *sofia_event_loop;
su_timer_t *timer;
/* create a sofia event loop using su-glib function su_glib_root_source_create() */
- sofia_event_loop = su_glib_root_create(NULL);
+ sofia_event_loop = su_glib_root_create(NULL);
/* attach the created GSource to glib event loop */
gsource = su_glib_root_gsource(sofia_event_loop);
@@ -48,12 +48,12 @@
/* ... initialize other Sofia-SIP modules/functrions */
/* run the glib mainloop */
- g_main_loop_run(ptr);
- at endcode
+ g_main_loop_run(ptr);
+ at endcode
@section su_glib_todo Todo
-- see sourceforge.net issue tracker for sofia-sip
+- see sourceforge.net issue tracker for sofia-sip
(-> http://sofia-sip.sourceforge.net/development.html )
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source.c Tue Dec 16 13:05:22 2008
@@ -25,15 +25,15 @@
/**
* @file su_source.c
* @brief Wrapper for glib GSource.
- *
- * Refs:
+ *
+ * Refs:
* - http://sofia-sip.sourceforge.net/refdocs/su/group__su__wait.html
* - http://developer.gnome.org/doc/API/glib/glib-the-main-event-loop.html
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>.
- *
+ *
* @date Created: Thu Mar 4 15:15:15 2004 ppessi
- *
+ *
*/
#include "config.h"
@@ -100,28 +100,28 @@
static int su_source_send(su_port_t *self, su_msg_r rmsg);
static int su_source_register(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
+ su_root_t *root,
+ su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg,
int priority);
static int su_source_unregister(su_port_t *port,
- su_root_t *root,
- su_wait_t *wait,
- su_wakeup_f callback,
+ su_root_t *root,
+ su_wait_t *wait,
+ su_wakeup_f callback,
su_wakeup_arg_t *arg);
static int su_source_deregister(su_port_t *self, int i);
static int su_source_unregister_all(su_port_t *self,
su_root_t *root);
-static int su_source_eventmask(su_port_t *self,
+static int su_source_eventmask(su_port_t *self,
int index, int socket, int events);
static void su_source_run(su_port_t *self);
static void su_source_break(su_port_t *self);
static su_duration_t su_source_step(su_port_t *self, su_duration_t tout);
static int su_source_thread(su_port_t *self, enum su_port_thread_op op);
static int su_source_add_prepoll(su_port_t *port,
- su_root_t *root,
- su_prepoll_f *,
+ su_root_t *root,
+ su_prepoll_f *,
su_prepoll_magic_t *);
static int su_source_remove_prepoll(su_port_t *port,
su_root_t *root);
@@ -129,7 +129,7 @@
static char const *su_source_name(su_port_t const *self);
-static
+static
su_port_vtable_t const su_source_port_vtable[1] =
{{
/* su_vtable_size: */ sizeof su_source_port_vtable,
@@ -169,14 +169,14 @@
return "GSource";
}
-/**
- * Port is a per-thread reactor.
+/**
+ * Port is a per-thread reactor.
*
- * Multiple root objects executed by single thread share a su_port_t object.
+ * Multiple root objects executed by single thread share a su_port_t object.
*/
struct su_source_s {
su_base_port_t sup_base[1];
-
+
GThread *sup_tid;
GStaticMutex sup_obtained[1];
@@ -184,20 +184,20 @@
GSource *sup_source; /**< Backpointer to source */
GMainLoop *sup_main_loop; /**< Reference to mainloop while running */
-
+
/* Waits */
- unsigned sup_registers; /** Counter incremented by
- su_port_register() or
+ unsigned sup_registers; /** Counter incremented by
+ su_port_register() or
su_port_unregister()
*/
- unsigned sup_n_waits;
- unsigned sup_size_waits;
+ unsigned sup_n_waits;
+ unsigned sup_size_waits;
unsigned sup_max_index;
- unsigned *sup_indices;
- su_wait_t *sup_waits;
- su_wakeup_f *sup_wait_cbs;
- su_wakeup_arg_t**sup_wait_args;
- su_root_t **sup_wait_roots;
+ unsigned *sup_indices;
+ su_wait_t *sup_waits;
+ su_wakeup_f *sup_wait_cbs;
+ su_wakeup_arg_t**sup_wait_args;
+ su_root_t **sup_wait_roots;
};
typedef struct _SuSource
@@ -243,13 +243,13 @@
return su_glib_root_create(magic);
}
-/**
- * Returns a GSource object for the root
+/**
+ * Returns a GSource object for the root
*
- * Note that you need to unref the GSource with g_source_unref()
+ * Note that you need to unref the GSource with g_source_unref()
* before destroying the root object.
*
- * @return NULL on error (for instance if root was not created with
+ * @return NULL on error (for instance if root was not created with
* su_glib_root_create())
*/
GSource *su_glib_root_gsource(su_root_t *root)
@@ -299,7 +299,7 @@
/** @internal Destroy a port. */
-static
+static
void su_source_finalize(GSource *gs)
{
SuSource *ss = (SuSource *)gs;
@@ -315,7 +315,7 @@
g_static_mutex_lock(self->sup_mutex);
- PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...",
+ PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...",
(void *)g_thread_self(), who, self));
}
@@ -323,7 +323,7 @@
{
g_static_mutex_unlock(self->sup_mutex);
- PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n",
+ PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n",
(void *)g_thread_self(), who, self));
}
@@ -351,7 +351,7 @@
* Change or query ownership of the port object.
*
* @param self pointer to a port object
- * @param op operation
+ * @param op operation
*
* @ERRORS
* @ERROR EALREADY port already has an owner (or has no owner)
@@ -392,7 +392,7 @@
/* -- Registering and unregistering ------------------------------------- */
/* Seconds from 1.1.1900 to 1.1.1970 */
-#define NTP_EPOCH 2208988800UL
+#define NTP_EPOCH 2208988800UL
/** Prepare to wait - calculate time to next timer */
static
@@ -402,7 +402,7 @@
su_port_t *self = ss->ss_port;
enter;
-
+
if (self->sup_base->sup_head) {
*return_tout = 0;
return TRUE;
@@ -450,7 +450,7 @@
return su_source_prepare(gs, &tout);
}
-static
+static
gboolean su_source_dispatch(GSource *gs,
GSourceFunc callback,
gpointer user_data)
@@ -489,8 +489,8 @@
for (i = 0; i < n; i++) {
if (waits[i].revents) {
root = self->sup_wait_roots[i];
- self->sup_wait_cbs[i](root ? su_root_magic(root) : NULL,
- &waits[i],
+ self->sup_wait_cbs[i](root ? su_root_magic(root) : NULL,
+ &waits[i],
self->sup_wait_args[i]);
/* Callback used su_register()/su_unregister() */
if (version != self->sup_registers)
@@ -512,7 +512,7 @@
(void *)g_thread_self(), who, self));
g_static_mutex_lock(self->sup_mutex);
- PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...",
+ PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...",
(void *)g_thread_self(), who, self));
}
@@ -520,7 +520,7 @@
{
g_static_mutex_unlock(self->sup_mutex);
- PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n",
+ PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n",
(void *)g_thread_self(), who, self));
}
@@ -548,21 +548,21 @@
*
* Please note if identical wait objects are inserted, only first one is
* ever signalled.
- *
+ *
* @param self pointer to port
* @param root pointer to root object
* @param waits pointer to wait object
* @param callback callback function pointer
* @param arg argument given to callback function when it is invoked
- * @param priority relative priority of the wait object
+ * @param priority relative priority of the wait object
* (0 is normal, 1 important, 2 realtime)
- *
+ *
* @return
- * The function @su_source_register returns nonzero index of the wait object,
+ * The function @su_source_register returns nonzero index of the wait object,
* or -1 upon an error. */
int su_source_register(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
+ su_root_t *root,
+ su_wait_t *wait,
su_wakeup_f callback,
su_wakeup_arg_t *arg,
int priority)
@@ -571,7 +571,7 @@
unsigned n;
enter;
-
+
assert(SU_SOURCE_OWN_THREAD(self));
n = self->sup_n_waits;
@@ -587,7 +587,7 @@
if (self->sup_size_waits == 0)
size = SU_WAIT_MIN;
- else
+ else
size = 2 * self->sup_size_waits;
indices = realloc(self->sup_indices, size * sizeof(*indices));
@@ -600,14 +600,14 @@
for (i = 0; i < self->sup_n_waits; i++)
g_source_remove_poll(self->sup_source, (GPollFD*)&self->sup_waits[i]);
-
+
waits = realloc(self->sup_waits, size * sizeof(*waits));
if (waits)
self->sup_waits = waits;
for (i = 0; i < self->sup_n_waits; i++)
g_source_add_poll(self->sup_source, (GPollFD*)&waits[i]);
-
+
wait_cbs = realloc(self->sup_wait_cbs, size * sizeof(*wait_cbs));
if (wait_cbs)
self->sup_wait_cbs = wait_cbs;
@@ -618,7 +618,7 @@
/* Add sup_wait_roots array, if needed */
wait_tasks = realloc(self->sup_wait_roots, size * sizeof(*wait_tasks));
- if (wait_tasks)
+ if (wait_tasks)
self->sup_wait_roots = wait_tasks;
if (!(indices && waits && wait_cbs && wait_args && wait_tasks)) {
@@ -638,7 +638,7 @@
g_source_add_poll(self->sup_source, (GPollFD*)&self->sup_waits[n]);
self->sup_wait_cbs[n] = self->sup_wait_cbs[n-1];
self->sup_wait_args[n] = self->sup_wait_args[n-1];
- self->sup_wait_roots[n] = self->sup_wait_roots[n-1];
+ self->sup_wait_roots[n] = self->sup_wait_roots[n-1];
}
}
else {
@@ -653,13 +653,13 @@
I = self->sup_max_index;
- for (i = 0; i < I; i++)
+ for (i = 0; i < I; i++)
if (self->sup_indices[i] == UINT_MAX)
break;
else if (self->sup_indices[i] >= n)
self->sup_indices[i]++;
- if (i == I)
+ if (i == I)
self->sup_max_index++;
if (n + 1 < self->sup_n_waits)
@@ -676,23 +676,23 @@
}
/** Unregister a su_wait_t object.
- *
+ *
* The function su_source_unregister() unregisters a su_wait_t object. The
* wait object, a callback function and a argument are removed from the
* port object.
- *
+ *
* @param self - pointer to port object
* @param root - pointer to root object
* @param wait - pointer to wait object
* @param callback - callback function pointer (may be NULL)
- * @param arg - argument given to callback function when it is invoked
+ * @param arg - argument given to callback function when it is invoked
* (may be NULL)
- *
+ *
* @return Nonzero index of the wait object, or -1 upon an error.
*/
int su_source_unregister(su_port_t *self,
- su_root_t *root,
- su_wait_t *wait,
+ su_root_t *root,
+ su_wait_t *wait,
su_wakeup_f callback, /* XXX - ignored */
su_wakeup_arg_t *arg)
{
@@ -700,7 +700,7 @@
unsigned i, I, j, *indices;
enter;
-
+
assert(self);
assert(SU_SOURCE_OWN_THREAD(self));
@@ -733,14 +733,14 @@
if (self->sup_indices[j] != UINT_MAX &&
self->sup_indices[j] > n)
self->sup_indices[j]--;
-
+
for (; n < N; n++) {
g_source_remove_poll(self->sup_source, (GPollFD*)&self->sup_waits[n+1]);
self->sup_waits[n] = self->sup_waits[n+1];
g_source_add_poll(self->sup_source, (GPollFD*)&self->sup_waits[n]);
self->sup_wait_cbs[n] = self->sup_wait_cbs[n+1];
self->sup_wait_args[n] = self->sup_wait_args[n+1];
- self->sup_wait_roots[n] = self->sup_wait_roots[n+1];
+ self->sup_wait_roots[n] = self->sup_wait_roots[n+1];
}
i += 1; /* 0 is failure */
@@ -757,14 +757,14 @@
}
/** Deregister a su_wait_t object.
- *
- * The function su_source_deregister() deregisters a su_wait_t registrattion.
+ *
+ * The function su_source_deregister() deregisters a su_wait_t registrattion.
* The wait object, a callback function and a argument are removed from the
* port object.
- *
+ *
* @param self - pointer to port object
* @param i - registration index
- *
+ *
* @return Index of the wait object, or -1 upon an error.
*/
int su_source_deregister(su_port_t *self, int i)
@@ -774,7 +774,7 @@
su_wait_t wait[1];
enter;
-
+
assert(self);
assert(SU_SOURCE_OWN_THREAD(self));
@@ -810,7 +810,7 @@
g_source_add_poll(self->sup_source, (GPollFD*)&self->sup_waits[n]);
self->sup_wait_cbs[n] = self->sup_wait_cbs[n+1];
self->sup_wait_args[n] = self->sup_wait_args[n+1];
- self->sup_wait_roots[n] = self->sup_wait_roots[n+1];
+ self->sup_wait_roots[n] = self->sup_wait_roots[n+1];
}
indices[i - 1] = UINT_MAX;
@@ -830,13 +830,13 @@
*
* The function su_source_unregister_all() unregisters all su_wait_t objects
* associated with given root object destroys all queued timers.
- *
+ *
* @param self - pointer to port object
* @param root - pointer to root object
- *
+ *
* @return Number of wait objects removed.
*/
-int su_source_unregister_all(su_port_t *self,
+int su_source_unregister_all(su_port_t *self,
su_root_t *root)
{
unsigned i, j;
@@ -847,15 +847,15 @@
su_root_t **wait_roots;
enter;
-
+
assert(SU_SOURCE_OWN_THREAD(self));
n_waits = self->sup_n_waits;
- waits = self->sup_waits;
- wait_cbs = self->sup_wait_cbs;
+ waits = self->sup_waits;
+ wait_cbs = self->sup_wait_cbs;
wait_args = self->sup_wait_args;
- wait_roots = self->sup_wait_roots;
-
+ wait_roots = self->sup_wait_roots;
+
for (i = j = 0; (unsigned)i < n_waits; i++) {
if (wait_roots[i] == root) {
/* XXX - we should free all resources associated with this */
@@ -872,7 +872,7 @@
}
j++;
}
-
+
self->sup_n_waits = j;
self->sup_registers++;
@@ -898,7 +898,7 @@
int retval;
enter;
-
+
assert(self);
assert(SU_SOURCE_OWN_THREAD(self));
assert(0 < index && (unsigned)index <= self->sup_max_index);
@@ -927,18 +927,18 @@
return 1;
else if (multishot == 0 || multishot == 1)
return 1; /* Always enabled */
- else
+ else
return (errno = EINVAL), -1;
}
/** @internal Main loop.
- *
+ *
* The function @c su_source_run() runs the main loop
- *
+ *
* The function @c su_source_run() runs until @c su_source_break() is called
* from a callback.
- *
+ *
* @param self pointer to root object
* */
void su_source_run(su_port_t *self)
@@ -947,7 +947,7 @@
GMainLoop *gml;
enter;
-
+
gmc = g_source_get_context(self->sup_source);
if (gmc && g_main_context_acquire(gmc)) {
gml = g_main_loop_new(gmc, TRUE);
@@ -962,30 +962,30 @@
/** @internal
* The function @c su_source_break() is used to terminate execution of @c
* su_source_run(). It can be called from a callback function.
- *
+ *
* @param self pointer to port
- *
+ *
*/
void su_source_break(su_port_t *self)
{
enter;
-
+
if (self->sup_main_loop)
g_main_loop_quit(self->sup_main_loop);
}
/** @internal Block until wait object is signaled or timeout.
*
- * This function waits for wait objects and the timers associated with
+ * This function waits for wait objects and the timers associated with
* the root object. When any wait object is signaled or timer is
- * expired, it invokes the callbacks.
- *
+ * expired, it invokes the callbacks.
+ *
* This function returns when a callback has been invoked or @c tout
- * milliseconds is elapsed.
+ * milliseconds is elapsed.
*
* @param self pointer to port
* @param tout timeout in milliseconds
- *
+ *
* @Return
* Milliseconds to the next invocation of timer, or @c SU_WAIT_FOREVER if
* there are no active timers.
@@ -995,7 +995,7 @@
GMainContext *gmc;
enter;
-
+
gmc = g_source_get_context(self->sup_source);
if (gmc && g_main_context_acquire(gmc)) {
@@ -1030,8 +1030,8 @@
}
static int su_source_add_prepoll(su_port_t *port,
- su_root_t *root,
- su_prepoll_f *prepoll,
+ su_root_t *root,
+ su_prepoll_f *prepoll,
su_prepoll_magic_t *magic)
{
/* We could call prepoll in su_source_prepare()?? */
@@ -1066,7 +1066,7 @@
fprintf(f, "\tport tid %p\n", (void *)self->sup_tid);
fprintf(f, "\t%d wait objects\n", self->sup_n_waits);
for (i = 0; i < self->sup_n_waits; i++) {
-
+
}
}
@@ -1078,7 +1078,7 @@
*
* @return
* If successful a pointer to the new message port is returned, otherwise
- * NULL is returned.
+ * NULL is returned.
*/
static su_port_t *su_source_port_create(void)
{
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source_test.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source_test.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/su_source_test.c Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
* @brief Test program for glib and su root event loop integration.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Mar 18 19:40:51 1999 pessi
*/
@@ -74,7 +74,7 @@
short opt_singlethread = 0;
GMainLoop *global_gmainloop = NULL;
-static su_socket_t udpsocket(void)
+static su_socket_t udpsocket(void)
{
su_socket_t s;
su_sockaddr_t su = { 0 };
@@ -98,7 +98,7 @@
if (getsockname(s, &su.su_sa, &sulen) == SOCKET_ERROR) {
su_perror("udpsocket: getsockname");
- exit(1);
+ exit(1);
}
if (opt_verbatim)
@@ -118,7 +118,7 @@
return buf;
}
-void
+void
do_ping(struct pinger *p, su_timer_t *t, void *p0)
{
char buf[1024];
@@ -129,7 +129,7 @@
p->when = su_now();
snprintf(buf, sizeof(buf), "Ping %d at %s", p->id++, snow(p->when));
- if (sendto(p->s, buf, strlen(buf), 0,
+ if (sendto(p->s, buf, strlen(buf), 0,
&p->addr.su_sa, su_sockaddr_size(&p->addr)) == -1) {
su_perror("do_ping: send");
}
@@ -189,7 +189,7 @@
p->id = 0;
snprintf(buf, sizeof(buf), "Pong at %s", snow(su_now()));
- if (sendto(p->s, buf, strlen(buf), 0,
+ if (sendto(p->s, buf, strlen(buf), 0,
&p->addr.su_sa, su_sockaddr_size(&p->addr)) == -1) {
su_perror("do_pong: send");
}
@@ -412,7 +412,7 @@
/*
* test su_wait functionality:
*
- * Create a ponger, waking up do_recv() when data arrives,
+ * Create a ponger, waking up do_recv() when data arrives,
* then scheduling do_pong() by timer
*
* Create a pinger, executed from timer, scheduling do_ping(),
@@ -428,8 +428,8 @@
su_timer_t *t;
unsigned long sleeppid = 0;
- struct pinger
- pinger = { PINGER, "ping", 1 },
+ struct pinger
+ pinger = { PINGER, "ping", 1 },
ponger = { PONGER, "pong", 1 };
char *argv0 = argv[0];
@@ -437,7 +437,7 @@
#if HAVE_OPEN_C
dup2(1, 2);
#endif
-
+
while (argv[1]) {
if (strcmp(argv[1], "-v") == 0) {
opt_verbatim = 1;
@@ -465,9 +465,9 @@
#if HAVE_OPEN_C
opt_verbatim = 1;
opt_singlethread = 1;
- su_log_soft_set_level(su_log_default, 9);
+ su_log_soft_set_level(su_log_default, 9);
#endif
-
+
#if HAVE_SIGNAL
signal(SIGTERM, term);
#endif
@@ -478,20 +478,20 @@
global_gmainloop = g_main_loop_new(NULL, FALSE);
g_assert(global_gmainloop);
-
- root = su_glib_root_create(NULL);
+
+ root = su_glib_root_create(NULL);
if (!root) perror("su_root_glib_create"), exit(1);
-
- if (!g_source_attach(su_glib_root_gsource(root), g_main_loop_get_context(global_gmainloop)))
+
+ if (!g_source_attach(su_glib_root_gsource(root), g_main_loop_get_context(global_gmainloop)))
perror("g_source_attach"), exit(1);
-
+
su_root_threading(root, 0 && !opt_singlethread);
if (su_clone_start(root, ping, &pinger, do_init, do_destroy) != 0)
perror("su_clone_start"), exit(1);
if (su_clone_start(root, pong, &ponger, do_init, do_destroy) != 0)
- perror("su_clone_start"), exit(1);
+ perror("su_clone_start"), exit(1);
/* Test timer, exiting after 200 milliseconds */
t = su_timer_create(su_root_task(root), 200L);
@@ -499,7 +499,7 @@
su_perror("su_timer_create"), exit(1);
su_timer_set(t, (su_timer_f)do_exit, NULL);
- su_msg_create(start_msg, su_clone_task(ping), su_clone_task(pong),
+ su_msg_create(start_msg, su_clone_task(ping), su_clone_task(pong),
init_ping, 0);
su_msg_send(start_msg);
@@ -511,7 +511,7 @@
su_timer_destroy(t);
if (pinger.rtt_n) {
- printf("%s executed %u pings in %g, mean rtt=%g sec\n", name,
+ printf("%s executed %u pings in %g, mean rtt=%g sec\n", name,
pinger.rtt_n, pinger.rtt_total, pinger.rtt_total / pinger.rtt_n);
}
su_root_destroy(root);
@@ -519,7 +519,7 @@
g_main_loop_unref(global_gmainloop), global_gmainloop = NULL;
if (opt_verbatim)
- printf("%s exiting\n", argv0);
+ printf("%s exiting\n", argv0);
#ifndef HAVE_WIN32
#if HAVE_SIGNAL
@@ -531,6 +531,6 @@
#if HAVE_OPEN_C
sleep(7);
#endif
-
+
return 0;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/torture_su_glib_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/torture_su_glib_timer.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/su-glib/torture_su_glib_timer.c Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
*/
/**
- * @brief Test program for su-glib timers
+ * @brief Test program for su-glib timers
*
* Based on torture_su_timer.c of libsofia-sip-ua.
*
@@ -186,7 +186,7 @@
su_init(); atexit(su_deinit);
tester->root = root = su_glib_root_create(tester);
-
+
source = su_root_gsource(tester->root);
g_source_attach(source, NULL /*g_main_context_default ()*/);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ChangeLog Tue Dec 16 13:05:22 2008
@@ -9,7 +9,7 @@
2006-10-12 Kai Vehmanen <kai.vehmanen at nokia.com>
* libsofia-sip-ua interface v3 frozen (3:0:3) for the 1.12.3 release
-
+
2006-09-26 Kai Vehmanen <kai.vehmanen at nokia.com>
* libsofia-sip-ua interface v2 frozen (2:0:2) for the 1.12.2 release
@@ -27,9 +27,9 @@
* Added urltag_scan().
2006-08-23 Pekka Pessi <Pekka.Pessi at nokia.com>
-
+
* nta.c, nta.h: added nta_leg_make_replaces(), nta_leg_by_replaces().
-
+
* nua: event watcher (nua_subscribe, nua_watcher) now tries to re-establish
subscription if the subscription was terminated with reason "deactivated" or
"probation". Likewise, if SUBSCRIBE was returned a suitable error response
@@ -49,13 +49,13 @@
* <SUBDIRS>/Doxyfile: Fixed the use of doxytags. Now
a separate 'doxytags_MODNAME' file is created for each
module.
-
+
2005-11-15 Kai Vehmanen <kai.vehmanen at nokia.com>
- * <SUBDIRS>/Makefile.am: Changed to use the 'include_sofia_HEADERS'
+ * <SUBDIRS>/Makefile.am: Changed to use the 'include_sofia_HEADERS'
variable for listing public library headers. The variable
is defined in the top-level configure.ac.
-
+
2005-10-27 Pekka Pessi <Pekka.Pessi at nokia.com>
* Always including stun library.
@@ -84,7 +84,7 @@
2005-10-14 Pekka Pessi <Pekka.Pessi at nokia.com>
- * Shell syntax exercise.
+ * Shell syntax exercise.
M ./autogen.sh -4 +4
@@ -94,7 +94,7 @@
2005-10-13 Kai Vehmanen <kai.vehmanen at nokia.com>
- * <SUBDIRS>/Makefile.am: Build all submodules as proper shared
+ * <SUBDIRS>/Makefile.am: Build all submodules as proper shared
libraries (noinst_LTLIBRARIES). Fixes sf.net:#1264030.
2005-09-09 Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -179,7 +179,7 @@
M ./iptsec/auth_module.c -5 +5
Thu Sep 8 21:10:23 EEST 2005 Pekka.Pessi at nokia.com
- * Added auth_digest_credentials().
+ * Added auth_digest_credentials().
Use opaque to match Authorization header.
M ./iptsec/auth_digest_test.c -2 +3
@@ -319,7 +319,7 @@
M ./url/url.c -1 +6
Thu Sep 8 18:01:17 EEST 2005 Pekka.Pessi at nokia.com
- * Explicitly using <errno.h>
+ * Explicitly using <errno.h>
M ./msg/msg.c +2
M ./msg/msg_mclass.c +1
@@ -369,10 +369,10 @@
Thu Sep 8 03:11:35 EEST 2005 Pekka.Pessi at nokia.com
* su_home_new and su_home_unref
- Added su_home_new() and su_home_unref().
-
+ Added su_home_new() and su_home_unref().
+
Fixed su_home_mutex_lock() and su_home_mutex_unlock().
-
+
Slightly changed semantics of su_home_clone() versus
su_home_threadsafe().
@@ -386,7 +386,7 @@
Thu Sep 8 03:07:17 EEST 2005 Pekka.Pessi at nokia.com
* More liberal sdp parsing for config files.
- Be more liberal when parsing config files
+ Be more liberal when parsing config files
(do not require v=, accept -1 as len argument).
M ./sdp/sdp_parse.c -9 +25
@@ -403,7 +403,7 @@
M ./sdp/sdp.h +2
M ./sdp/sdp_parse.c +10
-
+
2005-09-08 Kai Vehmanen <kai.vehmanen at nokia.com>
* Makefile.am: Workaround for automake bug related to adding
@@ -416,7 +416,7 @@
2005-08-17 Pekka Pessi <Pekka.Pessi at nokia.com>
- * Fixed BEGIN()/END() pairs in test programs.
+ * Fixed BEGIN()/END() pairs in test programs.
2005-08-04 Pekka Pessi <Pekka.Pessi at nokia.com>
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/Makefile.am Tue Dec 16 13:05:22 2008
@@ -16,13 +16,13 @@
OPT_SUBDIRS_HTTP =
OPT_SUBDIRS_NTH =
if HAVE_STUN
-OPT_LIBADD += stun/libstun.la
+OPT_LIBADD += stun/libstun.la
OPT_SUBDIRS_STUN += stun
endif
if HAVE_NTH
-OPT_LIBADD += http/libhttp.la nth/libnth.la
+OPT_LIBADD += http/libhttp.la nth/libnth.la
OPT_SUBDIRS_HTTP += http
-OPT_SUBDIRS_NTH += nth
+OPT_SUBDIRS_NTH += nth
endif
# note: order does matter in the subdir list
@@ -37,7 +37,7 @@
noinst_LTLIBRARIES = libsofia-sip-ua.la
-libsofia_sip_ua_la_SOURCES =
+libsofia_sip_ua_la_SOURCES =
libsofia_sip_ua_la_LIBADD = bnf/libbnf.la \
features/libfeatures.la \
ipt/libipt.la \
@@ -90,7 +90,7 @@
sed '2,10s!<name>index</name>!<name>'$$d'_index</name>!' \
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
- done
+ done
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile \
&& pushd $$d > /dev/null \
@@ -102,7 +102,7 @@
sed '2,10s!<name>index</name>!<name>'$$d'_index</name>!' \
docs/$$d.doxytags > docs/$$d.doxytags.tmp && \
mv -f docs/$$d.doxytags.tmp docs/$$d.doxytags ; \
- done
+ done
${top_srcdir}/scripts/hide_emails.sh docs/html
if HAVE_LCOV
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.c Tue Dec 16 13:05:22 2008
@@ -96,10 +96,10 @@
/** Span of a token */
size_t bnf_span_token4(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & bnf_token)
- e++;
- return e - s;
+ e++;
+ return e - s;
}
char * bnf_span_token_end(char const *s)
@@ -192,9 +192,9 @@
/** Return length of valid IP4 address.
*
- * Note that we accept here up to two leading zeroes
+ * Note that we accept here up to two leading zeroes
* which makes "dotted decimal" notation ambiguous:
- * 127.000.000.001 is interpreted same as 127.0.0.1
+ * 127.000.000.001 is interpreted same as 127.0.0.1
*
* Note that traditionally IP address octets starting
* with zero have been interpreted as octal:
@@ -711,7 +711,7 @@
/** Return true if @a string is valid IP6 address in hex notation.
*
- * E.g., fe80::1 is a valid IP6 address.
+ * E.g., fe80::1 is a valid IP6 address.
*/
int host_is_ip6_address(char const *string)
{
@@ -724,7 +724,7 @@
return host_is_ip6_reference(string);
}
-/** Return true if @a string is valid IP6 reference,
+/** Return true if @a string is valid IP6 reference,
* i.e. hex notation in square brackets.
*
* E.g., [::1] is a valid IP6 reference.
@@ -737,7 +737,7 @@
/** Return true if @a string is valid IP address.
*
- * Valid IP address is either a IP4 adddress in quad-octet notation,
+ * Valid IP address is either a IP4 adddress in quad-octet notation,
* IP6 hex address or IP6 reference in square brackets ([]).
*/
int host_is_ip_address(char const *string)
@@ -748,7 +748,7 @@
/** Return true if @a string is valid a domain name.
*
- * Valid domain name consists of alphanumeric labels separated with
+ * Valid domain name consists of alphanumeric labels separated with
* dot ("."). There can be a "-" in the middle of label.
* The last label must start with a letter.
*
@@ -777,8 +777,8 @@
/** Returns true if @a string is describing a local address.
*
- * Uses the definitions of local addresses found in RFC1700 and
- * RFC4291.
+ * Uses the definitions of local addresses found in RFC1700 and
+ * RFC4291.
*/
int host_is_local(char const *host)
{
@@ -793,10 +793,10 @@
n = span_domain(host);
- return
+ return
n >= 9 /* strlen("localhost") */ &&
strncasecmp(host, "localhost", 9) == 0 &&
- (n == 9 ||
+ (n == 9 ||
((n == 10 || /* localhost. */
n == 21 || /* strlen("localhost.localdomain") */
n == 22) && /* strlen("localhost.localdomain.") */
@@ -866,7 +866,7 @@
if (canonize) {
char *tmp = buf;
s = memcpy(tmp, s, len + 1);
- scan_ip4_address(&tmp);
+ scan_ip4_address(&tmp);
}
if (s[len] == '\0' && su_inet_pton(AF_INET, s, addr) == 1)
return (void)(*return_addrlen = 4), len;
@@ -877,14 +877,14 @@
/** Compare two host names or IP addresses
*
- * Converts valid IP addresses to the binary format before comparing them.
+ * Converts valid IP addresses to the binary format before comparing them.
* Note that IP6-mapped IP4 addresses and IP6-compatible IP4 addresses are
* compared as IP4 addresses; that is, ::ffff:127.0.0.1, ::127.0.0.1 and
* 127.0.0.1 all are all equal.
*
* @param a IP address or domain name
* @param b IP address or domain name
- *
+ *
* @retval -1 if a < b
* @retval 0 if a == b
* @retval 1 if a > b
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/bnf.docs Tue Dec 16 13:05:22 2008
@@ -10,9 +10,9 @@
*
* The interface used for validating hostnames and IP addresses is in
* <sofia-sip/hostdomain.h>.
- *
+ *
* @CONTACT Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @STATUS @SofiaSIP Core library
*
* @LICENSE LGPL
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/bnf.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/bnf.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/bnf.h Tue Dec 16 13:05:22 2008
@@ -26,11 +26,11 @@
#define BNF_H
/**@file sofia-sip/bnf.h
- *
+ *
* Parsing macros and prototypes for HTTP-like protocols.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Jun 06 10:59:34 2000 ppessi
*
*/
@@ -58,7 +58,7 @@
/** Line-ending characters */
#define CRLF CR LF
/** Whitespace */
-#define WS SP HT
+#define WS SP HT
/** Linear whitespace */
#define LWS SP HT CR LF
/** Lower-case alphabetic characters */
@@ -71,11 +71,11 @@
#define DIGIT "0123456789"
/** RTSP safe characters */
#define SAFE "$-_." /* RTSP stuff */
-#define ALPHANUM DIGIT ALPHA
+#define ALPHANUM DIGIT ALPHA
#define HEX DIGIT "ABCDEF" "abcdef"
/** SIP token characters.
- * @note $|&^# were token chars in RFC 2543, but no more in RFC 3261.
+ * @note $|&^# were token chars in RFC 2543, but no more in RFC 3261.
*/
#define SIP_TOKEN ALPHANUM "-.!%*_+`'~"
/** SIP separator characters */
@@ -109,7 +109,7 @@
#define skip_word(ss) (*(ss) += span_word(*(ss)))
/** Test if @c is CR or LF */
-#define IS_CRLF(c) ((c) == '\r' || (c) == '\n')
+#define IS_CRLF(c) ((c) == '\r' || (c) == '\n')
/** Test if @c is linear whitespace */
#define IS_LWS(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
/*#define IS_LWS(c) ((_bnf_table[(unsigned char)(c)] & bnf_lws))*/
@@ -150,7 +150,7 @@
bnf_unreserved = bnf_alpha | bnf_mark, /**< URL unreserved */
bnf_separator = 32, /**< SIP separator */
/** SIP token, not alphabetic (0123456789-.!%*_+`'~) */
- bnf_token0 = 64 | bnf_safe,
+ bnf_token0 = 64 | bnf_safe,
bnf_token = bnf_token0 | bnf_alpha, /**< SIP token */
bnf_param0 = 128, /**< SIP parameter, not token */
bnf_param = bnf_token | bnf_param0 /**< SIP/HTTP parameter */
@@ -171,7 +171,7 @@
/** Get number of characters before linear whitespace */
#define span_non_lws(s) strcspn(s, LWS)
-/** Calculate span of a linear whitespace.
+/** Calculate span of a linear whitespace.
* LWS = [*WSP CRLF] 1*WSP
*/
su_inline isize_t span_lws(char const *s)
@@ -189,73 +189,73 @@
/** Calculate span of a token or linear whitespace characters. */
su_inline isize_t span_token_lws(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & (bnf_token | bnf_lws))
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a token characters. */
su_inline isize_t span_token(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & bnf_token)
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a alphabetic characters. */
su_inline isize_t span_alpha(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & bnf_alpha)
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a digits. */
su_inline isize_t span_digit(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (*e >= '0' && *e <= '9')
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a hex. */
su_inline isize_t span_hexdigit(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (IS_HEX(*e))
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of characters belonging to an RTSP token */
su_inline isize_t span_alpha_digit_safe(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & (bnf_alpha | bnf_safe))
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a characters valid in parameters. */
su_inline isize_t span_param(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (IS_PARAM(*e))
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a SIP word. */
su_inline isize_t span_word(char const *s)
{
- char const *e = s;
+ char const *e = s;
while (*e && (IS_TOKEN(*e) || strchr(SIP_WORD, *e)))
- e++;
- return e - s;
+ e++;
+ return e - s;
}
/** Calculate span of a unreserved characters. */
@@ -290,13 +290,13 @@
/** Reserved in URLs */
#define URL_RESERVED ";/?:=+$,"
-/** Non-alphanumeric characters without syntactical meaning. */
+/** Non-alphanumeric characters without syntactical meaning. */
#define URL_MARK "-_.!~*'()"
-/** Unreserved characters. */
+/** Unreserved characters. */
#define URL_UNRESERVED ALPHANUM URL_MARK
-/** URL hex escape. */
+/** URL hex escape. */
#define URL_ESCAPED "%"
#define URL_DELIMS "<>#%\""
#define URL_UNWISE "{}|\\^[]`"
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/hostdomain.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/hostdomain.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/sofia-sip/hostdomain.h Tue Dec 16 13:05:22 2008
@@ -27,11 +27,11 @@
#define SOFIA_SIP_HOSTDOMAIN_H
/**@file sofia-sip/hostdomain.h
- *
+ *
* Predicates for handling host names: IP addresses or domain names.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Mar 9 16:15:22 EET 2006 ppessi
*/
@@ -51,7 +51,7 @@
SOFIAPUBFUN int host_has_domain_invalid(char const *string);
SOFIAPUBFUN int host_cmp(char const *a, char const *b);
-/** This is typo. @deprecated Use host_is_ip6_reference() instead. */
+/** This is typo. @deprecated Use host_is_ip6_reference() instead. */
SOFIAPUBFUN int host_ip6_reference(char const *string);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/torture_bnf.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/torture_bnf.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/bnf/torture_bnf.c Tue Dec 16 13:05:22 2008
@@ -281,7 +281,7 @@
TEST_SCAN(scan_host, "127.255.249.000.a,", "127.255.249.000.a,", ",");
TEST_SCAN(scan_host, "0.00.000.000:,", "0.0.0.0", ":,");
TEST_SCAN(scan_host, "127.255.249.000,", "127.255.249.0", ",");
- TEST_SCAN(scan_host, "[dead:beef:feed:ded:0:1:2:3]:1",
+ TEST_SCAN(scan_host, "[dead:beef:feed:ded:0:1:2:3]:1",
"[dead:beef:feed:ded::1:2:3]", ":1");
TEST_SCAN(scan_host, "[::127.0.0.1]:1", "[::127.0.0.1]:1", ":1");
@@ -323,10 +323,10 @@
/* Invalid IP4 address (extra leading zeros) */
TEST_1(!host_cmp("127.0.0.1", "127.0.0.01"));
/* Invalid reference (extra leading zeros) */
- TEST_1(host_cmp("[0ffff:0ffff:0ffff:0ffff:0ffff:0ffff:255.255.255.255]",
+ TEST_1(host_cmp("[0ffff:0ffff:0ffff:0ffff:0ffff:0ffff:255.255.255.255]",
"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"));
#if SU_HAVE_IN6
- TEST_1(!host_cmp("[ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]",
+ TEST_1(!host_cmp("[ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]",
"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"));
TEST_1(!host_cmp("::1", "::001"));
TEST_1(!host_cmp("[::1]", "::1"));
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/ChangeLog Tue Dec 16 13:05:22 2008
@@ -13,7 +13,7 @@
2005-09-08 Kai Vehmanen <kai.vehmanen at nokia.com>
* hide_emails.sh: Fixed bug in hiding addresses of
- form foo.bar-bar at something.org. Fixed sf.net
+ form foo.bar-bar at something.org. Fixed sf.net
bug #1277167.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.conf Tue Dec 16 13:05:22 2008
@@ -55,10 +55,10 @@
PDF_HYPERLINKS = YES
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
+EXTRA_PACKAGES =
LATEX_BATCHMODE = YES
-FILE_PATTERNS = *.h *.c
+FILE_PATTERNS = *.h *.c
EXCLUDE_PATTERNS = acconfig.h config.h confdefs.h \
test*.h test*.c torture*.c *test.c *torture.c \
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -11,7 +11,7 @@
GENERATE_TAGFILE = docs.doxytags
-TAGFILES =
+TAGFILES =
TAGFILES += su.doxytags=su
TAGFILES += ipt.doxytags=ipt
TAGFILES += bnf.doxytags=bnf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/Makefile.am Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
pictures/autotools.gif \
pictures/autotools.vsd \
pictures/nta-receiving-message.eps \
- pictures/nta-receiving-message.gif
+ pictures/nta-receiving-message.gif
BUILT_SOURCES = Doxyfile.rfc
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/conformance.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/conformance.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/conformance.docs Tue Dec 16 13:05:22 2008
@@ -145,9 +145,9 @@
@ref sip_min_expires "Min-Expires",
@ref sip_mime_version "MIME-Version",
@ref sip_organization "Organization",
- @ref sip_p_asserted_identity "P-Asserted-Identity"
+ @ref sip_p_asserted_identity "P-Asserted-Identity"
(extension in @VERSION_1_12_7),
- @ref sip_p_preferred_identity "P-Preferred-Identity"
+ @ref sip_p_preferred_identity "P-Preferred-Identity"
(extension in @VERSION_1_12_7),
@ref sip_priority "Priority",
@ref sip_proxy_authenticate "Proxy-Authenticate",
@@ -479,7 +479,7 @@
@RFC3325: Asserted Identity
</th>
<td>
- Sofia-SIP supports
+ Sofia-SIP supports
@ref sip_p_asserted_identity "P-Asserted-Identity" and
@ref sip_p_preferred_identity "P-Preferred-Identity" headers
(generating, parsing and syntax checking). Also the non-standard
@@ -952,7 +952,7 @@
(generating, parsing and syntax checking).
The implicit subscription is suppressed by @nua, if the @ReferSub:
- true header is included in the REFER
+ true header is included in the REFER
request (@ref nua_refer "on server side") or
response (@ref nua_i_refer "on client side").
@@ -972,7 +972,7 @@
<td>
Sofia-SIP provides function sip_response_terminates_dialog() that
can be used to determine the effect of error response with dialog.
-
+
The nua UA engine uses sip_response_terminates_dialog().
</td>
<td>
@@ -1131,7 +1131,7 @@
<td>
Application must take care of:
- Audio or video processing
- - Generating a=rtpmap or a=fmtp lines when needed
+ - Generating a=rtpmap or a=fmtp lines when needed
</td>
</tr>
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/docguide.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/docguide.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/docguide.docs Tue Dec 16 13:05:22 2008
@@ -1,33 +1,33 @@
/*!
@page docguide Documentation Guidelines
-
+
@section doxygen Using Doxygen
Doxygen is a document generation program, used by many C/C++ projects. Its
-home page is at <a href="http://www.doxygen.org">http://www.doxygen.org</a>.
+home page is at <a href="http://www.doxygen.org">http://www.doxygen.org</a>.
The Sofia documentation is written using Doxygen.
Doxygen works by extracting the documentation data both from the actual
-C/C++ source code and from the specially formatted comments.
-The comments can contain some Javadoc-like
- at ref doxycommands "special commands".
+C/C++ source code and from the specially formatted comments.
+The comments can contain some Javadoc-like
+ at ref doxycommands "special commands".
In general the the style of the comments and documentation should follow the
<a href="http://java.sun.com/j2se/javadoc/writingdoccomments/">
javadoc style guide</a>.
A Doxygen comment must either contain reference about the entity
-it is describing, e.g., command
+it is describing, e.g., command
\@file when describing files:
@verbatim
/**
- * @file foo.c
- *
+ * @file foo.c
+ *
* Implementation of foo. The foo takes care of grokking xyzzy.
- *
+ *
* @author Jaska Jokunen <jaska.jokunen at company.com> \n
- *
+ *
* @date Created: Wed Oct 20 15:06:51 EEST 2004 jasjoku
*/
@endverbatim
@@ -40,7 +40,7 @@
/**
* Orches a candometer. If orching candometer is not possible, it
* tries to schadule hearping.
- *
+ *
* @param[in] k pointer to a candometer
* @param[in] level orching level
* @param[out] return_hearping return value for schaduled hearping
@@ -59,15 +59,15 @@
@subsection doxyfile Doxyfile and Doxyfile.conf
The doxygen options are specified through a configuration file,
-<i>Doxyfile</i>. As a convention, a module-specific Doxyfile includes
-a common file libsofia-sip-ua/docs/Doxyfile.conf. This makes it possible
+<i>Doxyfile</i>. As a convention, a module-specific Doxyfile includes
+a common file libsofia-sip-ua/docs/Doxyfile.conf. This makes it possible
to keep the module-specific Doxyfiles as clean as possible:
@code
PROJECT_NAME = "ipt"
OUTPUT_DIRECTORY = ../docs/ipt
-INPUT = ipt.docs .
+INPUT = ipt.docs .
@INCLUDE = ../Doxyfile.conf
@@ -80,7 +80,7 @@
Doxygen-generated HTML documentation is collected in @b docs
subdirectory at top level. A separate output directory is created for
each submodule under it. Doxytags for the module are generated in the @e
-doxytags file in the output directory.
+doxytags file in the output directory.
@subsection module_docs Module documentation in \<module\>.docs
@@ -105,7 +105,7 @@
@section ipt_overview Overview
-This module contain some routines useful for IPT applications, like
+This module contain some routines useful for IPT applications, like
- ...
- ...
*/
@@ -115,7 +115,7 @@
In this section we go through the most common Doxygen commands. All
the commands are explained in the manual.
-The commands include
+The commands include
- @ref doxystyle "style commands (@@a, @@b, @@c, @@e, @@em, @@p)"
- @ref doxyfuncs "function parameters and return values (@@param, @@return, @@retval)"
@@ -123,17 +123,17 @@
The text style can be changed with @@b @b (bold), @@c @c (code), or
@@e @e (italic) commands. Function argument names use style command
-@@a.
+@@a.
For example, a sentence "The @b Content-Type header @a ct specifies the @e
media-type of the message body, e.g., @c audio/amr would be AMR-encoded
audio." is produced with commands like
@code
-The @b Content-Type header @a ct specifies the @e media-type of
+The @b Content-Type header @a ct specifies the @e media-type of
the message body, e.g., @c audio/amr would be AMR-encoded audio.
- at endcode
+ at endcode
-The style commands have synonyms, e.g., @@em and @@e mean same, as
+The style commands have synonyms, e.g., @@em and @@e mean same, as
well as @@c and @@p.
@subsection doxyfuncs Function Parameters and Return Values - @param, @return, @retval
@@ -150,11 +150,11 @@
@verbatim
/**Schadule hearping.
- *
+ *
* The function schadule() schadules a hearping.
- *
+ *
* @param[in] h pointer to hearping
- *
+ *
* @retval 0 hearping was successful
* @retval -1 an error occurred
*/
@@ -170,12 +170,12 @@
commands.
@verbatim
/**Destroy a hearping.
- *
+ *
* The function hearping_destroy() deinitializes a hearping and
- * reclaims the memory allocated for it.
- *
+ * reclaims the memory allocated for it.
+ *
* @param[in,out] h pointer to pointer to hearping
- *
+ *
* The function clears the pointer to hearping, so it must be called
* with a pointer to pointer:
* @code
@@ -204,7 +204,7 @@
When the structure of the documentation does not follow directory or file
structure, it is possible to use grouping commands @@defgroup and @@ingroup.
The command @@defgroup creates a group, and @@ingroup adds an entry to an
-group.
+group.
@subsection doclinking Creating Links
@@ -215,7 +215,7 @@
variable is prefixed with hash @#, Doxygen creates a link to it.
It is also possible to create links with freely selected link to
-documentation entries with @@link and @@endlink commands.
+documentation entries with @@link and @@endlink commands.
When the link target is a named page, section, or subsection, it is possible
to use the @@ref command.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/mainpage.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/mainpage.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/docs/mainpage.docs Tue Dec 16 13:05:22 2008
@@ -8,39 +8,39 @@
for Sofia-SIP components. Some introductory material and
pointers to the example code are also included.
-For a list of module specific pages, see @ref subdirs
+For a list of module specific pages, see @ref subdirs
"source tree structure" or direct links to submodules:<br>
-<a href="nua/index.html">nua</a>
-<a href="su/index.html">su</a>
-<a href="features/index.html">features</a>
-<a href="soa/index.html">soa</a>
-<a href="sdp/index.html">sdp</a>
-<a href="nta/index.html">nta</a>
-<a href="tport/index.html">tport</a>
-<a href="sresolv/index.html">sresolv</a>
-<a href="sip/index.html">sip</a>
-<a href="msg/index.html">msg</a>
-<a href="url/index.html">url</a>
-<a href="stun/index.html">stun</a>
-<a href="iptsec/index.html">iptsec</a>
-<a href="nea/index.html">nea</a>
-<a href="nth/index.html">nth</a>
-<a href="http/index.html">http</a>
-<a href="bnf/index.html">bnf</a>
-<a href="ipt/index.html">ipt</a>
+<a href="nua/index.html">nua</a>
+<a href="su/index.html">su</a>
+<a href="features/index.html">features</a>
+<a href="soa/index.html">soa</a>
+<a href="sdp/index.html">sdp</a>
+<a href="nta/index.html">nta</a>
+<a href="tport/index.html">tport</a>
+<a href="sresolv/index.html">sresolv</a>
+<a href="sip/index.html">sip</a>
+<a href="msg/index.html">msg</a>
+<a href="url/index.html">url</a>
+<a href="stun/index.html">stun</a>
+<a href="iptsec/index.html">iptsec</a>
+<a href="nea/index.html">nea</a>
+<a href="nth/index.html">nth</a>
+<a href="http/index.html">http</a>
+<a href="bnf/index.html">bnf</a>
+<a href="ipt/index.html">ipt</a>
@section who Contact Information
-You can download latest Sofia SIP from the project
-<a href="http://sofia-sip.sf.net">home page</a> at
+You can download latest Sofia SIP from the project
+<a href="http://sofia-sip.sf.net">home page</a> at
<a href="sf.net">Sourceforge.net</a>.
Please contact us if you have questions regarding this software:
-<ul>
+<ul>
<li>Pekka Pessi <Pekka.Pessi at nokia.com></li>
<li>Kai Vehmanen <Kai.Vehmanen at nokia.com></li>
-</ul>
+</ul>
Or post to the Sofia-SIP mailing list:
@@ -68,7 +68,7 @@
SIP Signaling:
- <a href="nua/index.html">"nua" - SIP User Agent library</a>
- <a href="nea/index.html">"nea" - SIP Event API</a>
- - <a href="iptsec/index.html">"iptsec" -
+ - <a href="iptsec/index.html">"iptsec" -
Digest authentication for HTTP and SIP</a>
- <a href="nta/index.html">"nta" - SIP transaction engine</a>
- <a href="tport/index.html">"tport" - Message transport</a>
@@ -103,7 +103,7 @@
formatting within Sofia-SIP. The guidelines include identifier naming
conventions, indenting convention, and tool usage directions.
-Please note that C style is always a matter of taste.
+Please note that C style is always a matter of taste.
@section naming Naming Conventions
@@ -177,7 +177,7 @@
-saw -nsc -nsob -nss
@endcode
-Loops without condition use @c for @c (;;) instead of @c while @c (1).
+Loops without condition use @c for @c (;;) instead of @c while @c (1).
@code
for (;;) {
@@ -220,7 +220,7 @@
wrapper interface.
SU module handles abstraction to OS specific functionality such as
-memory management, sockets, threads and time functions.
+memory management, sockets, threads and time functions.
@subsection ansi_99 ANSI C 99 features
@@ -322,7 +322,7 @@
If compiler decides to pack this structure, this code generates a
structure that has @a bar and @a foo in the first seven bits, and then
- at a something beginning from the next 32 bit boundary.
+ at a something beginning from the next 32 bit boundary.
One problem arises when using packed bit-fields: on ARM it is
generally not possible to access a 32 bit field that does not start from
@@ -348,9 +348,9 @@
@section file_organization File and Directory Structure
A Sofia-SIP library module can be defined as a subdirectory under the
-libsofia-sip-ua directory hierarchy that contains a file \<modulename\>.docs
-(where the \<modulename\> of course referes to the actual name of
-the module).
+libsofia-sip-ua directory hierarchy that contains a file \<modulename\>.docs
+(where the \<modulename\> of course referes to the actual name of
+the module).
In case you like to start developing a new module, please
contact Sofia-SIP development team so that they can help you to set up
@@ -364,16 +364,16 @@
Contains any pictures/images
that are needed by the module documentation. The
file formats to use are GIF (for html pages) and
- EPS (for latex). If some program (e.g. MS Visio) is
+ EPS (for latex). If some program (e.g. MS Visio) is
used to create the pictures, also the original
files must be stored here.\n
(Note that old modules may have "images" subdirectory instead of
"pictures")
- files Makefile.am \n
See section @ref build "dealing with GNU Autotools" below.
- - (optionally) source code file(s) of the module and module tests.
+ - (optionally) source code file(s) of the module and module tests.
The source code file(s) can also be located in subdirectories if necesary.
-
+
@section oo_with_c Writing Object-Oriented Code
@@ -423,17 +423,17 @@
@subsection oo_derived Inheritance and Derived Objects
-Inheritance is a object-oriented practice that has limited use in Sofia.
+Inheritance is a object-oriented practice that has limited use in Sofia.
Most common example of inheritance is use of #su_home_t. Many objects are
derived from #su_home_t, which means that they can use the various
-home-based memory management functions from <su_alloc.h>.
+home-based memory management functions from <su_alloc.h>.
In this sence, inheritance means that a pointer to a derived object can be
casted as a pointer to a base object. In other words, the derived object
must have the base object at the beginning of its memory area:
@code
-struct derived
+struct derived
{
struct base base[1];
int extra;
@@ -452,19 +452,19 @@
@subsection oo_templates Templates
-There are a few template types implemented as macros in Sofia libraries.
+There are a few template types implemented as macros in Sofia libraries.
They include hash table, defined in <sofia-sip/htable.h>, which can be used
to define hash tables types and accessor functions for different object, and
red-black tree, defined in <sofia-sip/rbtree.h>.
@section memory Memory Management
-The home-based memory management is useful when a lot of memory blocks are
-allocated for given task. The allocations are done via the memory home,
-which keeps a reference to each allocated memory block. When the memory
-home is then freed, it will free all memory blocks to which it has
-reference. This simplifies application logic because application code does
-not need to keep track of the allocated memory and free every allocated block
+The home-based memory management is useful when a lot of memory blocks are
+allocated for given task. The allocations are done via the memory home,
+which keeps a reference to each allocated memory block. When the memory
+home is then freed, it will free all memory blocks to which it has
+reference. This simplifies application logic because application code does
+not need to keep track of the allocated memory and free every allocated block
separately.
See documentation of <sofia-sip/su_alloc.h> and @ref su_alloc "memory managment tutorial"
@@ -502,8 +502,8 @@
@subsection combining Combining allocations
Another place where home-based memory management makes programmers
-life easier is case where a sub-procedure makes multiple memory allocations
-and, in case the sub-procedure fails, all the allocations must be released
+life easier is case where a sub-procedure makes multiple memory allocations
+and, in case the sub-procedure fails, all the allocations must be released
and, in case the sub-procedure is succesfull, all allocations must be
controlled by upper level memory management.
@@ -522,7 +522,7 @@
}
/* destroy temporary memory home (and registered allocations) */
/* Note than in case processing was succesfull the memory */
- /* registrations were already moved to upper level home. */
+ /* registrations were already moved to upper level home. */
su_home_deinit(temphome);
/* return ok/not-ok */
@@ -542,9 +542,9 @@
- valid args
- not valid args
- Aim for 100% line coverage\n
- (If there is a line of code that you have not tested, you don't know
+ (If there is a line of code that you have not tested, you don't know
if its working.) \n
- For selected part of code you should also aim for
+ For selected part of code you should also aim for
100% branch/path coverage.\n
But be anyway reasonable with these because in practise complete
coverage is next to impossible to achive (so 80% is ok in practise).
@@ -573,13 +573,13 @@
Each test program should either return zero for success or a non-zero
error code in its main function. Now when you run "make check",
- at b my_test_foo and @b my_test_bar will be built and then run.
+ at b my_test_foo and @b my_test_bar will be built and then run.
Make will print a
-summary of how the tests went. As these tests are run from the build
-system, the tests must be non-interactive (no questions asked) and not
+summary of how the tests went. As these tests are run from the build
+system, the tests must be non-interactive (no questions asked) and not
rely on any files that are not in version control system.
-Sofia SIP's top-level makefile contains a recursive check target, so
+Sofia SIP's top-level makefile contains a recursive check target, so
you can use "cd sofia-sip ; make check" to run all the existing tests
with a single command.
@@ -594,7 +594,7 @@
<a href="http://developer.gnome.org/doc/books/WGA/generating-makefiles.html">
developer.gnome.org</a>. <a href="http://sources.redhat.com/autobook">Autobook</a>
provides more detailed documentation for autoconf and automake.
-The <a href="http://www.gnu.org/manual/make/">GNU make manual</a>
+The <a href="http://www.gnu.org/manual/make/">GNU make manual</a>
is also a good source of information.
@subsection autogen_sh autogen.sh
@@ -629,14 +629,14 @@
@subsection aclocal_m4 aclocal.m4
-The aclocal.m4 contains the definitions of the autoconf macros used in
+The aclocal.m4 contains the definitions of the autoconf macros used in
@b configure.ac.
This file is generated by aclocal command.
@subsection Makefile_am Makefile.am
-Makefile.am is where you define what programs and libraries should
+Makefile.am is where you define what programs and libraries should
be built, and also what source files are needed to create them.
When you run automake, it creates the file Makefile.in.
@@ -644,12 +644,12 @@
@subsection configure configure
-When you run configure script, it performs all the checks defined in
- at b configure.ac and then replaces all @b xxx.in files with equivalent
- at b xxx files. All @c @@FOO@@ variables in the source @b *.in files are
+When you run configure script, it performs all the checks defined in
+ at b configure.ac and then replaces all @b xxx.in files with equivalent
+ at b xxx files. All @c @@FOO@@ variables in the source @b *.in files are
replaced with values found during the configuration process. For instance
-the variable @c @@srcdir@@ in @b Makefile.in is replaced in @b Makefile
-with the source directory path (useful when compiling outside the main
+the variable @c @@srcdir@@ in @b Makefile.in is replaced in @b Makefile
+with the source directory path (useful when compiling outside the main
source tree).
This file is generated by autoconf command.
@@ -658,14 +658,14 @@
This script stores the last parameters given to configre command.
If necessary you can rerun the last given configure script (with given
-parameters) by using command "./config.status -r" or
+parameters) by using command "./config.status -r" or
"./config.status --recheck".
This file is generated by configure script.
@subsection config_cache config.cache
-This file contains results of the various checks that configure script
+This file contains results of the various checks that configure script
performed. In case the configure script failed, you might try to
delete this file and run the configure script again.
@@ -673,8 +673,8 @@
@subsection Makefile Makefile
-The @b Makefile contains the actual rules how to build the target
-libraries and program. It is used by the @c make program. @b Makefile
+The @b Makefile contains the actual rules how to build the target
+libraries and program. It is used by the @c make program. @b Makefile
is generated from @b Makefile.in when you run @c autoconf command.
Ensure that "make dist" and "make install" targets work.
@@ -726,7 +726,7 @@
- 7 SU_DEBUG_7() - media protocol actions (incoming packets, ...)
- 9 SU_DEBUG_9() - entering/exiting functions, very verbatim progress
-In addition to the macros mentioned above, there is also functions for
+In addition to the macros mentioned above, there is also functions for
printing logging messages:
- su_llog(), su_vllog()
- su_perror(), su_perror2()
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.c Tue Dec 16 13:05:22 2008
@@ -43,15 +43,15 @@
*/
char const * const sofia_sip_name_version = SOFIA_SIP_NAME_VERSION;
-/** The name and version of software package providing S/MIME functionality,
+/** The name and version of software package providing S/MIME functionality,
* NULL if none.
*/
char const * sofia_sip_has_smime;
-/** The name and version of software package providing TLS functionality,
- * NULL if none.
- *
+/** The name and version of software package providing TLS functionality,
+ * NULL if none.
+ *
* TLS over TCP is used as transport for SIP messages when using SIPS
* scheme. Using TLS over TCP with SIP is described in @RFC3261.
*/
@@ -61,16 +61,16 @@
char const * sofia_sip_has_tls;
#endif
-/** The name and version of software package providing DTLS functionality,
- * NULL if none.
+/** The name and version of software package providing DTLS functionality,
+ * NULL if none.
*
* DTLS or TLS over datagram transport (UDP) can be used as transport for
* SIP messages.
*/
char const * sofia_sip_has_dtls;
-/** The name and version of software package providing TLS over SCTP functionality,
- * NULL if none.
+/** The name and version of software package providing TLS over SCTP functionality,
+ * NULL if none.
*
* TLS over SCTP can be used as transport for SIP messages.
*/
@@ -80,8 +80,8 @@
#include <sigcomp.h>
#endif
-/** The name and version of software package providing SigComp functionality,
- * NULL if none.
+/** The name and version of software package providing SigComp functionality,
+ * NULL if none.
*
* SigComp can be used to compress SIP messages.
*/
@@ -91,8 +91,8 @@
char const * sofia_sip_has_sigcomp;
#endif
-/** The name and version of software package providing STUN functionality,
- * NULL if none.
+/** The name and version of software package providing STUN functionality,
+ * NULL if none.
*
* STUN is a protocol used to traverse NATs with UDP.
*/
@@ -103,21 +103,21 @@
char const * sofia_sip_has_stun;
#endif
-/** The name and version of software package providing TURN functionality,
- * NULL if none.
+/** The name and version of software package providing TURN functionality,
+ * NULL if none.
*
* TURN is a protocol used to traverse NATs or firewalls with TCP or UDP.
*/
char const * sofia_sip_has_turn;
-/** The name and version of software package providing UPnP functionality,
- * NULL if none.
+/** The name and version of software package providing UPnP functionality,
+ * NULL if none.
*
* UPnP (Universal Plug and Play) can be used to traverse NATs or firewalls.
*/
char const * sofia_sip_has_upnp;
-/** The name and version of software package providing SCTP functionality,
+/** The name and version of software package providing SCTP functionality,
* NULL if none.
*
* SCTP can be used as transport for SIP messages. The software providing it
@@ -126,7 +126,7 @@
char const * sofia_sip_has_sctp;
/* We don't have viable SCTP transport interface */
-/** The name and version of software package providing IPv6 functionality,
+/** The name and version of software package providing IPv6 functionality,
* NULL if none.
*
* IPv6 can be used to send SIP messages.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/features/features.docs Tue Dec 16 13:05:22 2008
@@ -22,8 +22,8 @@
installed @a libsofia-sip-ua.so library. The macro #SOFIA_SIP_NAME_VERSION
contains the name and release of currently available include files.
-The Sofia SIP binary API hides some protocols used under the SIP stack.
-While the binary API stays the same, the features are not necessarily there.
+The Sofia SIP binary API hides some protocols used under the SIP stack.
+While the binary API stays the same, the features are not necessarily there.
These features are mainly related to encryption, compression and underlying
transports.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
PROJECT_NAME = "http"
OUTPUT_DIRECTORY = ../docs/html/http
-INPUT = @srcdir@/http.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
+INPUT = @srcdir@/http.docs @srcdir@/sofia-sip sofia-sip @srcdir@ .
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../docs/Doxyfile.conf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/Makefile.am Tue Dec 16 13:05:22 2008
@@ -29,12 +29,12 @@
sofia-sip/http_parser.h sofia-sip/http_tag_class.h \
sofia-sip/http_status.h sofia-sip/http_hclasses.h
-BUILT_H = sofia-sip/http_protos.h sofia-sip/http_tag.h
+BUILT_H = sofia-sip/http_protos.h sofia-sip/http_tag.h
BUILT_C = http_tag.c http_parser_table.c
BUILT_SOURCES = $(BUILT_H) $(BUILT_C) http_tag_ref.c
-nobase_include_sofia_HEADERS = $(BUILT_H) $(PUBLIC_H)
+nobase_include_sofia_HEADERS = $(BUILT_H) $(PUBLIC_H)
libhttp_la_SOURCES = $(INTERNAL_H) \
http_parser.c http_header.c \
@@ -77,7 +77,7 @@
${BUILT_H} ${BUILT_C}: ${srcdir}/sofia-sip/http.h ${MSG_PARSER_AWK}
-sofia-sip/http_protos.h: ${srcdir}/sofia-sip/http_protos.h.in
+sofia-sip/http_protos.h: ${srcdir}/sofia-sip/http_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/sofia-sip/http_protos.h.in ${SS_HTTP_H}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http.docs Tue Dec 16 13:05:22 2008
@@ -26,13 +26,13 @@
* - @c http_X_t is the structure used to store parsed header,
* - @c HTTP_X_INIT() initializes a static instance of http_X_t,
* - @c http_X_p() tests if header object is instance of header X,
- * - @c http_X_make() is a macro that creates a header X object by
+ * - @c http_X_make() is a macro that creates a header X object by
decoding given string,
- * - @c http_X_dup() duplicates (deeply copies) the header X (macro),
+ * - @c http_X_dup() duplicates (deeply copies) the header X (macro),
* - @c http_X_copy() is a macro that copies the header X (macro),
- * - @c #msg_hclass_t http_X_class[] contains the @em header @em class
+ * - @c #msg_hclass_t http_X_class[] contains the @em header @em class
* for header X.
- *
+ *
* In addition to this interface, the parser provider interface is
* documented in the <a href="../sip/group__sip__parser.html">SIP Parser module</a>.
* The parser provider interface makes it possible to extend HTTP parser with
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_basic.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_basic.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_basic.c Tue Dec 16 13:05:22 2008
@@ -197,7 +197,7 @@
if (msg_firstline_d(s, &status, &phrase) < 0 ||
http_version_d(&s, &st->st_version) < 0 || *s ||
- msg_uint32_d(&status, &code) == -1 ||
+ msg_uint32_d(&status, &code) == -1 ||
status[0])
return -1;
@@ -341,7 +341,7 @@
#define http_authentication_info_dup_one msg_list_dup_one
msg_hclass_t http_authentication_info_class[] =
-HTTP_HEADER_CLASS(authentication_info, "Authentication-Info",
+HTTP_HEADER_CLASS(authentication_info, "Authentication-Info",
ai_params, list, authentication_info);
/* ====================================================================== */
@@ -427,7 +427,7 @@
/**@ingroup http_content_range
* @typedef typedef struct http_content_range_s http_content_range_t;
*
- * The structure #http_content_range_t contains representation of
+ * The structure #http_content_range_t contains representation of
* @b Content-Range header.
*
* The #http_content_range_t is defined as follows:
@@ -652,7 +652,7 @@
HTTP_HEADER_CLASS(expires, "Expires", d_common, single, default);
/* ====================================================================== */
-/**@HTTP_HEADER http_from From header.
+/**@HTTP_HEADER http_from From header.
*
* @code
* From = "From" ":" mailbox
@@ -773,7 +773,7 @@
/**@ingroup http_if_modified_since
* @typedef typedef struct http_if_modified_since_s http_if_modified_since_t;
*
- * The structure #http_if_modified_since_t contains representation of
+ * The structure #http_if_modified_since_t contains representation of
* @b If-Modified-Since header.
*
* The #http_if_modified_since_t is defined as follows:
@@ -790,7 +790,7 @@
#define http_if_modified_since_e http_date_e
msg_hclass_t http_if_modified_since_class[] =
-HTTP_HEADER_CLASS(if_modified_since, "If-Modified-Since",
+HTTP_HEADER_CLASS(if_modified_since, "If-Modified-Since",
d_common, single, default);
/* ====================================================================== */
@@ -802,7 +802,7 @@
HTTP_HEADER_CLASS_LIST(if_none_match, "If-None-Match", list);
/* ====================================================================== */
-/**@HTTP_HEADER http_if_range If-Range header.
+/**@HTTP_HEADER http_if_range If-Range header.
*
* The @b If-Range header is used when a client has a partial copy of an
* entity in its cache, and wishes to have an up-to-date copy of the entire
@@ -813,7 +813,7 @@
* @code
* If-Range = "If-Range" ":" ( entity-tag / HTTP-date )
* @endcode
- */
+ */
/** Parse If-Range header */
issize_t http_if_range_d(su_home_t *home, http_header_t *h, char *s, isize_t slen)
@@ -892,7 +892,7 @@
/**@ingroup http_if_unmodified_since
* @typedef typedef http_date_t http_if_unmodified_since_t;
*
- * The structure #http_if_unmodified_since_t contains representation of
+ * The structure #http_if_unmodified_since_t contains representation of
* @b If-Unmodified-Since header.
*
* The #http_if_unmodified_since_t is defined as follows:
@@ -909,7 +909,7 @@
#define http_if_unmodified_since_e http_date_e
msg_hclass_t http_if_unmodified_since_class[] =
-HTTP_HEADER_CLASS(if_unmodified_since, "If-Unmodified-Since",
+HTTP_HEADER_CLASS(if_unmodified_since, "If-Unmodified-Since",
d_common, single, default);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_extra.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_extra.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_extra.c Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*
*/
-/**@CFILE http_extra.c
+/**@CFILE http_extra.c
*
* Extra HTTP headers
*
@@ -162,7 +162,7 @@
}
else {
s += strcspn(s, ",;" LWS);
- if (s == v)
+ if (s == v)
return -1;
}
@@ -352,7 +352,7 @@
/* Special cases from Netscape spec */
if (LOOKING_AT(s, "expires=")) {
- msg_time_t value;
+ msg_time_t value;
msg_date_d((char const **)&rest, &value);
} else if (LOOKING_AT(s, "path=/")) {
for (;;) {
@@ -366,8 +366,8 @@
}
#undef LOOKING_AT
- if (IS_LWS(*rest)) {
- *rest++ = '\0'; skip_lws(&rest);
+ if (IS_LWS(*rest)) {
+ *rest++ = '\0'; skip_lws(&rest);
}
return rest - s;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_header.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_header.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_header.c Tue Dec 16 13:05:22 2008
@@ -88,7 +88,7 @@
msg_fragment_clear(http->http_content_length->l_common);
}
}
-
+
if (!http->http_separator)
http->http_separator = http_separator_create(home);
@@ -118,13 +118,13 @@
/** Add a Content-Length and separator to a message */
int http_message_complete(msg_t *msg, http_t *http)
-{
+{
#if 1
if (!http->http_content_length) {
http_content_length_t *l;
http_payload_t *pl;
size_t len = 0;
-
+
for (pl = http->http_payload; pl; pl = pl->pl_next)
len += pl->pl_len;
@@ -148,8 +148,8 @@
}
/** Add headers from the request to the response message. */
-int http_complete_response(msg_t *msg,
- int status, char const *phrase,
+int http_complete_response(msg_t *msg,
+ int status, char const *phrase,
http_t const *request)
{
su_home_t *home = msg_home(msg);
@@ -210,7 +210,7 @@
return h->sh_class->hc_print(b, bsiz, h, flags);
}
-http_header_t *http_header_format(su_home_t *home,
+http_header_t *http_header_format(su_home_t *home,
msg_hclass_t *hc,
char const *fmt,
...)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser.c Tue Dec 16 13:05:22 2008
@@ -75,7 +75,7 @@
#define CRLF_TEST(s) \
(((s)[0]) == '\r' ? (((s)[1]) == '\n') + 1 : ((s)[0])=='\n')
-/** Extract the HTTP message body, including separator line.
+/** Extract the HTTP message body, including separator line.
*
* @retval -1 error
* @retval 0 cannot proceed
@@ -98,7 +98,7 @@
if (!eos && (bsiz == 0 || (bsiz == 1 && b[0] == '\r')))
return 0;
- m = CRLF_TEST(b);
+ m = CRLF_TEST(b);
assert(m > 0 || eos); /* We should be looking at an empty line */
@@ -143,7 +143,7 @@
*/
http->http_transfer_encoding->k_items &&
http->http_transfer_encoding->k_items[0] &&
- strcasecmp(http->http_transfer_encoding->k_items[0],
+ strcasecmp(http->http_transfer_encoding->k_items[0],
"identity") != 0) {
http->http_flags |= MSG_FLG_CHUNKS;
@@ -162,16 +162,16 @@
body_len = http->http_content_length->l_length;
/* We cannot parse multipart/byteranges ... */
else if (http->http_content_type && http->http_content_type->c_type &&
- strcasecmp(http->http_content_type->c_type, "multipart/byteranges")
+ strcasecmp(http->http_content_type->c_type, "multipart/byteranges")
== 0)
return -1;
else if (MSG_IS_MAILBOX(flags)) /* message fragments */
body_len = 0;
- else if (http->http_request)
+ else if (http->http_request)
body_len = 0;
else if (eos)
body_len = bsiz;
- else
+ else
return 0; /* XXX */
if (body_len == 0) {
@@ -198,7 +198,7 @@
return m;
}
-/** Extract a chunk.
+/** Extract a chunk.
*
* @retval -1 error
* @retval 0 cannot proceed
@@ -210,7 +210,7 @@
unsigned crlf, chunk_len;
char *b0 = b, *s;
union {
- msg_header_t *header;
+ msg_header_t *header;
msg_payload_t *chunk;
} h = { NULL };
size_t bsiz0 = bsiz;
@@ -234,15 +234,15 @@
assert(crlf < bsiz);
/* Skip crlf */
- b += crlf; bsiz -= crlf;
+ b += crlf; bsiz -= crlf;
}
/* Now, looking at the chunk header */
- n = strcspn(b, CRLF);
- if (!eos && n == bsiz)
+ n = strcspn(b, CRLF);
+ if (!eos && n == bsiz)
return 0;
crlf = CRLF_TEST(b + n);
-
+
if (n == 0) {
if (crlf == bsiz && eos) {
msg_mark_as_complete(msg, MSG_FLG_COMPLETE | MSG_FLG_FRAGS);
@@ -267,7 +267,7 @@
crlf = bsiz > 0 ? CRLF_TEST(b) : 0;
- if ((eos && bsiz == 0) || crlf == 2 ||
+ if ((eos && bsiz == 0) || crlf == 2 ||
(crlf == 1 && (bsiz > 1 || b[0] == '\n'))) {
/* Shortcut - We got empty trailers */
b += crlf;
@@ -285,7 +285,7 @@
b += n + crlf, bsiz -= n + crlf;
/* Extract chunk */
- chunk = msg_extract_payload(msg, http,
+ chunk = msg_extract_payload(msg, http,
&h.header, chunk_len + (b - b0),
b0, bsiz0, eos);
@@ -294,7 +294,7 @@
h.chunk->pl_data += (b - b0);
h.chunk->pl_len -= (b - b0);
}
-
+
return chunk;
}
}
@@ -312,12 +312,12 @@
char const *result;
int const version_size = sizeof(http_version_1_1) - 1;
- if (strncasecmp(s, http_version_1_1, version_size) == 0 &&
+ if (strncasecmp(s, http_version_1_1, version_size) == 0 &&
!IS_TOKEN(s[version_size])) {
result = http_version_1_1;
s += version_size;
}
- else if (strncasecmp(s, http_version_1_0, version_size) == 0 &&
+ else if (strncasecmp(s, http_version_1_0, version_size) == 0 &&
!IS_TOKEN(s[version_size])) {
result = http_version_1_0;
s += version_size;
@@ -348,7 +348,7 @@
memmove(s + l1 + 1, s + n - l2, l2);
s[l1 + 1 + l2] = 0;
- /* Compare again with compacted version */
+ /* Compare again with compacted version */
if (strcasecmp(s, http_version_1_1) == 0)
result = http_version_1_1;
else if (strcasecmp(s, http_version_1_0) == 0)
@@ -359,10 +359,10 @@
}
while (IS_LWS(*s)) *s++ = '\0';
-
+
*ss = s;
- if (ver)
+ if (ver)
*ver = result;
return 0;
@@ -454,7 +454,7 @@
#define MATCH(s, m) (strncasecmp(s, m, n = sizeof(m) - 1) == 0)
- if (c >= 'a' && c <= 'z')
+ if (c >= 'a' && c <= 'z')
c += 'A' - 'a';
switch (c) {
@@ -463,7 +463,7 @@
case 'G': if (MATCH(s, "GET")) code = http_method_get; break;
case 'H': if (MATCH(s, "HEAD")) code = http_method_head; break;
case 'O': if (MATCH(s, "OPTIONS")) code = http_method_options; break;
- case 'P': if (MATCH(s, "POST")) code = http_method_post;
+ case 'P': if (MATCH(s, "POST")) code = http_method_post;
else
if (MATCH(s, "PUT")) code = http_method_put; break;
case 'T': if (MATCH(s, "TRACE")) code = http_method_trace; break;
@@ -510,7 +510,7 @@
* query. For each key, a query element (in the form name=value) is searched
* from the query string. If a query element has a beginning matching with
* the key, a copy of the rest of the element is returned in corresponding
- * return_value argument.
+ * return_value argument.
*
* @note The @a query string will be modified.
*
@@ -538,15 +538,15 @@
valuelen = namelen + strcspn(q + namelen, "&");
q_next = q + valuelen;
- if (*q_next)
+ if (*q_next)
*q_next++ = '\0';
- value = q + namelen;
+ value = q + namelen;
has_value = (*value) != '\0'; /* is the part in form of name=value? */
if (has_value)
*value++ = '\0';
- name = url_unescape(q, q);
+ name = url_unescape(q, q);
if (has_value) {
namelen = strlen(name);
@@ -570,4 +570,4 @@
}
return N;
-}
+}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser_table.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser_table.c.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_parser_table.c.in Tue Dec 16 13:05:22 2008
@@ -31,7 +31,7 @@
*/
/**@internal
- * @CFILE http_parser_table.c
+ * @CFILE http_parser_table.c
* @brief HTTP parser table
*
* #AUTO#
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_status.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_status.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_status.c Tue Dec 16 13:05:22 2008
@@ -79,7 +79,7 @@
char const *http_status_phrase(int status)
{
- if (status < 100 || status > 699)
+ if (status < 100 || status > 699)
return NULL;
switch (status) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag.c.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag.c.in Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-/**@HTTP
+/**@HTTP
* @IFILE http_tag.c.in
*
* Template for <http_tag.c>.
@@ -35,7 +35,7 @@
* This file is autogenerated from <http_tag.c.in>.
*
* #AUTO#
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*/
@@ -58,7 +58,7 @@
tag_typedef_t httptag_http = HTTPMSGTAG_TYPEDEF(http);
tag_typedef_t httptag_version = STRTAG_TYPEDEF(version);
-tag_typedef_t httptag_header =
+tag_typedef_t httptag_header =
{{ TAG_NAMESPACE, "header", httphdrtag_class, 0 }};
tag_typedef_t httptag_header_str = STRTAG_TYPEDEF(header_str);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag_class.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag_class.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/http_tag_class.c Tue Dec 16 13:05:22 2008
@@ -49,7 +49,7 @@
#include <sofia-sip/http_tag_class.h>
#include <sofia-sip/su_tagarg.h>
-tag_class_t httphdrtag_class[1] =
+tag_class_t httphdrtag_class[1] =
{{
sizeof(httphdrtag_class),
/* tc_next */ NULL,
@@ -65,7 +65,7 @@
/* tc_scan */ msghdrtag_scan,
}};
-tag_class_t httpstrtag_class[1] =
+tag_class_t httpstrtag_class[1] =
{{
sizeof(httpstrtag_class),
/* tc_next */ NULL,
@@ -81,7 +81,7 @@
/* tc_scan */ msghdrtag_scan,
}};
-tag_class_t httpmsgtag_class[1] =
+tag_class_t httpmsgtag_class[1] =
{{
sizeof(httpmsgtag_class),
/* tc_next */ NULL,
@@ -100,7 +100,7 @@
/** Filter a HTTP header structure. */
tagi_t *httptag_filter(tagi_t *dst,
tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **bb)
{
tagi_t stub[2] = {{ NULL }};
@@ -152,7 +152,7 @@
}
}
-/** Duplicate headers from taglist and add them to the HTTP message.
+/** Duplicate headers from taglist and add them to the HTTP message.
*
* Return the number of headers added to the HTTP message.
*/
@@ -209,8 +209,8 @@
else if (tag == httptag_header_str) {
if (msg_header_add_str(msg, http, (char const *)value) < 0)
break;
- }
- else
+ }
+ else
continue;
retval++;
@@ -218,7 +218,7 @@
ta_end(ta);
- if (t)
+ if (t)
return -1;
return retval;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http.h Tue Dec 16 13:05:22 2008
@@ -26,10 +26,10 @@
/** Defined when <sofia-sip/http.h> has been included. */
#define HTTP_H
-/**@file sofia-sip/http.h
- *
+/**@file sofia-sip/http.h
+ *
* HTTP message, methods, headers.
- *
+ *
* @sa <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -50,7 +50,7 @@
SOFIA_BEGIN_DECLS
/* ----------------------------------------------------------------------
- * 1) Constants
+ * 1) Constants
*/
#define HTTP_NONE ((http_header_t *)MSG_HEADER_NONE)
@@ -161,9 +161,9 @@
typedef msg_error_t http_error_t;
/** Unknown header. */
typedef msg_generic_t http_unknown_t;
-/** Separator line between headers and message contents */
+/** Separator line between headers and message contents */
typedef msg_separator_t http_separator_t;
-/** Entity-body */
+/** Entity-body */
typedef msg_payload_t http_payload_t;
/** Time in seconds since 01-Jan-1900. */
typedef unsigned long http_time_t;
@@ -327,7 +327,7 @@
unsigned http_size; /**< Size of this structure */
int http_flags; /**< Flags */
http_error_t *http_error; /**< Erroneous headers */
-
+
http_request_t *http_request; /**< Request line */
http_status_t *http_status; /**< Status line */
@@ -389,19 +389,19 @@
/* === Headers end here */
http_header_t *http_unknown; /**< Unknown headers. */
- http_separator_t *http_separator;
+ http_separator_t *http_separator;
/**< Separator between message and payload */
http_payload_t *http_payload; /**< Message entity-body */
};
/**Union representing any HTTP header.
- *
+ *
* Each different header is an array of size 1.
- *
+ *
* @deprecated
*/
union http_header_u {
- msg_common_t sh_common[1];
+ msg_common_t sh_common[1];
struct {
msg_common_t shn_common;
http_header_t *shn_next;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_hclasses.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_hclasses.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_hclasses.h Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
/**@file sofia-sip/http_hclasses.h
* @brief HTTP header classes.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
*/
#ifndef MSG_TYPES_H
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_header.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <sofia-sip/http_header.h> has been included.*/
#define HTTP_HEADER_H
-/**@file sofia-sip/http_header.h
+/**@file sofia-sip/http_header.h
*
* HTTP library prototypes.
*
@@ -85,13 +85,13 @@
/** HTTP 1.0 */
SOFIAPUBVAR char const http_version_1_0[];
-/** HTTP 1.1 version. */
+/** HTTP 1.1 version. */
SOFIAPUBVAR char const http_version_1_1[];
#define HTTP_VERSION_CURRENT http_version_1_1
/* ----------------------------------------------------------------------
- * 3) Prototypes
+ * 3) Prototypes
*/
/** HTTP parser description. */
@@ -123,7 +123,7 @@
/** Add required headers to the response message */
SOFIAPUBFUN int http_complete_response(msg_t *msg,
- int status, char const *phrase,
+ int status, char const *phrase,
http_t const *request);
/** Return string corresponding to the method. */
@@ -139,9 +139,9 @@
SOFIAPUBFUN int http_header_remove(msg_t *msg, http_t *http, http_header_t *h);
SOFIAPUBFUN char const *http_header_name(http_header_t const *h, int compact);
SOFIAPUBFUN void *http_header_data(http_header_t *h);
-SOFIAPUBFUN http_content_length_t *http_content_length_create(su_home_t *home,
+SOFIAPUBFUN http_content_length_t *http_content_length_create(su_home_t *home,
uint32_t n);
-SOFIAPUBFUN http_payload_t *http_payload_create(su_home_t *home,
+SOFIAPUBFUN http_payload_t *http_payload_create(su_home_t *home,
void const *data, usize_t len);
SOFIAPUBFUN http_separator_t *http_separator_create(su_home_t *home);
#endif
@@ -164,7 +164,7 @@
char const *version);
/** Create an @b Host header object. */
-SOFIAPUBFUN http_host_t *http_host_create(su_home_t *home,
+SOFIAPUBFUN http_host_t *http_host_create(su_home_t *home,
char const *host,
char const *port);
@@ -184,7 +184,7 @@
...);
/* ----------------------------------------------------------------------
- * 4) Inlined functions
+ * 4) Inlined functions
*/
#if SU_HAVE_INLINE
@@ -213,13 +213,13 @@
* @param http HTTP message structure to which header is added
* @param h list of header(s) to be added
*/
-su_inline
+su_inline
int http_header_insert(msg_t *msg, http_t *http, http_header_t *h)
{
return msg_header_insert(msg, (msg_pub_t *)http, (msg_header_t *)h);
}
-/** Remove a header from a HTTP message. */
+/** Remove a header from a HTTP message. */
su_inline
int http_header_remove(msg_t *msg, http_t *http, http_header_t *h)
{
@@ -243,19 +243,19 @@
return h && h != HTTP_NONE ? h->sh_class->hc_size + (char *)h : NULL;
}
-su_inline
+su_inline
http_content_length_t *http_content_length_create(su_home_t *home, uint32_t n)
{
return msg_content_length_create(home, n);
}
-su_inline
+su_inline
http_payload_t *http_payload_create(su_home_t *home, void const *data, isize_t len)
{
return msg_payload_create(home, data, len);
}
-su_inline
+su_inline
http_separator_t *http_separator_create(su_home_t *home)
{
return msg_separator_create(home);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_parser.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_parser.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_parser.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef HTTP_PARSER_H
/**Defined when <sofia-sip/http_parser.h> has been included.*/
-#define HTTP_PARSER_H
+#define HTTP_PARSER_H
/**@file sofia-sip/http_parser.h
* @brief Typedefs and prototypes used by HTTP parser.
*
@@ -102,7 +102,7 @@
char const *name);
/** Extract HTTP message body */
-SOFIAPUBFUN issize_t http_extract_body(msg_t *, http_t *,
+SOFIAPUBFUN issize_t http_extract_body(msg_t *, http_t *,
char b[], isize_t bsiz, int eos);
SOFIA_END_DECLS
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_protos.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_protos.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_protos.h.in Tue Dec 16 13:05:22 2008
@@ -32,12 +32,12 @@
/** Defined when <sofia-sip/http_protos.h> has been included. */
#define HTTP_PROTOS_H
-/**@file sofia-sip/http_protos.h
+/**@file sofia-sip/http_protos.h
*
* Macros for each HTTP header.
*
* #AUTO#
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*/
@@ -61,18 +61,18 @@
/**@addtogroup http_#xxxxxx#*/ /** @{ */
-enum {
+enum {
/** Hash of #xxxxxxx_xxxxxxx#. @internal*/
- http_#xxxxxx#_hash = #hash#
+ http_#xxxxxx#_hash = #hash#
};
/**Header class for HTTP #xxxxxxx_xxxxxxx#.
- *
+ *
* The header class http_#xxxxxx#_class defines how a HTTP
* #xxxxxxx_xxxxxxx# is parsed and printed. It also
* contains methods used by HTTP parser and other functions
* to manipulate the http_#xxxxxx#_t header structure.
- *
+ *
*/
SOFIAPUBVAR msg_hclass_t http_#xxxxxx#_class[];
@@ -85,28 +85,28 @@
SOFIAPUBFUN msg_print_f http_#xxxxxx#_e;
/**Initializer for structure http_#xxxxxx#_t.
- *
+ *
* A static http_#xxxxxx#_t structure must be initialized
* with the HTTP_#XXXXXX#_INIT() macro. For instance,
- * @code
- *
+ * @code
+ *
* http_#xxxxxx#_t http_#xxxxxx# = HTTP_#XXXXXX#_INIT;
- *
+ *
* @endcode
* @HI
*/
#define HTTP_#XXXXXX#_INIT() HTTP_HDR_INIT(#xxxxxx#)
/**Initialize a structure http_#xxxxxx#_t.
- *
+ *
* An http_#xxxxxx#_t structure can be initialized with the
* http_#xxxxxx#_init() function/macro. For instance,
* @code
- *
+ *
* http_#xxxxxx#_t http_#xxxxxx#;
- *
+ *
* http_#xxxxxx#_init(&http_#xxxxxx#);
- *
+ *
* @endcode
* @HI
*/
@@ -121,20 +121,20 @@
#endif
/**Test if header object is instance of http_#xxxxxx#_t.
- *
+ *
* The function http_is_#xxxxxx#() returns true (nonzero) if
* the header class is an instance of #xxxxxxx_xxxxxxx#
* object and false (zero) otherwise.
- *
+ *
* @param header pointer to the header structure to be tested
- *
+ *
* @return
* The function http_is_x#xxxxxx#() returns true (nonzero) if
* the header object is an instance of header #xxxxxx# and
* false (zero) otherwise.
*/
#if SU_HAVE_INLINE
-su_inline
+su_inline
int http_is_#xxxxxx#(http_header_t const *header)
{
return header && header->sh_class->hc_hash == http_#xxxxxx#_hash;
@@ -145,27 +145,27 @@
#endif
/**Duplicate (deep copy) @c http_#xxxxxx#_t.
- *
+ *
* The function http_#xxxxxx#_dup() duplicates a header
* structure @a hdr. If the header structure @a hdr
* contains a reference (@c hdr->x_next) to a list of
* headers, all the headers in the list are duplicated, too.
- *
+ *
* @param home memory home used to allocate new structure
* @param hdr header structure to be duplicated
- *
+ *
* When duplicating, all parameter lists and non-constant
* strings attached to the header are copied, too. The
* function uses given memory @a home to allocate all the
* memory areas used to copy the header.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = http_#xxxxxx#_dup(home, http->http_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function http_#xxxxxx#_dup() returns a pointer to the
* newly duplicated http_#xxxxxx#_t header structure, or NULL
@@ -174,34 +174,34 @@
#if SU_HAVE_INLINE
su_inline
#endif
-http_#xxxxxx#_t *http_#xxxxxx#_dup(su_home_t *home,
+http_#xxxxxx#_t *http_#xxxxxx#_dup(su_home_t *home,
http_#xxxxxx#_t const *hdr)
__attribute__((__malloc__));
/**Copy a http_#xxxxxx#_t header structure.
- *
+ *
* The function http_#xxxxxx#_copy() copies a header structure @a
* hdr. If the header structure @a hdr contains a reference (@c
* hdr->h_next) to a list of headers, all the headers in that
* list are copied, too. The function uses given memory @a home
* to allocate all the memory areas used to copy the header
* structure @a hdr.
- *
+ *
* @param home memory home used to allocate new structure
* @param hdr pointer to the header structure to be duplicated
- *
+ *
* When copying, only the header structure and parameter lists
* attached to it are duplicated. The new header structure
* retains all the references to the strings within the old @a
* header, including the encoding of the old header, if present.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = http_#xxxxxx#_copy(home, http->http_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function http_#xxxxxx#_copy() returns a pointer to
* newly copied header structure, or NULL upon an error.
@@ -209,23 +209,23 @@
#if SU_HAVE_INLINE
su_inline
#endif
-http_#xxxxxx#_t *http_#xxxxxx#_copy(su_home_t *home,
+http_#xxxxxx#_t *http_#xxxxxx#_copy(su_home_t *home,
http_#xxxxxx#_t const *hdr)
__attribute__((__malloc__));
/**Make a header structure http_#xxxxxx#_t.
- *
+ *
* The function http_#xxxxxx#_make() makes a new
* http_#xxxxxx#_t header structure. It allocates a new
* header structure, and decodes the string @a s as the
* value of the structure.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param s string to be decoded as value of the new header structure
- *
+ *
* @note This function is usually implemented as a macro calling
* http_header_make().
- *
+ *
* @return
* The function http_#xxxxxx#_make() returns a pointer to
* newly maked http_#xxxxxx#_t header structure, or NULL upon
@@ -238,25 +238,25 @@
__attribute__((__malloc__));
/**Make a #xxxxxxx_xxxxxxx# from formatting result.
- *
+ *
* The function http_#xxxxxx#_format() makes a new
* #xxxxxxx_xxxxxxx# object using formatting result as its
* value. The function first prints the arguments according to
* the format @a fmt specified. Then it allocates a new header
* structure, and uses the formatting result as the header
* value.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param fmt string used as a printf()-style format
* @param ... argument list for format
- *
+ *
* @note This function is usually implemented as a macro calling
* msg_header_format().
- *
+ *
* @return
* The function http_#xxxxxx#_format() returns a pointer to newly
* makes header structure, or NULL upon an error.
- *
+ *
* @HIDE
*/
#if SU_HAVE_INLINE
@@ -273,29 +273,29 @@
{
http_header_t *h;
va_list ap;
-
+
va_start(ap, fmt);
h = http_header_vformat(home, http_#xxxxxx#_class, fmt, ap);
va_end(ap);
-
+
return (http_#xxxxxx#_t *)h;
}
su_inline
-http_#xxxxxx#_t *http_#xxxxxx#_dup(su_home_t *home, http_#xxxxxx#_t const *o)
-{
+http_#xxxxxx#_t *http_#xxxxxx#_dup(su_home_t *home, http_#xxxxxx#_t const *o)
+{
return (http_#xxxxxx#_t *)
msg_header_dup_as(home, http_#xxxxxx#_class, (msg_header_t const *)o);
}
su_inline
-http_#xxxxxx#_t *http_#xxxxxx#_copy(su_home_t *home, http_#xxxxxx#_t const *o)
-{
+http_#xxxxxx#_t *http_#xxxxxx#_copy(su_home_t *home, http_#xxxxxx#_t const *o)
+{
return (http_#xxxxxx#_t *)
- msg_header_copy_as(home, http_#xxxxxx#_class, (msg_header_t const *)o);
+ msg_header_copy_as(home, http_#xxxxxx#_class, (msg_header_t const *)o);
}
-su_inline
+su_inline
http_#xxxxxx#_t *http_#xxxxxx#_make(su_home_t *home, char const *s)
{
return (http_#xxxxxx#_t *)http_header_make(home, http_#xxxxxx#_class, s);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_status.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_status.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_status.h Tue Dec 16 13:05:22 2008
@@ -22,10 +22,10 @@
*
*/
-#ifndef HTTP_STATUS_H
-#define HTTP_STATUS_H
+#ifndef HTTP_STATUS_H
+#define HTTP_STATUS_H
-/**@file sofia-sip/http_status.h
+/**@file sofia-sip/http_status.h
*
* HTTP status codes.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag.h.in Tue Dec 16 13:05:22 2008
@@ -105,7 +105,7 @@
#if SU_INLINE_TAG_CAST
su_inline
tag_value_t httptag_http_v(http_t const *v) { return (tag_value_t)v; }
-su_inline
+su_inline
tag_value_t httptag_http_vr(http_t const **vp) { return (tag_value_t)vp; }
#else
#define httptag_http_v(v) (tag_value_t)(v)
@@ -131,8 +131,8 @@
/**Tag list item for header string.
*
* The HTTPTAG_HEADER() macro is used to include a tag item containing an
- * unknown HTTP header in the tag list, e.g.,
- * @code
+ * unknown HTTP header in the tag list, e.g.,
+ * @code
* http_header_t *hdr;
*
* HTTPTAG_HEADER(hdr).
@@ -199,7 +199,7 @@
*
* Tag list item for string with #xxxxxxx_xxxxxxx# value.
*
- * The HTTPTAG_#XXXXXX#_STR() macro is used to include a tag item with a
+ * The HTTPTAG_#XXXXXX#_STR() macro is used to include a tag item with a
* string containing value of a http_#xxxxxx#_t header in a tag list.
*
* @param s pointer to a string containing http_#xxxxxx#_t value, or NULL.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag_class.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag_class.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag_class.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef HTTP_TAG_CLASS_H
/**Defined when http_tag_class.h have been included*/
-#define HTTP_TAG_CLASS_H
+#define HTTP_TAG_CLASS_H
/**@file sofia-sip/http_tag_class.h
* @brief Tag classes for HTTP headers.
@@ -62,9 +62,9 @@
{{ TAG_NAMESPACE, #t, httpmsgtag_class, \
(tag_value_t)HTTP_PROTOCOL_TAG }}
-/**@internal Filter HTTP header tag items. */
+/**@internal Filter HTTP header tag items. */
SOFIAPUBFUN tagi_t *httptag_filter(tagi_t *dst, tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **bb);
SOFIA_END_DECLS
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/http/test_http.c Tue Dec 16 13:05:22 2008
@@ -189,7 +189,7 @@
for (i = 0; i < n;) {
/* This prevent msg_recv_iovec() from allocating extra slack */
int msg_buf_exact(msg_t *, int);
- msg_buf_exact(msg, 10 + 1);
+ msg_buf_exact(msg, 10 + 1);
if (msg_recv_iovec(msg, iovec, msg_n_fragments, 10, 0) < 0) {
perror("msg_recv_iovec");
@@ -1008,7 +1008,7 @@
"CUSTOMER=WILE_E_COYOTE; "
"path=/; "
"expires=Wednesday, 09-Nov-99 23:12:40 GMT");
-
+
TEST_1(sc);
TEST_1(sc->sc_params);
TEST_S(sc->sc_name, "CUSTOMER=WILE_E_COYOTE");
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/base64.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/base64.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/base64.c Tue Dec 16 13:05:22 2008
@@ -36,7 +36,7 @@
#include <string.h>
#include "sofia-sip/base64.h"
-static unsigned char const code[] =
+static unsigned char const code[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
#define B64NOP 128
@@ -48,22 +48,22 @@
* stores the result in the buffer @a buf of @a bsiz bytes.
*
* If the @a buf is NULL, the function just returns the length of decoded
- * data. In any case, no decoded data is stored in @a buf beyond @a bsiz.
+ * data. In any case, no decoded data is stored in @a buf beyond @a bsiz.
* The function always returns the full length of decodable data.
- *
+ *
* @param buf Buffer to store decoded data
* @param bsiz Size of @a buf
* @param b64s Base64-encoded string.
*
- * @return Length of data that can be decoded in bytes.
+ * @return Length of data that can be decoded in bytes.
*
- * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
+ * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
* <i>"Multipurpose Internet Mail Extensions (MIME) Part One:
* Format of Internet Message Bodies"</i>,
* N. Freed, N. Borenstein, November 1996.
*
* @par Example
- * The following example code decodes a string of BASE64 data into a
+ * The following example code decodes a string of BASE64 data into a
* memory area allocated from heap:
* @code
* int decoder(char const *encoded, void **return_decoded)
@@ -76,7 +76,7 @@
* }
* @endcode
*/
-isize_t base64_d(char buf[], isize_t bsiz, char const *b64s)
+isize_t base64_d(char buf[], isize_t bsiz, char const *b64s)
{
static unsigned char decode[256] = "";
unsigned char const *s = (unsigned char const *)b64s;
@@ -90,7 +90,7 @@
if (decode['\0'] != B64EOF) {
/* Prepare decoding table */
for (i = 1; i < 256; i++)
- decode[i] = B64NOP;
+ decode[i] = B64NOP;
for (i = 0; i < 64; i++) {
decode[code[i]] = (unsigned char)i;
@@ -104,17 +104,17 @@
if (c != B64NOP)
len++;
}
-
+
total_len = len = len * 3 / 4;
if (buf == NULL || bsiz == 0)
return total_len;
- if (len > bsiz)
+ if (len > bsiz)
len = bsiz;
-
+
for (i = 0, s = (unsigned char const *)b64s; i < len; ) {
-
+
while ((b1 = decode[*s++]) == B64NOP)
;
if (b1 != B64EOF)
@@ -126,7 +126,7 @@
if (b3 != B64EOF)
while ((b4 = decode[*s++]) == B64NOP)
;
-
+
if (((b1 | b2 | b3 | b4) & (B64NOP|B64EOF)) == 0) {
/* Normal case, 4 B64 chars to 3 data bytes */
w = (b1 << 18) | (b2 << 12) | (b3 << 6) | b4;
@@ -163,8 +163,8 @@
}
/**Encode data with BASE64.
- *
- * The function base64_e() encodes @a dsiz bytes of @a data into @a buf.
+ *
+ * The function base64_e() encodes @a dsiz bytes of @a data into @a buf.
*
* @note The function base64_e() uses at most @a bsiz bytes from @a buf.
*
@@ -183,13 +183,13 @@
* @return The function base64_e() return length of encoded string,
* excluding the final NUL.
*
- * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
+ * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
* <i>"Multipurpose Internet Mail Extensions (MIME) Part One:
* Format of Internet Message Bodies"</i>,
* N. Freed, N. Borenstein, November 1996.
*
*/
-isize_t base64_e(char buf[], isize_t bsiz, void *data, isize_t dsiz)
+isize_t base64_e(char buf[], isize_t bsiz, void *data, isize_t dsiz)
{
unsigned char *s = (unsigned char *)buf;
unsigned char *b = (unsigned char *)data;
@@ -200,7 +200,7 @@
if (bsize == 0)
s = NULL;
-
+
for (i = 0, n = 0; i < dsize; i += 3, n += 4) {
w = (b[i] << 16) | (b[i+1] << 8) | b[i+2];
@@ -211,9 +211,9 @@
s[n + 2] = code[(w >> 6) & 63];
s[n + 3] = code[(w) & 63];
} else {
- if (n + 1 < bsize)
+ if (n + 1 < bsize)
s[n + 0] = code[(w >> 18) & 63];
- if (n + 2 < bsize)
+ if (n + 2 < bsize)
s[n + 1] = code[(w >> 12) & 63];
if (n + 3 < bsize)
s[n + 2] = code[(w >> 6) & 63];
@@ -221,8 +221,8 @@
s = NULL;
}
}
- }
-
+ }
+
if (slack) {
if (s) {
if (slack == 2)
@@ -230,7 +230,7 @@
else
w = (b[i] << 16);
- if (n + 1 < bsize)
+ if (n + 1 < bsize)
s[n + 0] = code[(w >> 18) & 63];
if (n + 2 < bsize)
s[n + 1] = code[(w >> 12) & 63];
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ipt.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ipt.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ipt.docs Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
/* -*- c -*- */
/**@MODULEPAGE "ipt" - Utility Module
- *
+ *
* @section ipt_meta Module Meta Information
*
* Utility library for IP Telephony applications.
@@ -14,7 +14,7 @@
*
* @section ipt_overview Overview
*
- * This module contain some routines useful for IPT applications, like
+ * This module contain some routines useful for IPT applications, like
* - <sofia-sip/base64.h> BASE64 encoding/decoding, and
* - <sofia-sip/token64.h> encoding/decoding binary as SIP/HTTP token.
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/rc4.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/rc4.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/rc4.c Tue Dec 16 13:05:22 2008
@@ -37,40 +37,40 @@
const rc4_u8 *seed = (const rc4_u8 *)vseed;
rc4_u8 *array = state->rc4_array;
- state->rc4_i = 0;
- state->rc4_j = 0;
+ state->rc4_i = 0;
+ state->rc4_j = 0;
- for (i = 0; i < 256; i++)
- array[i] = (rc4_u8) i;
+ for (i = 0; i < 256; i++)
+ array[i] = (rc4_u8) i;
- for (i = 0, j = 0, k = 0;
- i < 256;
+ for (i = 0, j = 0, k = 0;
+ i < 256;
i++, k++, k >= seed_len ? k = 0 : 0) {
rc4_u8 a = array[i];
rc4_u8 b = array[j += a + seed[k]];
array[i] = b;
array[j] = a;
- }
+ }
}
-void rc4(void *buffer, isize_t len, rc4_t *state) {
+void rc4(void *buffer, isize_t len, rc4_t *state) {
rc4_u8 *buf = (rc4_u8 *)buffer;
rc4_u8 *array = state->rc4_array;
- rc4_u8 i = state->rc4_i;
+ rc4_u8 i = state->rc4_i;
rc4_u8 j = state->rc4_j;
-
- while (len-- > 0) {
- rc4_u8 a = array[++i];
+
+ while (len-- > 0) {
+ rc4_u8 a = array[++i];
rc4_u8 b = array[j += a];
array[i] = b;
array[j] = a;
- *buf++ ^= array[(a + b) & 255];
- }
+ *buf++ ^= array[(a + b) & 255];
+ }
- state->rc4_i = i;
+ state->rc4_i = i;
state->rc4_j = j;
}
@@ -90,114 +90,114 @@
rc4_u8 key_3[] = { 0xef, 0x01, 0x23, 0x45, };
rc4_u8 input_3[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
-rc4_u8 output_3[] = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, 0xbd, 0x61, };
+rc4_u8 output_3[] = { 0xd6, 0xa1, 0x41, 0xa7, 0xec, 0x3c, 0x38, 0xdf, 0xbd, 0x61, };
rc4_u8 key_4[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, };
-rc4_u8 input_4[] = {
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+rc4_u8 input_4[] = {
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, };
-rc4_u8 output_4[] = {
- 0x75, 0x95, 0xc3, 0xe6, 0x11, 0x4a, 0x09, 0x78, 0x0c, 0x4a, 0xd4,
- 0x52, 0x33, 0x8e, 0x1f, 0xfd, 0x9a, 0x1b, 0xe9, 0x49, 0x8f,
- 0x81, 0x3d, 0x76, 0x53, 0x34, 0x49, 0xb6, 0x77, 0x8d, 0xca,
- 0xd8, 0xc7, 0x8a, 0x8d, 0x2b, 0xa9, 0xac, 0x66, 0x08, 0x5d,
- 0x0e, 0x53, 0xd5, 0x9c, 0x26, 0xc2, 0xd1, 0xc4, 0x90, 0xc1,
- 0xeb, 0xbe, 0x0c, 0xe6, 0x6d, 0x1b, 0x6b, 0x1b, 0x13, 0xb6,
- 0xb9, 0x19, 0xb8, 0x47, 0xc2, 0x5a, 0x91, 0x44, 0x7a, 0x95,
- 0xe7, 0x5e, 0x4e, 0xf1, 0x67, 0x79, 0xcd, 0xe8, 0xbf, 0x0a,
- 0x95, 0x85, 0x0e, 0x32, 0xaf, 0x96, 0x89, 0x44, 0x4f, 0xd3,
- 0x77, 0x10, 0x8f, 0x98, 0xfd, 0xcb, 0xd4, 0xe7, 0x26, 0x56,
- 0x75, 0x00, 0x99, 0x0b, 0xcc, 0x7e, 0x0c, 0xa3, 0xc4, 0xaa,
- 0xa3, 0x04, 0xa3, 0x87, 0xd2, 0x0f, 0x3b, 0x8f, 0xbb, 0xcd,
- 0x42, 0xa1, 0xbd, 0x31, 0x1d, 0x7a, 0x43, 0x03, 0xdd, 0xa5,
- 0xab, 0x07, 0x88, 0x96, 0xae, 0x80, 0xc1, 0x8b, 0x0a, 0xf6,
- 0x6d, 0xff, 0x31, 0x96, 0x16, 0xeb, 0x78, 0x4e, 0x49, 0x5a,
- 0xd2, 0xce, 0x90, 0xd7, 0xf7, 0x72, 0xa8, 0x17, 0x47, 0xb6,
- 0x5f, 0x62, 0x09, 0x3b, 0x1e, 0x0d, 0xb9, 0xe5, 0xba, 0x53,
- 0x2f, 0xaf, 0xec, 0x47, 0x50, 0x83, 0x23, 0xe6, 0x71, 0x32,
- 0x7d, 0xf9, 0x44, 0x44, 0x32, 0xcb, 0x73, 0x67, 0xce, 0xc8,
- 0x2f, 0x5d, 0x44, 0xc0, 0xd0, 0x0b, 0x67, 0xd6, 0x50, 0xa0,
- 0x75, 0xcd, 0x4b, 0x70, 0xde, 0xdd, 0x77, 0xeb, 0x9b, 0x10,
- 0x23, 0x1b, 0x6b, 0x5b, 0x74, 0x13, 0x47, 0x39, 0x6d, 0x62,
- 0x89, 0x74, 0x21, 0xd4, 0x3d, 0xf9, 0xb4, 0x2e, 0x44, 0x6e,
- 0x35, 0x8e, 0x9c, 0x11, 0xa9, 0xb2, 0x18, 0x4e, 0xcb, 0xef,
- 0x0c, 0xd8, 0xe7, 0xa8, 0x77, 0xef, 0x96, 0x8f, 0x13, 0x90,
- 0xec, 0x9b, 0x3d, 0x35, 0xa5, 0x58, 0x5c, 0xb0, 0x09, 0x29,
- 0x0e, 0x2f, 0xcd, 0xe7, 0xb5, 0xec, 0x66, 0xd9, 0x08, 0x4b,
- 0xe4, 0x40, 0x55, 0xa6, 0x19, 0xd9, 0xdd, 0x7f, 0xc3, 0x16,
- 0x6f, 0x94, 0x87, 0xf7, 0xcb, 0x27, 0x29, 0x12, 0x42, 0x64,
- 0x45, 0x99, 0x85, 0x14, 0xc1, 0x5d, 0x53, 0xa1, 0x8c, 0x86,
- 0x4c, 0xe3, 0xa2, 0xb7, 0x55, 0x57, 0x93, 0x98, 0x81, 0x26,
- 0x52, 0x0e, 0xac, 0xf2, 0xe3, 0x06, 0x6e, 0x23, 0x0c, 0x91,
- 0xbe, 0xe4, 0xdd, 0x53, 0x04, 0xf5, 0xfd, 0x04, 0x05, 0xb3,
- 0x5b, 0xd9, 0x9c, 0x73, 0x13, 0x5d, 0x3d, 0x9b, 0xc3, 0x35,
- 0xee, 0x04, 0x9e, 0xf6, 0x9b, 0x38, 0x67, 0xbf, 0x2d, 0x7b,
- 0xd1, 0xea, 0xa5, 0x95, 0xd8, 0xbf, 0xc0, 0x06, 0x6f, 0xf8,
- 0xd3, 0x15, 0x09, 0xeb, 0x0c, 0x6c, 0xaa, 0x00, 0x6c, 0x80,
- 0x7a, 0x62, 0x3e, 0xf8, 0x4c, 0x3d, 0x33, 0xc1, 0x95, 0xd2,
- 0x3e, 0xe3, 0x20, 0xc4, 0x0d, 0xe0, 0x55, 0x81, 0x57, 0xc8,
- 0x22, 0xd4, 0xb8, 0xc5, 0x69, 0xd8, 0x49, 0xae, 0xd5, 0x9d,
- 0x4e, 0x0f, 0xd7, 0xf3, 0x79, 0x58, 0x6b, 0x4b, 0x7f, 0xf6,
- 0x84, 0xed, 0x6a, 0x18, 0x9f, 0x74, 0x86, 0xd4, 0x9b, 0x9c,
- 0x4b, 0xad, 0x9b, 0xa2, 0x4b, 0x96, 0xab, 0xf9, 0x24, 0x37,
- 0x2c, 0x8a, 0x8f, 0xff, 0xb1, 0x0d, 0x55, 0x35, 0x49, 0x00,
- 0xa7, 0x7a, 0x3d, 0xb5, 0xf2, 0x05, 0xe1, 0xb9, 0x9f, 0xcd,
- 0x86, 0x60, 0x86, 0x3a, 0x15, 0x9a, 0xd4, 0xab, 0xe4, 0x0f,
- 0xa4, 0x89, 0x34, 0x16, 0x3d, 0xdd, 0xe5, 0x42, 0xa6, 0x58,
- 0x55, 0x40, 0xfd, 0x68, 0x3c, 0xbf, 0xd8, 0xc0, 0x0f, 0x12,
- 0x12, 0x9a, 0x28, 0x4d, 0xea, 0xcc, 0x4c, 0xde, 0xfe, 0x58,
- 0xbe, 0x71, 0x37, 0x54, 0x1c, 0x04, 0x71, 0x26, 0xc8, 0xd4,
- 0x9e, 0x27, 0x55, 0xab, 0x18, 0x1a, 0xb7, 0xe9, 0x40, 0xb0,
+rc4_u8 output_4[] = {
+ 0x75, 0x95, 0xc3, 0xe6, 0x11, 0x4a, 0x09, 0x78, 0x0c, 0x4a, 0xd4,
+ 0x52, 0x33, 0x8e, 0x1f, 0xfd, 0x9a, 0x1b, 0xe9, 0x49, 0x8f,
+ 0x81, 0x3d, 0x76, 0x53, 0x34, 0x49, 0xb6, 0x77, 0x8d, 0xca,
+ 0xd8, 0xc7, 0x8a, 0x8d, 0x2b, 0xa9, 0xac, 0x66, 0x08, 0x5d,
+ 0x0e, 0x53, 0xd5, 0x9c, 0x26, 0xc2, 0xd1, 0xc4, 0x90, 0xc1,
+ 0xeb, 0xbe, 0x0c, 0xe6, 0x6d, 0x1b, 0x6b, 0x1b, 0x13, 0xb6,
+ 0xb9, 0x19, 0xb8, 0x47, 0xc2, 0x5a, 0x91, 0x44, 0x7a, 0x95,
+ 0xe7, 0x5e, 0x4e, 0xf1, 0x67, 0x79, 0xcd, 0xe8, 0xbf, 0x0a,
+ 0x95, 0x85, 0x0e, 0x32, 0xaf, 0x96, 0x89, 0x44, 0x4f, 0xd3,
+ 0x77, 0x10, 0x8f, 0x98, 0xfd, 0xcb, 0xd4, 0xe7, 0x26, 0x56,
+ 0x75, 0x00, 0x99, 0x0b, 0xcc, 0x7e, 0x0c, 0xa3, 0xc4, 0xaa,
+ 0xa3, 0x04, 0xa3, 0x87, 0xd2, 0x0f, 0x3b, 0x8f, 0xbb, 0xcd,
+ 0x42, 0xa1, 0xbd, 0x31, 0x1d, 0x7a, 0x43, 0x03, 0xdd, 0xa5,
+ 0xab, 0x07, 0x88, 0x96, 0xae, 0x80, 0xc1, 0x8b, 0x0a, 0xf6,
+ 0x6d, 0xff, 0x31, 0x96, 0x16, 0xeb, 0x78, 0x4e, 0x49, 0x5a,
+ 0xd2, 0xce, 0x90, 0xd7, 0xf7, 0x72, 0xa8, 0x17, 0x47, 0xb6,
+ 0x5f, 0x62, 0x09, 0x3b, 0x1e, 0x0d, 0xb9, 0xe5, 0xba, 0x53,
+ 0x2f, 0xaf, 0xec, 0x47, 0x50, 0x83, 0x23, 0xe6, 0x71, 0x32,
+ 0x7d, 0xf9, 0x44, 0x44, 0x32, 0xcb, 0x73, 0x67, 0xce, 0xc8,
+ 0x2f, 0x5d, 0x44, 0xc0, 0xd0, 0x0b, 0x67, 0xd6, 0x50, 0xa0,
+ 0x75, 0xcd, 0x4b, 0x70, 0xde, 0xdd, 0x77, 0xeb, 0x9b, 0x10,
+ 0x23, 0x1b, 0x6b, 0x5b, 0x74, 0x13, 0x47, 0x39, 0x6d, 0x62,
+ 0x89, 0x74, 0x21, 0xd4, 0x3d, 0xf9, 0xb4, 0x2e, 0x44, 0x6e,
+ 0x35, 0x8e, 0x9c, 0x11, 0xa9, 0xb2, 0x18, 0x4e, 0xcb, 0xef,
+ 0x0c, 0xd8, 0xe7, 0xa8, 0x77, 0xef, 0x96, 0x8f, 0x13, 0x90,
+ 0xec, 0x9b, 0x3d, 0x35, 0xa5, 0x58, 0x5c, 0xb0, 0x09, 0x29,
+ 0x0e, 0x2f, 0xcd, 0xe7, 0xb5, 0xec, 0x66, 0xd9, 0x08, 0x4b,
+ 0xe4, 0x40, 0x55, 0xa6, 0x19, 0xd9, 0xdd, 0x7f, 0xc3, 0x16,
+ 0x6f, 0x94, 0x87, 0xf7, 0xcb, 0x27, 0x29, 0x12, 0x42, 0x64,
+ 0x45, 0x99, 0x85, 0x14, 0xc1, 0x5d, 0x53, 0xa1, 0x8c, 0x86,
+ 0x4c, 0xe3, 0xa2, 0xb7, 0x55, 0x57, 0x93, 0x98, 0x81, 0x26,
+ 0x52, 0x0e, 0xac, 0xf2, 0xe3, 0x06, 0x6e, 0x23, 0x0c, 0x91,
+ 0xbe, 0xe4, 0xdd, 0x53, 0x04, 0xf5, 0xfd, 0x04, 0x05, 0xb3,
+ 0x5b, 0xd9, 0x9c, 0x73, 0x13, 0x5d, 0x3d, 0x9b, 0xc3, 0x35,
+ 0xee, 0x04, 0x9e, 0xf6, 0x9b, 0x38, 0x67, 0xbf, 0x2d, 0x7b,
+ 0xd1, 0xea, 0xa5, 0x95, 0xd8, 0xbf, 0xc0, 0x06, 0x6f, 0xf8,
+ 0xd3, 0x15, 0x09, 0xeb, 0x0c, 0x6c, 0xaa, 0x00, 0x6c, 0x80,
+ 0x7a, 0x62, 0x3e, 0xf8, 0x4c, 0x3d, 0x33, 0xc1, 0x95, 0xd2,
+ 0x3e, 0xe3, 0x20, 0xc4, 0x0d, 0xe0, 0x55, 0x81, 0x57, 0xc8,
+ 0x22, 0xd4, 0xb8, 0xc5, 0x69, 0xd8, 0x49, 0xae, 0xd5, 0x9d,
+ 0x4e, 0x0f, 0xd7, 0xf3, 0x79, 0x58, 0x6b, 0x4b, 0x7f, 0xf6,
+ 0x84, 0xed, 0x6a, 0x18, 0x9f, 0x74, 0x86, 0xd4, 0x9b, 0x9c,
+ 0x4b, 0xad, 0x9b, 0xa2, 0x4b, 0x96, 0xab, 0xf9, 0x24, 0x37,
+ 0x2c, 0x8a, 0x8f, 0xff, 0xb1, 0x0d, 0x55, 0x35, 0x49, 0x00,
+ 0xa7, 0x7a, 0x3d, 0xb5, 0xf2, 0x05, 0xe1, 0xb9, 0x9f, 0xcd,
+ 0x86, 0x60, 0x86, 0x3a, 0x15, 0x9a, 0xd4, 0xab, 0xe4, 0x0f,
+ 0xa4, 0x89, 0x34, 0x16, 0x3d, 0xdd, 0xe5, 0x42, 0xa6, 0x58,
+ 0x55, 0x40, 0xfd, 0x68, 0x3c, 0xbf, 0xd8, 0xc0, 0x0f, 0x12,
+ 0x12, 0x9a, 0x28, 0x4d, 0xea, 0xcc, 0x4c, 0xde, 0xfe, 0x58,
+ 0xbe, 0x71, 0x37, 0x54, 0x1c, 0x04, 0x71, 0x26, 0xc8, 0xd4,
+ 0x9e, 0x27, 0x55, 0xab, 0x18, 0x1a, 0xb7, 0xe9, 0x40, 0xb0,
0xc0, };
#include <stdio.h>
@@ -210,7 +210,7 @@
for (i = 0; i < len; i++) {
printf("0x%02x ", data[i]);
}
-
+
putchar('\n');
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/base64.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/base64.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/base64.h Tue Dec 16 13:05:22 2008
@@ -34,10 +34,10 @@
* [A-Za-z0-9+/=]. Base64 is defined as part of MIME mail format, but it is
* used widely by other text-based protocols as well.
*
- * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
+ * @sa <a href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>,
* <i>"Multipurpose Internet Mail Extensions (MIME) Part One:
* Format of Internet Message Bodies"</i>,
- * N. Freed, N. Borenstein,
+ * N. Freed, N. Borenstein,
* November 1996.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/rc4.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/rc4.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/rc4.h Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
/**@file sofia-sip/rc4.h
* @brief Arcfour random number generator.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Sun Jun 9 14:32:58 1996 ppessi
*/
@@ -45,21 +45,21 @@
/** Byte. */
typedef uint8_t rc4_u8;
-/** RC4 context.
- *
+/** RC4 context.
+ *
* The RC4 context is accessed and modified through rc4_init() and rc4()
* functions only.
*/
-typedef struct {
- uint8_t rc4_i;
+typedef struct {
+ uint8_t rc4_i;
uint8_t rc4_j;
- uint8_t rc4_array[256];
+ uint8_t rc4_array[256];
} rc4_t;
/** Key RC4 context. */
SOFIAPUBFUN void rc4_init(const void *seed, isize_t seed_len, rc4_t *state);
-/** Generate RC4 stream. */
+/** Generate RC4 stream. */
SOFIAPUBFUN void rc4(void *buffer, isize_t len, rc4_t *state);
#if defined(__cplusplus)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/uniqueid.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/uniqueid.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/uniqueid.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef UNIQUEID_H
/** Defined when <sofia-sip/uniqueid.h> has been included. */
-#define UNIQUEID_H
+#define UNIQUEID_H
/**@file sofia-sip/uniqueid.h
*
@@ -38,7 +38,7 @@
*/
/* Compatibility functionality */
-#define guid_t su_guid_t
+#define guid_t su_guid_t
#define guid_generate su_guid_generate
#define guid_sprintf su_guid_sprintf
#define guid_strlen su_guid_strlen
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/utf8.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/utf8.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/utf8.h Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
*
* @date Created: Tue Apr 21 15:32:38 1998 pessi
- * @sa <a href="ftp://ftp.ietf.org/rfc/rfc2279.txt">RFC 2279</a>,
+ * @sa <a href="ftp://ftp.ietf.org/rfc/rfc2279.txt">RFC 2279</a>,
* <i>"UTF-8, a transformation format of ISO 10646"</i>,
* F. Yergeau. January 1998.
*
@@ -83,7 +83,7 @@
int ucs4ncmp(ucs4 const *s1, ucs4 const *s2, size_t n);
/*
- * IS_UCS4_n tests whether UCS4 character should be represented
+ * IS_UCS4_n tests whether UCS4 character should be represented
* with 'n' byte utf8 string
*/
#define IS_UCS4_1(x) ((ucs4)(x) <= 0x7fu)
@@ -172,7 +172,7 @@
(s)[3]=((c>>12)&63)|128,\
(s)[4]=((c>>6)&63)|128,\
(s)[5]=((c)&63)|128)
-
+
SOFIA_END_DECLS
#endif /* UTF8_H */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/token64.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/token64.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/token64.c Tue Dec 16 13:05:22 2008
@@ -22,13 +22,13 @@
*
*/
-/**@internal @file token64.c
+/**@internal @file token64.c
*
* Token encoding.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
- * @date Created: Wed Apr 3 10:45:47 2002 ppessi
+ * @date Created: Wed Apr 3 10:45:47 2002 ppessi
*/
#include "config.h"
@@ -39,10 +39,10 @@
#include "sofia-sip/token64.h"
-static const char code[65] =
+static const char code[65] =
"0123456789-abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-/** Encode data as a SIP/HTTP token.
+/** Encode data as a SIP/HTTP token.
*
* @note
* A token is case-independent, so this is really not a good idea.
@@ -74,7 +74,7 @@
for (i = 0; i < dlen; i += 3, s += 4) {
unsigned char h0 = h[i], h1 = h[i + 1], h2 = h[i + 2];
-
+
s[0] = code[h0 >> 2];
s[1] = code[((h0 << 4)|(h1 >> 4)) & 63];
s[2] = code[((h1 << 4)|(h2 >> 6)) & 63];
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs2.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs2.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs2.c Tue Dec 16 13:05:22 2008
@@ -36,7 +36,7 @@
#include "utf8internal.h"
/*
- * Decode utf8 string into ucs2 string,
+ * Decode utf8 string into ucs2 string,
* return number of ucs2 characters decoded
*/
size_t ucs2decode(ucs2 *dst, size_t dst_size, const utf8 *s)
@@ -70,9 +70,9 @@
* Encode ucs2 string into utf8 string,
* return number of utf8 bytes encoded including final zero
*
- * 'quote' may contain an optional quoting table containing
+ * 'quote' may contain an optional quoting table containing
* non-zero for all ASCII characters to quote
- *
+ *
*/
size_t ucs2encode(utf8 *dst, const ucs2 *s, size_t n, const char quote[128])
{
@@ -131,7 +131,7 @@
{
size_t len = 1;
ucs2 c;
-
+
while (n-- > 0) {
c = *s++;
if (c < 0x80u)
@@ -157,7 +157,7 @@
{
size_t len = 0;
- if (s) while (*s++)
+ if (s) while (*s++)
len++;
return len;
@@ -170,7 +170,7 @@
{
int retval = s1 - s2;
- if (s1 && s2)
+ if (s1 && s2)
while ((retval = (*s1 - *s2)) && (*s1++) && (*s2++))
;
@@ -184,7 +184,7 @@
{
int retval = 0;
- if (s1 && s2)
+ if (s1 && s2)
while (n-- > 0 && (retval = (*s1 - *s2)) && (*s1++) && (*s2++))
;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs4.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs4.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/ucs4.c Tue Dec 16 13:05:22 2008
@@ -35,7 +35,7 @@
#include "utf8internal.h"
/*
- * Decode utf8 string into ucs4 string,
+ * Decode utf8 string into ucs4 string,
* return number of ucs4 characters decoded
*/
size_t ucs4decode(ucs4 *dst, size_t dst_size, const utf8 *s)
@@ -75,9 +75,9 @@
* Encode ucs4 string into utf8 string,
* return number of utf8 bytes encoded including final zero
*
- * 'quote' may contain an optional quoting table containing
+ * 'quote' may contain an optional quoting table containing
* non-zero for all ASCII characters to quote
- *
+ *
*/
size_t ucs4encode(utf8 *dst, const ucs4 *s, size_t n, const char quote[128])
{
@@ -151,7 +151,7 @@
{
size_t len = 1;
ucs4 c;
-
+
while (n-- > 0) {
c = *s++;
if (c < 0x80u)
@@ -183,7 +183,7 @@
{
size_t len = 0;
- if (s) while (*s++)
+ if (s) while (*s++)
len++;
return len;
@@ -203,7 +203,7 @@
}
/*
- * Compare UCS4 string prefix
+ * Compare UCS4 string prefix
*/
int ucs4ncmp(ucs4 const *s1, ucs4 const *s2, size_t n)
{
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8.c Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*
*/
-/**@CFILE utf8.c
+/**@CFILE utf8.c
*
* utf8 string handling.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8internal.h Tue Dec 16 13:05:22 2008
@@ -23,9 +23,9 @@
*/
#ifndef UTF8INTERNAL_H
-#define UTF8INTERNAL_H
+#define UTF8INTERNAL_H
-/**@IFILE utf8internal.h
+/**@IFILE utf8internal.h
* UTF-8 macros.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8test.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8test.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/utf8test.c Tue Dec 16 13:05:22 2008
@@ -38,27 +38,27 @@
int main(int argc, char *argv[])
{
- static ucs4 ucs4test0[] = {
+ static ucs4 ucs4test0[] = {
0x41u, 0xC1u, 0x841u, 0x10041u, 0x200041u, 0x4000041u, 0
};
- static utf8 ucs4test1[] =
- "A"
+ static utf8 ucs4test1[] =
+ "A"
"\303\201"
"\340\241\201"
"\360\220\201\201"
"\370\210\200\201\201"
"\374\204\200\200\201\201";
- static ucs2 ucs2test0[] = {
+ static ucs2 ucs2test0[] = {
0x41u, 0xC1u, 0x841u, 0
};
- static utf8 ucs2test1[] =
- "A"
+ static utf8 ucs2test1[] =
+ "A"
"\303\201"
"\340\241\201";
ucs4 ucs4s[1024] = { 0 };
- ucs2 ucs2s[1024] = { 0 };
+ ucs2 ucs2s[1024] = { 0 };
utf8 utf8s[1024] = { 0 };
size_t len;
@@ -124,7 +124,7 @@
else puts("OK");
/* UCS2 */
-
+
puts("testing ucs2len(ucs2test0)");
len = ucs2len(ucs2test0);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
PROJECT_NAME = "iptsec"
OUTPUT_DIRECTORY = ../docs/html/iptsec
-INPUT = @srcdir@/iptsec.docs @srcdir@/sofia-sip @srcdir@ .
+INPUT = @srcdir@/iptsec.docs @srcdir@/sofia-sip @srcdir@ .
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../docs/Doxyfile.conf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c Tue Dec 16 13:05:22 2008
@@ -57,14 +57,14 @@
#include <assert.h>
-static auth_client_t *ca_create(su_home_t *home,
+static auth_client_t *ca_create(su_home_t *home,
char const *scheme,
char const *realm);
static void ca_destroy(su_home_t *home, auth_client_t *ca);
static int ca_challenge(auth_client_t *ca,
- msg_auth_t const *auth,
+ msg_auth_t const *auth,
msg_hclass_t *credential_class,
char const *scheme,
char const *realm);
@@ -73,9 +73,9 @@
msg_auth_info_t const *ai,
msg_hclass_t *credential_class);
-static int ca_credentials(auth_client_t *ca,
+static int ca_credentials(auth_client_t *ca,
char const *scheme,
- char const *realm,
+ char const *realm,
char const *user,
char const *pass);
@@ -85,19 +85,19 @@
/** Initialize authenticators.
*
* The function auc_challenge() merges the challenge @a ch to the list of
- * authenticators @a auc_list.
+ * authenticators @a auc_list.
*
* @param[in,out] auc_list list of authenticators to be updated
* @param[in,out] home memory home used for allocating authenticators
* @param[in] ch challenge to be processed
* @param[in] crcl credential class
- *
+ *
* @retval 1 when challenge was updated
* @retval 0 when there was no new challenges
* @retval -1 upon an error
*/
int auc_challenge(auth_client_t **auc_list,
- su_home_t *home,
+ su_home_t *home,
msg_auth_t const *ch,
msg_hclass_t *crcl)
{
@@ -139,7 +139,7 @@
return retval;
}
-/** Update authentication client.
+/** Update authentication client.
*
* @retval -1 upon an error
* @retval 0 when challenge did not match
@@ -147,10 +147,10 @@
* @retval 2 when challenge did match and updated client
*/
static
-int ca_challenge(auth_client_t *ca,
+int ca_challenge(auth_client_t *ca,
msg_auth_t const *ch,
msg_hclass_t *credential_class,
- char const *scheme,
+ char const *scheme,
char const *realm)
{
int stale = 0;
@@ -165,7 +165,7 @@
if (strcmp(ca->ca_realm, realm))
return 0;
- if (ca->ca_credential_class &&
+ if (ca->ca_credential_class &&
ca->ca_credential_class != credential_class)
return 0;
@@ -205,7 +205,7 @@
* processed.
*
* @bug
- * In principle, SIP allows more than one challenge for a single request.
+ * In principle, SIP allows more than one challenge for a single request.
* For example, there can be multiple proxies that each challenge the
* client. The result of storing authentication info can be quite unexpected
* if there are more than one authenticator with the given type (specified
@@ -238,7 +238,7 @@
return retval;
}
-/** Update authentication client with authentication info.
+/** Update authentication client with authentication info.
*
* @retval -1 upon an error
* @retval 0 when challenge did not match
@@ -246,7 +246,7 @@
* @retval 2 when challenge did match and updated client
*/
static
-int ca_info(auth_client_t *ca,
+int ca_info(auth_client_t *ca,
msg_auth_info_t const *info,
msg_hclass_t *credential_class)
{
@@ -262,7 +262,7 @@
return 0;
if (!ca->ca_auc
- || (size_t)ca->ca_auc->auc_plugin_size <=
+ || (size_t)ca->ca_auc->auc_plugin_size <=
offsetof(auth_client_plugin_t, auc_info)
|| !ca->ca_auc->auc_info)
return 0;
@@ -283,14 +283,14 @@
*
* @todo The authentication data format sucks.
*
- * @param[in,out] auc_list list of authenticators
+ * @param[in,out] auc_list list of authenticators
* @param[in,out] home memory home used for allocations
* @param[in] data colon-separated authentication data
- *
+ *
* @retval 0 when successful
* @retval -1 upon an error
*/
-int auc_credentials(auth_client_t **auc_list, su_home_t *home,
+int auc_credentials(auth_client_t **auc_list, su_home_t *home,
char const *data)
{
int retval = 0, match;
@@ -317,7 +317,7 @@
retval = -1;
break;
}
- if (match)
+ if (match)
retval++;
}
}
@@ -330,25 +330,25 @@
/**Feed authentication data to the authenticator.
*
* The function auc_credentials() is used to provide the authenticators in
- * with authentication tuple (scheme, realm, user name, secret).
+ * with authentication tuple (scheme, realm, user name, secret).
*
* scheme:"realm":user:pass
*
* @todo The authentication data format sucks.
*
- * @param[in,out] auc_list list of authenticators
+ * @param[in,out] auc_list list of authenticators
* @param[in] scheme scheme to use (NULL, if any)
* @param[in] realm realm to use (NULL, if any)
- * @param[in] user username
+ * @param[in] user username
* @param[in] pass password
- *
+ *
* @retval number of updated clients
* @retval 0 when no client was updated
* @retval -1 upon an error
*/
-int auc_all_credentials(auth_client_t **auc_list,
+int auc_all_credentials(auth_client_t **auc_list,
char const *scheme,
- char const *realm,
+ char const *realm,
char const *user,
char const *pass)
{
@@ -363,7 +363,7 @@
match = ca_credentials(*auc_list, scheme, realm, user, pass);
if (match < 0)
return -1;
- if (match)
+ if (match)
retval++;
}
}
@@ -371,9 +371,9 @@
return retval;
}
-int ca_credentials(auth_client_t *ca,
+int ca_credentials(auth_client_t *ca,
char const *scheme,
- char const *realm,
+ char const *realm,
char const *user,
char const *pass)
{
@@ -465,21 +465,21 @@
return retval;
}
-
+
/**Clear authentication data from the authenticator.
*
* The function auc_clear_credentials() is used to remove the credentials
* from the authenticators.
*
- * @param[in,out] auc_list list of authenticators
- * @param[in] scheme scheme (if non-null, remove only matching credentials)
+ * @param[in,out] auc_list list of authenticators
+ * @param[in] scheme scheme (if non-null, remove only matching credentials)
* @param[in] realm realm (if non-null, remove only matching credentials)
*
* @retval 0 when successful
* @retval -1 upon an error
*/
-int auc_clear_credentials(auth_client_t **auc_list,
+int auc_clear_credentials(auth_client_t **auc_list,
char const *scheme,
char const *realm)
{
@@ -502,7 +502,7 @@
retval = -1;
break;
}
- if (match)
+ if (match)
retval++;
}
@@ -523,7 +523,7 @@
}
/** Check if we have all required credentials.
- *
+ *
* @retval 1 when authorization can proceed
* @retval 0 when there is not enough credentials
*
@@ -553,20 +553,20 @@
* headers to a request. The authentication headers will contain the
* credentials generated by the list of authenticators.
*
- * @param[in,out] auc_list list of authenticators
+ * @param[in,out] auc_list list of authenticators
* @param[out] msg message to be authenticated
* @param[out] pub headers of the message
* @param[in] method request method
* @param[in] url request URI
* @param[in] body message body (NULL if empty)
- *
+ *
* @retval 1 when successful
* @retval 0 when there is not enough credentials
* @retval -1 upon an error
*/
int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body)
{
auth_client_t *ca;
@@ -616,21 +616,21 @@
* authentication headers for a request. The list of authentication headers
* will contain the credentials generated by the list of authenticators.
*
- * @param[in] auc_list list of authenticators
+ * @param[in] auc_list list of authenticators
* @param[in] home memory home used to allocate headers
* @param[in] method request method
* @param[in] url request URI
* @param[in] body message body (NULL if empty)
* @param[out] return_headers authorization headers return value
- *
+ *
* @retval 1 when successful
* @retval 0 when there is not enough credentials
* @retval -1 upon an error
*/
-int auc_authorization_headers(auth_client_t **auc_list,
+int auc_authorization_headers(auth_client_t **auc_list,
su_home_t *home,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers)
{
@@ -666,13 +666,13 @@
static int auc_basic_authorization(auth_client_t *ca,
su_home_t *h,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **);
-static const auth_client_plugin_t ca_basic_plugin =
-{
+static const auth_client_plugin_t ca_basic_plugin =
+{
/* auc_plugin_size: */ sizeof ca_basic_plugin,
/* auc_size: */ sizeof (auth_client_t),
/* auc_name: */ "Basic",
@@ -694,15 +694,15 @@
* @param hc header class for the header to be created
* @param user user name
* @param pass password
- *
+ *
* @return
- * The function auc_basic_authorization() returns a pointer to newly created
+ * The function auc_basic_authorization() returns a pointer to newly created
* authorization header, or NULL upon an error.
*/
-int auc_basic_authorization(auth_client_t *ca,
+int auc_basic_authorization(auth_client_t *ca,
su_home_t *home,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers)
{
@@ -742,7 +742,7 @@
userpass[ulen] = ':';
memcpy(userpass + ulen + 1, pass, plen);
userpass[uplen] = '\0';
-
+
base64_e(base64, b64len + 1, userpass, uplen);
base64[b64len] = '\0';
@@ -767,22 +767,22 @@
auth_challenge_t cda_ac[1];
} auth_digest_client_t;
-static int auc_digest_challenge(auth_client_t *ca,
+static int auc_digest_challenge(auth_client_t *ca,
msg_auth_t const *ch);
-static int auc_digest_authorization(auth_client_t *ca,
+static int auc_digest_authorization(auth_client_t *ca,
su_home_t *h,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **);
-static int auc_digest_info(auth_client_t *ca,
+static int auc_digest_info(auth_client_t *ca,
msg_auth_info_t const *info);
-static const auth_client_plugin_t ca_digest_plugin =
-{
+static const auth_client_plugin_t ca_digest_plugin =
+{
/* auc_plugin_size: */ sizeof ca_digest_plugin,
/* auc_size: */ sizeof (auth_digest_client_t),
- /* auc_name: */ "Digest",
+ /* auc_name: */ "Digest",
/* auc_challenge: */ auc_digest_challenge,
/* auc_authorize: */ auc_digest_authorization,
/* auc_info: */ auc_digest_info,
@@ -866,15 +866,15 @@
* sip_authorization_class or sip_proxy_authorization_class, as well as
* http_authorization_class or http_proxy_authorization_class.
*
- * @retval 1 when authorization headers has been created
+ * @retval 1 when authorization headers has been created
* @retval 0 when there is no credentials
* @retval -1 upon an error
*/
static
-int auc_digest_authorization(auth_client_t *ca,
+int auc_digest_authorization(auth_client_t *ca,
su_home_t *home,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers)
{
@@ -923,7 +923,7 @@
auth_digest_sessionkey(ar, sessionkey, pass);
auth_digest_response(ar, response, sessionkey, method, data, dlen);
- h = msg_header_format(home, hc,
+ h = msg_header_format(home, hc,
"Digest "
"username=\"%s\", "
"realm=\"%s\", "
@@ -935,21 +935,21 @@
"response=\"%s\""
"%s%s"
"%s%s",
- ar->ar_username,
+ ar->ar_username,
ar->ar_realm,
ar->ar_nonce,
- cnonce ? "\", cnonce=\"" : "",
+ cnonce ? "\", cnonce=\"" : "",
cnonce ? cnonce : "",
- ar->ar_opaque ? "\", opaque=\"" : "",
+ ar->ar_opaque ? "\", opaque=\"" : "",
ar->ar_opaque ? ar->ar_opaque : "",
ar->ar_algorithm ? "\", algorithm=" : "",
ar->ar_algorithm ? ar->ar_algorithm : "",
ar->ar_uri,
response,
- ar->ar_auth || ar->ar_auth_int ? ", qop=" : "",
- ar->ar_auth_int ? "auth-int" :
+ ar->ar_auth || ar->ar_auth_int ? ", qop=" : "",
+ ar->ar_auth_int ? "auth-int" :
(ar->ar_auth ? "auth" : ""),
- cnonce ? ", nc=" : "",
+ cnonce ? ", nc=" : "",
cnonce ? ncount : "");
su_free(home, uri);
@@ -965,7 +965,7 @@
#define MAX_AUC 20
-static auth_client_plugin_t const *ca_plugins[MAX_AUC] =
+static auth_client_plugin_t const *ca_plugins[MAX_AUC] =
{
&ca_digest_plugin, &ca_basic_plugin, NULL
};
@@ -984,7 +984,7 @@
return errno = EINVAL, -1;
for (i = 0; i < MAX_AUC; i++) {
- if (ca_plugins[i] == NULL ||
+ if (ca_plugins[i] == NULL ||
strcmp(plugin->auc_name, ca_plugins[i]->auc_name) == 0) {
ca_plugins[i] = plugin;
return 0;
@@ -1051,10 +1051,10 @@
* headers to a SIP request. The authentication headers will contain the
* credentials generated by the list of authenticators.
*
- * @param[in,out] auc_list list of authenticators
+ * @param[in,out] auc_list list of authenticators
* @param[in,out] msg message to be authenticated
* @param[in,out] sip sip headers of the message
- *
+ *
* @retval 1 when successful
* @retval 0 when there is not enough credentials
* @retval -1 upon an error
@@ -1066,14 +1066,14 @@
if (!rq)
return 0;
- return auc_authorization(auc_list, msg, (msg_pub_t *)sip,
- rq->rq_method_name,
+ return auc_authorization(auc_list, msg, (msg_pub_t *)sip,
+ rq->rq_method_name,
/*
RFC 3261 defines the protection domain based
only on realm, so we do not bother get a
correct URI to auth module.
*/
- rq->rq_url,
+ rq->rq_url,
sip->sip_payload);
}
#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client_ntlm.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client_ntlm.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client_ntlm.c Tue Dec 16 13:05:22 2008
@@ -63,20 +63,20 @@
auth_challenge_t ntlm_ac[1];
} auth_ntlm_client_t;
-static int auc_ntlm_challenge(auth_client_t *ca,
+static int auc_ntlm_challenge(auth_client_t *ca,
msg_auth_t const *ch);
-static int auc_ntlm_authorization(auth_client_t *ca,
+static int auc_ntlm_authorization(auth_client_t *ca,
su_home_t *h,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **);
-auth_client_plugin_t const _ntlm_client_plugin =
-{
+auth_client_plugin_t const _ntlm_client_plugin =
+{
sizeof ca_ntlm_plugin,
sizeof (auth_ntlm_client_t),
- "NTLM",
+ "NTLM",
auc_ntlm_challenge,
auc_ntlm_authorization
};
@@ -142,7 +142,7 @@
* @param pass password
* @param ac challenge structure
* @param cnonce client nonce
- * @param nc client nonce count
+ * @param nc client nonce count
* @param method request method
* @param uri request uri
* @param data message body
@@ -152,10 +152,10 @@
* Returns a pointer to newly created authorization header, or NULL upon an
* error.
*/
-int auc_ntlm_authorization(auth_client_t *ca,
+int auc_ntlm_authorization(auth_client_t *ca,
su_home_t *home,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers)
{
@@ -201,7 +201,7 @@
auth_ntlm_sessionkey(ar, sessionkey, pass);
auth_ntlm_response(ar, response, sessionkey, method, data, dlen);
- h = msg_header_format(home, hc,
+ h = msg_header_format(home, hc,
"NTLM "
"username=\"%s\", "
"realm=\"%s\", "
@@ -213,21 +213,21 @@
"response=\"%s\""
"%s%s"
"%s%s",
- ar->ar_username,
+ ar->ar_username,
ar->ar_realm,
ar->ar_nonce,
- cnonce ? "\", cnonce=\"" : "",
+ cnonce ? "\", cnonce=\"" : "",
cnonce ? cnonce : "",
- ar->ar_opaque ? "\", opaque=\"" : "",
+ ar->ar_opaque ? "\", opaque=\"" : "",
ar->ar_opaque ? ar->ar_opaque : "",
ar->ar_algorithm ? "\", algorithm=" : "",
ar->ar_algorithm ? ar->ar_algorithm : "",
ar->ar_uri,
response,
- ar->ar_auth || ar->ar_auth_int ? ", qop=" : "",
- ar->ar_auth_int ? "auth-int" :
+ ar->ar_auth || ar->ar_auth_int ? ", qop=" : "",
+ ar->ar_auth_int ? "auth-int" :
(ar->ar_auth ? "auth" : ""),
- cnonce ? ", nc=" : "",
+ cnonce ? ", nc=" : "",
cnonce ? ncount : "");
su_free(home, uri);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_common.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_common.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_common.c Tue Dec 16 13:05:22 2008
@@ -54,7 +54,7 @@
* The function auth_get_params() searches for the authentication parameters
* in @a params. The parameter list @a params is seached for each parameter
* given in in vararg section, and if it is found, its value is assigned to
- * the given address.
+ * the given address.
*
* @note The field name should contain the equal ("=") sign.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_digest.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_digest.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_digest.c Tue Dec 16 13:05:22 2008
@@ -59,7 +59,7 @@
* found, or -1 upon an error.
*/
issize_t auth_digest_challenge_get(su_home_t *home,
- auth_challenge_t *ac0,
+ auth_challenge_t *ac0,
char const * const params[])
{
ssize_t n;
@@ -70,7 +70,7 @@
ac->ac_size = sizeof(ac);
- assert(ac0);
+ assert(ac0);
assert(ac0->ac_size >= (int) sizeof(*ac));
if (ac0 == NULL || params == NULL)
@@ -103,7 +103,7 @@
auth_struct_copy(ac0, ac, sizeof(ac));
SU_DEBUG_5(("%s(): got "MOD_ZD"\n", "auth_digest_challenge_get", n));
-
+
return n;
}
@@ -136,7 +136,7 @@
* found, or -1 upon an error.
*/
issize_t auth_digest_response_get(su_home_t *home,
- auth_response_t *ar0,
+ auth_response_t *ar0,
char const *const params[])
{
ssize_t n;
@@ -189,7 +189,7 @@
if (!quoted)
/*xyzzy*/;
else if (quoted[0] == '"') {
- char const *q;
+ char const *q;
size_t n;
for (q = quoted + 1; *q; q += n + 2) {
@@ -204,9 +204,9 @@
su_md5_strupdate(md5, quoted);
}
-/** Generate A1 hash for digest authentication.
+/** Generate A1 hash for digest authentication.
*/
-int auth_digest_a1(auth_response_t *ar,
+int auth_digest_a1(auth_response_t *ar,
auth_hexmd5_t ha1,
char const *secret)
{
@@ -222,13 +222,13 @@
su_md5_hexdigest(md5, ha1);
- SU_DEBUG_5(("auth_digest_a1() has A1 = MD5(%s:%s:%s) = %s\n",
+ SU_DEBUG_5(("auth_digest_a1() has A1 = MD5(%s:%s:%s) = %s\n",
ar->ar_username, ar->ar_realm, secret, ha1));
return 0;
}
-int auth_digest_a1sess(auth_response_t *ar,
+int auth_digest_a1sess(auth_response_t *ar,
auth_hexmd5_t ha1sess,
char const *ha1)
{
@@ -243,15 +243,15 @@
su_md5_hexdigest(md5, ha1sess);
- SU_DEBUG_5(("auth_sessionkey has A1' = MD5(%s:%s:%s) = %s\n",
+ SU_DEBUG_5(("auth_sessionkey has A1' = MD5(%s:%s:%s) = %s\n",
ha1, ar->ar_nonce, ar->ar_cnonce, ha1sess));
return 0;
}
-/** Generate MD5 session key for digest authentication.
+/** Generate MD5 session key for digest authentication.
*/
-int auth_digest_sessionkey(auth_response_t *ar,
+int auth_digest_sessionkey(auth_response_t *ar,
auth_hexmd5_t ha1,
char const *secret)
{
@@ -263,7 +263,7 @@
return -1;
if (ar->ar_md5sess) {
- auth_hexmd5_t base_ha1;
+ auth_hexmd5_t base_ha1;
auth_digest_a1(ar, base_ha1, secret);
auth_digest_a1sess(ar, ha1, base_ha1);
} else {
@@ -273,12 +273,12 @@
return 0;
}
-/** Generate response for digest authentication.
+/** Generate response for digest authentication.
*
*/
-int auth_digest_response(auth_response_t *ar,
+int auth_digest_response(auth_response_t *ar,
auth_hexmd5_t response,
- auth_hexmd5_t const ha1,
+ auth_hexmd5_t const ha1,
char const *method_name,
void const *data, isize_t dlen)
{
@@ -314,7 +314,7 @@
}
su_md5_hexdigest(md5, HA2);
- SU_DEBUG_5(("A2 = MD5(%s:%s%s%s)\n", method_name, ar->ar_uri,
+ SU_DEBUG_5(("A2 = MD5(%s:%s%s%s)\n", method_name, ar->ar_uri,
ar->ar_auth_int ? ":" : "", ar->ar_auth_int ? Hentity : ""));
/* Calculate response */
@@ -333,17 +333,17 @@
}
su_md5_update(md5, ":", 1);
- su_md5_update(md5, HA2, 32);
+ su_md5_update(md5, HA2, 32);
su_md5_hexdigest(md5, response);
- SU_DEBUG_5(("auth_response: %s = MD5(%s:%s%s%s%s%s%s%s:%s) (qop=%s)\n",
- response, ha1, ar->ar_nonce,
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_nc : "",
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_cnonce : "",
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_qop : "",
+ SU_DEBUG_5(("auth_response: %s = MD5(%s:%s%s%s%s%s%s%s:%s) (qop=%s)\n",
+ response, ha1, ar->ar_nonce,
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_nc : "",
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_cnonce : "",
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_qop : "",
HA2,
ar->ar_qop ? ar->ar_qop : "NONE"));
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c Tue Dec 16 13:05:22 2008
@@ -80,7 +80,7 @@
static void auth_md5_hmac_key(auth_mod_t *am);
HTABLE_PROTOS_WITH(auth_htable, aht, auth_passwd_t, usize_t, unsigned);
-HTABLE_BODIES_WITH(auth_htable, aht, auth_passwd_t, APW_HASH,
+HTABLE_BODIES_WITH(auth_htable, aht, auth_passwd_t, APW_HASH,
usize_t, unsigned);
/**Allocate an authentication module instance.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_http.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_http.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_http.c Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
/**@internal
* @file auth_module_http.c
* @brief Authenticate HTTP request
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
* @author Jari Urpalainen <Jari.Urpalainen at nokia.com>
*
@@ -43,10 +43,10 @@
#include <sofia-sip/auth_module.h>
-static auth_challenger_t http_server_challenger[] =
+static auth_challenger_t http_server_challenger[] =
{{ HTTP_401_UNAUTHORIZED, http_www_authenticate_class }};
-static auth_challenger_t http_proxy_challenger[] =
+static auth_challenger_t http_proxy_challenger[] =
{{ HTTP_407_PROXY_AUTH, http_proxy_authenticate_class }};
const char *auth_mod_check_http(auth_mod_t *am,
@@ -54,22 +54,22 @@
http_t const *http,
auth_kind_t proxy)
{
- msg_auth_t *credentials =
+ msg_auth_t *credentials =
proxy ? http->http_proxy_authorization : http->http_authorization;
- auth_challenger_t const *challenger =
+ auth_challenger_t const *challenger =
proxy ? http_proxy_challenger : http_server_challenger;
if (http->http_request) {
if (!as->as_method)
as->as_method = http->http_request->rq_method_name;
#if 0
- if (!as->as_uri)
+ if (!as->as_uri)
as->as_uri = http->http_request->rq_url;
#endif
}
if (http->http_payload && !as->as_body)
- as->as_body = http->http_payload->pl_data,
+ as->as_body = http->http_payload->pl_data,
as->as_bodylen = http->http_payload->pl_len;
/* Call real authentication method */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_sip.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module_sip.c Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
/**@internal
* @file auth_module_sip.c
* @brief Authenticate SIP request
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
* @author Jari Urpalainen <Jari.Urpalainen at nokia.com>
*
@@ -45,19 +45,19 @@
#include <sofia-sip/auth_module.h>
-static auth_challenger_t sip_server_challenger[] =
+static auth_challenger_t sip_server_challenger[] =
{{ SIP_401_UNAUTHORIZED, sip_www_authenticate_class,
sip_authentication_info_class
}};
-static auth_challenger_t sip_proxy_challenger[] =
+static auth_challenger_t sip_proxy_challenger[] =
{{ SIP_407_PROXY_AUTH_REQUIRED, sip_proxy_authenticate_class }};
-/** Authenticate an incoming SIP request.
+/** Authenticate an incoming SIP request.
*
* The function auth_mod_check() completes the @a as structure and calls the
* scheme-specific authentication method performing the actual
- * authentication.
+ * authentication.
*
* A successful authentication is indicated by setting @a as->as_status to
* 0. The authentication module sets @a as->as_match as the matching
@@ -86,7 +86,7 @@
as->as_method = sip->sip_request->rq_method_name;
if (sip->sip_payload)
- as->as_body = sip->sip_payload->pl_data,
+ as->as_body = sip->sip_payload->pl_data,
as->as_bodylen = sip->sip_payload->pl_len;
auth_mod_method(am, as, credentials, challenger);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_ntlm.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_ntlm.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_ntlm.c Tue Dec 16 13:05:22 2008
@@ -58,7 +58,7 @@
* found, or -1 upon an error.
*/
issize_t auth_ntlm_challenge_get(su_home_t *home,
- auth_challenge_t *ac0,
+ auth_challenge_t *ac0,
char const * const params[])
{
ssize_t n;
@@ -68,7 +68,7 @@
ac->ac_size = sizeof(ac);
- assert(ac0);
+ assert(ac0);
assert(ac0->ac_size >= sizeof(*ac));
if (ac0 == NULL || params == NULL)
@@ -103,7 +103,7 @@
auth_struct_copy(ac0, ac, sizeof(ac));
SU_DEBUG_5(("%s(): got %d\n", "auth_ntlm_challenge_get", n));
-
+
return n;
}
@@ -119,7 +119,7 @@
* found, or -1 upon an error.
*/
issize_t auth_ntlm_response_get(su_home_t *home,
- auth_response_t *ar0,
+ auth_response_t *ar0,
char const *const params[])
{
ssize_t n;
@@ -169,9 +169,9 @@
#if 0
-/** Generate A1 hash for digest authentication.
+/** Generate A1 hash for digest authentication.
*/
-int auth_digest_a1(auth_response_t *ar,
+int auth_digest_a1(auth_response_t *ar,
auth_hexmd5_t ha1,
char const *secret)
{
@@ -187,13 +187,13 @@
su_md5_hexdigest(md5, ha1);
- SU_DEBUG_5(("auth_digest_a1() has A1 = MD5(%s:%s:%s) = %s\n",
+ SU_DEBUG_5(("auth_digest_a1() has A1 = MD5(%s:%s:%s) = %s\n",
ar->ar_username, ar->ar_realm, secret, ha1));
return 0;
}
-int auth_digest_a1sess(auth_response_t *ar,
+int auth_digest_a1sess(auth_response_t *ar,
auth_hexmd5_t ha1sess,
char const *ha1)
{
@@ -208,15 +208,15 @@
su_md5_hexdigest(md5, ha1sess);
- SU_DEBUG_5(("auth_sessionkey has A1' = MD5(%s:%s:%s) = %s\n",
+ SU_DEBUG_5(("auth_sessionkey has A1' = MD5(%s:%s:%s) = %s\n",
ha1, ar->ar_nonce, ar->ar_cnonce, ha1sess));
return 0;
}
-/** Generate MD5 session key for digest authentication.
+/** Generate MD5 session key for digest authentication.
*/
-int auth_digest_sessionkey(auth_response_t *ar,
+int auth_digest_sessionkey(auth_response_t *ar,
auth_hexmd5_t ha1,
char const *secret)
{
@@ -228,7 +228,7 @@
return -1;
if (ar->ar_md5sess) {
- auth_hexmd5_t base_ha1;
+ auth_hexmd5_t base_ha1;
auth_digest_a1(ar, base_ha1, secret);
auth_digest_a1sess(ar, ha1, base_ha1);
} else {
@@ -243,12 +243,12 @@
#if 0
-/** Generate response for digest authentication.
+/** Generate response for digest authentication.
*
*/
-int auth_digest_response(auth_response_t *ar,
+int auth_digest_response(auth_response_t *ar,
auth_hexmd5_t response,
- auth_hexmd5_t const ha1,
+ auth_hexmd5_t const ha1,
char const *method_name,
void const *data, issize_t dlen)
{
@@ -284,7 +284,7 @@
}
su_md5_hexdigest(md5, HA2);
- SU_DEBUG_5(("A2 = MD5(%s:%s%s%s)\n", method_name, ar->ar_uri,
+ SU_DEBUG_5(("A2 = MD5(%s:%s%s%s)\n", method_name, ar->ar_uri,
ar->ar_auth_int ? ":" : "", ar->ar_auth_int ? Hentity : ""));
/* Calculate response */
@@ -303,17 +303,17 @@
}
su_md5_update(md5, ":", 1);
- su_md5_update(md5, HA2, 32);
+ su_md5_update(md5, HA2, 32);
su_md5_hexdigest(md5, response);
- SU_DEBUG_5(("auth_response: %s = MD5(%s:%s%s%s%s%s%s%s:%s) (qop=%s)\n",
- response, ha1, ar->ar_nonce,
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_nc : "",
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_cnonce : "",
- ar->ar_auth || ar->ar_auth_int ? ":" : "",
- ar->ar_auth || ar->ar_auth_int ? ar->ar_qop : "",
+ SU_DEBUG_5(("auth_response: %s = MD5(%s:%s%s%s%s%s%s%s:%s) (qop=%s)\n",
+ response, ha1, ar->ar_nonce,
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_nc : "",
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_cnonce : "",
+ ar->ar_auth || ar->ar_auth_int ? ":" : "",
+ ar->ar_auth || ar->ar_auth_int ? ar->ar_qop : "",
HA2,
ar->ar_qop ? ar->ar_qop : "NONE"));
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin.c Tue Dec 16 13:05:22 2008
@@ -25,9 +25,9 @@
/**@internal
* @file auth_plugin.c
* @brief Plugin interface for authentication verification modules.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Apr 27 15:23:31 2004 ppessi
*/
@@ -69,7 +69,7 @@
auth_scheme_delayed
};
-/** Register an authentication plugin.
+/** Register an authentication plugin.
*
* @retval 0 when successful
* @retval -1 upon an error
@@ -82,17 +82,17 @@
if (i == N)
return -1;
}
-
+
schemes[i] = asch;
return 0;
}
-/**Create an authentication plugin module.
+/**Create an authentication plugin module.
*
* The function auth_mod_create() creates a module used to authenticate the
* requests.
- *
+ *
* @param root pointer to a su_root_t object
* @param tag,value,... tagged argument list
*
@@ -123,7 +123,7 @@
size_t len;
base = strrchr(method, '+');
- if (base)
+ if (base)
len = base++ - method;
else
len = strlen(method);
@@ -132,7 +132,7 @@
;
else if (strcasecmp(base, "Basic") == 0)
bscheme = auth_scheme_basic;
- else if (strcasecmp(base, "Digest") == 0)
+ else if (strcasecmp(base, "Digest") == 0)
bscheme = auth_scheme_digest;
if (base == NULL || bscheme) {
@@ -152,6 +152,6 @@
}
ta_end(ta);
-
+
return am;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_delayed.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_delayed.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_delayed.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@CFILE auth_plugin_delayed.c
*
- * @brief Plugin for delayed authentication.
+ * @brief Plugin for delayed authentication.
*
* This authentication plugin provides authentication operation that is
* intentionally delayed. It serves as an example of server-side
@@ -61,7 +61,7 @@
#include "sofia-sip/auth_module.h"
#include "sofia-sip/auth_plugin.h"
-struct auth_plugin_t
+struct auth_plugin_t
{
su_root_t *ap_root;
auth_scheme_t *ap_base;
@@ -81,7 +81,7 @@
msg_auth_t *auth,
auth_challenger_t const *ach);
-static void delayed_auth_challenge(auth_mod_t *am,
+static void delayed_auth_challenge(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
@@ -89,12 +89,12 @@
static void delayed_auth_destroy(auth_mod_t *am);
-auth_scheme_t auth_scheme_delayed[1] =
+auth_scheme_t auth_scheme_delayed[1] =
{{
"Delayed",
sizeof (struct { auth_mod_t mod[1]; auth_plugin_t plug[1]; }),
delayed_auth_init,
- delayed_auth_method,
+ delayed_auth_method,
delayed_auth_challenge,
delayed_auth_cancel,
delayed_auth_destroy
@@ -118,13 +118,13 @@
retval = 0;
}
-
+
ta_end(ta);
return retval;
}
-struct auth_splugin_t
+struct auth_splugin_t
{
void const *asp_cookie;
auth_splugin_t *asp_next;
@@ -152,7 +152,7 @@
su_msg_r mamc = SU_MSG_R_INIT;
auth_splugin_t *asp;
- if (su_msg_create(mamc,
+ if (su_msg_create(mamc,
su_root_task(ap->ap_root),
su_root_task(ap->ap_root),
delayed_auth_method_recv,
@@ -202,7 +202,7 @@
asp->asp_as->as_callback(asp->asp_as->as_magic, asp->asp_as);
}
-static void delayed_auth_challenge(auth_mod_t *am,
+static void delayed_auth_challenge(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach)
{
@@ -217,7 +217,7 @@
auth_plugin_t *ap = AUTH_PLUGIN(am);
(void)ap; /* xyzzy */
-
+
if (as->as_plugin && as->as_plugin->asp_cookie == delayed_asp_cookie)
as->as_plugin->asp_canceled = 1;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_ntlm.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_ntlm.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_plugin_ntlm.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@CFILE auth_plugin_ntlm.c
*
- * @brief Plugin for delayed authentication.
+ * @brief Plugin for delayed authentication.
*
* This authentication plugin provides authentication operation that is
* intentionally delayed. It serves as an example of server-side
@@ -100,14 +100,14 @@
if (auth_init_default(am, NULL, root, ta_tags(ta)) != -1) {
retval = 0;
}
-
+
ta_end(ta);
return retval;
}
-/** Authenticate a request with @b NTLM authentication scheme.
+/** Authenticate a request with @b NTLM authentication scheme.
*
* This function reads user database before authentication, if needed.
*/
@@ -123,7 +123,7 @@
}
}
-/** Authenticate a request with @b Ntlm authentication scheme.
+/** Authenticate a request with @b Ntlm authentication scheme.
*/
void auth_method_ntlm(auth_mod_t *am,
auth_status_t *as,
@@ -144,7 +144,7 @@
as->as_status = 0, as->as_phrase = NULL;
as->as_match = (msg_header_t *)au;
return;
- }
+ }
if (au) {
auth_response_t ar[1] = {{ sizeof(ar) }};
@@ -161,7 +161,7 @@
/** Find a NTLM credential header with matching realm and opaque. */
-msg_auth_t *auth_ntlm_credentials(msg_auth_t *auth,
+msg_auth_t *auth_ntlm_credentials(msg_auth_t *auth,
char const *realm,
char const *opaque,
char const *gssapidata,
@@ -216,19 +216,19 @@
#define PA "Authorization missing "
- if ((!ar->ar_username && (phrase = PA "username")) ||
- (!ar->ar_nonce && (phrase = PA "nonce")) ||
- (!ar->ar_uri && (phrase = PA "URI")) ||
- (!ar->ar_response && (phrase = PA "response")) ||
+ if ((!ar->ar_username && (phrase = PA "username")) ||
+ (!ar->ar_nonce && (phrase = PA "nonce")) ||
+ (!ar->ar_uri && (phrase = PA "URI")) ||
+ (!ar->ar_response && (phrase = PA "response")) ||
/* (!ar->ar_opaque && (phrase = PA "opaque")) || */
/* Check for qop */
- (ar->ar_qop &&
- ((ar->ar_auth &&
+ (ar->ar_qop &&
+ ((ar->ar_auth &&
strcasecmp(ar->ar_qop, "auth") &&
strcasecmp(ar->ar_qop, "\"auth\"")) ||
- (ar->ar_auth_int &&
+ (ar->ar_auth_int &&
strcasecmp(ar->ar_qop, "auth-int") &&
- strcasecmp(ar->ar_qop, "\"auth-int\"")))
+ strcasecmp(ar->ar_qop, "\"auth-int\"")))
&& (phrase = PA "has invalid qop"))) {
assert(phrase);
SU_DEBUG_5(("auth_method_ntlm: 400 %s\n", phrase));
@@ -239,10 +239,10 @@
/* XXX - replace */
#if 0
- if (as->as_nonce_issued == 0 /* Already validated nonce */ &&
+ if (as->as_nonce_issued == 0 /* Already validated nonce */ &&
auth_validate_ntlm_nonce(am, as, ar, now) < 0) {
#else
- if (as->as_nonce_issued == 0 /* Already validated nonce */ &&
+ if (as->as_nonce_issued == 0 /* Already validated nonce */ &&
auth_validate_digest_nonce(am, as, ar, now) < 0) {
#endif
as->as_blacklist = am->am_blacklist;
@@ -262,9 +262,9 @@
a1 = apw->apw_hash;
else if (apw && apw->apw_pass)
auth_ntlm_a1(ar, a1buf, apw->apw_pass), a1 = a1buf;
- else
+ else
auth_ntlm_a1(ar, a1buf, "xyzzy"), a1 = a1buf, apw = NULL;
-
+
if (ar->ar_md5sess)
auth_ntlm_a1sess(ar, a1buf, a1), a1 = a1buf;
#else
@@ -272,19 +272,19 @@
a1 = apw->apw_hash;
else if (apw && apw->apw_pass)
auth_digest_a1(ar, a1buf, apw->apw_pass), a1 = a1buf;
- else
+ else
auth_digest_a1(ar, a1buf, "xyzzy"), a1 = a1buf, apw = NULL;
-
+
if (ar->ar_md5sess)
auth_digest_a1sess(ar, a1buf, a1), a1 = a1buf;
#endif
- /* XXX - replace with auth_ntlm_response */
+ /* XXX - replace with auth_ntlm_response */
#if 0
- auth_ntlm_response(ar, response, a1,
+ auth_ntlm_response(ar, response, a1,
as->as_method, as->as_body, as->as_bodylen);
#else
- auth_digest_response(ar, response, a1,
+ auth_digest_response(ar, response, a1,
as->as_method, as->as_body, as->as_bodylen);
#endif
@@ -321,7 +321,7 @@
}
/** Construct a challenge header for @b Ntlm authentication scheme. */
-void auth_challenge_ntlm(auth_mod_t *am,
+void auth_challenge_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach)
{
@@ -337,8 +337,8 @@
u = as->as_uri;
d = as->as_pdomain;
- as->as_response =
- msg_header_format(as->as_home, ach->ach_header,
+ as->as_response =
+ msg_header_format(as->as_home, ach->ach_header,
"Ntlm"
" realm=\"%s\","
"%s%s%s"
@@ -346,12 +346,12 @@
" nonce=\"%s\","
"%s%s%s"
"%s" /* stale */
- " algorithm=%s"
+ " algorithm=%s"
"%s%s%s",
- as->as_realm,
- u ? " uri=\"" : "", u ? u : "", u ? "\"," : "",
- d ? " domain=\"" : "", d ? d : "", d ? "\"," : "",
- nonce,
+ as->as_realm,
+ u ? " uri=\"" : "", u ? u : "", u ? "\"," : "",
+ d ? " domain=\"" : "", d ? d : "", d ? "\"," : "",
+ nonce,
am->am_opaque ? " opaque=\"" : "",
am->am_opaque ? am->am_opaque : "",
am->am_opaque ? "\"," : "",
@@ -368,7 +368,7 @@
}
/** Construct a info header for @b Ntlm authentication scheme. */
-void auth_info_ntlm(auth_mod_t *am,
+void auth_info_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach)
{
@@ -385,7 +385,7 @@
auth_generate_digest_nonce(am, nonce, sizeof nonce, 1, msg_now());
#endif
- as->as_info =
+ as->as_info =
msg_header_format(as->as_home, ach->ach_info, "nextnonce=\"%s\"", nonce);
}
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_tag.c Tue Dec 16 13:05:22 2008
@@ -40,14 +40,14 @@
#include <sofia-sip/url_tag_class.h>
/**@def AUTHTAG_ANY()
- *
+ *
* Filter tag matching any AUTHTAG_*().
*/
tag_typedef_t authtag_any = NSTAG_TYPEDEF(*);
/**@def AUTHTAG_MODULE()
- *
- * Pointer to an authentication server module (auth_mod_t).
+ *
+ * Pointer to an authentication server module (auth_mod_t).
*
* The tag item AUTHTAG_MODULE() contains pointer to an authentication server
* module. It is used to pass an already initialized authentication module
@@ -58,11 +58,11 @@
/**@def AUTHTAG_METHOD()
*
* Name of the authentication scheme.
- *
+ *
* The tag AUTHTAG_METHOD() specifies the authentication module and scheme
* to be used by the auth_module. The name can specify a basic
* authentication module, like "Digest" or "Basic", or an plugin module,
- * like "SGMF+Digest".
+ * like "SGMF+Digest".
*
* @sa See <sofia-sip/auth_plugin.h> for plugin interface.
*/
@@ -87,7 +87,7 @@
*
* Opaque data used by authentication server.
*
- * The tag authtag_opaque is used to pass opaque data to the @b auth_module.
+ * The tag authtag_opaque is used to pass opaque data to the @b auth_module.
* The opaque data will be included in all the challenges (however, the data
* is prefixed with a "." and other opaque data used by the algorithms.
*
@@ -115,7 +115,7 @@
/**@def AUTHTAG_QOP()
*
* Quality-of-protection used by Digest authentication.
- *
+ *
* The tag AUTHTAG_QOP() specifies the qop scheme to be used by the
* digest authentication.
*/
@@ -124,7 +124,7 @@
/**@def AUTHTAG_ALGORITHM()
*
* Authentication algorithm used by Digest authentication.
- *
+ *
* The tag AUTHTAG_ALGORITHM() specifies the qop scheme to be used by the
* digest authentication.
*/
@@ -133,7 +133,7 @@
/**@def AUTHTAG_EXPIRES()
*
* Nonce expiration time for Digest authentication.
- *
+ *
* The tag AUTHTAG_EXPIRES() specifies the time in seconds that a nonce is
* considered valid. If 0, the nonce lifetime unbounded. The default time is
* 3600 seconds.
@@ -143,7 +143,7 @@
/**@def AUTHTAG_NEXT_EXPIRES()
*
* Next nonce expiration time for Digest authentication.
- *
+ *
* The tag AUTHTAG_NEXT_EXPIRES() specifies the time in seconds that a
* nextnonce sent in Authentication-Info header is considered valid. If 0,
* the nonce lifetime is unbounded. The default time is 3600 seconds.
@@ -153,9 +153,9 @@
/**@def AUTHTAG_MAX_NCOUNT()
*
* Max nonce count value.
- *
+ *
* The tag AUTHTAG_MAX_NCOUNT() specifies the maximum number of times a
- * nonce should be used.
+ * nonce should be used.
*
* @todo Count actual usages and don't trust "nc" parameter only.
*/
@@ -164,7 +164,7 @@
/**@def AUTHTAG_BLACKLIST()
*
* Blacklist time.
- *
+ *
* The tag AUTHTAG_BLACKLIST() specifies the time the server delays its
* response if it is given bad credentials or malformed nonce. The default
* time is 5 seconds.
@@ -176,7 +176,7 @@
/**@def AUTHTAG_FORBIDDEN()
*
* Respond with 403 Forbidden.
- *
+ *
* When given a true argument, the tag AUTHTAG_FORBIDDEN() specifies that the
* server responds with 403 Forbidden (instead of 401/407) when it receives
* bad credentials.
@@ -208,8 +208,8 @@
/**@def AUTHTAG_REMOTE()
*
* Remote authenticator URL.
- *
- * The tag AUTHTAG_REMOTE() is used to specify URL for remote authenticator.
+ *
+ * The tag AUTHTAG_REMOTE() is used to specify URL for remote authenticator.
* The meaning of the URL is specific to the authentication module. The
* authentication module is selected by AUTHTAG_METHOD().
*/
@@ -217,15 +217,15 @@
/**@def AUTHTAG_ALLOW()
*
- * Comma-separated list of methods that are not challenged.
- *
+ * Comma-separated list of methods that are not challenged.
+ *
* The tag AUTHTAG_ALLOW() takes its argument a string containing a
* comma-separated list of methods, for example,
* @code
* AUTHTAG_ALLOW("ACK, BYE, CANCEL").
* @endcode
*
- * The specified methods are not challenged by the authentication module.
+ * The specified methods are not challenged by the authentication module.
* For example, this may include SIP ACK method or SIP methods only used
* within an already established dialog.
*/
@@ -234,7 +234,7 @@
/**@def AUTHTAG_MASTER_KEY()
*
* Private master key for the authentication module.
- *
+ *
* The tag AUTHTAG_MASTER_KEY() specifies a private master key that can be
* used by the authentication module for various purposes (for instance,
* validating that nonces are really generated by it).
@@ -244,7 +244,7 @@
/**@def AUTHTAG_CACHE_USERS()
*
* Time to cache user data.
- *
+ *
* The tag AUTHTAG_CACHE_USERS() specifies how many seconds the user data is
* cached locally. Default value is typically 30 minutes.
*/
@@ -253,7 +253,7 @@
/**@def AUTHTAG_CACHE_ERRORS()
*
* Time to cache errors.
- *
+ *
* The tag AUTHTAG_CACHE_ERRORS() specifies the lifetime in seconds for
* errors in the local authentication data cache. Note that the errors
* generated locally (e.g., because of connectivity problem with
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec.docs Tue Dec 16 13:05:22 2008
@@ -5,10 +5,10 @@
* @section iptsec_meta Module Meta Information
*
* The iptsec module currently provides interfaces to HTTP
- * Basic and Digest authentication, used by HTTP and SIP protocol elements.
- * There are both
- * @ref auth_client "client-side" and
- * @ref auth_module "server-side"
+ * Basic and Digest authentication, used by HTTP and SIP protocol elements.
+ * There are both
+ * @ref auth_client "client-side" and
+ * @ref auth_module "server-side"
* (authentication verification) functionality available.
*
* @CONTACT Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -25,13 +25,13 @@
* operation is simple enough:
* -# server initializes an #auth_status_t structure with information from
* the request
- * -# server calls auth_mod_method()
- * -# server checks the status from auth_status_t structure, sends an error
+ * -# server calls auth_mod_method()
+ * -# server checks the status from auth_status_t structure, sends an error
* response to the client if authentication fails
* -# server proceeds serving the authenticated request.
*
* If the operation is asynchronous, only a preliminary result is stored in
- * the auth_status_t structure when the call to auth_mod_method() returns.
+ * the auth_status_t structure when the call to auth_mod_method() returns.
* In that case, the application can assign a callback function to the
* structure. The callback function is invoked when the authentication
* operation is completed. An asynchronous authentication operation can be
@@ -62,7 +62,7 @@
* -# store the challenge to a list with auc_challenge()
* -# prompt user and feed credentials (username and password) to the list
* with auc_credentials() or auc_all_credentials()
- * -# authorize a request (add credential headers to it) with
+ * -# authorize a request (add credential headers to it) with
* auc_authorization() and resend the request
*
* If there are several username/password pairs for multiple authentication
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.c Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
/**@internal @file iptsec_debug.c
* @brief Debug log for IPTSEC module.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Dec 19 15:55:30 2002 ppessi
*/
@@ -51,7 +51,7 @@
*
* The IPTSEC_DEBUG environment variable is used to determine the debug
* logging level for @iptsec module. The default level is 3.
- *
+ *
* @sa <sofia-sip/su_debug.h>, #iptsec_log, #SOFIA_DEBUG
*/
extern IPTSEC_DEBUG;
@@ -62,7 +62,7 @@
#endif
/** Common log for client and server components.
- *
+ *
* The iptsec_log is the log object used by @iptsec module. The level of
* #iptsec_log is set using #IPTSEC_DEBUG environment variable.
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/iptsec_debug.h Tue Dec 16 13:05:22 2008
@@ -29,9 +29,9 @@
/**@internal
* @file iptsec_debug.h
* @brief Debug log for IPTSEC module.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Dec 19 15:56:35 2002 ppessi
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef AUTH_CLIENT_H
/** Defined when <sofia-sip/auth_client.h> has been included. */
-#define AUTH_CLIENT_H
+#define AUTH_CLIENT_H
/**@file sofia-sip/auth_client.h
*
@@ -49,7 +49,7 @@
typedef struct auth_client_s auth_client_t;
SOFIAPUBFUN
-int auc_challenge(auth_client_t **auc, su_home_t *home,
+int auc_challenge(auth_client_t **auc, su_home_t *home,
msg_auth_t const *auth,
msg_hclass_t *crcl);
@@ -62,14 +62,14 @@
msg_hclass_t *credential_class);
SOFIAPUBFUN
-int auc_all_credentials(auth_client_t **auc_list,
+int auc_all_credentials(auth_client_t **auc_list,
char const *scheme,
- char const *realm,
+ char const *realm,
char const *user,
char const *pass);
SOFIAPUBFUN
-int auc_clear_credentials(auth_client_t **auc_list,
+int auc_clear_credentials(auth_client_t **auc_list,
char const *scheme,
char const *realm);
@@ -81,15 +81,15 @@
SOFIAPUBFUN
int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body);
SOFIAPUBFUN
-int auc_authorization_headers(auth_client_t **auc_list,
+int auc_authorization_headers(auth_client_t **auc_list,
su_home_t *home,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers);
@@ -105,4 +105,4 @@
SOFIA_END_DECLS
-#endif
+#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_client_plugin.h Tue Dec 16 13:05:22 2008
@@ -24,17 +24,17 @@
#ifndef AUTH_CLIENT_PLUGIN_H
/** Defined when <sofia-sip/auth_client_plugin.h> has been included. */
-#define AUTH_CLIENT_PLUGIN_H
+#define AUTH_CLIENT_PLUGIN_H
/**@file sofia-sip/auth_client_plugin.h
* @brief Client-side plugin interface for authentication
- *
- * @note For extensions in 1.12.6 or later,
+ *
+ * @note For extensions in 1.12.6 or later,
* you have to define SOFIA_EXTEND_AUTH_CLIENT to 1
* before including this file.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Fri May 19 16:18:21 EEST 2006
*/
@@ -74,16 +74,16 @@
int auc_size; /* Size of the client structure */
char const *auc_name; /* Name of the autentication scheme */
-
+
/** Store challenge */
- int (*auc_challenge)(auth_client_t *ca,
+ int (*auc_challenge)(auth_client_t *ca,
msg_auth_t const *ch);
/** Authorize request. */
- int (*auc_authorize)(auth_client_t *ca,
+ int (*auc_authorize)(auth_client_t *ca,
su_home_t *h,
- char const *method,
- url_t const *url,
+ char const *method,
+ url_t const *url,
msg_payload_t const *body,
msg_header_t **return_headers);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_common.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_common.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_common.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <sofia-sip/auth_common.h> has been included. */
#define AUTH_COMMON_H
-/**@file sofia-sip/auth_common.h
+/**@file sofia-sip/auth_common.h
*
* Functions common for client/server.
*
@@ -43,7 +43,7 @@
SOFIAPUBFUN issize_t auth_get_params(su_home_t *home,
char const * const params[], ...
- /* char const * name,
+ /* char const * name,
char const **return_value */);
SOFIAPUBFUN int auth_struct_copy(void *dst, void const *src, isize_t s_size);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_digest.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_digest.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_digest.h Tue Dec 16 13:05:22 2008
@@ -26,14 +26,14 @@
/** Defined when <sofia-sip/auth_digest.h> has been included. */
#define AUTH_DIGEST_H
-/**@file sofia-sip/auth_digest.h
+/**@file sofia-sip/auth_digest.h
* Datatypes and functions for Digest authentication.
*
* The structures and functions here follow the RFC 2617.
*
* @sa @RFC2617,
* <i>"HTTP Authentication: Basic and Digest Access Authentication"</i>,
- * J. Franks et al,
+ * J. Franks et al,
* June 1999.
*
* @sa @RFC3261 section 22
@@ -96,7 +96,7 @@
*
* @code
* credentials = "Digest" digest-response
- * digest-response = 1#( username | realm | nonce | digest-uri |
+ * digest-response = 1#( username | realm | nonce | digest-uri |
* response | [ algorithm ] | [cnonce] | [opaque] |
* [message-qop] | [nonce-count] | [auth-param] )
* username = "username" "=" username-value
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_module.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_module.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_module.h Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
#ifndef AUTH_MODULE_H
/** Defined when <sofia-sip/auth_module.h> has been included. */
-#define AUTH_MODULE_H
+#define AUTH_MODULE_H
-/**@file sofia-sip/auth_module.h
+/**@file sofia-sip/auth_module.h
* @brief Authentication verification interface.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -56,7 +56,7 @@
/** Authentication operation. */
typedef struct auth_status_t auth_status_t;
-#ifdef AUTH_MAGIC_T
+#ifdef AUTH_MAGIC_T
typedef AUTH_MAGIC_T auth_magic_t;
#else
typedef void auth_magic_t;
@@ -81,10 +81,10 @@
* authentication operation and all the related data. The application
* verifying the authentication fills the auth_status_t structure, then
* calls auth_mod_method() (or auth_mod_challenge()). The operation result
- * is stored in the structure.
+ * is stored in the structure.
*
* If the operation is asynchronous, only a preliminary result is stored in
- * the auth_status_t structure when the call to auth_mod_method() returns.
+ * the auth_status_t structure when the call to auth_mod_method() returns.
* In that case, the application @b must assign a callback function to the
* structure. The callback function is invoked when the authentication
* operation is completed.
@@ -105,7 +105,7 @@
url_t const *as_user_uri; /* Return user's identity [in/out] */
char const *as_ident; /**< Identities [out] */
unsigned as_profile; /**< User profile (group) [out] */
-
+
su_addrinfo_t *as_source; /**< Source address [in] */
char const *as_realm; /**< Authentication realm [in] */
@@ -136,7 +136,7 @@
/** @} */
/** Pointer to extended state, used exclusively by plugin modules. */
- auth_splugin_t *as_plugin;
+ auth_splugin_t *as_plugin;
};
/** Authentication challenge.
@@ -146,7 +146,7 @@
* with 401 response code and phrase along with header class for
* @b WWW-Authenticate header in the @a ach structure.
*/
-typedef struct auth_challenger
+typedef struct auth_challenger
{
int ach_status; /**< Response status for challenge response */
char const *ach_phrase; /**< Response phrase for challenge response */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_ntlm.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_ntlm.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_ntlm.h Tue Dec 16 13:05:22 2008
@@ -24,20 +24,20 @@
#ifndef AUTH_NTLM_H
/** Defined when <sofia-sip/auth_ntlm.h> has been included. */
-#define AUTH_NTLM_H
+#define AUTH_NTLM_H
-/**@file sofia-sip/auth_ntlm.h
+/**@file sofia-sip/auth_ntlm.h
* Datatypes and functions for Ntlm authentication.
*
* The structures and functions here follow the RFC 2617.
*
- * @sa
- * <a href="ftp://ftp.ietf.org/rfc/rfc2617.txt">RFC 2617</a>,
+ * @sa
+ * <a href="ftp://ftp.ietf.org/rfc/rfc2617.txt">RFC 2617</a>,
* <i>"HTTP Authentication: Basic and Ntlm Access Authentication"</i>,
- * J. Franks et al,
+ * J. Franks et al,
* June 1999.
*
- * @sa Section 19 from
+ * @sa Section 19 from
* <a href="ftp://ftp.ietf.org/internet-drafts/draft-ietf-sip-rfc2543bis-04.txt>draft-ietf-sip-rfc2543bis-04</a>.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -55,33 +55,33 @@
SOFIA_BEGIN_DECLS
-issize_t auth_ntlm_challenge_get(su_home_t *, auth_challenge_t *,
+issize_t auth_ntlm_challenge_get(su_home_t *, auth_challenge_t *,
char const * const params[]);
-issize_t auth_ntlm_response_get(su_home_t *, auth_response_t *,
+issize_t auth_ntlm_response_get(su_home_t *, auth_response_t *,
char const * const params[]);
-int auth_ntlm_a1(auth_response_t *ar,
+int auth_ntlm_a1(auth_response_t *ar,
auth_hexmd5_t ha1,
char const *secret);
-int auth_ntlm_a1sess(auth_response_t *ar,
+int auth_ntlm_a1sess(auth_response_t *ar,
auth_hexmd5_t ha1sess,
char const *ha1);
int auth_ntlm_sessionkey(auth_response_t *, auth_hexmd5_t ha1,
char const *secret);
int auth_ntlm_response(auth_response_t *, auth_hexmd5_t response,
- auth_hexmd5_t const ha1,
+ auth_hexmd5_t const ha1,
char const *method_name, void const *data, issize_t dlen);
/** NTLM scheme */
-msg_auth_t *auth_ntlm_credentials(msg_auth_t *auth,
+msg_auth_t *auth_ntlm_credentials(msg_auth_t *auth,
char const *realm,
char const *opaque,
char const *gssapidata,
char const *targetname);
-void auth_challenge_ntlm(auth_mod_t *am,
+void auth_challenge_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
@@ -97,18 +97,18 @@
auth_response_t *ar,
auth_challenger_t const *ach);
-int auth_generate_ntlm_nonce(auth_mod_t *am,
+int auth_generate_ntlm_nonce(auth_mod_t *am,
char buffer[],
size_t buffer_len,
int nextnonce,
msg_time_t now);
-int auth_validate_ntlm_nonce(auth_mod_t *am,
+int auth_validate_ntlm_nonce(auth_mod_t *am,
auth_status_t *as,
auth_response_t *ar,
msg_time_t now);
-void auth_info_ntlm(auth_mod_t *am,
+void auth_info_ntlm(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_plugin.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_plugin.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_plugin.h Tue Dec 16 13:05:22 2008
@@ -24,13 +24,13 @@
#ifndef AUTH_PLUGIN_H
/** Defined when <sofia-sip/auth_plugin.h> has been included. */
-#define AUTH_PLUGIN_H
+#define AUTH_PLUGIN_H
/**@file sofia-sip/auth_plugin.h
* @brief Plugin interface for authentication verification modules.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Apr 27 15:22:07 2004 ppessi
*/
@@ -77,20 +77,20 @@
tag_type_t tag, tag_value_t value, ...);
/** Check authentication. Invoked by auth_mod_method(). */
- void (*asch_check)(auth_mod_t *am,
+ void (*asch_check)(auth_mod_t *am,
auth_status_t *as,
msg_auth_t *auth,
auth_challenger_t const *ch);
/** Create a challenge. Invoked by auth_mod_challenge(). */
- void (*asch_challenge)(auth_mod_t *am,
+ void (*asch_challenge)(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ch);
- /** Cancel an asynchronous authentication request.
+ /** Cancel an asynchronous authentication request.
* Invoked by auth_mod_cancel().
*/
- void (*asch_cancel)(auth_mod_t *am,
+ void (*asch_cancel)(auth_mod_t *am,
auth_status_t *as);
/** Reclaim resources an authentication module.
@@ -161,7 +161,7 @@
unsigned am_count; /**< Nonce counter */
uint8_t am_master_key[16]; /**< Private master key */
-
+
su_md5_t am_hmac_ipad; /**< MD5 with inner pad */
su_md5_t am_hmac_opad; /**< MD5 with outer pad */
@@ -182,11 +182,11 @@
SOFIAPUBFUN int auth_readdb(auth_mod_t *am);
-SOFIAPUBFUN msg_auth_t *auth_mod_credentials(msg_auth_t *auth,
+SOFIAPUBFUN msg_auth_t *auth_mod_credentials(msg_auth_t *auth,
char const *scheme,
char const *realm);
-SOFIAPUBFUN auth_mod_t *auth_mod_alloc(auth_scheme_t *scheme,
+SOFIAPUBFUN auth_mod_t *auth_mod_alloc(auth_scheme_t *scheme,
tag_type_t, tag_value_t, ...);
#define AUTH_PLUGIN(am) (auth_plugin_t *)((am) + 1)
@@ -211,13 +211,13 @@
auth_challenger_t const *ach);
SOFIAPUBFUN
-void auth_challenge_basic(auth_mod_t *am,
+void auth_challenge_basic(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
/** Digest scheme */
SOFIAPUBFUN
-msg_auth_t *auth_digest_credentials(msg_auth_t *auth,
+msg_auth_t *auth_digest_credentials(msg_auth_t *auth,
char const *realm,
char const *opaque);
@@ -228,7 +228,7 @@
auth_challenger_t const *ach);
SOFIAPUBFUN
-void auth_info_digest(auth_mod_t *am,
+void auth_info_digest(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
@@ -239,19 +239,19 @@
auth_challenger_t const *ach);
SOFIAPUBFUN
-void auth_challenge_digest(auth_mod_t *am,
+void auth_challenge_digest(auth_mod_t *am,
auth_status_t *as,
auth_challenger_t const *ach);
SOFIAPUBFUN
-isize_t auth_generate_digest_nonce(auth_mod_t *am,
+isize_t auth_generate_digest_nonce(auth_mod_t *am,
char buffer[],
size_t buffer_len,
int nextnonce,
msg_time_t now);
SOFIAPUBFUN
-int auth_validate_digest_nonce(auth_mod_t *am,
+int auth_validate_digest_nonce(auth_mod_t *am,
auth_status_t *as,
auth_response_t *ar,
msg_time_t now);
@@ -260,7 +260,7 @@
/** Init md5 for MD5-based HMAC */
SOFIAPUBFUN void auth_md5_hmac_init(auth_mod_t *am, su_md5_t *md5);
-SOFIAPUBFUN void auth_md5_hmac_digest(auth_mod_t *am, su_md5_t *md5,
+SOFIAPUBFUN void auth_md5_hmac_digest(auth_mod_t *am, su_md5_t *md5,
void *hmac, size_t size);
SOFIA_END_DECLS
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/test_auth_digest.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/test_auth_digest.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/test_auth_digest.c Tue Dec 16 13:05:22 2008
@@ -77,7 +77,7 @@
int tstflags;
char *argv0;
-#define TSTFLAGS tstflags
+#define TSTFLAGS tstflags
#include <sofia-sip/tstdef.h>
@@ -105,14 +105,14 @@
"algorithm=MD5, "
"qop=\"auth\"";
- char response[] =
+ char response[] =
"DIGEST USERNAME=\"digest\", "
"REALM=\"garage.sr.ntc.nokia.com\", "
"NONCE=\"MjAwMS0wMS0yMSAxNTowODo1OA==\", "
"RESPONSE=\"d9d7f1ae99a013cb05f319f0f678251d\", "
"URI=\"sip:garage.sr.ntc.nokia.com\"";
- char rfc2617[] =
+ char rfc2617[] =
"Digest username=\"Mufasa\", "
"realm=\"testrealm at host.com\", "
"nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\", "
@@ -122,7 +122,7 @@
"algorithm=\"md5\", "
"uri=\"/dir/index.html\"";
- char indigo[] =
+ char indigo[] =
"Digest username=\"user1\", "
"realm=\"nokia-proxy\", "
"nonce=\"0YXwH29PCT4lEz8+YJipQg==\", "
@@ -134,7 +134,7 @@
"qop=auth, "
"nc=000000002";
- char proxy_authenticate[] =
+ char proxy_authenticate[] =
"Digest realm=\"IndigoSw\", "
"domain=\"indigosw.com aol.com\", "
"nonce=\"V2VkIEF1ZyAxNSAxNzoxNzozNyBCU1QgMjAwMVtCQDE3OWU4Yg==\", "
@@ -172,12 +172,12 @@
TEST_SIZE(auth_digest_response_get(home, ar, au->au_params), 10);
TEST0(auth_digest_sessionkey(ar, sessionkey, "Circle Of Life") == 0);
- if (tstflags & tst_verbatim)
+ if (tstflags & tst_verbatim)
printf("%s: sessionkey=\"%s\"\n", name, sessionkey);
TEST0(strcmp(sessionkey, "939e7578ed9e3c518a452acee763bce9") == 0);
TEST0(auth_digest_response(ar, hresponse, sessionkey, "GET", NULL, 0) == 0);
- if (tstflags & tst_verbatim)
+ if (tstflags & tst_verbatim)
printf("%s: hresponse=\"%s\"\n", name, hresponse);
TEST0(strcmp(hresponse, "6629fae49393a05397450978507c4ef1") == 0);
@@ -195,11 +195,11 @@
TEST_1(ac->ac_auth_int);
{
- char challenge[] =
+ char challenge[] =
"Digest realm=\"opera.ntc.nokia.com\", "
"nonce=\"InyiWI+qIdvDKkO2jFK7mg==\"";
- char credentials[] =
+ char credentials[] =
"Digest username=\"samuel.privat.saturday at opera.ntc.nokia.com\", "
"realm=\"opera.ntc.nokia.com\", nonce=\"InyiWI+qIdvDKkO2jFK7mg==\", "
"algorithm=MD5, uri=\"sip:opera.ntc.nokia.com\", "
@@ -247,12 +247,12 @@
opaque="5ccc069c403ebaf9f0171e9517f40e41"
*/
- char challenge[] =
+ char challenge[] =
"Digest realm=\"testrealm at host.com\", "
"nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\", "
"opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"";
- char rfc2069_cred[] =
+ char rfc2069_cred[] =
"Digest username=\"Mufasa\", "
"realm=\"testrealm at host.com\", "
"nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\", "
@@ -278,10 +278,10 @@
}
{
- char worldcom_chal[] =
+ char worldcom_chal[] =
"Digest realm=\"WCOM\", nonce=\"ce2292f3f748fbe239bda9e852e8b986\"";
- char worldcom_cred[] =
+ char worldcom_cred[] =
"Digest realm=\"WCOM\", username=\"jari\", "
"nonce=\"ce2292f3f748fbe239bda9e852e8b986\", "
"response=\"ea692d202019d41a75c70df4b2401e2f\", "
@@ -304,12 +304,12 @@
}
{
- char etri_chal[] =
+ char etri_chal[] =
"Digest realm=\"nokia-proxy\", domain=\"sip:194.2.188.133\", "
"nonce=\"wB7JBwIb/XhtgfGp1VuPoQ==\", opaque=\"wkJxwA==\", "
", algorithm=MD5, qop=\"auth\"";
- char etri_cred[] =
+ char etri_cred[] =
"Digest username=\"myhuh\", realm=\"nokia-proxy\", "
"nonce=\"wB7JBwIb/XhtgfGp1VuPoQ==\", uri=\"sip:194.2.188.133\", "
"response=\"32960a62bdc202171ca5a294dc229a6d\", "
@@ -317,13 +317,13 @@
memset(ac, 0, sizeof(ac)); ac->ac_size = sizeof(ac);
memset(ar, 0, sizeof(ar)); ar->ar_size = sizeof(ar);
-
+
TEST0(pa = sip_proxy_authenticate_make(home, etri_chal));
TEST_SIZE(auth_digest_challenge_get(home, ac, pa->au_params), 8);
TEST0(pz = sip_proxy_authorization_make(home, etri_cred));
TEST_SIZE(auth_digest_response_get(home, ar, pz->au_params), 6 /* 8 */);
-
+
ar->ar_md5 = ac->ac_md5 || ac->ac_algorithm == NULL;
TEST(auth_digest_sessionkey(ar, sessionkey, "myhuh"), 0);
@@ -332,7 +332,7 @@
}
{
- char chal[] =
+ char chal[] =
"Digest realm=\"nokia-proxy\", domain=\"sip:10.21.32.63\", "
"nonce=\"GjbLsrozHC6Lx95C57vGlw==\", opaque=\"HN22wQ==\", algorithm=MD5";
@@ -344,13 +344,13 @@
memset(ac, 0, sizeof(ac)); ac->ac_size = sizeof(ac);
memset(ar, 0, sizeof(ar)); ar->ar_size = sizeof(ar);
-
+
TEST0(pa = sip_proxy_authenticate_make(home, chal));
TEST_SIZE(auth_digest_challenge_get(home, ac, pa->au_params), 6);
TEST0(pz = sip_proxy_authorization_make(home, cred));
TEST_SIZE(auth_digest_response_get(home, ar, pz->au_params), 8);
-
+
ar->ar_md5 = ac->ac_md5 || ac->ac_algorithm == NULL;
TEST(auth_digest_sessionkey(ar, sessionkey, "test1"), 0);
@@ -359,18 +359,18 @@
}
{
- char challenge[] =
+ char challenge[] =
"Digest realm=\"nokia-proxy\", domain=\"sip:194.2.188.133\", "
"nonce=\"3wWGOvaWn3n+hFv8PK2ABQ==\", opaque=\"+GNywA==\", "
"algorithm=MD5, qop=\"auth-int\"";
- char credentials[] =
+ char credentials[] =
"Digest username=\"test\", realm=\"nokia-proxy\", "
"nonce=\"3wWGOvaWn3n+hFv8PK2ABQ==\", "
"cnonce=\"11RkhFg9EdaIRD36w0EMVA==\", opaque=\"+GNywA==\", "
"uri=\"sip:3000 at 194.2.188.133\", algorithm=MD5, "
"response=\"26e8b9aaacfca2d68770fab1ec04e2c7\", "
"qop=auth-int, nc=00000001";
- char data[] =
+ char data[] =
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
"<presence>\n"
"<presentity uri=\"sip:3000 at 194.2.188.133\"/>\n"
@@ -389,23 +389,23 @@
memset(ac, 0, sizeof(ac)); ac->ac_size = sizeof(ac);
memset(ar, 0, sizeof(ar)); ar->ar_size = sizeof(ar);
-
+
TEST0(pa = sip_proxy_authenticate_make(home, challenge));
TEST_SIZE(auth_digest_challenge_get(home, ac, pa->au_params), 8);
TEST0(pz = sip_proxy_authorization_make(home, credentials));
TEST_SIZE(auth_digest_response_get(home, ar, pz->au_params), 12);
-
+
ar->ar_md5 = ac->ac_md5 || ac->ac_algorithm == NULL;
TEST0(!auth_digest_sessionkey(ar, sessionkey, "test"));
- TEST0(!auth_digest_response(ar, hresponse, sessionkey, "REGISTER",
+ TEST0(!auth_digest_response(ar, hresponse, sessionkey, "REGISTER",
data, strlen(data)));
TEST_S(hresponse, "26e8b9aaacfca2d68770fab1ec04e2c7");
}
su_home_deinit(home);
-
+
END();
}
@@ -418,7 +418,7 @@
msg_iovec_t iovec[2];
n = strlen(buffer);
- if (n == 0)
+ if (n == 0)
return NULL;
msg = msg_create(sip_default_mclass(), flags);
@@ -447,10 +447,10 @@
su_root_break(root);
}
-static
+static
void init_as(auth_status_t *as)
{
- memset(as, 0, sizeof *as);
+ memset(as, 0, sizeof *as);
as->as_home->suh_size = (sizeof *as);
su_home_init(as->as_home);
as->as_method = "REGISTER";
@@ -458,14 +458,14 @@
as->as_phrase = "Infernal Error";
}
-static
+static
void deinit_as(auth_status_t *as)
{
su_home_deinit(as->as_home);
memset(as, 0, sizeof *as);
}
-static
+static
void reinit_as(auth_status_t *as)
{
deinit_as(as); init_as(as);
@@ -475,9 +475,9 @@
int test_digest_client()
{
BEGIN();
-
+
{
- char challenge[] =
+ char challenge[] =
PROTOCOL " 401 Unauthorized\r\n"
"Call-ID:0e3dc2b2-dcc6-1226-26ac-258b5ce429ab\r\n"
"CSeq:32439043 REGISTER\r\n"
@@ -488,8 +488,8 @@
"Content-Length:0\r\n"
"Security-Server:digest\r\n"
"r\n";
-
- char request[] =
+
+ char request[] =
"REGISTER sip:ims3.so.noklab.net " PROTOCOL "\r\n"
"Via: SIP/2.0/UDP 10.21.36.70:23800;rport;branch=z9hG4bKRE18GFwa3AS\r\n"
"Max-Forwards: 80\r\n"
@@ -515,13 +515,13 @@
auth_mod_t *am;
auth_status_t as[1];
sip_www_authenticate_t *au;
- auth_challenger_t ach[1] =
- {{ 401, "Authorization required",
+ auth_challenger_t ach[1] =
+ {{ 401, "Authorization required",
sip_www_authenticate_class,
sip_authentication_info_class
}};
- auth_challenger_t pach[1] =
- {{ 407, "Proxy Authorization required",
+ auth_challenger_t pach[1] =
+ {{ 407, "Proxy Authorization required",
sip_proxy_authenticate_class,
sip_proxy_authentication_info_class
}};
@@ -530,29 +530,29 @@
TEST_1(m1 = read_message(MSG_DO_EXTRACT_COPY, challenge));
TEST_1(sip = sip_object(m1));
-
+
TEST_1(aucs == NULL);
- TEST(auc_challenge(&aucs, home, sip->sip_www_authenticate,
+ TEST(auc_challenge(&aucs, home, sip->sip_www_authenticate,
sip_authorization_class), 1);
TEST_1(aucs != NULL);
msg_destroy(m1);
- TEST(auc_all_credentials(&aucs, "DIGEST", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "DIGEST", "\"ims3.so.noklab.net\"",
"surf3.private at ims3.so.noklab.net", "1234"), 1);
TEST_1(m2 = read_message(MSG_DO_EXTRACT_COPY, request));
TEST_1(sip = sip_object(m2));
TEST_P(sip->sip_authorization, NULL);
TEST_1(rq = sip->sip_request);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
rq->rq_url, sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_S(msg_params_find(sip->sip_authorization->au_params,
"response="),
"\"860f5ecc9990772e16937750ced9594d\"");
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_S(msg_params_find(sip->sip_authorization->au_params,
@@ -571,7 +571,7 @@
TEST_1(root = su_root_create(NULL));
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -582,7 +582,7 @@
auth_mod_check_client(am, as, sip->sip_authorization, ach);
TEST(as->as_status, 401);
- TEST_1(au = sip_authorization_make(home,
+ TEST_1(au = sip_authorization_make(home,
"Digest username=\"user1\", "
"nonce=\"3wWGOvaWn3n+hFv8PK2ABQ==\", "
"opaque=\"+GNywA==\", "
@@ -602,7 +602,7 @@
char const *uri = au->au_params[3];
char const *response = au->au_params[4];
char const *realm = au->au_params[5];
-
+
TEST_S(username, "username=\"user1\"");
TEST_S(nonce, "nonce=\"3wWGOvaWn3n+hFv8PK2ABQ==\"");
TEST_S(opaque, "opaque=\"+GNywA==\"");
@@ -653,24 +653,24 @@
as->as_response = (msg_header_t *)
sip_www_authenticate_make(as->as_home, "Unknown realm=\"huu haa\"");
TEST_1(as->as_response);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
aucs = NULL;
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach);
TEST(as->as_status, 401);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
reinit_as(as);
-
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -683,7 +683,7 @@
auth_mod_destroy(am);
aucs = NULL;
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -713,11 +713,11 @@
reinit_as(as);
}
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -750,12 +750,12 @@
TEST(msg_params_remove((msg_param_t *)au->au_params, "opaque"), 1);
TEST(auc_challenge(&aucs, home, au, sip_authorization_class), 1);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -774,7 +774,7 @@
{
msg_auth_t *au;
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_DB(testpasswd),
AUTHTAG_ALGORITHM("MD5-sess"),
@@ -790,12 +790,12 @@
au = (void *)msg_header_dup(home, as->as_response); TEST_1(au);
TEST(auc_challenge(&aucs, home, au, sip_authorization_class), 1);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -812,7 +812,7 @@
{
char const *nonce1, *nextnonce, *nonce2;
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -823,21 +823,21 @@
if NEXT_EXPIRES in nonzero */
AUTHTAG_NEXT_EXPIRES(900),
TAG_END()));
-
+
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
-
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_1(nonce1 = msg_header_find_param(sip->sip_authorization->au_common, "nonce"));
-
+
reinit_as(as);
auth_mod_check_client(am, as, sip->sip_authorization, ach);
TEST(as->as_status, 0);
@@ -850,8 +850,8 @@
TEST(auc_info(&aucs, (msg_auth_info_t const *)as->as_info, sip_authorization_class), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_1(nonce2 = msg_header_find_param(sip->sip_authorization->au_common, "nonce"));
@@ -867,7 +867,7 @@
auth_mod_destroy(am); aucs = NULL;
}
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -878,13 +878,13 @@
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -893,7 +893,7 @@
TEST(as->as_status, 0);
auth_mod_destroy(am); aucs = NULL;
- TEST_1(am = auth_mod_create(NULL,
+ TEST_1(am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -907,13 +907,13 @@
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -924,7 +924,7 @@
au = (void*)msg_header_copy(msg_home(m2), (void*)sip->sip_authorization);
/* Test with invalid qop (bug #2329) */
- msg_params_replace(msg_home(m2), (void *)&au->au_params,
+ msg_params_replace(msg_home(m2), (void *)&au->au_params,
"qop=\"auth,auth-int\"");
reinit_as(as);
auth_mod_check_client(am, as, au, ach);
@@ -949,11 +949,11 @@
TEST_1(au = (void *)as->as_response); TEST_1(au->au_params);
TEST_S(msg_params_find(au->au_params, "stale="), "true");
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_S(msg_header_find_param(sip->sip_authorization->au_common, "nc="),
@@ -965,8 +965,8 @@
/* Test nonce count check */
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
TEST_S(msg_header_find_param(sip->sip_authorization->au_common, "nc="),
@@ -983,15 +983,15 @@
/* Test anonymous operation */
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
reinit_as(as);
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"anonymous", ""), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -1000,20 +1000,20 @@
auth_mod_destroy(am); aucs = NULL;
/* Test empty realm */
- TEST_1(am = auth_mod_create(root,
+ TEST_1(am = auth_mod_create(root,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM(""),
AUTHTAG_DB(testpasswd),
TAG_END()));
reinit_as(as);
auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
reinit_as(as);
TEST(auc_all_credentials(&aucs, "Digest", "\"\"", "user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
(url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -1021,15 +1021,15 @@
auth_mod_check_client(am, as, sip->sip_authorization, ach);
TEST(as->as_status, 0);
aucs = NULL;
- reinit_as(as);
+ reinit_as(as);
auth_mod_check_client(am, as, NULL, pach); TEST(as->as_status, 407);
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_proxy_authorization_class), 1);
reinit_as(as);
TEST(auc_credentials(&aucs, as->as_home, "Digest:\"\":user1:secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_proxy_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
(url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_proxy_authorization);
@@ -1040,25 +1040,25 @@
auth_mod_destroy(am); aucs = NULL;
/* Test Basic authentication scheme */
- TEST_1(am = auth_mod_create(root,
+ TEST_1(am = auth_mod_create(root,
AUTHTAG_METHOD("Basic"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
TAG_END()));
- reinit_as(as);
- auth_mod_check_client(am, as, NULL, ach);
+ reinit_as(as);
+ auth_mod_check_client(am, as, NULL, ach);
TEST(as->as_status, 401);
-
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
- reinit_as(as);
+ reinit_as(as);
- TEST(auc_all_credentials(&aucs, "Basic", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Basic", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -1067,20 +1067,20 @@
aucs = NULL;
- reinit_as(as);
- auth_mod_check_client(am, as, NULL, ach);
+ reinit_as(as);
+ auth_mod_check_client(am, as, NULL, ach);
TEST(as->as_status, 401);
-
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
- reinit_as(as);
+ reinit_as(as);
- TEST(auc_all_credentials(&aucs, "Basic", "\"ims3.so.noklab.net\"",
- "very-long-user-name-that-surely-exceeds-the-static-buffer",
+ TEST(auc_all_credentials(&aucs, "Basic", "\"ims3.so.noklab.net\"",
+ "very-long-user-name-that-surely-exceeds-the-static-buffer",
"at-least-when-used-with-the-even-longer-password"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -1091,7 +1091,7 @@
/* Test asynchronous operation */
aucs = NULL;
- TEST_1(am = auth_mod_create(root,
+ TEST_1(am = auth_mod_create(root,
AUTHTAG_METHOD("Delayed+Digest"),
AUTHTAG_REALM("ims3.so.noklab.net"),
AUTHTAG_DB(testpasswd),
@@ -1107,19 +1107,19 @@
TEST(as->as_status, 100);
su_root_run(root);
TEST(as->as_status, 401);
-
- TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
+
+ TEST(auc_challenge(&aucs, home, (msg_auth_t *)as->as_response,
sip_authorization_class), 1);
reinit_as(as);
as->as_callback = test_callback;
as->as_magic = root;
- TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
+ TEST(auc_all_credentials(&aucs, "Digest", "\"ims3.so.noklab.net\"",
"user1", "secret"), 1);
msg_header_remove(m2, (void *)sip, (void *)sip->sip_authorization);
- TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
- (url_t *)"sip:surf3 at ims3.so.noklab.net",
+ TEST(auc_authorization(&aucs, m2, (msg_pub_t*)sip, rq->rq_method_name,
+ (url_t *)"sip:surf3 at ims3.so.noklab.net",
sip->sip_payload), 1);
TEST_1(sip->sip_authorization);
@@ -1188,7 +1188,7 @@
TEST(close(tmpfd), 0);
/* Test file reading operation */
- am = auth_mod_create(NULL,
+ am = auth_mod_create(NULL,
AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("realm"),
AUTHTAG_DB(tmppasswd),
@@ -1201,7 +1201,7 @@
apw = auth_mod_getpass(am, "user2", NULL); TEST_1(apw);
TEST_S(apw->apw_hash, "4cbc2aff0b5b2b33675c0731c0db1c14");
-
+
apw2 = apw;
*am0 = *am;
@@ -1312,7 +1312,7 @@
if (rest == NULL || *rest)
usage(1);
-
+
su_log_set_level(iptsec_log, level);
} else {
usage(1);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/ChangeLog Tue Dec 16 13:05:22 2008
@@ -6,7 +6,7 @@
* Renamed msg_test.c as test_msg.c.
- * Renamed msg_test_class.[hc] as test_class.[hc],
+ * Renamed msg_test_class.[hc] as test_class.[hc],
msg_test_protos.h(.in) as test_protos.h(.in),
msg_test_table.c(.in) as test_table.c(.in).
@@ -40,14 +40,14 @@
* msg_parser.c: Using header-specific flags to classify parsing
errors with msg_extract_errors().
-
+
Added support for apndlist headers.
* msg_header.h: Added support for apndlist headers.
* msg_mime.c: Various Accept* headers are now apndlist meaning
that they are printed on single line by default.
-
+
2005-07-18 Kai Vehmanen <kai.vehmanen at nokia.com>
* Initial import of the module to Sofia-SIP tree.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/Makefile.am Tue Dec 16 13:05:22 2008
@@ -33,7 +33,7 @@
INTERNAL_H = msg_internal.h test_class.h
nobase_include_sofia_HEADERS = \
- $(GENERATED_H) $(PUBLIC_H)
+ $(GENERATED_H) $(PUBLIC_H)
GENERATED_HC = $(GENERATED_H) msg_mime_table.c test_table.c test_protos.h
@@ -55,7 +55,7 @@
../bnf/libbnf.la \
../url/liburl.la \
../ipt/libipt.la \
- ../su/libsu.la
+ ../su/libsu.la
test_msg_LDFLAGS = -static
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.c Tue Dec 16 13:05:22 2008
@@ -95,7 +95,7 @@
* destroyed.
*
* @param msg message of which a reference is created
- *
+ *
* @return
* A pointer to a message.
*/
@@ -137,7 +137,7 @@
* @relatesalso msg_s
*
* @param ref pointer to msg object
- *
+ *
* @deprecated Use msg_destroy() instead.
*/
void msg_ref_destroy(msg_t *ref)
@@ -154,7 +154,7 @@
void msg_destroy(msg_t *msg)
{
msg_t *parent;
-
+
for (; msg; msg = parent) {
int refs;
su_home_mutex_lock(msg->m_home);
@@ -174,9 +174,9 @@
/**Retrieve public message structure.
*
* Get a pointer to the public message structure.
- *
+ *
* @param msg pointer to msg object
- *
+ *
* @returns
* A pointer to the public message structure, or NULL if none.
*/
@@ -194,10 +194,10 @@
*
* Get a pointer to the public message structure of the
* given protocol.
- *
+ *
* @param msg pointer to msg object
* @param tag tag of public message structure
- *
+ *
* @returns
* A pointer to the public message structure, or NULL if there is none or
* the message is not for desired protocol.
@@ -216,9 +216,9 @@
*
* Get a pointer to the message class object
* (factory object for the message).
- *
+ *
* @param msg pointer to msg object
- *
+ *
* @returns
* A pointer to the message class, or NULL if none.
*/
@@ -239,7 +239,7 @@
* Zero the address and addressinfo structures associated with the message.
*
* @sa msg_addrinfo(), msg_set_address(), msg_get_address(), msg_addr_copy().
- */
+ */
void msg_addr_zero(msg_t *msg)
{
memset(&msg->m_addr, 0, sizeof(&msg->m_addr));
@@ -249,7 +249,7 @@
msg->m_addrinfo.ai_addr = &msg->m_addr->su_sa;
}
-/** Get pointer to socket address structure.
+/** Get pointer to socket address structure.
*
* @relatesalso msg_s
*
@@ -269,7 +269,7 @@
*
* @param msg pointer to msg object
* @param su pointer to socket address structure
- * @param return_len return parameter value for length
+ * @param return_len return parameter value for length
* of socket address structure
*
* @sa msg_addrinfo(), msg_set_address(), msg_addr_zero(), msg_addr_copy().
@@ -287,13 +287,13 @@
return -1;
}
-/** Set message address.
+/** Set message address.
*
* @relatesalso msg_s
*
* Copy the supplied socket address to the socket address structure
* associated with the message.
- *
+ *
* @param msg pointer to msg object
* @param su pointer to socket address structure
* @param sulen length of socket address structure
@@ -337,7 +337,7 @@
* Copy the addrinfo and socket address structures from @a src to the @a dst
* message object.
*
- * @param dst pointer to destination message object
+ * @param dst pointer to destination message object
* @param src pointer to source message object
*
* @sa msg_addrinfo(), msg_get_address(), msg_set_address(), msg_addr_zero().
@@ -347,10 +347,10 @@
dst->m_addrinfo = src->m_addrinfo;
dst->m_addrinfo.ai_next = NULL;
dst->m_addrinfo.ai_canonname = NULL;
- memcpy(dst->m_addrinfo.ai_addr = &dst->m_addr->su_sa,
+ memcpy(dst->m_addrinfo.ai_addr = &dst->m_addr->su_sa,
src->m_addr, src->m_addrinfo.ai_addrlen);
if (dst->m_addrinfo.ai_addrlen < sizeof(dst->m_addr))
- memset((char *)dst->m_addr + dst->m_addrinfo.ai_addrlen, 0,
+ memset((char *)dst->m_addr + dst->m_addrinfo.ai_addrlen, 0,
sizeof(dst->m_addr) - dst->m_addrinfo.ai_addrlen);
}
@@ -361,9 +361,9 @@
*
* If the message parser fails to parse certain headers in the message, it
* sets the corresponding extract error flags. The flags corresponding to
- * each header are stored in the message parser (msg_mclass_t) structure.
- * They are set when the header is added to the parser table.
- *
+ * each header are stored in the message parser (msg_mclass_t) structure.
+ * They are set when the header is added to the parser table.
+ *
* The SIP flags are defined in <sofia-sip/sip_headers.h>. For well-known
* SIP headers, the flags for each header are listed in a separate text file
* (sip_bad_mask) read by msg_parser.awk.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg.docs Tue Dec 16 13:05:22 2008
@@ -38,9 +38,9 @@
is extended by a new header or a parser is created for a completely new
protocol. It is possible to add new headers to the parser or extend the
definition of existing ones. The header files used for constructing these
-parsers are as follows:
-- <sofia-sip/msg_parser.h> parsing functions, macros
-- <sofia-sip/msg_mclass.h> message factory object definition
+parsers are as follows:
+- <sofia-sip/msg_parser.h> parsing functions, macros
+- <sofia-sip/msg_mclass.h> message factory object definition
- <sofia-sip/msg_mclass_hash.h> hashing of header names
@section msg_overview Parsers, Messages and Headers
@@ -54,7 +54,7 @@
protocol-specific header files include <sofia-sip/sip.h>, <sofia-sip/http.h>, and
<sofia-sip/msg_mime.h>. For each header, there is defined a @em header @em class
structure, some standard functions, and tags for including them in tag
-lists.
+lists.
As a convention, all the identifiers for SIP headers start with prefix @c
sip and all the macros with @c SIP. Same thing holds for HTTP, too: it
@@ -73,18 +73,18 @@
header class as follows:
- @c ns_X_t is the structure used to store parsed header,
- - @c ns_hclass_t @c ns_X_class[] contains the @em header @em class
+ - @c ns_hclass_t @c ns_X_class[] contains the @em header @em class
for header X,
- @c NS_X_INIT() initializes a static instance of @c ns_X_t,
- @c ns_X_init() initializes a dynamic instance of @c ns_X_t,
- @c ns_is_X() tests if header object is instance of header X,
- @c ns_X_make() creates a header X object by decoding given string,
- - @c ns_X_format() creates a header X object by decoding given
+ - @c ns_X_format() creates a header X object by decoding given
@c printf() list,
- - @c ns_X_dup() duplicates (deeply copies) the header X,
- - @c ns_X_copy() copies the header X,
+ - @c ns_X_dup() duplicates (deeply copies) the header X,
+ - @c ns_X_copy() copies the header X,
- @c NSTAG_X() is used include instance of @c ns_X_t in a tag list, and
- - @c NSTAG_X_STR() is used to include string containing value header
+ - @c NSTAG_X_STR() is used to include string containing value header
in a tag list.
The declarations of header tags and the prototypes for these functions can
@@ -111,7 +111,7 @@
the parser considers any received data, be it a UDP datagram or a TCP
stream, as a @em byte @em stream. The protocol-specific parsers controls how
a byte stream is split into separate messages or if it consists of a single
-message only.
+message only.
The parser engine works by separating stream into fragments, then passing
the fragment to a suitable parser. A fragment is a piece of message that is
@@ -120,7 +120,7 @@
message body can consists of multiple fragments known as chunks.)
The parser starts by separating the first line (e.g., request or status
-line) from the byte stream, then passing the line to the suitable parser.
+line) from the byte stream, then passing the line to the suitable parser.
After first line comes the message headers. The parser continues parsing
process by extracting headers, each on their own line, from the stream and
passing contents of each header to its parser. The message structure is
@@ -195,7 +195,7 @@
char const *ac_subtype; //< Points after first slash in type
msg_param_t const *ac_params; //< List of parameters
msg_param_t ac_q; //< Value of q parameter
-}
+}
msg_accept_t;
@endcode
@@ -205,8 +205,8 @@
the @c ac_params array. If there is a @e q parameter present, a pointer to
the @c qvalue is assigned to @c ac_q field.
-In the beginning of the header structure there are two boilerplate members.
-The @c ac_common[1] contains information common to all message fragments.
+In the beginning of the header structure there are two boilerplate members.
+The @c ac_common[1] contains information common to all message fragments.
The @c ac_next is a pointer to next header field with the same name, in case
a message contains multiple @b Accept headers or multiple comma-separated
header fields are located in a single line.
@@ -217,7 +217,7 @@
other. The programmer also needs a convenient way to access certain headers
at the message level, for example, accessing directly the @b Accept header
instead of going through all headers and examining their name. The
-structured view to the message is provided via a message-specific C struct.
+structured view to the message is provided via a message-specific C struct.
In general, its type is msg_pub_t (it provides public view to message). The
protocol-specific type is #sip_t, #http_t or #msg_multipart_t for
SIP, HTTP and MIME, respectively.
@@ -283,7 +283,7 @@
The figure below shows the layout of the BYE message above after parsing:
- at image html sip-parser2.gif BYE message and its representation in C
+ at image html sip-parser2.gif BYE message and its representation in C
@image latex sip-parser2.eps BYE message and its representation in C
The leftmost box represents the message of type #msg_t. Next box from
@@ -446,7 +446,7 @@
/**@typedef typedef struct msg_s msg_t;
*
- * Message object.
+ * Message object.
*
* The @a msg_t is the type of a message object used by Sofia signaling
* protocols and parsers. Its contents are not directly accessible.
@@ -454,7 +454,7 @@
/**@typedef typedef struct msg_common_s msg_common_t;
*
- * Common part of header.
+ * Common part of header.
*
* The @a msg_common_t is the base type of a message headers used by
* protocol parsers. Instead of #msg_common_t, most interfaces use
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_auth.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_auth.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_auth.c Tue Dec 16 13:05:22 2008
@@ -76,9 +76,9 @@
/* ====================================================================== */
/*
- * auth = ("Authorization" | "Encryption" |
+ * auth = ("Authorization" | "Encryption" |
* "Proxy-Authenticate" | "Proxy-Authorization" |
- * "Response-Key" | "WWW-Authenticate") ":"
+ * "Response-Key" | "WWW-Authenticate") ":"
* scheme 1*SP #auth-param
* scheme = token
* auth-param = token | token "=" token | token "=" quoted-string
@@ -93,12 +93,12 @@
msg_auth_t *au = (msg_auth_t *)h;
au->au_scheme = s;
-
+
skip_token(&s);
if (!IS_LWS(*s)) return -1;
*s++ = '\0'; /* NUL-terminate scheme */
- return msg_commalist_d(home, &s, (msg_param_t **)&au->au_params,
+ return msg_commalist_d(home, &s, (msg_param_t **)&au->au_params,
NULL /* msg_auth_item_scan */);
}
@@ -114,11 +114,11 @@
MSG_COMMALIST_E(b, end, au->au_params, compact);
}
MSG_TERM_E(b, end);
-
+
return b - b0;
}
-/**@internal
+/**@internal
* Extra size of a msg_auth_t object.
*
* This function calculates extra size required by a msg_auth_t object.
@@ -134,7 +134,7 @@
MSG_PARAMS_SIZE(offset, au->au_params);
offset += MSG_STRING_SIZE(au->au_scheme);
-
+
return offset;
}
@@ -150,7 +150,7 @@
b = msg_params_dup(&au->au_params, o->au_params, b, xtra);
MSG_STRING_DUP(b, au->au_scheme, o->au_scheme);
-
+
assert(b <= end); (void)end;
return b;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_basic.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_basic.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_basic.c Tue Dec 16 13:05:22 2008
@@ -61,7 +61,7 @@
* @defgroup msg_error Erroneous Headers
*
* The erroneous headers are stored in #msg_error_t structure.
- *
+ *
* @note Parser may put other headers (like duplicate Content-Length
* headers) into the list of erroneous headers. If the list of erroneous
* headers is processed, the header type must be validated first by calling
@@ -111,7 +111,7 @@
* The unknown headers are handled with #msg_unknown_t structure. The whole
* unknown header including its name is included in the header value string
* @a g_value.
- *
+ *
* @note It is possible to speed up parsing process by creating a parser
* which does understand only a minimum number of headers. If such a parser
* is used, some well-known headers are not regocnized or parser, but they
@@ -139,7 +139,7 @@
*s++ = '\0';
skip_lws(&s);
un->un_value = s;
-
+
return 0;
}
@@ -153,7 +153,7 @@
MSG_CHAR_E(b, end, ':');
if (!compact) MSG_CHAR_E(b, end, ' ');
MSG_STRING_E(b, end, un->un_value);
-
+
return b - b0;
}
@@ -184,7 +184,7 @@
* @defgroup msg_payload Message Body
*
* The payload object contains the message body. The message body has no
- * structure, but it is stored in the @a pl_data buffer as a byte array.
+ * structure, but it is stored in the @a pl_data buffer as a byte array.
* Multiple payload objects may be linked to a list.
*/
@@ -197,7 +197,7 @@
* @code
* typedef struct msg_payload_s {
* msg_common_t pl_common[1]; // Common fragment info
- * msg_header_t *pl_next; // Next payload object
+ * msg_header_t *pl_next; // Next payload object
* char *pl_data; // Data - may contain zero bytes
* usize_t pl_len; // Length of message payload
* } msg_payload_t;
@@ -263,7 +263,7 @@
char *msg_payload_dup_one(msg_header_t *dst,
msg_header_t const *src,
- char *b,
+ char *b,
isize_t xtra)
{
msg_payload_t *pl = dst->sh_payload;
@@ -288,7 +288,7 @@
/* ====================================================================== */
/**@ingroup msg_headers
- * @defgroup msg_separator Message Separator
+ * @defgroup msg_separator Message Separator
*
* An empty line separates headers from the message body. In order to avoid
* modifying messages with integrity protection, the separator line has its
@@ -325,7 +325,7 @@
if (len == 0 && slen > 0)
return -1;
-
+
memcpy(h->sh_separator->sep_data, s, len);
h->sh_separator->sep_data[len] = '\0';
@@ -345,7 +345,7 @@
msg_separator_t *msg_separator_create(su_home_t *home)
{
- msg_separator_t *sep =
+ msg_separator_t *sep =
msg_header_alloc(home, msg_separator_class, 0)->sh_separator;
if (sep)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c Tue Dec 16 13:05:22 2008
@@ -59,7 +59,7 @@
*
* First day of the epoch year should be Monday.
*/
-#define EPOCH 1900
+#define EPOCH 1900
/** Is this year a leap year? @internal */
#define LEAP_YEAR(y) ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
/** Day number of New Year Day of given year. @internal */
@@ -69,25 +69,25 @@
/* ====================================================================== */
-static unsigned char const days_per_months[12] =
+static unsigned char const days_per_months[12] =
{
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};
/** Offset of first day of the month with formula day = 30 * month + offset. */
-static signed char const first_day_offset[12] =
+static signed char const first_day_offset[12] =
{
0, 1, -1, 0, 0, 1, 1, 2, 3, 3, 4, 4
};
-static char const wkdays[7 * 4] =
+static char const wkdays[7 * 4] =
"Mon\0" "Tue\0" "Wed\0" "Thu\0" "Fri\0" "Sat\0" "Sun";
-static char const months[12 * 4] =
- "Jan\0" "Feb\0" "Mar\0" "Apr\0" "May\0" "Jun\0"
+static char const months[12 * 4] =
+ "Jan\0" "Feb\0" "Mar\0" "Apr\0" "May\0" "Jun\0"
"Jul\0" "Aug\0" "Sep\0" "Oct\0" "Nov\0" "Dec";
-/** Parse a month name.
+/** Parse a month name.
*
* @return The function month_d() returns 0..11 if given first three letters
* of month name, or -1 if no month name matches.
@@ -126,19 +126,19 @@
/* Parse SP 2DIGIT ":" 2DIGIT ":" 2DIGIT SP */
su_inline
-int time_d(char const **ss,
+int time_d(char const **ss,
unsigned long *hour, unsigned long *min, unsigned long *sec)
{
char const *s = *ss;
- if (!IS_LWS(*s))
- return -1;
+ if (!IS_LWS(*s))
+ return -1;
skip_lws(&s);
if (!is_digit(*s)) return -1;
*hour = *s++ - '0'; if (is_digit(*s)) *hour = 10 * (*hour) + *s++ - '0';
- if (*s++ != ':' || !is_digit(s[0]) || !is_digit(s[1]))
+ if (*s++ != ':' || !is_digit(s[0]) || !is_digit(s[1]))
return -1;
*min = 10 * s[0] + s[1] - 11 * '0'; s += 2;
- if (*s++ != ':' || !is_digit(s[0]) || !is_digit(s[1]))
+ if (*s++ != ':' || !is_digit(s[0]) || !is_digit(s[1]))
return -1;
*sec = 10 * s[0] + s[1] - 11 * '0'; s += 2;
if (*s) {
@@ -149,10 +149,10 @@
}
/**Decode RFC1123-date, RFC822-date or asctime-date.
- *
- * The function msg_date_d() decodes <HTTP-date>, which may have
+ *
+ * The function msg_date_d() decodes <HTTP-date>, which may have
* different formats.
- *
+ *
* @code
* HTTP-date = rfc1123-date / rfc850-date / asctime-date
*
@@ -174,7 +174,7 @@
* wkday = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"
* weekday = "Monday" / "Tuesday" / "Wednesday"
* / "Thursday" / "Friday" / "Saturday" / "Sunday"
- * month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun"
+ * month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun"
* / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
* @endcode
*/
@@ -189,26 +189,26 @@
if (!IS_TOKEN(*s) || !date)
return -1;
- wkday = s; skip_token(&s); if (*s == ',') s++;
+ wkday = s; skip_token(&s); if (*s == ',') s++;
while (IS_LWS(*s)) s++;
if (is_digit(*s)) {
day = *s++ - '0'; if (is_digit(*s)) day = 10 * day + *s++ - '0';
-
+
if (*s == ' ') {
- /* rfc1123-date =
+ /* rfc1123-date =
wkday "," SP 2DIGIT SP month SP 4DIGIT SP time SP "GMT"
*/
mon = month_d(++s); skip_token(&s);
if (mon < 0 || !IS_LWS(*s)) return -1;
s++;
- if (!is_digit(s[0]) || !is_digit(s[1]) ||
+ if (!is_digit(s[0]) || !is_digit(s[1]) ||
!is_digit(s[2]) || !is_digit(s[3]))
return -1;
year = 1000 * s[0] + 100 * s[1] + 10 * s[2] + s[3] - 1111 * '0'; s += 4;
}
else if (*s == '-') {
- /* rfc822-date =
+ /* rfc822-date =
weekday "," SP 2DIGIT "-" month "-" 2DIGIT SP time SP "GMT"
*/
@@ -216,9 +216,9 @@
if (mon < 0 || s[3] != '-' ||
!is_digit(s[4]) || !is_digit(s[5]))
return -1;
- year = 10 * s[4] + s[5] - 11 * '0';
+ year = 10 * s[4] + s[5] - 11 * '0';
if (is_digit(s[6]) && is_digit(s[7])) {
- /* rfc2822-date =
+ /* rfc2822-date =
weekday "," SP 2DIGIT "-" month "-" 4DIGIT SP time SP "GMT"
*/
year = year * 100 + 10 * s[6] + s[7] - 11 * '0';
@@ -243,26 +243,26 @@
}
}
else {
- /* actime-date =
+ /* actime-date =
wkday SP month SP ( 2DIGIT | ( SP 1DIGIT )) SP time SP 4DIGIT */
mon = month_d(s); skip_token(&s);
if (mon < 0 || !IS_LWS(*s)) return -1; s++;
- while (IS_LWS(*s)) s++;
+ while (IS_LWS(*s)) s++;
if (!is_digit(*s)) return -1;
day = *s++ - '0'; if (is_digit(*s)) day = 10 * day + *s++ - '0';
if (time_d(&s, &hour, &min, &sec) < 0) return -1;
- /* Accept also unix date (if it is GMT) */
+ /* Accept also unix date (if it is GMT) */
if ((s[0] == 'G' && s[1] == 'M' && s[2] == 'T' && s[3] == ' ') ||
(s[0] == 'U' && s[1] == 'T' && s[2] == 'C' && s[3] == ' '))
s += 4;
else if (s[0] == 'U' && s[1] == 'T' && s[2] == ' ')
s += 3;
- if (!is_digit(s[0]) || !is_digit(s[1]) ||
+ if (!is_digit(s[0]) || !is_digit(s[1]) ||
!is_digit(s[2]) || !is_digit(s[3]))
return -1;
year = 1000 * s[0] + 100 * s[1] + 10 * s[2] + s[3] - 1111 * '0'; s += 4;
}
-
+
if (hour > 24 || min >= 60 || sec >= 60 ||
(hour == 24 && min > 0 && sec > 0))
return -1;
@@ -271,7 +271,7 @@
if (day != 29 || mon != 1 || !LEAP_YEAR(year))
return -1;
}
-
+
if (year < EPOCH) {
*date = 0;
}
@@ -281,17 +281,17 @@
else {
int leap_year = LEAP_YEAR(year);
msg_time_t ydays = YEAR_DAYS(year) - YEAR_DAYS(EPOCH);
-
+
#if 0
- printf("Year %d%s starts %ld = %d - %d days since epoch (%d)\n",
- year, leap_year ? " (leap year)" : "",
+ printf("Year %d%s starts %ld = %d - %d days since epoch (%d)\n",
+ year, leap_year ? " (leap year)" : "",
ydays, YEAR_DAYS(year), YEAR_DAYS(EPOCH), EPOCH);
#endif
-
- *date = sec + 60 *
- (min + 60 *
- (hour + 24 *
- (day - 1 + mon * 30 + first_day_offset[mon] +
+
+ *date = sec + 60 *
+ (min + 60 *
+ (hour + 24 *
+ (day - 1 + mon * 30 + first_day_offset[mon] +
(leap_year && mon > 2) + ydays)));
}
*ss = s;
@@ -301,10 +301,10 @@
/**Encode RFC1123-date.
- *
+ *
* The function msg_date_e() prints @e http-date in the <rfc1123-date>
* format. The format is as follows:
- *
+ *
* @code
* rfc1123-date = wkday "," SP date SP time SP "GMT"
* wkday = "Mon" | "Tue" | "Wed"
@@ -317,11 +317,11 @@
* time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
* ; 00:00:00 - 23:59:59
* @endcode
- *
+ *
* @param b buffer to print the date
* @param bsiz size of the buffer
* @param http_date seconds since 01 Jan 1900.
- *
+ *
* @return The function msg_date_e() returns the size of the formatted date.
*/
issize_t msg_date_e(char b[], isize_t bsiz, msg_time_t http_date)
@@ -349,7 +349,7 @@
day -= YEAR_DAYS(year);
leap_year = LEAP_YEAR(year);
- month = 0, days_per_month = 31;
+ month = 0, days_per_month = 31;
while (day >= days_per_month) {
day -= days_per_month;
month++;
@@ -357,13 +357,13 @@
}
return snprintf(b, bsiz, "%s, %02ld %s %04ld %02ld:%02ld:%02ld GMT",
- wkdays + wkday * 4, day + 1, months + month * 4,
+ wkdays + wkday * 4, day + 1, months + month * 4,
year, hour, min, sec);
}
/**Decode a delta-seconds.
- *
+ *
* The function msg_delta_d() decodes a <delta-seconds> field.
*
* The <delta-seconds> is defined as follows:
@@ -393,9 +393,9 @@
return snprintf(b, bsiz, "%lu", (unsigned long)delta);
}
-/** Decode a HTTP date or delta
- *
- * Decode a @ref msg_date_d() "<http-date>" or
+/** Decode a HTTP date or delta
+ *
+ * Decode a @ref msg_date_d() "<http-date>" or
* @ref msg_delta_d() "<delta-seconds>" field.
*/
issize_t msg_date_delta_d(char const **ss,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_generic.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_generic.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_generic.c Tue Dec 16 13:05:22 2008
@@ -22,15 +22,15 @@
*
*/
-/**@internal
+/**@internal
* @ingroup msg_parser
* @file msg_generic.c
* @brief Functions for generic headers
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Thu Jan 23 20:08:00 2003 ppessi
- *
+ *
*/
#include "config.h"
@@ -55,17 +55,17 @@
*
* The function msg_generic_d() parses a generic header structure.
*
- * @param[in] home memory home
- * @param[in,out] h header structure
- * @param[in] s string to be parsed
- * @param[in] slen length of the string
+ * @param[in] home memory home
+ * @param[in,out] h header structure
+ * @param[in] s string to be parsed
+ * @param[in] slen length of the string
*
- * @retval 0 when successful,
+ * @retval 0 when successful,
* @retval -1 upon an error.
*/
issize_t msg_generic_d(su_home_t *home,
msg_header_t *h,
- char *s,
+ char *s,
isize_t slen)
{
h->sh_generic->g_string = s;
@@ -80,9 +80,9 @@
*/
issize_t msg_generic_e(char b[], isize_t bsiz, msg_header_t const *h, int flags)
{
- msg_generic_t const *g = h->sh_generic;
+ msg_generic_t const *g = h->sh_generic;
size_t n = strlen(g->g_string);
-
+
if (bsiz > n)
strcpy(b, g->g_string);
@@ -142,7 +142,7 @@
/* ====================================================================== */
/* Comma-separated list */
-/** @typedef struct msg_list_s msg_list_t;
+/** @typedef struct msg_list_s msg_list_t;
*
* Type for token list headers.
*
@@ -157,14 +157,14 @@
{
int compact = MSG_IS_COMPACT(flags);
char *b0 = b, *end = b + bsiz;
-
+
MSG_COMMALIST_E(b, end, h->sh_list->k_items, compact);
MSG_TERM_E(b, end);
return b - b0;
}
-/**@internal
+/**@internal
* Extra size of a msg_auth_t object.
*
* This function calculates extra size required by a msg_auth_t object.
@@ -182,14 +182,14 @@
char *msg_list_dup_one(msg_header_t *dst,
msg_header_t const *src,
- char *b,
+ char *b,
isize_t xtra)
{
char *end = b + xtra;
msg_param_t const ** items = (msg_param_t const **)&dst->sh_list->k_items;
b = msg_params_dup(items, src->sh_list->k_items, b, xtra);
-
+
assert(b <= end); (void)end;
return b;
@@ -200,8 +200,8 @@
* @retval 0 when successful
* @retval -1 upon an error
*/
-int msg_list_append_items(su_home_t *home,
- msg_list_t *k,
+int msg_list_append_items(su_home_t *home,
+ msg_list_t *k,
msg_param_t const items[])
{
size_t i;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c Tue Dec 16 13:05:22 2008
@@ -23,8 +23,8 @@
*/
/**@ingroup msg_headers
- * @CFILE msg_header_copy.c
- *
+ * @CFILE msg_header_copy.c
+ *
* Copying and duplicating headers structures.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -65,7 +65,7 @@
/** Copy a vector of parameters */
su_inline
char *msg_params_copy(char *b, size_t size,
- msg_param_t **dst,
+ msg_param_t **dst,
msg_param_t const src[])
{
size_t n = msg_params_count(src);
@@ -90,11 +90,11 @@
* @param hc header class for the copied header
* @param src pointer to a header object
*
- * @return
+ * @return
* The function @c msg_header_copy_as() returns a pointer to the the shallow copy
* of the header object, or @c NULL upon an error.
*/
-static msg_header_t *msg_header_copy_one_as(su_home_t *home,
+static msg_header_t *msg_header_copy_one_as(su_home_t *home,
msg_hclass_t *hc,
msg_header_t const *src)
{
@@ -145,7 +145,7 @@
* @return The function @c msg_header_copy_as() returns a pointer to the
* first of the copied msg header object(s), or @c NULL upon an error.
*/
-msg_header_t *msg_header_copy_as(su_home_t *home,
+msg_header_t *msg_header_copy_as(su_home_t *home,
msg_hclass_t *hc,
msg_header_t const *src)
{
@@ -161,7 +161,7 @@
if (!(h = msg_header_copy_one_as(home, hc, src)))
break;
- if (!rv)
+ if (!rv)
rv = h;
else
prev->sh_next = h;
@@ -210,7 +210,7 @@
* @return Return a pointer to the
* the duplicated msg header object(s), or @c NULL upon an error.
*/
-msg_header_t *msg_header_dup_one(su_home_t *home,
+msg_header_t *msg_header_dup_one(su_home_t *home,
msg_header_t const *src)
{
msg_hclass_t *hc;
@@ -277,7 +277,7 @@
if (!(h = msg_header_alloc(home, hc, (isize_t)xtra)))
break; /* error */
- if (!rv)
+ if (!rv)
rv = h;
if (!(end = hc->hc_dup_one(h, src, (char *)h + size, xtra)))
@@ -343,7 +343,7 @@
*/
char *msg_default_dup_one(msg_header_t *h,
msg_header_t const *src,
- char *b,
+ char *b,
isize_t xtra)
{
memcpy(&h->sh_header_next[1],
@@ -357,9 +357,9 @@
/* Copying or duplicating all headers in a message */
static int msg_copy_chain(msg_t *msg, msg_t const *copied);
-static int msg_dup_or_copy_all(msg_t *msg,
+static int msg_dup_or_copy_all(msg_t *msg,
msg_t const *original,
- msg_header_t *(*copy_one)(su_home_t *h,
+ msg_header_t *(*copy_one)(su_home_t *h,
msg_header_t const *));
@@ -383,8 +383,8 @@
msg_t *copy = msg_create(original->m_class, original->m_object->msg_flags);
if (copy) {
- if (original->m_chain
- ? msg_copy_chain(copy, original) < 0
+ if (original->m_chain
+ ? msg_copy_chain(copy, original) < 0
: msg_dup_or_copy_all(copy, original, msg_header_copy_one) < 0) {
msg_destroy(copy), copy = NULL;
}
@@ -412,18 +412,18 @@
msg_header_t *dh;
msg_header_t const *sh;
msg_header_t **hh;
-
+
tail = msg->m_tail;
-
+
for (sh = original->m_chain; sh; sh = (msg_header_t const *)sh->sh_succ) {
hh = msg_hclass_offset(msg->m_class, dst, sh->sh_class);
if (!hh)
break;
while (*hh)
hh = &(*hh)->sh_next;
-
+
dh = msg_header_copy_one(home, sh);
- if (!dh)
+ if (!dh)
break;
dh->sh_prev = tail, *tail = dh, tail = &dh->sh_succ;
@@ -468,15 +468,15 @@
return NULL;
}
-/** Copy a complete message, not keeping the header chain structure.
+/** Copy a complete message, not keeping the header chain structure.
*
* @retval 0 when successful
* @retval -1 upon an error
*/
static
-int msg_dup_or_copy_all(msg_t *msg,
+int msg_dup_or_copy_all(msg_t *msg,
msg_t const *original,
- msg_header_t *(*copy_one)(su_home_t *h,
+ msg_header_t *(*copy_one)(su_home_t *h,
msg_header_t const *))
{
su_home_t *home = msg_home(msg);
@@ -493,7 +493,7 @@
assert(copy_one);
end = (msg_header_t**)((char *)src + src->msg_size);
-
+
for (ssh = &src->msg_request; ssh < end; ssh++) {
sh = *ssh;
if (!sh)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_make.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_make.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_make.c Tue Dec 16 13:05:22 2008
@@ -61,14 +61,14 @@
#include <assert.h>
/** Make a header from a value string. */
-msg_header_t *msg_header_make(su_home_t *home,
+msg_header_t *msg_header_make(su_home_t *home,
msg_hclass_t *hc,
char const *s)
{
size_t xtra;
msg_header_t *h;
int normal = hc->hc_name ||
- (hc->hc_hash != msg_payload_hash &&
+ (hc->hc_hash != msg_payload_hash &&
hc->hc_hash != msg_separator_hash &&
hc->hc_hash != msg_error_hash);
@@ -76,7 +76,7 @@
return NULL;
/* For normal headers, strip LWS from both ends */
- if (normal)
+ if (normal)
skip_lws(&s);
xtra = strlen(s);
if (normal)
@@ -91,7 +91,7 @@
strncpy(b, s, xtra)[xtra] = 0;
if (hc->hc_parse(home, h, b, xtra) == -1) {
- /* Note: parsing function is responsible to free
+ /* Note: parsing function is responsible to free
everything it has allocated (like parameter lists) */
/* XXX - except header structures */
su_free(home, h), h = NULL;
@@ -102,13 +102,13 @@
}
/** Make a MSG header with formatting provided. */
-msg_header_t *msg_header_vformat(su_home_t *home,
+msg_header_t *msg_header_vformat(su_home_t *home,
msg_hclass_t *hc,
char const *fmt,
va_list ap)
{
msg_header_t *h;
-
+
int n;
size_t xtra = 64; /* reasonable default */
@@ -121,7 +121,7 @@
fmt = va_arg(ap, char const *);
return msg_header_make(home, hc, fmt);
}
-
+
if (!(h = msg_header_alloc(home, hc, xtra)))
return NULL;
@@ -131,7 +131,7 @@
va_copy(aq, ap);
n = vsnprintf(MSG_HEADER_DATA(h), xtra, fmt, aq);
va_end(aq);
-
+
if (n >= 0 && (size_t)n < xtra)
break;
@@ -148,13 +148,13 @@
if (xtra > INT_MAX)
xtra = INT_MAX;
-
+
if (!(h = msg_header_alloc(home, hc, xtra)))
return NULL;
}
-
+
if (hc->hc_parse(home, h, MSG_HEADER_DATA(h), (size_t)n) == -1) {
- /* Note: parsing function is responsible to free
+ /* Note: parsing function is responsible to free
everything it has allocated (like parameter lists) */
su_free(home, h), h = NULL;
}
@@ -162,7 +162,7 @@
return h;
}
-msg_header_t *msg_header_format(su_home_t *home,
+msg_header_t *msg_header_format(su_home_t *home,
msg_hclass_t *hc,
char const *fmt,
...)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_internal.h Tue Dec 16 13:05:22 2008
@@ -24,10 +24,10 @@
#ifndef MSG_INTERNAL_H
/** Defined when <msg_internal.h> has been included. */
-#define MSG_INTERNAL_H
+#define MSG_INTERNAL_H
-/**@IFILE msg_internal.h
- * @brief Abstract messages - internal interface
+/**@IFILE msg_internal.h
+ * @brief Abstract messages - internal interface
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
@@ -131,7 +131,7 @@
su_inline int msg_is_append(msg_header_t const *h)
{
- return
+ return
h->sh_class->hc_kind == msg_kind_append ||
h->sh_class->hc_kind == msg_kind_apndlist;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mclass.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mclass.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mclass.c Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*
*/
-/**@ingroup msg_parser
+/**@ingroup msg_parser
* @CFILE msg_mclass.c
*
* Message factory object.
@@ -63,12 +63,12 @@
* empty is true, the copied message class object will not recognize any
* headers. This is useful if more fine-grained control of parsing process
* is required, for instance.
- *
- * @param[in] old pointer to the message class object to be copied
- * @param[in] newsize size of hash table in the copied object
- * @param[in] empty if true, resulting copy does not contain any headers
- *
- * @return
+ *
+ * @param[in] old pointer to the message class object to be copied
+ * @param[in] newsize size of hash table in the copied object
+ * @param[in] empty if true, resulting copy does not contain any headers
+ *
+ * @return
* The function msg_mclass_clone() returns a pointer to a newly
* copied message class object, or NULL upon an error.
* The returned message class object can be freed with free().
@@ -78,7 +78,7 @@
* A memory allocation failed.
* @ERROR EINVAL
* The function was given invalid arguments.
- *
+ *
* @note The empty parser can handle request/status line. All headers are
* put into list of unknown headers (unless they are malformed, and they are
* put into list of erronous headers). However, SIP, RTSP, and HTTP
@@ -90,7 +90,7 @@
msg_mclass_t *msg_mclass_clone(msg_mclass_t const *old, int newsize, int empty)
{
size_t size, shortsize;
- msg_mclass_t *mc;
+ msg_mclass_t *mc;
int identical;
unsigned short i;
@@ -126,7 +126,7 @@
memcpy(mc, old, size);
mc->mc_short = NULL;
}
-
+
if (shortsize) {
if (empty)
mc->mc_short = memset((char *)mc + size, 0, shortsize);
@@ -147,8 +147,8 @@
* structure" is zero, the function extends the public message structure in
* order to store newly inserted header there.
*
- * @param[in,out] mc pointer to a message class object
- * @param[in] hc pointer to a header class object
+ * @param[in,out] mc pointer to a message class object
+ * @param[in] hc pointer to a header class object
* @param[in] offset offset of the header in
* @ref msg_pub_t "public message structure"
*
@@ -156,10 +156,10 @@
* the public message structure and places the header at the end of message.
*
* @return Number of collisions in hash table, or -1 upon an error.
- *
+ *
* @deprecated Use msg_mclass_insert_with_mask() instead.
*/
-int msg_mclass_insert_header(msg_mclass_t *mc,
+int msg_mclass_insert_header(msg_mclass_t *mc,
msg_hclass_t *hc,
unsigned short offset)
{
@@ -195,13 +195,13 @@
*
* @param[in,out] mc pointer to a message class
* @param[in] hc pointer to a header class
- * @param[in] offset offset of the header in
- * @ref msg_pub_t "public message structure"
- * @param[in] flags classification flags for the header
+ * @param[in] offset offset of the header in
+ * @ref msg_pub_t "public message structure"
+ * @param[in] flags classification flags for the header
*
* @return Number of collisions in hash table, or -1 upon an error.
*/
-int msg_mclass_insert_with_mask(msg_mclass_t *mc,
+int msg_mclass_insert_with_mask(msg_mclass_t *mc,
msg_hclass_t *hc,
unsigned short offset,
unsigned short flags)
@@ -232,8 +232,8 @@
*
* @relatesalso msg_mclass_s
*
- * @param[in,out] mc pointer to a message class object
- * @param[in] hr header reference object
+ * @param[in,out] mc pointer to a message class object
+ * @param[in] hr header reference object
*
* @return Number of collisions in hash table, or -1 upon an error.
*/
@@ -249,7 +249,7 @@
return -1;
}
- if (hr == NULL || (hc = hr->hr_class) == NULL)
+ if (hr == NULL || (hc = hr->hr_class) == NULL)
return 0;
/* Add short form */
@@ -260,10 +260,10 @@
if (compact < 'a' || compact > 'z')
return -1;
- if (shorts[compact - 'a'].hr_class &&
+ if (shorts[compact - 'a'].hr_class &&
shorts[compact - 'a'].hr_class != hc)
return -1;
-
+
shorts[compact - 'a'] = *hr;
}
@@ -281,7 +281,7 @@
mc->mc_hash[j] = hr[0];
mc->mc_hash_used++;
-
+
return collisions;
}
@@ -296,8 +296,8 @@
* class based on the contents of the header to be parsed. The buffer @a s
* should point to the first character in the header name.
*
- * @param[in] mc message class object
- * @param[in] s header contents
+ * @param[in] mc message class object
+ * @param[in] s header contents
* @param[out] return_start_of_content start of header content (may be NULL)
*
* @return The function msg_find_hclass() returns a pointer to a header
@@ -309,11 +309,11 @@
* start of the header contents within @a s, or 0 upon an error parsing the
* header name and following colon.
*
- * @par
+ * @par
* Upon a fatal error, a NULL pointer is returned.
*/
-msg_href_t const *msg_find_hclass(msg_mclass_t const *mc,
- char const *s,
+msg_href_t const *msg_find_hclass(msg_mclass_t const *mc,
+ char const *s,
isize_t *return_start_of_content)
{
msg_href_t const *hr;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime.c Tue Dec 16 13:05:22 2008
@@ -132,7 +132,7 @@
* part. Note that the semantics of a part differ from the
* semantics of a message, as described in the text.>
*
- * encapsulation := delimiter transport-padding CRLF
+ * encapsulation := delimiter transport-padding CRLF
* body-part
*
* close-delimiter := delimiter "--"
@@ -144,26 +144,26 @@
* @endcode
*
* @par Parsing a Multipart Message
- *
+ *
* When a message body contains a multipart entity (in other words, it has a
* MIME media type of "multipart"), the application can split the multipart
* entity into body parts
*
* The parsing is relatively simple, the application just gives a memory
- * home object, a Content-Type header object and message body object as an
+ * home object, a Content-Type header object and message body object as an
* argument to msg_multipart_parse() function:
* @code
- * if (sip->sip_content_type &&
+ * if (sip->sip_content_type &&
* strncasecmp(sip->sip_content_type, "multipart/", 10) == 0) {
* msg_multipart_t *mp;
*
* if (sip->sip_multipart)
* mp = sip->sip_multipart;
* else
- * mp = msg_multipart_parse(msg_home(msg),
+ * mp = msg_multipart_parse(msg_home(msg),
* sip->sip_content_type,
* (sip_payload_t *)sip->sip_payload);
- *
+ *
* if (mp)
* ... processing multipart ...
* else
@@ -194,12 +194,12 @@
* msg_header_t *h = NULL;
* char *b;
* size_t len, offset;
- *
+ *
* mp = msg_multipart_create(home, "text/html;level=3", html, strlen(html));
* mp->mp_next = msg_multipart_create(home, "image/gif", gif, giflen);
*
* c = sip_content_type_make(home, "multipart/mixed");
- *
+ *
* // Add delimiters to multipart, and boundary parameter to content-type
* if (msg_multipart_complete(home, c, mp) < 0)
* return -1; // Error
@@ -209,14 +209,14 @@
* if (msg_multipart_serialize(&h, mp) < 0)
* return -1; // Error
*
- * // Encode all multipart components
+ * // Encode all multipart components
* len = msg_multipart_prepare(msg, mp, 0);
* if (len < 0)
* return -1; // Error
*
* pl = sip_payload_create(home, NULL, len);
*
- * // Copy each element from multipart to pl_data
+ * // Copy each element from multipart to pl_data
* b = pl->pl_data;
* for (offset = 0, h = mp; offset < len; h = h->sh_succ) {
* memcpy(b + offset, h->sh_data, h->sh_len);
@@ -292,7 +292,7 @@
/** Boundary chars. */
-static char const bchars[] =
+static char const bchars[] =
"'()+_,-./:=?"
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -331,7 +331,7 @@
}
return boundary;
}
- }
+ }
/* Look for LF -- */
for (;(p = memmem(p, end - p, LF "--", 3)); p += 3) {
@@ -362,9 +362,9 @@
* The function msg_multipart_parse() parses a MIME multipart message. The
* common syntax of multiparts is described in @RFC2046 (section 7).
*
- * @param[in,out] home home for allocating structures
- * @param[in] c content-type header for multipart
- * @param[in] pl payload structure for multipart
+ * @param[in,out] home home for allocating structures
+ * @param[in] c content-type header for multipart
+ * @param[in] pl payload structure for multipart
*
* After parsing, the @a pl will contain the plain-text preamble (if any).
*
@@ -418,7 +418,7 @@
/* Split multipart into parts */
for (;;) {
- while (p[0] == ' ')
+ while (p[0] == ' ')
p++;
p += p[0] == '\r' ? 1 + (p[1] == '\n') : (p[0] == '\n');
@@ -464,7 +464,7 @@
break;
}
- b = next; p = next + m;
+ b = next; p = next + m;
}
if (!mp || !mp->mp_close_delim) {
@@ -516,7 +516,7 @@
blen = strlen(boundary);
for (mp = all; mp; mp = mp->mp_next) {
- mp->mp_data = boundary;
+ mp->mp_data = boundary;
mp->mp_len = blen;
assert(mp->mp_payload || mp->mp_separator);
@@ -546,19 +546,19 @@
}
/**Add all missing parts to the multipart.
- *
+ *
* Add missing components such as boundaries between body parts, separators
* between body-part headers and data, and close-delimiter after last
* body-part to the multipart message.
- *
- * @param[in,out] home home for allocating structures
- * @param[in,out] c content-type header for multipart
- * @param[in,out] mp pointer to first multipart structure
+ *
+ * @param[in,out] home home for allocating structures
+ * @param[in,out] c content-type header for multipart
+ * @param[in,out] mp pointer to first multipart structure
*
* @retval 0 when successful
* @retval -1 upon an error
*
- * @ERRORS
+ * @ERRORS
* @ERROR EBADMSG
* The @b Content-Type header @a c is malformed, or multipart message
* contains a malformed @b Content-Type header.
@@ -635,7 +635,7 @@
if (mp->mp_next == NULL) {
if (!mp->mp_close_delim)
- mp->mp_close_delim = msg_payload_format(home, "%.*s--" CR LF,
+ mp->mp_close_delim = msg_payload_format(home, "%.*s--" CR LF,
(int)m, boundary);
if (!mp->mp_close_delim)
return -1;
@@ -813,7 +813,7 @@
if (!mp || !mp->mp_data)
return -1;
- if (!mp->mp_common->h_data ||
+ if (!mp->mp_common->h_data ||
mp->mp_common->h_len != mp->mp_len - 2 ||
memcmp(mp->mp_common->h_data, mp->mp_data + 2, mp->mp_len - 2)) {
mp->mp_common->h_data = mp->mp_data + 2;
@@ -833,10 +833,10 @@
assert(h && msg_is_multipart(h));
msg_payload_init(pl);
-
+
result = (msg_multipart_t *)h;
- pl->pl_data = s;
+ pl->pl_data = s;
pl->pl_len = slen;
mp = msg_multipart_parse(tmphome, NULL, pl);
@@ -845,14 +845,14 @@
*result = *mp;
if (result->mp_common->h_succ->sh_prev)
- result->mp_common->h_succ->sh_prev =
+ result->mp_common->h_succ->sh_prev =
&result->mp_common->h_succ;
su_free(tmphome, mp);
-
+
su_home_move(home, tmphome);
}
-
+
su_home_deinit(tmphome);
return mp ? 0 : -1;
@@ -877,7 +877,7 @@
offset = msg_payload_dup_xtra(h, offset);
for (hh = (msg_header_t const **)&((msg_pub_t *)mp)->msg_request;
- (char *)hh <= (char *)&mp->mp_close_delim;
+ (char *)hh <= (char *)&mp->mp_close_delim;
hh++) {
for (h = *hh; h; h = h->sh_next) {
MSG_STRUCT_SIZE_ALIGN(offset);
@@ -899,7 +899,7 @@
b = msg_payload_dup_one(dst, src, b, xtra);
for (hh = &((msg_pub_t*)mp)->msg_request;
- (char *)hh <= (char *)&mp->mp_close_delim;
+ (char *)hh <= (char *)&mp->mp_close_delim;
hh++) {
for (h = *hh; h; h = h->sh_next) {
MSG_STRUCT_ALIGN(b);
@@ -972,8 +972,8 @@
*
* The function msg_mediatype_d() parses a mediatype string.
*
- * @param[in,out] ss string to be parsed
- * @param[out] type value result for media type
+ * @param[in,out] ss string to be parsed
+ * @param[out] type value result for media type
*
* @retval 0 when successful,
* @retval -1 upon an error.
@@ -1059,7 +1059,7 @@
*/
msg_hclass_t msg_accept_class[] =
-MSG_HEADER_CLASS(msg_, accept, "Accept", "", ac_params, apndlist,
+MSG_HEADER_CLASS(msg_, accept, "Accept", "", ac_params, apndlist,
msg_accept, msg_accept);
issize_t msg_accept_d(su_home_t *home, msg_header_t *h, char *s, isize_t slen)
@@ -1136,8 +1136,8 @@
return b;
}
-/** Update parameter(s) for Accept header. */
-int msg_accept_update(msg_common_t *h,
+/** Update parameter(s) for Accept header. */
+int msg_accept_update(msg_common_t *h,
char const *name, isize_t namelen,
char const *value)
{
@@ -1223,8 +1223,8 @@
return b;
}
-/** Update parameter(s) for Accept-* header. */
-int msg_accept_any_update(msg_common_t *h,
+/** Update parameter(s) for Accept-* header. */
+int msg_accept_any_update(msg_common_t *h,
char const *name, isize_t namelen,
char const *value)
{
@@ -1431,7 +1431,7 @@
*/
/**@ingroup msg_content_disposition
- * @typedef struct msg_content_disposition_s msg_content_disposition_t;
+ * @typedef struct msg_content_disposition_s msg_content_disposition_t;
*
* The structure msg_content_disposition_t contains representation of an @b
* Content-Disposition header.
@@ -1548,7 +1548,7 @@
*/
/**@ingroup msg_content_encoding
- * @typedef struct msg_list_s msg_content_encoding_t;
+ * @typedef struct msg_list_s msg_content_encoding_t;
*
* The structure msg_content_encoding_t contains representation of an @b
* Content-Encoding header.
@@ -1715,7 +1715,7 @@
*/
/**@ingroup msg_content_md5
- * @typedef struct msg_generic_s msg_content_md5_t;
+ * @typedef struct msg_generic_s msg_content_md5_t;
*
* The structure msg_content_md5_t contains representation of an @b
* Content-MD5 header.
@@ -1896,7 +1896,7 @@
*/
/**@ingroup msg_mime_version
- * @typedef struct msg_generic_s msg_mime_version_t;
+ * @typedef struct msg_generic_s msg_mime_version_t;
*
* The structure msg_mime_version_t contains representation of an @b
* MIME-Version header.
@@ -1935,7 +1935,7 @@
*/
/**@ingroup msg_content_location
- * @typedef struct msg_generic_s msg_content_location_t;
+ * @typedef struct msg_generic_s msg_content_location_t;
*
* The structure msg_content_location_t contains representation of an @b
* Content-Location header.
@@ -2000,7 +2000,7 @@
*/
/**@ingroup msg_content_transfer_encoding
- * @typedef struct msg_generic_s msg_content_transfer_encoding_t;
+ * @typedef struct msg_generic_s msg_content_transfer_encoding_t;
*
* The structure msg_content_transfer_encoding_t contains representation of
* an @b Content-Transfer-Encoding header.
@@ -2027,11 +2027,11 @@
/**@ingroup msg_mime
* @defgroup msg_warning Warning Header
- *
+ *
* The Warning response-header field is used to carry additional information
* about the status of a response. Its syntax is defined in [S20.43]
* as follows:
- *
+ *
* @code
* Warning = "Warning" HCOLON warning-value *(COMMA warning-value)
* warning-value = warn-code SP warn-agent SP warn-text
@@ -2045,7 +2045,7 @@
*/
/**@ingroup msg_warning
- * @typedef struct msg_warning_s msg_warning_t;
+ * @typedef struct msg_warning_s msg_warning_t;
*
* The structure msg_warning_t contains representation of an @b
* Warning header.
@@ -2073,7 +2073,7 @@
*s = '\0', s += span_lws(s + 1) + 1;
/* Parse protocol */
- if (!IS_DIGIT(*s))
+ if (!IS_DIGIT(*s))
return -1;
w->w_code = strtoul(s, &s, 10);
skip_lws(&s);
@@ -2098,7 +2098,7 @@
int n;
size_t m;
- n = snprintf(b, bsiz, "%03u %s%s%s ",
+ n = snprintf(b, bsiz, "%03u %s%s%s ",
w->w_code, w->w_host, port ? ":" : "", port ? port : "");
if (n < 0)
return n;
@@ -2122,9 +2122,9 @@
return offset;
}
-char *msg_warning_dup_one(msg_header_t *dst,
- msg_header_t const *src,
- char *b,
+char *msg_warning_dup_one(msg_header_t *dst,
+ msg_header_t const *src,
+ char *b,
isize_t xtra)
{
msg_warning_t *w = (msg_warning_t *)dst;
@@ -2143,6 +2143,6 @@
#define msg_warning_update NULL
-msg_hclass_t msg_warning_class[] =
- MSG_HEADER_CLASS(msg_, warning, "Warning", "", w_common, append,
+msg_hclass_t msg_warning_class[] =
+ MSG_HEADER_CLASS(msg_, warning, "Warning", "", w_common, append,
msg_warning, msg_warning);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime_table.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime_table.c.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_mime_table.c.in Tue Dec 16 13:05:22 2008
@@ -31,8 +31,8 @@
*/
/**@ingroup msg_mime
- *
- * @CFILE msg_mime_table.c
+ *
+ * @CFILE msg_mime_table.c
* @brief Parser table used for testing.
*
* #AUTO#
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_name_hash.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_name_hash.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_name_hash.c Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
/**@ingroup test_msg
* @CFILE msg_name_hash.c
- *
- * Calculate hash for given header name.
- *
+ *
+ * Calculate hash for given header name.
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Tue Aug 20 16:27:01 EEST 2002 ppessi
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.awk Tue Dec 16 13:05:22 2008
@@ -49,7 +49,7 @@
# Initialize these as arrays
split("", symbols);
split("", names);
- split("", comments);
+ split("", comments);
split("", hashes);
split("", NAMES);
split("", Comments);
@@ -81,7 +81,7 @@
{
hash = 0;
- len = length(name);
+ len = length(name);
for (i = 1; i <= len; i++) {
c = tolower(substr(name, i, 1));
@@ -112,7 +112,7 @@
function protos (name, comment, hash, since)
{
NAME=toupper(name);
- sub(/.*[\/][*][*][<][ ]*/, "", comment);
+ sub(/.*[\/][*][*][<][ ]*/, "", comment);
sub(/[ ]*[*][\/].*/, "", comment);
sub(/[ ]+/, " ", comment);
@@ -132,12 +132,12 @@
if (name2 != name && name2 != tprefix "_" name) {
print name " mismatch with " comment " (" real ")" > "/dev/stderr";
}
-
+
hash = name_hash(parts[1]);
hashed[name] = hash;
- if (comment !~ /header/) {
+ if (comment !~ /header/) {
comment = comment " header";
}
}
@@ -149,13 +149,13 @@
COMMENT = toupper(comment);
# Store the various forms into an array for the footer processing
- N++;
- hashes[N] = hash;
+ N++;
+ hashes[N] = hash;
names[N] = name;
- NAMES[N] = NAME;
- comments[N] = comment;
- Comments[N] = comment;
- COMMENTS[N] = COMMENT;
+ NAMES[N] = NAME;
+ comments[N] = comment;
+ Comments[N] = comment;
+ COMMENTS[N] = COMMENT;
symbols[name] = comment;
if (since) {
@@ -165,8 +165,8 @@
expr = (without_experimental > 0 && do_hash);
if (expr) {
printf "%s is experimental\n", Comment;
- }
-
+ }
+
experimental[N] = expr;
if (PR) {
@@ -190,7 +190,7 @@
#
if (p) {
gsub(/#hash#/, hash, p);
- gsub(/#xxxxxx#/, name, p);
+ gsub(/#xxxxxx#/, name, p);
gsub(/#XXXXXX#/, NAME, p);
gsub(/#xxxxxxx_xxxxxxx#/, comment, p);
gsub(/#Xxxxxxx_Xxxxxxx#/, Comment, p);
@@ -203,17 +203,17 @@
# Remove line with #version#
gsub(/\n[^#\n]*#version#[^\n]*/, "", p);
}
-
+
print p > PR;
}
}
-#
+#
# Repeat each line in the footer containing the magic replacement
# pattern with an instance of all headers
#
function process_footer (text)
-{
+{
if (!match(tolower(text), /#(xxxxxx(x_xxxxxxx)?|hash)#/)) {
n = length(text);
while (substr(text, n) == "\n") {
@@ -224,7 +224,7 @@
print text > PR;
return;
}
-
+
n = split(text, lines, RS);
for (i = 1; i <= n; i++) {
@@ -247,7 +247,7 @@
gsub(/#xxxxxxx_xxxxxxx#/, comments[j], l);
gsub(/#Xxxxxxx_Xxxxxxx#/, Comments[j], l);
gsub(/#XXXXXXX_XXXXXXX#/, COMMENTS[j], l);
- gsub(/#xxxxxx#/, names[j], l);
+ gsub(/#xxxxxx#/, names[j], l);
gsub(/#XXXXXX#/, NAMES[j], l);
print l > PR;
}
@@ -272,7 +272,7 @@
if (line ~ /^#/ || line ~ /^$/)
continue;
- split(line, tokens, /[ \t]*=[ \t]*/);
+ split(line, tokens, /[ \t]*=[ \t]*/);
name = tolower(tokens[1]);
gsub(/-/, "_", name);
gsub(/,/, " ", name);
@@ -297,7 +297,7 @@
function templates ()
{
if (!auto) {
- auto = FILENAME;
+ auto = FILENAME;
if (!prefix) { prefix = module; }
if (!tprefix) { tprefix = prefix; }
@@ -369,11 +369,11 @@
/^#### EXTRA HEADER LIST STARTS HERE ####$/ { HLIST=1; templates(); }
HLIST && /^#### DEFAULT HEADER LIST ENDS HERE ####$/ { basic=total; }
-HLIST && /^#### EXPERIMENTAL HEADER LIST STARTS HERE ####$/ {
+HLIST && /^#### EXPERIMENTAL HEADER LIST STARTS HERE ####$/ {
without_experimental = total; }
-HLIST && /^[a-z]/ { protos($1, $0, 0, $2);
- headers[total++] = $1;
+HLIST && /^[a-z]/ { protos($1, $0, 0, $2);
+ headers[total++] = $1;
Extra[$1] = extra++;
}
/^#### EXTRA HEADER LIST ENDS HERE ####$/ { HLIST=0; }
@@ -383,14 +383,14 @@
PT && /^ *\/\* === Hash headers end here \*\// { in_header_list=0;}
-in_header_list && /^ (sip|rtsp|http|msg|mp)_[a-z_0-9]+_t/ {
+in_header_list && /^ (sip|rtsp|http|msg|mp)_[a-z_0-9]+_t/ {
n=$0
- sub(/;.*$/, "", n);
+ sub(/;.*$/, "", n);
sub(/^ *(sip|rtsp|http|msg|mp)_[a-z0-9_]*_t[ ]*/, "", n);
sub(/^[*](sip|rtsp|http|msg|mp)_/, "", n);
if ($0 !~ /[\/][*][*][<]/) {
- getline;
+ getline;
}
if ($0 !~ /[\/][*][*][<]/) {
printf "msg_protos.awk: header %s is malformed\n", n;
@@ -446,7 +446,7 @@
len = split("request status separator payload unknown error", unnamed, " ");
for (i = 1; i <= len; i++) {
- printf(" {{ %s_%s_class, msg_offsetof(%s_t, %s_%s) }},\n",
+ printf(" {{ %s_%s_class, msg_offsetof(%s_t, %s_%s) }},\n",
tprefix, unnamed[i], module, prefix, unnamed[i]) > PT;
}
if (multipart) {
@@ -456,7 +456,7 @@
printf(" {{ NULL, 0 }},\n") > PT;
}
if (MC_SHORT_SIZE) {
- printf(" %s_short_forms, \n", module) > PT;
+ printf(" %s_short_forms, \n", module) > PT;
}
else {
printf(" NULL, \n") > PT;
@@ -488,11 +488,11 @@
if (i >= ordinary) {
printf(" { %s_%s_class,\n" \
- " msg_offsetof(struct %s, extra[%u])%s }%s\n",
+ " msg_offsetof(struct %s, extra[%u])%s }%s\n",
tprefix, n, struct, Extra[n], flags, c) > PT;
}
else {
- printf(" { %s_%s_class, msg_offsetof(%s_t, %s_%s)%s }%s\n",
+ printf(" { %s_%s_class, msg_offsetof(%s_t, %s_%s)%s }%s\n",
tprefix, n, module, prefix, n, flags, c) > PT;
}
@@ -520,7 +520,7 @@
if (multipart)
protos("multipart", "/**< Multipart payload */", -7);
}
-
+
if (PR) {
process_footer(footer);
}
@@ -547,17 +547,17 @@
if (MC_SHORT_SIZE) {
printf("static msg_href_t const " \
- "%s_short_forms[MC_SHORT_SIZE] = \n{\n",
- module) > PT;
+ "%s_short_forms[MC_SHORT_SIZE] = \n{\n",
+ module) > PT;
for (i = 1; i <= MC_SHORT_SIZE; i = i + 1) {
c = (i == MC_SHORT_SIZE) ? "" : ",";
if (i in shorts) {
n = shorts[i];
flags = header_flags[n]; if (flags) flags = ",\n " flags;
-
- printf(" { /* %s */ %s_%s_class, msg_offsetof(%s_t, %s_%s)%s }%s\n",
- substr(lower_case, i, 1),
+
+ printf(" { /* %s */ %s_%s_class, msg_offsetof(%s_t, %s_%s)%s }%s\n",
+ substr(lower_case, i, 1),
tprefix, n, module, prefix, n, flags, c) \
> PT;
}
@@ -566,7 +566,7 @@
> PT;
}
}
- printf("};\n\n") > PT;
+ printf("};\n\n") > PT;
}
# printf("extern msg_hclass_t msg_multipart_class[];\n\n") > PT;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c Tue Dec 16 13:05:22 2008
@@ -209,7 +209,7 @@
/* realloc and cut down buffer */
size_t new_size;
void *new_data;
-
+
if (eos)
new_size = mb->mb_commit + 1;
else
@@ -324,11 +324,11 @@
* blocks, so the caller should allocate at least two elements for the I/O
* vector @a vec.
*
- * @param[in] msg message object
- * @param[out] vec I/O vector
- * @param[in] veclen available length of @a vec
+ * @param[in] msg message object
+ * @param[out] vec I/O vector
+ * @param[in] veclen available length of @a vec
* @param[in] n number of possibly available bytes
- * @param[in] exact true if data ends at message boundary
+ * @param[in] exact true if data ends at message boundary
*
* @return
* The length of I/O vector to
@@ -815,7 +815,7 @@
su_inline int extract_incomplete_chunks(msg_t *, int eos);
static issize_t extract_first(msg_t *, msg_pub_t *,
char b[], isize_t bsiz, int eos);
-su_inline issize_t extract_next(msg_t *, msg_pub_t *, char *, isize_t bsiz,
+su_inline issize_t extract_next(msg_t *, msg_pub_t *, char *, isize_t bsiz,
int eos, int copy);
static issize_t extract_header(msg_t *, msg_pub_t*,
char b[], isize_t bsiz, int eos, int copy);
@@ -992,7 +992,7 @@
/* Extract header or message body */
su_inline issize_t
-extract_next(msg_t *msg, msg_pub_t *mo, char *b, isize_t bsiz,
+extract_next(msg_t *msg, msg_pub_t *mo, char *b, isize_t bsiz,
int eos, int copy)
{
if (IS_CRLF(b[0]))
@@ -1002,7 +1002,7 @@
}
/** Extract a header. */
-issize_t msg_extract_header(msg_t *msg, msg_pub_t *mo,
+issize_t msg_extract_header(msg_t *msg, msg_pub_t *mo,
char b[], isize_t bsiz, int eos)
{
return extract_header(msg, mo, b, bsiz, eos, 0);
@@ -1187,16 +1187,16 @@
return h;
}
-/** Complete this header field and parse next header field.
+/** Complete this header field and parse next header field.
*
* This function completes parsing a multi-field header like @Accept,
- * @Contact, @Via or @Warning. It scans for the next header field and
+ * @Contact, @Via or @Warning. It scans for the next header field and
* if one is found, it calls the parsing function recursively.
*
- * @param home memory home used ot allocate
+ * @param home memory home used ot allocate
* new header structures and parameter lists
* @param prev pointer to header structure already parsed
- * @param s header content to parse; should point to the area after
+ * @param s header content to parse; should point to the area after
* current header field (either end of line or to a comma
* separating header fields)
* @param slen ignored
@@ -1206,7 +1206,7 @@
* @retval >= 0 when successful
* @retval -1 upon an error
*/
-issize_t msg_parse_next_field(su_home_t *home, msg_header_t *prev,
+issize_t msg_parse_next_field(su_home_t *home, msg_header_t *prev,
char *s, isize_t slen)
{
msg_hclass_t *hc = prev->sh_class;
@@ -1224,7 +1224,7 @@
if (*s == 0)
return 0;
-
+
h = msg_header_alloc(home, hc, 0);
if (!h)
return -1;
@@ -1764,19 +1764,19 @@
/** Convert a message to a string.
*
- * A message is encoded and the encoding result is returned as a string.
+ * A message is encoded and the encoding result is returned as a string.
* Because the message may contain binary payload (or NUL in headers), the
* message length is returned separately in @a *return_len, too.
*
- * Note that the message is serialized as a side effect.
+ * Note that the message is serialized as a side effect.
*
* @param home memory home used to allocate the string
* @param msg message to encode
* @param pub message object to encode (may be NULL)
* @param flags flags used when encoding
* @param return_len return-value parameter for encoded message length
- *
- * @return Encoding result as a C string.
+ *
+ * @return Encoding result as a C string.
*
* @since New in @VERSION_1_12_4
*
@@ -1843,7 +1843,7 @@
b2 = su_realloc(home, b, bsiz);
if (b2 == NULL) {
- errno = ENOMEM;
+ errno = ENOMEM;
su_free(home, b);
return NULL;
}
@@ -2110,8 +2110,8 @@
* Headers are either inserted just before the payload, or after the first
* line, depending on their type.
*
- * @param[in] msg message object
- * @param[in,out] pub public message structure
+ * @param[in] msg message object
+ * @param[in,out] pub public message structure
* @param prepend if true, add before same type of headers (instead after them)
* @param head head of chain
* @param h header to insert
@@ -2128,7 +2128,7 @@
msg_header_t **hh;
msg_header_t **separator;
msg_header_t **payload;
-
+
assert(msg && pub && head && h);
mc = msg->m_class;
@@ -2523,7 +2523,7 @@
*hh = h;
}
-static int _msg_header_add_list_items(msg_t *msg,
+static int _msg_header_add_list_items(msg_t *msg,
msg_header_t **hh,
msg_header_t const *src);
@@ -2658,7 +2658,7 @@
}
/* Add list items */
-static int _msg_header_add_list_items(msg_t *msg,
+static int _msg_header_add_list_items(msg_t *msg,
msg_header_t **hh,
msg_header_t const *src)
{
@@ -2667,17 +2667,17 @@
if (!s || !*s)
return 0;
-
+
msg_fragment_clear(h->sh_common);
-
+
/* Remove empty headers */
for (hh = &h->sh_next; *hh; *hh = (*hh)->sh_next)
msg_chain_remove(msg, *hh);
-
+
if (msg_header_join_items(msg_home(msg), h->sh_common, src->sh_common, 1)
< 0)
return -1;
-
+
return 0;
}
@@ -2801,12 +2801,12 @@
return msg_header_parse_str(msg, pub, s);
}
-
+
/**Add string to message.
*
* Parse a string containing headers (or a message body, if the string
* starts with linefeed) and add resulting header objects to the message
- * object.
+ * object.
*
* @param msg message object
* @param pub message header structure where heades are added (may be NULL)
@@ -2816,7 +2816,7 @@
* @retval -1 upon an error
*
* @sa msg_header_add_str(), url_headers_as_string()
- *
+ *
* @since New in @VERSION_1_12_4.
*/
int msg_header_parse_str(msg_t *msg,
@@ -2880,7 +2880,7 @@
assert(msg);
- if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
+ if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
h->sh_class == NULL)
return -1;
if (pub == NULL)
@@ -2906,7 +2906,7 @@
{
msg_header_t **hh, **hh0;
- if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
+ if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
h->sh_class == NULL)
return -1;
if (pub == NULL)
@@ -2955,7 +2955,7 @@
msg_header_t **hh, **hh0;
void const *data;
- if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
+ if (msg == NULL || h == NULL || h == MSG_HEADER_NONE ||
h->sh_class == NULL)
return -1;
if (pub == NULL)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser_util.c Tue Dec 16 13:05:22 2008
@@ -102,7 +102,7 @@
* in @a return_token, and updates the @a ss to the end of token and
* possible whitespace.
*/
-issize_t msg_token_d(char **ss, char const **return_token)
+issize_t msg_token_d(char **ss, char const **return_token)
{
char *s = *ss;
size_t n = span_token(s);
@@ -131,7 +131,7 @@
uint32_t value;
unsigned digit;
- if (!IS_DIGIT(*s))
+ if (!IS_DIGIT(*s))
return -1;
for (value = 0; IS_DIGIT(*s); s++) {
@@ -169,26 +169,26 @@
* list.
*
* The function @b must be passed a scanning function @a scanner. The
- * scanning function scans for a legitimate list item, for example, a token.
+ * scanning function scans for a legitimate list item, for example, a token.
* It should also compact the list item, for instance, if the item consists
* of @c name=value parameter definitions it should remove whitespace around
* "=" sign. The scanning function returns the length of the scanned item,
* including any linear whitespace after it.
*
- * @param[in] home memory home for allocating list pointers
- * @param[in,out] ss pointer to pointer to string to be parsed
+ * @param[in] home memory home for allocating list pointers
+ * @param[in,out] ss pointer to pointer to string to be parsed
* @param[in,out] append_list pointer to list
* where parsed list items are appended
- * @param[in] sep separator character
+ * @param[in] sep separator character
* @param[in] scanner pointer to function for scanning a single item
- *
+ *
* @retval 0 if successful.
* @retval -1 upon an error.
*/
-issize_t msg_any_list_d(su_home_t *home,
- char **ss,
+issize_t msg_any_list_d(su_home_t *home,
+ char **ss,
msg_param_t **append_list,
- issize_t (*scanner)(char *s),
+ issize_t (*scanner)(char *s),
int sep)
{
char const *stack[MSG_N_PARAMS];
@@ -232,7 +232,7 @@
goto error;
list = re_list;
}
-
+
list[n++] = s;
s += tlen;
}
@@ -240,7 +240,7 @@
if (*s == sep) {
*s++ = '\0';
skip_lws(&s);
- }
+ }
else if (*s)
break;
}
@@ -278,11 +278,11 @@
* This function compacts the scanned value. It removes the
* whitespace around equal sign "=" by moving the equal sign character and
* value towards name.
- *
- * If there is whitespace within the scanned value or after it,
+ *
+ * If there is whitespace within the scanned value or after it,
* NUL-terminates the scanned attribute.
*
- * @retval > 0 number of characters scanned,
+ * @retval > 0 number of characters scanned,
* including the whitespace within the value
* @retval -1 upon an error
*/
@@ -313,9 +313,9 @@
v = s; s += qlen;
}
else {
- v = s;
+ v = s;
skip_param(&s);
- if (s == v)
+ if (s == v)
return -1;
}
@@ -339,16 +339,16 @@
* av-pair = token ["=" ( value / quoted-string) ] ; optional value
* @endcode
*
- * @param[in] home pointer to a memory home
- * @param[in,out] ss pointer to string at the start of parameter list
+ * @param[in] home pointer to a memory home
+ * @param[in,out] ss pointer to string at the start of parameter list
* @param[in,out] append_list pointer to list
* where parsed list items are appended
*
* @retval >= 0 if successful
* @retval -1 upon an error
*/
-issize_t msg_avlist_d(su_home_t *home,
- char **ss,
+issize_t msg_avlist_d(su_home_t *home,
+ char **ss,
msg_param_t const **append_list)
{
char const *stack[MSG_N_PARAMS];
@@ -369,7 +369,7 @@
params = stack;
N = MSG_PARAMS_NUM(1);
}
-
+
for (;;) {
char *p;
size_t tlen;
@@ -398,9 +398,9 @@
v = s; s += qlen;
}
else {
- v = s;
+ v = s;
skip_param(&s);
- if (s == v)
+ if (s == v)
goto error;
}
if (p + tlen + 1 != v) {
@@ -440,7 +440,7 @@
}
else if (n == N) {
/* Reallocate params */
- char **nparams = su_alloc(home,
+ char **nparams = su_alloc(home,
(N = MSG_PARAMS_NUM(N + 1)) * sizeof(*params));
if (!nparams) {
goto error;
@@ -467,8 +467,8 @@
* *(";" token [ "=" (token | quoted-string)]).
* @endcode
*
- * @param[in] home pointer to a memory home
- * @param[in,out] ss pointer to string at the start of parameter list
+ * @param[in] home pointer to a memory home
+ * @param[in,out] ss pointer to string at the start of parameter list
* @param[in,out] append_list pointer to list
* where parsed list items are appended
*
@@ -477,8 +477,8 @@
*
* @sa msg_avlist_d()
*/
-issize_t msg_params_d(su_home_t *home,
- char **ss,
+issize_t msg_params_d(su_home_t *home,
+ char **ss,
msg_param_t const **append_list)
{
if (**ss == ';') {
@@ -487,7 +487,7 @@
return msg_avlist_d(home, ss, append_list);
}
- if (IS_LWS(**ss)) {
+ if (IS_LWS(**ss)) {
*(*ss)++ = '\0'; skip_lws(ss);
}
@@ -501,7 +501,7 @@
char *end = b + bsiz, *b0 = b;
msg_param_t p;
- if (pparams)
+ if (pparams)
for (i = 0; (p = pparams[i]); i++) {
if (p[0]) {
MSG_CHAR_E(b, end, ';');
@@ -537,13 +537,13 @@
MSG_STRING_DUP(b, pp[i], s[i]);
}
pp[i] = NULL;
-
+
assert(b <= end); (void)end;
-
+
*d = (msg_param_t const *)pp;
return b;
-}
+}
/** Parse a comma-separated list.
@@ -565,18 +565,18 @@
* By default, the scanning function accepts tokens, quoted strings or
* separators (except comma, of course).
*
- * @param[in] home memory home for allocating list pointers
- * @param[in,out] ss pointer to pointer to string to be parsed
+ * @param[in] home memory home for allocating list pointers
+ * @param[in,out] ss pointer to pointer to string to be parsed
* @param[in,out] append_list pointer to list
* where parsed list items are appended
- * @param[in] scanner pointer to function scanning a single item
+ * @param[in] scanner pointer to function scanning a single item
* (optional)
- *
+ *
* @retval 0 if successful.
* @retval -1 upon an error.
*/
-issize_t msg_commalist_d(su_home_t *home,
- char **ss,
+issize_t msg_commalist_d(su_home_t *home,
+ char **ss,
msg_param_t **append_list,
issize_t (*scanner)(char *s))
{
@@ -603,7 +603,7 @@
{
size_t tlen;
char *s, *p;
-
+
s = p = start;
if (s[0] == ',')
@@ -613,22 +613,22 @@
/* Grab next section - token, quoted string, or separator character */
char c = *s;
- if (IS_TOKEN(c))
+ if (IS_TOKEN(c))
tlen = span_token(s);
else if (c == '"')
tlen = span_quoted(s);
else /* if (IS_SEPARATOR(c)) */
tlen = 1;
-
+
if (tlen == 0)
return -1;
if (p != s)
memmove(p, s, tlen); /* Move section to end of paramexter */
p += tlen; s += tlen;
-
+
skip_lws(&s); /* Skip possible LWS */
-
+
if (*s == '\0' || *s == ',') { /* Test for possible end */
if (p != s) *p = '\0';
return s - start;
@@ -661,15 +661,15 @@
if (return_comment)
*return_comment = s;
-
+
while (level) switch (*s++) {
case '(': level++; break;
case ')': level--; break;
case '\0': /* ERROR */ return -1;
}
-
+
assert(s[-1] == ')');
-
+
s[-1] = '\0';
skip_lws(&s);
*ss = s;
@@ -730,12 +730,12 @@
* string via @a ss, and pointers to which parsed host and port are assigned
* via @a hhost and @a pport, respectively. The value-result parameter @a
* *pport must be initialized to default value (e.g., NULL).
- *
+ *
* @param ss pointer to pointer to string to be parsed
* @param return_host value-result parameter for @e host
* @param return_port value-result parameter for @e port
- * @return
+ * @return
* Returns zero when successful, and a negative value upon an error. The
* parsed values for host and port are assigned via @a return_host and @a
* return_port, respectively. The function also updates the pointer @a *ss,
@@ -747,15 +747,15 @@
* NUL-terminated. The calling function @b must NUL terminate the value by
* setting the @a **ss to NUL after first examining its value.
*/
-int msg_hostport_d(char **ss,
- char const **return_host,
+int msg_hostport_d(char **ss,
+ char const **return_host,
char const **return_port)
{
char *host, *s = *ss;
char *port = NULL;
/* Host name */
- host = s;
+ host = s;
if (s[0] != '[') {
skip_token(&s); if (host == s) return -1;
}
@@ -785,7 +785,7 @@
*return_host = host;
*return_port = port;
-
+
*ss = s;
return 0;
@@ -816,7 +816,7 @@
}
/**Modify a parameter value or list item in a header.
- *
+ *
* A header parameter @a param can be just a C-string (@a is_item > 0), or
* it can have internal format <i>name [ "=" value]</i>. In the latter case,
* the value part following = is ignored when replacing or removing the
@@ -834,11 +834,11 @@
* - 1 add
*
* @retval 1 if parameter was replaced or removed successfully
- * @retval 0 if parameter was added successfully,
+ * @retval 0 if parameter was added successfully,
* or there was nothing to remove
* @retval -1 upon an error
*/
-static
+static
int msg_header_param_modify(su_home_t *home, msg_common_t *h,
char const *param,
int is_item,
@@ -855,12 +855,12 @@
plen = is_item > 0 ? strlen(param) : strcspn(param, "=");
n = 0;
-
+
if (params) {
/* Existing list, try to replace or remove */
for (; params[n]; n++) {
char const *maybe = params[n];
-
+
if (remove_replace_add > 0)
continue;
@@ -877,7 +877,7 @@
}
}
}
-
+
/* Not found? */
if (!params || !params[n]) {
if (remove_replace_add < 0)
@@ -885,22 +885,22 @@
else
remove_replace_add = 1; /* Add instead of replace */
}
-
+
if (remove_replace_add < 0) { /* Remove */
- for (; params[n]; n++)
+ for (; params[n]; n++)
params[n] = params[n + 1];
}
else {
if (remove_replace_add > 0) { /* Add */
size_t m_before = MSG_PARAMS_NUM(n + 1);
size_t m_after = MSG_PARAMS_NUM(n + 2);
-
+
assert(!params || !params[n]);
-
+
if (m_before != m_after || !params) {
msg_param_t *p;
/* XXX - we should know when to do realloc */
- p = su_alloc(home, m_after * sizeof(*p));
+ p = su_alloc(home, m_after * sizeof(*p));
if (!p) return -1;
if (n > 0)
memcpy(p, params, n * sizeof(p[0]));
@@ -908,25 +908,25 @@
}
params[n + 1] = NULL;
}
-
+
params[n] = param; /* Add .. or replace */
}
-
+
msg_fragment_clear(h);
if (h->h_class->hc_update) {
/* Update shortcuts */
size_t namelen;
char const *name, *value;
-
+
name = param;
namelen = strcspn(name, "=");
-
+
if (remove_replace_add < 0)
value = NULL;
else
value = param + namelen + (name[namelen] == '=');
-
+
h->h_class->hc_update(h, name, namelen, value);
}
@@ -958,21 +958,21 @@
* @retval 0 if parameter was added
* @retval -1 upon an error
*
- * @sa msg_header_replace_param(), msg_header_remove_param(),
+ * @sa msg_header_replace_param(), msg_header_remove_param(),
* msg_header_update_params(),
- * #msg_common_t, #msg_header_t,
+ * #msg_common_t, #msg_header_t,
* #msg_hclass_t, msg_hclass_t::hc_params, msg_hclass_t::hc_update
*/
int msg_header_add_param(su_home_t *home, msg_common_t *h, char const *param)
{
- return msg_header_param_modify(home, h, param,
- 0 /* case-insensitive name=value */,
+ return msg_header_param_modify(home, h, param,
+ 0 /* case-insensitive name=value */,
1 /* add */);
}
-/** Replace or add a parameter to a header.
+/** Replace or add a parameter to a header.
*
* A header parameter @a param is a string of format <i>name "=" value</i>
* or just name. The value part following "=" is ignored when selecting a
@@ -994,17 +994,17 @@
* @retval 1 if parameter was replaced
* @retval -1 upon an error
*
- * @sa msg_header_add_param(), msg_header_remove_param(),
+ * @sa msg_header_add_param(), msg_header_remove_param(),
* msg_header_update_params(),
- * #msg_common_t, #msg_header_t,
+ * #msg_common_t, #msg_header_t,
* #msg_hclass_t, msg_hclass_t::hc_params, msg_hclass_t::hc_update
*/
-int msg_header_replace_param(su_home_t *home,
- msg_common_t *h,
+int msg_header_replace_param(su_home_t *home,
+ msg_common_t *h,
char const *param)
{
- return msg_header_param_modify(home, h, param,
- 0 /* case-insensitive name=value */,
+ return msg_header_param_modify(home, h, param,
+ 0 /* case-insensitive name=value */,
0 /* replace */);
}
@@ -1028,13 +1028,13 @@
*
* @sa msg_header_add_param(), msg_header_replace_param(),
* msg_header_update_params(),
- * #msg_common_t, #msg_header_t,
+ * #msg_common_t, #msg_header_t,
* #msg_hclass_t, msg_hclass_t::hc_params, msg_hclass_t::hc_update
*/
int msg_header_remove_param(msg_common_t *h, char const *name)
{
- return msg_header_param_modify(NULL, h, name,
- 0 /* case-insensitive name=value */,
+ return msg_header_param_modify(NULL, h, name,
+ 0 /* case-insensitive name=value */,
-1 /* remove */);
}
@@ -1053,7 +1053,7 @@
*
* @sa msg_header_add_param(), msg_header_replace_param(),
* msg_header_update_params(),
- * #msg_common_t, #msg_header_t,
+ * #msg_common_t, #msg_header_t,
* #msg_hclass_t, msg_hclass_t::hc_params, msg_hclass_t::hc_update
*/
int msg_header_update_params(msg_common_t *h, int clear)
@@ -1065,7 +1065,7 @@
msg_param_t const *params;
size_t n;
char const *p, *v;
-
+
if (h == NULL)
return errno = EFAULT, -1;
@@ -1107,13 +1107,13 @@
*
* @since New in @VERSION_1_12_4
*
- * @sa msg_header_replace_item(), msg_header_remove_item(),
+ * @sa msg_header_replace_item(), msg_header_remove_item(),
* @Allow, @AllowEvents
*/
char const *msg_header_find_item(msg_common_t const *h, char const *item)
{
if (h && h->h_class->hc_params) {
- char const * const * items =
+ char const * const * items =
*(char const * const * const *)
((char *)h + h->h_class->hc_params);
@@ -1148,22 +1148,22 @@
* @since New in @VERSION_1_12_4.
*
* @sa msg_header_remove_item(), @Allow, @AllowEvents,
- * msg_header_replace_param(), msg_header_remove_param(),
+ * msg_header_replace_param(), msg_header_remove_param(),
* #msg_common_t, #msg_header_t, #msg_list_t
* #msg_hclass_t, msg_hclass_t::hc_params
*/
-int msg_header_replace_item(su_home_t *home,
- msg_common_t *h,
+int msg_header_replace_item(su_home_t *home,
+ msg_common_t *h,
char const *item)
{
- return msg_header_param_modify(home, h, item,
- 1 /* string item */,
+ return msg_header_param_modify(home, h, item,
+ 1 /* string item */,
0 /* replace */);
}
/**Remove an item from a header.
*
- * This function treats a #msg_header_t as set of C strings. The @a item is a
+ * This function treats a #msg_header_t as set of C strings. The @a item is a
* C string. If identical string is found from the list, it is removed.
*
* The shortcuts, if any, to item values are updated accordingly.
@@ -1178,14 +1178,14 @@
* @since New in @VERSION_1_12_4.
*
* @sa msg_header_replace_item(), @Allow, @AllowEvents,
- * msg_header_replace_param(), msg_header_remove_param(),
+ * msg_header_replace_param(), msg_header_remove_param(),
* #msg_common_t, #msg_header_t, #msg_list_t
* #msg_hclass_t, msg_hclass_t::hc_params
*/
int msg_header_remove_item(msg_common_t *h, char const *name)
{
- return msg_header_param_modify(NULL, h, name,
- 1 /* item */,
+ return msg_header_param_modify(NULL, h, name,
+ 1 /* item */,
-1 /* remove */);
}
@@ -1193,11 +1193,11 @@
/** Find a parameter from a parameter list.
*
* Searches for given parameter @a token from the parameter list. If
- * parameter is found, it returns a non-NULL pointer to the parameter value.
+ * parameter is found, it returns a non-NULL pointer to the parameter value.
* If there is no value for the parameter (the parameter is of form "name"
* or "name="), the returned pointer points to a NUL character.
*
- * @param params list (or vector) of parameters
+ * @param params list (or vector) of parameters
* @param token parameter name (with or without "=" sign)
*
* @return
@@ -1230,7 +1230,7 @@
* parameter is found, it returns a non-NULL pointer to the item containing
* the parameter.
*
- * @param params list (or vector) of parameters
+ * @param params list (or vector) of parameters
* @param token parameter name (with or without "=" sign)
*
* @return
@@ -1259,7 +1259,7 @@
return NULL;
}
-/** Replace or add a parameter from a list.
+/** Replace or add a parameter from a list.
*
* A non-NULL parameter list must have been created by msg_params_d()
* or by msg_params_dup().
@@ -1275,7 +1275,7 @@
* @retval -1 upon an error
*/
int msg_params_replace(su_home_t *home,
- msg_param_t **inout_params,
+ msg_param_t **inout_params,
msg_param_t param)
{
msg_param_t *params;
@@ -1297,7 +1297,7 @@
if (!(strncasecmp(maybe, param, n))) {
if (maybe[n] == '=' || maybe[n] == 0) {
- params[i] = param;
+ params[i] = param;
return 1;
}
}
@@ -1308,7 +1308,7 @@
return msg_params_add(home, inout_params, param);
}
-/** Remove a parameter from a list.
+/** Remove a parameter from a list.
*
* @retval 1 if parameter was removed
* @retval 0 if parameter was not found
@@ -1369,7 +1369,7 @@
* @param inout_params pointer to pointer to parameter list
* @param param parameter to be added
*
- * @retval 0 if parameter was added
+ * @retval 0 if parameter was added
* @retval -1 upon an error
*/
int msg_params_add(su_home_t *home,
@@ -1377,7 +1377,7 @@
msg_param_t param)
{
size_t n, m_before, m_after;
- msg_param_t *p = *inout_params;
+ msg_param_t *p = *inout_params;
if (param == NULL)
return -1;
@@ -1388,9 +1388,9 @@
m_before = MSG_PARAMS_NUM(n + 1);
m_after = MSG_PARAMS_NUM(n + 2);
-
+
if (m_before != m_after || !p) {
- p = su_alloc(home, m_after * sizeof(*p));
+ p = su_alloc(home, m_after * sizeof(*p));
assert(p); if (!p) return -1;
if (n)
memcpy(p, *inout_params, n * sizeof(*p));
@@ -1403,7 +1403,7 @@
return 0;
}
-static
+static
int msg_param_prune(msg_param_t const d[], msg_param_t p, unsigned prune)
{
size_t i, nlen;
@@ -1414,10 +1414,10 @@
nlen = 0;
for (i = 0; d[i]; i++) {
- if ((prune == 1 &&
- strncasecmp(p, d[i], nlen) == 0
+ if ((prune == 1 &&
+ strncasecmp(p, d[i], nlen) == 0
&& (d[i][nlen] == '=' || d[i][nlen] == '\0'))
- ||
+ ||
(prune == 2 && strcasecmp(p, d[i]) == 0)
||
(prune == 3 && strcmp(p, d[i]) == 0))
@@ -1436,10 +1436,10 @@
* @param home memory home
* @param dst pointer to pointer to destination parameter list
* @param src source list
- * @param prune prune duplicates
+ * @param prune prune duplicates
* @param dup duplicate parameters in src list
*
- * @par Pruning
+ * @par Pruning
* <table>
* <tr><td>0<td>do not prune</tr>
* <tr><td>1<td>prune parameters with identical names</tr>
@@ -1458,7 +1458,7 @@
int dup)
{
size_t n, m, n_before, n_after, pruned, total = 0;
- msg_param_t *d = *dst;
+ msg_param_t *d = *dst;
if (prune > 3)
return -1;
@@ -1483,9 +1483,9 @@
}
n_after = MSG_PARAMS_NUM(n + m - pruned + 1);
-
+
if (n_before != n_after || !d) {
- d = su_alloc(home, n_after * sizeof(*d));
+ d = su_alloc(home, n_after * sizeof(*d));
assert(d); if (!d) return -1;
if (n)
memcpy(d, *dst, n * sizeof(*d));
@@ -1503,7 +1503,7 @@
d[n++] = su_strdup(home, src[m]); /* XXX */
else
d[n++] = src[m];
- }
+ }
d[n] = NULL;
@@ -1605,12 +1605,12 @@
for (m = 0; m < M; m++) {
d[N++] = memcpy(dup, temp[m], len[m] + 1);
-
+
if (update)
update(dst, dup, len[m], dup + len[m]);
dup += len[m] + 1;
- }
+ }
d[N] = NULL;
@@ -1627,7 +1627,7 @@
}
/**Compare parameter lists.
- *
+ *
* Compares parameter lists.
*
* @param a pointer to a parameter list
@@ -1658,7 +1658,7 @@
}
-/** Unquote string
+/** Unquote string
*
* Duplicates the string @a q in unquoted form.
*/
@@ -1681,7 +1681,7 @@
break;
m = strcspn(q + n + 2, "\"\\");
total += m + 1;
- n += m + 2;
+ n += m + 2;
}
if (!(d = su_alloc(home, total + 1)))
@@ -1689,16 +1689,16 @@
for (n = 0;;) {
m = strcspn(q, "\"\\");
- memcpy(d + n, q, m);
+ memcpy(d + n, q, m);
n += m, q += m;
if (q[0] == '\0' || q[0] == '"' || q[1] == '\0')
break;
- d[n++] = q[1];
+ d[n++] = q[1];
q += 2;
}
assert(total == n);
d[n] = '\0';
-
+
return d;
}
@@ -1742,7 +1742,7 @@
if (b && b + 1 < end)
*b = '"';
b++;
-
+
for (;*s;) {
size_t n = strcspn(s, "\"\\");
@@ -1783,7 +1783,7 @@
if (hash == 0)
hash = (unsigned long)-1;
-
+
return hash;
}
@@ -1798,14 +1798,14 @@
}
-/** Encode a message to the buffer.
+/** Encode a message to the buffer.
*
* The function msg_encode_e encodes a message to a given buffer.
* It returns the length of the message to be encoded, even if the
* buffer is too small (just like snprintf() is supposed to do).
*
* @param b buffer (may be NULL)
- * @param size size of buffer
+ * @param size size of buffer
* @param mo public message structure (#sip_t, #http_t)
* @param flags see #
*/
@@ -1837,7 +1837,7 @@
/** Encode header contents. */
issize_t msg_header_field_e(char b[], isize_t bsiz, msg_header_t const *h, int flags)
{
- assert(h); assert(h->sh_class);
+ assert(h); assert(h->sh_class);
return h->sh_class->hc_print(b, bsiz, h, flags);
}
@@ -1846,7 +1846,7 @@
msg_header_t **
msg_header_offset(msg_t const *msg, msg_pub_t const *mo, msg_header_t const *h)
{
- if (h == NULL || h->sh_class == NULL)
+ if (h == NULL || h->sh_class == NULL)
return NULL;
return msg_hclass_offset(msg->m_class, mo, h->sh_class);
@@ -1871,7 +1871,7 @@
if (hh)
return *hh;
- else
+ else
return NULL;
}
@@ -1880,7 +1880,7 @@
/** Generates a random token.
*
*/
-issize_t msg_random_token(char token[], isize_t tlen,
+issize_t msg_random_token(char token[], isize_t tlen,
void const *rmemp, isize_t rsize)
{
uint32_t random = 0, rword;
@@ -1889,7 +1889,7 @@
size_t i;
ssize_t n;
- static char const token_chars[33] =
+ static char const token_chars[33] =
/* Create aesthetically pleasing raNDom capS LooK */
"aBcDeFgHjKmNpQrStUvXyZ0123456789";
@@ -1908,7 +1908,7 @@
else
return rsize / 5 * 8;
}
-
+
for (i = 0, n = 0; i < tlen;) {
if (n < 5) {
if (rsize == 0)
@@ -1931,7 +1931,7 @@
if (n < 0 || (n == 0 && rsize == 0))
break;
}
-
+
token[i] = 0;
return i;
@@ -1955,7 +1955,7 @@
* @param flags message flags (see #msg_flg_user)
* @param data message text
* @param len size of message text (if -1, use strlen(data))
- *
+ *
* @retval A pointer to a freshly allocated and parsed message.
*
* Upon parsing error, the header structure may be left incomplete. The
@@ -1973,7 +1973,7 @@
if (len == -1)
len = strlen(data);
- if (len == 0)
+ if (len == 0)
return NULL;
msg = msg_create(mc, flags);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_tag.c Tue Dec 16 13:05:22 2008
@@ -58,9 +58,9 @@
assert(t);
- if (!t) {
- if (size) b[0] = 0;
- return 0;
+ if (!t) {
+ if (size) b[0] = 0;
+ return 0;
}
h = (msg_header_t const *)t->t_value;
@@ -103,7 +103,7 @@
char *b;
size_t size;
- assert(src); assert(*bb);
+ assert(src); assert(*bb);
dst->t_tag = src->t_tag;
dst->t_value = 0L;
@@ -149,8 +149,8 @@
/** Convert a string to a header structure based on to the tag. */
-int msghdrtag_scan(tag_type_t tt, su_home_t *home,
- char const *s,
+int msghdrtag_scan(tag_type_t tt, su_home_t *home,
+ char const *s,
tag_value_t *return_value)
{
msg_hclass_t *hc = (msg_hclass_t *)tt->tt_magic;
@@ -158,19 +158,19 @@
int retval;
h = msg_header_make(home, hc, s);
-
+
if (h)
*return_value = (tag_value_t)h, retval = 1;
else
*return_value = (tag_value_t)NULL, retval = -1;
-
+
return retval;
}
tagi_t *msgstrtag_filter(tagi_t *dst,
tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **bb);
int msgobjtag_snprintf(tagi_t const *t, char b[], size_t size)
@@ -179,9 +179,9 @@
assert(t);
- if (!t || !t->t_value) {
- if (size) b[0] = 0;
- return 0;
+ if (!t || !t->t_value) {
+ if (size) b[0] = 0;
+ return 0;
}
mo = (msg_pub_t *)t->t_value;
@@ -230,7 +230,7 @@
msg_header_t const *o;
char *b;
- assert(src); assert(*bb);
+ assert(src); assert(*bb);
omo = (msg_pub_t const *)src->t_value;
@@ -320,7 +320,7 @@
msg_header_t const *o;
char *b;
- assert(src); assert(*bb);
+ assert(src); assert(*bb);
omo = (msg_pub_t const *)src->t_value;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg.h Tue Dec 16 13:05:22 2008
@@ -55,7 +55,7 @@
SOFIAPUBFUN msg_t *msg_ref_create(msg_t *);
SOFIAPUBFUN void msg_ref_destroy(msg_t *);
-
+
SOFIAPUBFUN msg_pub_t *msg_public(msg_t const *msg, void *tag);
SOFIAPUBFUN msg_pub_t *msg_object(msg_t const *msg);
SOFIAPUBFUN msg_mclass_t const *msg_mclass(msg_t const *msg);
@@ -103,9 +103,9 @@
/** Cache a copy of headers when parsing. */
MSG_FLG_EXTRACT_COPY = (1<<2),
/** Print comma-separated lists instead of separate headers */
- MSG_FLG_COMMA_LISTS = (1<<3),
+ MSG_FLG_COMMA_LISTS = (1<<3),
- /**Use mailbox format when parsing - in mailbox format
+ /**Use mailbox format when parsing - in mailbox format
* message has no body unless Content-Length header is present.
*/
MSG_FLG_MAILBOX = (1<<4),
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_addr.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_addr.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_addr.h Tue Dec 16 13:05:22 2008
@@ -24,10 +24,10 @@
#ifndef MSG_ADDR_H
/** Defined when <sofia-sip/msg_addr.h> has been included. */
-#define MSG_ADDR_H
+#define MSG_ADDR_H
-/**@file sofia-sip/msg_addr.h
+/**@file sofia-sip/msg_addr.h
* @brief Addressing and I/O interface for messages.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -66,8 +66,8 @@
msg_n_fragments = 8
};
-/** I/O vector type.
- * @sa msg_recv_iovec(), msg_iovec(), #su_iovec_s, su_vsend(), su_vrecv().
+/** I/O vector type.
+ * @sa msg_recv_iovec(), msg_iovec(), #su_iovec_s, su_vsend(), su_vrecv().
*/
typedef struct su_iovec_s msg_iovec_t;
#define mv_base siv_base
@@ -88,8 +88,8 @@
SOFIAPUBFUN void msg_clear_committed(msg_t *msg);
-SOFIAPUBFUN issize_t msg_buf_external(msg_t *msg,
- usize_t N,
+SOFIAPUBFUN issize_t msg_buf_external(msg_t *msg,
+ usize_t N,
usize_t blocksize);
SOFIA_END_DECLS
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_buffer.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_buffer.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_buffer.h Tue Dec 16 13:05:22 2008
@@ -27,10 +27,10 @@
#define MSG_BUFFER_H
/**@file sofia-sip/msg_buffer.h
- * @brief Internal buffer management functions.
- *
+ * @brief Internal buffer management functions.
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Fri Nov 8 12:23:00 2002 ppessi
*
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_date.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_date.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_date.h Tue Dec 16 13:05:22 2008
@@ -24,16 +24,16 @@
#ifndef MSG_DATE_H
/** Defined when <sofia-sip/msg_date.h> has been included. */
-#define MSG_DATE_H
+#define MSG_DATE_H
/**@ingroup msg_parser
- * @file sofia-sip/msg_date.h
+ * @file sofia-sip/msg_date.h
* @brief Types and functions for handling dates and times.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Thu Jun 8 19:28:55 2000 ppessi
- *
+ *
*/
#ifndef SU_TYPES_H
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_header.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_header.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_header.h Tue Dec 16 13:05:22 2008
@@ -33,7 +33,7 @@
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Mon Aug 27 15:44:27 2001 ppessi
- *
+ *
*/
#include <stdarg.h>
@@ -203,13 +203,13 @@
#ifdef SU_HAVE_INLINE
/** Clear encoded data from header structure. */
-su_inline void msg_fragment_clear(msg_common_t *h)
+su_inline void msg_fragment_clear(msg_common_t *h)
{
h->h_data = NULL, h->h_len = 0;
}
/** Pointer to header parameters. */
-su_inline
+su_inline
msg_param_t **msg_header_params(msg_common_t const *h)
{
if (h && h->h_class->hc_params) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass.h Tue Dec 16 13:05:22 2008
@@ -41,20 +41,20 @@
SOFIA_BEGIN_DECLS
-enum {
+enum {
/** Default size of hash table */
- MC_HASH_SIZE = 127,
+ MC_HASH_SIZE = 127,
/** Size of short form table */
- MC_SHORT_SIZE = 'Z' - 'A' + 1
+ MC_SHORT_SIZE = 'Z' - 'A' + 1
};
/**Header reference.
*
- * A header reference object contains a pointer to a
- * @ref msg_hclass_s "header class"
+ * A header reference object contains a pointer to a
+ * @ref msg_hclass_s "header class"
* and a offset to the header objects within the @ref msg_pub_t "public
* message structure".
- *
+ *
* The @a hr_flags field is used to provide classification of headers. For
* instance, the msg_extract_errors() returns bitwise or of all hr_flags
* belonging to headers with parsing errors.
@@ -102,7 +102,7 @@
unsigned mc_flags; /**< Default flags */
unsigned mc_msize; /**< Size of public message structure */
/** Function extracting the message contents. */
- issize_t (*mc_extract_body)(msg_t *msg, msg_pub_t *pub,
+ issize_t (*mc_extract_body)(msg_t *msg, msg_pub_t *pub,
char b[], isize_t bsiz, int eos);
msg_href_t mc_request[1]; /**< Request line reference */
@@ -117,7 +117,7 @@
short mc_hash_size; /**< Size of parsing table */
short mc_hash_used; /**< Number of headers in parsing table */
/** Hash table for parsing containing reference for each header. */
- msg_href_t mc_hash[MC_HASH_SIZE];
+ msg_href_t mc_hash[MC_HASH_SIZE];
};
enum { msg_mclass_copy = 0, msg_mclass_empty = 1 };
@@ -128,12 +128,12 @@
SOFIAPUBFUN int msg_mclass_insert(msg_mclass_t *mc, msg_href_t const *hr);
SOFIAPUBFUN
-int msg_mclass_insert_header(msg_mclass_t *mc,
+int msg_mclass_insert_header(msg_mclass_t *mc,
msg_hclass_t *hc,
unsigned short offset);
SOFIAPUBFUN
-int msg_mclass_insert_with_mask(msg_mclass_t *mc,
+int msg_mclass_insert_with_mask(msg_mclass_t *mc,
msg_hclass_t *hc,
unsigned short offset,
unsigned short mask);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass_hash.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass_hash.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mclass_hash.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef MSG_MCLASS_HASH_H
/** Defined when <sofia-sip/msg_mclass_hash.h> has been included. */
-#define MSG_MCLASS_HASH_H
+#define MSG_MCLASS_HASH_H
/**@ingroup msg_parser
* @file sofia-sip/msg_mclass_hash.h
@@ -34,7 +34,7 @@
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Tue Aug 21 16:03:45 2001 ppessi
- *
+ *
*/
#include <sofia-sip/su_config.h>
@@ -49,7 +49,7 @@
#define MC_HASH(s, n) (msg_header_name_hash(s, NULL) % (unsigned)(n))
/** Hash header name */
-su_inline
+su_inline
unsigned short msg_header_name_hash(char const *s, isize_t *llen)
{
unsigned short hash = 0;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef MSG_MIME_H
/** Defined when <sofia-sip/msg_mime.h> has been included. */
-#define MSG_MIME_H
+#define MSG_MIME_H
/**@ingroup msg_mime
* @file sofia-sip/msg_mime.h
@@ -34,7 +34,7 @@
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Fri Aug 16 19:18:26 EEST 2002 ppessi
- *
+ *
*/
#ifndef URL_H
@@ -58,7 +58,7 @@
typedef msg_accept_any_t msg_accept_encoding_t;
typedef msg_accept_any_t msg_accept_language_t;
-typedef struct msg_content_disposition_s
+typedef struct msg_content_disposition_s
msg_content_disposition_t;
typedef msg_list_t msg_content_encoding_t;
typedef msg_generic_t msg_content_id_t;
@@ -100,7 +100,7 @@
char const *aa_q; /**< Value of q parameter */
};
-/**@ingroup msg_content_disposition
+/**@ingroup msg_content_disposition
* @brief Structure for @b Content-Disposition header.
*/
struct msg_content_disposition_s
@@ -208,12 +208,12 @@
char const *content_type,
void const *data,
isize_t dlen);
-SOFIAPUBFUN
-msg_multipart_t *msg_multipart_parse(su_home_t *home,
+SOFIAPUBFUN
+msg_multipart_t *msg_multipart_parse(su_home_t *home,
msg_content_type_t const *c,
msg_payload_t *pl);
SOFIAPUBFUN
-int msg_multipart_complete(su_home_t *home,
+int msg_multipart_complete(su_home_t *home,
msg_content_type_t *c,
msg_multipart_t *mp);
SOFIAPUBFUN msg_header_t *msg_multipart_serialize(msg_header_t **head0,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h.in Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
#ifndef MSG_MIME_PROTOS_H
/** Defined when <sofia-sip/msg_mime_protos.h> has been included. */
-#define MSG_MIME_PROTOS_H
+#define MSG_MIME_PROTOS_H
/**@ingroup msg_mime
* @file sofia-sip/msg_mime_protos.h
@@ -64,13 +64,13 @@
/* Declare internal prototypes for #xxxxxxx_xxxxxxx# */
-/**@addtogroup msg_#xxxxxx#
- * @{
+/**@addtogroup msg_#xxxxxx#
+ * @{
*/
-enum {
+enum {
/** Hash of #xxxxxxx_xxxxxxx#. @internal */
- msg_#xxxxxx#_hash = #hash#
+ msg_#xxxxxx#_hash = #hash#
};
/** Parse a #xxxxxxx_xxxxxxx#. @internal */
@@ -83,43 +83,43 @@
MSG_DLL msg_dup_f msg_#xxxxxx#_dup_one;
/**Header class for #xxxxxxx_xxxxxxx#.
- *
- * The header class msg_#xxxxxx#_class defines how a
+ *
+ * The header class msg_#xxxxxx#_class defines how a
* #xxxxxxx_xxxxxxx# header is parsed and printed. It also
* contains methods used by message parser and other functions
* to manipulate the #msg_#xxxxxx#_t header structure.
- *
+ *
*/
#ifndef msg_#xxxxxx#_class
MSG_DLL extern msg_hclass_t msg_#xxxxxx#_class[];
#endif
/**Initializer for an #msg_#xxxxxx#_t structure.
- *
+ *
* A static msg_#xxxxxx#_t structure must be initialized
* with the MSG_#XXXXXX#_INIT() macro. For instance,
- * @code
- *
+ * @code
+ *
* msg_#xxxxxx#_t msg_#xxxxxx# = MSG_#XXXXXX#_INIT;
- *
+ *
* @endcode
* @HI
*/
#define MSG_#XXXXXX#_INIT() MSG_HDR_INIT(#xxxxxx#)
/**Initialize an #msg_#xxxxxx#_t structure.
- *
+ *
* An #msg_#xxxxxx#_t structure can be initialized with the
* msg_#xxxxxx#_init() function/macro. For instance,
* @code
- *
+ *
* msg_#xxxxxx#_t msg_#xxxxxx#;
- *
+ *
* msg_#xxxxxx#_init(&msg_#xxxxxx#);
- *
+ *
* @endcode
- *
- * @param x pointer to #msg_#xxxxxx#_t structure
+ *
+ * @param x pointer to #msg_#xxxxxx#_t structure
*/
#if SU_HAVE_INLINE
su_inline msg_#xxxxxx#_t *msg_#xxxxxx#_init(msg_#xxxxxx#_t x[1])
@@ -132,13 +132,13 @@
#endif
/**Test if header object is an instance of #msg_#xxxxxx#_t.
- *
+ *
* The function msg_is_#xxxxxx#() returns true (nonzero) if
* the header class is an instance of #xxxxxxx_xxxxxxx#
* object and false (zero) otherwise.
- *
+ *
* @param header pointer to the header structure to be tested
- *
+ *
* @return The function msg_is_#xxxxxx#() returns true (nonzero) if the
* header object is an instance of header #xxxxxxx_xxxxxxx# and false (zero)
* otherwise.
@@ -155,27 +155,27 @@
#define msg_#xxxxxx#_p(h) msg_is_#xxxxxx#((h))
/**Duplicate (deep copy) #msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_dup() duplicates a header structure @a
* header. If the header structure @a header contains a reference
* (@c header->x_next) to a list of headers, all the headers in the
* list are duplicated, too.
- *
+ *
* @param home memory home used to allocate new structure
* @param header header structure to be duplicated
- *
+ *
* When duplicating, all parameter lists and non-constant strings
* attached to the header are copied, too. The function uses given
* memory @a home to allocate all the memory areas used to copy the
* header.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_dup(home, msg->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_dup() returns a pointer to the
* newly duplicated #msg_#xxxxxx#_t header structure, or NULL
@@ -184,44 +184,44 @@
#if SU_HAVE_INLINE
su_inline
#endif
-msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
msg_#xxxxxx#_t const *header);
#if SU_HAVE_INLINE
su_inline
-msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
msg_#xxxxxx#_t const *header)
{
return (msg_#xxxxxx#_t *)
- msg_header_dup_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
+ msg_header_dup_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
}
#endif
/**Copy an #msg_#xxxxxx#_t header structure.
- *
+ *
* The function msg_#xxxxxx#_copy() copies a header structure @a
* header. If the header structure @a header contains a reference
* (@c header->h_next) to a list of headers, all the headers in that
* list are copied, too. The function uses given memory @a home to
* allocate all the memory areas used to copy the header structure
* @a header.
- *
+ *
* @param home memory home used to allocate new structure
* @param header pointer to the header structure to be duplicated
- *
+ *
* When copying, only the header structure and parameter lists
* attached to it are duplicated. The new header structure retains
* all the references to the strings within the old @a header,
* including the encoding of the old header, if present.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_copy(home, msg->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_copy() returns a pointer to
* newly copied header structure, or NULL upon an error.
@@ -229,32 +229,32 @@
#if SU_HAVE_INLINE
su_inline
#endif
-msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
msg_#xxxxxx#_t const *header);
#if SU_HAVE_INLINE
su_inline
-msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
msg_#xxxxxx#_t const *header)
{
return (msg_#xxxxxx#_t *)
- msg_header_copy_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
+ msg_header_copy_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
}
#endif
/**Make a header structure #msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_make() makes a new #msg_#xxxxxx#_t header
* structure. It allocates a new header structure, and decodes the string @a
* s as the value of the structure.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param s string to be decoded as value of the new header structure
- *
+ *
* @note This function may be implemented as a macro calling
* msg_header_make().
- *
+ *
* @return
* The function msg_#xxxxxx#_make() returns a pointer to newly maked
* #msg_#xxxxxx#_t header structure, or NULL upon an error.
@@ -270,24 +270,24 @@
/**Make a #xxxxxxx_xxxxxxx# from formatting result.
- *
+ *
* The function msg_#xxxxxx#_format() makes a new #xxxxxxx_xxxxxxx# object
* using snprintf-formatted result as its value. The function first
* prints the arguments according to the format @a fmt specified. Then it
* allocates a new header structure, and uses the formatting result as the
* header value.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param fmt string used as a printf()-style format
* @param ... argument list for format
- *
+ *
* @note This function may be implemented as a macro calling
* msg_header_format().
- *
+ *
* @return
* The function msg_#xxxxxx#_format() returns a pointer to newly
* makes header structure, or NULL upon an error.
- *
+ *
* @HIDE
*/
#if SU_HAVE_INLINE
@@ -301,11 +301,11 @@
{
msg_header_t *h;
va_list ap;
-
+
va_start(ap, fmt);
h = msg_header_vformat(home, msg_#xxxxxx#_class, fmt, ap);
va_end(ap);
-
+
return (msg_#xxxxxx#_t*)h;
}
#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_parser.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_parser.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_parser.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef MSG_PARSER_H
/** Defined when <sofia-sip/msg_parser.h> has been included. */
-#define MSG_PARSER_H
+#define MSG_PARSER_H
/**@ingroup msg_parser
* @file sofia-sip/msg_parser.h
@@ -101,8 +101,8 @@
char b[], isize_t bsiz, int eos);
SOFIAPUBFUN issize_t msg_extract_separator(msg_t *msg, msg_pub_t *mo,
char b[], isize_t bsiz, int eos);
-SOFIAPUBFUN issize_t msg_extract_payload(msg_t *msg, msg_pub_t *mo,
- msg_header_t **return_payload,
+SOFIAPUBFUN issize_t msg_extract_payload(msg_t *msg, msg_pub_t *mo,
+ msg_header_t **return_payload,
usize_t body_len,
char b[], isize_t bsiz, int eos);
@@ -113,9 +113,9 @@
SOFIAPUBFUN int msg_firstline_d(char *s, char **ss2, char **ss3);
SOFIAPUBFUN isize_t msg_default_dup_xtra(msg_header_t const *header, isize_t offset);
-SOFIAPUBFUN char *msg_default_dup_one(msg_header_t *dst,
+SOFIAPUBFUN char *msg_default_dup_one(msg_header_t *dst,
msg_header_t const *src,
- char *b,
+ char *b,
isize_t xtra);
SOFIAPUBFUN issize_t msg_numeric_d(su_home_t *, msg_header_t *h, char *s, isize_t slen);
@@ -133,7 +133,7 @@
SOFIAPUBFUN isize_t msg_generic_dup_xtra(msg_header_t const *h, isize_t offset);
SOFIAPUBFUN char *msg_generic_dup_one(msg_header_t *dst,
msg_header_t const *src,
- char *b,
+ char *b,
isize_t xtra);
SOFIAPUBFUN isize_t msg_unknown_dup_xtra(msg_header_t const *h, isize_t offset);
@@ -159,7 +159,7 @@
SOFIAPUBFUN issize_t msg_auth_d(su_home_t *, msg_header_t *h, char *s, isize_t slen);
SOFIAPUBFUN issize_t msg_auth_e(char b[], isize_t bsiz, msg_header_t const *h, int f);
SOFIAPUBFUN isize_t msg_auth_dup_xtra(msg_header_t const *h, isize_t offset);
-SOFIAPUBFUN char *msg_auth_dup_one(msg_header_t *dst, msg_header_t const *src,
+SOFIAPUBFUN char *msg_auth_dup_one(msg_header_t *dst, msg_header_t const *src,
char *b, isize_t xtra);
/* ---------------------------------------------------------------------------
@@ -189,7 +189,7 @@
#define MSG_TERM_E(p, e) ((p) < (e) ? (p)[0] = '\0' : '\0')
/** Encode a character. @HI */
-#define MSG_CHAR_E(p, e, c) (++(p) < (e) ? ((p)[-1]=(c)) : (c))
+#define MSG_CHAR_E(p, e, c) (++(p) < (e) ? ((p)[-1]=(c)) : (c))
/** Calculate separator and string length. @HI */
#define MSG_STRING_LEN(s, sep_size) ((s) ? (strlen(s) + sep_size) : 0)
@@ -214,7 +214,7 @@
SOFIAPUBFUN issize_t msg_token_scan(char *start);
SOFIAPUBFUN issize_t msg_attribute_value_scanner(char *s);
-SOFIAPUBFUN issize_t msg_any_list_d(su_home_t *, char **ss,
+SOFIAPUBFUN issize_t msg_any_list_d(su_home_t *, char **ss,
msg_param_t **append_list,
issize_t (*scanner)(char *s),
int sep);
@@ -269,7 +269,7 @@
#define MSG_PARAMS_SIZE(rv, params) (rv = msg_params_dup_xtra(params, rv))
/** Duplicate a parameter list */
-SOFIAPUBFUN char *msg_params_dup(msg_param_t const **d, msg_param_t const *s,
+SOFIAPUBFUN char *msg_params_dup(msg_param_t const **d, msg_param_t const *s,
char *b, isize_t xtra);
/** Count number of parameters in the list */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_protos.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_protos.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_protos.h.in Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
#ifndef MSG_PROTOS_H
/** Defined when <sofia-sip/msg_protos.h> has been included. */
-#define MSG_PROTOS_H
+#define MSG_PROTOS_H
/**@ingroup msg_headers
* @file sofia-sip/msg_protos.h
@@ -58,13 +58,13 @@
/* Declare internal prototypes for #xxxxxxx_xxxxxxx# */
-/**@addtogroup msg_#xxxxxx#
- * @{
+/**@addtogroup msg_#xxxxxx#
+ * @{
*/
-enum {
+enum {
/** Hash of #xxxxxxx_xxxxxxx#. @internal */
- msg_#xxxxxx#_hash = #hash#
+ msg_#xxxxxx#_hash = #hash#
};
/** Parse a #xxxxxxx_xxxxxxx#. @internal */
@@ -74,41 +74,41 @@
MSG_DLL msg_print_f msg_#xxxxxx#_e;
/**Header class for #xxxxxxx_xxxxxxx#.
- *
- * The header class msg_#xxxxxx#_class defines how a
+ *
+ * The header class msg_#xxxxxx#_class defines how a
* #xxxxxxx_xxxxxxx# header is parsed and printed. It also
* contains methods used by message parser and other functions
* to manipulate the msg_#xxxxxx#_t header structure.
- *
+ *
*/
MSG_DLL extern msg_hclass_t msg_#xxxxxx#_class[];
/**Initializer for structure msg_#xxxxxx#_t.
- *
+ *
* A static msg_#xxxxxx#_t structure must be initialized
* with the MSG_#XXXXXX#_INIT() macro. For instance,
- * @code
- *
+ * @code
+ *
* msg_#xxxxxx#_t msg_#xxxxxx# = MSG_#XXXXXX#_INIT;
- *
+ *
* @endcode
* @HI
*/
#define MSG_#XXXXXX#_INIT() MSG_HDR_INIT(#xxxxxx#)
/**Initialize a structure msg_#xxxxxx#_t.
- *
+ *
* An msg_#xxxxxx#_t structure can be initialized with the
* msg_#xxxxxx#_init() function/macro. For instance,
* @code
- *
+ *
* msg_#xxxxxx#_t msg_#xxxxxx#;
- *
+ *
* msg_#xxxxxx#_init(&msg_#xxxxxx#);
- *
+ *
* @endcode
- *
- * @param x pointer to msg_#xxxxxx#_t structure
+ *
+ * @param x pointer to msg_#xxxxxx#_t structure
*/
#if SU_HAVE_INLINE
su_inline msg_#xxxxxx#_t *msg_#xxxxxx#_init(msg_#xxxxxx#_t x[1])
@@ -121,13 +121,13 @@
#endif
/**Test if header object is instance of msg_#xxxxxx#_t.
- *
+ *
* The function msg_is_#xxxxxx#() returns true (nonzero) if
* the header class is an instance of #xxxxxxx_xxxxxxx#
* object and false (zero) otherwise.
- *
+ *
* @param header pointer to the header structure to be tested
- *
+ *
* @return
* The function msg_is_#xxxxxx#() returns true (nonzero) if
* the header object is an instance of header #xxxxxx# and
@@ -144,27 +144,27 @@
#endif
/**Duplicate (deep copy) @c msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_dup() duplicates a header structure @a
* header. If the header structure @a header contains a reference
* (@c header->x_next) to a list of headers, all the headers in the
* list are duplicated, too.
- *
+ *
* @param home memory home used to allocate new structure
* @param header header structure to be duplicated
- *
+ *
* When duplicating, all parameter lists and non-constant strings
* attached to the header are copied, too. The function uses given
* memory @a home to allocate all the memory areas used to copy the
* header.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_dup(home, msg->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_dup() returns a pointer to the
* newly duplicated msg_#xxxxxx#_t header structure, or NULL
@@ -173,45 +173,45 @@
#if SU_HAVE_INLINE
su_inline
#endif
-msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
msg_#xxxxxx#_t const *header)
__attribute__((__malloc__));
#if SU_HAVE_INLINE
su_inline
-msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home,
msg_#xxxxxx#_t const *header)
{
return (msg_#xxxxxx#_t *)
- msg_header_dup_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
+ msg_header_dup_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
}
#endif
/**Copy a msg_#xxxxxx#_t header structure.
- *
+ *
* The function msg_#xxxxxx#_copy() copies a header structure @a
* header. If the header structure @a header contains a reference
* (@c header->h_next) to a list of headers, all the headers in that
* list are copied, too. The function uses given memory @a home to
* allocate all the memory areas used to copy the header structure
* @a header.
- *
+ *
* @param home memory home used to allocate new structure
* @param header pointer to the header structure to be duplicated
- *
+ *
* When copying, only the header structure and parameter lists
* attached to it are duplicated. The new header structure retains
* all the references to the strings within the old @a header,
* including the encoding of the old header, if present.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_copy(home, msg->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_copy() returns a pointer to
* newly copied header structure, or NULL upon an error.
@@ -219,33 +219,33 @@
#if SU_HAVE_INLINE
su_inline
#endif
-msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
msg_#xxxxxx#_t const *header)
__attribute__((__malloc__));
#if SU_HAVE_INLINE
su_inline
-msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
msg_#xxxxxx#_t const *header)
{
return (msg_#xxxxxx#_t *)
- msg_header_copy_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
+ msg_header_copy_as(home, msg_#xxxxxx#_class, (msg_header_t const *)header);
}
#endif
/**Make a header structure msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_make() makes a new
* msg_#xxxxxx#_t header structure. It allocates a new
* header structure, and decodes the string @a s as the
* value of the structure.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param s string to be decoded as value of the new header structure
- *
+ *
* @note This function is usually implemented as a macro calling
* msg_header_make().
- *
+ *
* @return
* The function msg_#xxxxxx#_make() returns a pointer to
* newly maked msg_#xxxxxx#_t header structure, or NULL upon
@@ -262,25 +262,25 @@
#endif
/**Make a #xxxxxxx_xxxxxxx# from formatting result.
- *
+ *
* The function msg_#xxxxxx#_format() makes a new
* #xxxxxxx_xxxxxxx# object using formatting result as its
* value. The function first prints the arguments according to
* the format @a fmt specified. Then it allocates a new header
* structure, and uses the formatting result as the header
* value.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param fmt string used as a printf()-style format
* @param ... argument list for format
- *
+ *
* @note This function is usually implemented as a macro calling
* msg_header_format().
- *
+ *
* @return
* The function msg_#xxxxxx#_format() returns a pointer to newly
* makes header structure, or NULL upon an error.
- *
+ *
* @HIDE
*/
#if SU_HAVE_INLINE
@@ -294,11 +294,11 @@
{
msg_header_t *h;
va_list ap;
-
+
va_start(ap, fmt);
h = msg_header_vformat(home, msg_#xxxxxx#_class, fmt, ap);
va_end(ap);
-
+
return (msg_#xxxxxx#_t*)h;
}
#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_tag_class.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_tag_class.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_tag_class.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef MSG_TAG_CLASS_H
/** Defined when <sofia-sip/msg_tag_class.h> has been included */
-#define MSG_TAG_CLASS_H
+#define MSG_TAG_CLASS_H
/**@file sofia-sip/msg_tag_class.h
* @brief Functions for constructing per-protocol tag classes.
@@ -44,15 +44,15 @@
SOFIAPUBFUN size_t msghdrtag_xtra(tagi_t const *t, size_t offset);
SOFIAPUBFUN tagi_t *msghdrtag_dup(tagi_t *dst, tagi_t const *src,
void **inout_buffer);
-SOFIAPUBFUN int msghdrtag_scan(tag_type_t tt, su_home_t *home,
- char const *s,
+SOFIAPUBFUN int msghdrtag_scan(tag_type_t tt, su_home_t *home,
+ char const *s,
tag_value_t *return_value);
-SOFIAPUBFUN tagi_t *msghdrtag_filter(tagi_t *dst, tagi_t const f[],
- tagi_t const *src,
+SOFIAPUBFUN tagi_t *msghdrtag_filter(tagi_t *dst, tagi_t const f[],
+ tagi_t const *src,
void **inout_buffer);
SOFIAPUBFUN tagi_t *msgstrtag_filter(tagi_t *dst, tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **inout_buffer);
SOFIAPUBFUN int msgobjtag_snprintf(tagi_t const *t, char b[], size_t size);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_types.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_types.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_types.h Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
/**@file sofia-sip/msg_types.h
* @brief Types for messages and common headers
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Jan 23 15:43:17 2003 ppessi
*
*/
@@ -65,15 +65,15 @@
#endif
#ifndef MSG_PUB_T
-#ifdef MSG_OBJ_T
+#ifdef MSG_OBJ_T
#define MSG_PUB_T MSG_OBJ_T
#else
#define MSG_PUB_T struct msg_pub_s
#endif
#endif
-/**Public protocol-specific message structure for accessing the message.
- *
+/**Public protocol-specific message structure for accessing the message.
+ *
* This type can be either #sip_t, #http_t, or #msg_multipart_t, depending
* on the message. The base structure used by msg module is defined in
* struct #msg_pub_s.
@@ -104,7 +104,7 @@
#define MSG_HEADER_N 16377
-/** Common part of the header objects (or message fragments).
+/** Common part of the header objects (or message fragments).
*
* This structure is also known as #msg_common_t or #sip_common_t.
*/
@@ -132,7 +132,7 @@
#define msg_ident msg_common->h_class
-/** Numeric header.
+/** Numeric header.
*
* A numeric header has value range of a 32-bit, 0..4294967295. The @a
* x_value field is unsigned long, however.
@@ -143,7 +143,7 @@
unsigned long x_value; /**< Numeric header value */
};
-/** Generic header.
+/** Generic header.
*
* A generic header does not have any internal structure. Its value is
* represented as a string.
@@ -154,8 +154,8 @@
char const *g_string; /**< Header value */
};
-/** List header.
- *
+/** List header.
+ *
* A list header consists of comma-separated list of tokens.
*/
struct msg_list_s {
@@ -164,7 +164,7 @@
msg_param_t *k_items; /**< List of items */
};
-/** Authentication header.
+/** Authentication header.
*
* An authentication header has authentication scheme name and
* comma-separated list of parameters as its value.
@@ -244,13 +244,13 @@
/* ====================================================================== */
-/**Define how to handle existing headers
- * when a new header is added to a message.
+/**Define how to handle existing headers
+ * when a new header is added to a message.
*/
typedef enum {
msg_kind_single, /**< Only one header is allowed */
msg_kind_append, /**< New header is appended */
- msg_kind_list, /**< A token list header,
+ msg_kind_list, /**< A token list header,
* new header is combined with old one. */
msg_kind_apndlist, /**< A complex list header. */
msg_kind_prepend /**< New header is prepended */
@@ -259,17 +259,17 @@
struct su_home_s;
typedef issize_t msg_parse_f(struct su_home_s *, msg_header_t *, char *, isize_t);
-typedef issize_t msg_print_f(char buf[], isize_t bufsiz,
+typedef issize_t msg_print_f(char buf[], isize_t bufsiz,
msg_header_t const *, int flags);
-typedef char *msg_dup_f(msg_header_t *dst, msg_header_t const *src,
+typedef char *msg_dup_f(msg_header_t *dst, msg_header_t const *src,
char *buf, isize_t bufsiz);
typedef isize_t msg_xtra_f(msg_header_t const *h, isize_t offset);
typedef int msg_update_f(msg_common_t *, char const *name, isize_t namelen,
char const *value);
-/** Factory object for a header.
- *
+/** Factory object for a header.
+ *
* The #msg_hclass_t object, "header class", defines how a header is
* handled. It has parsing and printing functions, functions used to copy
* header objects, header name and other information used when parsing,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@ingroup test_msg
* @file test_class.c
- *
+ *
* Message class for testing parser and transports.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -65,7 +65,7 @@
static msg_dup_f msg_request_dup_one;
msg_hclass_t msg_request_class[] =
-MSG_HEADER_CLASS(msg_, request, NULL, "", rq_common,
+MSG_HEADER_CLASS(msg_, request, NULL, "", rq_common,
single_critical, msg_request, msg_generic);
/** Decode a request line */
@@ -133,7 +133,7 @@
static msg_dup_f msg_status_dup_one;
msg_hclass_t msg_status_class[1] =
-MSG_HEADER_CLASS(msg_, status, NULL, "", st_common,
+MSG_HEADER_CLASS(msg_, status, NULL, "", st_common,
single_critical, msg_status, msg_generic);
/** Parse status line */
@@ -162,7 +162,7 @@
if (status > 999 || status < 100)
status = 0;
- return snprintf(b, bsiz, "%s %03u %s" CRLF,
+ return snprintf(b, bsiz, "%s %03u %s" CRLF,
st->st_version, status, st->st_phrase);
}
@@ -201,19 +201,19 @@
MSG_HEADER_CLASS(msg_, auth, "Auth", "", au_params,
append, msg_auth, msg_generic);
-/** Extract the message body, including separator line.
+/** Extract the message body, including separator line.
*
- * @param[in,out] msg message object
- * @param[in,out] pub public message structure
- * @param[in] b buffer containing unparsed data
- * @param[in] bsiz buffer size
+ * @param[in,out] msg message object
+ * @param[in,out] pub public message structure
+ * @param[in] b buffer containing unparsed data
+ * @param[in] bsiz buffer size
* @param[in] eos true if buffer contains whole message
*
* @retval -1 error
* @retval 0 message is incomplete
* @retval other number of bytes extracted
*/
-issize_t msg_test_extract_body(msg_t *msg, msg_pub_t *pub,
+issize_t msg_test_extract_body(msg_t *msg, msg_pub_t *pub,
char b[], isize_t bsiz, int eos)
{
msg_test_t *tst = (msg_test_t *)pub;
@@ -249,14 +249,14 @@
if ((m = msg_extract_payload(msg, (msg_pub_t *)tst, NULL, body_len, b, bsiz, eos) ) == -1)
return -1;
-
+
tst->msg_flags |= MSG_FLG_FRAGS;
if (bsiz >= body_len)
tst->msg_flags |= MSG_FLG_COMPLETE;
return m;
}
-msg_href_t const msg_content_length_href[1] =
+msg_href_t const msg_content_length_href[1] =
{{
msg_content_length_class,
offsetof(msg_test_t, msg_content_length)
@@ -269,11 +269,11 @@
tagi_t *tsttag_filter(tagi_t *dst,
tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **bb);
/** Tag class for test header tags. @HIDE */
-tag_class_t tsthdrtag_class[1] =
+tag_class_t tsthdrtag_class[1] =
{{
sizeof(tsthdrtag_class),
/* tc_next */ NULL,
@@ -290,7 +290,7 @@
}};
/** Tag class for TST header string tags. @HIDE */
-tag_class_t tststrtag_class[1] =
+tag_class_t tststrtag_class[1] =
{{
sizeof(tststrtag_class),
/* tc_next */ NULL,
@@ -307,7 +307,7 @@
}};
/** Tag class for TST message tags. @HIDE */
-tag_class_t tstmsgtag_class[1] =
+tag_class_t tstmsgtag_class[1] =
{{
sizeof(tstmsgtag_class),
/* tc_next */ NULL,
@@ -322,7 +322,7 @@
/* tc_ref_set */ t_ptr_ref_set,
}};
-tag_typedef_t tsttag_header =
+tag_typedef_t tsttag_header =
{{ TAG_NAMESPACE, "header", tsthdrtag_class, 0 }};
tag_typedef_t tsttag_header_str = STRTAG_TYPEDEF(header_str);
@@ -330,7 +330,7 @@
/** Filter a TST header structure. */
tagi_t *tsttag_filter(tagi_t *dst,
tagi_t const f[],
- tagi_t const *src,
+ tagi_t const *src,
void **bb)
{
tagi_t stub[2] = {{ NULL }};
@@ -348,7 +348,7 @@
msg_hclass_offset(mc, (msg_pub_t *)tst, hc);
msg_header_t const *h;
- if (tst == NULL ||
+ if (tst == NULL ||
(char *)hh >= ((char *)tst + tst->msg_size) ||
(char *)hh < (char const *)&tst->msg_request)
return dst;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_class.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef TEST_CLASS_H
/** Defined when <test_class.h> has been included. */
-#define TEST_CLASS_H
+#define TEST_CLASS_H
/**@ingroup test_msg
* @file test_class.h
@@ -65,16 +65,16 @@
typedef struct msg_status_s msg_status_t;
/** Request line. */
-struct msg_request_s {
+struct msg_request_s {
msg_common_t rq_common[1]; /**< Common fragment info */
msg_header_t *rq_next; /**< Link to next header */
char const *rq_method_name; /**< Method name */
url_t rq_url[1]; /**< RequestURI */
char const *rq_version; /**< Protocol version */
-};
+};
/** Status line. */
-struct msg_status_s {
+struct msg_status_s {
msg_common_t st_common[1]; /**< Common fragment info */
msg_header_t *st_next; /**< Link to next (dummy) */
char const *st_version; /**< Protocol version */
@@ -107,7 +107,7 @@
msg_accept_language_t *msg_accept_language; /**< Accept-Language */
msg_mime_version_t *msg_mime_version; /**< MIME-Version */
msg_content_md5_t *msg_content_md5; /**< Content-MD5 */
- msg_content_encoding_t *msg_content_encoding;
+ msg_content_encoding_t *msg_content_encoding;
/**< Content-Encoding */
msg_content_length_t *msg_content_length; /**< Content-Length */
@@ -140,7 +140,7 @@
msg_content_id_t sh_content_id[1];
msg_content_md5_t sh_content_md5[1];
msg_content_language_t sh_content_language[1];
- msg_content_length_t sh_content_length[1];
+ msg_content_length_t sh_content_length[1];
msg_content_location_t sh_content_location[1];
msg_content_type_t sh_content_type[1];
msg_mime_version_t sh_mime_version[1];
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_msg.c Tue Dec 16 13:05:22 2008
@@ -138,7 +138,7 @@
static int addr_test(void)
{
BEGIN();
-
+
/* It *will* fail. */
/* TEST(sizeof(socklen_t), sizeof(msg_addrlen(NULL))); */
@@ -268,7 +268,7 @@
msg_param_t const *p = NULL;
char *master = ";0", *list, *end;
-
+
for (i = 1; i < 256; i++) {
master = su_sprintf(home, "%s; %u", master, i); TEST_1(master);
list = end = su_strdup(home, master);
@@ -294,7 +294,7 @@
msg_list_t k1[1] = {{{{ 0 }}}};
char list1[] = "foo, bar, baz zi \"baz\"";
-
+
TEST_1(msg_list_d(home, (msg_header_t *)k1, list1, strlen(list1)) >= 0);
TEST_1(k1->k_items);
TEST_S(k1->k_items[0], "foo");
@@ -310,7 +310,7 @@
su_home_t home[1] = { SU_HOME_INIT(home) };
msg_list_t k2[1] = {{{{ 0 }}}};
char list2[] = "one, two, three, four, five, six, seven, eight";
-
+
TEST_1(
msg_list_d(home, (msg_header_t *)k2, list2, strlen(list2)) >= 0);
TEST_1(k2->k_items);
@@ -319,33 +319,33 @@
su_home_deinit(home);
}
-
+
{
/* Test that list longer than MSG_PARAMS_N is handled correctly */
su_home_t home[1] = { SU_HOME_INIT(home) };
msg_list_t k3[1] = {{{{ 0 }}}};
char list3[] = "one, two, three, four, five, six, seven, eight, nine";
-
+
TEST_1(
msg_list_d(home, (msg_header_t *)k3, list3, strlen(list3)) >= 0);
TEST_1(k3->k_items);
TEST_1(k3->k_items[7]);
TEST_1(k3->k_items[8]);
TEST_1(k3->k_items[9] == NULL);
-
+
su_home_deinit(home);
}
{
/* Test that long lists are handled correctly */
su_home_t home[1] = { SU_HOME_INIT(home) };
-
+
msg_param_t *k = NULL;
char *s;
char list1[] = "one, two, three, four, five, six, seven, eight";
char list2[] = "one, two, three, four, five, six, seven, eight";
char list3[] = "one, two, three, four, five, six, seven, eight";
- char list4[] = "one, two, three, four, five, six, seven, eight, nine";
+ char list4[] = "one, two, three, four, five, six, seven, eight, nine";
s = list1; TEST_1(msg_commalist_d(home, &s, &k, msg_token_scan) >= 0);
TEST_1(k);
@@ -366,7 +366,7 @@
msg_param_t *p = NULL;
char *master = "0", *list, *end;
-
+
for (i = 1; i < 256; i++) {
master = su_sprintf(home, "%s, %u", master, i); TEST_1(master);
list = end = su_strdup(home, master);
@@ -389,7 +389,7 @@
{
/* Test that errors in lists are handled correctly */
su_home_t home[1] = { SU_HOME_INIT(home) };
-
+
msg_param_t *k = NULL;
char *s;
char list1[] = "one, two, three, four, five, six, seven, foo=\"eight";
@@ -409,7 +409,7 @@
msg_list_t k4[1] = {{{{ 0 }}}};
char list4[] = ", ,\t,\r\n\t, , ";
-
+
TEST_1(
msg_list_d(home, (msg_header_t *)k4, list4, strlen(list4)) >= 0);
TEST_1(k4->k_items == NULL);
@@ -423,7 +423,7 @@
msg_auth_t au[1] = {{{{ 0 }}}};
char s[] = "Basic foo = \"bar==\" ,, bar=baari,"
"baz=\"bof,\\\\ \\\" baff\", base\t64/ - is== ,,";
-
+
TEST_1(msg_auth_d(home, (msg_header_t *)au, s, strlen(s)) >= 0);
TEST_S(au->au_scheme, "Basic");
TEST_1(au->au_params);
@@ -441,7 +441,7 @@
su_home_t home[1] = { SU_HOME_INIT(home) };
msg_content_type_t *c;
-
+
c = msg_content_type_format(home, "%s/%s;%s;%s;%s;%s;%s;%s",
"text", "plain",
"charset=iso-8859-15",
@@ -487,7 +487,7 @@
int i, j, hash = 0;
msg_mclass_t const *mc = msg_test_mclass;
msg_hclass_t *hc;
-
+
BEGIN();
for (i = 0; i < mc->mc_hash_size; i++) {
@@ -517,12 +517,12 @@
return msg_make(msg_test_mclass, MSG_DO_EXTRACT_COPY, buffer, -1);
}
-/**Check if header chain contains any loops.
+/**Check if header chain contains any loops.
*
* @return
* Return 0 if no loop, -1 otherwise.
*/
-static
+static
int msg_chain_loop(msg_header_t const *h)
{
msg_header_t const *h2;
@@ -542,7 +542,7 @@
return 0;
}
-/** Check header chain consistency.
+/** Check header chain consistency.
*
* @return
* Return 0 if consistent, number of errors otherwise.
@@ -552,7 +552,7 @@
{
if (msg_chain_loop(h))
return -1;
-
+
for (; h; h = h->sh_succ) {
if (h->sh_succ && h->sh_succ->sh_prev != &h->sh_succ)
return -1;
@@ -606,14 +606,14 @@
TEST_1(separator = msg_separator_make(home, "\r\n"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (msg_header_t *)separator), 0);
- TEST_P(tst->msg_separator, separator);
+ TEST_P(tst->msg_separator, separator);
TEST_P(separator->sep_common->h_succ, tst->msg_payload);
/* Try to add a new payload */
TEST_1(payload = msg_payload_make(home, "foofaa\r\n"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (msg_header_t *)payload), 0);
/* It is appended */
- TEST_P(tst->msg_payload->pl_next, payload);
+ TEST_P(tst->msg_payload->pl_next, payload);
TEST_P(tst->msg_payload->pl_common->h_succ, payload);
{
@@ -622,10 +622,10 @@
msg_param_t foo = "foo=bar";
vs = NULL;
- MSG_PARAM_MATCH(vs, foo, "foo");
+ MSG_PARAM_MATCH(vs, foo, "foo");
TEST_S(vs, "bar");
vs = NULL;
- MSG_PARAM_MATCH(vs, foo, "fo");
+ MSG_PARAM_MATCH(vs, foo, "fo");
TEST_P(vs, NULL);
vi = 0;
MSG_PARAM_MATCH_P(vi, foo, "foo");
@@ -670,14 +670,14 @@
TEST_1(se = fi->aa_next);
TEST_S(en->aa_value, "en");
- TEST_M(en->aa_common->h_data,
+ TEST_M(en->aa_common->h_data,
"Accept-Language: en;q=0.8, fi, se ; q = 0.6" CRLF,
en->aa_common->h_len);
- TEST_P((char *)en->aa_common->h_data + en->aa_common->h_len,
+ TEST_P((char *)en->aa_common->h_data + en->aa_common->h_len,
fi->aa_common->h_data);
TEST(fi->aa_common->h_len, 0);
- TEST_P((char *)en->aa_common->h_data + en->aa_common->h_len,
+ TEST_P((char *)en->aa_common->h_data + en->aa_common->h_len,
se->aa_common->h_data);
TEST(se->aa_common->h_len, 0);
@@ -689,9 +689,9 @@
TEST_P(fi->aa_next, de);
TEST_P(de->aa_next, NULL);
- TEST_P(en->aa_common->h_succ, fi);
+ TEST_P(en->aa_common->h_succ, fi);
TEST_P(en->aa_common->h_prev, &deflate->aa_common->h_succ);
- TEST_P(fi->aa_common->h_succ, de);
+ TEST_P(fi->aa_common->h_succ, de);
TEST_P(fi->aa_common->h_prev, &en->aa_common->h_succ);
TEST_P(de->aa_common->h_succ, NULL);
TEST_P(de->aa_common->h_prev, &fi->aa_common->h_succ);
@@ -700,21 +700,21 @@
TEST_P(se->aa_common->h_succ, NULL);
TEST_P(se->aa_common->h_prev, NULL);
- TEST_1(sv = msg_accept_language_make(msg_home(msg),
+ TEST_1(sv = msg_accept_language_make(msg_home(msg),
"sv;q=0.6,sv_FI;q=0.7"));
TEST_1(sv_fi = sv->aa_next);
TEST(msg_header_replace(msg, (msg_pub_t *)tst, (void *)fi, (void *)sv), 0);
TEST_P(en->aa_next, sv);
- TEST_P(sv->aa_next->aa_next, de);
+ TEST_P(sv->aa_next->aa_next, de);
TEST_P(de->aa_next, NULL);
- TEST_P(en->aa_common->h_succ, sv);
+ TEST_P(en->aa_common->h_succ, sv);
TEST_P(en->aa_common->h_prev, &deflate->aa_common->h_succ);
- TEST_P(sv->aa_common->h_succ, sv_fi);
+ TEST_P(sv->aa_common->h_succ, sv_fi);
TEST_P(sv->aa_common->h_prev, &en->aa_common->h_succ);
- TEST_P(sv_fi->aa_common->h_succ, de);
+ TEST_P(sv_fi->aa_common->h_succ, de);
TEST_P(sv_fi->aa_common->h_prev, &sv->aa_common->h_succ);
TEST_P(de->aa_common->h_succ, NULL);
TEST_P(de->aa_common->h_prev, &sv_fi->aa_common->h_succ);
@@ -727,7 +727,7 @@
"Foo: bar" CRLF
"Content-Length: 6" CRLF
CRLF
- "test" CRLF
+ "test" CRLF
"extra stuff" CRLF);
TEST_1(orig);
otst = msg_test_public(orig);
@@ -743,7 +743,7 @@
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (void *)request), 0);
- TEST_1(location =
+ TEST_1(location =
msg_content_location_make(home, "http://localhost:8080/wife"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (void *)location), 0);
@@ -751,14 +751,14 @@
TEST(msg_serialize(msg, (msg_pub_t *)tst), 0);
TEST_1(msg_prepare(msg) > 0);
- TEST_1(language =
+ TEST_1(language =
msg_content_language_make(home, "se-FI, fi-FI, sv-FI"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (void *)language), 0);
TEST_1(se = msg_accept_language_make(home, "se, fi, sv"));
TEST_1(se->aa_next); TEST_1(se->aa_next->aa_next);
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (void *)se), 0);
-
+
TEST(msg_serialize(msg, (msg_pub_t *)tst), 0);
TEST_1(msg_prepare(msg) > 0);
@@ -789,9 +789,9 @@
char const encoded[] = "Accept-Language: se, fi, sv\r\n";
TEST_SIZE(se->aa_common->h_len, strlen(encoded));
TEST_M(se->aa_common->h_data, encoded, se->aa_common->h_len);
- TEST_P((char *)se->aa_common->h_data + se->aa_common->h_len,
+ TEST_P((char *)se->aa_common->h_data + se->aa_common->h_len,
se->aa_next->aa_common->h_data);
- TEST_P((char *)se->aa_common->h_data + se->aa_common->h_len,
+ TEST_P((char *)se->aa_common->h_data + se->aa_common->h_len,
se->aa_next->aa_next->aa_common->h_data);
}
@@ -804,7 +804,7 @@
/* Bug #1726034 */
for (i = 0; i < 15; i++)
- strcpy(body + i * 66,
+ strcpy(body + i * 66,
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\n");
pl = msg_payload_make(msg_home(msg), body);
@@ -812,7 +812,7 @@
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (void *)pl), 0);
s = msg_as_string(msg_home(msg), msg, NULL, 0, &size);
- TEST_S(s,
+ TEST_S(s,
"GET a-wife HTTP/1.1" CRLF
"Foo: bar" CRLF
"Content-Length: 6" CRLF
@@ -854,7 +854,7 @@
TEST_1(home = su_home_new(sizeof *home));
- TEST_1((w = msg_warning_make(home,
+ TEST_1((w = msg_warning_make(home,
"399 host:5060 \"Ok\", "
"399 [::1]:39999 \"foo\\\" bar\"")));
TEST(w->w_code, 399);
@@ -980,8 +980,8 @@
TEST_1(la->k_next->k_common->h_data);
TEST_1(la->k_next->k_items == NULL);
- TEST(msg_header_add_make(msg, (msg_pub_t *)tst,
- msg_content_language_class,
+ TEST(msg_header_add_make(msg, (msg_pub_t *)tst,
+ msg_content_language_class,
"en-gb"), 0);
TEST_P(la, tst->msg_content_language);
TEST_P(la->k_common->h_data, NULL);
@@ -998,19 +998,19 @@
TEST_1(separator = msg_separator_make(home, "\r\n"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (msg_header_t *)separator), 0);
- TEST_P(tst->msg_separator, separator);
+ TEST_P(tst->msg_separator, separator);
TEST_P(separator->sep_common->h_succ, tst->msg_payload);
/* Try to add a new payload */
TEST_1(payload = msg_payload_make(home, "foofaa\r\n"));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (msg_header_t *)payload), 0);
/* The new payload should be appended */
- TEST_P(tst->msg_payload->pl_next, payload);
+ TEST_P(tst->msg_payload->pl_next, payload);
TEST_P(tst->msg_payload->pl_common->h_succ, payload);
/* Try to add a new header */
- TEST_1(l = msg_content_length_create(home,
- tst->msg_payload->pl_len +
+ TEST_1(l = msg_content_length_create(home,
+ tst->msg_payload->pl_len +
payload->pl_len));
TEST(msg_header_insert(msg, (msg_pub_t *)tst, (msg_header_t *)l), 0);
/* The new header should be last before separator */
@@ -1056,7 +1056,7 @@
msg_common_t *h, *h_succ;
msg_iovec_t iovec[8];
- char const s[] =
+ char const s[] =
"GET /a-life HTTP/1.1" CRLF
"Content-Length: 6" CRLF
"Content-Type: *" CRLF
@@ -1078,10 +1078,10 @@
TEST_1(copy = msg_test_public(msg));
TEST_1(copy->msg_request);
TEST_1(tst0->msg_request);
- TEST_S(copy->msg_request->rq_url->url_path,
+ TEST_S(copy->msg_request->rq_url->url_path,
tst0->msg_request->rq_url->url_path);
TEST_S(copy->msg_request->rq_url->url_path, "a-life");
- TEST_P(copy->msg_request->rq_url->url_path,
+ TEST_P(copy->msg_request->rq_url->url_path,
tst0->msg_request->rq_url->url_path);
msg_destroy(msg);
@@ -1090,10 +1090,10 @@
TEST_1(dup = msg_test_public(msg));
TEST_1(dup->msg_request);
TEST_1(tst0->msg_request);
- TEST_S(dup->msg_request->rq_url->url_path,
+ TEST_S(dup->msg_request->rq_url->url_path,
tst0->msg_request->rq_url->url_path);
TEST_S(dup->msg_request->rq_url->url_path, "a-life");
- TEST_1(dup->msg_request->rq_url->url_path !=
+ TEST_1(dup->msg_request->rq_url->url_path !=
tst0->msg_request->rq_url->url_path);
msg_destroy(msg);
@@ -1156,7 +1156,7 @@
msg_content_id_t *cid;
msg_content_transfer_encoding_t *cte;
- char const s[] =
+ char const s[] =
"GET /a-life HTTP/1.1" CRLF
"Accept: text/html;level=4;q=1" CRLF
"Accept: text / plain;q=0.9" CRLF
@@ -1175,13 +1175,13 @@
/* "Content-Length: 305" CRLF */
"Content-MD5: LLO7gLaGqGt4BI6HouiWng==" CRLF
CRLF
- "test" CRLF
+ "test" CRLF
CRLF /* 1 */
- "--LaGqGt4BI6Ho" " " CRLF
+ "--LaGqGt4BI6Ho" " " CRLF
CRLF /* 2 */
"part 1" CRLF /* 3 */
CRLF /* 4 */
- "--LaGqGt4BI6Ho" CRLF
+ "--LaGqGt4BI6Ho" CRLF
"Content-Type: text/plain ; charset = iso-8859-1" CRLF /* 5 */
"Content-ID: <m7ZvEEm49xdTT0WCDUgnww at localhost>" CRLF /* 6 */
"Content-Transfer-Encoding: quoted-unreadable" CRLF /* 7 */
@@ -1191,10 +1191,10 @@
"Content-Type: text/html" CRLF /* 11 */
"Content-ID: <4SP77aQZ9z6Top2dvLqKPQ at localhost>" CRLF /* 12 */
CRLF /* 13 */
-#define BODY3 "<html><body>part 3</body></html>" CRLF
+#define BODY3 "<html><body>part 3</body></html>" CRLF
BODY3 /* 14 */
CRLF /* 15 */
- "--LaGqGt4BI6Ho--" CRLF;
+ "--LaGqGt4BI6Ho--" CRLF;
BEGIN();
@@ -1240,7 +1240,7 @@
TEST_1(mp->mp_data);
TEST(memcmp(mp->mp_data, CRLF "--" "LaGqGt4BI6Ho" CRLF, mp->mp_len), 0);
TEST_1(mp->mp_common->h_data);
- TEST_M(mp->mp_common->h_data, CRLF "--" "LaGqGt4BI6Ho" " " CRLF,
+ TEST_M(mp->mp_common->h_data, CRLF "--" "LaGqGt4BI6Ho" " " CRLF,
mp->mp_common->h_len);
TEST_1(pl = mp->mp_payload); TEST_1(pl->pl_data);
@@ -1254,7 +1254,7 @@
TEST_1(c = mp->mp_content_type);
TEST_S(c->c_type, "text/plain"); TEST_S(c->c_subtype, "plain");
- TEST_1(c->c_params); TEST_1(c->c_params[0]);
+ TEST_1(c->c_params); TEST_1(c->c_params[0]);
TEST_S(c->c_params[0], "charset=iso-8859-1");
TEST_1(cid = mp->mp_content_id);
@@ -1265,7 +1265,7 @@
TEST_1(pl = mp->mp_payload); TEST_1(pl->pl_data);
TEST_SIZE(strlen("part 2"), pl->pl_len);
TEST(memcmp(pl->pl_data, "part 2", pl->pl_len), 0);
-
+
TEST_1(mp = mp->mp_next);
TEST_1(mp->mp_data);
@@ -1295,7 +1295,7 @@
TEST(n, 15);
- head = NULL;
+ head = NULL;
TEST_1(h = msg_multipart_serialize(&head, mp0));
TEST_P(h, mpX->mp_close_delim);
TEST_1(!msg_chain_errors((msg_header_t *)mp0));
@@ -1306,15 +1306,15 @@
TEST(n, 15);
- /* Add a new part to multipart */
- mpnew = su_zalloc(home, sizeof(*mpnew)); TEST_1(mpnew);
+ /* Add a new part to multipart */
+ mpnew = su_zalloc(home, sizeof(*mpnew)); TEST_1(mpnew);
removed = mpX->mp_close_delim;
mpX->mp_next = mpnew; mpX = mpnew;
mpnew->mp_content_type = msg_content_type_make(home, "multipart/mixed");
TEST_1(mpnew->mp_content_type);
TEST(msg_multipart_complete(msg_home(msg), tst->msg_content_type, mp0), 0);
- head = NULL;
+ head = NULL;
TEST_1(h = msg_multipart_serialize(&head, mp0));
TEST_P((void *)h, mpX->mp_close_delim);
TEST_1(!msg_chain_errors((msg_header_t *)mp0));
@@ -1355,14 +1355,14 @@
TEST(n, 19);
/* Add an recursive multipart */
- mpnew = su_zalloc(home, sizeof(*mpnew)); TEST_1(mpnew);
+ mpnew = su_zalloc(home, sizeof(*mpnew)); TEST_1(mpnew);
mpX->mp_multipart = mpnew;
mpnew->mp_content_type = msg_content_type_make(home, "text/plain");
TEST_1(mpnew->mp_content_type);
TEST(msg_multipart_complete(msg_home(msg), tst->msg_content_type, mp0), 0);
TEST_1(mpnew->mp_close_delim);
- head = NULL;
+ head = NULL;
TEST_1(h = msg_multipart_serialize(&head, mp0));
TEST_P(h, mpX->mp_close_delim);
@@ -1393,7 +1393,7 @@
msg_payload_t *pl;
char const *end;
- char const s[] =
+ char const s[] =
"GET /a-life HTTP/1.1" CRLF
"Accept: text/html;level=4;q=1" CRLF
"Accept: text / plain;q=0.9" CRLF
@@ -1411,13 +1411,13 @@
"Content-Type: multipart/alternative ; boundary=\"LaGqGt4BI6Ho\"" CRLF
"Content-MD5: LLO7gLaGqGt4BI6HouiWng==" CRLF
CRLF
- "test" CRLF
+ "test" CRLF
CRLF /* 1 */
- "--LaGqGt4BI6Ho" " " CRLF
+ "--LaGqGt4BI6Ho" " " CRLF
CRLF /* 2 */
"part 1" CRLF /* 3 */
CRLF /* 4 */
- "--LaGqGt4BI6Ho" CRLF
+ "--LaGqGt4BI6Ho" CRLF
"Content-Type: text/plain;charset=iso-8859-1" CRLF /* 5 */
"Content-ID: <m7ZvEEm49xdTT0WCDUgnww at localhost>" CRLF /* 6 */
"Content-Transfer-Encoding: quoted-unreadable" CRLF /* 7 */
@@ -1427,10 +1427,10 @@
"Content-Type: text/html" CRLF /* 11 */
"Content-ID: <4SP77aQZ9z6Top2dvLqKPQ at localhost>" CRLF /* 12 */
CRLF /* 13 */
-#define BODY3 "<html><body>part 3</body></html>" CRLF
+#define BODY3 "<html><body>part 3</body></html>" CRLF
BODY3 /* 14 */
CRLF /* 15 */
- "--LaGqGt4BI6Ho--" CRLF;
+ "--LaGqGt4BI6Ho--" CRLF;
char const part1[] = "This is text\n";
char const part2[] = "<html><body>This is html</body></html>";
@@ -1465,19 +1465,19 @@
su_home_t h0[1] = { SU_HOME_INIT(h0) };
pl = msg_payload_dup(h0, tst->msg_payload); TEST_1(pl);
-
+
mp = msg_multipart_parse(home, c, pl); TEST_1(mp);
- for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
+ for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
h->sh_data = NULL, h->sh_len = 0;
TEST(n, 15);
-
+
n = msg_multipart_prepare(msg, mp, 0);
-
+
TEST_1(end = strstr(s, "--LaGqGt4BI6Ho "));
len = strlen(end);
TEST(len, n);
-
+
TEST_1(mp = msg_multipart_dup(h0, mp));
su_home_check(h0);
@@ -1489,20 +1489,20 @@
su_home_t h0[1] = { SU_HOME_INIT(h0) };
pl = msg_payload_dup(h0, tst->msg_payload); TEST_1(pl);
-
+
mp = msg_multipart_parse(h0, NULL, pl);
TEST_1(mp);
- for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
+ for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
h->sh_data = NULL, h->sh_len = 0;
TEST(n, 15);
-
+
n = msg_multipart_prepare(msg, mp, 0);
-
+
TEST_1(end = strstr(s, "--LaGqGt4BI6Ho "));
len = strlen(end);
TEST(len, n);
-
+
TEST_1(mp = msg_multipart_dup(h0, mp));
su_home_check(h0);
@@ -1514,7 +1514,7 @@
su_home_t h0[1] = { SU_HOME_INIT(h0) };
pl = msg_payload_dup(h0, tst->msg_payload); TEST_1(pl);
-
+
n = strstr(pl->pl_data, "--LaGqGt4BI6Ho") - (char *)pl->pl_data;
pl->pl_data = n + (char *)pl->pl_data; pl->pl_len -= n;
@@ -1522,14 +1522,14 @@
mp = msg_multipart_parse(h0, NULL, pl); TEST_1(mp);
- for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
+ for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
h->sh_data = NULL, h->sh_len = 0;
TEST(n, 15);
-
+
n = msg_multipart_prepare(msg, mp, 0);
TEST(len, n);
-
+
TEST_1(mp = msg_multipart_dup(h0, mp));
su_home_check(h0);
@@ -1542,7 +1542,7 @@
char *b;
pl = msg_payload_dup(h0, tst->msg_payload); TEST_1(pl);
-
+
/* Remove CRs */
b = pl->pl_data, len = pl->pl_len;
for (n = m = 0; n < len; n++) {
@@ -1550,14 +1550,14 @@
m++;
}
pl->pl_len = m;
-
+
mp = msg_multipart_parse(h0, NULL, pl);
TEST_1(mp);
-
- for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
+
+ for (n = 0, h = (msg_header_t *)mp; h; h = h->sh_succ, n++)
h->sh_data = NULL, h->sh_len = 0;
TEST(n, 15);
-
+
n = msg_multipart_prepare(msg, mp, 0);
TEST_1(n > 0);
@@ -1571,10 +1571,10 @@
TEST_1(c = msg_content_type_make(home, "multipart/related"));
TEST_1(mp = msg_multipart_create(home, "text/plain", part1, strlen(part1)));
- TEST_1(mp->mp_next =
+ TEST_1(mp->mp_next =
msg_multipart_create(home, "text/html", part2, strlen(part2)));
- TEST_1(mp->mp_next->mp_next =
- msg_multipart_create(home, "application/octet-stream",
+ TEST_1(mp->mp_next->mp_next =
+ msg_multipart_create(home, "application/octet-stream",
part3, sizeof part3));
TEST(msg_multipart_complete(home, c, mp), 0);
@@ -1605,7 +1605,7 @@
msg_accept_encoding_t *aen;
msg_accept_language_t *ala;
- char const s[] =
+ char const s[] =
"GET /a-life HTTP/1.1" CRLF
"Accept-Language: fi" CRLF
"Accept-Encoding: z0" CRLF
@@ -1629,7 +1629,7 @@
TEST(msg_header_remove(msg, (msg_pub_t *)tst, (msg_header_t *)ala), 0);
TEST_S(ala->aa_value, "de");
- TEST_1(ala = tst->msg_accept_language);
+ TEST_1(ala = tst->msg_accept_language);
TEST_1(ala = ala->aa_next); TEST_S(ala->aa_value, "se");
/* Make sure that cached encoding of se is reset */
TEST_1(ala->aa_common->h_data == NULL);
@@ -1642,12 +1642,12 @@
TEST_1(aen = tst->msg_accept_encoding->aa_next->aa_next);
TEST(msg_header_remove_all(msg, (msg_pub_t *)tst, (msg_header_t *)aen), 0);
- TEST_1(aen = tst->msg_accept_encoding);
+ TEST_1(aen = tst->msg_accept_encoding);
TEST_1(aen = aen->aa_next); TEST_S(aen->aa_value, "z1");
/* Make sure that cached encoding of z1 is reset */
TEST_1(aen->aa_common->h_data == NULL);
TEST_1(aen->aa_common->h_len == 0);
- TEST_1(aen->aa_next == NULL);
+ TEST_1(aen->aa_next == NULL);
TEST_1(aen->aa_common->h_succ == (void *)ala);
TEST_1(ala->aa_next->aa_common);
@@ -1708,7 +1708,7 @@
TEST_S(token, "aaaaaaaaaaaaa");
TEST_SIZE(msg_random_token(token, 32, zeros, 12), 20);
TEST_S(token, "aaaaaaaaaaaaaaaaaaaa");
-
+
END();
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_protos.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_protos.h.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_protos.h.in Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-/**-*- c -*-
+/**-*- c -*-
* @ingroup msg
* @internal @file test_protos.h.in
*
@@ -31,15 +31,15 @@
#ifndef TEST_PROTOS_H
/** Defined when <test_protos.h> has been included. */
-#define TEST_PROTOS_H
+#define TEST_PROTOS_H
/**@ingroup test_msg
* @file test_protos.h
*
* Prototypes and macros for dummy testing protocol headers.
- *
+ *
* #AUTO#
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*/
@@ -85,8 +85,8 @@
/**Tag list item for header string.
*
* The TSTTAG_HEADER_STR() macro is used to include a tag item containing a
- * header string in the tag list, e.g.,
- * @code
+ * header string in the tag list, e.g.,
+ * @code
* TSTTAG_HEADER_STR("Priority: urgent").
* @endcode
*
@@ -134,7 +134,7 @@
#if HAVE_INLINE
su_inline
tag_value_t tsttag_tst_v(msg_test_t const *v) { return (tag_value_t)v; }
-su_inline
+su_inline
tag_value_t tsttag_tst_vr(msg_test_t const **vp) { return (tag_value_t)vp; }
#else
#define tsttag_tst_v(v) (tag_value_t)(v)
@@ -153,8 +153,8 @@
/**Header class for #xxxxxxx_xxxxxxx#.
- *
- * The header class msg_#xxxxxx#_class defines how a
+ *
+ * The header class msg_#xxxxxx#_class defines how a
* #xxxxxxx_xxxxxxx# is parsed and printed. It also
* contains methods used by message parser and other functions
* to manipulate the msg_#xxxxxx#_t header structure.
@@ -162,28 +162,28 @@
extern msg_hclass_t msg_#xxxxxx#_class[];
/**Initializer for structure msg_#xxxxxx#_t.
- *
+ *
* A static msg_#xxxxxx#_t structure must be initialized
* with the MSG_#XXXXXX#_INIT() macro. For instance,
- * @code
- *
+ * @code
+ *
* msg_#xxxxxx#_t msg_#xxxxxx# = MSG_#XXXXXX#_INIT;
- *
+ *
* @endcode
* @HI
*/
#define MSG_#XXXXXX#_INIT() MSG_HDR_INIT(#xxxxxx#)
/**Initialize a structure msg_#xxxxxx#_t.
- *
+ *
* An msg_#xxxxxx#_t structure can be initialized with the
* msg_#xxxxxx#_init() function/macro. For instance,
* @code
- *
+ *
* msg_#xxxxxx#_t msg_#xxxxxx#;
- *
+ *
* msg_#xxxxxx#_init(&msg_#xxxxxx#);
- *
+ *
* @endcode
* @HI
*/
@@ -198,13 +198,13 @@
#endif
/**Test if header object is instance of msg_#xxxxxx#_t.
- *
+ *
* The function msg_is_#xxxxxx#() returns true (nonzero) if
* the header class is an instance of #xxxxxxx_xxxxxxx#
* object and false (zero) otherwise.
- *
+ *
* @param header pointer to the header structure to be tested
- *
+ *
* @return
* The function msg_is_x#xxxxxx#() returns true (nonzero) if
* the header object is an instance of header #xxxxxx# and
@@ -222,27 +222,27 @@
#define msg_#xxxxxx#_p(h) msg_is_#xxxxxx#((h))
/**Duplicate (deep copy) @c msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_dup() duplicates a header
* structure @a hdr. If the header structure @a hdr
* contains a reference (@c hdr->x_next) to a list of
* headers, all the headers in the list are duplicated, too.
- *
+ *
* @param home memory home used to allocate new structure
* @param hdr header structure to be duplicated
- *
+ *
* When duplicating, all parameter lists and non-constant
* strings attached to the header are copied, too. The
* function uses given memory @a home to allocate all the
* memory areas used to copy the header.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_dup(home, tst->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_dup() returns a pointer to the
* newly duplicated msg_#xxxxxx#_t header structure, or NULL
@@ -251,49 +251,49 @@
msg_#xxxxxx#_t *msg_#xxxxxx#_dup(su_home_t *home, msg_#xxxxxx#_t const *hdr);
/**Copy a msg_#xxxxxx#_t header structure.
- *
+ *
* The function msg_#xxxxxx#_copy() copies a header structure @a
* hdr. If the header structure @a hdr contains a reference (@c
* hdr->h_next) to a list of headers, all the headers in that
* list are copied, too. The function uses given memory @a home
* to allocate all the memory areas used to copy the header
* structure @a hdr.
- *
+ *
* @param home memory home used to allocate new structure
* @param hdr pointer to the header structure to be duplicated
- *
+ *
* When copying, only the header structure and parameter lists
* attached to it are duplicated. The new header structure
* retains all the references to the strings within the old @a
* header, including the encoding of the old header, if present.
- *
+ *
* @par Example
* @code
- *
+ *
* #xxxxxx# = msg_#xxxxxx#_copy(home, tst->msg_#xxxxxx#);
- *
+ *
* @endcode
- *
+ *
* @return
* The function msg_#xxxxxx#_copy() returns a pointer to
* newly copied header structure, or NULL upon an error.
*/
-msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
+msg_#xxxxxx#_t *msg_#xxxxxx#_copy(su_home_t *home,
msg_#xxxxxx#_t const *hdr);
/**Make a header structure msg_#xxxxxx#_t.
- *
+ *
* The function msg_#xxxxxx#_make() makes a new
* msg_#xxxxxx#_t header structure. It allocates a new
* header structure, and decodes the string @a s as the
* value of the structure.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param s string to be decoded as value of the new header structure
- *
+ *
* @note This function is usually implemented as a macro calling
* msg_header_make().
- *
+ *
* @return
* The function msg_#xxxxxx#_make() returns a pointer to
* newly maked msg_#xxxxxx#_t header structure, or NULL upon
@@ -309,25 +309,25 @@
#endif
/**Make a #xxxxxxx_xxxxxxx# from formatting result.
- *
+ *
* The function msg_#xxxxxx#_format() makes a new
* #xxxxxxx_xxxxxxx# object using formatting result as its
* value. The function first prints the arguments according to
* the format @a fmt specified. Then it allocates a new header
* structure, and uses the formatting result as the header
* value.
- *
+ *
* @param home memory home used to allocate new header structure.
* @param fmt string used as a printf()-style format
* @param ... argument list for format
- *
+ *
* @note This function is usually implemented as a macro calling
* msg_header_format().
- *
+ *
* @return
* The function msg_#xxxxxx#_format() returns a pointer to newly
* makes header structure, or NULL upon an error.
- *
+ *
* @HIDE
*/
#if SU_HAVE_INLINE
@@ -341,11 +341,11 @@
{
msg_header_t *h;
va_list ap;
-
+
va_start(ap, fmt);
h = msg_header_vformat(home, msg_#xxxxxx#_class, fmt, ap);
va_end(ap);
-
+
return (msg_#xxxxxx#_t *)h;
}
#endif
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_table.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_table.c.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/test_table.c.in Tue Dec 16 13:05:22 2008
@@ -31,8 +31,8 @@
*/
/**@ingroup test_msg
- *
- * @CFILE test_table.c
+ *
+ * @CFILE test_table.c
* @brief Parser table used for testing.
*
* #AUTO#
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
PROJECT_NAME = "nea"
OUTPUT_DIRECTORY = ../docs/html/nea
-INPUT = @srcdir@/nea.docs @srcdir@/sofia-sip @srcdir@ .
+INPUT = @srcdir@/nea.docs @srcdir@/sofia-sip @srcdir@ .
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../docs/Doxyfile.conf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/Makefile.am Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
noinst_LTLIBRARIES = libnea.la
-TESTS =
+TESTS =
# ----------------------------------------------------------------------
# Rules for building the targets
@@ -49,7 +49,7 @@
../msg/libmsg.la \
../url/liburl.la \
../bnf/libbnf.la \
- ../su/libsu.la
+ ../su/libsu.la
# ----------------------------------------------------------------------
# Install and distribution rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.c Tue Dec 16 13:05:22 2008
@@ -66,7 +66,7 @@
sip_to_t *nea_to; /**< The other end of subscription :) */
nea_notify_f nea_callback; /**< Notify callback */
nea_magic_t *nea_context; /**< Application context */
-
+
sip_contact_t *nea_contact; /**< */
sip_expires_t *nea_expires; /**< Proposed expiration time */
@@ -84,12 +84,12 @@
static int process_nea_request(nea_t *nea,
nta_leg_t *leg,
- nta_incoming_t *ireq,
+ nta_incoming_t *ireq,
sip_t const *sip);
-static int handle_notify(nta_leg_magic_t *lmagic,
+static int handle_notify(nta_leg_magic_t *lmagic,
nta_leg_t *leg,
- nta_incoming_t *ireq,
+ nta_incoming_t *ireq,
sip_t const *sip);
static int response_to_subscribe(nea_t *nea,
@@ -126,13 +126,13 @@
ta_start(ta, tag, value);
- have_to =
+ have_to =
tl_find(ta_args(ta), siptag_to) || tl_find(ta_args(ta), siptag_to_str);
- have_from =
+ have_from =
tl_find(ta_args(ta), siptag_from) || tl_find(ta_args(ta), siptag_from_str);
have_contact =
- tl_find(ta_args(ta), siptag_contact) ||
- tl_find(ta_args(ta), siptag_contact_str);
+ tl_find(ta_args(ta), siptag_contact) ||
+ tl_find(ta_args(ta), siptag_contact_str);
if (have_to && (nea = su_home_new(sizeof(nea_t)))) {
su_home_t *home = nea->nea_home;
@@ -145,7 +145,7 @@
nea->nea_callback = no_callback;
nea->nea_context = context;
- if (!have_from)
+ if (!have_from)
from = sip_from_create(home, (url_string_t*)m->m_url);
else
from = NULL;
@@ -155,7 +155,7 @@
ta_tags(ta));
/* Get and remove Expires header from tag list */
- tl_gets(nea->nea_args,
+ tl_gets(nea->nea_args,
SIPTAG_EXPIRES_REF(expires),
SIPTAG_EXPIRES_STR_REF(expires_str),
SIPTAG_TO_REF(to),
@@ -175,8 +175,8 @@
else
nea->nea_expires = sip_expires_create(home, EXPIRES_DEFAULT);
- tl_tremove(nea->nea_args,
- SIPTAG_EXPIRES(0),
+ tl_tremove(nea->nea_args,
+ SIPTAG_EXPIRES(0),
SIPTAG_EXPIRES_STR(0),
TAG_END());
@@ -189,7 +189,7 @@
if (nea->nea_timer) {
/* Create leg for NOTIFY requests */
- nea->nea_leg = nta_leg_tcreate(nea->nea_agent,
+ nea->nea_leg = nta_leg_tcreate(nea->nea_agent,
process_nea_request, nea,
TAG_IF(!have_from, SIPTAG_FROM(from)),
TAG_NEXT(nea->nea_args));
@@ -208,7 +208,7 @@
if (!nea->nea_leg ||
!nea->nea_oreq ||
- !nea->nea_timer)
+ !nea->nea_timer)
nea_destroy(nea), nea = NULL;
}
@@ -217,7 +217,7 @@
}
-int nea_update(nea_t *nea,
+int nea_update(nea_t *nea,
tag_type_t tag,
tag_value_t value,
...)
@@ -234,22 +234,22 @@
/* XXX - hack, previous request still waiting for response */
if (!nea->nea_leg || nea->nea_oreq)
return -1;
-
+
ta_start(ta, tag, value);
-
+
tl_gets(ta_args(ta),
SIPTAG_CONTENT_TYPE_REF(ct),
SIPTAG_CONTENT_TYPE_STR_REF(cts),
SIPTAG_PAYLOAD_REF(pl),
SIPTAG_EXPIRES_REF(expires),
TAG_NULL());
-
+
if (!pl || (!ct && !cts)) {
ta_end(ta);
return -1;
}
- tl_tremove(nea->nea_args,
+ tl_tremove(nea->nea_args,
SIPTAG_CONTENT_TYPE(0),
SIPTAG_CONTENT_TYPE_STR(0),
SIPTAG_PAYLOAD(0),
@@ -268,17 +268,17 @@
response_to_subscribe, nea,
NULL,
SIP_METHOD_SUBSCRIBE,
- NULL,
+ NULL,
SIPTAG_TO(nea->nea_to),
SIPTAG_PAYLOAD(pl),
- TAG_IF(ct, SIPTAG_CONTENT_TYPE(ct)),
+ TAG_IF(ct, SIPTAG_CONTENT_TYPE(ct)),
TAG_IF(cts, SIPTAG_CONTENT_TYPE_STR(cts)),
SIPTAG_EXPIRES(nea->nea_expires),
TAG_NEXT(nea->nea_args));
ta_end(ta);
- if (!nea->nea_oreq)
+ if (!nea->nea_oreq)
return -1;
return 0;
@@ -329,16 +329,16 @@
/* Function called by NTA to handle incoming requests belonging to the leg */
-int process_nea_request(nea_t *nea,
+int process_nea_request(nea_t *nea,
nta_leg_t *leg,
- nta_incoming_t *ireq,
+ nta_incoming_t *ireq,
sip_t const *sip)
{
switch (sip->sip_request->rq_method) {
case sip_method_notify:
return handle_notify(nea, leg, ireq, sip);
- case sip_method_ack:
+ case sip_method_ack:
return 400;
default:
nta_incoming_treply(ireq, SIP_405_METHOD_NOT_ALLOWED,
@@ -370,12 +370,12 @@
sip_time_t now = sip_now();
if (!nea->nea_notify_received) {
nea->nea_deadline = now +
- sip_contact_expires(NULL, sip->sip_expires, sip->sip_date,
+ sip_contact_expires(NULL, sip->sip_expires, sip->sip_date,
EXPIRES_DEFAULT, now);
if (sip->sip_to->a_tag && !nea->nea_dialog) {
nea->nea_dialog = 1;
nta_leg_rtag(nea->nea_leg, sip->sip_to->a_tag);
- nta_leg_client_route(nea->nea_leg,
+ nta_leg_client_route(nea->nea_leg,
sip->sip_record_route, sip->sip_contact);
}
}
@@ -432,14 +432,14 @@
if (nea->nea_oreq || !error) {
su_time_t now = su_now();
now.tv_sec = nea->nea_deadline;
- su_timer_set_at(nea->nea_timer,
- nea_expires_renew,
+ su_timer_set_at(nea->nea_timer,
+ nea_expires_renew,
nea,
now);
}
else
nea->nea_callback(nea, nea->nea_context, NULL);
-
+
return 0;
}
@@ -454,16 +454,16 @@
if (status >= 200)
nta_outgoing_destroy(orq), nea->nea_oreq = NULL;
- if (status >= 300)
+ if (status >= 300)
nea->nea_callback(nea, nea->nea_context, NULL);
return 0;
}
/** handle notifications */
-int handle_notify(nea_t *nea,
+int handle_notify(nea_t *nea,
nta_leg_t *leg,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
sip_subscription_state_t *ss = sip->sip_subscription_state;
@@ -475,9 +475,9 @@
if (ss == NULL)
phrase = "NOTIFY Has No Subscription-State Header";
- else if (sip->sip_event == NULL)
+ else if (sip->sip_event == NULL)
phrase = "Event Header Missing";
-
+
if (phrase) {
nta_incoming_treply(irq, 400, phrase, TAG_END());
nta_incoming_destroy(irq);
@@ -511,7 +511,7 @@
if (!nea->nea_dialog) {
nea->nea_dialog = 1;
nta_leg_rtag(nea->nea_leg, sip->sip_from->a_tag);
- nta_leg_server_route(nea->nea_leg,
+ nta_leg_server_route(nea->nea_leg,
sip->sip_record_route, sip->sip_contact);
}
@@ -541,9 +541,9 @@
return 200;
}
}
- else if (strcasecmp(ss->ss_substate, "pending") == 0)
+ else if (strcasecmp(ss->ss_substate, "pending") == 0)
nea->nea_state = nea_pending;
- else if (strcasecmp(ss->ss_substate, "active") == 0)
+ else if (strcasecmp(ss->ss_substate, "active") == 0)
nea->nea_state = nea_active;
else
nea->nea_state = nea_extended;
@@ -557,8 +557,8 @@
{
su_time_t now = su_now();
now.tv_sec = nea->nea_deadline;
- su_timer_set_at(nea->nea_timer,
- nea_expires_renew,
+ su_timer_set_at(nea->nea_timer,
+ nea_expires_renew,
nea,
now);
}
@@ -574,7 +574,7 @@
/* re-subscribe if expires soon */
if (nea->nea_state == nea_terminated ||
- nea->nea_deadline == 0 ||
+ nea->nea_deadline == 0 ||
nea->nea_deadline > now + NEA_TIMER_DELTA)
return;
@@ -592,6 +592,6 @@
NULL,
SIPTAG_EXPIRES(nea->nea_expires),
TAG_NEXT(nea->nea_args));
-
+
return;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea.docs Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
/* -*- c -*- */
/**@MODULEPAGE "nea" - SIP Events Module
- *
+ *
* @section nea_meta Module Meta Information
*
* Sofia Event API provides an interface to different events used in SIP
@@ -40,9 +40,9 @@
* {
* presentity_t *pr = su_home_clone(p->p_home, sizeof (*pr));
* ...
- * pr->pr_nes =
+ * pr->pr_nes =
* nea_server_create(agent, root,
- * m->m_url,
+ * m->m_url,
* MAX_SUBSCRIBERS,
* event_callback, pr,
* SIPTAG_CONTACT(m),
@@ -51,7 +51,7 @@
* ...
* }
* @endcode
- *
+ *
* @section nea_event_create Creating Events
*
* Next, events are created. The function nea_event_create () defines
@@ -65,7 +65,7 @@
* #define XPIDF_MIME_TYPE "application/xpidf+xml"
* #define PIDF_MIME_TYPE "application/cpim-pidf+xml"
- * ne = nea_event_create(pr->pr_nes, presence_callback, ep,
+ * ne = nea_event_create(pr->pr_nes, presence_callback, ep,
* PRESENCE_PACKAGE, NULL,
* PIDF_MIME_TYPE,
* PIDF_MIME_TYPE "," XPIDF_MIME_TYPE);
@@ -83,16 +83,16 @@
*
* After the update, subscribers of the event are notified (with SIP
* NOTIFY) of the changed payload with nea_server_update ().
- *
+ *
* @code
* nea_server_update(pr->pr_nes, home, event, 1,
* SIPTAG_CONTENT_TYPE(ct),
* SIPTAG_PAYLOAD(pl),
* TAG_END());
-
+
* nea_server_notify(pr->pr_nes, event);
* @endcode
- *
+ *
* Obtaining the event's payload and removing it is presented in the
* example below. The event is defined as a part of the @a package_t
* structure. Function nea_payloads_get() is used to return a payload
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_debug.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_debug.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_debug.c Tue Dec 16 13:05:22 2008
@@ -66,7 +66,7 @@
*
* The NEA_DEBUG environment variable is used to determine the debug
* logging level for @b nea module. The default level is 3.
- *
+ *
* @sa <sofia-sip/su_debug.h>, nea_log, SOFIA_DEBUG
*/
extern char const NEA_DEBUG[];
@@ -75,8 +75,8 @@
#define SU_DEBUG 3
#endif
-/**Debug log for @b nea module.
- *
+/**Debug log for @b nea module.
+ *
* The nea_log is the log object used by @b nea module. The level of
* #nea_log is set using #NEA_DEBUG environment variable.
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_event.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_event.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_event.c Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
/**@internal
* @file nea_event.c
* @brief Default MIME type for certain events.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
*
* @date Created: Thu Dec 11 20:28:46 2003 ppessi
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_server.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/nea_server.c Tue Dec 16 13:05:22 2008
@@ -71,7 +71,7 @@
su_home_t nes_home[1];
su_root_t *nes_root;
su_timer_t *nes_timer;
-
+
nta_agent_t *nes_agent;
nta_leg_t *nes_leg;
@@ -106,8 +106,8 @@
nea_new_event_f *nes_callback;
nea_smagic_t *nes_context;
- /** Events.
- * Each subscriber will be added to one of these. */
+ /** Events.
+ * Each subscriber will be added to one of these. */
nea_event_t *nes_events;
};
@@ -178,11 +178,11 @@
struct nea_sub_s {
nea_sub_t *s_next;
nea_sub_t **s_prev;
-
+
nta_leg_t *s_leg;
nta_incoming_t *s_irq;
nta_outgoing_t *s_oreq;
-
+
nea_server_t *s_nes;
sip_contact_t *s_local; /**< Local contact */
@@ -204,7 +204,7 @@
unsigned s_reported :1 ; /**< Made watcher report upon un-SUBSCRIBE */
unsigned s_processing : 1;
- unsigned s_rejected : 1;
+ unsigned s_rejected : 1;
unsigned s_pending_flush : 1;
unsigned s_garbage : 1;
unsigned s_fake : 1; /**< Do not send real information to user */
@@ -242,7 +242,7 @@
static
int nea_server_callback(nea_sub_t *nes_as_sub,
nta_leg_t *leg,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
static int nea_sub_process_incoming(nea_sub_t *s,
@@ -255,9 +255,9 @@
nta_incoming_t *irq,
sip_t const *sip);
-static int nea_sub_notify(nea_server_t *nes,
- nea_sub_t *s,
- sip_time_t now,
+static int nea_sub_notify(nea_server_t *nes,
+ nea_sub_t *s,
+ sip_time_t now,
tag_type_t tag, tag_value_t value, ...);
static int response_to_notify(nea_sub_t *s,
@@ -268,8 +268,8 @@
su_timer_t *timer,
su_timer_arg_t *arg);
-static int nea_view_queue(nea_server_t *nes,
- nea_event_view_t *evv,
+static int nea_view_queue(nea_server_t *nes,
+ nea_event_view_t *evv,
nea_event_queue_t *evq);
/** Assign an event view to subscriber. */
@@ -283,7 +283,7 @@
s->s_throttle = evv->evv_throttle;
}
-su_inline
+su_inline
void nea_subnode_init(nea_subnode_t *sn, nea_sub_t *s, sip_time_t now)
{
sn->sn_state = s->s_state;
@@ -312,18 +312,18 @@
* The function nea_server_create() initializes an event server object and
* registers it with @b nta. An event server object takes care of all events
* for a particular URI (@em eventity).
- *
+ *
* @param agent pointer to an @b nta agent object
* @param root pointer to an @b root object
* @param url url of the server to be created
* @param max_subs maximum number of subscriptions
- * @param callback authorization function,
+ * @param callback authorization function,
* or @c NULL if no authorization is required
* @param context server context (pointer to application data)
* @param tag, value, ... optional list of tag parameters
*
* @TAGS
- * The function nea_server_create() takes the following tag values as its
+ * The function nea_server_create() takes the following tag values as its
* arguments:
* <dl>
*
@@ -339,26 +339,26 @@
*
* <dt>NEATAG_MINSUB()
* <dd>Minimum duration of a subscription.
- *
+ *
* <dt>NEATAG_THROTTLE()
* <dd>Default value for event throttle (by default, 5 seconds).
* Throttle determines the minimum interval betweeen notifications. Note
* that the notification indicating that the subscription has terminated
* will be sent regardless of throttle.
- *
+ *
* The default throttle value is used if the subscriber does not include
* a throttle parameter in @ref sip_event "Event" header of SUBSCRIBE request.
- *
+ *
* <dt>NEATAG_MINTHROTTLE()
* <dd>Minimum allowed throttle value (by default, 5 seconds).
- *
+ *
* <dt>NEATAG_EVENTLIST()
* <dd>If true, the subscribers must support eventlists. If SIPTAG_REQUIRE()
* is given, it must contain the "eventlist" feature.
*
* <dt>NEATAG_DIALOG()
* <dd>Give an optional NTA destination leg to event server.
- *
+ *
* <dt>SIPTAG_REQUIRE()/SIPTAG_REQUIRE_STR()
* <dd>The @b Require header for the event server. The subscribers must
* indicate support the specified features.
@@ -384,8 +384,8 @@
char const *contact_str = NULL;
char const *server_str = NULL;
char const *rq_str = NULL;
- unsigned
- min_expires = 15 * 60,
+ unsigned
+ min_expires = 15 * 60,
expires = NEA_DEFAULT_EXPIRES,
max_expires = 24 * 60 * 60;
nta_leg_t *leg = NONE;
@@ -397,7 +397,7 @@
ta_start(ta, tag, value);
- tl_gets(ta_args(ta),
+ tl_gets(ta_args(ta),
SIPTAG_CONTACT_REF(contact),
SIPTAG_CONTACT_STR_REF(contact_str),
SIPTAG_ALLOW_EVENTS_REF(allow_events),
@@ -428,7 +428,7 @@
SU_DEBUG_5(("nea_server_create(): invalid expiration range\n"));
return NULL;
}
-
+
nes = su_home_new(sizeof(nea_server_t));
if (nes) {
@@ -453,10 +453,10 @@
nes->nes_allow_methods = sip_allow_make(home, "SUBSCRIBE");
- nes->nes_server =
- su_sprintf(home, "%s%snea/" NEA_VERSION_STR " %s",
+ nes->nes_server =
+ su_sprintf(home, "%s%snea/" NEA_VERSION_STR " %s",
server_str ? server_str : "",
- server_str ? " " : "",
+ server_str ? " " : "",
nta_agent_version(agent));
if (contact)
@@ -471,15 +471,15 @@
if (leg != NULL)
nta_leg_bind(leg, nea_server_callback, (nea_sub_t*)nes);
} else {
- nes->nes_leg = nta_leg_tcreate(agent,
- nea_server_callback,
- (nea_sub_t*)nes,
+ nes->nes_leg = nta_leg_tcreate(agent,
+ nea_server_callback,
+ (nea_sub_t*)nes,
NTATAG_NO_DIALOG(1),
NTATAG_METHOD("SUBSCRIBE"),
URLTAG_URL(url),
TAG_END());
}
-
+
nes->nes_eventlist = eventlist; /* Every event is a list */
if (eventlist && rq == NULL && rq_str == NULL)
rq_str = "eventlist";
@@ -489,9 +489,9 @@
else if (rq_str)
nes->nes_require = sip_require_make(nes->nes_home, rq_str);
- nes->nes_timer = su_timer_create(su_root_task(nes->nes_root),
+ nes->nes_timer = su_timer_create(su_root_task(nes->nes_root),
nes->nes_min_throttle
- ? 500L * nes->nes_min_throttle
+ ? 500L * nes->nes_min_throttle
: 500L);
if (nes->nes_allow_events &&
@@ -515,8 +515,8 @@
/** Invoke the new event callback.
*
- * The function nes_event_callback() calls the callback provided by the
- * application using the notifier object.
+ * The function nes_event_callback() calls the callback provided by the
+ * application using the notifier object.
*
* @param nes pointer to notifier object
* @param ev pointer to event view
@@ -528,9 +528,9 @@
* has been destroyed by the callback function, 0 otherwise.
*/
static
-int nes_new_event_callback(nea_server_t *nes,
- nea_event_t **ev_p,
- nea_event_view_t **view_p,
+int nes_new_event_callback(nea_server_t *nes,
+ nea_event_t **ev_p,
+ nea_event_view_t **view_p,
nta_incoming_t *irq,
sip_t const *sip)
{
@@ -556,7 +556,7 @@
SU_DEBUG_5(("nea_server_shutdown(%p) while in callback\n", (void *)nes));
return 100;
}
-
+
SU_DEBUG_5(("nea_server_shutdown(%p)\n", (void *)nes));
in_callback = nes->nes_in_callback; nes->nes_in_callback = 1;
@@ -567,16 +567,16 @@
if (s->s_pending_flush)
continue;
if (s->s_oreq == NULL)
- nea_sub_auth(s, nea_terminated,
+ nea_sub_auth(s, nea_terminated,
TAG_IF(retry_after, NEATAG_REASON("probation")),
TAG_IF(!retry_after, NEATAG_REASON("deactivated")),
TAG_IF(retry_after, NEATAG_RETRY_AFTER(retry_after)),
TAG_END());
else
status = 180;
- }
+ }
- nes->nes_in_callback = in_callback;
+ nes->nes_in_callback = in_callback;
return 200;
}
@@ -591,16 +591,16 @@
nes->nes_pending_destroy = 1;
return;
}
-
+
SU_DEBUG_5(("nea_server_destroy(%p)\n", (void *)nes));
-
+
nta_leg_destroy(nes->nes_leg), nes->nes_leg = NULL;
-
+
while (nes->nes_subscribers)
nea_sub_destroy(nes->nes_subscribers);
-
+
su_timer_destroy(nes->nes_timer), nes->nes_timer = NULL;
-
+
su_home_unref(nes->nes_home);
}
@@ -611,10 +611,10 @@
* A nea event server has typed content that is delivered to the
* subscribers. Different content types are each assigned a separate primary
* view. There can be also primary views with "fake" content, content
- * delivered to politely blocked subscribers.
+ * delivered to politely blocked subscribers.
*
* In addition to primary views, there can be secondary views, views
- * assigned to a single subscriber only.
+ * assigned to a single subscriber only.
*
* @TAGS
* The following tagged arguments are accepted:
@@ -629,7 +629,7 @@
* <dt>NEATAG_FAKE(fak)
* <dd>If @a fake is true, 'fake' view is updated.
*
- * <dt>NEATAG_VIEW(view)
+ * <dt>NEATAG_VIEW(view)
* <dd>If included in tagged arguments, @a view is * updated. Used when
* updating secondary view.
*
@@ -642,8 +642,8 @@
* <dd>Application-provided @a context pointer.
* The @a context pointer is returned by nea_view_magic() function.
*
- * <dt>NEATAG_RELIABLE(reliable)
- * <dd>The @a reliable flag determines how overlapping updates are handled.
+ * <dt>NEATAG_RELIABLE(reliable)
+ * <dd>The @a reliable flag determines how overlapping updates are handled.
* If @a reliable is true, all updates are delivered to the subscribers.
*
* <dt>NEATAG_THROTTLE(throttl)
@@ -651,10 +651,10 @@
* determines the minimum interval in seconds betweeen notifications. Note
* that the notification indicating that the subscription has terminated
* will be sent regardless of throttle.
- *
+ *
* The default throttle value is used if the subscriber does not include
* a throttle parameter in @ref sip_event "Event" header of SUBSCRIBE request.
- *
+ *
* <dt>NEATAG_MINTHROTTLE()
* <dd>Minimum allowed throttle value for updated event view.
*
@@ -684,7 +684,7 @@
NEATAG_FAKE_REF(fake),
NEATAG_VIEW_REF(evv),
TAG_NULL());
-
+
updated = nea_view_update(nes, ev, &evv, 0, fake, ta_tags(ta));
ta_end(ta);
@@ -733,7 +733,7 @@
NEATAG_THROTTLE_REF(throttle),
NEATAG_MINTHROTTLE_REF(min_throttle),
TAG_NULL());
-
+
ta_end(ta);
if (min_throttle < throttle)
@@ -754,7 +754,7 @@
for (i = 0; (evv = ev->ev_views[i]); i++)
if (str0casecmp(cts, evv->evv_content_type->c_type) == 0)
break;
-
+
if (private && evv == NULL) /* No private view without primary view. */
return -1;
@@ -762,7 +762,7 @@
return -1;
primary_p = eevv = ev->ev_views + i;
-
+
/* Search for fakeness/eventlist/private view */
if (evv && (private || evv->evv_private || evv->evv_fake != (unsigned)fake)) {
for (eevv = &evv->evv_next; (evv = *eevv); eevv = &evv->evv_next) {
@@ -773,7 +773,7 @@
}
}
}
-
+
/* New event view, allocate and link to chain */
if (!evv) {
sip_content_type_t *new_ct;
@@ -781,20 +781,20 @@
evv = su_zalloc(home, sizeof (*evv));
if (!evv)
return -1;
-
+
new_pl = pl ? sip_payload_dup(home, pl)
: sip_payload_make(home, pls);
-
- new_ct = ct ? sip_content_type_dup(home, ct)
+
+ new_ct = ct ? sip_content_type_dup(home, ct)
: sip_content_type_make(home, cts);
-
+
if ((!new_pl && pl) || !new_ct) {
su_free(home, evv); su_free(home, new_pl);
return -1;
}
*evvp = *eevv = evv;
-
+
evv->evv_primary = *primary_p;
evv->evv_private = private != 0;
evv->evv_fake = fake != 0;
@@ -808,13 +808,13 @@
assert(evv->evv_content_type);
}
else {
- if (pl &&
- evv->evv_payload &&
+ if (pl &&
+ evv->evv_payload &&
evv->evv_payload->pl_len == pl->pl_len &&
memcmp(evv->evv_payload->pl_data, pl->pl_data, pl->pl_len) == 0)
return 0;
- if (!pl && pls && evv->evv_payload &&
- evv->evv_payload->pl_len == strlen(pls) &&
+ if (!pl && pls && evv->evv_payload &&
+ evv->evv_payload->pl_len == strlen(pls) &&
memcmp(evv->evv_payload->pl_data, pls, evv->evv_payload->pl_len) == 0)
return 0;
if (!pl && !pls && !evv->evv_payload)
@@ -826,7 +826,7 @@
if (!new_pl && (pl || pls))
return -1;
-
+
evv->evv_payload = new_pl;
}
@@ -861,7 +861,7 @@
ta_start(ta, tag, value);
nea_view_update(nes, ev, &evv, 1, 0, ta_tags(ta));
-
+
ta_end(ta);
return evv;
@@ -935,8 +935,8 @@
/** Queue an old notification if needed. */
static
-int nea_view_queue(nea_server_t *nes,
- nea_event_view_t *evv,
+int nea_view_queue(nea_server_t *nes,
+ nea_event_view_t *evv,
nea_event_queue_t *evq)
{
nea_sub_t *s = NULL;
@@ -953,7 +953,7 @@
continue;
break; /* This */
}
-
+
if (s) {
nea_event_queue_t *evq0 = su_alloc(nes->nes_home, sizeof *evq);
@@ -963,7 +963,7 @@
*evq0 = *evq, evq = evq0;
/* evq should be copy of old head but with changed payload */
- assert(evq->evq_next == evv->evv_head->evq_next);
+ assert(evq->evq_next == evv->evv_head->evq_next);
evv->evv_head->evq_next = evq; /* insert to the queue */
@@ -977,7 +977,7 @@
/** Remove old unneeded notifications. */
static
-int nea_view_dequeue(nea_server_t *nes,
+int nea_view_dequeue(nea_server_t *nes,
nea_event_t *ev)
{
int i;
@@ -1011,7 +1011,7 @@
/** Notify watchers.
*
- * @return
+ * @return
* The function nea_server_notify() returns number of subscribers that the
* notification could be sent, or -1 upon an error.
*/
@@ -1045,11 +1045,11 @@
if (ev == NULL)
for (ev = nes->nes_events; ev; ev = ev->ev_next) {
nea_view_dequeue(nes, ev);
- SU_DEBUG_3(("nea_server(): notified %u, throttling at %u\n",
+ SU_DEBUG_3(("nea_server(): notified %u, throttling at %u\n",
notified, ev->ev_throttling));
}
else {
- SU_DEBUG_3(("nea_server(): notified %u, throttling at %u\n",
+ SU_DEBUG_3(("nea_server(): notified %u, throttling at %u\n",
notified, ev->ev_throttling));
nea_view_dequeue(nes, ev);
}
@@ -1087,7 +1087,7 @@
nea_sub_destroy(*ss);
continue;
}
- }
+ }
ss = &((*ss)->s_next);
}
}
@@ -1127,7 +1127,7 @@
nes->nes_subscribers = s;
/* Copy default values */
- s->s_throttle = nes->nes_throttle;
+ s->s_throttle = nes->nes_throttle;
}
return s;
@@ -1180,9 +1180,9 @@
su_free(home, del->s_local), del->s_local = NULL;
su_free(home, del->s_remote), del->s_remote = NULL;
- if (del->s_oreq)
+ if (del->s_oreq)
nta_outgoing_destroy(del->s_oreq), del->s_oreq = NULL;
- if (del->s_leg)
+ if (del->s_leg)
nta_leg_destroy(del->s_leg), del->s_leg = NULL;
if (del->s_from)
su_free(home, del->s_from), del->s_from = NULL;
@@ -1198,14 +1198,14 @@
nea_event_t *nea_event_create(nea_server_t *nes,
nea_watcher_f *callback,
nea_emagic_t *context,
- char const *name,
+ char const *name,
char const *subname,
char const *default_content_type,
char const *accept)
{
- return nea_event_tcreate(nes, callback, context,
- name, subname,
- SIPTAG_CONTENT_TYPE_STR(default_content_type),
+ return nea_event_tcreate(nes, callback, context,
+ name, subname,
+ SIPTAG_CONTENT_TYPE_STR(default_content_type),
SIPTAG_ACCEPT_STR(accept),
TAG_END());
}
@@ -1214,7 +1214,7 @@
nea_event_t *nea_event_tcreate(nea_server_t *nes,
nea_watcher_f *callback,
nea_emagic_t *context,
- char const *name,
+ char const *name,
char const *subname,
tag_type_t tag, tag_value_t value, ...)
{
@@ -1253,7 +1253,7 @@
sip_supported_t const *k = NULL;
sip_require_t const *rq = NULL;
char const *ct_str = NULL, *ac_str = NULL, *k_str = NULL, *rq_str = NULL;
-
+
unsigned throttle = nes->nes_throttle, min_throttle = nes->nes_min_throttle;
int eventlist = nes->nes_eventlist;
@@ -1274,11 +1274,11 @@
ev->ev_callback = callback;
ev->ev_magic = context;
- ev->ev_event = sip_event_format(nes->nes_home, "%s%s%s",
- name,
- subname ? "." : "",
+ ev->ev_event = sip_event_format(nes->nes_home, "%s%s%s",
+ name,
+ subname ? "." : "",
subname ? subname : "");
-
+
ev->ev_reliable = reliable != 0;
ev->ev_throttle = throttle;
ev->ev_min_throttle = min_throttle;
@@ -1294,15 +1294,15 @@
if (ev->ev_event) {
#define sip_allow_events_find(k, i) sip_params_find(k->k_items, i)
- if (!sip_allow_events_find(nes->nes_allow_events,
+ if (!sip_allow_events_find(nes->nes_allow_events,
ev->ev_event->o_type))
- sip_allow_events_add(nes->nes_home, nes->nes_allow_events,
+ sip_allow_events_add(nes->nes_home, nes->nes_allow_events,
ev->ev_event->o_type);
}
if (ct)
ev->ev_default = sip_accept_make(nes->nes_home, ct->c_type);
- else
+ else
ev->ev_default = sip_accept_make(nes->nes_home, ct_str);
if (ac == NULL && ac_str == NULL)
@@ -1319,7 +1319,7 @@
ev->ev_supported = sip_supported_make(nes->nes_home, k_str);
ev->ev_prev = pev;
- *pev = ev;
+ *pev = ev;
}
ta_end(ta);
@@ -1370,8 +1370,8 @@
/** Invoke the event callback.
*
- * The function nes_watcher_callback() calls the callback provided by the
- * application using the notifier object.
+ * The function nes_watcher_callback() calls the callback provided by the
+ * application using the notifier object.
*
* @param nes pointer to notifier object
* @param ev pointer to event view
@@ -1383,9 +1383,9 @@
* has been destroyed by the callback function, 0 otherwise.
*/
static
-int nes_watcher_callback(nea_server_t *nes,
- nea_event_t *ev,
- nea_sub_t *s,
+int nes_watcher_callback(nea_server_t *nes,
+ nea_event_t *ev,
+ nea_sub_t *s,
sip_t const *sip,
sip_time_t now)
{
@@ -1395,7 +1395,7 @@
nea_subnode_t sn[1];
nea_subnode_init(sn, s, now);
-
+
if (sn->sn_expires == 0 || sn->sn_state == nea_terminated)
s->s_reported = 1;
@@ -1405,12 +1405,12 @@
if (nes->nes_in_list)
return 0;
-
+
if (nes->nes_pending_destroy) {
nea_server_destroy(nes);
return -2;
}
-
+
if (sip == NULL && nes->nes_pending_flush) {
int flushed = s->s_pending_flush;
nea_server_pending_flush(nes);
@@ -1429,18 +1429,18 @@
*
* The function nea_server_add() is called when the notifier receives a
* SUBSCRIBE request without existing event dialog.
- *
+ *
* @param nes pointer to notifier
- * @param local_target optional contact header
+ * @param local_target optional contact header
* @param msg pointer to request message
* @param sip pointer to SIP view to request message
*
- * @return
+ * @return
* The function nea_server_add() returns 0 if successful, -1 upon an
* error.
- *
+ *
*/
-int nea_server_add(nea_server_t *nes,
+int nea_server_add(nea_server_t *nes,
sip_contact_t const *local_target,
msg_t *msg, sip_t *sip)
{
@@ -1480,7 +1480,7 @@
static
int nea_server_callback(nea_sub_t *nes_as_sub,
nta_leg_t *leg,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
return nea_server_add_irq((nea_server_t *)nes_as_sub, leg, NULL, irq, sip);
@@ -1490,7 +1490,7 @@
int nea_server_add_irq(nea_server_t *nes,
nta_leg_t *leg,
sip_contact_t const *local_target,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
nea_sub_t *s = nea_sub_create(nes);
@@ -1506,10 +1506,10 @@
if (leg == NULL || leg == nes->nes_leg) {
url_t target[1];
-
+
*target = *local_target->m_url;
- s->s_leg = nta_leg_tcreate(nes->nes_agent, nea_sub_process_incoming, s,
+ s->s_leg = nta_leg_tcreate(nes->nes_agent, nea_sub_process_incoming, s,
SIPTAG_FROM(sip->sip_to),
SIPTAG_TO(sip->sip_from),
SIPTAG_CALL_ID(sip->sip_call_id),
@@ -1519,7 +1519,7 @@
else {
nta_leg_bind(s->s_leg = leg, nea_sub_process_incoming, s);
}
-
+
if (s->s_leg) {
if (sip->sip_to->a_tag == NULL) {
nta_leg_tag(s->s_leg, NULL);
@@ -1568,7 +1568,7 @@
break;
default:
- nta_incoming_treply(irq,
+ nta_incoming_treply(irq,
retval = SIP_405_METHOD_NOT_ALLOWED,
SIPTAG_ALLOW_STR("SUBSCRIBE"),
TAG_END());
@@ -1579,7 +1579,7 @@
if (s->s_irq)
nta_incoming_destroy(irq), s->s_irq = NULL;
-
+
if (s->s_pending_flush || s->s_state == nea_embryonic)
nea_sub_destroy(s);
@@ -1624,7 +1624,7 @@
int once, what, supported_eventlist, require_eventlist;
if (sip->sip_payload && !sip->sip_content_type) {
- nta_incoming_treply(irq, 400, "Missing Content-Type",
+ nta_incoming_treply(irq, 400, "Missing Content-Type",
SIPTAG_SERVER_STR(nes->nes_server),
SIPTAG_ALLOW_EVENTS(nes->nes_allow_events),
SIPTAG_ALLOW(nes->nes_allow_methods),
@@ -1632,16 +1632,16 @@
return 0;
}
- if (sip->sip_expires &&
- sip->sip_expires->ex_delta > 0 &&
+ if (sip->sip_expires &&
+ sip->sip_expires->ex_delta > 0 &&
sip->sip_expires->ex_delta < nes->nes_min_expires) {
- sip_min_expires_t me[1];
+ sip_min_expires_t me[1];
sip_min_expires_init(me);
me->me_delta = nes->nes_min_expires;
- nta_incoming_treply(irq, 423, "Subscription Interval Too Small",
+ nta_incoming_treply(irq, 423, "Subscription Interval Too Small",
SIPTAG_ACCEPT(accept),
SIPTAG_MIN_EXPIRES(me),
SIPTAG_SERVER_STR(nes->nes_server),
@@ -1653,13 +1653,13 @@
/* Check features */
if (nes->nes_require) {
- unsupported = sip_has_unsupported2(nes->nes_home,
+ unsupported = sip_has_unsupported2(nes->nes_home,
sip->sip_supported,
sip->sip_require,
nes->nes_require);
if (unsupported) {
- nta_incoming_treply(irq, SIP_421_EXTENSION_REQUIRED,
+ nta_incoming_treply(irq, SIP_421_EXTENSION_REQUIRED,
SIPTAG_REQUIRE(nes->nes_require),
SIPTAG_UNSUPPORTED(unsupported),
SIPTAG_SERVER_STR(nes->nes_server),
@@ -1676,12 +1676,12 @@
require_eventlist = sip_has_feature(sip->sip_require, "eventlist");
supported_eventlist = supported_eventlist || require_eventlist;
- if (s->s_id && (!sip->sip_event ||
+ if (s->s_id && (!sip->sip_event ||
str0cmp(s->s_id->o_type, sip->sip_event->o_type) != 0 ||
str0cmp(s->s_id->o_id, sip->sip_event->o_id))) {
/* Multiple subscriptions per dialog are not supported. */
- return nta_incoming_treply(irq, 501,
- "Multiple subscriptions not implemented",
+ return nta_incoming_treply(irq, 501,
+ "Multiple subscriptions not implemented",
SIPTAG_SERVER_STR(nes->nes_server),
TAG_NULL());
}
@@ -1709,13 +1709,13 @@
if (!ev && !require_eventlist)
ev = ev_maybe;
-
+
if (ev || once)
break;
/* Ask the application either to
- 1) add a new event or assing us an event/payload (0),
- 2) take care of transaction (positive), or
+ 1) add a new event or assing us an event/payload (0),
+ 2) take care of transaction (positive), or
3) drop request (negative).
*/
if ((what = nes_new_event_callback(nes, &ev, &evv, irq, sip)) < 0)
@@ -1727,7 +1727,7 @@
}
if (ev_maybe == NULL && ev == NULL) {
- nta_incoming_treply(irq, SIP_489_BAD_EVENT,
+ nta_incoming_treply(irq, SIP_489_BAD_EVENT,
SIPTAG_SERVER_STR(nes->nes_server),
SIPTAG_ALLOW_EVENTS(nes->nes_allow_events),
SIPTAG_ALLOW(nes->nes_allow_methods),
@@ -1739,7 +1739,7 @@
unsupported = sip_has_unsupported(nes->nes_home, ev->ev_supported,
sip->sip_require);
- nta_incoming_treply(irq, SIP_420_BAD_EXTENSION,
+ nta_incoming_treply(irq, SIP_420_BAD_EXTENSION,
SIPTAG_UNSUPPORTED(unsupported),
SIPTAG_REQUIRE(ev->ev_require),
SIPTAG_SUPPORTED(ev->ev_supported),
@@ -1775,12 +1775,12 @@
/* Sort the accept list by Q values */
for (a = a0, accept = NULL; a; a = a_next) {
a_next = a->ac_next;
-
- for (aa = (sip_accept_t **)&accept;
- *aa && sip_q_value((*aa)->ac_q) >= sip_q_value(a->ac_q);
+
+ for (aa = (sip_accept_t **)&accept;
+ *aa && sip_q_value((*aa)->ac_q) >= sip_q_value(a->ac_q);
aa = &(*aa)->ac_next)
;
-
+
a->ac_next = *aa; *aa = a; /* Insert */
}
}
@@ -1795,11 +1795,11 @@
if (ac->ac_type == NULL || ac->ac_subtype == NULL)
continue;
-
+
/* Check all supported content types v. accept */
for (i = 0; (evv = ev->ev_views[i]); i++) {
assert(evv->evv_content_type && evv->evv_content_type->c_type);
-
+
if (strcmp(ac->ac_type, "*/*") == 0)
break;
@@ -1807,7 +1807,7 @@
if ((strcasecmp(ac->ac_type, type) == 0) ||
(strcasecmp(ac->ac_subtype, "*") == 0 &&
- strncasecmp(ac->ac_type, type,
+ strncasecmp(ac->ac_type, type,
ac->ac_subtype - ac->ac_type) == 0)) {
if (evv_maybe == NULL)
evv_maybe = evv;
@@ -1820,17 +1820,17 @@
/* Free the sorted Accept list */
for (a = a0; a; a = a_next)
- a_next = a->ac_next, su_free(home, a);
+ a_next = a->ac_next, su_free(home, a);
if (!evv)
evv = evv_maybe;
-
+
if (evv || once)
break;
/* Ask the application either to
- 1) add a new event view or assign us an event view (0),
- 2) take care of transaction (positive), or
+ 1) add a new event view or assign us an event view (0),
+ 2) take care of transaction (positive), or
3) drop request (negative).
*/
if ((what = nes_new_event_callback(nes, &ev, &evv, irq, sip)) < 0)
@@ -1846,7 +1846,7 @@
ev->ev_event->o_type, SIP_406_NOT_ACCEPTABLE));
/* There is no media acceptable to watcher */
- return nta_incoming_treply(irq, SIP_406_NOT_ACCEPTABLE,
+ return nta_incoming_treply(irq, SIP_406_NOT_ACCEPTABLE,
SIPTAG_ACCEPT(ev->ev_accept),
SIPTAG_SERVER_STR(nes->nes_server),
SIPTAG_ALLOW_EVENTS(nes->nes_allow_events),
@@ -1859,7 +1859,7 @@
evv = s->s_view;
/* Set throttle */
- if (sip->sip_event &&
+ if (sip->sip_event &&
(throttle = sip_params_find(sip->sip_event->o_params, "throttle="))) {
proposed_throttle = strtoul(throttle, NULL, 10);
@@ -1902,7 +1902,7 @@
s->s_updated = evv->evv_updated - 1; /* Force notify */
if (nes->nes_202_before_notify) {
- nta_incoming_treply(irq, SIP_202_ACCEPTED,
+ nta_incoming_treply(irq, SIP_202_ACCEPTED,
SIPTAG_SERVER_STR(nes->nes_server),
SIPTAG_ALLOW_EVENTS(nes->nes_allow_events),
SIPTAG_ALLOW(nes->nes_allow_methods),
@@ -1923,8 +1923,8 @@
return -1;
}
-
-
+
+
evv = s->s_view; /* Callback can change event view */
if (s->s_state == nea_embryonic)
@@ -1935,11 +1935,11 @@
if (irq) {
if (s->s_rejected)
- nta_incoming_treply(irq, SIP_403_FORBIDDEN,
+ nta_incoming_treply(irq, SIP_403_FORBIDDEN,
SIPTAG_SERVER_STR(nes->nes_server),
TAG_END());
else if (s->s_state == nea_active)
- nta_incoming_treply(irq, SIP_200_OK,
+ nta_incoming_treply(irq, SIP_200_OK,
SIPTAG_REQUIRE(ev->ev_require),
SIPTAG_SUPPORTED(ev->ev_supported),
SIPTAG_EXPIRES(expires),
@@ -1949,7 +1949,7 @@
SIPTAG_ALLOW(nes->nes_allow_methods),
TAG_END());
else
- nta_incoming_treply(irq, SIP_202_ACCEPTED,
+ nta_incoming_treply(irq, SIP_202_ACCEPTED,
SIPTAG_REQUIRE(ev->ev_require),
SIPTAG_SUPPORTED(ev->ev_supported),
SIPTAG_EXPIRES(expires),
@@ -1964,7 +1964,7 @@
}
/* ----------------------------------------------------------------- */
-/**Notify subscriber
+/**Notify subscriber
*
* The function nea_sub_notify() sends a notification to the subscriber. The
* event type is specified by subscriber event, payload type and payload in
@@ -1973,12 +1973,12 @@
*
* @param nes pointer to the notifier object
* @param s pointer to the subscription object
- * @param now current SIP time (if 0, no body is sent,
+ * @param now current SIP time (if 0, no body is sent,
* but updated Subscription-State header only
* @param tag,value,... tag list
*
*/
-int nea_sub_notify(nea_server_t *nes, nea_sub_t *s,
+int nea_sub_notify(nea_server_t *nes, nea_sub_t *s,
sip_time_t now,
tag_type_t tag, tag_value_t value, ...)
{
@@ -1999,7 +1999,7 @@
assert(s->s_view); assert(ev);
- if (suppress && s->s_view->evv_updated == s->s_updated)
+ if (suppress && s->s_view->evv_updated == s->s_updated)
return 0;
if (now == 0)
@@ -2007,7 +2007,7 @@
if (s->s_notified + s->s_throttle > now &&
/* Do not throttle state termination notification */
- substate != nea_terminated &&
+ substate != nea_terminated &&
(long)(s->s_expires - now) > 0) {
if (ev->ev_throttling > s->s_updated && !s->s_fake)
ev->ev_throttling = s->s_updated;
@@ -2034,7 +2034,7 @@
sip_subscription_state_init(ss);
- tl_gets(ta_args(ta),
+ tl_gets(ta_args(ta),
NEATAG_REASON_REF(reason),
NEATAG_FAKE_REF(fake), /* XXX - semantics??? */
NEATAG_RETRY_AFTER_REF(retry_after),
@@ -2042,10 +2042,10 @@
if (substate == nea_terminated) {
if (reason)
- snprintf(reason_buf, sizeof(reason_buf),
+ snprintf(reason_buf, sizeof(reason_buf),
"reason=%s", reason), params[i++] = reason_buf;
if (retry_after != (unsigned)-1)
- snprintf(retry_after_buf, sizeof(retry_after_buf),
+ snprintf(retry_after_buf, sizeof(retry_after_buf),
"retry-after=%u", retry_after), params[i++] = retry_after_buf;
}
else if ((long)(s->s_expires - now) <= 0) {
@@ -2065,10 +2065,10 @@
case nea_pending: ss->ss_substate = "pending"; break;
case nea_active: ss->ss_substate = "active"; break;
case nea_terminated: ss->ss_substate = "terminated"; break;
- /* Do not send notifys for embryonic subscriptions */
+ /* Do not send notifys for embryonic subscriptions */
case nea_embryonic:
ta_end(ta);
- return 0;
+ return 0;
}
callback = substate != nea_terminated ? response_to_notify : NULL;
@@ -2082,9 +2082,9 @@
n_evq = evq->evq_payload ? evq : evv->evv_primary->evv_head;
- s->s_oreq =
- nta_outgoing_tcreate(s->s_leg,
- callback, s, NULL,
+ s->s_oreq =
+ nta_outgoing_tcreate(s->s_leg,
+ callback, s, NULL,
SIP_METHOD_NOTIFY, NULL,
SIPTAG_SUBSCRIPTION_STATE(ss),
SIPTAG_REQUIRE(ev->ev_require),
@@ -2092,11 +2092,11 @@
SIPTAG_USER_AGENT_STR(nes->nes_server),
SIPTAG_CONTACT(s->s_local),
SIPTAG_EVENT(s->s_id),
- TAG_IF(!suppress,
+ TAG_IF(!suppress,
SIPTAG_CONTENT_TYPE(n_evq->evq_content_type)),
TAG_IF(!suppress,
SIPTAG_PAYLOAD(n_evq->evq_payload)),
- ta_tags(ta));
+ ta_tags(ta));
notified = s->s_oreq != 0;
@@ -2123,8 +2123,8 @@
/* ----------------------------------------------------------------- */
/**Process responses to the NOTIFY.
- *
- * The response_to_notify() processes the responses to the NOTIFY request.
+ *
+ * The response_to_notify() processes the responses to the NOTIFY request.
* If there was an error with delivering the NOTIFY, the subscription is
* considered terminated.
*
@@ -2172,7 +2172,7 @@
*
* @param nes notifier
* @param ev event
- *
+ *
* The function nea_server_active() returns number of active subscribers.
*/
int nea_server_active(nea_server_t *nes, nea_event_t const *ev)
@@ -2182,7 +2182,7 @@
/* Count the number of subscribers watching this event */
for (s = nes->nes_subscribers; s ; s = s->s_next)
- if (!s->s_pending_flush && s->s_state == nea_active
+ if (!s->s_pending_flush && s->s_state == nea_active
&& (ev == NULL || ev == s->s_event))
n++;
@@ -2198,7 +2198,7 @@
*
* @param nes notifier
* @param ev event view
- *
+ *
* The function nea_server_active() returns number of active subscribers.
*/
int nea_server_non_embryonic(nea_server_t *nes, nea_event_t const *ev)
@@ -2208,7 +2208,7 @@
/* Count the number of subscribers watching this event */
for (s = nes->nes_subscribers; s ; s = s->s_next)
- if (!s->s_pending_flush && s->s_state != nea_embryonic
+ if (!s->s_pending_flush && s->s_state != nea_embryonic
&& (ev == NULL || ev == s->s_event))
n++;
@@ -2248,7 +2248,7 @@
* @retval 0 if successful
* @retval -1 upon an error
*/
-int nea_sub_auth(nea_sub_t *s,
+int nea_sub_auth(nea_sub_t *s,
nea_state_t state,
tag_type_t tag, tag_value_t value, ...)
{
@@ -2289,9 +2289,9 @@
}
tl_gets(ta_args(ta), NEATAG_REASON_REF(reason), TAG_END());
-
+
rejected = reason && strcasecmp(reason, "rejected") == 0;
-
+
if (state == nea_terminated && embryonic && rejected && s->s_irq)
retval = 0, s->s_rejected = 1;
else
@@ -2303,7 +2303,7 @@
}
/** Obtain a list of subscribers */
-nea_subnode_t const **nea_server_get_subscribers(nea_server_t *nes,
+nea_subnode_t const **nea_server_get_subscribers(nea_server_t *nes,
nea_event_t const *ev)
{
nea_sub_t *s;
@@ -2315,13 +2315,13 @@
if (n == 0)
return NULL;
- sn_list = su_zalloc(nes->nes_home,
+ sn_list = su_zalloc(nes->nes_home,
(n + 1) * sizeof(sn) + n * sizeof(*sn));
if (sn_list) {
sn = (nea_subnode_t *)(sn_list + n + 1);
for (i = 0, s = nes->nes_subscribers; s; s = s->s_next) {
- if (!s->s_pending_flush && s->s_state != nea_embryonic
+ if (!s->s_pending_flush && s->s_state != nea_embryonic
&& (ev == NULL || ev == s->s_event)) {
assert(i < n);
nea_subnode_init(sn, s, now);
@@ -2338,7 +2338,7 @@
}
/** Free a list of subscriptions. */
-void nea_server_free_subscribers(nea_server_t *nes,
+void nea_server_free_subscribers(nea_server_t *nes,
nea_subnode_t const **sn_list)
{
if (sn_list) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/sofia-sip/nea.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/sofia-sip/nea.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nea/sofia-sip/nea.h Tue Dec 16 13:05:22 2008
@@ -67,19 +67,19 @@
/** Event view. */
typedef struct nea_event_view_s nea_event_view_t;
-#ifndef NEA_SMAGIC_T
+#ifndef NEA_SMAGIC_T
#define NEA_SMAGIC_T struct nea_smagic_t
#endif
/** NEA server context */
typedef NEA_SMAGIC_T nea_smagic_t;
-#ifndef NEA_EMAGIC_T
+#ifndef NEA_EMAGIC_T
#define NEA_EMAGIC_T struct nea_emagic_t
#endif
/** NEA server event context */
typedef NEA_EMAGIC_T nea_emagic_t;
-#ifndef NEA_EVMAGIC_T
+#ifndef NEA_EVMAGIC_T
#define NEA_EVMAGIC_T struct nea_evmagic_t
#endif
/** Event view context */
@@ -88,7 +88,7 @@
/** Description of subscription */
typedef struct nea_subnode_t {
nea_state_t sn_state; /**< Subscription state */
- unsigned sn_fake; /**< True if subscriber is given
+ unsigned sn_fake; /**< True if subscriber is given
* fake contents.
*/
unsigned sn_eventlist; /**< Subscriber supports eventlist */
@@ -98,7 +98,7 @@
sip_contact_t const *sn_contact; /**< Contact of subscriber */
/** Content-Type of SUBSCRIBE body (filter). */
- sip_content_type_t const *sn_content_type;
+ sip_content_type_t const *sn_content_type;
sip_payload_t const *sn_payload; /**< Body of subscribe*/
unsigned sn_expires; /**< When subscription expires */
@@ -123,7 +123,7 @@
*
* @retval 1 application takes care of responding to request
* @retval 0 application has added new event or payload format
- * @retval -1 nea server rejects request
+ * @retval -1 nea server rejects request
*/
typedef int (nea_new_event_f)(nea_smagic_t *context,
nea_server_t *nes,
@@ -166,7 +166,7 @@
int nea_server_add_irq(nea_server_t *nes,
nta_leg_t *leg,
sip_contact_t const *local_target,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
/** QAUTH callback function type.
@@ -189,7 +189,7 @@
nea_event_t *nea_event_create(nea_server_t *nes,
nea_watcher_f *callback,
nea_emagic_t *context,
- char const *name,
+ char const *name,
char const *subname,
char const *default_content_type,
char const *accept);
@@ -199,7 +199,7 @@
nea_event_t *nea_event_tcreate(nea_server_t *nes,
nea_watcher_f *callback,
nea_emagic_t *context,
- char const *name,
+ char const *name,
char const *subname,
tag_type_t, tag_value_t, ...);
@@ -215,10 +215,10 @@
/** Get number of (non-embryonic) subscribers. */
int nea_server_non_embryonic(nea_server_t *nes, nea_event_t const *ev);
-/** Obtain a list of subscriptions.
+/** Obtain a list of subscriptions.
*/
SOFIAPUBFUN
-nea_subnode_t const **nea_server_get_subscribers(nea_server_t *nes,
+nea_subnode_t const **nea_server_get_subscribers(nea_server_t *nes,
nea_event_t const *ev);
/** Free a list of subscriptions. */
@@ -227,12 +227,12 @@
/** Notify subscribers */
SOFIAPUBFUN
-int nea_server_notify(nea_server_t *nes,
+int nea_server_notify(nea_server_t *nes,
nea_event_t *ev);
/** Notify a subscriber */
SOFIAPUBFUN
-int nea_server_notify_one(nea_server_t *nes,
+int nea_server_notify_one(nea_server_t *nes,
nea_event_t *ev,
nea_sub_t *ns);
@@ -257,12 +257,12 @@
#if 0
/** Do a remote qauth.
*
- * The function nea_server_qauth() is given as q_callback pointer
+ * The function nea_server_qauth() is given as q_callback pointer
* to nea_server_create() if remote authentication from url is desired.
*/
-void nea_server_qauth(nea_server_t *nes,
+void nea_server_qauth(nea_server_t *nes,
nea_emagic_t *context,
- nea_sub_t *subscriber,
+ nea_sub_t *subscriber,
sip_t const *sip);
#endif
@@ -329,7 +329,7 @@
/** NEA Event Watcher */
typedef struct nea_s nea_t;
-#ifndef NEA_MAGIC_T
+#ifndef NEA_MAGIC_T
#define NEA_MAGIC_T struct nea_magic_t
#endif
@@ -337,7 +337,7 @@
typedef NEA_MAGIC_T nea_magic_t;
/** Event notification callback type.
- *
+ *
* This callback is called also when initial or refresh subscribe transaction
* completes with the transaction result in @a sip.
*/
@@ -360,7 +360,7 @@
/** Update SUBSCRIBE payload (filter rules) */
SOFIAPUBFUN
-int nea_update(nea_t *nea,
+int nea_update(nea_t *nea,
tag_type_t tag,
tag_value_t value,
...);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
PROJECT_NAME = "nta"
OUTPUT_DIRECTORY = ../docs/html/nta
-INPUT = @srcdir@/nta.docs @srcdir@/sofia-sip @srcdir@ .
+INPUT = @srcdir@/nta.docs @srcdir@/sofia-sip @srcdir@ .
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../docs/Doxyfile.conf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
dist_noinst_SCRIPTS = run_test_nta_api run_test_nta
TESTS = run_test_nta_api run_test_nta
-TESTS_ENVIRONMENT = $(SHELL)
+TESTS_ENVIRONMENT = $(SHELL)
# ----------------------------------------------------------------------
# Rules for building the targets
@@ -37,7 +37,7 @@
nobase_include_sofia_HEADERS = \
sofia-sip/nta.h sofia-sip/nta_stateless.h \
sofia-sip/nta_tport.h sofia-sip/nta_tag.h \
- sofia-sip/sl_utils.h
+ sofia-sip/sl_utils.h
libnta_la_SOURCES = nta.c nta_check.c nta_tag.c nta_tag_ref.c \
nta_internal.h \
@@ -68,7 +68,7 @@
EXTRA_DIST = nta.docs sl_utils.docs \
agent.pem cafile.pem \
- invite.msc $(BUILT_SOURCES)
+ invite.msc $(BUILT_SOURCES)
# ----------------------------------------------------------------------
# Sofia specific rules
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/invite.msc
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/invite.msc (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/invite.msc Tue Dec 16 13:05:22 2008
@@ -86,14 +86,14 @@
| |nta_leg_destroy | |
| |---------------------------|--------->|
| | ¦ | X
- | X ¦ |
+ | X ¦ |
User Agent Server Accepting a Call
----------------------------------
APP ¦ NTA
-User ¦ NTA
+User ¦ NTA
Agent ¦ agent
| ¦ | INVITE
| ¦ |<----------------------
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@CFILE nta.c
* @brief Sofia SIP Transaction API implementation
- *
+ *
* This source file has been divided into sections as follows:
* 1) agent
* 2) tport handling
@@ -37,9 +37,9 @@
* 9) resolving URLs for client transactions
* 10) 100rel reliable responses (reliable)
* 11) SigComp handling and public transport interface
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Jun 13 02:57:51 2000 ppessi
*/
@@ -135,8 +135,8 @@
tport_t const *tport,
tp_client_t *via);
-static int complete_response(msg_t *response,
- int status, char const *phrase,
+static int complete_response(msg_t *response,
+ int status, char const *phrase,
msg_t *request);
static int mreply(nta_agent_t *agent,
@@ -208,10 +208,10 @@
static void incoming_free(nta_incoming_t *irq);
su_inline void incoming_cut_off(nta_incoming_t *irq);
su_inline void incoming_reclaim(nta_incoming_t *irq);
-static void incoming_queue_init(incoming_queue_t *,
+static void incoming_queue_init(incoming_queue_t *,
unsigned timeout);
-static void incoming_queue_adjust(nta_agent_t *sa,
- incoming_queue_t *queue,
+static void incoming_queue_adjust(nta_agent_t *sa,
+ incoming_queue_t *queue,
unsigned timeout);
static nta_incoming_t *incoming_find(nta_agent_t const *agent,
@@ -252,10 +252,10 @@
tp_name_t const *tpn,
msg_t *msg,
tag_type_t tag, tag_value_t value, ...);
-static void outgoing_queue_init(outgoing_queue_t *,
+static void outgoing_queue_init(outgoing_queue_t *,
unsigned timeout);
-static void outgoing_queue_adjust(nta_agent_t *sa,
- outgoing_queue_t *queue,
+static void outgoing_queue_adjust(nta_agent_t *sa,
+ outgoing_queue_t *queue,
unsigned timeout);
static void outgoing_free(nta_outgoing_t *orq);
su_inline void outgoing_cut_off(nta_outgoing_t *orq);
@@ -290,7 +290,7 @@
*
* The NTA_DEBUG environment variable is used to determine the default
* debug logging level. The normal level is 3.
- *
+ *
* @sa <sofia-sip/su_debug.h>, #su_log_global, #SOFIA_DEBUG
*/
#ifdef DOXYGEN
@@ -301,8 +301,8 @@
#define SU_DEBUG 3
#endif
-/**Debug log for @b nta module.
- *
+/**Debug log for @b nta module.
+ *
* The nta_log is the log object used by @b nta module. The level of
* nta_log is set using #NTA_DEBUG environment variable.
*/
@@ -354,8 +354,8 @@
* NTATAG_DEBUG_DROP_PROB(), NTATAG_DEFAULT_PROXY(),
* NTATAG_EXTRA_100(), NTATAG_GRAYLIST(),
* NTATAG_MAXSIZE(), NTATAG_MAX_FORWARDS(), NTATAG_MERGE_482(), NTATAG_MCLASS()
- * NTATAG_PASS_100(), NTATAG_PASS_408(), NTATAG_PRELOAD(), NTATAG_PROGRESS(),
- * NTATAG_REL100(),
+ * NTATAG_PASS_100(), NTATAG_PASS_408(), NTATAG_PRELOAD(), NTATAG_PROGRESS(),
+ * NTATAG_REL100(),
* NTATAG_SERVER_RPORT(),
* NTATAG_SIPFLAGS(),
* NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4(),
@@ -368,9 +368,9 @@
* @note The value from following tags are stored, but they currently do nothing:
* NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_OPTIONS(), NTATAG_SMIME()
*
- * @note It is possible to provide @c (url_string_t*)-1 as @a contact_url.
+ * @note It is possible to provide @c (url_string_t*)-1 as @a contact_url.
* In that case, no server sockets are bound.
- *
+ *
* @retval handle to the agent when successful,
* @retval NULL upon an error.
*
@@ -399,15 +399,15 @@
agent->sa_flags = MSG_DO_CANONIC;
agent->sa_maxsize = 2 * 1024 * 1024; /* 2 MB */
- agent->sa_bad_req_mask =
+ agent->sa_bad_req_mask =
/*
- * Bit-wise not of these - what is left is suitable for UAs with
- * 100rel, timer, events, publish
+ * Bit-wise not of these - what is left is suitable for UAs with
+ * 100rel, timer, events, publish
*/
- (unsigned) ~(sip_mask_response | sip_mask_proxy | sip_mask_registrar |
+ (unsigned) ~(sip_mask_response | sip_mask_proxy | sip_mask_registrar |
sip_mask_pref | sip_mask_privacy);
- agent->sa_bad_resp_mask =
- (unsigned) ~(sip_mask_request | sip_mask_proxy | sip_mask_registrar |
+ agent->sa_bad_resp_mask =
+ (unsigned) ~(sip_mask_request | sip_mask_proxy | sip_mask_registrar |
sip_mask_pref | sip_mask_privacy);
agent->sa_t1 = NTA_SIP_T1;
agent->sa_t2 = NTA_SIP_T2;
@@ -445,14 +445,14 @@
agent->sa_mclass = sip_default_mclass();
agent->sa_in.re_t1 = &agent->sa_in.re_list;
-
+
incoming_queue_init(agent->sa_in.proceeding, 0);
incoming_queue_init(agent->sa_in.preliminary, agent->sa_t1x64); /* P1 */
incoming_queue_init(agent->sa_in.inv_completed, agent->sa_t1x64); /* H */
incoming_queue_init(agent->sa_in.inv_confirmed, agent->sa_t4); /* I */
incoming_queue_init(agent->sa_in.completed, agent->sa_t1x64); /* J */
incoming_queue_init(agent->sa_in.terminated, 0);
- incoming_queue_init(agent->sa_in.final_failed, 0);
+ incoming_queue_init(agent->sa_in.final_failed, 0);
agent->sa_out.re_t1 = &agent->sa_out.re_list;
@@ -460,7 +460,7 @@
outgoing_queue_init(agent->sa_out.resolving, 0);
outgoing_queue_init(agent->sa_out.trying, agent->sa_t1x64); /* F */
outgoing_queue_init(agent->sa_out.completed, agent->sa_t4); /* K */
- outgoing_queue_init(agent->sa_out.terminated, 0);
+ outgoing_queue_init(agent->sa_out.terminated, 0);
/* Special queues (states) for outgoing INVITE transactions */
outgoing_queue_init(agent->sa_out.inv_calling, agent->sa_t1x64); /* B */
timer_c = (agent->sa_use_timer_c || !agent->sa_is_a_uas)
@@ -547,7 +547,7 @@
for (i = 0, lht = agent->sa_defaults; i < lht->lht_size; i++) {
if ((leg = lht->lht_table[i])) {
- SU_DEBUG_3(("%s: destroying leg for <"
+ SU_DEBUG_3(("%s: destroying leg for <"
URL_PRINT_FORMAT ">\n",
__func__, URL_PRINT_ARGS(leg->leg_url)));
leg_free(agent, leg);
@@ -851,7 +851,7 @@
now = agent->sa_now, ms = agent->sa_millisec;
else
now = su_now(), ms = su_time_ms(now);
-
+
next = ms + offset; if (next == 0) next = 1;
if (agent->sa_in_timer) /* Currently executing timer */
@@ -863,8 +863,8 @@
SU_DEBUG_9(("nta: timer %s to %ld ms\n", "shortened", (long)offset));
else
SU_DEBUG_9(("nta: timer %s to %ld ms\n", "set", (long)offset));
-
- su_timer_set_at(agent->sa_timer, agent_timer, agent,
+
+ su_timer_set_at(agent->sa_timer, agent_timer, agent,
add_milliseconds(now, offset));
agent->sa_next = next;
}
@@ -879,7 +879,7 @@
{
if (agent && agent->sa_millisec != 0)
return agent->sa_now;
- else
+ else
return su_now();
}
@@ -891,7 +891,7 @@
#ifdef TPTAG_THRPSIZE
if (agent->sa_tport_threadpool) {
su_home_threadsafe(agent->sa_home);
- return su_clone_start(agent->sa_root,
+ return su_clone_start(agent->sa_root,
agent->sa_terminator,
NULL,
NULL,
@@ -916,7 +916,7 @@
* NTA keeps transactions alive, does NTA apply proxy or user-agent logic to
* INVITE transactions, or how the @Via headers are generated.
*
- * @note
+ * @note
* Setting the parameters NTATAG_MAXSIZE(), NTATAG_UDP_MTU(), NTATAG_MAX_PROCEEDING(),
* NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4() to
* 0 selects the default value.
@@ -928,8 +928,8 @@
* NTATAG_DEBUG_DROP_PROB(), NTATAG_DEFAULT_PROXY(),
* NTATAG_EXTRA_100(), NTATAG_GRAYLIST(),
* NTATAG_MAXSIZE(), NTATAG_MAX_FORWARDS(), NTATAG_MERGE_482(), NTATAG_MCLASS()
- * NTATAG_PASS_100(), NTATAG_PASS_408(), NTATAG_PRELOAD(), NTATAG_PROGRESS(),
- * NTATAG_REL100(),
+ * NTATAG_PASS_100(), NTATAG_PASS_408(), NTATAG_PRELOAD(), NTATAG_PROGRESS(),
+ * NTATAG_REL100(),
* NTATAG_SERVER_RPORT(),
* NTATAG_SIPFLAGS(),
* NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4(),
@@ -1220,7 +1220,7 @@
return n;
}
-static
+static
void agent_set_udp_params(nta_agent_t *self, usize_t udp_mtu)
{
tport_t *tp;
@@ -1243,23 +1243,23 @@
* INVITE transactions, or how the @Via headers are generated.
*
* @TAGS
- * NTATAG_ALIASES_REF(), NTATAG_BLACKLIST_REF(),
+ * NTATAG_ALIASES_REF(), NTATAG_BLACKLIST_REF(),
* NTATAG_CANCEL_2543_REF(), NTATAG_CANCEL_487_REF(),
- * NTATAG_CLIENT_RPORT_REF(), NTATAG_CONTACT_REF(),
+ * NTATAG_CLIENT_RPORT_REF(), NTATAG_CONTACT_REF(),
* NTATAG_DEBUG_DROP_PROB_REF(), NTATAG_DEFAULT_PROXY_REF(),
* NTATAG_EXTRA_100_REF(), NTATAG_GRAYLIST_REF(),
* NTATAG_MAXSIZE_REF(), NTATAG_MAX_FORWARDS_REF(), NTATAG_MCLASS_REF(),
* NTATAG_MERGE_482_REF(), NTATAG_MAX_PROCEEDING_REF(),
* NTATAG_PASS_100_REF(), NTATAG_PASS_408_REF(), NTATAG_PRELOAD_REF(),
* NTATAG_PROGRESS_REF(),
- * NTATAG_REL100_REF(),
- * NTATAG_SERVER_RPORT_REF(),
+ * NTATAG_REL100_REF(),
+ * NTATAG_SERVER_RPORT_REF(),
* NTATAG_SIGCOMP_ALGORITHM_REF(), NTATAG_SIGCOMP_OPTIONS_REF(),
* NTATAG_SIPFLAGS_REF(),
* NTATAG_SIP_T1_REF(), NTATAG_SIP_T1X64_REF(), NTATAG_SIP_T2_REF(),
* NTATAG_SIP_T4_REF(), NTATAG_SMIME_REF(), NTATAG_STATELESS_REF(),
* NTATAG_TAG_3261_REF(), NTATAG_TIMEOUT_408_REF(), NTATAG_TIMER_C_REF(),
- * NTATAG_UA_REF(), NTATAG_UDP_MTU_REF(), NTATAG_USER_VIA_REF(),
+ * NTATAG_UA_REF(), NTATAG_UDP_MTU_REF(), NTATAG_USER_VIA_REF(),
* NTATAG_USE_NAPTR_REF(), NTATAG_USE_SRV_REF(),
* and NTATAG_USE_TIMESTAMP_REF().
*
@@ -1366,7 +1366,7 @@
* NTATAG_S_SENT_REQUEST_REF(),
* NTATAG_S_SENT_RESPONSE_REF(),
* NTATAG_S_SERVER_TR_REF(),
- * NTATAG_S_TOUT_REQUEST_REF(),
+ * NTATAG_S_TOUT_REQUEST_REF(),
* NTATAG_S_TOUT_RESPONSE_REF(),
* NTATAG_S_TRLESS_200_REF(),
* NTATAG_S_TRLESS_REQUEST_REF(),
@@ -1459,7 +1459,7 @@
/* XXX - use a cryptographically safe func here? */
sa->sa_branch += NTA_BRANCH_PRIME;
- msg_random_token(branch, sizeof(branch) - 1,
+ msg_random_token(branch, sizeof(branch) - 1,
&sa->sa_branch, sizeof(sa->sa_branch));
return su_sprintf(home, "branch=z9hG4bK%s", branch);
@@ -1469,13 +1469,13 @@
/**
* Calculate branch value for stateless operation.
- *
+ *
* XXX - should include HMAC of previous @Via line.
*/
static
-char const *stateless_branch(nta_agent_t *sa,
+char const *stateless_branch(nta_agent_t *sa,
msg_t *msg,
- sip_t const *sip,
+ sip_t const *sip,
tp_name_t const *tpn)
{
su_md5_t md5[1];
@@ -1542,7 +1542,7 @@
/**For each transport, we have name used by tport module, SRV prefixes used
* for resolving, and NAPTR service/conversion.
*/
-static
+static
struct sipdns_tport {
char name[6]; /**< Named used by tport module */
char port[6]; /**< Default port number */
@@ -1678,14 +1678,14 @@
if (url->url_type == url_sip) {
tpn->tpn_proto = "*";
tports = tports_sip;
- if (!tpn->tpn_port || !tpn->tpn_port[0])
+ if (!tpn->tpn_port || !tpn->tpn_port[0])
tpn->tpn_port = SIP_DEFAULT_SERV;
}
else {
assert(url->url_type == url_sips);
tpn->tpn_proto = "*";
tports = tports_sips;
- if (!tpn->tpn_port || !tpn->tpn_port[0])
+ if (!tpn->tpn_port || !tpn->tpn_port[0])
tpn->tpn_port = SIPS_DEFAULT_SERV;
}
@@ -1712,8 +1712,8 @@
if (url_param(url->url_params, "comp", comp, sizeof(comp)) > 0)
tpn->tpn_comp = comp;
- if (tpn->tpn_comp &&
- (nta_compressor_vtable == NULL ||
+ if (tpn->tpn_comp &&
+ (nta_compressor_vtable == NULL ||
strcasecmp(tpn->tpn_comp, nta_compressor_vtable->ncv_name) != 0)) {
SU_DEBUG_1(("nta(%p): comp=%s not supported for " URL_PRINT_FORMAT "\n",
(void *)self, tpn->tpn_comp, URL_PRINT_ARGS(url)));
@@ -1781,7 +1781,7 @@
static
int agent_create_master_transport(nta_agent_t *self, tagi_t *tags)
{
- self->sa_tports =
+ self->sa_tports =
tport_tcreate(self, nta_agent_class, self->sa_root,
TPTAG_SDWN_ERROR(0),
TPTAG_IDLE(1800000),
@@ -1872,14 +1872,14 @@
maddr = 0;
port = 0;
}
-
+
if (strncasecmp(tpn->tpn_proto, "tls", 3)
? port == SIP_DEFAULT_PORT
: port == SIPS_DEFAULT_PORT)
port = 0;
snprintf(sport, sizeof sport, ":%u", port);
-
+
comp = tpn->tpn_comp;
SU_DEBUG_9(("nta: agent_init_via: "
@@ -1933,7 +1933,7 @@
while (via->v_next && via->v_next->v_common->h_data == tp)
via = via->v_next, new_via = new_via->v_next, dup_via = dup_via->v_next;
-
+
via = via->v_next;
/* Break the link in via list between transports */
vv = &new_via->v_next, new_via = *vv, *vv = NULL;
@@ -1952,7 +1952,7 @@
agent_set_udp_params(self, self->sa_udp_mtu);
v = self->sa_vias;
- self->sa_vias = new_vias;
+ self->sa_vias = new_vias;
msg_header_free(self->sa_home, (void *)v);
v = self->sa_public_vias;
@@ -2003,7 +2003,7 @@
v2 = v1->v_next;
- if (v2 &&
+ if (v2 &&
strcasecmp(v1->v_host, v2->v_host) == 0 &&
str0casecmp(v1->v_port, v2->v_port) == 0) {
char const *p1 = v1->v_protocol, *p2 = v2->v_protocol;
@@ -2017,7 +2017,7 @@
tp = NULL;
}
- self->sa_contact =
+ self->sa_contact =
sip_contact_create_from_via_with_transport(self->sa_home, v1, NULL, tp);
if (!self->sa_contact)
@@ -2038,7 +2038,7 @@
/** Insert @Via to a request message */
static
-int outgoing_insert_via(nta_outgoing_t *orq,
+int outgoing_insert_via(nta_outgoing_t *orq,
sip_via_t const *via)
{
nta_agent_t *self = orq->orq_agent;
@@ -2062,7 +2062,7 @@
else
return -1;
- if (!v->v_rport &&
+ if (!v->v_rport &&
((self->sa_rport && v->v_protocol == sip_transport_udp) ||
(self->sa_tcp_rport && v->v_protocol == sip_transport_tcp)))
msg_header_add_param(msg_home(msg), v->v_common, "rport");
@@ -2089,7 +2089,7 @@
if ((!user_via ||
/* Replace port in user Via only if we use udp and no rport */
- (v->v_protocol == sip_transport_udp && !v->v_rport &&
+ (v->v_protocol == sip_transport_udp && !v->v_rport &&
!orq->orq_stateless)) &&
via->v_port != v->v_port &&
str0cmp(via->v_port, v->v_port))
@@ -2101,7 +2101,7 @@
return 0;
}
-/** Get destination name from @Via.
+/** Get destination name from @Via.
*
* If @a using_rport is non-null, try rport.
* If *using_rport is non-zero, try rport even if <protocol> is not UDP.
@@ -2149,7 +2149,7 @@
return -1;
}
- if (url->url_type != url_sip &&
+ if (url->url_type != url_sip &&
url->url_type != url_sips &&
url->url_type != url_im &&
url->url_type != url_pres) {
@@ -2215,7 +2215,7 @@
}
else {
/* XXX - we should do something else? */
- SU_DEBUG_3(("%s(%p): %s\n", "nta", (void *)self,
+ SU_DEBUG_3(("%s(%p): %s\n", "nta", (void *)self,
"transport address updated"));
}
}
@@ -2288,7 +2288,7 @@
if (agent->sa_drop_prob && !tport_is_reliable(tport)) {
if ((unsigned)su_randint(0, 1000) < agent->sa_drop_prob) {
- SU_DEBUG_5(("nta: %s (%u) is %s\n",
+ SU_DEBUG_5(("nta: %s (%u) is %s\n",
method_name, cseq, "dropped simulating packet loss"));
agent->sa_stats->as_drop_request++;
msg_destroy(msg);
@@ -2299,16 +2299,16 @@
stream = tport_is_stream(tport);
/* Try to use compression on reverse direction if @Via has comp=sigcomp */
- if (stream &&
+ if (stream &&
sip->sip_via && sip->sip_via->v_comp &&
tport_can_send_sigcomp(tport) &&
- tport_name(tport)->tpn_comp == NULL &&
+ tport_name(tport)->tpn_comp == NULL &&
tport_has_compression(tport_parent(tport), sip->sip_via->v_comp)) {
tport_set_compression(tport, sip->sip_via->v_comp);
}
if (sip->sip_flags & MSG_FLG_TOOLARGE) {
- SU_DEBUG_5(("nta: %s (%u) is %s\n",
+ SU_DEBUG_5(("nta: %s (%u) is %s\n",
method_name, cseq, sip_413_Request_too_large));
agent->sa_stats->as_bad_request++;
mreply(agent, NULL, SIP_413_REQUEST_TOO_LARGE, msg,
@@ -2325,11 +2325,11 @@
errors = sip->sip_error != NULL;
if (errors ||
- (sip->sip_flags & MSG_FLG_ERROR) /* Fatal error */ ||
+ (sip->sip_flags & MSG_FLG_ERROR) /* Fatal error */ ||
(insane = (sip_sanity_check(sip) < 0))) {
sip_header_t const *h;
char const *badname = NULL, *phrase;
-
+
agent->sa_stats->as_bad_message++;
agent->sa_stats->as_bad_request++;
@@ -2342,12 +2342,12 @@
if (h->sh_class == sip_error_class)
bad = h->sh_error->er_name;
- else
+ else
bad = h->sh_class->hc_name;
if (bad)
SU_DEBUG_5(("nta: %s has bad %s header\n", method_name, bad));
-
+
if (!badname)
badname = bad;
}
@@ -2363,7 +2363,7 @@
phrase = sip_400_Bad_request;
SU_DEBUG_5(("nta: %s (%u) is %s\n", method_name, cseq, phrase));
-
+
mreply(agent, reply, 400, phrase, msg,
tport, 1, stream, NULL,
TAG_END());
@@ -2400,7 +2400,7 @@
}
/* First, try existing incoming requests */
- irq = incoming_find(agent, sip, sip->sip_via,
+ irq = incoming_find(agent, sip, sip->sip_via,
agent->sa_merge_482 &&
!sip->sip_to->a_tag &&
method != sip_method_ack
@@ -2442,7 +2442,7 @@
if (rel) {
SU_DEBUG_5(("nta: %s (%u) is going to %s (%u)\n",
method_name, cseq,
- rel->rel_irq->irq_cseq->cs_method_name,
+ rel->rel_irq->irq_cseq->cs_method_name,
rel->rel_irq->irq_cseq->cs_seq));
reliable_recv(rel, msg, sip, tport);
return;
@@ -2453,10 +2453,10 @@
url->url_params = NULL;
agent_aliases(agent, url, tport); /* canonize urls */
- if ((leg = leg_find(agent,
- method_name, url,
+ if ((leg = leg_find(agent,
+ method_name, url,
sip->sip_call_id,
- sip->sip_from->a_tag,
+ sip->sip_from->a_tag,
sip->sip_to->a_tag))) {
/* Try existing dialog */
SU_DEBUG_5(("nta: %s (%u) %s\n",
@@ -2490,14 +2490,14 @@
else if (agent->sa_callback) {
/* Stateless processing for request */
agent->sa_stats->as_trless_request++;
- SU_DEBUG_5(("nta: %s (%u) %s\n",
+ SU_DEBUG_5(("nta: %s (%u) %s\n",
method_name, cseq, "to message callback"));
(void)agent->sa_callback(agent->sa_magic, agent, msg, sip);
}
else {
agent->sa_stats->as_trless_request++;
SU_DEBUG_5(("nta: %s (%u) %s\n",
- method_name, cseq,
+ method_name, cseq,
"not processed by application: returning 501"));
if (method != sip_method_ack)
mreply(agent, NULL, SIP_501_NOT_IMPLEMENTED, msg,
@@ -2569,7 +2569,7 @@
hostport[rlen] = '\0';
}
- msg_header_replace_param(msg_home(msg), v->v_common,
+ msg_header_replace_param(msg_home(msg), v->v_common,
su_strdup(msg_home(msg), received));
SU_DEBUG_5(("nta: Via check: %s\n", received));
}
@@ -2580,7 +2580,7 @@
else if (v->v_rport) {
rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port));
msg_header_replace_param(msg_home(msg), v->v_common, rport);
- }
+ }
else if (tport_is_tcp(tport)) {
rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port));
msg_header_replace_param(msg_home(msg), v->v_common, rport);
@@ -2588,12 +2588,12 @@
else if (agent->sa_server_rport == 2) {
rport = su_sprintf(msg_home(msg), "rport=%u", ntohs(from->su_port));
msg_header_replace_param(msg_home(msg), v->v_common, rport);
- }
+ }
return 0;
}
-/** @internal Handle aliases of local node.
+/** @internal Handle aliases of local node.
*
* Return true if @a url is modified.
*/
@@ -2687,7 +2687,7 @@
agent->sa_stats->as_recv_msg++;
agent->sa_stats->as_recv_response++;
- SU_DEBUG_5(("nta: received %03d %s for %s (%u)\n",
+ SU_DEBUG_5(("nta: received %03d %s for %s (%u)\n",
status, phrase, method, cseq));
if (agent->sa_drop_prob && !tport_is_reliable(tport)) {
@@ -2705,7 +2705,7 @@
else
errors = sip->sip_error != NULL;
- if (errors ||
+ if (errors ||
sip_sanity_check(sip) < 0) {
sip_header_t const *h;
@@ -2750,7 +2750,7 @@
/* XXX - should check if msg should be discarded based on via? */
if ((orq = outgoing_find(agent, msg, sip, sip->sip_via))) {
- SU_DEBUG_5(("nta: %03d %s %s\n",
+ SU_DEBUG_5(("nta: %03d %s %s\n",
status, phrase, "is going to a transaction"));
if (outgoing_recv(orq, status, msg, sip) == 0)
return;
@@ -2759,7 +2759,7 @@
agent->sa_stats->as_trless_response++;
if ((orq = agent->sa_default_outgoing)) {
- SU_DEBUG_5(("nta: %03d %s %s\n", status, phrase,
+ SU_DEBUG_5(("nta: %03d %s %s\n", status, phrase,
"to the default transaction"));
outgoing_default_recv(orq, status, msg, sip);
return;
@@ -2778,7 +2778,7 @@
&& 200 <= sip->sip_status->st_status
&& sip->sip_status->st_status < 300
/* Exactly one Via header, belonging to us */
- && sip->sip_via && !sip->sip_via->v_next
+ && sip->sip_via && !sip->sip_via->v_next
&& agent_has_via(agent, sip->sip_via)) {
agent->sa_stats->as_trless_200++;
#if nomore /* sf.net bug #1750691. Let UAS to cope with it. */
@@ -2867,7 +2867,7 @@
/** Check if the headers are from response generated locally by NTA. */
int nta_sip_is_internal(sip_t const *sip)
{
- return
+ return
sip == NULL /* No message generated */
|| (sip->sip_flags & NTA_INTERNAL_MSG) == NTA_INTERNAL_MSG;
}
@@ -2878,7 +2878,7 @@
return msg_get_flags(msg, NTA_INTERNAL_MSG) == NTA_INTERNAL_MSG;
}
-/** Check if the message is internally generated by NTA.
+/** Check if the message is internally generated by NTA.
*
* @deprecated Use nta_msg_is_internal() instead
*/
@@ -2887,7 +2887,7 @@
/* ====================================================================== */
/* 5) Stateless operation */
-/**Forward a request or response message.
+/**Forward a request or response message.
*
* @note
* The ownership of @a msg is taken over by the function even if the
@@ -2907,8 +2907,8 @@
return -1;
}
- what =
- sip->sip_status ? "nta_msg_tsend(response)" :
+ what =
+ sip->sip_status ? "nta_msg_tsend(response)" :
sip->sip_request ? "nta_msg_tsend(request)" :
"nta_msg_tsend()";
@@ -2932,7 +2932,7 @@
/* NTATAG_INCOMPLETE_REF(incomplete), */
TAG_END());
- if (!sip->sip_separator &&
+ if (!sip->sip_separator &&
!(sip->sip_separator = sip_separator_create(msg_home(msg))))
SU_DEBUG_3(("%s: cannot create sip_separator\n", what));
else if (msg_serialize(msg, (msg_pub_t *)sip) != 0)
@@ -2967,7 +2967,7 @@
}
else {
/* Send request */
- if (outgoing_create(agent, NULL, NULL, u, NULL, msg_ref_create(msg),
+ if (outgoing_create(agent, NULL, NULL, u, NULL, msg_ref_create(msg),
NTATAG_STATELESS(1),
ta_tags(ta)))
retval = 0;
@@ -3127,7 +3127,7 @@
}
}
- if (tport_tsend(tport, reply, tpn,
+ if (tport_tsend(tport, reply, tpn,
IF_SIGCOMP_TPTAG_COMPARTMENT(cc)
TPTAG_MTU(INT_MAX),
TPTAG_SDWN_AFTER(sdwn_after),
@@ -3151,8 +3151,8 @@
/** Add headers from the request to the response message. */
static
-int complete_response(msg_t *response,
- int status, char const *phrase,
+int complete_response(msg_t *response,
+ int status, char const *phrase,
msg_t *request)
{
su_home_t *home = msg_home(response);
@@ -3173,7 +3173,7 @@
if (!response_sip->sip_to)
response_sip->sip_to = sip_to_dup(home, request_sip->sip_to);
if (!response_sip->sip_call_id)
- response_sip->sip_call_id =
+ response_sip->sip_call_id =
sip_call_id_dup(home, request_sip->sip_call_id);
if (!response_sip->sip_cseq)
response_sip->sip_cseq = sip_cseq_dup(home, request_sip->sip_cseq);
@@ -3252,7 +3252,7 @@
/* Append r-uri */
*sip_route_init(r0)->r_url = *ruri->us_url;
r->r_next = sip_route_dup(home, r0);
-
+
/* Use topmost route as request-uri */
ruri = (url_string_t const *)route->r_url;
route = route->r_next;
@@ -3292,7 +3292,7 @@
else
msg_header_insert(bmsg, (msg_pub_t *)bsip, (msg_header_t *)rq);
- if (!(bye = nta_outgoing_mcreate(agent, NULL, NULL, NULL, bmsg,
+ if (!(bye = nta_outgoing_mcreate(agent, NULL, NULL, NULL, bmsg,
NTATAG_STATELESS(1),
TAG_END())))
goto err;
@@ -3374,7 +3374,7 @@
request_uri = (url_string_t *)sip->sip_request->rq_url;
to = sip->sip_to ? sip->sip_to : leg->leg_remote;
-
+
if (!request_uri && to) {
if (method != sip_method_register)
request_uri = (url_string_t *)to->a_url;
@@ -3391,7 +3391,7 @@
if (method || method_name) {
sip_request_t *rq = sip->sip_request;
- int use_headers =
+ int use_headers =
request_uri == original || (url_t *)request_uri == rq->rq_url;
if (!rq
@@ -3406,11 +3406,11 @@
return -1;
}
- /* @RFC3261 table 1 (page 152):
- * Req-URI cannot contain method parameter or headers
+ /* @RFC3261 table 1 (page 152):
+ * Req-URI cannot contain method parameter or headers
*/
if (rq->rq_url->url_params) {
- rq->rq_url->url_params =
+ rq->rq_url->url_params =
url_strip_param_string((char *)rq->rq_url->url_params, "method");
sip_fragment_clear(rq->rq_common);
}
@@ -3466,10 +3466,10 @@
method_name = sip->sip_request->rq_method_name;
if (!leg->leg_id && sip->sip_cseq)
- seq = sip->sip_cseq->cs_seq;
+ seq = sip->sip_cseq->cs_seq;
else if (method == sip_method_ack || method == sip_method_cancel)
/* Dangerous - we may do PRACK/UPDATE meanwhile */
- seq = sip->sip_cseq ? sip->sip_cseq->cs_seq : leg->leg_seq;
+ seq = sip->sip_cseq ? sip->sip_cseq->cs_seq : leg->leg_seq;
else if (leg->leg_seq)
seq = ++leg->leg_seq;
else if (sip->sip_cseq) /* Obtain initial value from existing CSeq header */
@@ -3484,10 +3484,10 @@
sip->sip_call_id = sip_call_id_create(home, NULL);
}
- if ((!sip->sip_cseq ||
+ if ((!sip->sip_cseq ||
seq != sip->sip_cseq->cs_seq ||
method != sip->sip_cseq->cs_method ||
- (method == sip_method_unknown &&
+ (method == sip_method_unknown &&
strcmp(method_name, sip->sip_cseq->cs_method_name) != 0)) &&
(!(cseq = sip_cseq_create(home, seq, method, method_name)) ||
msg_header_insert(msg, (msg_pub_t *)sip, (msg_header_t *)cseq) < 0))
@@ -3576,7 +3576,7 @@
* nta_leg_client_route(), nta_leg_server_route(),
* nta_leg_destroy(), nta_outgoing_tcreate(), and nta_request_f().
*
- * @TAGS
+ * @TAGS
* NTATAG_NO_DIALOG(), NTATAG_STATELESS(), NTATAG_METHOD(),
* URLTAG_URL(), SIPTAG_CALL_ID(), SIPTAG_CALL_ID_STR(), SIPTAG_FROM(),
* SIPTAG_FROM_STR(), SIPTAG_TO(), SIPTAG_TO_STR(), SIPTAG_ROUTE(),
@@ -3648,7 +3648,7 @@
if (from) {
/* Now this is kludge */
- leg->leg_local_is_to = sip_is_to((sip_header_t*)from);
+ leg->leg_local_is_to = sip_is_to((sip_header_t*)from);
leg->leg_local = sip_to_dup(home, from);
}
else if (from_str)
@@ -3682,7 +3682,7 @@
url_t *changed = url_hdup(home, url);
su_free(home, url);
url = changed;
- }
+ }
leg->leg_rseq = rseq;
leg->leg_seq = seq;
@@ -3716,7 +3716,7 @@
what = "Missing local dialog address";
else if (leg->leg_local)
what = "Missing remote dialog address";
- else
+ else
what = "Missing dialog addresses";
goto err;
}
@@ -3909,7 +3909,7 @@
* @param leg leg to be tagged
* @param tag tag to be added (if NULL, a tag generated by @b NTA is added)
*
- * @return
+ * @return
* Pointer to tag if successful, NULL otherwise.
*/
char const *nta_leg_tag(nta_leg_t *leg, char const *tag)
@@ -3920,7 +3920,7 @@
if (tag && strchr(tag, '='))
tag = strchr(tag, '=') + 1;
- /* If there already is a tag,
+ /* If there already is a tag,
return NULL if it does not match with new one */
if (leg->leg_local->a_tag) {
if (!tag && str0casecmp(tag, leg->leg_local->a_tag))
@@ -3928,7 +3928,7 @@
else
return leg->leg_local->a_tag;
}
-
+
if (tag) {
if (sip_to_tag(leg->leg_home, leg->leg_local, tag) < 0)
return NULL;
@@ -3957,12 +3957,12 @@
/** Add a remote tag to the leg.
*
- * @note No remote tag is ever generated.
+ * @note No remote tag is ever generated.
*
* @param leg leg to be tagged
* @param tag tag to be added (@b must be non-NULL)
*
- * @return
+ * @return
* Pointer to tag if successful, NULL otherwise.
*/
char const *nta_leg_rtag(nta_leg_t *leg, char const *tag)
@@ -3975,7 +3975,7 @@
if (leg && leg->leg_remote)
return leg->leg_remote->a_tag;
- else
+ else
return NULL;
}
@@ -4023,8 +4023,8 @@
}
/** Return route components. */
-int nta_leg_get_route(nta_leg_t *leg,
- sip_route_t const **return_route,
+int nta_leg_get_route(nta_leg_t *leg,
+ sip_route_t const **return_route,
sip_contact_t const **return_target)
{
if (!leg)
@@ -4054,12 +4054,12 @@
return NULL;
if (!leg->leg_dialog || !leg->leg_local || !leg->leg_remote || !leg->leg_id)
return NULL;
-
+
from_tag = leg->leg_local->a_tag; if (!from_tag) from_tag = "0";
to_tag = leg->leg_remote->a_tag; if (!to_tag) to_tag = "0";
return sip_replaces_format(home, "%s;from-tag=%s;to-tag=%s%s",
- leg->leg_id->i_id, from_tag, to_tag,
+ leg->leg_id->i_id, from_tag, to_tag,
early_only ? ";early-only" : "");
}
@@ -4257,8 +4257,8 @@
* @param request_uri if non-NULL, and there is destination URI
* associated with the dialog, these URIs must match
* @param call_id if non-NULL, must match with @CallID header contents
- * @param remote_tag if there is remote tag
- * associated with dialog, @a remote_tag must match
+ * @param remote_tag if there is remote tag
+ * associated with dialog, @a remote_tag must match
* @param remote_uri ignored
* @param local_tag if non-NULL and there is local tag associated with leg,
* it must math
@@ -4290,7 +4290,7 @@
else if (URL_IS_STRING(request_uri)) {
/* accept a string as URL */
to_be_freed = url = url_hdup(NULL, request_uri);
- }
+ }
else {
*url0 = *request_uri, url = url0;
}
@@ -4305,10 +4305,10 @@
if (local_tag && local_tag[0] == '\0')
local_tag = NULL;
- leg = leg_find(agent,
- NULL, url,
- call_id,
- remote_tag,
+ leg = leg_find(agent,
+ NULL, url,
+ call_id,
+ remote_tag,
local_tag);
if (to_be_freed) su_free(NULL, to_be_freed);
@@ -4581,8 +4581,8 @@
HTABLE_BODIES_WITH(incoming_htable, iht, nta_incoming_t, HTABLE_HASH_IRQ,
size_t, hash_value_t);
-static void incoming_insert(nta_agent_t *agent,
- incoming_queue_t *queue,
+static void incoming_insert(nta_agent_t *agent,
+ incoming_queue_t *queue,
nta_incoming_t *irq);
su_inline int incoming_is_queued(nta_incoming_t const *irq);
@@ -4602,14 +4602,14 @@
su_inline int incoming_final_failed(nta_incoming_t *irq, msg_t *);
static void incoming_retransmit_reply(nta_incoming_t *irq, tport_t *tport);
-/** Create a default server transaction.
+/** Create a default server transaction.
*
* The default server transaction is used by a proxy to forward responses
* statelessly.
*
* @param agent pointer to agent object
*
- * @retval pointer to default server transaction object
+ * @retval pointer to default server transaction object
* @retval NULL if failed
*/
nta_incoming_t *nta_incoming_default(nta_agent_t *agent)
@@ -4639,11 +4639,11 @@
irq->irq_default = 1;
agent->sa_default_incoming = irq;
-
+
return irq;
}
-/** Create a server transaction.
+/** Create a server transaction.
*
* Create a server transaction for a request message. This function is used
* when an element processing requests statelessly wants to process a
@@ -4660,10 +4660,10 @@
* function fails.
*
* @TAGS
- * @TAG NTATAG_TPORT() specifies the transport used to receive the request
+ * @TAG NTATAG_TPORT() specifies the transport used to receive the request
* and also default transport for sending the response.
*
- * @retval nta_incoming_t pointer to the newly created server transaction
+ * @retval nta_incoming_t pointer to the newly created server transaction
* @retval NULL if failed
*/
nta_incoming_t *nta_incoming_create(nta_agent_t *agent,
@@ -4690,9 +4690,9 @@
return msg_destroy(msg), NULL;
ta_start(ta, tag, value);
-
- tl_gets(ta_args(ta),
- NTATAG_TPORT_REF(tport),
+
+ tl_gets(ta_args(ta),
+ NTATAG_TPORT_REF(tport),
TAG_END());
ta_end(ta);
@@ -4727,7 +4727,7 @@
incoming_queue_t *queue;
sip_method_t method = sip->sip_request->rq_method;
- irq->irq_request = msg;
+ irq->irq_request = msg;
irq->irq_home = home = msg_home(msg_ref_create(msg));
irq->irq_agent = agent;
@@ -4751,7 +4751,7 @@
case sip_method_publish:
break;
default:
- irq->irq_record_route =
+ irq->irq_record_route =
sip_record_route_copy(home, sip->sip_record_route);
}
irq->irq_branch = sip->sip_via->v_branch;
@@ -4807,7 +4807,7 @@
else {
queue = agent->sa_in.completed; /* Timer J */
}
- }
+ }
else {
queue = agent->sa_in.proceeding;
/* RFC 4320 (nit-actions-03):
@@ -4822,7 +4822,7 @@
period of time in which Timer E reaches T2 had this been a UDP hop is
one reasonable compromise.
- */
+ */
if (agent->sa_extra_100 && irq->irq_reliable_tp)
incoming_set_timer(irq, agent->sa_t2 / 2); /* T2 / 2 */
@@ -4841,7 +4841,7 @@
* Insert incoming transaction to hash table.
*/
static void
-incoming_insert(nta_agent_t *agent,
+incoming_insert(nta_agent_t *agent,
incoming_queue_t *queue,
nta_incoming_t *irq)
{
@@ -4867,8 +4867,8 @@
char const *method_name = sip->sip_request->rq_method_name;
/* RFC-3261 section 12.2.2 (page 76) */
- if (leg->leg_dialog &&
- irq->irq_agent->sa_is_a_uas &&
+ if (leg->leg_dialog &&
+ irq->irq_agent->sa_is_a_uas &&
method != sip_method_ack) {
uint32_t seq = sip->sip_cseq->cs_seq;
@@ -4920,8 +4920,8 @@
/** Change the timeout value of a queue */
static void
-incoming_queue_adjust(nta_agent_t *sa,
- incoming_queue_t *queue,
+incoming_queue_adjust(nta_agent_t *sa,
+ incoming_queue_t *queue,
uint32_t timeout)
{
nta_incoming_t *irq;
@@ -4950,13 +4950,13 @@
}
/** @internal
- * Insert an incoming transaction into a queue.
+ * Insert an incoming transaction into a queue.
*
* Insert a server transaction into a queue, and sets the corresponding
* timeout at the same time.
*/
su_inline
-void incoming_queue(incoming_queue_t *queue,
+void incoming_queue(incoming_queue_t *queue,
nta_incoming_t *irq)
{
if (irq->irq_queue == queue) {
@@ -4972,7 +4972,7 @@
irq->irq_timeout = set_timeout(irq->irq_agent, queue->q_timeout);
irq->irq_queue = queue;
- irq->irq_prev = queue->q_tail;
+ irq->irq_prev = queue->q_tail;
*queue->q_tail = irq;
queue->q_tail = &irq->irq_next;
queue->q_length++;
@@ -5003,7 +5003,7 @@
void incoming_set_timer(nta_incoming_t *irq, uint32_t interval)
{
nta_incoming_t **rq;
-
+
assert(irq);
if (interval == 0) {
@@ -5012,7 +5012,7 @@
}
if (irq->irq_rprev) {
- if ((*irq->irq_rprev = irq->irq_rnext))
+ if ((*irq->irq_rprev = irq->irq_rnext))
irq->irq_rnext->irq_rprev = irq->irq_rprev;
if (irq->irq_agent->sa_in.re_t1 == &irq->irq_rnext)
irq->irq_agent->sa_in.re_t1 = irq->irq_rprev;
@@ -5044,12 +5044,12 @@
void incoming_reset_timer(nta_incoming_t *irq)
{
if (irq->irq_rprev) {
- if ((*irq->irq_rprev = irq->irq_rnext))
+ if ((*irq->irq_rprev = irq->irq_rnext))
irq->irq_rnext->irq_rprev = irq->irq_rprev;
if (irq->irq_agent->sa_in.re_t1 == &irq->irq_rnext)
irq->irq_agent->sa_in.re_t1 = irq->irq_rprev;
irq->irq_agent->sa_in.re_length--;
- }
+ }
irq->irq_interval = 0, irq->irq_retry = 0;
irq->irq_rnext = NULL, irq->irq_rprev = NULL;
@@ -5121,11 +5121,11 @@
su_free(home, irq);
- msg_destroy((msg_t *)home);
+ msg_destroy((msg_t *)home);
}
/** Queue request to be freed */
-su_inline
+su_inline
void incoming_free_queue(incoming_queue_t *q, nta_incoming_t *irq)
{
incoming_cut_off(irq);
@@ -5133,7 +5133,7 @@
}
/** Reclaim memory used by queue of requests */
-static
+static
void incoming_reclaim_queued(su_root_magic_t *rm,
su_msg_r msg,
union sm_arg_u *u)
@@ -5322,7 +5322,7 @@
return irq && irq->irq_callback == callback ? irq->irq_magic : NULL;
}
-/** When received.
+/** When received.
*
* Return timestamp from the reception of the initial request.
*
@@ -5395,15 +5395,15 @@
continue;
if (is_uas_ack &&
- irq->irq_method == sip_method_invite &&
+ irq->irq_method == sip_method_invite &&
200 <= irq->irq_status && irq->irq_status < 300 &&
str0casecmp(irq->irq_tag, to->a_tag) == 0) {
*return_ack = irq;
- return NULL;
+ return NULL;
}
if (magic_branch) {
- /* RFC3261 17.2.3:
+ /* RFC3261 17.2.3:
*
* The request matches a transaction if branch and sent-by in topmost
* the method of the request matches the one that created the
@@ -5415,8 +5415,8 @@
strcasecmp(irq->irq_via->v_branch + 7, magic_branch) == 0 &&
strcasecmp(irq->irq_via->v_host, v->v_host) == 0 &&
str0cmp(irq->irq_via->v_port, v->v_port) == 0) {
- if (irq->irq_method == cseq->cs_method &&
- strcmp(irq->irq_cseq->cs_method_name,
+ if (irq->irq_method == cseq->cs_method &&
+ strcmp(irq->irq_cseq->cs_method_name,
cseq->cs_method_name) == 0)
return irq;
if (return_ack && irq->irq_method == sip_method_invite)
@@ -5428,8 +5428,8 @@
else {
/* No magic branch */
- /* INVITE request matches a transaction if
- the Request-URI, To tag, From tag, Call-ID, CSeq, and
+ /* INVITE request matches a transaction if
+ the Request-URI, To tag, From tag, Call-ID, CSeq, and
top Via header match */
/* From tag, Call-ID, and CSeq number has been matched above */
@@ -5445,7 +5445,7 @@
else {
/* Match CSeq */
if (irq->irq_method == cseq->cs_method &&
- strcmp(irq->irq_cseq->cs_method_name,
+ strcmp(irq->irq_cseq->cs_method_name,
cseq->cs_method_name) == 0) {
/* Match To tag */
if (!str0casecmp(irq->irq_to->a_tag, to->a_tag))
@@ -5462,12 +5462,12 @@
else if (return_cancel && irq->irq_method != sip_method_ack)
return *return_cancel = irq, NULL;
}
- }
+ }
/* RFC3261 - section 8.2.2.2 Merged Requests */
if (return_merge) {
- if (irq->irq_cseq->cs_method == cseq->cs_method &&
- strcmp(irq->irq_cseq->cs_method_name,
+ if (irq->irq_cseq->cs_method == cseq->cs_method &&
+ strcmp(irq->irq_cseq->cs_method_name,
cseq->cs_method_name) == 0)
*return_merge = irq, return_merge = NULL;
}
@@ -5478,7 +5478,7 @@
/** Process retransmitted requests. */
su_inline
-int
+int
incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
{
nta_agent_t *agent = irq->irq_agent;
@@ -5543,7 +5543,7 @@
} else if (irq->irq_queue == agent->sa_in.proceeding ||
irq->irq_queue == agent->sa_in.preliminary)
return -1;
- else
+ else
assert(irq->irq_queue == agent->sa_in.inv_confirmed ||
irq->irq_queue == agent->sa_in.terminated);
@@ -5560,7 +5560,7 @@
nta_agent_t *agent = irq->irq_agent;
/* According to the RFC 3261, this INVITE has been destroyed */
- if (irq->irq_method == sip_method_invite &&
+ if (irq->irq_method == sip_method_invite &&
200 <= irq->irq_status && irq->irq_status < 300) {
mreply(agent, NULL, SIP_481_NO_TRANSACTION, msg,
tport, 0, 0, NULL,
@@ -5600,7 +5600,7 @@
/** Merge request */
static
-void request_merge(nta_agent_t *agent,
+void request_merge(nta_agent_t *agent,
msg_t *msg, sip_t *sip, tport_t *tport,
char const *to_tag)
{
@@ -5671,7 +5671,7 @@
tag_type_t tag, tag_value_t value, ...)
{
int retval = -1;
-
+
if (irq) {
ta_list ta;
ta_start(ta, tag, value);
@@ -5698,15 +5698,15 @@
return retval;
for (t = tags; t; t = tl_next(t)) {
- tag_type_t tt = t->t_tag;
+ tag_type_t tt = t->t_tag;
- if (ntatag_comp == tt)
+ if (ntatag_comp == tt)
comp = (char const *)t->t_value, retval++;
else if (ntatag_sigcomp_close == tt)
irq->irq_sigcomp_zap = t->t_value != 0, retval++;
- else if (tptag_compartment == tt)
+ else if (tptag_compartment == tt)
cc = (void *)t->t_value, retval++;
}
@@ -5725,7 +5725,7 @@
irq->irq_tpn->tpn_comp = NULL;
}
- return retval;
+ return retval;
}
su_inline
@@ -5735,17 +5735,17 @@
if (!nta_compressor_vtable)
return 0;
- if (irq->irq_cc == NULL
+ if (irq->irq_cc == NULL
|| irq->irq_tpn->tpn_comp
|| tport_delivered_with_comp(tport, msg, NULL) != -1) {
struct sigcomp_compartment *cc;
cc = agent_compression_compartment(irq->irq_agent, tport, irq->irq_tpn,
create_if_needed);
-
+
if (cc)
agent_accept_compressed(irq->irq_agent, msg, cc);
-
+
irq->irq_cc = cc;
}
@@ -5753,7 +5753,7 @@
}
/** Add essential headers to the response message */
-static int nta_incoming_response_headers(nta_incoming_t *irq,
+static int nta_incoming_response_headers(nta_incoming_t *irq,
msg_t *msg,
sip_t *sip)
{
@@ -5789,13 +5789,13 @@
* @param tag,value,... taged argument list
*
* Generate status structure based on @a status and @a phrase.
- * Add essential headers to the response message:
- * @From, @To, @CallID, @CSeq, @Via, and optionally
+ * Add essential headers to the response message:
+ * @From, @To, @CallID, @CSeq, @Via, and optionally
* @RecordRoute.
*/
int nta_incoming_complete_response(nta_incoming_t *irq,
msg_t *msg,
- int status,
+ int status,
char const *phrase,
tag_type_t tag, tag_value_t value, ...)
{
@@ -5866,7 +5866,7 @@
if (nta_incoming_response_headers(irq, msg, sip) < 0)
msg_destroy(msg), msg = NULL;
}
-
+
return msg;
}
@@ -5932,7 +5932,7 @@
* @retval 0 when succesful
* @retval -1 upon an error
*/
-int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
+int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
{
sip_t *sip = sip_object(msg);
@@ -5998,12 +5998,12 @@
int retry_without_rport = 0;
tp_name_t *tpn, default_tpn[1];
- if (status == 408 &&
- irq->irq_method != sip_method_invite &&
+ if (status == 408 &&
+ irq->irq_method != sip_method_invite &&
!agent->sa_pass_408 &&
!irq->irq_default) {
/* RFC 4320 nit-actions-03 Action 2:
-
+
A transaction-stateful SIP element MUST NOT send a response with
Status-Code of 408 to a non-INVITE request. As a consequence, an
element that can not respond before the transaction expires will not
@@ -6063,7 +6063,7 @@
SU_DEBUG_5(("%s: tport_tsend: %s%s\n",
__func__, su_strerror(err),
err == EPIPE ? "(retrying)" : ""));
-
+
if (err != EPIPE && err != ECONNREFUSED)
break;
tport_decref(&irq->irq_tport);
@@ -6099,13 +6099,13 @@
if (status < 200) {
queue = agent->sa_in.proceeding;
-
- if (irq->irq_method == sip_method_invite && status > 100 &&
+
+ if (irq->irq_method == sip_method_invite && status > 100 &&
agent->sa_progress != UINT_MAX && agent->sa_is_a_uas) {
/* Retransmit preliminary responses in regular intervals */
incoming_set_timer(irq, agent->sa_progress); /* N2 */
}
- }
+ }
else {
irq->irq_completed = 1;
@@ -6126,7 +6126,7 @@
tport_decref(&irq->irq_tport);
}
else if (status >= 300 || agent->sa_is_a_uas) {
- if (status < 300 || !irq->irq_reliable_tp)
+ if (status < 300 || !irq->irq_reliable_tp)
incoming_set_timer(irq, agent->sa_t1); /* G */
queue = agent->sa_in.inv_completed; /* H */
}
@@ -6175,7 +6175,7 @@
}
/* We could not send final response. */
- return incoming_final_failed(irq, msg);
+ return incoming_final_failed(irq, msg);
}
@@ -6213,20 +6213,20 @@
msg = reliable_response(irq);
else
msg = irq->irq_response;
-
+
if (msg && tport) {
irq->irq_retries++;
if (irq->irq_retries == 2 && irq->irq_tpn->tpn_comp) {
irq->irq_tpn->tpn_comp = NULL;
-
+
if (irq->irq_cc) {
agent_close_compressor(irq->irq_agent, irq->irq_cc);
nta_compartment_decref(&irq->irq_cc);
}
}
- tport = tport_tsend(tport, msg, irq->irq_tpn,
+ tport = tport_tsend(tport, msg, irq->irq_tpn,
IF_SIGCOMP_TPTAG_COMPARTMENT(irq->irq_cc)
TPTAG_MTU(INT_MAX), TAG_END());
irq->irq_agent->sa_stats->as_sent_msg++;
@@ -6263,11 +6263,11 @@
uint32_t now = sa->sa_millisec;
nta_incoming_t *irq, *irq_next;
size_t retransmitted = 0, timeout = 0, terminated = 0, destroyed = 0;
- size_t unconfirmed =
- sa->sa_in.inv_completed->q_length +
+ size_t unconfirmed =
+ sa->sa_in.inv_completed->q_length +
sa->sa_in.preliminary->q_length;
- size_t unterminated =
- sa->sa_in.inv_confirmed->q_length +
+ size_t unterminated =
+ sa->sa_in.inv_confirmed->q_length +
sa->sa_in.completed->q_length;
size_t total = sa->sa_incoming->iht_used;
@@ -6297,7 +6297,7 @@
incoming_set_timer(irq, 2U * irq->irq_interval); /* G */
else
incoming_set_timer(irq, sa->sa_t2); /* G */
- }
+ }
else if (irq->irq_method == sip_method_invite && irq->irq_status >= 100) {
if (irq->irq_queue == sa->sa_in.preliminary) {
/* Timer P1 - PRACK timer */
@@ -6352,7 +6352,7 @@
}
/* Timeouts.
- * For each state the request is in, there is always a queue of its own
+ * For each state the request is in, there is always a queue of its own
*/
while ((irq = sa->sa_in.preliminary->q_head)) {
assert(irq->irq_status < 200);
@@ -6379,7 +6379,7 @@
assert(irq->irq_method == sip_method_invite);
if ((int32_t)(irq->irq_timeout - now) > 0 ||
- timeout >= timer_max_timeout ||
+ timeout >= timer_max_timeout ||
terminated >= timer_max_terminate)
break;
@@ -6390,7 +6390,7 @@
irq->irq_terminated = 1;
incoming_reset_timer(irq);
if (!irq->irq_destroyed) {
- timeout++;
+ timeout++;
incoming_queue(sa->sa_in.terminated, irq);
/* report timeout error to user */
incoming_call_callback(irq, NULL, NULL);
@@ -6399,7 +6399,7 @@
terminated++;
incoming_free_queue(rq, irq);
}
- }
+ }
while ((irq = sa->sa_in.inv_confirmed->q_head)) {
assert(irq->irq_timeout);
@@ -6409,7 +6409,7 @@
if ((int32_t)(irq->irq_timeout - now) > 0 ||
terminated >= timer_max_terminate)
break;
-
+
/* Timer I */
SU_DEBUG_5(("nta: timer %s fired, %s %u response\n",
"I", "terminate", irq->irq_status));
@@ -6460,9 +6460,9 @@
MOD_ZU"/"MOD_ZU" tout, "
MOD_ZU"/"MOD_ZU" term, "
MOD_ZU"/"MOD_ZU" free\n",
- retransmitted, unconfirmed,
+ retransmitted, unconfirmed,
timeout, unconfirmed,
- terminated, unterminated,
+ terminated, unterminated,
destroyed, total));
}
@@ -6486,8 +6486,8 @@
if (su_msg_send(m) == SU_SUCCESS)
q->q_length = 0;
- }
- }
+ }
+ }
if (q->q_length > 0)
incoming_reclaim_queued(NULL, NULL, (void *)q);
@@ -6513,25 +6513,25 @@
static void outgoing_try_udp_instead(nta_outgoing_t *orq);
static void outgoing_tport_error(nta_agent_t *agent, nta_outgoing_t *orq,
tport_t *tp, msg_t *msg, int error);
-static void outgoing_print_tport_error(nta_outgoing_t *orq,
+static void outgoing_print_tport_error(nta_outgoing_t *orq,
int level, char *todo,
tp_name_t const *, msg_t *, int error);
static void outgoing_insert(nta_agent_t *sa, nta_outgoing_t *orq);
static void outgoing_destroy(nta_outgoing_t *orq);
su_inline int outgoing_is_queued(nta_outgoing_t const *orq);
-su_inline void outgoing_queue(outgoing_queue_t *queue,
+su_inline void outgoing_queue(outgoing_queue_t *queue,
nta_outgoing_t *orq);
su_inline void outgoing_remove(nta_outgoing_t *orq);
su_inline void outgoing_set_timer(nta_outgoing_t *orq, uint32_t interval);
su_inline void outgoing_reset_timer(nta_outgoing_t *orq);
-static size_t outgoing_timer_dk(outgoing_queue_t *q,
- char const *timer,
+static size_t outgoing_timer_dk(outgoing_queue_t *q,
+ char const *timer,
uint32_t now);
-static size_t outgoing_timer_bf(outgoing_queue_t *q,
- char const *timer,
+static size_t outgoing_timer_bf(outgoing_queue_t *q,
+ char const *timer,
uint32_t now);
-static size_t outgoing_timer_c(outgoing_queue_t *q,
- char const *timer,
+static size_t outgoing_timer_c(outgoing_queue_t *q,
+ char const *timer,
uint32_t now);
static void outgoing_ack(nta_outgoing_t *orq, sip_t *sip);
@@ -6563,13 +6563,13 @@
static int outgoing_try_another(nta_outgoing_t *orq);
#else
#define outgoing_other_destinations(orq) (0)
-#define outgoing_try_another(orq) (0)
+#define outgoing_try_another(orq) (0)
#endif
/** Create a default outgoing transaction.
*
* The default outgoing transaction is used when agent receives responses
- * not belonging to any transaction.
+ * not belonging to any transaction.
*
* @sa nta_leg_default(), nta_incoming_default().
*/
@@ -6588,7 +6588,7 @@
orq = su_zalloc(agent->sa_home, sizeof *orq);
if (!orq)
return NULL;
-
+
orq->orq_agent = agent;
orq->orq_callback = callback;
orq->orq_magic = magic;
@@ -6637,7 +6637,7 @@
* NTATAG_STATELESS(), NTATAG_DELAY_SENDING(), NTATAG_BRANCH_KEY(),
* NTATAG_ACK_BRANCH(), NTATAG_DEFAULT_PROXY(), NTATAG_PASS_100(),
* NTATAG_USE_TIMESTAMP(), NTATAG_USER_VIA(), TPTAG_IDENT(), NTATAG_TPORT(). All
- * SIP tags from <sofia-sip/sip_tag.h> can be used to manipulate the request message.
+ * SIP tags from <sofia-sip/sip_tag.h> can be used to manipulate the request message.
* SIP tags after SIPTAG_END() are ignored, however.
*/
nta_outgoing_t *nta_outgoing_tcreate(nta_leg_t *leg,
@@ -6710,7 +6710,7 @@
* Returns a pointer to newly created outgoing transaction object if
* successful, and NULL otherwise.
*
- * @note The caller is responsible for destroying the request message @a msg
+ * @note The caller is responsible for destroying the request message @a msg
* upon failure.
*
* @note If NTATAG_STATELESS(1) tag is given and the @a callback is NULL,
@@ -6725,7 +6725,7 @@
* NTATAG_STATELESS(), NTATAG_DELAY_SENDING(), NTATAG_BRANCH_KEY(),
* NTATAG_ACK_BRANCH(), NTATAG_DEFAULT_PROXY(), NTATAG_PASS_100(),
* NTATAG_USE_TIMESTAMP(), NTATAG_USER_VIA(), TPTAG_IDENT(), NTATAG_TPORT(). All
- * SIP tags from <sofia-sip/sip_tag.h> can be used to manipulate the request message.
+ * SIP tags from <sofia-sip/sip_tag.h> can be used to manipulate the request message.
* SIP tags after SIPTAG_END() are ignored, however.
*/
nta_outgoing_t *nta_outgoing_mcreate(nta_agent_t *agent,
@@ -6836,8 +6836,8 @@
ta_start(ta, tag, value);
- tl_gets(ta_args(ta),
- NTATAG_CANCEL_408_REF(cancel_408),
+ tl_gets(ta_args(ta),
+ NTATAG_CANCEL_408_REF(cancel_408),
NTATAG_CANCEL_2543_REF(cancel_2543),
TAG_END());
@@ -6848,7 +6848,7 @@
ta_end(ta);
- if ((cancel_2543 || cancel_408) &&
+ if ((cancel_2543 || cancel_408) &&
!orq->orq_stateless && !orq->orq_destroyed)
outgoing_reply(orq, SIP_487_REQUEST_CANCELLED, 1);
@@ -6880,7 +6880,7 @@
*
* @param orq outgoing client transaction
* @param callback callback function (may be NULL)
- * @param magic application context pointer
+ * @param magic application context pointer
* (given as argument to @a callback)
*
* @NEW_1_12_9
@@ -6912,7 +6912,7 @@
return;
if (orq->orq_destroyed) {
- SU_DEBUG_1(("%s(%p): %s\n", "nta_outgoing_destroy", (void *)orq,
+ SU_DEBUG_1(("%s(%p): %s\n", "nta_outgoing_destroy", (void *)orq,
"already destroyed"));
return;
}
@@ -6948,7 +6948,7 @@
*/
uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq)
{
- return orq != NULL && orq != NONE && orq->orq_cseq
+ return orq != NULL && orq != NONE && orq->orq_cseq
? orq->orq_cseq->cs_seq : 0;
}
@@ -6958,7 +6958,7 @@
int nta_outgoing_status(nta_outgoing_t const *orq)
{
/* Return 500 Internal server error for invalid handles. */
- return orq != NULL && orq != NONE ? orq->orq_status : 500;
+ return orq != NULL && orq != NONE ? orq->orq_status : 500;
}
/** Get the RTT delay measured using @Timestamp header. */
@@ -7028,7 +7028,7 @@
* @param route_url optional URL used to route transaction requests
* @param msg request message
* @param tpn (optional) transport name
- * @param msg request message to
+ * @param msg request message to
* @param tag, value, ... tagged arguments
*
* @return
@@ -7106,24 +7106,24 @@
/* tl_gets() is a bit too slow here... */
for (t = ta_args(ta); t; t = tl_next(t)) {
- tag_type_t tt = t->t_tag;
+ tag_type_t tt = t->t_tag;
- if (ntatag_stateless == tt)
- stateless = t->t_value != 0;
- else if (ntatag_delay_sending == tt)
- delay_sending = t->t_value != 0;
- else if (ntatag_branch_key == tt)
- branch = (void *)t->t_value;
- else if (ntatag_pass_100 == tt)
- pass_100 = t->t_value != 0;
- else if (ntatag_use_timestamp == tt)
- use_timestamp = t->t_value != 0;
- else if (ntatag_user_via == tt)
- user_via = t->t_value != 0;
- else if (ntatag_ack_branch == tt)
- ack_branch = (void *)t->t_value;
- else if (ntatag_default_proxy == tt)
- route_url = (void *)t->t_value;
+ if (ntatag_stateless == tt)
+ stateless = t->t_value != 0;
+ else if (ntatag_delay_sending == tt)
+ delay_sending = t->t_value != 0;
+ else if (ntatag_branch_key == tt)
+ branch = (void *)t->t_value;
+ else if (ntatag_pass_100 == tt)
+ pass_100 = t->t_value != 0;
+ else if (ntatag_use_timestamp == tt)
+ use_timestamp = t->t_value != 0;
+ else if (ntatag_user_via == tt)
+ user_via = t->t_value != 0;
+ else if (ntatag_ack_branch == tt)
+ ack_branch = (void *)t->t_value;
+ else if (ntatag_default_proxy == tt)
+ route_url = (void *)t->t_value;
else if (tptag_ident == tt)
tp_ident = (void *)t->t_value;
else if (ntatag_comp == tt)
@@ -7182,7 +7182,7 @@
invalid = nta_tpn_by_url(home, orq->orq_tpn, &scheme, &port, route_url);
if (override_tport) { /* Use transport protocol name from transport */
- if (strcmp(orq->orq_tpn->tpn_proto, "*") == 0)
+ if (strcmp(orq->orq_tpn->tpn_proto, "*") == 0)
orq->orq_tpn->tpn_proto = tport_name(override_tport)->tpn_proto;
}
@@ -7244,7 +7244,7 @@
orq->orq_branch = su_strdup(home, ack_branch);
else
orq->orq_branch = su_sprintf(home, "branch=%s", ack_branch);
- }
+ }
else if (!stateless && agent->sa_is_a_uas) {
/*
* ACK redirect further 2XX messages to it.
@@ -7252,14 +7252,14 @@
* Use orq_branch from INVITE, but put a different branch in topmost Via.
*/
nta_outgoing_t *invite = outgoing_find(agent, msg, sip, NULL);
-
+
if (invite) {
sip_t const *inv = sip_object(invite->orq_request);
orq->orq_branch = su_strdup(home, invite->orq_branch);
/* @RFC3261 section 13.2.2.4 -
- * The ACK MUST contain the same credentials as the INVITE.
+ * The ACK MUST contain the same credentials as the INVITE.
*/
if (!sip->sip_proxy_authorization && !sip->sip_authorization) {
if (inv->sip_proxy_authorization)
@@ -7297,7 +7297,7 @@
agent->sa_stats->as_client_tr++;
orq->orq_hash = NTA_HASH(sip->sip_call_id, sip->sip_cseq->cs_seq);
- if (orq->orq_user_tport)
+ if (orq->orq_user_tport)
outgoing_send_via(orq, override_tport);
else if (resolved)
outgoing_prepare_send(orq);
@@ -7306,14 +7306,14 @@
outgoing_resolve(orq);
#endif
- if (stateless &&
- orq->orq_status >= 200 &&
+ if (stateless &&
+ orq->orq_status >= 200 &&
callback == outgoing_default_cb) {
void *retval;
- if (orq->orq_status < 300)
+ if (orq->orq_status < 300)
retval = (void *)-1; /* NONE */
- else
+ else
retval = NULL, orq->orq_request = NULL;
outgoing_free(orq);
@@ -7365,7 +7365,7 @@
outgoing_reply(orq, 503, "No transport", 1);
}
}
-
+
/** Send request using given transport */
static void
outgoing_send_via(nta_outgoing_t *orq, tport_t *tp)
@@ -7471,7 +7471,7 @@
cc = orq->orq_cc, orq->orq_cc = NULL;
}
else {
- cc = agent_compression_compartment(agent, orq->orq_tport, tpn,
+ cc = agent_compression_compartment(agent, orq->orq_tport, tpn,
orq->orq_sigcomp_new);
}
@@ -7484,7 +7484,7 @@
orq->orq_pending = 0;
}
- tp = tport_tsend(orq->orq_tport, msg, tpn,
+ tp = tport_tsend(orq->orq_tport, msg, tpn,
tag, value,
IF_SIGCOMP_TPTAG_COMPARTMENT(cc)
TAG_NEXT(orq->orq_tags));
@@ -7542,7 +7542,7 @@
if (orq->orq_pending) {
assert(orq->orq_tport);
- tport_release(orq->orq_tport, orq->orq_pending,
+ tport_release(orq->orq_tport, orq->orq_pending,
orq->orq_request, NULL, orq, 0);
orq->orq_pending = 0;
}
@@ -7553,7 +7553,7 @@
}
if (orq->orq_method != sip_method_ack) {
- orq->orq_pending = tport_pend(tp, orq->orq_request,
+ orq->orq_pending = tport_pend(tp, orq->orq_request,
outgoing_tport_error, orq);
if (orq->orq_pending < 0)
orq->orq_pending = 0;
@@ -7636,7 +7636,7 @@
*tpn = *orq->orq_tpn;
tpn->tpn_proto = "udp";
orq->orq_try_udp_instead = 1;
-
+
tp = tport_by_name(orq->orq_agent->sa_tports, tpn);
if (tp && tp != orq->orq_tport) {
sip_t *sip = sip_object(orq->orq_request);
@@ -7663,14 +7663,14 @@
if (orq->orq_pending) {
assert(orq->orq_tport);
- tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
+ tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
NULL, orq, 0);
orq->orq_pending = 0;
}
if (error == EPIPE && orq->orq_retries++ == 0) {
/* XXX - we should retry only if the transport is not newly created */
- outgoing_print_tport_error(orq, 5, "retrying once after ",
+ outgoing_print_tport_error(orq, 5, "retrying once after ",
tpn, msg, error);
outgoing_send(orq, 1);
return;
@@ -7678,7 +7678,7 @@
else if (error == ECONNREFUSED && orq->orq_try_tcp_instead) {
/* RFC3261, 18.1.1 */
if (strcasecmp(tpn->tpn_proto, "tcp") == 0 && msg_size(msg) <= 65535) {
- outgoing_print_tport_error(orq, 5, "retrying with UDP after ",
+ outgoing_print_tport_error(orq, 5, "retrying with UDP after ",
tpn, msg, error);
outgoing_try_udp_instead(orq);
outgoing_remove(orq); /* Reset state - this is no resend! */
@@ -7688,7 +7688,7 @@
}
if (outgoing_other_destinations(orq)) {
- outgoing_print_tport_error(orq, 5, "trying alternative server after ",
+ outgoing_print_tport_error(orq, 5, "trying alternative server after ",
tpn, msg, error);
outgoing_try_another(orq);
return;
@@ -7707,11 +7707,11 @@
su_sockaddr_t const *su = msg_addr(msg);
char addr[SU_ADDRSIZE];
- su_llog(nta_log, level,
+ su_llog(nta_log, level,
"nta: %s (%u): %s%s (%u) with %s/[%s]:%u\n",
orq->orq_method_name, orq->orq_cseq->cs_seq,
- todo, su_strerror(error), error,
- tpn->tpn_proto,
+ todo, su_strerror(error), error,
+ tpn->tpn_proto,
su_inet_ntop(su->su_family, SU_ADDR(su), addr, sizeof(addr)),
htons(su->su_port));
}
@@ -7791,8 +7791,8 @@
/** Change the timeout value of a queue */
static void
-outgoing_queue_adjust(nta_agent_t *sa,
- outgoing_queue_t *queue,
+outgoing_queue_adjust(nta_agent_t *sa,
+ outgoing_queue_t *queue,
unsigned timeout)
{
nta_outgoing_t *orq;
@@ -7822,13 +7822,13 @@
}
/** @internal
- * Insert an outgoing transaction into a queue.
+ * Insert an outgoing transaction into a queue.
*
* Insert a client transaction into a queue and set the corresponding
* timeout at the same time.
*/
su_inline
-void outgoing_queue(outgoing_queue_t *queue,
+void outgoing_queue(outgoing_queue_t *queue,
nta_outgoing_t *orq)
{
if (orq->orq_queue == queue) {
@@ -7845,7 +7845,7 @@
orq->orq_timeout = set_timeout(orq->orq_agent, queue->q_timeout);
orq->orq_queue = queue;
- orq->orq_prev = queue->q_tail;
+ orq->orq_prev = queue->q_tail;
*queue->q_tail = orq;
queue->q_tail = &orq->orq_next;
queue->q_length++;
@@ -7880,7 +7880,7 @@
void outgoing_set_timer(nta_outgoing_t *orq, uint32_t interval)
{
nta_outgoing_t **rq;
-
+
assert(orq);
if (interval == 0) {
@@ -7890,7 +7890,7 @@
if (orq->orq_rprev) {
/* Remove transaction from retry dequeue, re-insert it later. */
- if ((*orq->orq_rprev = orq->orq_rnext))
+ if ((*orq->orq_rprev = orq->orq_rnext))
orq->orq_rnext->orq_rprev = orq->orq_rprev;
if (orq->orq_agent->sa_out.re_t1 == &orq->orq_rnext)
orq->orq_agent->sa_out.re_t1 = orq->orq_rprev;
@@ -7923,12 +7923,12 @@
void outgoing_reset_timer(nta_outgoing_t *orq)
{
if (orq->orq_rprev) {
- if ((*orq->orq_rprev = orq->orq_rnext))
+ if ((*orq->orq_rprev = orq->orq_rnext))
orq->orq_rnext->orq_rprev = orq->orq_rprev;
if (orq->orq_agent->sa_out.re_t1 == &orq->orq_rnext)
orq->orq_agent->sa_out.re_t1 = orq->orq_rprev;
orq->orq_agent->sa_out.re_length--;
- }
+ }
orq->orq_interval = 0, orq->orq_retry = 0;
orq->orq_rnext = NULL, orq->orq_rprev = NULL;
@@ -7963,7 +7963,7 @@
outgoing_reset_timer(orq);
if (orq->orq_pending) {
- tport_release(orq->orq_tport, orq->orq_pending,
+ tport_release(orq->orq_tport, orq->orq_pending,
orq->orq_request, NULL, orq, 0);
}
orq->orq_pending = 0;
@@ -7989,12 +7989,12 @@
#if HAVE_SOFIA_SRESOLV
if (orq->orq_resolver)
outgoing_destroy_resolver(orq);
-#endif
+#endif
su_free(orq->orq_agent->sa_home, orq);
}
/** Queue request to be freed */
-su_inline
+su_inline
void outgoing_free_queue(outgoing_queue_t *q, nta_outgoing_t *orq)
{
outgoing_cut_off(orq);
@@ -8002,7 +8002,7 @@
}
/** Reclaim memory used by queue of requests */
-static
+static
void outgoing_reclaim_queued(su_root_magic_t *rm,
su_msg_r msg,
union sm_arg_u *u)
@@ -8050,7 +8050,7 @@
}
}
-/** @internal Outgoing transaction timer routine.
+/** @internal Outgoing transaction timer routine.
*
*/
static void outgoing_timer(nta_agent_t *sa)
@@ -8061,9 +8061,9 @@
size_t retransmitted = 0, terminated = 0, timeout = 0, destroyed;
size_t total = sa->sa_outgoing->oht_used;
size_t trying = sa->sa_out.re_length;
- size_t pending = sa->sa_out.trying->q_length +
+ size_t pending = sa->sa_out.trying->q_length +
sa->sa_out.inv_calling->q_length;
- size_t completed = sa->sa_out.completed->q_length +
+ size_t completed = sa->sa_out.completed->q_length +
sa->sa_out.inv_completed->q_length;
outgoing_queue_init(sa->sa_out.free = rq, 0);
@@ -8082,7 +8082,7 @@
* Timer N3: try to use UDP if trying to send via TCP
* but no connection is established within SIP T4
*/
- SU_DEBUG_5(("nta: timer %s fired, %s %s (%u)\n", "N3",
+ SU_DEBUG_5(("nta: timer %s fired, %s %s (%u)\n", "N3",
"try UDP instead", orq->orq_method_name, orq->orq_cseq->cs_seq));
outgoing_try_udp_instead(orq);
}
@@ -8128,7 +8128,7 @@
MOD_ZU"/"MOD_ZU" free\n",
retransmitted, trying,
timeout, pending,
- terminated, completed,
+ terminated, completed,
destroyed, total));
}
}
@@ -8163,8 +8163,8 @@
/** Handle timers B and F */
static
-size_t outgoing_timer_bf(outgoing_queue_t *q,
- char const *timer,
+size_t outgoing_timer_bf(outgoing_queue_t *q,
+ char const *timer,
uint32_t now)
{
nta_outgoing_t *orq;
@@ -8176,9 +8176,9 @@
break;
timeout++;
-
+
SU_DEBUG_5(("nta: timer %s fired, %s %s (%u)\n",
- timer,
+ timer,
orq->orq_method != sip_method_ack ? "timeout" : "terminating",
orq->orq_method_name, orq->orq_cseq->cs_seq));
@@ -8195,8 +8195,8 @@
/** Handle timer C */
static
-size_t outgoing_timer_c(outgoing_queue_t *q,
- char const *timer,
+size_t outgoing_timer_c(outgoing_queue_t *q,
+ char const *timer,
uint32_t now)
{
nta_outgoing_t *orq;
@@ -8210,9 +8210,9 @@
break;
timeout++;
-
+
SU_DEBUG_5(("nta: timer %s fired, %s %s (%u)\n",
- timer, "CANCEL and timeout",
+ timer, "CANCEL and timeout",
orq->orq_method_name, orq->orq_cseq->cs_seq));
nta_outgoing_tcancel(orq, NULL, NULL, TAG_NULL());
@@ -8246,7 +8246,7 @@
outgoing_timeout(cancel, now);
}
-/** Complete a client transaction.
+/** Complete a client transaction.
*
* @return True if transaction was free()d.
*/
@@ -8273,8 +8273,8 @@
/** Handle timers D and K */
static
-size_t outgoing_timer_dk(outgoing_queue_t *q,
- char const *timer,
+size_t outgoing_timer_dk(outgoing_queue_t *q,
+ char const *timer,
uint32_t now)
{
nta_outgoing_t *orq;
@@ -8292,7 +8292,7 @@
outgoing_terminate(orq);
}
-
+
return terminated;
}
@@ -8336,10 +8336,10 @@
if (su_msg_send(m) == SU_SUCCESS)
q->q_length = 0;
- }
+ }
}
-
- if (q->q_length)
+
+ if (q->q_length)
outgoing_reclaim_queued(NULL, NULL, (void*)q);
return destroyed;
@@ -8349,7 +8349,7 @@
*
* Return an outgoing request object based on a message and the @Via line
* given as argument. This function is used when doing loop checking: if we
- * have sent the request and it has been routed back to us.
+ * have sent the request and it has been routed back to us.
*
* @param agent
* @param msg
@@ -8474,7 +8474,7 @@
else
outgoing_reply(cancel, SIP_481_NO_TRANSACTION, 0);
- if (status < 300 && orq->orq_destroyed &&
+ if (status < 300 && orq->orq_destroyed &&
orq->orq_method == sip_method_invite) {
outgoing_terminate(orq); /* We can now kill transaction */
if (status == 100) {
@@ -8486,7 +8486,7 @@
}
if (orq->orq_pending) {
- tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
+ tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
msg, orq, status < 200);
if (status >= 200)
orq->orq_pending = 0;
@@ -8561,16 +8561,16 @@
if (status < 200) {
/* @RFC3261 17.1.2.1:
- * retransmissions continue for unreliable transports,
- * but at an interval of T2
+ * retransmissions continue for unreliable transports,
+ * but at an interval of T2
*/
if (!orq->orq_reliable)
outgoing_set_timer(orq, sa->sa_t2);
- }
+ }
else if (!outgoing_complete(orq)) {
if (orq->orq_sigcomp_zap && orq->orq_tport && orq->orq_cc)
agent_zap_compressor(orq->orq_agent, orq->orq_cc);
- }
+ }
else /* outgoing_complete */ {
msg_destroy(msg);
return 0;
@@ -8772,7 +8772,7 @@
if (tags) {
sip_add_tl(msg, sip, TAG_NEXT(tags));
/* Bug sf.net # 173323:
- * Ensure that request-URI, topmost Via, From, To, Call-ID, CSeq,
+ * Ensure that request-URI, topmost Via, From, To, Call-ID, CSeq,
* Max-Forward, Route, Accept-Contact, Reject-Contact and
* Request-Disposition are copied from original request
*/
@@ -8846,7 +8846,7 @@
assert(status == 202 || status >= 400);
if (orq->orq_pending)
- tport_release(orq->orq_tport, orq->orq_pending,
+ tport_release(orq->orq_tport, orq->orq_pending,
orq->orq_request, NULL, orq, 0);
orq->orq_pending = 0;
@@ -8861,7 +8861,7 @@
outgoing_trying(orq); /* Timer F */
return 0;
}
-
+
if (orq->orq_destroyed) {
if (orq->orq_status < 200)
orq->orq_status = status;
@@ -8873,7 +8873,7 @@
;
else if (orq->orq_queue == NULL ||
orq->orq_queue == orq->orq_agent->sa_out.resolving ||
- orq->orq_queue == orq->orq_agent->sa_out.delayed)
+ orq->orq_queue == orq->orq_agent->sa_out.delayed)
outgoing_trying(orq);
/** Insert a dummy Via header */
@@ -8886,7 +8886,7 @@
if (!orq->orq_stateless &&
!(orq->orq_callback == outgoing_default_cb) &&
!(status == 408 &&
- orq->orq_method != sip_method_invite &&
+ orq->orq_method != sip_method_invite &&
!orq->orq_agent->sa_timeout_408)) {
char const *to_tag;
@@ -8895,7 +8895,7 @@
if (complete_response(msg, status, phrase, orq->orq_request) < 0) {
assert(!"complete message");
return -1;
- }
+ }
sip = sip_object(msg); assert(sip->sip_flags & NTA_INTERNAL_MSG);
to_tag = nta_agent_newtag(msg_home(msg), "tag=%s", agent);
@@ -9010,8 +9010,8 @@
uint16_t sr_a_aaaa1, sr_a_aaaa2; /**< Order of A and/or AAAA queries. */
- unsigned
- sr_use_naptr:1,
+ unsigned
+ sr_use_naptr:1,
sr_use_srv:1,
sr_use_a_aaaa:1;
};
@@ -9033,7 +9033,7 @@
static int outgoing_resolve_next(nta_outgoing_t *orq);
static int outgoing_resolving(nta_outgoing_t *orq);
-static int outgoing_resolving_error(nta_outgoing_t *,
+static int outgoing_resolving_error(nta_outgoing_t *,
int status, char const *phrase);
static void outgoing_graylist(nta_outgoing_t *orq, struct sipdns_query *sq);
static int outgoing_query_naptr(nta_outgoing_t *orq, char const *domain);
@@ -9080,7 +9080,7 @@
if (!sr) {
outgoing_resolving_error(orq, SIP_500_INTERNAL_SERVER_ERROR);
return;
- }
+ }
*sr->sr_tpn = *orq->orq_tpn;
sr->sr_use_srv = orq->orq_agent->sa_use_srv;
@@ -9097,7 +9097,7 @@
an attempt should fail, based on the definition of failure in Section
4.3, the next SHOULD be tried, and if that should fail, the next
SHOULD be tried, and so on.
-
+
This is a change from RFC 2543. Previously, if the port was
explicit, but with a value of 5060, SRV records were used. Now, A
or AAAA records will be used.
@@ -9130,7 +9130,7 @@
if (strcasecmp(tpn->tpn_proto, sipdns_tports[j].name) == 0)
break;
- assert(j < SIPDNS_TRANSPORTS);
+ assert(j < SIPDNS_TRANSPORTS);
if (j == SIPDNS_TRANSPORTS)
/* Someone added transport but did not update sipdns_tports */
continue;
@@ -9142,7 +9142,7 @@
sr->sr_tports[i] = sipdns_tports + j;
if (strcmp(tpname, "*")) /* Looking for only one transport */
- break;
+ break;
}
/* Nothing found */
@@ -9168,7 +9168,7 @@
case nta_res_ip4_only:
sr->sr_a_aaaa1 = sres_type_a, sr->sr_a_aaaa2 = sres_type_a;
break;
- }
+ }
outgoing_resolve_next(orq);
}
@@ -9219,7 +9219,7 @@
outgoing_make_a_aaaa_query(orq); /* A/AAAA */
else
return outgoing_resolving_error(orq, SIPDNS_503_ERROR);
-
+
return 1;
}
@@ -9232,7 +9232,7 @@
if (!sr)
return 0;
- if (sr->sr_use_a_aaaa || sr->sr_use_srv || sr->sr_use_naptr)
+ if (sr->sr_use_a_aaaa || sr->sr_use_srv || sr->sr_use_naptr)
return 1;
if (sr->sr_results && sr->sr_results[1])
@@ -9264,7 +9264,7 @@
else if (orq->orq_agent->sa_graylist == 0)
/* PP: priority hacking disabled */
;
- /* NetModule hack:
+ /* NetModule hack:
* Move server that did not work to end of queue in sres cache
*
* the next request does not try to use the server that is currently down
@@ -9296,18 +9296,18 @@
/* Don't know how to graylist but SRV records */
if (sq->sq_otype != sres_type_srv)
- return;
+ return;
SU_DEBUG_5(("nta: graylisting %s:%s;transport=%s\n", target, sq->sq_port, proto));
- for (sq = sr->sr_head; sq; sq = sq->sq_next)
+ for (sq = sr->sr_head; sq; sq = sq->sq_next)
if (sq->sq_otype == sres_type_srv && sq->sq_priority > maxprio)
maxprio = sq->sq_priority;
for (sq = sr->sr_done; sq; sq = sq->sq_next)
if (sq->sq_otype == sres_type_srv && sq->sq_priority > maxprio)
maxprio = sq->sq_priority;
-
+
for (sq = sr->sr_done; sq; sq = sq->sq_next) {
int modified;
@@ -9316,8 +9316,8 @@
/* modify the SRV record(s) corresponding to the latest A/AAAA record */
modified = sres_set_cached_srv_priority(
- orq->orq_agent->sa_resolver,
- sq->sq_domain,
+ orq->orq_agent->sa_resolver,
+ sq->sq_domain,
target,
sq->sq_port[0] ? (uint16_t)strtoul(sq->sq_port, NULL, 10) : 0,
orq->orq_agent->sa_graylist,
@@ -9335,7 +9335,7 @@
su_inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
{
struct sipdns_resolver *sr = orq->orq_resolver;
-
+
assert(orq->orq_resolver);
if (sr->sr_query) /* Cancel resolver query */
@@ -9362,12 +9362,12 @@
int outgoing_resolving(nta_outgoing_t *orq)
{
struct sipdns_resolver *sr = orq->orq_resolver;
-
+
assert(orq->orq_resolver);
if (!sr->sr_query) {
return outgoing_resolving_error(orq, SIPDNS_503_ERROR);
- }
+ }
else {
outgoing_queue(orq->orq_agent->sa_out.resolving, orq);
return 0;
@@ -9375,8 +9375,8 @@
}
/** Return 503 response */
-static
-int outgoing_resolving_error(nta_outgoing_t *orq, int status, char const *phrase)
+static
+int outgoing_resolving_error(nta_outgoing_t *orq, int status, char const *phrase)
{
orq->orq_resolved = 1;
outgoing_reply(orq, status, phrase, 0);
@@ -9390,10 +9390,10 @@
struct sipdns_resolver *sr = orq->orq_resolver;
su_home_t *home = msg_home(orq->orq_request);
struct sipdns_query *sq;
- char const *host;
+ char const *host;
int i;
size_t hlen;
-
+
sr->sr_use_srv = 0;
host = sr->sr_tpn->tpn_host;
@@ -9553,19 +9553,19 @@
break;
/* Check if NAPTR matches our target */
- if (strncasecmp(na->na_services, "SIP+", 4) &&
+ if (strncasecmp(na->na_services, "SIP+", 4) &&
strncasecmp(na->na_services, "SIPS+", 5))
/* Not a SIP/SIPS service */
continue;
/* Use NAPTR results, don't try extra SRV/A/AAAA records */
- sr->sr_use_srv = 0, sr->sr_use_a_aaaa = 0;
-
+ sr->sr_use_srv = 0, sr->sr_use_a_aaaa = 0;
+
/* Check if we have a transport mathing with service */
for (j = 0; sr->sr_tports[j]; j++) {
/*
- * Syntax of services is actually more complicated
- * but comparing the values in the transport list
+ * Syntax of services is actually more complicated
+ * but comparing the values in the transport list
* match with those values that make any sense
*/
if (strcasecmp(na->na_services, sr->sr_tports[j]->service) != 0)
@@ -9587,7 +9587,7 @@
if (!sr->sr_tports[j])
continue;
- /* OK, we found matching NAPTR */
+ /* OK, we found matching NAPTR */
order = na->na_order;
/*
@@ -9608,7 +9608,7 @@
if (sq == NULL)
continue;
- *tail = sq, tail = &sq->sq_next;
+ *tail = sq, tail = &sq->sq_next;
sq->sq_otype = sres_type_naptr;
sq->sq_priority = na->na_prefer;
sq->sq_weight = j;
@@ -9619,7 +9619,7 @@
sres_free_answers(orq->orq_agent->sa_resolver, answers);
- /* RFC2915:
+ /* RFC2915:
Preference [...] specifies the order in which NAPTR
records with equal "order" values SHOULD be processed, low
numbers being processed before high numbers. */
@@ -9646,7 +9646,7 @@
/* Query SRV records */
static
-int outgoing_query_srv(nta_outgoing_t *orq,
+int outgoing_query_srv(nta_outgoing_t *orq,
struct sipdns_query *sq)
{
struct sipdns_resolver *sr = orq->orq_resolver;
@@ -9689,7 +9689,7 @@
sr->sr_query = NULL;
- sq0 = sr->sr_current;
+ sq0 = sr->sr_current;
assert(sq0 && sq0->sq_type == sres_type_srv);
assert(sq0->sq_domain); assert(sq0->sq_proto);
@@ -9761,8 +9761,8 @@
}
/* This is not needed anymore (?) */
- sr->sr_current = NULL;
- sq0->sq_next = sr->sr_done; sr->sr_done = sq0;
+ sr->sr_current = NULL;
+ sq0->sq_next = sr->sr_done; sr->sr_done = sq0;
outgoing_resolve_next(orq);
}
@@ -9782,7 +9782,7 @@
sres_type_aaaa, sq->sq_domain);
SU_DEBUG_5(("nta: for \"%s\" query \"%s\" %s%s\n",
- orq->orq_tpn->tpn_host, sq->sq_domain, "AAAA",
+ orq->orq_tpn->tpn_host, sq->sq_domain, "AAAA",
answers ? " (cached)" : ""));
if (answers) {
@@ -9836,7 +9836,7 @@
su_inet_ntop(AF_INET6, &aaaa->aaaa_addr, addr, sizeof(addr));
if (j == 0)
- SU_DEBUG_5(("nta(%p): %s IN AAAA %s\n", (void *)orq,
+ SU_DEBUG_5(("nta(%p): %s IN AAAA %s\n", (void *)orq,
aaaa->aaaa_record->r_name, addr));
else
SU_DEBUG_5(("nta(%p): AAAA %s\n", (void *)orq, addr));
@@ -9949,11 +9949,11 @@
sq->sq_domain, sq->sq_type == sres_type_a ? "A" : "AAAA"));
/*
- * Three possible policies:
+ * Three possible policies:
* 1) try each host for AAAA/A, then A/AAAA
* 2) try everything first for AAAA/A, then everything for A/AAAA
* 3) try one SRV record results for AAAA/A, then for A/AAAA,
- * then next SRV record
+ * then next SRV record
*/
/* We use now policy #1 */
@@ -9968,7 +9968,7 @@
outgoing_graylist(orq, sq);
}
- if (rlen > 1)
+ if (rlen > 1)
sr->sr_results = results;
else
sr->sr_current = NULL;
@@ -10047,7 +10047,7 @@
ta_start(ta, tag, value);
- if (0 > nta_incoming_complete_response(irq, msg, status, phrase,
+ if (0 > nta_incoming_complete_response(irq, msg, status, phrase,
ta_tags(ta)))
msg_destroy(msg);
else if (!(retval = reliable_mreply(irq, callback, rmagic, msg, sip)))
@@ -10060,7 +10060,7 @@
/** Respond reliably with @a msg.
*
- * @note
+ * @note
* The stack takes over the ownership of @a msg. (It is destroyed even if
* sending the response fails.)
*
@@ -10105,7 +10105,7 @@
nta_agent_t *agent;
agent = irq->irq_agent;
-
+
if (callback == NULL)
callback = nta_reliable_destroyed;
@@ -10176,7 +10176,7 @@
incoming_queue(sa->sa_in.preliminary, irq); /* P1 */
incoming_set_timer(irq, sa->sa_t1); /* P2 */
-
+
return 0;
}
@@ -10260,7 +10260,7 @@
/* Found matching INVITE */
for (rel = irq->irq_reliable; rel; rel = rel->rel_next)
- if (rel->rel_rseq == rack->ra_response)
+ if (rel->rel_rseq == rack->ra_response)
return (nta_reliable_t *)rel;
return NULL;
@@ -10311,7 +10311,7 @@
}
nta_incoming_treply(pr_irq, status, "OK", TAG_END());
nta_incoming_destroy(pr_irq);
- }
+ }
/* If there are queued unsent reliable responses, send them all. */
while (irq->irq_reliable && irq->irq_reliable->rel_rseq == 0) {
@@ -10327,7 +10327,7 @@
if (reliable_send(irq, rel, msg_ref_create(msg), sip) < 0) {
assert(!"send reliable response");
}
- }
+ }
else {
/*
* XXX
@@ -10388,8 +10388,8 @@
* process incoming PRACK requests
*/
int nta_reliable_leg_prack(nta_reliable_magic_t *magic,
- nta_reliable_t *rel,
- nta_incoming_t *irq,
+ nta_reliable_t *rel,
+ nta_incoming_t *irq,
sip_t const *sip)
{
nta_agent_t *agent;
@@ -10398,7 +10398,7 @@
url_t url[1];
int retval;
- if (irq == NULL || sip == NULL || rel == NULL ||
+ if (irq == NULL || sip == NULL || rel == NULL ||
sip_object(irq->irq_request) != sip)
return 500;
@@ -10407,14 +10407,14 @@
*url = *sip->sip_request->rq_url; url->url_params = NULL;
agent_aliases(agent, url, irq->irq_tport); /* canonize urls */
- if ((leg = leg_find(irq->irq_agent,
- method_name, url,
+ if ((leg = leg_find(irq->irq_agent,
+ method_name, url,
sip->sip_call_id,
- sip->sip_from->a_tag,
+ sip->sip_from->a_tag,
sip->sip_to->a_tag))) {
/* Use existing dialog */
SU_DEBUG_5(("nta: %s (%u) %s\n",
- method_name, sip->sip_cseq->cs_seq,
+ method_name, sip->sip_cseq->cs_seq,
"PRACK processed by default callback, too"));
retval = leg->leg_callback(leg->leg_magic, leg, irq, sip);
}
@@ -10578,9 +10578,9 @@
tagged->orq_response = msg_ref_create(orq->orq_response);
tagged->orq_cancel = NULL;
- tagged->orq_pending = tport_pend(orq->orq_tport,
- orq->orq_request,
- outgoing_tport_error,
+ tagged->orq_pending = tport_pend(orq->orq_tport,
+ orq->orq_request,
+ outgoing_tport_error,
tagged);
if (tagged->orq_pending < 0)
tagged->orq_pending = 0;
@@ -10654,7 +10654,7 @@
__func__, resp->sip_status->st_status));
return NULL;
}
-
+
if (!resp->sip_rseq) {
SU_DEBUG_1(("%s: %u response missing RSeq\n",
__func__, resp->sip_status->st_status));
@@ -10706,7 +10706,7 @@
sip_route_init(r0)->r_url[0] = resp->sip_contact->m_url[0];
route = sip_route_dup(home, r0);
}
-
+
/* Reverse record route */
if (resp->sip_record_route) {
sip_route_t *r, *r_next;
@@ -10740,7 +10740,7 @@
;
else if (route && sip_add_dup(msg, sip, (sip_header_t *)route) < 0)
;
- else if (!sip->sip_rack)
+ else if (!sip->sip_rack)
SU_DEBUG_1(("%s: RAck header missing\n", __func__));
else if (nta_msg_request_complete(msg, leg,
SIP_METHOD_PRACK,
@@ -10768,7 +10768,7 @@
return orq ? orq->orq_rseq : 0;
}
-/** Set @RSeq value stored with client transaction.
+/** Set @RSeq value stored with client transaction.
*
* @return 0 if rseq was set successfully
* @return -1 if rseq is invalid or orq is NULL.
@@ -10776,7 +10776,7 @@
int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq)
{
if (orq && orq->orq_rseq <= rseq) {
- orq->orq_rseq = rseq;
+ orq->orq_rseq = rseq;
return 0;
}
@@ -10841,7 +10841,7 @@
struct sigcomp_compartment *
nta_incoming_compartment(nta_incoming_t *irq)
{
- if (nta_compressor_vtable && irq && irq->irq_cc)
+ if (nta_compressor_vtable && irq && irq->irq_cc)
return nta_compressor_vtable->ncv_compartment_ref(irq->irq_cc);
else
return NULL;
@@ -10860,7 +10860,7 @@
struct sigcomp_compartment *
nta_outgoing_compartment(nta_outgoing_t *orq)
{
- if (nta_compressor_vtable && orq && orq->orq_cc)
+ if (nta_compressor_vtable && orq && orq->orq_cc)
return nta_compressor_vtable->ncv_compartment_ref(orq->orq_cc);
else
return NULL;
@@ -10879,7 +10879,7 @@
void
nta_compartment_decref(struct sigcomp_compartment **pcc)
{
- if (nta_compressor_vtable && pcc && *pcc)
+ if (nta_compressor_vtable && pcc && *pcc)
nta_compressor_vtable->ncv_compartment_unref(*pcc), *pcc = NULL;
}
@@ -10887,7 +10887,7 @@
/** Get compartment for connection, create it when needed. */
static
struct sigcomp_compartment *
-agent_compression_compartment(nta_agent_t *sa,
+agent_compression_compartment(nta_agent_t *sa,
tport_t *tp,
tp_name_t const *tpn,
int new_if_needed)
@@ -10979,24 +10979,24 @@
for (i = oht->oht_size; i-- > 0;)
/* while */ if (oht->oht_table[i]) {
nta_outgoing_t *orq = oht->oht_table[i];
-
+
if (orq->orq_pending && orq->orq_tport)
- tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
+ tport_release(orq->orq_tport, orq->orq_pending, orq->orq_request,
NULL, orq, 0);
-
+
orq->orq_pending = 0;
tport_unref(orq->orq_tport), orq->orq_tport = NULL;
}
-
-
+
+
for (i = iht->iht_size; i-- > 0;)
/* while */ if (iht->iht_table[i]) {
nta_incoming_t *irq = iht->iht_table[i];
tport_unref(irq->irq_tport), irq->irq_tport = NULL;
- }
-
+ }
+
tport_destroy(agent->sa_tports), agent->sa_tports = NULL;
-
+
msg_header_free(agent->sa_home, (void *)agent->sa_vias);
agent->sa_vias = NULL;
msg_header_free(agent->sa_home, (void *)agent->sa_public_vias);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.docs Tue Dec 16 13:05:22 2008
@@ -17,28 +17,28 @@
* @LICENSE LGPL
*
* @section nta_objects NTA Objects
- *
+ *
* The NTA deals with a few kinds of objects: @e agent (#nta_agent_t), @e
* call @e legs (#nta_leg_t), @e outgoing @e client @e requests
* (#nta_outgoing_t), and @e incoming @e server @e requests
* (#nta_incoming_t).
- *
+ *
* NTA also uses SIP message objects #msg_t and #sip_t for handling
* messages, as defined in <sofia-sip/msg.h> and <sofia-sip/sip.h>,
* respectively. The various SIP headers are also defined in
* <sofia-sip/sip.h>.
- *
+ *
* @section nta_agent_t Creating an NTA Agent
- *
+ *
* Most of the SIP entities, like @e user @e agent or @e proxy, consist of a
* SIP server and a SIP client working together. The NTA provides a simple
* interface to SIP server and client with the #nta_agent_t objects.
- *
+ *
* The #nta_agent_t object is created by calling nta_agent_create(). The
* object listens for incoming connections, receives messages, parses them,
* and pass them to the application. It also takes care of resolving the
* domain names and sending the messages.
- *
+ *
* The agent needs a #su_root_t object to schedule its execution. A root
* object is used to wait for the network events, schedule the timer
* routines, and pass messages asyncronously. A root object can be created
@@ -46,61 +46,61 @@
* own thread, or its main loop can be executed by an application thread by
* calling the function su_root_run(). The main loop can be terminated by
* calling the function su_root_break().
- *
+ *
* A simple agent could be created as follows:
* @code
* registrar->reg_root = su_root_create(NULL);
- *
+ *
* if (registrar->reg_root) {
* registrar->reg_agent = nta_agent_create(registrar->reg_root,
* (url_string_t*)argv[1],
* NULL,
* NULL,
* NULL);
- *
+ *
* if (registrar->reg_agent) {
* su_root_run(registrar->reg_root);
* nta_agent_destroy(registrar->reg_agent);
* }
- *
+ *
* su_root_destroy(registrar->reg_root);
* }
* @endcode
- *
+ *
* @section nta_server SIP Server Action
- *
+ *
* A SIP server responds to the transactions sent by a client. The SIP
* server can operate in two modes; it can be stateless or stateful. This
* section describes how a stateful SIP server uses NTA.
- *
+ *
* @subsection nta_leg_t The NTA Legs
- *
+ *
* A leg is required for stateful transaction processing. A default
* leg is created like this:
* @code
* default_leg = nta_leg_tcreate(agent, process_requests, context,
- * URLTAG_URL(url),
+ * URLTAG_URL(url),
* NTATAG_NO_DIALOG(1),
* TAG_END());
- * @endcode
- *
+ * @endcode
+ *
* The @a url parameter is used to specify which URLs match to the leg. If
* it is given, only requests with requestURI matching are processed by the
* leg. The nta_leg_tcreate() is a @ref tagarg "tagarg" function, taking a
* tagged argument list as its arguments.
- *
+ *
* Other, ordinary legs can be used to match incoming requests with existing
* dialogs, calls or transaction contexts, or to provide outgoing requests
* with consistent headers. When a call leg is created, it is provided with
* @From and @To headers, and optionally with other headers like
* @CallID, @Route, or @CSeq.
- *
+ *
* A new call leg can be created as follows:
* @code
* call_leg = nta_leg_tcreate(agent,
* process_call_requests, call_context,
* SIPTAG_CALL_ID(sip->sip_call_id),
- * SIPTAG_TO(sip->sip_from),
+ * SIPTAG_TO(sip->sip_from),
* SIPTAG_FROM(sip->sip_to),
* TAG_END());
* @endcode
@@ -112,9 +112,9 @@
* @note An existing leg can be used in any direction, however. If the leg
* was created for an incoming INVITE transaction, it is also possible to
* use the leg for an outgoing BYE transaction.
- *
+ *
* @subsection nta_leg_tag Tagging the Call Leg
- *
+ *
* All the SIP UAS elements are required to tag the @To header in their
* final responses. The function nta_leg_tag() adds a tag to the leg's local
* address. Local address is used as the @To header in the reply messages,
@@ -126,34 +126,34 @@
* if (!nta_leg_tag(leg, nta_incoming_tag(irq, NULL)))
* nta_incoming_treply(irq, SIP_500_INTERNAL_SERVER_ERROR, TAG_END());
* @endcode
- *
+ *
* @subsection nta_incoming_t Incoming Transactions
- *
+ *
* An incoming transaction object (nta_incoming_t) is created by NTA for
* each unique incoming request message. When NTA has created the incoming
- * transaction object, it invokes the callback function provided with
- * nta_leg_tcreate().
- *
+ * transaction object, it invokes the callback function provided with
+ * nta_leg_tcreate().
+ *
* The simplest way to reply to the request is to return a valid status code
* from the callback function. Valid status codes are in range of 100 to
* 699, inclusive. If no automatic response is desired, the callback
* function should return 0.
- *
+ *
* @note If the status code is final, the incoming transaction object will
* be destroyed immediately after the callback function returns. It can not
* be used afterwards.
- *
+ *
* @note It is not possible to respond with a 2xx status code to an incoming
* INVITE transaction by returning the status code from the callback.
- *
+ *
* Valid return values for callback function are as follows:
* @li 0, 100 .. 699 for requests other than INVITE, and
* @li 0, 100 .. 199, 300..699 for INVITE requests.
- *
+ *
* All other return codes are interpreted as 500, that is, a @e 500 @e
* Internal @e Server @e Error reply message is sent back to the client and
* the request is immediately destroyed.
- *
+ *
* The simple registrar/redirect server may have a incoming request callback
* as follows:
* @code
@@ -163,20 +163,20 @@
* sip_t const *sip)
* {
* sip_contact_t *m;
- *
+ *
* switch (sip->sip_request->rq_method) {
* case sip_method_register:
* return registrar_add(server, leg, reply, sip);
- *
+ *
* case sip_method_ack:
* return 500;
- *
+ *
* case sip_method_cancel:
* return 200;
- *
+ *
* default:
* if (registrar_find(server, sip->sip_request->rq_url, &m) {
- * nta_incoming_treply(irq, SIP_302_MOVED_TEMPORARILY,
+ * nta_incoming_treply(irq, SIP_302_MOVED_TEMPORARILY,
* SIPTAG_CONTACT(m), TAG_END());
* return 302;
* }
@@ -187,37 +187,37 @@
* }
* }
* @endcode
- *
+ *
* The default reply message will contain the status line with default
* phrase, then @Via, @To, @From, @CallID, @CSeq, and @ContentLength headers.
* If a more complex response message is required, the application should
- * respond using the function nta_incoming_treply():
+ * respond using the function nta_incoming_treply():
* @code
- * nta_incoming_treply(reply, SIP_200_OK,
+ * nta_incoming_treply(reply, SIP_200_OK,
* SIPTAG_CONTACT(contact),
* SIPTAG_CONTENT_TYPE_STR("application/sdp"),
* SIPTAG_PAYLOAD(sdp),
* TAG_END());
* @endcode
- *
+ *
* The nta_incoming_treply() is a @ref tagarg "tagarg" function, taking a
* tagged argument list as its argument.
- *
+ *
* @note It is possible to send provisional replies (containing 1xx status
* codes) several times with nta_incoming_treply(), but only one final
* reply (containing status codes 2xx..6xx) can be sent. However, with
* INVITE requests, a proxy can send a final 2xx reply even after an error
* reply (3xx..6xx).
- *
+ *
* @section nta_100rel Reliable Provisional Responses - "100rel"
- *
+ *
* The <A href="../specs/rfc3262.txt"><B>100rel</B></A> SIP extension
* provides reliable provisional responses, provisional responses that are
* retransmitted until a special acknowledgement request, PRACK, is
* received. In addition the PRACK method, the extension defines two
* headers, @RSeq and @RAck, that are used to identify different
* response messages. PRACK method is usable on INVITE requests only.
- *
+ *
* Using reliable responses is negotiated using the "100rel" option tag. The
* UAC (party sending the INVITE) can include the option tag to the
* @Supported or @Require header. In the first case, the UAC just
@@ -236,11 +236,11 @@
* functions nta_reliable_treply() or nta_reliable_mreply(). These functions
* return a pointer to a special object, nta_reliable_t, that is used to
* keep track of unacknowledged responses and respond to the the PRACK
- * acknowledgement request.
- *
+ * acknowledgement request.
+ *
* Both the functions nta_reliable_treply () and nta_reliable_mreply() take
* a callback funtion pointer and an application context pointer as their
- * arguments. The callback function is similar to the leg callback function.
+ * arguments. The callback function is similar to the leg callback function.
* The callback is invoked when a corresponding PRACK request is received,
* or when there is a timeout.
*
@@ -252,7 +252,7 @@
* nta_incoming_treply()/nta_incoming_mreply() functions, the @b nta creates
* a reliable response object for each provisional response in behalf of
* application. As the application can not provide a PRACK callback function
- * to @b nta, the PRACK requests are not delivered to the application.
+ * to @b nta, the PRACK requests are not delivered to the application.
*
* @subsection early_dialog UAC Receives a Reliable Response
*
@@ -261,7 +261,7 @@
* early @e dialog with the UAS. In another view, a reliable response is
* used to establish the early dialog. UAC establishes a leg object for the
* early dialog by calling nta_leg_tcreate() with the parameters derived
- * from the response message.
+ * from the response message.
*
* @code
* int invite_callback(call_t *call,
@@ -269,30 +269,30 @@
* sip_t const *sip)
* {
* int status = sip->sip_status->st_status;
- *
- * if (!call->has_dialog &&
+ *
+ * if (!call->has_dialog &&
* (status >= 200 || (status > 100 && sip->sip_rseq))) {
- * nta_leg_t *early =
+ * nta_leg_t *early =
* nta_leg_tcreate(call->nta_agent, mid_dialog_request, call,
* SIPTAG_TO(sip->sip_to),
* SIPTAG_FROM(sip->sip_from),
* SIPTAG_CALL_ID(sip->sip_call_id),
* SIPTAG_CSEQ(sip->sip_cseq),
* TAG_END());
- *
- * nta_leg_client_route(early,
+ *
+ * nta_leg_client_route(early,
* sip->sip_record_route,
* sip->sip_contact);
- *
+ *
* fork = call_fork(call, leg = early);
- *
+ *
* if (!fork) {
* handle error;
* }
* call = fork;
- * }
+ * }
* @endcode
- *
+ *
* The original dialog object and client transaction object are used to
* process other call forks. For instance, if the early dialog is
* established with an announcement server it will never lead to an fully
@@ -306,14 +306,14 @@
* transaction object by calling nta_outgoing_prack()
*
* @section nta_client SIP Client Action
- *
+ *
* A SIP client initiates the transactions. In some cases, a SIP client is
* also required to invoke additional transactions, like @b ACK or @b
* CANCEL, to finalize the original transaction. This section describes how
* a SIP client uses NTA to make transactions.
- *
+ *
* @subsection client_nta_leg_t Creating the Call Leg
- *
+ *
* If the client does not have a suitable call leg, it must create it by
* calling the function nta_leg_tcreate():
* @code
@@ -324,15 +324,15 @@
* SIPTAG_TO(to),
* TAG_END());
* @endcode
- *
+ *
* The @p callback function and @p context pointer are used for incoming
* transactions, and they may be @c NULL if no such transactions are
* expected. If the callback is @c NULL, NTA responds to incoming
* transactions with status @e 403 @e Forbidden.
- *
+ *
* The @a call_id may be @c NULL or left out. In that case, NTA generates a
* new call ID.
- *
+ *
* The @a from and @a to are used in outgoing transactions. They are also
* used to select which incoming messages belong to this leg.
*
@@ -341,11 +341,11 @@
*
* The additional parameters (after @a to) are included in outgoing messages
* using this leg. Currently, only @c SIPTAG_ROUTE() is supported.
- *
+ *
* @note Additional tagged parameters are ignored.
- *
+ *
* @subsection nta_outgoing_t Outgoing requests
- *
+ *
* The outgoing request is created and sent by nta_outgoing_tcreate(). It
* can be used as follows:
* @code
@@ -356,31 +356,31 @@
* SIPTAG_CONTACT(my_contact),
* TAG_END());
* @endcode
- *
+ *
* NTA invokes the callback function response_to_register() each time a
* provisional answer is received, and when a final answer is received.
- *
+ *
* @note There may be multiple final answers to the INVITE request.
- *
+ *
* If NTA does not receive answer in timely manner, it will generate a
- * @e 408 @e Timeout response and hand that back to the application.
- *
+ * @e 408 @e Timeout response and hand that back to the application.
+ *
* @note After a provisional answer to the INVITE request, no timeout will
* occur inside NTA. Application must itself timeout the INVITE
* transactions if any answer has been received.
- *
+ *
* The request can be destroyed with NTA function nta_outgoing_destroy().
* If no final answer has been received, the request is cancelled when it is
* destroyed, too. The application can also cancel the outgoing request by
* calling nta_outgoing_cancel().
- *
+ *
* @subsection nta_ack Acknowledging Answers to INVITE
- *
+ *
* The final answers to the INVITE request must be acknowledged. NTA takes
* care of acknowledging automatically the 3xx..6xx answers; the appliction
* must explicitly create a separate acknowledge transaction to final 2xx
- * answers.
- *
+ * answers.
+ *
* The final answer can be acknowledged like this:
* @code
* url = sip->sip_contact ? sip->sip_contact->m_url : original_url;
@@ -391,10 +391,10 @@
* SIPTAG_PAYLOAD(sdp),
* TAG_END());
* @endcode
- *
- * @note The ACK transaction should be sent to the @Contact specified in the
- * 2xx reply.
- *
+ *
+ * @note The ACK transaction should be sent to the @Contact specified in the
+ * 2xx reply.
+ *
* <a name="nta_register_f"></a>
* @section nta_stateless_callback Stateless Processing of SIP Messages
*
@@ -427,27 +427,27 @@
* parsed contents (@a sip) the callback function gets the
* application-specific context pointer (in this case, @a registrar) and a
* pointer to the NTA agent (@a agent) as its arguments:
- *
- * @code
+ *
+ * @code
* int process_message(nta_agent_context_t *registrar,
* nta_agent_t *agent,
* msg_t *msg,
* sip_t *sip);
* @endcode
- *
+ *
* The application has three functions that can be used to process the
* messages in stateless manner:
* @li nta_msg_discard() ignores and destroys the message,
* @li nta_msg_tsend() forwards a request or response message, and
* @li nta_msg_treply() replies to a request message in a stateless way.
- *
+ *
* Additionally, it is possible to process a request message statefully with
* nta_incoming_create().
*
* The functionality of the stateless callback function can vary greatly,
* depending the purpose of the application. An user-agent, a proxy or a
* registrar/redirect server each have very different callback functions.
- *
+ *
* A simple redirect server could have a message callback function as
* follows.
*
@@ -459,15 +459,15 @@
* {
* sip_contact_t *m;
* sip_unsupported_t *u;
- *
+ *
* @endcode
*
* The incoming response messages are simply ignored. The @b ACK requests can
* safely be discarded, too, because the redirect server keeps no state.
- *
+ *
* @code
* if (!sip->sip_request || sip->sip_request->rq_method == sip_method_ack) {
- * nta_msg_discard(agent, msg);
+ * nta_msg_discard(agent, msg);
* return 0;
* }
* @endcode
@@ -477,7 +477,7 @@
* @code
* u = sip_unsupported(msg_home(msg), sip->sip_require, r->r_supported);
* if (u) {
- * nta_msg_treply(agent, msg, SIP_420_BAD_EXTENSION,
+ * nta_msg_treply(agent, msg, SIP_420_BAD_EXTENSION,
* SIPTAG_SUPPORTED(r->r_supported),
* SIPTAG_UNSUPPORTED(u),
* TAG_END());
@@ -495,17 +495,17 @@
* }
* @endcode
*
- * All other requests are answered normally with a 302 response.
+ * All other requests are answered normally with a 302 response.
* The location service is
* searched for the request uri, and if a matching address was found, a
* list of active bindings is returned to the client.
* @code
* m = location_find(redirect, sip->sip_request->rq_url);
* if (m) {
- * nta_msg_treply(agent, msg, SIP_302_MOVED_TEMPORARILY,
+ * nta_msg_treply(agent, msg, SIP_302_MOVED_TEMPORARILY,
* SIPTAG_CONTACT(m),
* TAG_END());
- * }
+ * }
* @endcode
*
* Otherwise, @e 404 @e Not @e Found is sent:
@@ -513,22 +513,22 @@
* else {
* nta_msg_treply(agent, msg, SIP_404_NOT_FOUND, TAG_END());
* }
- *
+ *
* return 0;
* }
* @endcode
- *
+ *
*/
/**@page internal NTA Semantics and Internal Data Flows
- *
+ *
* NTA implements simple state machines at transaction level. The figure
* below illustrates how a message is processed by NTA.
- *
- * @image html nta-receiving-message.gif "NTA processing incoming messages."
- * @image latex nta-receiving-message.eps "NTA processing incoming messages."
- *
- *
+ *
+ * @image html nta-receiving-message.gif "NTA processing incoming messages."
+ * @image latex nta-receiving-message.eps "NTA processing incoming messages."
+ *
+ *
*/
int invite_callback(call_t *call,
@@ -538,9 +538,9 @@
int status = sip->sip_status->st_status;
nta_leg_t *leg = call->leg;
- if (!call->has_dialog &&
+ if (!call->has_dialog &&
(status >= 200 || (status > 100 && sip->sip_rseq))) {
- nta_leg_t *early =
+ nta_leg_t *early =
nta_leg_tcreate(call->nta_agent, mid_dialog_request, call,
SIPTAG_TO(sip->sip_to),
SIPTAG_FROM(sip->sip_from),
@@ -548,7 +548,7 @@
SIPTAG_CSEQ(sip->sip_cseq),
TAG_END());
- nta_leg_client_route(early,
+ nta_leg_client_route(early,
sip->sip_record_route,
sip->sip_contact);
@@ -558,16 +558,16 @@
handle error;
}
call = fork;
- }
-
+ }
+
if (status > 100 && status < 200 && sip->sip_rseq) {
- nta_outgoing_t *prack =
+ nta_outgoing_t *prack =
nta_outgoing_prack(leg, orq, NULL, NULL, NULL,
- sip,
+ sip,
TAG_END());
nta_outgoing_destroy(prack);
return 0;
}
-
+
...
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_internal.h Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
#ifndef NTA_INTERNAL_H
/** Defined when <nta_internal.h> has been included. */
-#define NTA_INTERNAL_H
+#define NTA_INTERNAL_H
/**@internal @file nta_internal.h
*
@@ -562,13 +562,13 @@
int ncv_size;
char const *ncv_name;
- nta_compressor_t *(*ncv_init_agent)(nta_agent_t *sa,
+ nta_compressor_t *(*ncv_init_agent)(nta_agent_t *sa,
char const * const *options);
void (*ncv_deinit_agent)(nta_agent_t *sa, nta_compressor_t *);
struct sigcomp_compartment *(*ncv_compartment)(nta_agent_t *sa,
- tport_t *tport,
+ tport_t *tport,
nta_compressor_t *msc,
tp_name_t const *tpn,
char const * const *options,
@@ -589,7 +589,7 @@
(struct sigcomp_compartment *);
void (*ncv_compartment_unref)(struct sigcomp_compartment *);
-
+
} nta_compressor_vtable_t;
extern nta_compressor_vtable_t *nta_compressor_vtable;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta_tag.c Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
/**@CFILE nta_tag.c
* @brief Tags for Nokia SIP Transaction API
*
- * @note This file is used to automatically generate
+ * @note This file is used to automatically generate
* nta_tag_ref.c and nta_tag_dll.c
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -51,7 +51,7 @@
/**@def NTATAG_MCLASS(x)
*
- * Message class used by NTA.
+ * Message class used by NTA.
*
* The nta can use a custom or extended parser created with
* msg_mclass_clone().
@@ -76,15 +76,15 @@
/**@def NTATAG_BAD_REQ_MASK(x)
*
- * Mask for bad request messages.
- *
+ * Mask for bad request messages.
+ *
* If an incoming request has erroneous headers matching with the mask, nta
- * automatically returns a 400 Bad Message response to them.
+ * automatically returns a 400 Bad Message response to them.
*
* If mask ~0U (all bits set) is specified, all requests with any bad header
* are dropped. By default only the requests with bad headers essential for
* request processing or proxying are dropped.
- *
+ *
* @par Used with
* nua_create(), nua_set_params(),
* nta_agent_create(), nta_agent_set_params()
@@ -104,22 +104,22 @@
* @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck,
* @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires,
* @MinSE, @SIPETag, and @SIPIfMatch.
- *
+ *
* @sa enum #sip_bad_mask, NTATAG_BAD_RESP_MASK()
*/
tag_typedef_t ntatag_bad_req_mask = UINTTAG_TYPEDEF(bad_req_mask);
/**@def NTATAG_BAD_RESP_MASK(x)
*
- * Mask for bad response messages.
- *
+ * Mask for bad response messages.
+ *
* If an incoming response has erroneous headers matching with the mask, nta
- * drops the response message.
+ * drops the response message.
*
* If mask ~0U (all bits set) is specified, all responses with any bad header
* are dropped. By default only the responses with bad headers essential for
* response processing or proxying are dropped.
- *
+ *
* @par Used with
* nua_create(), nua_set_params(),
* nta_agent_create(), nta_agent_set_params()
@@ -139,7 +139,7 @@
* - @ref sip_status \"status line\"", @From, @To, @CSeq, @CallID,
* @ContentLength, @Via, @ContentType, @ContentDisposition,
* @ContentEncoding, @Supported, @Contact, @Require, @RecordRoute, @RAck,
- * @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires,
+ * @RSeq, @Event, @Expires, @SubscriptionState, @SessionExpires,
* @MinSE, @SIPETag, and @SIPIfMatch.
*/
tag_typedef_t ntatag_bad_resp_mask = UINTTAG_TYPEDEF(bad_resp_mask);
@@ -183,9 +183,9 @@
*/
tag_typedef_t ntatag_target = SIPHDRTAG_NAMED_TYPEDEF(target, contact);
-/** @def NTATAG_ALIASES(x)
+/** @def NTATAG_ALIASES(x)
*
- * Aliases used by NTA.
+ * Aliases used by NTA.
* @deprecated
*/
tag_typedef_t ntatag_aliases = SIPHDRTAG_NAMED_TYPEDEF(aliases, contact);
@@ -208,7 +208,7 @@
*
* @par Default Value
* - None (i.e., all requests methods match with the leg)
- *
+ *
*/
tag_typedef_t ntatag_method = STRTAG_TYPEDEF(method);
@@ -230,7 +230,7 @@
* string
*
* @par Value
- * - The "branch" ID to to insert into topmost @Via header of the
+ * - The "branch" ID to to insert into topmost @Via header of the
* request to be sent
*
* @par Default Value
@@ -244,7 +244,7 @@
/**@def NTATAG_ACK_BRANCH(x)
*
- * Branch of the transaction to ACK.
+ * Branch of the transaction to ACK.
*
* When creating a ACK transaction, the application should provide the
* branch parameter from the original transaction to the stack. The ACK
@@ -269,7 +269,7 @@
/**@def NTATAG_COMP(x)
*
- * Compression algorithm.
+ * Compression algorithm.
*
* Set compression algorithm for request as described in @RFC3486.
*
@@ -302,7 +302,7 @@
/**@def NTATAG_MSG(x)
*
- * Pass a SIP message to treply()/tcreate() functions.
+ * Pass a SIP message to treply()/tcreate() functions.
*
* @par Used with
* nta_outgoing_tcreate(), nta_incoming_treply()
@@ -327,7 +327,7 @@
* or response message(s).
*
* @par Used with
- * nta_outgoing_tcreate(), nta_outgoing_mcreate(), nta_outgoing_tcancel(),
+ * nta_outgoing_tcreate(), nta_outgoing_mcreate(), nta_outgoing_tcancel(),
* nta_incoming_create(), nta_msg_tsend(), nta_msg_mreply()
*
* @par Parameter type
@@ -345,9 +345,9 @@
/**@def NTATAG_SMIME(x)
*
- * Provide S/MIME context to NTA.
+ * Provide S/MIME context to NTA.
*
- * @todo S/MIME is not implemented.
+ * @todo S/MIME is not implemented.
*/
tag_typedef_t ntatag_smime = PTRTAG_TYPEDEF(smime);
@@ -367,7 +367,7 @@
* - uint32_t
*
* @par Values
- * - Remote command sequence number
+ * - Remote command sequence number
*
* @par Default Value
* - Initially 0, then determined by the received requests
@@ -377,7 +377,7 @@
/**@def NTATAG_MAXSIZE(x)
*
- * Maximum size of incoming message.
+ * Maximum size of incoming message.
*
* If the size of an incoming request message would exceed the
* given limit, the stack will automatically respond with <i>413 Request
@@ -388,7 +388,7 @@
* nta_agent_create(), nta_agent_set_params()
*
* @par Parameter type
- * - #usize_t
+ * - #usize_t
*
* @par Values
* - Maximum acceptable size of an incoming request message.
@@ -402,10 +402,10 @@
/**@def NTATAG_MAX_PROCEEDING(x)
*
- * Maximum size of proceeding queue.
+ * Maximum size of proceeding queue.
*
* If the size of the proceedng message queue would exceed the
- * given limit, the stack will automatically respond with <i>503
+ * given limit, the stack will automatically respond with <i>503
* Service Unavailable</i>.
*
* @par Used with
@@ -413,7 +413,7 @@
* nta_agent_create(), nta_agent_set_params()
*
* @par Parameter type
- * - #usize_t
+ * - #usize_t
*
* @par Values
* - Maximum acceptable size of a queue (size_t).
@@ -423,7 +423,7 @@
/**@def NTATAG_UDP_MTU(x)
*
- * Maximum size of outgoing UDP request.
+ * Maximum size of outgoing UDP request.
*
* The maximum UDP request size is used to control use of UDP with overtly
* large messages. The IETF requires that the SIP requests over 1300 bytes
@@ -450,7 +450,7 @@
/**@def NTATAG_MAX_FORWARDS(x)
*
- * Default value for @MaxForwards header.
+ * Default value for @MaxForwards header.
*
* The default value of @MaxForwards header added to the requests. The
* initial value recommended by @RFC3261 is 70, but usually SIP proxies use
@@ -475,7 +475,7 @@
/**@def NTATAG_SIP_T1(x)
*
- * Initial retransmission interval (in milliseconds)
+ * Initial retransmission interval (in milliseconds)
*
* Set the T1 retransmission interval used by the SIP transaction engine. The
* T1 is the initial duration used by request retransmission timers A and E
@@ -489,7 +489,7 @@
* unsigned int
*
* @par Values
- * - Value of SIP T1 in milliseconds
+ * - Value of SIP T1 in milliseconds
*
* @par Default Value
* - #NTA_SIP_T1 or 500 (milliseconds)
@@ -500,13 +500,13 @@
/**@def NTATAG_SIP_T1X64(x)
*
- * Transaction timeout (defaults to T1 * 64).
+ * Transaction timeout (defaults to T1 * 64).
*
* Set the T1x64 timeout value used by the SIP transaction engine. The T1x64 is
- * duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.
+ * duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.
* The timeout value T1x64 can be adjusted separately from the initial
* retransmission interval T1, which is set with NTATAG_SIP_T1().
- *
+ *
* The default value for T1x64 is 64 times value of T1, or 32000 milliseconds.
*
* @par Used with
@@ -529,11 +529,11 @@
/**@def NTATAG_SIP_T2(x)
*
- * Maximum retransmission interval (in milliseconds)
+ * Maximum retransmission interval (in milliseconds)
*
* Set the maximum retransmission interval used by the SIP transaction
* engine. The T2 is the maximum duration used for the timers E (UDP) and G
- * by the SIP transaction engine. Note that the timer A is not capped by T2.
+ * by the SIP transaction engine. Note that the timer A is not capped by T2.
* Retransmission interval of INVITE requests grows exponentially until the
* timer B fires.
*
@@ -545,7 +545,7 @@
* unsigned int
*
* @par Values
- * - Value of SIP T2 in milliseconds
+ * - Value of SIP T2 in milliseconds
*
* @par Default Value
* - #NTA_SIP_T2 or 4000 (milliseconds)
@@ -556,7 +556,7 @@
/**@def NTATAG_SIP_T4(x)
*
- * Transaction lifetime (in milliseconds)
+ * Transaction lifetime (in milliseconds)
*
* Set the lifetime for completed transactions used by the SIP transaction
* engine. A completed transaction is kept around for the duration of T4 in
@@ -696,11 +696,11 @@
/**@def NTATAG_DEBUG_DROP_PROB(x)
*
- * Packet drop probability for debugging.
+ * Packet drop probability for debugging.
*
* The packet drop probability parameter is useful mainly for debugging
* purposes. The stack drops an incoming message received over an unreliable
- * transport (such as UDP) with the given probability. The range is in 0 ..
+ * transport (such as UDP) with the given probability. The range is in 0 ..
* 1000, 500 means p=0.5.
*
* @par Used with
@@ -733,7 +733,7 @@
* nta_agent_add_tport()
*
* @par Parameter type
- * string
+ * string
*
* @par Values
* - semicolon-separated parameter-value pairs, passed to the SigComp plugin
@@ -771,7 +771,7 @@
/**@def NTATAG_SIGCOMP_AWARE(x)
*
- * Indicate that the application is SigComp-aware.
+ * Indicate that the application is SigComp-aware.
*
* @note This tag is has no effect without a SigComp plugin.
*
@@ -794,7 +794,7 @@
/**@def NTATAG_SIGCOMP_ALGORITHM(x)
*
- * Specify SigComp algorithm.
+ * Specify SigComp algorithm.
*
* @note This tag is has no effect without a SigComp plugin.
*
@@ -804,7 +804,7 @@
* nta_agent_add_tport()
*
* @par Parameter type
- * string
+ * string
*
* @par Values
* - opaque string passed to the SigComp plugin
@@ -827,7 +827,7 @@
* - silently discard duplicate final responses to INVITE
* - retransmit preliminary responses (101..199) to INVITE request in regular
* intervals ("timer N2")
- * - retransmit 2XX response to INVITE request with exponential intervals
+ * - retransmit 2XX response to INVITE request with exponential intervals
* - handle ACK sent in 2XX response to an INVITE using the
* #nta_ack_cancel_f callback bound to #nta_incoming_t with
* nta_incoming_bind()
@@ -844,12 +844,12 @@
* or false (zero or NULL pointer)
*
* @par Values
- * - true - act as an UA
- * - false - act as an proxy
+ * - true - act as an UA
+ * - false - act as an proxy
*
* @par Default Value
* - 0 (false)
- *
+ *
* @sa NTATAG_MERGE_482()
*/
tag_typedef_t ntatag_ua = BOOLTAG_TYPEDEF(ua);
@@ -964,7 +964,7 @@
* to a request within half of the SIP T2 (the default value for T2 is 4000
* milliseconds, so the extra <i>100 Trying</i> would be sent after 2 seconds).
*
- * @par Used with
+ * @par Used with
* nua_create(), nua_set_params(),
* nta_agent_create(), nta_agent_set_params()
*
@@ -985,7 +985,7 @@
/**@def NTATAG_TIMEOUT_408(x)
*
- * Generate "408 Request Timeout" response when request times out.
+ * Generate "408 Request Timeout" response when request times out.
*
* This tag is used to prevent stack from generating extra 408 response
* messages to non-INVITE requests upon timeout. As per recommended by
@@ -1013,12 +1013,12 @@
/**@def NTATAG_PASS_408(x)
*
- * Pass "408 Request Timeout" responses to the client.
+ * Pass "408 Request Timeout" responses to the client.
*
* As per recommended by @RFC4320, the <i>408 Request Timeout</i> responses
* to non-INVITE transaction are not sent over the network to the client by
* default. The application can ask stack to pass the 408 responses with
- * NTATAG_PASS_408(1).
+ * NTATAG_PASS_408(1).
*
* Note that unlike NTATAG_PASS_100(), this tags changes the way server side
* works.
@@ -1032,7 +1032,7 @@
* or false (zero or NULL pointer)
*
* @par Values
- * - true - pass superfluous 408 responses
+ * - true - pass superfluous 408 responses
* - false - discard superfluous 408 responses
*
* @sa @RFC4320, NTATAG_EXTRA_100(), NTATAG_TIMEOUT_408()
@@ -1042,7 +1042,7 @@
/**@def NTATAG_MERGE_482(x)
*
- * Merge requests, send 482 to other requests.
+ * Merge requests, send 482 to other requests.
*
* If an User-Agent receives a duplicate request with same @CallID, @CSeq,
* @From tag but different topmost @Via header (see @RFC3261 section 8.2.2.2
@@ -1111,7 +1111,7 @@
/**@def NTATAG_CANCEL_408(x)
*
- * Do not send a CANCEL but just timeout the request.
+ * Do not send a CANCEL but just timeout the request.
*
* Calling nta_outgoing_tcancel() with this tag set marks request as
* canceled but does not actually send a CANCEL request. If
@@ -1142,7 +1142,7 @@
* Terminated</i> response to the client after returning from the
* #nta_incoming_f callback bound to the transaction with
* nta_incoming_bind()
- *
+ *
* The application can delay sending the response to the original request
* when NTATAG_CANCEL_408(0) is used. This is useful, for instance, with a
* proxy that forwards the CANCEL downstream and the forwards the response
@@ -1166,7 +1166,7 @@
/**@def NTATAG_TAG_3261(x)
*
- * When responding to requests, use unique tags.
+ * When responding to requests, use unique tags.
*
* If set the UA would generate an unique @From/@To tag for all dialogs. If
* unset UA would reuse same tag in order to make it easier to re-establish
@@ -1190,7 +1190,7 @@
/**@def NTATAG_REL100(x)
*
- * Include rel100 in INVITE requests.
+ * Include rel100 in INVITE requests.
*
* Include feature tag "100rel" in @Supported header of the INVITE requests.
*
@@ -1217,14 +1217,14 @@
/**@def NTATAG_USE_TIMESTAMP(x)
*
- * Use @Timestamp header.
+ * Use @Timestamp header.
*
* If set, a @Timestamp header would be added to stateful requests. The
* header can be used to calculate the roundtrip transport latency between
* client and server.
*
* @par Used with
- * nua_create(),
+ * nua_create(),
* nta_agent_create(),
* nta_agent_set_params(),
* nta_outgoing_mcreate(), nta_outgoing_tcreate(),
@@ -1244,14 +1244,14 @@
/**@def NTATAG_SIPFLAGS(x)
*
- * Set SIP parser flags.
+ * Set SIP parser flags.
*
* The SIP parser flags affect how the messages are parsed and the result
* presented to the application. They also control encoding of messages.
* The most important flags are as follows:
- * - MSG_FLG_COMPACT - use compact form
+ * - MSG_FLG_COMPACT - use compact form
* (single-letter header names, minimum whitespace)
- * - MSG_FLG_EXTRACT_COPY - cache printable copy of headers when parsing.
+ * - MSG_FLG_EXTRACT_COPY - cache printable copy of headers when parsing.
* Using this flag can speed up proxy processing considerably. It is
* implied when the parsed messages are logged (because #TPORT_LOG
* environment variable is set, or TPTAG_LOG() is used.
@@ -1261,7 +1261,7 @@
* nta_agent_create(), nta_agent_set_params()
*
* @par Parameter type
- * unsigned int
+ * unsigned int
*
* @par Values
* - Bitwise OR of SIP parser flags (enum #msg_flg_user)
@@ -1272,13 +1272,13 @@
/**@def NTATAG_CLIENT_RPORT(x)
*
- * Enable client-side "rport".
+ * Enable client-side "rport".
*
* This tag controls @RFC3581 support on client side. The "rport" parameter
* is used when the response has to be routed symmetrically through a NAT box.
*
* The client-side support involves just adding the "rport" parameter to the topmost
- * @Via header before the request is sent.
+ * @Via header before the request is sent.
*
* @note By default, the client "rport" is disabled when nta is used, and
* enabled when nua is used.
@@ -1340,7 +1340,7 @@
/**@def NTATAG_TCP_RPORT(x)
*
- * Use rport with TCP, too.
+ * Use rport with TCP, too.
*
* @par Used with
* nua_create(), nua_set_params(),
@@ -1351,7 +1351,7 @@
* or false (zero or NULL pointer)
*
* @par Values
- * - true - include rport parameter in the TCP via line on client side
+ * - true - include rport parameter in the TCP via line on client side
* - false - do not include rport parameter in the TCP via line on client side
*
* @sa @RFC3581, NTATAG_CLIENT_RPORT(), NTATAG_SERVER_RPORT(), @Via
@@ -1360,12 +1360,12 @@
/**@def NTATAG_PRELOAD(x)
*
- * Preload by N bytes.
+ * Preload by N bytes.
*
* When the memory block is allocated for an incoming request by the stack,
* the stack can allocate some extra memory for the parser in addition to
- * the memory used by the actual message contents.
- *
+ * the memory used by the actual message contents.
+ *
* While wasting some memory, this can speed up parsing considerably.
* Recommended amount of preloading per packet is 1500 bytes.
*
@@ -1385,7 +1385,7 @@
/**@def NTATAG_USE_NAPTR(x)
*
- * If true, try to use NAPTR records when resolving.
+ * If true, try to use NAPTR records when resolving.
*
* The application can disable NTA from using NAPTR records when resolving
* SIP URIs.
@@ -1433,7 +1433,7 @@
/**@def NTATAG_RSEQ(x)
*
- * @RSeq value for nta_outgoing_prack().
+ * @RSeq value for nta_outgoing_prack().
*
* @par Used with
* nta_outgoing_prack()
@@ -1576,7 +1576,7 @@
*
* Return number of bad SIP messages that has been received.
*
- * @sa nta_agent_get_stats(), NTATAG_S_RECV_MSG_REF(),
+ * @sa nta_agent_get_stats(), NTATAG_S_RECV_MSG_REF(),
* NTATAG_S_BAD_REQUEST_REF(), NTATAG_S_BAD_RESPONSE_REF().
*/
tag_typedef_t ntatag_s_bad_message = USIZETAG_TYPEDEF(s_bad_message);
@@ -1612,7 +1612,7 @@
*
* @sa nta_agent_get_stats(), NTATAG_DEBUG_DROP_PROB(),
* NTATAG_S_DROP_RESPONSE_REF()
- *
+ *
* @note The value was not calculated before @VERSION_1_12_7.
*/
tag_typedef_t ntatag_s_drop_request = USIZETAG_TYPEDEF(s_drop_request);
@@ -1626,7 +1626,7 @@
*
* @sa nta_agent_get_stats(), NTATAG_DEBUG_DROP_PROB(),
* NTATAG_S_DROP_REQUEST_REF()
- *
+ *
* @note The value was not calculated before @VERSION_1_12_7.
*/
tag_typedef_t ntatag_s_drop_response = USIZETAG_TYPEDEF(s_drop_response);
@@ -1651,7 +1651,7 @@
*
* Get number of server transactions created.
*
- * Return number of server transactions created.
+ * Return number of server transactions created.
*
* @sa nta_agent_get_stats(), NTATAG_S_RECV_RESPONSE_REF(),
* NTATAG_S_CLIENT_TR_REF(), NTATAG_S_DIALOG_TR_REF(),
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/portbind.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/portbind.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/portbind.c Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
/**@internal @file portbind.c
* @brief Bind a socket to an UDP/TCP port and return the port number
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Mar 25 12:12:25 2004 ppessi
*/
@@ -123,7 +123,7 @@
else if (strcmp(opt, "4") == 0)
o_ip4 = 0;
#endif
- else
+ else
usage(1);
}
@@ -166,7 +166,7 @@
names[N] = pent->p_name, protos[N] = pent->p_proto, types[N++] = SOCK_RAW;
}
- if (o_tcp)
+ if (o_tcp)
names[N] = "TCP", protos[N] = IPPROTO_TCP, types[N++] = SOCK_STREAM;
if (o_udp)
names[N] = "UDP", protos[N] = IPPROTO_UDP, types[N++] = SOCK_DGRAM;
@@ -186,7 +186,7 @@
#endif
if (s == INVALID_SOCKET) {
- fprintf(stderr, "%s: socket(AF_INET%s, 0, %s): %s\n",
+ fprintf(stderr, "%s: socket(AF_INET%s, 0, %s): %s\n",
name, af == AF_INET ? "" : "6", names[n], strerror(errno));
exit(1);
}
@@ -212,7 +212,7 @@
continue;
}
}
-
+
fprintf(stderr, "%s: bind(%s): %s\n", name, o_port, strerror(errno));
exit(1);
}
@@ -221,7 +221,7 @@
struct sockaddr_storage ss[1];
struct sockaddr *sa = (void *)ss;
struct sockaddr_in *sin = (void *)ss;
-
+
salen = sizeof *ss;
if (getsockname(s, sa, &salen) == -1) {
fprintf(stderr, "%s: getsockname(): %s\n", name, strerror(errno));
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/run_test_nta
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/run_test_nta (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/run_test_nta Tue Dec 16 13:05:22 2008
@@ -70,7 +70,7 @@
port=$(./portbind $v6flag $((port + 1))) bind=$port
port=$(./portbind $v6flag $((port + 1))) contact=$port
-# Disable IPv6 resolver for now
+# Disable IPv6 resolver for now
if false && eval $ipv6 ; then
listen="listen-on-v6 port $bind { any; };"
ns=$me6
@@ -151,11 +151,11 @@
; No sensible NAPTR match (and we get 503)
na503 NAPTR 20 15 "S" "SIP+D2F" "" a2
-; No SIP NAPTR match
+; No SIP NAPTR match
nona NAPTR 20 15 "S" "ZIP+D2U" "" a2
_sip._udp.nona SRV 1 10 $contact ip4
-; No SIP SRV match
+; No SIP SRV match
nosrv NAPTR 20 1 "s" "SIP+D2U" "" _sip._udp.nosrv
NAPTR 20 2 "s" "SIP+D2U" "" _sip._udp.srv
@@ -189,7 +189,7 @@
named -f -c $namedfile &
pid=$!
while ! test -r $pidfile && kill -0 $!
-do
+do
sleep 1
done
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_read_payload.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_read_payload.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_read_payload.c Tue Dec 16 13:05:22 2008
@@ -22,13 +22,13 @@
*
*/
-/**@ingroup sl_utils
+/**@ingroup sl_utils
* @CFILE sl_read_payload.c
*
* @brief Functions for reading SIP message payload from a file.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Sep 5 00:44:34 2002 ppessi
*/
@@ -112,10 +112,10 @@
if (buf == NULL) {
perror(who);
- su_free(home, pl);
+ su_free(home, pl);
return NULL;
}
-
+
if (used < size)
buf[used] = '\0';
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils.docs Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
/* -*- c -*- */
/**@defgroup sl_utils SIP Library Utilities - "sl_utils"
- *
+ *
* SIP library utilities provide some simple utility functions for printing
* and managing SIP headers or messages.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_log.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_log.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@ingroup sl_utils
*
- * @CFILE sl_utils_log.c
+ * @CFILE sl_utils_log.c
* @brief Implementation of SIP library utility logging functions.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -45,7 +45,7 @@
#include <sofia-sip/sip_header.h>
#include "sofia-sip/sl_utils.h"
-/**Log a SIP message.
+/**Log a SIP message.
*
* The function sl_message_log() logs shorthand information identifying
* the SIP message to the given @a log at level @a level. The shorthand
@@ -60,8 +60,8 @@
*/
void sl_sip_log(su_log_t *log,
int level,
- char const *prefix,
- sip_t const *sip,
+ char const *prefix,
+ sip_t const *sip,
int details)
{
sip_cseq_t const *cs = sip->sip_cseq;
@@ -70,7 +70,7 @@
log = su_log_default;
assert(cs);
-
+
if (sip->sip_request) {
su_llog(log, level,
"%s%s "URL_FORMAT_STRING" (CSeq %d %s)\n",
@@ -114,19 +114,19 @@
sl_to_log(log, level, "\tTo: %s\n", sip->sip_to);
}
-/**Log a @From header.
+/**Log a @From header.
*
* The function sl_from_log() logs the contents of @a from header to
* the output @a log. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are logged.
- *
+ *
* @param log output log
* @param level logging level of output
- * @param fmt output format
+ * @param fmt output format
* @param from @From header
*/
-void sl_from_log(su_log_t *log, int level,
+void sl_from_log(su_log_t *log, int level,
char const *fmt, sip_from_t const *from)
{
sip_addr_t a[1];
@@ -137,7 +137,7 @@
memcpy(a, from, sizeof a);
a->a_params = NULL;
if (!a->a_display) a->a_display = "";
-
+
sl_header_log(log, level, fmt, (sip_header_t *)a);
}
@@ -147,10 +147,10 @@
* log @a log with given @a level. The @a fmt specifies the output format,
* where %s is replaced with header contents. If @a fmt is @c NULL, only the
* header contents are logged.
- *
+ *
* @param log output log
* @param level logging level of output
- * @param fmt output format
+ * @param fmt output format
* @param to @To header
*/
void sl_to_log(su_log_t *log, int level, char const *fmt, sip_to_t const *to)
@@ -158,51 +158,51 @@
sl_from_log(log, level, fmt, (sip_from_t const *)to);
}
-/**Log a @Contact header.
+/**Log a @Contact header.
*
* The function sl_contact_log() logs the contents of @a contact header
* to the log @a log with given @a level. The @a fmt specifies the output
* format, where %s is replaced with header contents. If @a fmt is @c NULL,
* only the header contents are logged.
- *
+ *
* @param log output log
* @param level logging level of output
- * @param fmt output format
+ * @param fmt output format
* @param contact @Contact header
*/
-void sl_contact_log(su_log_t *log, int level,
+void sl_contact_log(su_log_t *log, int level,
char const *fmt, sip_contact_t const *m)
{
sl_from_log(log, level, fmt, (sip_from_t const *)m);
}
-/**Log an @Allow header(s).
+/**Log an @Allow header(s).
*
* The function sl_allow_log() logs the contents of @a allow header to
* the log @a log with given @a level. The @a fmt specifies the output
* format, where %s is replaced with header contents. If @a fmt is @c NULL,
* only the header contents are logged.
- *
+ *
* @param log output log
* @param level logging level of output
- * @param fmt output format
+ * @param fmt output format
* @param allow @Allow header
*
*/
-void sl_allow_log(su_log_t *log, int level,
+void sl_allow_log(su_log_t *log, int level,
char const *fmt, sip_allow_t const *allow)
{
sl_header_log(log, level, fmt, (sip_header_t *)allow);
}
-/**Log a @Via header.
+/**Log a @Via header.
*
* The function sl_via_log() logs the contents of @a via header to
* the @a log. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are logged.
- *
+ *
* @param log output log
* @param fmt format used when logging
* @param v via header
@@ -213,21 +213,21 @@
}
-/**Log message payload.
+/**Log message payload.
*
* The function sl_payload_log() logs the contents of @a payload object
* to the output @a log. Each line in the payload is prepended with the
* @a prefix. If @a prefix is @c NULL, only the header contents are logged.
* For each line in payload, only first 70 charactes are logged, rest is
* replaced with "...".
- *
+ *
* @param log output log
* @param level logging level of output
- * @param prefix prefix appended to each payload line
+ * @param prefix prefix appended to each payload line
* @param pl payload object
*/
-void sl_payload_log(su_log_t *log, int level,
- char const *prefix,
+void sl_payload_log(su_log_t *log, int level,
+ char const *prefix,
sip_payload_t const *pl)
{
char *s = pl->pl_data, *end = pl->pl_data + pl->pl_len;
@@ -252,14 +252,14 @@
}
}
-/** Log a header.
+/** Log a header.
*
* Logs the contents of an header to the output @a stream. The @a fmt
- * specifies the output format, where %s is replaced with header contents.
+ * specifies the output format, where %s is replaced with header contents.
* If @a fmt is @c NULL, only the header contents are logged.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param h a SIP header object
*/
void sl_header_log(su_log_t *log, int level, char const *fmt,
@@ -275,7 +275,7 @@
if ((size_t)len >= sizeof b) {
s = malloc(len + 1); if (!s) return;
sip_header_field_e(s, len + 1, h, 0);
- }
+ }
s[len] = '\0';
if (fmt == NULL)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sl_utils_print.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@ingroup sl_utils
*
- * @CFILE sl_utils_print.c
+ * @CFILE sl_utils_print.c
* @brief Implementation of SIP library utility print functions.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -42,7 +42,7 @@
#include <sofia-sip/sip_header.h>
#include "sofia-sip/sl_utils.h"
-/**Print a SIP message.
+/**Print a SIP message.
*
* The function sl_message_log() prints shorthand information identifying
* the SIP message to the given output @a stream. The shorthand information
@@ -54,7 +54,7 @@
* @param sip message to be logged.
* @param details flag specifying if detailed output is desired.
*/
-void sl_message_log(FILE *stream,
+void sl_message_log(FILE *stream,
char const *prefix, sip_t const *sip, int details)
{
sip_cseq_t const *cs = sip->sip_cseq;
@@ -63,7 +63,7 @@
stream = stdout;
assert(cs);
-
+
if (sip->sip_request) {
fprintf(stream,
"%s%s "URL_FORMAT_STRING" (CSeq %d %s)\n",
@@ -100,18 +100,18 @@
sl_to_print(stream, "\tTo: %s\n", sip->sip_to);
}
-/** Print @From header.
+/** Print @From header.
*
* The function sl_from_print() prints the contents of @a from header to
* the output @a stream. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param from header object
- *
- * @return
+ *
+ * @return
* The function sl_from_print() returns number of bytes printed,
* or -1 upon an error.
*/
@@ -125,7 +125,7 @@
memcpy(a, from, sizeof a);
a->a_params = NULL;
if (!a->a_display) a->a_display = "";
-
+
return sl_header_print(stream, fmt, (sip_header_t *)a);
}
@@ -135,12 +135,12 @@
* the output @a stream. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param to header object
- *
- * @return
+ *
+ * @return
* The function sl_to_print() returns number of bytes printed,
* or -1 upon an error.
*/
@@ -149,18 +149,18 @@
return sl_from_print(stream, fmt, (sip_from_t const *)to);
}
-/** Print @Contact header.
+/** Print @Contact header.
*
* The function sl_contact_print() prints the contents of @a contact
* header to the output @a stream. The @a fmt specifies the output format,
* where %s is replaced with header contents. If @a fmt is @c NULL, only the
* header contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param contact header object
- *
- * @return
+ *
+ * @return
* The function sl_contact_print() returns number of bytes printed,
* or -1 upon an error.
*/
@@ -170,18 +170,18 @@
return sl_from_print(stream, fmt, (sip_from_t const *)m);
}
-/** Print @Allow header(s).
+/** Print @Allow header(s).
*
* The function sl_allow_print() prints the contents of @a allow header to
* the output @a stream. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param allow header object
- *
- * @return
+ *
+ * @return
* The function sl_allow_print() returns number of bytes printed,
* or -1 upon an error.
*/
@@ -193,25 +193,25 @@
}
-/** Print message payload.
+/** Print message payload.
*
* The function sl_payload_print() prints the contents of @a payload
* object to the output @a stream. The @a fmt specifies the output format,
* where %s is replaced with header contents. If @a fmt is @c NULL, only the
* header contents are printed.
- *
+ *
* @param stream output stream
- * @param prefix prefix appended to each payload line
+ * @param prefix prefix appended to each payload line
* @param pl payload object
- *
- * @return
+ *
+ * @return
* The function sl_payload_print() returns number of bytes printed,
* or -1 upon an error.
*/
issize_t sl_payload_print(FILE *stream, char const *prefix, sip_payload_t const *pl)
{
char *s = pl->pl_data, *end = pl->pl_data + pl->pl_len;
- size_t n, total = 0, crlf = 1;
+ size_t n, total = 0, crlf = 1;
while (s < end && *s != '\0') {
n = strncspn(s, end - s, "\r\n");
@@ -228,18 +228,18 @@
return (issize_t)total;
}
-/** Print @Via header.
+/** Print @Via header.
*
* The function sl_via_print() prints the contents of @a via header to
* the output @a stream. The @a fmt specifies the output format, where %s
* is replaced with header contents. If @a fmt is @c NULL, only the header
* contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param v header object
- *
- * @return
+ *
+ * @return
* The function sl_via_print() returns number of bytes printed,
* or -1 upon an error.
*/
@@ -257,17 +257,17 @@
return -1;
}
-/** Print a header.
+/** Print a header.
*
* Prints the contents of an header to the output @a stream. The @a fmt
- * specifies the output format, where %s is replaced with header contents.
+ * specifies the output format, where %s is replaced with header contents.
* If @a fmt is @c NULL, only the header contents are printed.
- *
+ *
* @param stream output stream
- * @param fmt output format
+ * @param fmt output format
* @param v header object
- *
- * @return
+ *
+ * @return
* Number of bytes logged, or -1 upon an error.
*/
issize_t sl_header_print(FILE *stream, char const *fmt, sip_header_t const *h)
@@ -282,7 +282,7 @@
if ((size_t)len >= sizeof b) {
s = malloc(len + 1); if (!s) return -1;
sip_header_field_e(s, len + 1, h, 0);
- }
+ }
s[len] = '\0';
if (fmt != NULL && strcmp(fmt, "%s") != 0)
@@ -292,6 +292,6 @@
if (s != b)
free(s);
-
+
return len;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h Tue Dec 16 13:05:22 2008
@@ -48,7 +48,7 @@
SOFIA_BEGIN_DECLS
/* ----------------------------------------------------------------------
- * 1) Types
+ * 1) Types
*/
/** NTA agent */
@@ -95,7 +95,7 @@
typedef NTA_INCOMING_MAGIC_T nta_incoming_magic_t;
/* ----------------------------------------------------------------------
- * 2) Constants
+ * 2) Constants
*/
/** NTA API version number */
@@ -122,7 +122,7 @@
msg_t *msg,
sip_t *sip);
-SOFIAPUBFUN
+SOFIAPUBFUN
nta_agent_t *nta_agent_create(su_root_t *root,
url_string_t const *name,
nta_message_f *callback,
@@ -148,12 +148,12 @@
SOFIAPUBFUN char const *nta_agent_newtag(su_home_t *,
char const *fmt, nta_agent_t *);
-SOFIAPUBFUN int nta_agent_set_params(nta_agent_t *agent,
+SOFIAPUBFUN int nta_agent_set_params(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
-SOFIAPUBFUN int nta_agent_get_params(nta_agent_t *agent,
+SOFIAPUBFUN int nta_agent_get_params(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
-SOFIAPUBFUN int nta_agent_get_stats(nta_agent_t *agent,
+SOFIAPUBFUN int nta_agent_get_stats(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
/* ----------------------------------------------------------------------
@@ -164,9 +164,9 @@
SOFIAPUBFUN int nta_msg_complete(msg_t *msg);
-SOFIAPUBFUN int nta_msg_request_complete(msg_t *msg,
- nta_leg_t *leg,
- sip_method_t method,
+SOFIAPUBFUN int nta_msg_request_complete(msg_t *msg,
+ nta_leg_t *leg,
+ sip_method_t method,
char const *method_name,
url_string_t const *req_url);
@@ -176,13 +176,13 @@
/* ----------------------------------------------------------------------
* 5) Leg-level prototypes
*/
-typedef int nta_request_f(nta_leg_magic_t *lmagic,
+typedef int nta_request_f(nta_leg_magic_t *lmagic,
nta_leg_t *leg,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
-SOFIAPUBFUN
-nta_leg_t *nta_leg_tcreate(nta_agent_t *agent,
+SOFIAPUBFUN
+nta_leg_t *nta_leg_tcreate(nta_agent_t *agent,
nta_request_f *req_callback,
nta_leg_magic_t *magic,
tag_type_t tag, tag_value_t value, ...);
@@ -217,18 +217,18 @@
SOFIAPUBFUN uint32_t nta_leg_get_rseq(nta_leg_t const *leg);
/** Set UAC route. */
-SOFIAPUBFUN int nta_leg_client_route(nta_leg_t *leg,
- sip_record_route_t const *route,
+SOFIAPUBFUN int nta_leg_client_route(nta_leg_t *leg,
+ sip_record_route_t const *route,
sip_contact_t const *contact);
/** Set UAS route */
-SOFIAPUBFUN int nta_leg_server_route(nta_leg_t *leg,
- sip_record_route_t const *route,
+SOFIAPUBFUN int nta_leg_server_route(nta_leg_t *leg,
+ sip_record_route_t const *route,
sip_contact_t const *contact);
/** Get route */
-SOFIAPUBFUN int nta_leg_get_route(nta_leg_t *leg,
- sip_route_t const **return_route,
+SOFIAPUBFUN int nta_leg_get_route(nta_leg_t *leg,
+ sip_route_t const **return_route,
sip_contact_t const **return_target);
/** Get leg by destination */
@@ -237,7 +237,7 @@
/** Get leg by dialog */
SOFIAPUBFUN
-nta_leg_t *nta_leg_by_dialog(nta_agent_t const *agent,
+nta_leg_t *nta_leg_by_dialog(nta_agent_t const *agent,
url_t const *request_uri,
sip_call_id_t const *call_id,
char const *from_tag,
@@ -258,7 +258,7 @@
nta_leg_t *nta_leg_by_call_id(nta_agent_t *sa, const char *call_id);
/* ----------------------------------------------------------------------
- * 6) Prototypes for incoming transactions
+ * 6) Prototypes for incoming transactions
*/
SOFIAPUBFUN
@@ -271,19 +271,19 @@
SOFIAPUBFUN nta_incoming_t *nta_incoming_default(nta_agent_t *agent);
typedef int nta_ack_cancel_f(nta_incoming_magic_t *imagic,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
-SOFIAPUBFUN void nta_incoming_bind(nta_incoming_t *irq,
+SOFIAPUBFUN void nta_incoming_bind(nta_incoming_t *irq,
nta_ack_cancel_f *callback,
nta_incoming_magic_t *imagic);
SOFIAPUBFUN
-nta_incoming_magic_t *nta_incoming_magic(nta_incoming_t *irq,
+nta_incoming_magic_t *nta_incoming_magic(nta_incoming_t *irq,
nta_ack_cancel_f *callback);
SOFIAPUBFUN
-nta_incoming_t *nta_incoming_find(nta_agent_t const *agent,
+nta_incoming_t *nta_incoming_find(nta_agent_t const *agent,
sip_t const *sip,
sip_via_t const *v);
@@ -307,7 +307,7 @@
SOFIAPUBFUN
int nta_incoming_complete_response(nta_incoming_t *irq,
msg_t *msg,
- int status,
+ int status,
char const *phrase,
tag_type_t tag, tag_value_t value, ...);
@@ -315,8 +315,8 @@
msg_t *nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase);
SOFIAPUBFUN
-int nta_incoming_treply(nta_incoming_t *ireq,
- int status, char const *phrase,
+int nta_incoming_treply(nta_incoming_t *ireq,
+ int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg);
@@ -378,7 +378,7 @@
nta_outgoing_t *nta_outgoing_mcreate(nta_agent_t *agent,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
- url_string_t const *route_url,
+ url_string_t const *route_url,
msg_t *msg,
tag_type_t tag, tag_value_t value, ...);
@@ -405,7 +405,7 @@
SOFIAPUBFUN msg_t *nta_outgoing_getrequest(nta_outgoing_t *orq);
SOFIAPUBFUN
-nta_outgoing_t *nta_outgoing_tagged(nta_outgoing_t *orq,
+nta_outgoing_t *nta_outgoing_tagged(nta_outgoing_t *orq,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
char const *to_tag,
@@ -414,7 +414,7 @@
SOFIAPUBFUN int nta_outgoing_cancel(nta_outgoing_t *);
SOFIAPUBFUN
-nta_outgoing_t *nta_outgoing_tcancel(nta_outgoing_t *orq,
+nta_outgoing_t *nta_outgoing_tcancel(nta_outgoing_t *orq,
nta_response_f *callback,
nta_outgoing_magic_t *magic,
tag_type_t, tag_value_t, ...);
@@ -424,7 +424,7 @@
SOFIAPUBFUN
nta_outgoing_t *nta_outgoing_find(nta_agent_t const *sa,
msg_t const *msg,
- sip_t const *sip,
+ sip_t const *sip,
sip_via_t const *v);
SOFIAPUBFUN int nta_tport_keepalive(nta_outgoing_t *orq);
@@ -464,19 +464,19 @@
typedef int nta_prack_f(nta_reliable_magic_t *rmagic,
nta_reliable_t *rel,
- nta_incoming_t *prack,
+ nta_incoming_t *prack,
sip_t const *sip);
SOFIAPUBFUN
nta_reliable_t *nta_reliable_treply(nta_incoming_t *ireq,
nta_prack_f *callback,
nta_reliable_magic_t *rmagic,
- int status, char const *phrase,
- tag_type_t tag,
+ int status, char const *phrase,
+ tag_type_t tag,
tag_value_t value, ...);
SOFIAPUBFUN
-nta_reliable_t *nta_reliable_mreply(nta_incoming_t *irq,
+nta_reliable_t *nta_reliable_mreply(nta_incoming_t *irq,
nta_prack_f *callback,
nta_reliable_magic_t *rmagic,
msg_t *msg);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_stateless.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_stateless.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_stateless.h Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
#ifndef NTA_STATELESS_H
/** Defined when <sofia-sip/nta_stateless.h> has been included. */
-#define NTA_STATELESS_H
+#define NTA_STATELESS_H
-/**@file sofia-sip/nta_stateless.h
+/**@file sofia-sip/nta_stateless.h
* @brief NTA functions for stateless SIP processing.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -46,18 +46,18 @@
* sip_t *sip);
*
* Callback for incoming messages.
- *
+ *
* The typedef nta_message_f() defines prototype for the callback functions
* invoked by NTA when it has received an incoming message that will be
* processed statelessly.
- *
+ *
* The application can either discard the message by calling
* nta_msg_discard(), forward it by calling nta_msg_tsend() or reply to the
* message by calling nta_msg_treply(). When application wants to process a
* request statefully, it passes the message to a leg with the function
* nta_leg_stateful(). A new leg can be created by calling the function
* nta_leg_tcreate().
- *
+ *
* @par Prototype
* @code
* int message_callback(nta_agent_magic_t *context,
@@ -65,7 +65,7 @@
* msg_t *msg,
* sip_t *sip);
* @endcode
- *
+ *
* @param context agent context
* @param agent agent handle
* @param msg received message
@@ -90,7 +90,7 @@
/** Reply to a request message. */
SOFIAPUBFUN
-int nta_msg_treply(nta_agent_t *self,
+int nta_msg_treply(nta_agent_t *self,
msg_t *msg,
int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tag.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <sofia-sip/nta_tag.h> has been included. */
#define NTA_TAG_H
-/**@file sofia-sip/nta_tag.h
+/**@file sofia-sip/nta_tag.h
* @brief NTA tags
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -142,7 +142,7 @@
NTA_DLL extern tag_typedef_t ntatag_smime_ref;
#define NTATAG_SMIME_REF(x) ntatag_smime_ref, tag_ptr_vr(&(x), (x))
-
+
NTA_DLL extern tag_typedef_t ntatag_maxsize;
#define NTATAG_MAXSIZE(x) ntatag_maxsize, tag_usize_v((x))
@@ -341,13 +341,13 @@
NTA_DLL extern tag_typedef_t ntatag_rel100_ref;
#define NTATAG_REL100_REF(x) ntatag_rel100_ref, tag_bool_vr(&(x))
-
+
NTA_DLL extern tag_typedef_t ntatag_sipflags;
#define NTATAG_SIPFLAGS(x) ntatag_sipflags, tag_uint_v((x))
NTA_DLL extern tag_typedef_t ntatag_sipflags_ref;
#define NTATAG_SIPFLAGS_REF(x) ntatag_sipflags_ref, tag_uint_vr(&(x))
-
+
NTA_DLL extern tag_typedef_t ntatag_client_rport;
#define NTATAG_CLIENT_RPORT(x) ntatag_client_rport, tag_bool_v((x))
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta_tport.h Tue Dec 16 13:05:22 2008
@@ -29,11 +29,11 @@
/**
* @file sofia-sip/nta_tport.h
* @brief Transport and SigComp handling
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Thu Oct 7 20:04:39 2004 ppessi
- *
+ *
*/
#ifndef NTA_H
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/sl_utils.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/sl_utils.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/sl_utils.h Tue Dec 16 13:05:22 2008
@@ -24,10 +24,10 @@
#ifndef SL_UTILS_H
/** Defined when <sofia-sip/sl_utils.h> has been included. */
-#define SL_UTILS_H
+#define SL_UTILS_H
-/**@ingroup sl_utils
- *
+/**@ingroup sl_utils
+ *
* @file sofia-sip/sl_utils.h @brief Prototypes for SIP helper functions.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -57,7 +57,7 @@
SOFIAPUBFUN sip_payload_t *sl_fread_payload(su_home_t *home, FILE *);
/* Printing functions */
-SOFIAPUBFUN void
+SOFIAPUBFUN void
sl_message_log(FILE *, char const *prefix, sip_t const *, int details);
SOFIAPUBFUN issize_t
sl_header_print(FILE *, char const *fmt, sip_header_t const *h),
@@ -69,7 +69,7 @@
sl_via_print(FILE *, char const *fmt, sip_via_t const *v);
/* Logging functions */
-SOFIAPUBFUN void
+SOFIAPUBFUN void
sl_sip_log(su_log_t*, int lvl, char const *, sip_t const *, int details),
sl_header_log(su_log_t *, int lvl, char const *, sip_header_t const *h),
sl_from_log(su_log_t *, int lvl, char const *, sip_from_t const *from),
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta.c Tue Dec 16 13:05:22 2008
@@ -200,14 +200,14 @@
static int test_fix_467(agent_t *ag);
static int test_for_ack(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
static int test_for_ack_or_timeout(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
static int wait_for_ack_or_cancel(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip);
int agent_callback(agent_t *ag,
@@ -218,14 +218,14 @@
if (tstflags & tst_verbatim) {
if (sip->sip_request) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
else {
- printf("%s: %s: %s %03d %s\n", name, __func__,
- sip->sip_status->st_version,
- sip->sip_status->st_status,
+ printf("%s: %s: %s %03d %s\n", name, __func__,
+ sip->sip_status->st_version,
+ sip->sip_status->st_status,
sip->sip_status->st_phrase);
}
}
@@ -245,14 +245,14 @@
if (leg == ag->ag_default_leg)
match = "ag_default_leg";
- else if (leg == ag->ag_server_leg)
+ else if (leg == ag->ag_server_leg)
match = "ag_server_leg";
else if (leg == ag->ag_alice_leg)
match = "ag_alice_leg";
else if (leg == ag->ag_bob_leg)
match = "ag_bob_leg";
- printf("%s: %s: %smatched with %s\n", name, func,
+ printf("%s: %s: %smatched with %s\n", name, func,
always ? "mis" : "", match);
}
@@ -261,14 +261,14 @@
{
if (leg == ag->ag_default_leg)
ag->ag_default_leg = NULL;
- else if (leg == ag->ag_server_leg)
+ else if (leg == ag->ag_server_leg)
ag->ag_server_leg = NULL;
else if (leg == ag->ag_alice_leg)
ag->ag_alice_leg = NULL;
else if (leg == ag->ag_bob_leg)
ag->ag_bob_leg = NULL;
- else
- printf("%s:%u: %s: did not exist\n",
+ else
+ printf("%s:%u: %s: did not exist\n",
__FILE__, __LINE__, __func__);
nta_leg_destroy(leg);
@@ -282,7 +282,7 @@
{
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -320,7 +320,7 @@
{
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -336,7 +336,7 @@
{
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -407,9 +407,9 @@
if (tstflags & tst_verbatim) {
if (sip)
- printf("%s: %s: response %s %03d %s\n", name, ctx->c_name,
- sip->sip_status->st_version,
- sip->sip_status->st_status,
+ printf("%s: %s: response %s %03d %s\n", name, ctx->c_name,
+ sip->sip_status->st_version,
+ sip->sip_status->st_status,
sip->sip_status->st_phrase);
else
printf("%s: %s: callback %03d\n", name, ctx->c_name,
@@ -439,7 +439,7 @@
}
/** Deinit client. Return nonzero if client checks failed. */
-static
+static
int client_deinit(client_t *c)
{
int errors = c->c_errors;
@@ -449,14 +449,14 @@
if (c->c_orq) nta_outgoing_destroy(c->c_orq), c->c_orq = NULL;
- c->c_errors = 0;
+ c->c_errors = 0;
c->c_status = 0;
return errors;
}
-static
+static
void nta_test_run(agent_t *ag)
{
for (ag->ag_running = 1; ag->ag_running;) {
@@ -469,7 +469,7 @@
/** Run client test. Return nonzero if client checks failed. */
-static
+static
int client_run_with(client_t *c, int expected, void (*runner)(client_t *c))
{
int resulting;
@@ -489,7 +489,7 @@
return 0;
}
-static
+static
void until_final_received(client_t *c)
{
for (c->c_final = 0; !c->c_final; ) {
@@ -500,7 +500,7 @@
}
}
-static
+static
int client_run(client_t *c, int expected)
{
return client_run_with(c, expected, until_final_received);
@@ -519,13 +519,13 @@
}
}
-static
+static
int client_run_until_acked(client_t *c, int expected)
{
return client_run_with(c, expected, until_server_acked);
}
-void
+void
until_server_canceled(client_t *c)
{
agent_t *ag = c->c_ag;
@@ -538,7 +538,7 @@
}
}
-static
+static
int client_run_until_canceled(client_t *c, int expected)
{
return client_run_with(c, expected, until_server_canceled);
@@ -552,7 +552,7 @@
char const *contact = "sip:*:*;comp=sigcomp";
su_sockaddr_t su;
socklen_t sulen, sulen0;
- su_socket_t s;
+ su_socket_t s;
int af, err = -1;
BEGIN();
@@ -607,7 +607,7 @@
}
TEST_1(bind(s, &su.su_sa, sulen) < 0 ? (perror("bind"), 0) : 1);
ag->ag_down_socket = s;
-
+
/* Create agent */
ag->ag_agent = nta_agent_create(ag->ag_root,
(url_string_t *)contact,
@@ -680,7 +680,7 @@
TEST_1(ag->ag_alice = sip_from_dup(ag->ag_home, from));
}
{
- char const data[] =
+ char const data[] =
"v=0\r\n"
"o=- 425432 423412 IN IP4 127.0.0.1\r\n"
"s= \r\n"
@@ -694,7 +694,7 @@
{
sip_contact_t *m;
- ag->ag_aliases =
+ ag->ag_aliases =
sip_contact_make(ag->ag_home, "sip:127.0.0.1, sip:localhost, sip:[::1]");
TEST_1(ag->ag_aliases);
TEST_1(ag->ag_aliases->m_next);
@@ -709,43 +709,43 @@
m->m_next = ag->ag_aliases;
ag->ag_aliases = m;
- err = nta_agent_set_params(ag->ag_agent,
+ err = nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_REL100(1),
- NTATAG_UA(1),
- NTATAG_MERGE_482(1),
+ NTATAG_UA(1),
+ NTATAG_MERGE_482(1),
NTATAG_USE_NAPTR(1),
NTATAG_USE_SRV(1),
NTATAG_MAX_FORWARDS(20),
TAG_END());
TEST(err, 7);
- err = nta_agent_set_params(ag->ag_agent,
+ err = nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_DEFAULT_PROXY("sip:127.0.0.1"),
TAG_END());
TEST(err, 2);
- err = nta_agent_set_params(ag->ag_agent,
+ err = nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_DEFAULT_PROXY(NULL),
TAG_END());
TEST(err, 2);
- err = nta_agent_set_params(ag->ag_agent,
+ err = nta_agent_set_params(ag->ag_agent,
NTATAG_DEFAULT_PROXY("tel:+35878008000"),
TAG_END());
TEST(err, -1);
}
-
+
{
url_t url[1];
/* Create the server leg */
*url = *ag->ag_aliases->m_url;
url->url_user = "%";
- ag->ag_server_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_server_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback_200,
ag,
NTATAG_NO_DIALOG(1),
@@ -755,14 +755,14 @@
}
END();
-}
+}
int test_reinit(agent_t *ag)
{
BEGIN();
/* Create a new default leg */
nta_leg_destroy(ag->ag_default_leg), ag->ag_default_leg = NULL;
- TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
+ TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback_200,
ag,
NTATAG_NO_DIALOG(1),
@@ -795,7 +795,7 @@
free(ag->ag_mclass), ag->ag_mclass = NULL;
END();
-}
+}
static
int readfile(FILE *f, void **contents)
@@ -804,13 +804,13 @@
char *buffer = NULL;
long size;
size_t len;
-
+
/* Read whole file in */
if (fseek(f, 0, SEEK_END) < 0 ||
(size = ftell(f)) < 0 ||
fseek(f, 0, SEEK_SET) < 0 ||
(long)(len = (size_t)size) != size) {
- fprintf(stderr, "%s: unable to determine file size (%s)\n",
+ fprintf(stderr, "%s: unable to determine file size (%s)\n",
__func__, strerror(errno));
return -1;
}
@@ -832,7 +832,7 @@
#if HAVE_DIRENT_H
#include <dirent.h>
-#endif
+#endif
static int test_bad_messages(agent_t *ag)
{
@@ -860,13 +860,13 @@
}
if (dir == NULL) {
- fprintf(stderr, "test_nta: cannot find sip torture messages\n");
- fprintf(stderr, "test_nta: tried %s\n", name);
+ fprintf(stderr, "test_nta: cannot find sip torture messages\n");
+ fprintf(stderr, "test_nta: tried %s\n", name);
}
offset = strlen(name);
- TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
+ TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback_500,
ag,
NTATAG_NO_DIALOG(1),
@@ -882,10 +882,10 @@
memset(hints, 0, sizeof hints);
hints->ai_socktype = SOCK_DGRAM;
hints->ai_protocol = IPPROTO_UDP;
-
+
TEST(su_getaddrinfo(host, port, hints, &ai), 0); TEST_1(ai);
s = su_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); TEST_1(s != -1);
- memset(su, 0, sulen = ai->ai_addrlen);
+ memset(su, 0, sulen = ai->ai_addrlen);
su->su_len = sizeof su; su->su_family = ai->ai_family;
TEST_1(bind(s, &su->su_sa, sulen) == 0);
TEST_1(getsockname(s, &su->su_sa, &sulen) == 0);
@@ -945,7 +945,7 @@
END();
}
-static unsigned char const code[] =
+static unsigned char const code[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
#include <sofia-sip/su_uniqueid.h>
@@ -957,7 +957,7 @@
if (pl) {
size_t i;
char *data = (char *)pl->pl_data;
-
+
for (i = 0; i < size; i++) {
if ((i & 63) != 63)
data[i] = code[su_randint(0, 63)];
@@ -969,15 +969,15 @@
return pl;
}
-static
+static
int client_check_to_tag(client_t *ctx, nta_outgoing_t *orq, sip_t const *sip)
{
- if (sip)
+ if (sip)
TEST_1(sip->sip_to && sip->sip_to->a_tag);
return 0;
}
-static
+static
int check_magic_branch(client_t *ctx, nta_outgoing_t *orq, sip_t const *sip)
{
if (sip) {
@@ -1069,7 +1069,7 @@
url->url_params = "transport=udp";
- TEST_1(nta_agent_add_tport(ag->ag_agent, (url_string_t *)url,
+ TEST_1(nta_agent_add_tport(ag->ag_agent, (url_string_t *)url,
TAG_END()) == 0);
TEST_1(v = nta_agent_via(ag->ag_agent));
@@ -1103,7 +1103,7 @@
{
/* Test 0.1
- * Send a message from default leg to default leg
+ * Send a message from default leg to default leg
*/
char const p_acid[] = "P-Access-Network-Info: IEEE-802.11g\n";
url_t url[1];
@@ -1113,8 +1113,8 @@
url->url_params = NULL;
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_default_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1144,15 +1144,15 @@
url_t url[1];
sip_t *sip;
client_t ctx[1] = {{ ag, "Test 0.1.2", check_via_without_sigcomp }};
-
+
*url = *ag->ag_contact->m_url;
/* Test that method parameter is stripped and headers in query are used */
url->url_params = "method=MESSAGE;user=IP";
url->url_headers = "organization=United%20Testers";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_default_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1171,7 +1171,7 @@
TEST_1(sip->sip_organization);
TEST_S(sip->sip_organization->g_string, "United Testers");
TEST_S(sip->sip_request->rq_url->url_params, "user=IP");
-
+
nta_leg_bind(ag->ag_default_leg, leg_callback_200, ag);
}
@@ -1195,7 +1195,7 @@
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1218,7 +1218,7 @@
/* Test 0.2
* Send a message from Bob to Alice
- * This time specify a TCP URI, and include a large payload
+ * This time specify a TCP URI, and include a large payload
* of 512 kB
*/
if (tcp) {
@@ -1236,7 +1236,7 @@
TEST_1(pl = test_payload(ag->ag_home, size));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_MESSAGE,
@@ -1257,16 +1257,16 @@
if (tcp_tport) {
/* Test 0.2.1 - always use transport connection from NTATAG_TPORT()
*
- * Test bug reported by geaaru
+ * Test bug reported by geaaru
* - NTATAG_TPORT() is not used if NTATAG_DEFAULT_PROXY() is given
*/
client_t ctx[1] = {{ ag, "Test 0.2.1", save_and_check_tcp }};
url_t url[1];
sip_payload_t *pl;
tport_t *used_tport = NULL;
-
+
ctx->c_extra = &used_tport;
-
+
*url = *ag->ag_aliases->m_url;
url->url_user = "alice";
@@ -1275,7 +1275,7 @@
TEST_1(pl = test_payload(ag->ag_home, 512));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_MESSAGE,
@@ -1311,7 +1311,7 @@
url_t url[1];
sip_payload_t *pl;
tport_t *used_tport = NULL;
-
+
ctx->c_extra = &used_tport;
TEST_1(tport_is_primary(tcp_tport));
@@ -1324,7 +1324,7 @@
url->url_params = NULL; /* No sigcomp */
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
(url_string_t *)url,
SIP_METHOD_MESSAGE,
@@ -1363,7 +1363,7 @@
TEST_1(pl = test_payload(ag->ag_home, size));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1395,7 +1395,7 @@
TEST_1(pl = test_payload(ag->ag_home, size));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1436,7 +1436,7 @@
su_free(ag->ag_home, ag->ag_in_via), ag->ag_in_via = NULL;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1474,7 +1474,7 @@
TEST_1(pl = test_payload(ag->ag_home, size));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1495,7 +1495,7 @@
if (udp) {
/* Test 0.6
- * Send a message from default leg to server leg
+ * Send a message from default leg to server leg
* using a prefilled Via header
*/
client_t ctx[1] = {{ ag, "Test 0.6", check_magic_branch }};
@@ -1505,19 +1505,19 @@
sip_via_init(via);
via->v_protocol = sip_transport_udp;
-
+
via->v_host = ag->ag_contact->m_url->url_host;
via->v_port = ag->ag_contact->m_url->url_port;
-
+
sip_via_add_param(ag->ag_home, via, "branch=MagicalBranch");
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_USER_VIA(1),
TAG_END());
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1531,13 +1531,13 @@
TEST_1(!client_run(ctx, 200));
TEST_P(ag->ag_latest_leg, ag->ag_server_leg);
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_USER_VIA(0),
TAG_END());
}
/* Test 0.7
- * Send a message from Bob to Alice using SCTP
+ * Send a message from Bob to Alice using SCTP
*/
if (sctp) {
url_t url[1];
@@ -1557,7 +1557,7 @@
TEST_1(pl = test_payload(ag->ag_home, size));
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1580,7 +1580,7 @@
usize_t size = 128 * 1024;
client_t ctx[1] = {{ ag, "Test 0.8" }};
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_MAXSIZE(65536),
TAG_END());
@@ -1591,7 +1591,7 @@
ag->ag_expect_leg = ag->ag_server_leg;
ag->ag_latest_leg = NULL;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1606,7 +1606,7 @@
TEST_1(!client_run(ctx, 413));
TEST_P(ag->ag_latest_leg, NULL);
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_MAXSIZE(2 * 1024 * 1024),
TAG_END());
}
@@ -1619,10 +1619,10 @@
printf("%s: starting MESSAGE timeout test, completing in 4 seconds\n",
name);
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_TIMEOUT_408(1),
- NTATAG_SIP_T1(25),
- NTATAG_SIP_T1X64(64 * 25),
+ NTATAG_SIP_T1(25),
+ NTATAG_SIP_T1X64(64 * 25),
NTATAG_SIP_T2(8 * 25),
NTATAG_SIP_T4(10 * 25),
TAG_END());
@@ -1633,7 +1633,7 @@
ag->ag_expect_leg = ag->ag_server_leg;
ag->ag_latest_leg = NULL;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1654,7 +1654,7 @@
NTATAG_SIP_T4(NTA_SIP_T4),
TAG_END());
}
-
+
END();
}
@@ -1666,7 +1666,7 @@
{
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -1685,7 +1685,7 @@
{
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -1711,14 +1711,14 @@
client_t ctx[1] = {{ ag, "Test 3.1" }};
/* Test 3.1
- * Check that when a incoming request is destroyed in callback,
+ * Check that when a incoming request is destroyed in callback,
* a 500 response is sent
*/
ag->ag_expect_leg = ag->ag_default_leg;
nta_leg_bind(ag->ag_default_leg, leg_callback_destroy, ag);
-
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_default_leg,
+
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1738,9 +1738,9 @@
client_t ctx[1] = {{ ag, "Test 3.2" }};
nta_leg_bind(ag->ag_default_leg, leg_callback_save, ag);
-
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_default_leg,
+
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1778,9 +1778,9 @@
nta_leg_bind(ag->ag_default_leg, leg_callback_200, ag);
- nta_agent_set_params(ag->ag_agent,
- NTATAG_SIP_T1(8 * 25),
- NTATAG_SIP_T1X64(64 * 25),
+ nta_agent_set_params(ag->ag_agent,
+ NTATAG_SIP_T1(8 * 25),
+ NTATAG_SIP_T1X64(64 * 25),
NTATAG_SIP_T4(10 * 25),
TAG_END());
@@ -1805,7 +1805,7 @@
*/
client_t ctx[1] = {{ ag, "Test 1.1" }};
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1826,7 +1826,7 @@
client_t ctx[1] = {{ ag, "Test 1.2" }};
url->url_host = "srv.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1847,7 +1847,7 @@
client_t ctx[1] = {{ ag, "Test 1.3" }};
url->url_host = "ipv.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1868,7 +1868,7 @@
client_t ctx[1] = {{ ag, "Test 1.4.1" }};
url->url_host = "down.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1890,7 +1890,7 @@
client_t ctx[1] = {{ ag, "Test 1.4.2" }};
url->url_host = "na503.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1911,7 +1911,7 @@
client_t ctx[1] = {{ ag, "Test 1.4.3" }};
url->url_host = "nona.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1934,7 +1934,7 @@
client_t ctx[1] = {{ ag, "Test 1.4.4" }};
url->url_host = "nosrv.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1949,7 +1949,7 @@
}
{
- /* Test 1.5.1
+ /* Test 1.5.1
* Send a message to sip:srv.example.org;transport=tcp
* Test outgoing_make_srv_query()
*/
@@ -1957,7 +1957,7 @@
url->url_host = "srv.example.org";
url->url_params = "transport=tcp";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -1982,7 +1982,7 @@
url->url_host = "srv.example.org";
url->url_params = "transport=udp";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2007,7 +2007,7 @@
url->url_host = "srv2.example.org";
url->url_params = "transport=udp";
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2032,7 +2032,7 @@
url->url_host = "srv.example.org";
url->url_port = ag->ag_contact->m_url->url_port;
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2056,7 +2056,7 @@
url->url_host = "a.example.org";
url->url_port = ag->ag_contact->m_url->url_port;
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2081,7 +2081,7 @@
url->url_host = "na.example.org";
ag->ag_expect_leg = ag->ag_default_leg;
- TEST_1(ctx->c_orq =
+ TEST_1(ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2106,7 +2106,7 @@
url->url_host = "down2.example.org";
url->url_port = ag->ag_contact->m_url->url_port;
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2142,15 +2142,15 @@
nta_leg_bind(ag->ag_default_leg, leg_callback_200, ag);
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_MAXSIZE(2 * 1024 * 1024),
TAG_END());
BEGIN();
{
- /*
- * Send a message from default leg to default leg
+ /*
+ * Send a message from default leg to default leg
*
* We are now using url with an explicit port that does not match with
* our own port number.
@@ -2162,7 +2162,7 @@
url2->url_port = "9"; /* discard service */
ag->ag_expect_leg = ag->ag_default_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
(url_string_t *)url,
SIP_METHOD_MESSAGE,
@@ -2192,7 +2192,7 @@
* Alice to Bob.
*/
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback_200,
ag,
SIPTAG_FROM(ag->ag_alice),
@@ -2208,7 +2208,7 @@
/* Send message from Alice to Bob establishing the dialog */
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_alice_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -2231,7 +2231,7 @@
ag->ag_expect_leg = ag->ag_alice_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_bob_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_MESSAGE,
@@ -2246,7 +2246,7 @@
/* Send again message from Alice to Bob */
client_t ctx[1] = {{ ag, "Test 2.3" }};
ag->ag_expect_leg = ag->ag_bob_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_alice_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_MESSAGE,
@@ -2256,14 +2256,14 @@
TEST_1(!client_run(ctx, 200));
TEST_P(ag->ag_latest_leg, ag->ag_bob_leg);
}
-
+
{
/* Send message from Bob to Alice
- * This time, however, specify request URI
+ * This time, however, specify request URI
*/
client_t ctx[1] = {{ ag, "Test 2.4" }};
ag->ag_expect_leg = ag->ag_alice_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_bob_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_MESSAGE,
@@ -2289,7 +2289,7 @@
ssize_t n;
memset(b, 0, size);
-
+
for (;;) {
su_root_step(ag->ag_root, 10L);
if (su_wait(ag->ag_sink_wait, 1, 0) == 0) {
@@ -2306,14 +2306,14 @@
BEGIN();
/*
- * Test merging: send two messages with same
+ * Test merging: send two messages with same
* from tag/call-id/cseq number to nta,
* expect 200 and 408.
*/
char const rfc3261prefix[] = "z9hG4bK";
- char const template[] =
+ char const template[] =
"%s " URL_PRINT_FORMAT " SIP/2.0\r\n"
"Via: SIP/2.0/UDP 127.0.0.1:%s;branch=%s.%p\r\n"
"Via: SIP/2.0/TCP fake.address.for.via.example.net;branch=z9hG4bK.%p\r\n"
@@ -2357,9 +2357,9 @@
*u1 = *ag->ag_m_bob->m_url;
snprintf(m1, sizeof m1,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
+ /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
/* 2nd Via */ (void *)ag,
/* CSeq */ 13, "MESSAGE",
/* Call-ID */ (void *)ag,
@@ -2370,7 +2370,7 @@
*u2 = *ag->ag_m_bob->m_url;
snprintf(m2, sizeof m2,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u2),
/* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m2,
/* 2nd Via */ (void *)ag,
@@ -2398,7 +2398,7 @@
{
/*
- * Check that request with same call-id, cseq and from-tag
+ * Check that request with same call-id, cseq and from-tag
* are not merged if the method is different.
*/
nta_leg_bind(ag->ag_server_leg, leg_callback_200, ag);
@@ -2407,9 +2407,9 @@
*u1 = *ag->ag_m_bob->m_url;
snprintf(m1, sizeof m1,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
+ /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
/* 2nd Via */ (void *)ag,
/* CSeq */ 14, "MESSAGE",
/* Call-ID */ (void *)ag,
@@ -2420,7 +2420,7 @@
*u2 = *ag->ag_m_bob->m_url;
snprintf(m2, sizeof m2,
- template,
+ template,
"OPTIONS", URL_PRINT_ARGS(u2),
/* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m2,
/* 2nd Via */ (void *)ag,
@@ -2450,9 +2450,9 @@
/* test with rfc2543 */
snprintf(m1, sizeof m1,
- template,
+ template,
"MASSAGE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, "0.", (void *)0,
+ /* Via */ ag->ag_sink_port, "0.", (void *)0,
/* 2nd Via */ (void *)ag,
/* CSeq */ 14, "MASSAGE",
/* Call-ID */ (void *)(ag + 1),
@@ -2463,7 +2463,7 @@
u2->url_user = "bob+2";
snprintf(m2, sizeof m2,
- template,
+ template,
"MASSAGE", URL_PRINT_ARGS(u2),
/* Via */ ag->ag_sink_port, "0.", (void *)0,
/* 2nd Via */ (void *)ag,
@@ -2493,9 +2493,9 @@
/* test with to-tag */
snprintf(m1, sizeof m1,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
+ /* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m1,
/* 2nd Via */ (void *)ag,
/* CSeq */ 15, "MESSAGE",
/* Call-ID */ (void *)(ag + 2),
@@ -2506,7 +2506,7 @@
u2->url_user = "bob+2";
snprintf(m2, sizeof m2,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u2),
/* Via */ ag->ag_sink_port, rfc3261prefix, (void *)m2,
/* 2nd Via */ (void *)ag,
@@ -2536,9 +2536,9 @@
/* test with rfc2543 and to-tag */
snprintf(m1, sizeof m1,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, "0.", (void *)0,
+ /* Via */ ag->ag_sink_port, "0.", (void *)0,
/* 2nd Via */ (void *)ag,
/* CSeq */ 15, "MESSAGE",
/* Call-ID */ (void *)(ag + 2),
@@ -2547,7 +2547,7 @@
l1 = strlen(m1);
snprintf(m2, sizeof m2,
- template,
+ template,
"MESSAGE", URL_PRINT_ARGS(u2),
/* Via */ ag->ag_sink_port, "0.", (void *)0,
/* 2nd Via */ (void *)ag,
@@ -2575,7 +2575,7 @@
{
/* test INVITE/CANCEL with rfc2543 */
- char const template2[] =
+ char const template2[] =
"%s " URL_PRINT_FORMAT " SIP/2.0\r\n"
"Via: SIP/2.0/UDP 127.0.0.1:%s;x-kuik=%p\r\n"
"CSeq: %u %s\r\n"
@@ -2588,9 +2588,9 @@
nta_leg_bind(ag->ag_server_leg, new_leg_callback_180, ag);
snprintf(m1, sizeof m1,
- template2,
+ template2,
"INVITE", URL_PRINT_ARGS(u1),
- /* Via */ ag->ag_sink_port, m1,
+ /* Via */ ag->ag_sink_port, m1,
/* CSeq */ 15, "INVITE",
/* Call-ID */ (void *)(ag + 2),
/* From tag */ "2.6.1",
@@ -2606,7 +2606,7 @@
nta_incoming_bind(ag->ag_irq, wait_for_ack_or_cancel, ag);
snprintf(m2, sizeof m2,
- template2,
+ template2,
"CANCEL", URL_PRINT_ARGS(u1),
/* Via */ ag->ag_sink_port, m1,
/* CSeq */ 15, "CANCEL",
@@ -2629,7 +2629,7 @@
TEST_1(nta_incoming_status(ag->ag_irq) == 487);
snprintf(m2, sizeof m2,
- template2,
+ template2,
"ACK", URL_PRINT_ARGS(u1),
/* Via */ ag->ag_sink_port, m1,
/* CSeq */ 15, "ACK",
@@ -2651,7 +2651,7 @@
static
int wait_for_ack_or_cancel(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
sip_method_t method;
@@ -2671,7 +2671,7 @@
ag->ag_irq = NULL;
ag->ag_running = 0;
}
-
+
return 0;
}
@@ -2681,7 +2681,7 @@
static
int test_for_ack(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
sip_method_t method;
@@ -2695,7 +2695,7 @@
ag->ag_irq = NULL;
TEST(method, sip_method_ack);
-
+
ag->ag_running = 0;
END();
@@ -2709,13 +2709,13 @@
{
sip_method_t method = sip ? sip->sip_request->rq_method : sip_method_unknown;
- nta_incoming_treply(ag->ag_irq,
- SIP_200_OK,
+ nta_incoming_treply(ag->ag_irq,
+ SIP_200_OK,
SIPTAG_CONTACT(ag->ag_m_alice),
TAG_END());
TEST(method, sip_method_prack);
-
+
return 200;
}
@@ -2728,7 +2728,7 @@
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -2752,11 +2752,11 @@
nta_incoming_bind(irq, test_for_ack, ag);
nta_incoming_treply(irq, SIP_100_TRYING, TAG_END());
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_DEBUG_DROP_PROB(ag->ag_drop),
TAG_END());
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
NULL, NULL,
SIP_183_SESSION_PROGRESS,
@@ -2765,14 +2765,14 @@
SIPTAG_CONTACT(ag->ag_m_alice),
TAG_END());
TEST_1(ag->ag_reliable);
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
NULL, NULL,
184, "Next",
SIPTAG_CONTACT(ag->ag_m_alice),
TAG_END());
TEST_1(ag->ag_reliable);
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
test_for_prack, ag,
185, "Last",
@@ -2781,7 +2781,7 @@
TEST_1(ag->ag_reliable);
ag->ag_irq = irq;
return 0;
- }
+ }
if (sip->sip_request->rq_method == sip_method_bye) {
leg_zap(ag, leg);
@@ -2802,7 +2802,7 @@
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -2834,15 +2834,15 @@
TEST_1(nta_leg_tag(ag->ag_bob_leg, NULL));
TEST_1(nta_leg_get_tag(ag->ag_bob_leg));
TEST_1(nta_incoming_tag(irq, nta_leg_get_tag(ag->ag_bob_leg)));
- TEST(nta_leg_server_route(ag->ag_bob_leg,
- sip->sip_record_route,
+ TEST(nta_leg_server_route(ag->ag_bob_leg,
+ sip->sip_record_route,
sip->sip_contact), 0);
}
if (sip->sip_request->rq_method != sip_method_invite) {
return 200;
} else {
- nta_incoming_bind(irq, test_for_ack, ag);
+ nta_incoming_bind(irq, test_for_ack, ag);
#if 1
nta_incoming_treply(irq,
SIP_180_RINGING,
@@ -2877,7 +2877,7 @@
return 0;
}
-static
+static
int check_prack_sending(client_t *ctx, nta_outgoing_t *orq, sip_t const *sip)
{
agent_t *ag = ctx->c_ag;
@@ -2888,10 +2888,10 @@
nta_outgoing_t *prack = NULL;
TEST_1(sip->sip_rseq);
-
+
prack = nta_outgoing_prack(ag->ag_call_leg, orq, NULL, NULL,
NULL,
- sip,
+ sip,
TAG_END());
nta_outgoing_destroy(prack);
TEST_1(prack != NULL);
@@ -2901,7 +2901,7 @@
}
-static
+static
int check_leg_tagging(client_t *ctx, nta_outgoing_t *orq, sip_t const *sip)
{
agent_t *ag = ctx->c_ag;
@@ -2909,8 +2909,8 @@
if (200 <= status && status < 300) {
TEST_1(nta_leg_rtag(ag->ag_call_leg, sip->sip_to->a_tag));
-
- TEST(nta_leg_client_route(ag->ag_call_leg,
+
+ TEST(nta_leg_client_route(ag->ag_call_leg,
sip->sip_record_route,
sip->sip_contact), 0);
}
@@ -2919,7 +2919,7 @@
}
-static
+static
int check_tu_ack(client_t *ctx, nta_outgoing_t *orq, sip_t const *sip)
{
agent_t *ag = ctx->c_ag;
@@ -2946,7 +2946,7 @@
{
agent_t *ag = ctx->c_ag;
int status = ctx->c_status;
-
+
if (status >= 300)
ag->ag_call_leg = NULL;
@@ -3006,21 +3006,21 @@
*
* Alice sends a INVITE to Bob, then Bob sends 200 Ok.
*/
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback,
ag,
SIPTAG_FROM(ag->ag_alice),
SIPTAG_TO(ag->ag_bob),
TAG_END());
TEST_1(ag->ag_alice_leg);
-
+
TEST_1(nta_leg_tag(ag->ag_alice_leg, NULL));
nta_leg_bind(ag->ag_server_leg, bob_leg_callback, ag);
-
+
/* Send INVITE */
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3036,7 +3036,7 @@
TEST_1(ctx->c_orq);
/* Try to CANCEL it immediately */
TEST_1(nta_outgoing_cancel(ctx->c_orq) == 0);
- /* As Bob immediately answers INVITE with 200 Ok,
+ /* As Bob immediately answers INVITE with 200 Ok,
cancel should be answered with 481 and 200 Ok is returned to INVITE. */
TEST_1(!client_run(ctx, 200));
@@ -3068,8 +3068,8 @@
* waits for PRACKs, then sends 200, waits for ACK.
*/
ag->ag_expect_leg = ag->ag_alice_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_bob_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_bob_leg,
outgoing_callback, ctx,
NULL,
SIP_METHOD_INVITE,
@@ -3087,13 +3087,13 @@
{
client_t ctx[1] = {{ ag, "Hangup" }};
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_DEBUG_DROP_PROB(0),
TAG_END());
/* Send BYE from Bob to Alice */
old_leg = ag->ag_expect_leg = ag->ag_alice_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_bob_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_BYE,
@@ -3121,7 +3121,7 @@
/* Test early dialogs, PRACK */
int test_for_ack_or_timeout(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
BEGIN();
@@ -3159,7 +3159,7 @@
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -3188,16 +3188,16 @@
TEST_1(nta_leg_tag(ag->ag_bob_leg, NULL));
TEST_1(nta_leg_get_tag(ag->ag_bob_leg));
TEST_1(nta_incoming_tag(irq, nta_leg_get_tag(ag->ag_bob_leg)));
- TEST(nta_leg_server_route(ag->ag_bob_leg,
- sip->sip_record_route,
+ TEST(nta_leg_server_route(ag->ag_bob_leg,
+ sip->sip_record_route,
sip->sip_contact), 0);
}
if (sip->sip_request->rq_method != sip_method_invite) {
return 200;
- }
+ }
- nta_incoming_bind(irq, test_for_ack_or_timeout, ag);
+ nta_incoming_bind(irq, test_for_ack_or_timeout, ag);
nta_incoming_treply(irq,
SIP_183_SESSION_PROGRESS,
SIPTAG_CONTENT_TYPE(ag->ag_content_type),
@@ -3225,7 +3225,7 @@
int check_orq_tagging(client_t *ctx,
nta_outgoing_t *orq,
sip_t const *sip)
-{
+{
agent_t *ag = ctx->c_ag;
int status = ctx->c_status;
invite_client_t *ic = (invite_client_t *)ctx;
@@ -3235,21 +3235,21 @@
TEST_1(sip->sip_to->a_tag);
TEST_1(orq == ctx->c_orq);
-
+
TEST_1(ic); TEST_1(ic->ic_orq == NULL);
TEST_1(ic->ic_tag == NULL);
-
+
ic->ic_orq = orq;
ic->ic_tag = su_strdup(ag->ag_home, sip->sip_to->a_tag); TEST_1(ic->ic_tag);
ic->ic_tag_status = status;
-
+
TEST_S(nta_leg_rtag(ag->ag_call_leg, ic->ic_tag), ic->ic_tag);
-
- TEST(nta_leg_client_route(ag->ag_call_leg,
+
+ TEST(nta_leg_client_route(ag->ag_call_leg,
sip->sip_record_route,
sip->sip_contact), 0);
-
- orq = nta_outgoing_tagged(orq,
+
+ orq = nta_outgoing_tagged(orq,
outgoing_callback,
ctx,
ic->ic_tag,
@@ -3289,7 +3289,7 @@
return 200;
}
else if (ag->ag_irq) {
- nta_incoming_treply(ag->ag_irq,
+ nta_incoming_treply(ag->ag_irq,
504, "Reliable Response Timeout",
TAG_END());
nta_incoming_destroy(ag->ag_irq);
@@ -3309,7 +3309,7 @@
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -3338,8 +3338,8 @@
TEST_1(nta_leg_tag(ag->ag_bob_leg, NULL));
TEST_1(nta_leg_get_tag(ag->ag_bob_leg));
TEST_1(nta_incoming_tag(irq, nta_leg_get_tag(ag->ag_bob_leg)));
- TEST(nta_leg_server_route(ag->ag_bob_leg,
- sip->sip_record_route,
+ TEST(nta_leg_server_route(ag->ag_bob_leg,
+ sip->sip_record_route,
sip->sip_contact), 0);
}
@@ -3388,7 +3388,7 @@
ag->ag_expect_leg = ag->ag_server_leg;
ag->ag_latest_leg = NULL;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_default_leg, outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_PRACK,
@@ -3403,14 +3403,14 @@
TEST_P(ag->ag_latest_leg, NULL);
}
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback,
ag,
SIPTAG_FROM(ag->ag_alice),
SIPTAG_TO(ag->ag_bob),
TAG_END());
TEST_1(ag->ag_alice_leg);
-
+
TEST_1(nta_leg_tag(ag->ag_alice_leg, NULL));
/* Send INVITE */
@@ -3421,8 +3421,8 @@
nta_leg_bind(ag->ag_server_leg, bob_leg_callback2, ag);
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3447,7 +3447,7 @@
/* Send BYE from Bob to Alice */
old_leg = ag->ag_expect_leg = ag->ag_alice_leg;
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_bob_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_BYE,
@@ -3469,14 +3469,14 @@
ag->ag_call_leg = NULL;
/* Test CANCELing a call after receiving 100rel response */
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback,
ag,
SIPTAG_FROM(ag->ag_alice),
SIPTAG_TO(ag->ag_bob),
TAG_END());
TEST_1(ag->ag_alice_leg);
-
+
TEST_1(nta_leg_tag(ag->ag_alice_leg, NULL));
{
@@ -3490,8 +3490,8 @@
/* Send INVITE */
nta_leg_bind(ag->ag_server_leg, bob_leg_callback3, ag);
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3515,20 +3515,20 @@
if (EXPENSIVE_CHECKS) {
printf("%s: starting 100rel timeout test, test will complete in 4 seconds\n",
name);
-
+
TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_SIP_T1(25),
NTATAG_SIP_T1X64(64 * 25),
TAG_END()), 2);
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback,
ag,
SIPTAG_FROM(ag->ag_alice),
SIPTAG_TO(ag->ag_bob),
TAG_END());
TEST_1(ag->ag_alice_leg);
-
+
TEST_1(nta_leg_tag(ag->ag_alice_leg, NULL));
{
@@ -3536,15 +3536,15 @@
{{{{ ag, "Call 3", NULL, checks_for_invite, invite_client_deinit }}}};
client_t *ctx = ic->ic_client;
- /* Send INVITE,
+ /* Send INVITE,
* send precious provisional response
- * do not send PRACK,
+ * do not send PRACK,
* timeout (after 64 * t1 ~ 3.2 seconds),
*/
nta_leg_bind(ag->ag_server_leg, bob_leg_callback2, ag);
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ctx,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3556,7 +3556,7 @@
SIPTAG_PAYLOAD(sdp),
TAG_END());
TEST_1(ctx->c_orq);
-
+
nta_test_run(ag);
TEST(ctx->c_status, 503);
TEST_P(ctx->c_orq, NULL);
@@ -3564,16 +3564,16 @@
TEST_1(ag->ag_bob_leg == NULL);
}
- TEST(nta_agent_set_params(ag->ag_agent,
- NTATAG_SIP_T1(500),
- NTATAG_SIP_T1X64(64 * 500),
+ TEST(nta_agent_set_params(ag->ag_agent,
+ NTATAG_SIP_T1(500),
+ NTATAG_SIP_T1X64(64 * 500),
TAG_END()), 2);
}
if (EXPENSIVE_CHECKS || 1) {
/*
- * client sends INVITE,
- * server sends provisional response,
+ * client sends INVITE,
+ * server sends provisional response,
* client PRACKs it,
* client timeouts after timer C
*/
@@ -3584,12 +3584,12 @@
printf("%s: starting timer C, test will complete in 1 seconds\n",
name);
-
+
TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_TIMER_C(1000),
TAG_END()), 1);
- TEST_1(ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ TEST_1(ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback,
ag,
SIPTAG_FROM(ag->ag_alice),
@@ -3599,8 +3599,8 @@
nta_leg_bind(ag->ag_server_leg, bob_leg_callback3, ag);
ag->ag_expect_leg = ag->ag_server_leg;
- TEST_1(ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ TEST_1(ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ic->ic_client,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3615,13 +3615,13 @@
/* Run until 1) server gets CANCEL and 2) client gets 408 */
TEST_1(!client_run_until_canceled(ctx, 408));
- TEST_1(ag->ag_canceled != 0);
+ TEST_1(ag->ag_canceled != 0);
TEST_P(ag->ag_latest_leg, ag->ag_server_leg);
TEST_1(ag->ag_bob_leg);
nta_leg_destroy(ag->ag_bob_leg), ag->ag_bob_leg = NULL;
TEST(nta_agent_set_params(ag->ag_agent,
- NTATAG_TIMER_C(185 * 1000),
+ NTATAG_TIMER_C(185 * 1000),
TAG_END()), 1);
nta_leg_destroy(ag->ag_bob_leg), ag->ag_bob_leg = NULL;
@@ -3641,7 +3641,7 @@
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -3665,10 +3665,10 @@
nta_incoming_bind(irq, test_for_ack, ag);
nta_incoming_treply(irq, SIP_100_TRYING, TAG_END());
- nta_agent_set_params(ag->ag_agent,
+ nta_agent_set_params(ag->ag_agent,
NTATAG_DEBUG_DROP_PROB(ag->ag_drop),
TAG_END());
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
NULL, NULL,
SIP_183_SESSION_PROGRESS,
@@ -3677,14 +3677,14 @@
SIPTAG_CONTACT(ag->ag_m_alice),
TAG_END());
TEST_1(ag->ag_reliable);
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
NULL, NULL,
184, "Next",
SIPTAG_CONTACT(ag->ag_m_alice),
TAG_END());
TEST_1(ag->ag_reliable);
- ag->ag_reliable =
+ ag->ag_reliable =
nta_reliable_treply(irq,
NULL, NULL,
185, "Last",
@@ -3694,7 +3694,7 @@
TEST(nta_incoming_treply(irq, SIP_200_OK, TAG_END()), 0);
ag->ag_irq = irq;
return 0;
- }
+ }
if (sip->sip_request->rq_method == sip_method_bye) {
leg_zap(ag, leg);
@@ -3721,14 +3721,14 @@
BEGIN();
- ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
+ ag->ag_alice_leg = nta_leg_tcreate(ag->ag_agent,
alice_leg_callback2,
ag,
SIPTAG_FROM(ag->ag_alice),
SIPTAG_TO(ag->ag_bob),
TAG_END());
TEST_1(ag->ag_alice_leg);
-
+
TEST_1(nta_leg_tag(ag->ag_alice_leg, NULL));
ag->ag_bob_leg = NULL;
@@ -3740,8 +3740,8 @@
/* Send INVITE */
nta_leg_bind(ag->ag_server_leg, bob_leg_callback2, ag);
ag->ag_expect_leg = ag->ag_server_leg;
- ctx->c_orq =
- nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
+ ctx->c_orq =
+ nta_outgoing_tcreate(ag->ag_call_leg = ag->ag_alice_leg,
outgoing_callback, ic->ic_client,
ag->ag_obp,
SIP_METHOD_INVITE,
@@ -3766,7 +3766,7 @@
client_t ctx[1] = {{ ag, "Hangup" }};
/* Send BYE from Bob to Alice */
- ctx->c_orq =
+ ctx->c_orq =
nta_outgoing_tcreate(ag->ag_bob_leg, outgoing_callback, ctx,
NULL,
SIP_METHOD_BYE,
@@ -3803,7 +3803,7 @@
#endif
static
-char const nta_test_usage[] =
+char const nta_test_usage[] =
"usage: %s OPTIONS\n"
"where OPTIONS are\n"
" -v | --verbose be verbose\n"
@@ -3882,7 +3882,7 @@
if (rest == NULL || *rest)
usage(1);
-
+
su_log_set_level(nta_log, level);
su_log_set_level(tport_log, level);
}
@@ -3942,7 +3942,7 @@
do { fflush(stdout); \
if (retval && quit_on_single_failure) { su_deinit(); return retval; } \
} while(0)
-
+
retval |= test_init(ag, argv[i]); SINGLE_FAILURE_CHECK();
if (retval == 0) {
retval |= test_bad_messages(ag); SINGLE_FAILURE_CHECK();
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/test_nta_api.c Tue Dec 16 13:05:22 2008
@@ -143,14 +143,14 @@
static int incoming_callback_1(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
return 0;
}
static int incoming_callback_2(agent_t *ag,
- nta_incoming_t *irq,
+ nta_incoming_t *irq,
sip_t const *sip)
{
return 0;
@@ -173,10 +173,10 @@
BEGIN();
msg_t *msg;
char const *tag;
-
+
if (tstflags & tst_verbatim) {
printf("%s: %s: %s " URL_PRINT_FORMAT " %s\n",
- name, __func__, sip->sip_request->rq_method_name,
+ name, __func__, sip->sip_request->rq_method_name,
URL_PRINT_ARGS(sip->sip_request->rq_url),
sip->sip_request->rq_version);
}
@@ -188,7 +188,7 @@
TEST_VOID(nta_incoming_bind(irq, incoming_callback_1, ag));
TEST_P(nta_incoming_magic(irq, incoming_callback_1), ag);
TEST_P(nta_incoming_magic(irq, incoming_callback_2), 0);
-
+
TEST_1(tag = nta_incoming_tag(irq, "tag=foofaa"));
TEST_S(nta_incoming_gettag(irq), tag);
TEST_S(tag, "foofaa");
@@ -199,9 +199,9 @@
TEST_S(nta_incoming_method_name(irq), "MESSAGE");
TEST_1(nta_incoming_url(irq) != NULL);
TEST_1(nta_incoming_cseq(irq) != 0);
-
+
TEST(nta_incoming_set_params(irq, TAG_END()), 0);
-
+
TEST_1(msg = nta_incoming_getrequest(irq)); msg_destroy(msg);
TEST_P(nta_incoming_getrequest_ackcancel(irq), NULL);
TEST_P(nta_incoming_getresponse(irq), NULL);
@@ -225,9 +225,9 @@
int status = sip->sip_status->st_status;
if (tstflags & tst_verbatim) {
- printf("%s: %s: %s %03d %s\n", name, __func__,
- sip->sip_status->st_version,
- sip->sip_status->st_status,
+ printf("%s: %s: %s %03d %s\n", name, __func__,
+ sip->sip_status->st_version,
+ sip->sip_status->st_status,
sip->sip_status->st_phrase);
}
@@ -246,14 +246,14 @@
TEST_S(nta_outgoing_method_name(orq), "MESSAGE");
TEST(nta_outgoing_cseq(orq), sip->sip_cseq->cs_seq);
TEST_1(nta_outgoing_delay(orq) < UINT_MAX);
-
+
TEST_1(msg = nta_outgoing_getresponse(orq));
msg_destroy(msg);
-
+
TEST_1(msg = nta_outgoing_getrequest(orq));
msg_destroy(msg);
- nta_outgoing_destroy(orq);
+ nta_outgoing_destroy(orq);
/* Call it twice */
nta_outgoing_destroy(orq);
@@ -262,7 +262,7 @@
END();
}
-void
+void
nta_test_run(agent_t *ag)
{
time_t now = time(NULL);
@@ -307,7 +307,7 @@
NTATAG_PRELOAD(2048),
TAG_END()));
/* Create a default leg */
- TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
+ TEST_1(ag->ag_default_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback,
ag,
NTATAG_NO_DIALOG(1),
@@ -352,7 +352,7 @@
}
{
- char const data[] =
+ char const data[] =
"v=0\r\n"
"o=- 425432 423412 IN IP4 127.0.0.1\r\n"
"s= \r\n"
@@ -366,7 +366,7 @@
{
sip_contact_t *m;
- ag->ag_aliases =
+ ag->ag_aliases =
sip_contact_make(ag->ag_home, "sip:127.0.0.1, sip:localhost, sip:[::1]");
TEST_1(ag->ag_aliases);
TEST_1(ag->ag_aliases->m_next);
@@ -381,38 +381,38 @@
m->m_next = ag->ag_aliases;
ag->ag_aliases = m;
- TEST(nta_agent_set_params(ag->ag_agent,
+ TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_REL100(1),
- NTATAG_UA(1),
+ NTATAG_UA(1),
NTATAG_USE_NAPTR(1),
NTATAG_USE_SRV(1),
TAG_END()),
5);
- TEST(nta_agent_set_params(ag->ag_agent,
+ TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_DEFAULT_PROXY("sip:127.0.0.1"),
TAG_END()), 2);
- TEST(nta_agent_set_params(ag->ag_agent,
+ TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_ALIASES(ag->ag_aliases),
NTATAG_DEFAULT_PROXY(NULL),
TAG_END()), 2);
- TEST(nta_agent_set_params(ag->ag_agent,
+ TEST(nta_agent_set_params(ag->ag_agent,
NTATAG_DEFAULT_PROXY("tel:+35878008000"),
TAG_END()), -1);
}
-
+
{
url_t url[1];
/* Create the server leg */
*url = *ag->ag_aliases->m_url;
url->url_user = "%";
- TEST_1(ag->ag_server_leg = nta_leg_tcreate(ag->ag_agent,
+ TEST_1(ag->ag_server_leg = nta_leg_tcreate(ag->ag_agent,
leg_callback,
ag,
NTATAG_NO_DIALOG(1),
@@ -421,7 +421,7 @@
}
END();
-}
+}
int api_test_deinit(agent_t *ag)
{
@@ -443,7 +443,7 @@
free(ag->ag_mclass), ag->ag_mclass = NULL;
END();
-}
+}
static int api_test_destroy(agent_t *ag)
{
@@ -468,12 +468,12 @@
NULL,
NULL,
TAG_END()));
- TEST_1(leg = nta_leg_tcreate(nta, NULL, NULL,
+ TEST_1(leg = nta_leg_tcreate(nta, NULL, NULL,
NTATAG_NO_DIALOG(1),
TAG_END()));
/* This creates a delayed response message */
orq = nta_outgoing_tcreate(leg, outgoing_callback, ag, NULL,
- SIP_METHOD_MESSAGE,
+ SIP_METHOD_MESSAGE,
URL_STRING_MAKE("sip:foo.bar;transport=none"),
SIPTAG_FROM_STR("<sip:bar.foo>"),
SIPTAG_TO_STR("<sip:foo.bar>"),
@@ -482,7 +482,7 @@
TEST_VOID(nta_outgoing_destroy(orq));
TEST_VOID(nta_leg_destroy(leg));
- TEST_VOID(nta_agent_destroy(nta));
+ TEST_VOID(nta_agent_destroy(nta));
}
TEST_VOID(su_root_destroy(root));
@@ -573,9 +573,9 @@
NTATAG_USE_NAPTR_REF(use_naptr),
NTATAG_USE_SRV_REF(use_srv),
NTATAG_USE_TIMESTAMP_REF(use_timestamp),
- TAG_END()),
+ TAG_END()),
/* Number of parameters */ 33);
-
+
TEST_P(mclass, sip_default_mclass());
TEST_P(aliases, NULL);
TEST_1(contact != (void *)-1 && contact != NULL);
@@ -611,32 +611,32 @@
TEST_1(use_timestamp != -1);
TEST_1(user_via == 0);
- TEST(nta_agent_set_params(NULL,
+ TEST(nta_agent_set_params(NULL,
NTATAG_PRELOAD(2048),
TAG_END()), -1);
- TEST(nta_agent_get_params(NULL,
+ TEST(nta_agent_get_params(NULL,
NTATAG_PRELOAD_REF(preload),
TAG_END()), -1);
- TEST(nta_agent_set_params(nta,
+ TEST(nta_agent_set_params(nta,
NTATAG_PRELOAD(2048),
TAG_END()), 1);
- TEST(nta_agent_get_params(nta,
+ TEST(nta_agent_get_params(nta,
NTATAG_PRELOAD_REF(preload),
TAG_END()), 1);
TEST(preload, 2048);
- TEST(nta_agent_set_params(nta,
+ TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS("sip"),
TAG_END()), 1);
- TEST(nta_agent_set_params(nta,
+ TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS(","),
TAG_END()), -1);
- TEST(nta_agent_set_params(nta,
+ TEST(nta_agent_set_params(nta,
NTATAG_SIGCOMP_OPTIONS("sip;dms=16384"),
TAG_END()), 1);
s = NONE;
- TEST(nta_agent_get_params(nta,
+ TEST(nta_agent_get_params(nta,
NTATAG_SIGCOMP_OPTIONS_REF(s),
TAG_END()), 1);
TEST_S(s, "sip;dms=16384");
@@ -767,7 +767,7 @@
TEST_1(m = nta_agent_contact(agent));
TEST_S(m->m_url->url_params, "transport=tcp");
- TEST_1(nta_agent_add_tport(agent, (url_string_t *)url,
+ TEST_1(nta_agent_add_tport(agent, (url_string_t *)url,
TPTAG_SERVER(0), TAG_END()) == 0);
TEST_1(v = nta_agent_public_via(agent)); TEST_1(!v->v_next);
TEST(strcasecmp(v->v_protocol, sip_transport_tcp), 0);
@@ -794,9 +794,9 @@
TEST_1(agent = nta_agent_create(ag->ag_root, NONE, NULL, NULL, TAG_END()));
TEST_1(nta_agent_add_tport(agent, (url_string_t *)url, TAG_END()) == 0);
- TEST_1(v = nta_agent_via(agent));
+ TEST_1(v = nta_agent_via(agent));
TEST(strcasecmp(v->v_protocol, sip_transport_tcp), 0);
- TEST_1(v = v->v_next);
+ TEST_1(v = v->v_next);
TEST(strcasecmp(v->v_protocol, sip_transport_udp), 0);
TEST_1(m = nta_agent_contact(agent));
TEST_1(!m->m_url->url_params);
@@ -806,7 +806,7 @@
TEST_1(agent = nta_agent_create(ag->ag_root, NONE, NULL, NULL, TAG_END()));
TEST_1(nta_agent_add_tport(agent, (url_string_t *)url, TAG_END()) == 0);
- TEST_1(v = nta_agent_via(agent));
+ TEST_1(v = nta_agent_via(agent));
TEST(strcasecmp(v->v_protocol, sip_transport_udp), 0);
TEST_1(v = v->v_next);
TEST(strcasecmp(v->v_protocol, sip_transport_tcp), 0);
@@ -824,15 +824,15 @@
#if 0
{
/* Test 0.1
- * Send a message from default leg to default leg
+ * Send a message from default leg to default leg
*/
char const p_acid[] = "P-Access-Network-Info: IEEE-802.11g\n";
msg_t *msg;
ag->ag_expect_leg = ag->ag_default_leg;
- TEST_1(ag->ag_orq =
- nta_outgoing_tcreate(ag->ag_default_leg,
+ TEST_1(ag->ag_orq =
+ nta_outgoing_tcreate(ag->ag_default_leg,
outgoing_callback, ag,
ag->ag_obp,
SIP_METHOD_MESSAGE,
@@ -887,7 +887,7 @@
TEST_S(nta_outgoing_method_name(orq), "*");
TEST(nta_outgoing_cseq(orq), 0);
TEST_1(nta_outgoing_delay(orq) == UINT_MAX);
-
+
TEST_1(msg = nta_outgoing_getresponse(orq));
if (ag->ag_response == NULL)
ag->ag_response = msg;
@@ -916,7 +916,7 @@
TEST_VOID(nta_incoming_bind(irq, incoming_callback_1, ag));
TEST_P(nta_incoming_magic(irq, incoming_callback_1), ag);
TEST_P(nta_incoming_magic(irq, incoming_callback_2), 0);
-
+
TEST_P(nta_incoming_tag(irq, NULL), NULL);
TEST_P(nta_incoming_gettag(irq), NULL);
@@ -929,18 +929,18 @@
TEST(nta_incoming_received(irq, &nano), nano / 1000000000);
TEST(nta_incoming_set_params(irq, TAG_END()), 0);
-
+
TEST_P(nta_incoming_getrequest(irq), NULL);
TEST_P(nta_incoming_getrequest_ackcancel(irq), NULL);
TEST_P(nta_incoming_getresponse(irq), NULL);
-
+
TEST(nta_incoming_complete_response(irq, NULL, SIP_200_OK, TAG_END()), -1);
TEST(nta_incoming_treply(irq, SIP_200_OK, TAG_END()), -1);
TEST(nta_incoming_mreply(irq, NULL), -1);
-
+
TEST_VOID(nta_incoming_destroy(irq));
-
+
TEST_1(orq = nta_outgoing_default(nta, outgoing_default, ag));
TEST(nta_outgoing_status(orq), 0);
@@ -960,7 +960,7 @@
TEST_P(nta_outgoing_tcancel(orq, NULL, NULL, TAG_END()), NULL);
TEST_VOID(nta_outgoing_destroy(orq));
-
+
TEST_1(irq = nta_incoming_default(nta));
TEST_1(orq = nta_outgoing_default(nta, outgoing_default, ag));
@@ -968,7 +968,7 @@
via->v_next = NULL;
TEST_1(nta_incoming_treply
- (irq,
+ (irq,
SIP_200_OK,
SIPTAG_VIA(via),
SIPTAG_CALL_ID_STR("oishciucnkrcoihciunskcisj"),
@@ -985,7 +985,7 @@
TEST_VOID(nta_outgoing_destroy(orq));
TEST_VOID(nta_incoming_destroy(irq));
-
+
END();
}
@@ -1054,7 +1054,7 @@
TEST_1(msg = nta_msg_create(nta, 0));
TEST(nta_msg_complete(msg), -1);
- TEST(nta_msg_request_complete(msg, NULL,
+ TEST(nta_msg_request_complete(msg, NULL,
sip_method_unknown, "FOO", NULL), -1);
TEST(nta_is_internal_msg(NULL), 0);
TEST(nta_is_internal_msg(msg), 0);
@@ -1084,7 +1084,7 @@
TEST_VOID(nta_incoming_bind(NULL, NULL, NULL));
TEST_P(nta_incoming_magic(NULL, NULL), NULL);
-
+
TEST_P(nta_incoming_find(NULL, NULL, NULL), NULL);
TEST_P(nta_incoming_find(nta, NULL, NULL), NULL);
@@ -1111,14 +1111,14 @@
TEST(nta_incoming_mreply(NULL, NULL), -1);
TEST_VOID(nta_incoming_destroy(NULL));
-
- TEST_P(nta_outgoing_tcreate(NULL, outgoing_callback, ag,
+
+ TEST_P(nta_outgoing_tcreate(NULL, outgoing_callback, ag,
URL_STRING_MAKE("sip:localhost"),
SIP_METHOD_MESSAGE,
URL_STRING_MAKE("sip:localhost"),
TAG_END()), NULL);
- TEST_P(nta_outgoing_mcreate(NULL, outgoing_callback, ag,
+ TEST_P(nta_outgoing_mcreate(NULL, outgoing_callback, ag,
URL_STRING_MAKE("sip:localhost"),
NULL,
TAG_END()), NULL);
@@ -1166,7 +1166,7 @@
TEST_P(nta_reliable_mreply(NULL, NULL, NULL, NULL), NULL);
TEST_VOID(nta_reliable_destroy(NULL));
- TEST_VOID(nta_agent_destroy(nta));
+ TEST_VOID(nta_agent_destroy(nta));
TEST_VOID(su_root_destroy(root));
TEST_VOID(su_home_deinit(home));
@@ -1196,17 +1196,17 @@
NULL,
TAG_END()));
- TEST_1(dst = nta_leg_tcreate(nta, NULL, NULL,
+ TEST_1(dst = nta_leg_tcreate(nta, NULL, NULL,
NTATAG_NO_DIALOG(1),
URLTAG_URL("sip:joe at localhost"),
TAG_END()));
- TEST_1(defdst = nta_leg_tcreate(nta, NULL, NULL,
+ TEST_1(defdst = nta_leg_tcreate(nta, NULL, NULL,
NTATAG_NO_DIALOG(1),
TAG_END()));
- TEST_1(dialog1 =
- nta_leg_tcreate(nta, NULL, NULL,
+ TEST_1(dialog1 =
+ nta_leg_tcreate(nta, NULL, NULL,
URLTAG_URL("sip:pc.al.us"),
SIPTAG_CALL_ID_STR("foobarbaz"),
/* local */
@@ -1219,8 +1219,8 @@
TEST_1(a2 = sip_from_make(home, "<sip:joe.boy at al.us>;tag=al"));
TEST_1(i = sip_call_id_make(home, "foobarbaz"));
- TEST_1(dialog2 =
- nta_leg_tcreate(nta, NULL, NULL,
+ TEST_1(dialog2 =
+ nta_leg_tcreate(nta, NULL, NULL,
SIPTAG_CALL_ID(i),
/* local */
SIPTAG_FROM(a2),
@@ -1228,81 +1228,81 @@
SIPTAG_TO(a1),
TAG_END()));
- TEST_1(!nta_leg_by_dialog(nta, NULL, NULL,
+ TEST_1(!nta_leg_by_dialog(nta, NULL, NULL,
a1->a_tag, a1->a_url, a2->a_tag, a2->a_url));
- TEST_1(!nta_leg_by_dialog(NULL, NULL, i,
+ TEST_1(!nta_leg_by_dialog(NULL, NULL, i,
a1->a_tag, a1->a_url, a2->a_tag, a2->a_url));
- TEST_1(!nta_leg_by_dialog(nta, (void *)"sip:no.such.url", i,
+ TEST_1(!nta_leg_by_dialog(nta, (void *)"sip:no.such.url", i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url));
- TEST_1(!nta_leg_by_dialog(nta, a2->a_url, i,
+ TEST_1(!nta_leg_by_dialog(nta, a2->a_url, i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url));
- TEST_P(leg = nta_leg_by_dialog(nta, NULL, i,
- /* local */ a1->a_tag, a1->a_url,
+ TEST_P(leg = nta_leg_by_dialog(nta, NULL, i,
+ /* local */ a1->a_tag, a1->a_url,
/* remote */ a2->a_tag, a2->a_url),
dialog2);
- TEST_P(leg = nta_leg_by_dialog(nta, (void *)"sip:no.such.url", i,
- /* local */ a1->a_tag, a1->a_url,
+ TEST_P(leg = nta_leg_by_dialog(nta, (void *)"sip:no.such.url", i,
+ /* local */ a1->a_tag, a1->a_url,
/* remote */ a2->a_tag, a2->a_url),
dialog2);
- TEST_P(leg = nta_leg_by_dialog(nta, a2->a_url, i,
+ TEST_P(leg = nta_leg_by_dialog(nta, a2->a_url, i,
a1->a_tag, a1->a_url, a2->a_tag, a2->a_url),
dialog2);
- TEST_P(leg = nta_leg_by_dialog(nta, NULL, i,
+ TEST_P(leg = nta_leg_by_dialog(nta, NULL, i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url),
dialog1);
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url),
dialog1);
/* local tag is required because there is tag */
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, "xyzzy", a1->a_url),
NULL);
/* local URI is ignored because we have tag */
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, a1->a_tag, a2->a_url),
dialog1);
/* remote tag is ignored because there is no tag */
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
"xyzzy", a2->a_url, a1->a_tag, a1->a_url),
dialog1);
#if nomore
/* remote url is required */
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a1->a_url, a1->a_tag, a1->a_url),
NULL);
#endif
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, NULL, a1->a_tag, a1->a_url),
dialog1);
/* local url is used if there is no local tag */ /* XXX - not really */
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, NULL, NULL),
NULL);
nta_leg_tag(dialog1, "al");
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url),
dialog1);
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, "xyzzy", a1->a_url),
NULL);
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, a1->a_tag, a1->a_url),
dialog1);
- TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
+ TEST_P(leg = nta_leg_by_dialog(nta, (url_t *)"sip:pc.al.us", i,
a2->a_tag, a2->a_url, NULL, a1->a_url),
NULL);
-
+
nta_leg_destroy(defdst);
nta_leg_destroy(dst);
nta_leg_destroy(dialog1);
nta_leg_destroy(dialog2);
-
- TEST_VOID(nta_agent_destroy(nta));
+
+ TEST_VOID(nta_agent_destroy(nta));
TEST_VOID(su_root_destroy(root));
TEST_VOID(su_home_deinit(home));
@@ -1371,7 +1371,7 @@
if (rest == NULL || *rest)
usage(1);
-
+
su_log_set_level(nta_log, level);
su_log_set_level(tport_log, level);
}
@@ -1427,7 +1427,7 @@
retval |= api_test_dialogs(ag); SINGLE_FAILURE_CHECK();
retval |= api_test_default(ag); SINGLE_FAILURE_CHECK();
}
- retval |= api_test_deinit(ag); fflush(stdout);
+ retval |= api_test_deinit(ag); fflush(stdout);
su_home_deinit(ag->ag_home);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/Doxyfile.in Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
PROJECT_NAME = "nth"
OUTPUT_DIRECTORY = ../docs/html/nth
-INPUT = @srcdir@/nth.docs @srcdir@/sofia-sip @srcdir@ .
+INPUT = @srcdir@/nth.docs @srcdir@/sofia-sip @srcdir@ .
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../docs/Doxyfile.conf
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/http-client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/http-client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/http-client.c Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
#include "config.h"
/**@page http_client Make HTTP request
- *
+ *
* @par Name
* http-client - HTTP request tool
*
@@ -41,10 +41,10 @@
* <tt>http-client [OPTIONS] url</tt>
*
* @par Description
- *
+ *
* The @em http-client utility sends a HTTP request to an HTTP server or proxy.
*
- * @par
+ * @par
*
* The @em http-client tool will print out status line and interesting
* headers from the response. The message body is also printed.
@@ -142,7 +142,7 @@
return 0;
}
-static
+static
char *read_file(FILE *stream)
{
int n;
@@ -179,7 +179,7 @@
return buf;
}
-char const _usage[] =
+char const _usage[] =
"usage: %s [OPTIONS] url\n"
" where OPTIONS are as follows\n"
" --method=name\n"
@@ -206,15 +206,15 @@
su_home_t *home;
context_t context[1] = {{{SU_HOME_INIT(context)}}};
http_method_t method;
- char
- *o_proxy = NULL,
+ char
+ *o_proxy = NULL,
*o_user = NULL,
*o_max_forwards = NULL,
*o_method_name = "GET",
*o_user_agent = "http-client/1.0 " "nth/" NTH_VERSION;
- int
+ int
o_pipe = 0, o_extra = 0;
-
+
char *extra = NULL;
char *v;
@@ -239,7 +239,7 @@
else if (MATCH(v, "--pipe")) { o_pipe = 1; continue; }
else if (MATCH(v, "--extra")) { o_extra = 1; continue; }
else if (MATCH(v, "--help")) { usage(0); continue; }
- else
+ else
usage(1);
}
@@ -259,8 +259,8 @@
su_home_init(home = context->c_home);
if (o_extra) {
- if (isatty(0))
- fprintf(stderr,
+ if (isatty(0))
+ fprintf(stderr,
"Type extra HTTP headers, empty line then HTTP message body "
"(^D when complete):\n");
fflush(stderr);
@@ -271,8 +271,8 @@
context->c_root = su_root_create(context);
if (context->c_root) {
- context->c_engine =
- nth_engine_create(context->c_root,
+ context->c_engine =
+ nth_engine_create(context->c_root,
NTHTAG_ERROR_MSG(0),
TAG_END());
@@ -280,7 +280,7 @@
while ((v = argv++[1])) {
nth_client_t *clnt;
clnt = nth_client_tcreate(context->c_engine,
- response, context,
+ response, context,
method, o_method_name,
URL_STRING_MAKE(v),
NTHTAG_PROXY(o_proxy),
@@ -294,7 +294,7 @@
}
if (context->c_pending)
- su_root_run(context->c_root);
+ su_root_run(context->c_root);
nth_engine_destroy(context->c_engine), context->c_engine = NULL;
}
@@ -320,7 +320,7 @@
} else {
status = nth_client_status(clnt);
fprintf(stderr, "HTTP/1.1 %u Error\n", status);
- }
+ }
if (http && (c->c_pre || status >= 200)) {
http_header_t *h = (http_header_t *)http->http_status;
@@ -335,9 +335,9 @@
header_print(stdout, NULL, h);
else if (h->sh_class->hc_name[0]) {
snprintf(hname, sizeof hname, "%s: %%s\n", h->sh_class->hc_name);
- header_print(stdout, hname, h);
+ header_print(stdout, hname, h);
} else {
- header_print(stdout, "%s\n", h);
+ header_print(stdout, "%s\n", h);
}
}
@@ -364,7 +364,7 @@
//if (user && pass &&
if (
- auc_challenge(&c->c_auth, c->c_home,
+ auc_challenge(&c->c_auth, c->c_home,
http->http_www_authenticate,
http_authorization_class) > 0) {
char const *scheme = NULL;
@@ -375,7 +375,7 @@
"realm=");
if (auc_all_credentials(&c->c_auth, scheme, realm, user, pass)
>= 0)
- newclnt = nth_client_tcreate(c->c_engine,
+ newclnt = nth_client_tcreate(c->c_engine,
NULL, NULL, HTTP_NO_METHOD, NULL,
NTHTAG_AUTHENTICATION(&c->c_auth),
NTHTAG_TEMPLATE(clnt),
@@ -385,11 +385,11 @@
if (status == 302 && http->http_location) {
url_t loc[1];
-
+
*loc = *http->http_location->loc_url;
newclnt = nth_client_tcreate(c->c_engine, NULL, NULL,
- HTTP_NO_METHOD,
+ HTTP_NO_METHOD,
(url_string_t *)loc,
NTHTAG_TEMPLATE(clnt),
TAG_END());
@@ -398,7 +398,7 @@
if (newclnt)
c->c_pending++;
-
+
nth_client_destroy(clnt);
if (c->c_pending-- == 1)
su_root_break(c->c_root);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth.docs Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
/* -*- c -*- */
/**@MODULEPAGE "nth" - HTTP Transactions Module
- *
+ *
* @section nth_meta Module Meta Information
*
* NTH provides interface to simple HTTP transaction engines for both HTTP
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_client.c Tue Dec 16 13:05:22 2008
@@ -24,16 +24,16 @@
/**@CFILE nth_client.c
* @brief HTTP Client implementhtion
- *
+ *
* Copyright (c) 2002 Nokia Research Center. All rights reserved.
- *
+ *
* This source file has been divided into following sections:
* 1) engine
* 2) tport handling
* 3) client transactions
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Jun 13 02:57:51 2000 ppessi
*/
@@ -141,7 +141,7 @@
/* Attributes */
unsigned hc_streaming:1; /**< Enable streaming */
unsigned hc_error_msg:1;
- unsigned /* pad */:0;
+ unsigned /* pad */:0;
url_string_t const *hc_route_url;
tp_name_t hc_tpn[1]; /**< Where to send requests */
@@ -531,7 +531,7 @@
if (msg_size(msg))
SU_DEBUG_3(("nth client: received extra data ("MOD_ZU" bytes) "
"from %s/%s:%s\n",
- (size_t)msg_size(msg),
+ (size_t)msg_size(msg),
tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port));
else
SU_DEBUG_3(("nth client: received extra data from %s/%s:%s\n",
@@ -649,7 +649,7 @@
NTHTAG_AUTHENTICATION_REF(auc),
NTHTAG_MESSAGE_REF(msg),
NTHTAG_EXPIRES_REF(expires),
- HTTPTAG_VERSION_REF(version),
+ HTTPTAG_VERSION_REF(version),
TAG_END());
if (msg == none) {
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
/**@internal @file nth_server.c
* @brief HTTP server.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Sat Oct 19 01:37:36 2002 ppessi
*/
@@ -55,7 +55,7 @@
/* We are customer of tport_t */
#define TP_STACK_T server_t
#define TP_MAGIC_T void
-
+
#include <sofia-sip/tport.h>
#include <sofia-sip/htable.h>
@@ -78,7 +78,7 @@
HTABLE_DECLARE(hc_htable, hct, nth_client_t);
-struct server_s
+struct server_s
{
su_home_t srv_home[1];
su_root_t *srv_root;
@@ -109,7 +109,7 @@
http_server_t *srv_server; /**< Server header */
};
-struct nth_site_s
+struct nth_site_s
{
nth_site_t *site_next, **site_prev;
@@ -143,7 +143,7 @@
char const *req_method_name;
url_t const *req_url; /**< RequestURI */
char const *req_version;
-
+
tport_t *req_tport;
msg_t *req_request;
msg_t *req_response;
@@ -171,7 +171,7 @@
*
* The NTH_DEBUG environment variable is used to determine the debug
* logging level for @b nth module. The default level is 1.
- *
+ *
* @sa <sofia-sip/su_debug.h>, nth_server_log, SOFIA_DEBUG
*/
extern char const NTH_DEBUG[];
@@ -180,8 +180,8 @@
#define SU_DEBUG 1
#endif
-/**Debug log for @b nth module.
- *
+/**Debug log for @b nth module.
+ *
* The nth_server_log is the log object used by @b nth module. The level of
* #nth_server_log is set using #NTH_DEBUG environment variable.
*/
@@ -211,11 +211,11 @@
static nth_site_t *site_get_subdir(nth_site_t *parent, char const *path, char const **res);
static void server_tport_error(server_t *srv, tport_t *tport,
int errcode, char const *remote);
-static msg_t *server_msg_create(server_t *srv, int flags,
+static msg_t *server_msg_create(server_t *srv, int flags,
char const data[], usize_t dlen,
tport_t const *tp, tp_client_t *tpc);
-static void server_reply(server_t *srv, tport_t *tport,
+static void server_reply(server_t *srv, tport_t *tport,
msg_t *request, msg_t *response,
int status, char const *phrase);
@@ -232,13 +232,13 @@
* 5) Site functions
*/
-/** Create a http site object.
+/** Create a http site object.
*
* The function nth_site_create() allocates and initializes a web site
- * object. A web site object can be either
+ * object. A web site object can be either
* - a primary http server (@a parent is NULL),
- * - a virtual http server (@a address contains hostpart), or
- * - a site within a server
+ * - a virtual http server (@a address contains hostpart), or
+ * - a site within a server
* (@a address does not have hostpart, only path part).
*
* @param parent pointer to parent site
@@ -259,7 +259,7 @@
*
* @since Support for multiple sites was added to @VERSION_1_12_4
*/
-nth_site_t *nth_site_create(nth_site_t *parent,
+nth_site_t *nth_site_create(nth_site_t *parent,
nth_request_f *callback,
nth_site_magic_t *magic,
url_string_t const *address,
@@ -307,7 +307,7 @@
if (!url || !callback)
return NULL;
-
+
is_host = url->url_host != NULL;
is_path = url->url_path != NULL;
@@ -329,7 +329,7 @@
errno = EINVAL;
goto error;
}
-
+
srv = parent->site_server; assert(srv);
if (is_host) {
prev = site_get_host(&srv->srv_sites, url->url_host, url->url_port);
@@ -340,7 +340,7 @@
errno = EEXIST;
goto error;
}
- }
+ }
else {
size_t i, j;
@@ -370,7 +370,7 @@
prev = site_get_rslot(parent, path, &path);
if (!prev || path[0] == '\0') {
- SU_DEBUG_3(("nth_site_create(): directory \"%s\" already exists\n",
+ SU_DEBUG_3(("nth_site_create(): directory \"%s\" already exists\n",
url->url_path));
errno = EEXIST;
goto error;
@@ -396,7 +396,7 @@
if (srv && (site = su_zalloc(srv->srv_home, (sizeof *site) + usize))) {
site->site_url = (url_t *)(site + 1);
- url_dup((void *)(site->site_url + 1), usize - sizeof(*url),
+ url_dup((void *)(site->site_url + 1), usize - sizeof(*url),
site->site_url, url);
assert(prev);
@@ -423,7 +423,7 @@
site->site_wildcard = wildcard;
site->site_callback = callback;
site->site_magic = magic;
-
+
if (parent)
site->site_auth = parent->site_auth;
@@ -457,8 +457,8 @@
}
-void nth_site_bind(nth_site_t *site,
- nth_request_f *callback,
+void nth_site_bind(nth_site_t *site,
+ nth_request_f *callback,
nth_site_magic_t *magic)
{
if (site) {
@@ -517,7 +517,7 @@
TAG_IF(master, NTHTAG_MFLAGS_REF(mflags)),
NTHTAG_AUTH_MODULE_REF(am),
TAG_END());
-
+
if (n > 0) {
if (mclass)
server->srv_mclass = mclass;
@@ -558,13 +558,13 @@
TAG_IF(master, NTHTAG_MCLASS(mclass)),
TAG_IF(master, NTHTAG_MFLAGS(server->srv_mflags)),
TAG_END());
-
+
ta_end(ta);
return n;
}
-int nth_site_get_stats(nth_site_t const *site,
+int nth_site_get_stats(nth_site_t const *site,
tag_type_t tag, tag_value_t value, ...)
{
int n;
@@ -577,7 +577,7 @@
n = tl_tgets(ta_args(ta),
TAG_END());
-
+
ta_end(ta);
return n;
@@ -606,7 +606,7 @@
* When a resource
*/
static
-nth_site_t **site_get_rslot(nth_site_t *parent, char *path,
+nth_site_t **site_get_rslot(nth_site_t *parent, char *path,
char **return_rest)
{
nth_site_t *site, **prev;
@@ -626,7 +626,7 @@
continue;
if (path[len] == '\0') {
if (site->site_isdir)
- return *return_rest = path, prev;
+ return *return_rest = path, prev;
return errno = EEXIST, NULL;
}
if (path[len] != '/' || site->site_path[len] != '/')
@@ -662,7 +662,7 @@
if (path[0] == '\0')
return *return_rest = path, parent;
-
+
for (site = parent->site_kids; site; site = site->site_next) {
cmp = strncmp(path, site->site_path, len = site->site_path_len);
if (cmp > 0)
@@ -711,7 +711,7 @@
ta_list ta;
ta_start(ta, tag, value);
- tl_gets(ta_args(ta),
+ tl_gets(ta_args(ta),
NTHTAG_ROOT_REF(root),
NTHTAG_MCLASS_REF(mclass),
TPTAG_REUSE_REF(persistent),
@@ -719,7 +719,7 @@
HTTPTAG_SERVER_STR_REF(server_str),
TAG_END());
- if (!root || !url ||
+ if (!root || !url ||
(url->url_type != url_http && url->url_type != url_https)
|| !(srv = su_home_new(sizeof(*srv)))) {
ta_end(ta);
@@ -731,7 +731,7 @@
tpn->tpn_host = url->url_host;
tpn->tpn_port = url_port(url);
- srv->srv_tports = tport_tcreate(srv, nth_server_class, root,
+ srv->srv_tports = tport_tcreate(srv, nth_server_class, root,
TPTAG_IDLE(600000),
TPTAG_TIMEOUT(300000),
ta_tags(ta));
@@ -757,9 +757,9 @@
TAG_END());
}
else {
- SU_DEBUG_1(("nth_server_create: cannot bind transports "
+ SU_DEBUG_1(("nth_server_create: cannot bind transports "
URL_FORMAT_STRING "\n",
- URL_PRINT_ARGS(url)));
+ URL_PRINT_ARGS(url)));
server_destroy(srv), srv = NULL;
}
@@ -843,7 +843,7 @@
} else if (http && http->http_flags & MSG_FLG_TOOLARGE) {
server_reply(srv, tport, request, response, HTTP_413_ENTITY_TOO_LARGE);
return;
- } else if (!http || !http->http_request ||
+ } else if (!http || !http->http_request ||
(http->http_flags & MSG_FLG_ERROR)) {
server_reply(srv, tport, request, response, HTTP_400_BAD_REQUEST);
return;
@@ -933,7 +933,7 @@
}
/** Respond without creating a request structure */
-static void server_reply(server_t *srv, tport_t *tport,
+static void server_reply(server_t *srv, tport_t *tport,
msg_t *request, msg_t *response,
int status, char const *phrase)
{
@@ -947,23 +947,23 @@
status = 500, phrase = http_500_internal_server;
http = http_object(request);
-
+
if (http && http->http_request)
req_version = http->http_request->rq_version;
- close = status >= 200 &&
+ close = status >= 200 &&
(!srv->srv_persistent
|| status == 400
- || (http && http->http_request &&
+ || (http && http->http_request &&
http->http_request->rq_version != http_version_1_1)
- || (http && http->http_connection &&
+ || (http && http->http_connection &&
msg_params_find(http->http_connection->k_items, "close")));
msg_destroy(request);
http = http_object(response);
- pl = http_payload_format(msg_home(response),
+ pl = http_payload_format(msg_home(response),
"<html>\n"
"<head><title>%u %s</title></head>\n"
"<body><h2>%u %s</h2></body>\n"
@@ -976,7 +976,7 @@
st->st_version = http_version_1_1;
st->st_status = status;
st->st_phrase = phrase;
-
+
http_add_tl(response, http,
HTTPTAG_STATUS(st),
HTTPTAG_SERVER(srv->srv_server),
@@ -992,8 +992,8 @@
close = 1;
}
- if (tport_tqsend(tport, response, NULL,
- TPTAG_CLOSE_AFTER(close),
+ if (tport_tqsend(tport, response, NULL,
+ TPTAG_CLOSE_AFTER(close),
TAG_END()) == -1) {
SU_DEBUG_3(("server_reply(): cannot queue response\n"));
tport_shutdown(tport, 2);
@@ -1004,7 +1004,7 @@
/** Create a new message for transport */
static
-msg_t *server_msg_create(server_t *srv, int flags,
+msg_t *server_msg_create(server_t *srv, int flags,
char const data[], usize_t dlen,
tport_t const *tp, tp_client_t *tpc)
{
@@ -1014,7 +1014,7 @@
}
/* ----------------------------------------------------------------------
- * 6) Server transactions
+ * 6) Server transactions
*/
struct auth_info
@@ -1044,12 +1044,12 @@
int status;
req = su_zalloc(srv->srv_home, size);
-
+
if (req == NULL) {
server_reply(srv, tport, request, response, HTTP_500_INTERNAL_SERVER);
return;
}
-
+
if (am)
as = auth_status_init(req + 1, sizeof *as), ai = (void *)(as + 1);
else
@@ -1066,27 +1066,27 @@
req->req_response = response;
req->req_status = 100;
- req->req_close =
+ req->req_close =
!srv->srv_persistent
|| http->http_request->rq_version != http_version_1_1
- || (http->http_connection &&
+ || (http->http_connection &&
msg_params_find(http->http_connection->k_items, "close"));
if (am) {
- static auth_challenger_t const http_server_challenger[] =
+ static auth_challenger_t const http_server_challenger[] =
{{ HTTP_401_UNAUTHORIZED, http_www_authenticate_class }};
req->req_as = as;
as->as_method = http->http_request->rq_method_name;
as->as_uri = path;
-
+
if (http->http_payload) {
as->as_body = http->http_payload->pl_data;
as->as_bodylen = http->http_payload->pl_len;
}
- auth_mod_check_client(am, as,
+ auth_mod_check_client(am, as,
http->http_authorization,
http_server_challenger);
@@ -1143,13 +1143,13 @@
if (as->as_status != 0) {
assert(as->as_status >= 300);
- nth_request_treply(req, status = as->as_status, as->as_phrase,
- HTTPTAG_HEADER((http_header_t *)as->as_response),
+ nth_request_treply(req, status = as->as_status, as->as_phrase,
+ HTTPTAG_HEADER((http_header_t *)as->as_response),
TAG_END());
}
else {
req->req_in_callback = 1;
- status = ai->site->site_callback(ai->site->site_magic,
+ status = ai->site->site_callback(ai->site->site_magic,
ai->site,
ai->req,
ai->http,
@@ -1178,7 +1178,7 @@
req->req_destroyed = 1;
- if (req->req_in_callback)
+ if (req->req_in_callback)
return;
if (req->req_as)
@@ -1193,7 +1193,7 @@
/** Return request authentication status.
*
* @param req pointer to HTTP request object
- *
+ *
* @retval Status code
*
* @since New in @VERSION_1_12_4
@@ -1206,7 +1206,7 @@
/** Return request authentication status.
*
* @param req pointer to HTTP request object
- *
+ *
* @retval Pointer to authentication status struct
*
* @note The authentication status struct is freed when the #nth_request_t
@@ -1236,8 +1236,8 @@
return retval;
}
-int nth_request_treply(nth_request_t *req,
- int status, char const *phrase,
+int nth_request_treply(nth_request_t *req,
+ int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...)
{
msg_t *response, *next = NULL;
@@ -1261,14 +1261,14 @@
http_add_tl(response, http,
HTTPTAG_SERVER(req->req_server->srv_server),
- HTTPTAG_HEADER(as_info),
+ HTTPTAG_HEADER(as_info),
ta_tags(ta));
if (http->http_payload && !http->http_content_length) {
http_content_length_t *l;
http_payload_t *pl;
size_t len = 0;
-
+
for (pl = http->http_payload; pl; pl = pl->pl_next)
len += pl->pl_len;
@@ -1282,12 +1282,12 @@
if (req->req_method == http_method_head && http->http_payload) {
http_payload_t *pl;
-
+
for (pl = http->http_payload; pl; pl = pl->pl_next)
msg_header_remove(response, (msg_pub_t *)http, (msg_header_t *)pl);
}
- http_complete_response(response, status, phrase,
+ http_complete_response(response, status, phrase,
http_object(req->req_request));
if (!http->http_date) {
@@ -1303,9 +1303,9 @@
else {
req_close = req->req_close;
- close = (http->http_connection &&
+ close = (http->http_connection &&
msg_params_find(http->http_connection->k_items, "close"));
-
+
if (req_close && !close && status >= 200) {
close = 1;
http_add_tl(response, http, HTTPTAG_CONNECTION_STR("close"), TAG_END());
@@ -1314,13 +1314,13 @@
msg_serialize(response, (msg_pub_t *)http);
- retval = tport_tqsend(req->req_tport, response, next,
+ retval = tport_tqsend(req->req_tport, response, next,
TAG_IF(close, TPTAG_CLOSE_AFTER(1)),
ta_tags(ta));
fail:
ta_end(ta);
-
+
if (retval == 0)
req->req_status = status;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_tag.c Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
/**@CFILE nth_tag.c
* @brief Tags for HTTP Transaction API
*
- * @note This file is used to automatically generate
+ * @note This file is used to automatically generate
* nth_tag_ref.c and nth_tag_dll.c
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth.h Tue Dec 16 13:05:22 2008
@@ -31,10 +31,10 @@
*/
/* ----------------------------------------------------------------------
- * 1) Types
+ * 1) Types
*/
-#ifndef NTH_H_TYPES
+#ifndef NTH_H_TYPES
#define NTH_H_TYPES
/** NTH engine */
@@ -74,7 +74,7 @@
#define NTH_H
/* ----------------------------------------------------------------------
- * 2) Constants
+ * 2) Constants
*/
/** Version number */
@@ -108,11 +108,11 @@
tag_type_t tag, tag_value_t value, ...);
NTH_DLL void nth_engine_destroy(nth_engine_t *engine);
-NTH_DLL int nth_engine_set_params(nth_engine_t *engine,
+NTH_DLL int nth_engine_set_params(nth_engine_t *engine,
tag_type_t tag, tag_value_t value, ...);
-NTH_DLL int nth_engine_get_params(nth_engine_t const *engine,
+NTH_DLL int nth_engine_get_params(nth_engine_t const *engine,
tag_type_t tag, tag_value_t value, ...);
-NTH_DLL int nth_engine_get_stats(nth_engine_t const *engine,
+NTH_DLL int nth_engine_get_stats(nth_engine_t const *engine,
tag_type_t tag, tag_value_t value, ...);
NTH_DLL msg_t *nth_engine_msg_create(nth_engine_t *he, int flags);
@@ -147,15 +147,15 @@
* 5) Server side prototypes
*/
-typedef int nth_request_f(nth_site_magic_t *lmagic,
+typedef int nth_request_f(nth_site_magic_t *lmagic,
nth_site_t *server,
- nth_request_t *req,
+ nth_request_t *req,
http_t const *http,
char const *path);
char const *nth_site_server_version(void);
-NTH_DLL nth_site_t *nth_site_create(nth_site_t *parent,
+NTH_DLL nth_site_t *nth_site_create(nth_site_t *parent,
nth_request_f *req_callback,
nth_site_magic_t *magic,
url_string_t const *address,
@@ -166,13 +166,13 @@
NTH_DLL nth_site_magic_t *nth_site_magic(nth_site_t const *site);
-NTH_DLL void nth_site_bind(nth_site_t *site,
- nth_request_f *callback,
+NTH_DLL void nth_site_bind(nth_site_t *site,
+ nth_request_f *callback,
nth_site_magic_t *);
NTH_DLL su_time_t nth_site_access_time(nth_site_t const *site);
-NTH_DLL int nth_site_set_params(nth_site_t *site,
+NTH_DLL int nth_site_set_params(nth_site_t *site,
tag_type_t tag, tag_value_t value, ...);
NTH_DLL int nth_site_get_params(nth_site_t const *site,
tag_type_t tag, tag_value_t value, ...);
@@ -182,15 +182,15 @@
NTH_DLL url_t const *nth_site_url(nth_site_t const *site);
/* ----------------------------------------------------------------------
- * 6) Prototypes for server transactions
+ * 6) Prototypes for server transactions
*/
NTH_DLL int nth_request_status(nth_request_t const *req);
NTH_DLL http_method_t nth_request_method(nth_request_t const *req);
NTH_DLL msg_t *nth_request_message(nth_request_t *req);
-NTH_DLL int nth_request_treply(nth_request_t *ireq,
- int status, char const *phrase,
+NTH_DLL int nth_request_treply(nth_request_t *ireq,
+ int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
NTH_DLL void nth_request_destroy(nth_request_t *req);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth_tag.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/sofia-sip/nth_tag.h Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
/**@file sofia-sip/nth_tag.h
* @brief Tags for @b nth, HTTP engine module.
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Sun Oct 13 22:23:48 2002 ppessi
*/
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/test_nth.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/test_nth.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/test_nth.c Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
/**@file test_nth.c
* @brief Tests for nth module
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Tue Oct 22 20:52:37 2002 ppessi
*/
@@ -85,7 +85,7 @@
static int test_requests(tester_t *t);
static int init_engine(tester_t *t);
-struct site
+struct site
{
site_t *s_next, *s_parent;
tester_t *s_tester;
@@ -125,9 +125,9 @@
site_t *t_master;
};
-static int test_site(site_t *t,
+static int test_site(site_t *t,
nth_site_t *server,
- nth_request_t *req,
+ nth_request_t *req,
http_t const *http,
char const *path);
@@ -155,15 +155,15 @@
ta_start(ta, tag, value);
- s->s_tags = tl_adup(t->t_home, ta_args(ta));
+ s->s_tags = tl_adup(t->t_home, ta_args(ta));
if (s->s_tags)
s->s_ns = nth_site_create(pns, test_site, s,
- (url_string_t *)s->s_url,
+ (url_string_t *)s->s_url,
NTHTAG_ROOT(t->t_root),
ta_tags(ta));
ta_end(ta);
-
+
if (s->s_ns == NULL)
return NULL;
@@ -179,14 +179,14 @@
BEGIN();
t->t_root = su_root_create(t); TEST_1(t->t_root);
- t->t_mclass = msg_mclass_clone(http_default_mclass(), 0, 0);
+ t->t_mclass = msg_mclass_clone(http_default_mclass(), 0, 0);
TEST_1(t->t_mclass);
t->t_addr->su_len = (sizeof t->t_addr->su_sin);
s = su_socket(t->t_addr->su_family = AF_INET, SOCK_STREAM, 0);
TEST_1(s != INVALID_SOCKET);
TEST_1(su_inet_pton(AF_INET, "127.0.0.1", &t->t_addr->su_sin.sin_addr) >= 0);
- TEST_1(bind(s, &t->t_addr->su_sa,
+ TEST_1(bind(s, &t->t_addr->su_sa,
t->t_addrlen = (sizeof t->t_addr->su_sin)) != -1);
TEST_1(getsockname(s, &t->t_addr->su_sa, &t->t_addrlen) != -1);
TEST_1(t->t_addr->su_port != 0);
@@ -227,7 +227,7 @@
BEGIN();
- s = nth_engine_version();
+ s = nth_engine_version();
TEST_1(s); TEST_1(strlen(s)); TEST_S(s, "sofia-http-client/" NTH_CLIENT_VERSION);
TEST_1(nth_engine_create(NULL, TAG_END()) == NULL);
@@ -235,9 +235,9 @@
TEST_VOID(nth_engine_destroy(NULL));
TEST_1(nth_engine_get_params(NULL, TAG_END()) == -1);
TEST_1(nth_engine_set_params(NULL, TAG_END()) == -1);
- TEST_1(!nth_client_tcreate(NULL, NULL, NULL,
- HTTP_METHOD_OPTIONS,
- URL_STRING_MAKE("*"),
+ TEST_1(!nth_client_tcreate(NULL, NULL, NULL,
+ HTTP_METHOD_OPTIONS,
+ URL_STRING_MAKE("*"),
TAG_END()));
TEST(nth_client_status(NULL), 400);
TEST(nth_client_method(NULL), http_method_invalid);
@@ -247,7 +247,7 @@
TEST_P(nth_client_response(NULL), NULL);
TEST_VOID(nth_client_destroy(NULL));
- t->t_engine = nth_engine_create(t->t_root,
+ t->t_engine = nth_engine_create(t->t_root,
NTHTAG_ERROR_MSG(2),
NTHTAG_MCLASS(t->t_mclass),
NTHTAG_MFLAGS(MSG_DO_CANONIC|MSG_DO_COMPACT),
@@ -255,7 +255,7 @@
NTHTAG_PROXY("http://localhost:8888"),
TAG_END());
TEST_1(t->t_engine);
-
+
{
int error_msg = -1;
msg_mclass_t const *mclass = (void *)-1;
@@ -266,14 +266,14 @@
char *proxy_str;
- TEST(nth_engine_get_params(t->t_engine,
+ TEST(nth_engine_get_params(t->t_engine,
NTHTAG_ERROR_MSG_REF(error_msg),
NTHTAG_MCLASS_REF(mclass),
NTHTAG_MFLAGS_REF(mflags),
NTHTAG_EXPIRES_REF(expires),
NTHTAG_STREAMING_REF(streaming),
NTHTAG_PROXY_REF(proxy),
- TAG_END()),
+ TAG_END()),
6);
TEST(error_msg, 1);
@@ -287,14 +287,14 @@
proxy = URL_STRING_MAKE("http://127.0.0.1:80");
- TEST(nth_engine_set_params(t->t_engine,
+ TEST(nth_engine_set_params(t->t_engine,
NTHTAG_ERROR_MSG(0),
NTHTAG_MCLASS(http_default_mclass()),
NTHTAG_MFLAGS(0),
NTHTAG_EXPIRES(10000),
NTHTAG_STREAMING(2),
NTHTAG_PROXY(proxy),
- TAG_END()),
+ TAG_END()),
6);
error_msg = -1;
@@ -304,14 +304,14 @@
streaming = -1;
proxy = (void *)-1;
- TEST(nth_engine_get_params(t->t_engine,
+ TEST(nth_engine_get_params(t->t_engine,
NTHTAG_ERROR_MSG_REF(error_msg),
NTHTAG_MCLASS_REF(mclass),
NTHTAG_MFLAGS_REF(mflags),
NTHTAG_EXPIRES_REF(expires),
NTHTAG_STREAMING_REF(streaming),
NTHTAG_PROXY_REF(proxy),
- TAG_END()),
+ TAG_END()),
6);
TEST(error_msg, 0);
@@ -319,13 +319,13 @@
TEST(mflags, 0);
TEST(expires, 10000);
TEST(streaming, 1);
- TEST_1(proxy != NULL);
+ TEST_1(proxy != NULL);
TEST_1(proxy_str = url_as_string(t->t_home, proxy->us_url));
TEST_S(proxy_str, "http://127.0.0.1:80");
}
TEST_1(nth_engine_get_stats(NULL, TAG_END()) == -1);
-
+
{
msg_t *msg;
http_t *http;
@@ -349,9 +349,9 @@
END();
}
-static int site_check_all(site_t *t,
+static int site_check_all(site_t *t,
nth_site_t *server,
- nth_request_t *req,
+ nth_request_t *req,
http_t const *http,
char const *path);
@@ -360,12 +360,12 @@
{
char const *v;
site_t s[1];
-
+
BEGIN();
memset(s, 0, sizeof s);
- v = nth_site_server_version();
+ v = nth_site_server_version();
TEST_1(v); TEST_1(strlen(v)); TEST_S(v, "nth/" NTH_SERVER_VERSION);
/* Fails because no parent site, no root */
@@ -374,8 +374,8 @@
TAG_END()));
/* Fails because url specifies both host and path */
- TEST_1(!nth_site_create(NULL, site_check_all, s,
- URL_STRING_MAKE("http://127.0.0.1:8888/foo/"),
+ TEST_1(!nth_site_create(NULL, site_check_all, s,
+ URL_STRING_MAKE("http://127.0.0.1:8888/foo/"),
NTHTAG_ROOT(t->t_root), TAG_END()));
TEST_VOID(nth_site_destroy(NULL));
@@ -393,9 +393,9 @@
END();
}
-static int test_site(site_t *s,
+static int test_site(site_t *s,
nth_site_t *ns,
- nth_request_t *req,
+ nth_request_t *req,
http_t const *http,
char const *path)
{
@@ -411,9 +411,9 @@
}
-static int site_check_all(site_t *s,
+static int site_check_all(site_t *s,
nth_site_t *ns,
- nth_request_t *req,
+ nth_request_t *req,
http_t const *http,
char const *path)
{
@@ -462,45 +462,45 @@
auth_mod_t *am;
int temp;
- TEST_1(t->t_master = m =
+ TEST_1(t->t_master = m =
site_create(t, NULL,
- su_sprintf(t->t_home, "HTTP://127.0.0.1:%u",
+ su_sprintf(t->t_home, "HTTP://127.0.0.1:%u",
htons(t->t_addr->su_port)),
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR("<html><body>Hello</body></html>\n"),
TPTAG_CERTIFICATE(t->t_pem),
TAG_END()));
TEST_1(site_create(t, m, "/sub/sub",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR
("<html><body>sub/sub</body></html>\n"),
TAG_END()));
TEST_1(site_create(t, m, "/sub/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR("<html><body>sub/</body></html>\n"),
TAG_END()));
TEST_1(site_create(t, m, "/sub/sub/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR
("<html><body>sub/sub/</body></html>\n"),
TAG_END()));
- TEST_1(sub2 =
+ TEST_1(sub2 =
site_create(t, m, "/sub2/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR("<html><body>sub2/</body></html>\n"),
TAG_END()));
TEST_1(site_create(t, sub2, "sub/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR
("<html><body>sub2/sub/</body></html>\n"),
@@ -519,15 +519,15 @@
TEST_1(close(temp) == 0);
- am = auth_mod_create(t->t_root,
- AUTHTAG_METHOD("Digest"),
+ am = auth_mod_create(t->t_root,
+ AUTHTAG_METHOD("Digest"),
AUTHTAG_REALM("auth"),
AUTHTAG_DB(passwd_name),
TAG_END());
TEST_1(am);
TEST_1(site_create(t, m, "auth/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR
("<html><body>auth/</body></html>\n"),
@@ -537,15 +537,15 @@
auth_mod_unref(am);
- am = auth_mod_create(t->t_root,
- AUTHTAG_METHOD("Delayed+Basic"),
+ am = auth_mod_create(t->t_root,
+ AUTHTAG_METHOD("Delayed+Basic"),
AUTHTAG_REALM("auth2"),
AUTHTAG_DB(passwd_name),
TAG_END());
TEST_1(am);
TEST_1(site_create(t, m, "auth2/",
- HTTP_200_OK,
+ HTTP_200_OK,
HTTPTAG_CONTENT_TYPE_STR("text/html"),
HTTPTAG_PAYLOAD_STR
("<html><body>auth/</body></html>\n"),
@@ -604,12 +604,12 @@
END();
}
-int sspace(char const *buffer)
+int sspace(char const *buffer)
{
- int m = strcspn(buffer, " ");
+ int m = strcspn(buffer, " ");
- if (buffer[m])
- m += 1 + strcspn(buffer + m + 1, " ");
+ if (buffer[m])
+ m += 1 + strcspn(buffer + m + 1, " ");
return m;
}
@@ -624,7 +624,7 @@
BEGIN();
{
- static char const get[] =
+ static char const get[] =
"GET / HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -638,7 +638,7 @@
}
{
- static char const get[] =
+ static char const get[] =
"GET / HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -652,7 +652,7 @@
}
{
- static char const request[] =
+ static char const request[] =
"GET %s HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -724,7 +724,7 @@
}
{
- static char const get[] =
+ static char const get[] =
"GET /auth2/ HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -739,7 +739,7 @@
}
{
- static char const kuik[] =
+ static char const kuik[] =
"kuik" CRLF CRLF;
TEST(send_request(t, kuik, -1, 0, buffer, sizeof(buffer), &m), 0);
@@ -748,7 +748,7 @@
}
{
- static char const kuik[] =
+ static char const kuik[] =
"POST / HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"Content-Length: 4294967296" CRLF
@@ -760,7 +760,7 @@
}
{
- static char const get[] =
+ static char const get[] =
"GET / HTTP/10.10" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -774,7 +774,7 @@
}
{
- static char const get[] =
+ static char const get[] =
"GET /" CRLF;
TEST(send_request(t, get, -1, 1, buffer, sizeof(buffer) - 1, &m), 0);
@@ -785,7 +785,7 @@
if (0)
{
- static char const post[] =
+ static char const post[] =
"POST /foo HTTP/1.1" CRLF
"Host: 127.0.0.1" CRLF
"User-Agent: Test-Tool" CRLF
@@ -816,20 +816,20 @@
BEGIN();
su_socket_t s;
- t->t_engine = nth_engine_create(t->t_root,
+ t->t_engine = nth_engine_create(t->t_root,
NTHTAG_STREAMING(0),
TAG_END());
TEST_1(t->t_engine);
t->t_sink = s = su_socket(AF_INET, SOCK_STREAM, 0); TEST_1(s != -1);
- TEST(bind(s, &t->t_sinkaddr->su_sa,
+ TEST(bind(s, &t->t_sinkaddr->su_sa,
t->t_sinkaddrlen = (sizeof t->t_sinkaddr->su_sin)),
0);
TEST_1(getsockname(s, &t->t_sinkaddr->su_sa, &t->t_sinkaddrlen) != -1);
TEST(listen(t->t_sink, 5), 0);
-
+
TEST_1(t->t_sinkuri = (url_string_t *)
- su_sprintf(t->t_home, "HTTP://127.0.0.1:%u",
+ su_sprintf(t->t_home, "HTTP://127.0.0.1:%u",
htons(t->t_sinkaddr->su_port)));
END();
@@ -883,7 +883,7 @@
while (client->c_status == 0) su_root_step(t->t_root, 1);
TEST(client->c_status, 408);
nth_client_destroy(hc);
-
+
END();
}
#if HAVE_ALARM
@@ -956,7 +956,7 @@
retval |= init_engine(t);
retval |= test_client(t);
retval |= deinit_test(t);
-
+
su_deinit();
return retval;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/ChangeLog Tue Dec 16 13:05:22 2008
@@ -16,7 +16,7 @@
* Fixed call state events with UPDATE in nua.
- Fixed the order the nua_i_update and nua_i_state events are sent.
+ Fixed the order the nua_i_update and nua_i_state events are sent.
Now we are using session-timer headers in responses, too.
* Added NUTAG_ALLOW() and NUTAG_ALLOW_REF() to nua.
@@ -67,7 +67,7 @@
* Fixed response to 401.
We are now not terminating call when application is expected to authenticate
- request. Should we add
+ request. Should we add
M ./libsofia-sip-ua/nua/nua_stack.c -10 +28
@@ -208,7 +208,7 @@
2005-10-10 Pekka Pessi <Pekka.Pessi at nokia.com>
- * Fixed basic call test run.
+ * Fixed basic call test run.
M ./libsofia-sip-ua/nua/test_nua.c -8 +11
@@ -217,7 +217,7 @@
M ./libsofia-sip-ua/nua/nua_common.c -1 +1
M ./libsofia-sip-ua/nua/nua_stack.c -1 +1
M ./libsofia-sip-ua/nua/test_nua.c -2 +2
-
+
* Running a basic call test case.
M ./libsofia-sip-ua/nua/test_nua.c -24 +109
@@ -259,11 +259,11 @@
M ./libsofia-sip-ua/nua/nua.docs -1 +355
- * Used picture-mode here.
+ * Used picture-mode here.
M ./libsofia-sip-ua/nua/nua.docs -227 +227
- * Fixed nua_set_hparams() documentation.
+ * Fixed nua_set_hparams() documentation.
M ./libsofia-sip-ua/nua/nua.c -1 +1
@@ -444,7 +444,7 @@
* Do not pass soa handle to application.
M ./libsofia-sip-ua/nua/nua_stack.c -3 +3
-
+
2005-09-23 Kai Vehmanen <kai.vehmanen at nokia.com>
* nua_stack.c: Fix delivering nua_i_active.
@@ -457,7 +457,7 @@
* nua_tag.h: Removed NUTAG_MEDIA_SUBSYSTEM.
- * nua.h: Added nua_i_state_change event. Removed
+ * nua.h: Added nua_i_state_change event. Removed
nua_i_media_update (replaced by nua_i_state_change).
2005-09-21 Kai Vehmanen <kai.vehmanen at nokia.com>
@@ -466,15 +466,15 @@
code related to old media subsystem interface (HAVE_MSS).
Added nua_i_media_update event. Removed code related
to ring-tone generation (HAVE_HERBIE).
-
+
2005-09-20 Kai Vehmanen <kai.vehmanen at nokia.com>
* nua.h, nua.c: Removed implementation for obsolete media
- param functions. Added dummy implementations that print
+ param functions. Added dummy implementations that print
a warning to users of the removed interfaces.
* nua_stack.c: Removed obsolete media param code.
-
+
2005-07-18 Kai Vehmanen <kai.vehmanen at nokia.com>
* Initial import of the module to Sofia-SIP tree.
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.c Tue Dec 16 13:05:22 2008
@@ -99,14 +99,14 @@
* (but see also NUTAG_INITIAL_ROUTE()).
* - NUTAG_URL() (and NUTAG_SIPS_URL(), listing URIs describing
* transports)
- * - NUTAG_CERTIFICATE_DIR(), specifying the location of the
+ * - NUTAG_CERTIFICATE_DIR(), specifying the location of the
* root and client/server certificate files
- * - NUTAG_SIP_PARSER(), providing customized parser used to
+ * - NUTAG_SIP_PARSER(), providing customized parser used to
* parse received SIP messages
* - All parameter tags, listed with nua_set_params()
* - All NTATAG_* are passed to NTA documented in <sofia-sip/nta_tag.h>:
- * see NTATAG_EXTRA_100(),
- * - All tport tags are passed to tport.
+ * see NTATAG_EXTRA_100(),
+ * - All tport tags are passed to tport.
* They are documented in <sofia-sip/tport_tag.h>
* - All SOATAG_* are passed to the default SOA (media session) object which
* is created by nua_create() unless NUTAG_MEDIA_ENABLE(0) is included in
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua.docs Tue Dec 16 13:05:22 2008
@@ -338,7 +338,7 @@
that uses services of NUA. The example is not complete but should present
all relevant details of the basic use of NUA.
-On sourceforge.net there is available an example application
+On sourceforge.net there is available an example application
<a href="http://sourceforge.net/project/showfiles.php?group_id=143636&package_id=179933">
sofisip_cli.c</a> that can be studied for more complete example.
@@ -591,7 +591,7 @@
NUTAG_CALLSTATE_REF(state),
NUTAG__REF(state),
-
+
state = (nua_callstate_t)t->t_value;
printf("call %s\n", nua_callstate_name(state));
@@ -935,7 +935,7 @@
SOATAG_ACTIVE_VIDEO() are informational tags used to indicate what is the
status of these media.
-The #nua_i_state event is not sent, however, if the change is invoked by
+The #nua_i_state event is not sent, however, if the change is invoked by
application calling API functions like nua_bye() and there is no change in
SDP offer/answer status.
@@ -2089,7 +2089,7 @@
* #nua_r_unregister \n
* #nua_r_unsubscribe \n
* #nua_r_update
- *
+ *
* @sa nua_event_is_incoming_request(), nua_event_name()
*/
@@ -2175,7 +2175,7 @@
* @param tags empty
*
* @since Experimental in @VERSION_1_12_2.
- *
+ *
* @END_NUA_EVENT
*/
@@ -2276,7 +2276,7 @@
* @param hmagic operation magic associated with the notifier
* @param sip NULL
* @param tags empty
- *
+ *
* @sa nua_terminate(), nua_handle_destroy()
*
* @END_NUA_EVENT
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_common.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_common.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_common.c Tue Dec 16 13:05:22 2008
@@ -23,12 +23,12 @@
*/
/**@CFILE nua_common.c
- * @brief Function common to both stack and application side.
- *
+ * @brief Function common to both stack and application side.
+ *
* @author Pekka.Pessi at nokia.com
- *
+ *
* @date Created: Tue Apr 26 13:23:17 2005 ppessi
- *
+ *
*/
#include "config.h"
@@ -76,7 +76,7 @@
static void nh_destructor(void *arg);
/**@internal
- * Create an operation handle
+ * Create an operation handle
*
* Allocates a new operation handle and associated storage.
*
@@ -88,7 +88,7 @@
* @retval NULL Creation failed
*
* @par Related tags:
- * Creates a copy of the provided tags which will
+ * Creates a copy of the provided tags which will
* be used with every operation.
*
* @par Events:
@@ -120,7 +120,7 @@
(void *)nua, (void *)nh));
su_home_unref(nh->nh_home), nh = NULL;
}
-
+
if (nh && su_home_is_threadsafe(nua->nua_home)) {
if (su_home_threadsafe(nh->nh_home) < 0) {
su_home_unref(nh->nh_home);
@@ -128,13 +128,13 @@
}
}
- if (nh && _handle_lifetime) {
+ if (nh && _handle_lifetime) {
/* This far, we have nothing real to destruct but
- * when _NUA_HANDLE_DEBUG is set, we add destructor
+ * when _NUA_HANDLE_DEBUG is set, we add destructor
* and get more entertaining debugging output */
if (_handle_lifetime == 1 && !getenv("_NUA_HANDLE_DEBUG")) {
_handle_lifetime = 0;
- }
+ }
else {
_handle_lifetime = 2;
SU_DEBUG_0(("nh_handle_create(%p)\n", (void *)nh));
@@ -222,7 +222,7 @@
return (nua_handle_t *)su_home_ref(nh->nh_home);
}
-/** Destroy reference to handle.
+/** Destroy reference to handle.
*
* The handles use reference counting for memory management. In addition to
* the memory management, there is protocol state associated with the
@@ -301,7 +301,7 @@
}
}
-/** Get name for a NUA event.
+/** Get name for a NUA event.
*
* @sa #nua_event_e, #nua_event_t, nua_callstate_name(), nua_substate_name()
*/
@@ -374,7 +374,7 @@
}
/** Return name of call state.
- *
+ *
* @sa enum #nua_callstate, nua_event_name(), nua_substate_name()
*/
char const *nua_callstate_name(enum nua_callstate state)
@@ -395,7 +395,7 @@
}
}
-/** Return name of subscription state. @NEW_1_12_5.
+/** Return name of subscription state. @NEW_1_12_5.
*
* @sa enum #nua_substate, nua_event_name(), nua_callstate_name()
*/
@@ -424,7 +424,7 @@
return nua_substate_terminated;
else if (strcasecmp(sip_substate, "pending") == 0)
return nua_substate_pending;
- else /* if (strcasecmp(sip_substate, "active") == 0) */
+ else /* if (strcasecmp(sip_substate, "active") == 0) */
return nua_substate_active;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.c Tue Dec 16 13:05:22 2008
@@ -59,7 +59,7 @@
/* ======================================================================== */
/* Dialog handling */
-static void nua_dialog_usage_remove_at(nua_owner_t*, nua_dialog_state_t*,
+static void nua_dialog_usage_remove_at(nua_owner_t*, nua_dialog_state_t*,
nua_dialog_usage_t**,
nua_client_request_t *cr,
nua_server_request_t *sr);
@@ -75,9 +75,9 @@
* @param sip SIP message containing response used to update dialog
* @param rtag if true, set remote tag within the leg
*/
-void nua_dialog_uas_route(nua_owner_t *own,
+void nua_dialog_uas_route(nua_owner_t *own,
nua_dialog_state_t *ds,
- sip_t const *sip,
+ sip_t const *sip,
int rtag)
{
int established = nua_dialog_is_established(ds);
@@ -105,7 +105,7 @@
* @param sip SIP message containing response used to update dialog
* @param rtag if true, set remote tag within the leg
*/
-void nua_dialog_uac_route(nua_owner_t *own,
+void nua_dialog_uac_route(nua_owner_t *own,
nua_dialog_state_t *ds,
sip_t const *sip,
int rtag)
@@ -126,7 +126,7 @@
}
/**@internal Store information from remote endpoint. */
-void nua_dialog_store_peer_info(nua_owner_t *own,
+void nua_dialog_store_peer_info(nua_owner_t *own,
nua_dialog_state_t *ds,
sip_t const *sip)
{
@@ -190,7 +190,7 @@
nua_dialog_state_t *ds)
{
/* zap peer info */
- nua_dialog_store_peer_info(own, ds, NULL);
+ nua_dialog_store_peer_info(own, ds, NULL);
/* Local Contact */
msg_header_free(own, (msg_header_t *)ds->ds_ltarget), ds->ds_ltarget = NULL;
/* Leg */
@@ -216,7 +216,7 @@
/** @internal Get dialog usage slot. */
nua_dialog_usage_t **
-nua_dialog_usage_at(nua_dialog_state_t const *ds,
+nua_dialog_usage_at(nua_dialog_state_t const *ds,
nua_usage_class const *kind,
sip_event_t const *event)
{
@@ -257,7 +257,7 @@
}
/** @internal Get a dialog usage */
-nua_dialog_usage_t *nua_dialog_usage_get(nua_dialog_state_t const *ds,
+nua_dialog_usage_t *nua_dialog_usage_get(nua_dialog_state_t const *ds,
nua_usage_class const *kind,
sip_event_t const *event)
{
@@ -270,11 +270,11 @@
if (du == NULL)
return "<NULL>";
return du->du_class->usage_name(du);
-}
+}
/** @internal Add dialog usage */
-nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *own,
- struct nua_dialog_state *ds,
+nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *own,
+ struct nua_dialog_state *ds,
nua_usage_class const *uclass,
sip_event_t const *event)
{
@@ -286,9 +286,9 @@
du = *prev_du;
if (du) { /* Already exists */
SU_DEBUG_5(("nua(%p): adding already existing %s usage%s%s\n",
- (void *)own, nua_dialog_usage_name(du),
+ (void *)own, nua_dialog_usage_name(du),
event ? " with event " : "", event ? event->o_type : ""));
-
+
if (prev_du != &ds->ds_usage) {
/* Move as a first usage in the list */
*prev_du = du->du_next;
@@ -305,7 +305,7 @@
if (du) {
su_home_ref(own);
- du->du_dialog = ds;
+ du->du_dialog = ds;
du->du_class = uclass;
du->du_event = o;
@@ -314,9 +314,9 @@
su_free(own, du);
return NULL;
}
-
+
SU_DEBUG_5(("nua(%p): adding %s usage%s%s\n",
- (void *)own, nua_dialog_usage_name(du),
+ (void *)own, nua_dialog_usage_name(du),
o ? " with event " : "", o ? o->o_type :""));
du->du_next = ds->ds_usage, ds->ds_usage = du;
@@ -331,7 +331,7 @@
}
/** @internal Remove dialog usage. */
-void nua_dialog_usage_remove(nua_owner_t *own,
+void nua_dialog_usage_remove(nua_owner_t *own,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
@@ -350,9 +350,9 @@
nua_dialog_usage_remove_at(own, ds, at, cr, sr);
}
-/** @internal Remove dialog usage.
+/** @internal Remove dialog usage.
*
- * Zap dialog state (leg, tag and route) if no usages remain.
+ * Zap dialog state (leg, tag and route) if no usages remain.
*/
static void
nua_dialog_usage_remove_at(nua_owner_t *own,
@@ -372,7 +372,7 @@
o = du->du_event;
SU_DEBUG_5(("nua(%p): removing %s usage%s%s\n",
- (void *)own, nua_dialog_usage_name(du),
+ (void *)own, nua_dialog_usage_name(du),
o ? " with event " : "", o ? o->o_type :""));
du->du_class->usage_remove(own, ds, du, cr0, sr0);
@@ -423,7 +423,7 @@
char buffer[160];
size_t l = 0, N = sizeof buffer;
ssize_t n;
-
+
buffer[0] = '\0';
for (du = ds->ds_usage; du; du = du->du_next) {
@@ -441,9 +441,9 @@
l += 2;
}
}
-
+
SU_DEBUG_3(("nua(%p): handle with %s%s%s\n", (void *)own,
- ds->ds_has_session ? "session and " : "",
+ ds->ds_has_session ? "session and " : "",
ds->ds_has_events ? "events " : "",
buffer));
}
@@ -486,7 +486,7 @@
}
/**@internal
- * Set refresh value suitably.
+ * Set refresh value suitably.
*
* The refresh time is set either around half of the @a delta interval or,
* if @a delta is less than 5 minutes but longer than 90 seconds, 30..60
@@ -512,7 +512,7 @@
}
/**@internal Set refresh in range min..max seconds in the future. */
-void nua_dialog_usage_set_refresh_range(nua_dialog_usage_t *du,
+void nua_dialog_usage_set_refresh_range(nua_dialog_usage_t *du,
unsigned min, unsigned max)
{
sip_time_t now = sip_now(), target;
@@ -546,7 +546,7 @@
SU_DEBUG_7(("nua(): refresh %s after %lu seconds\n",
nua_dialog_usage_name(du), target - sip_now()));
du->du_refresh = target;
-}
+}
/**@internal Do not refresh. */
void nua_dialog_usage_reset_refresh(nua_dialog_usage_t *du)
@@ -560,7 +560,7 @@
/** @internal Refresh usage. */
void nua_dialog_usage_refresh(nua_owner_t *owner,
nua_dialog_state_t *ds,
- nua_dialog_usage_t *du,
+ nua_dialog_usage_t *du,
sip_time_t now)
{
assert(du && du->du_class->usage_refresh);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <nua_dialog.h> has been included. */
#define NUA_DIALOG_H
-/**@IFILE nua_dialog.h
+/**@IFILE nua_dialog.h
* @brief Dialog and dialog usage handling
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -42,7 +42,7 @@
#endif
typedef struct {
- sip_method_t sm_method;
+ sip_method_t sm_method;
char const *sm_method_name;
int sm_event;
@@ -80,7 +80,7 @@
nua_dialog_usage_t *sr_usage; /**< Backpointer to usage */
nta_incoming_t *sr_irq; /**< Server transaction object */
-
+
struct {
msg_t *msg; /**< Request message */
sip_t const *sip; /**< Headers in request message */
@@ -133,7 +133,7 @@
#define SR_HAS_SAVED_SIGNAL(sr) ((sr)->sr_signal[0] != NULL)
-su_inline
+su_inline
int sr_status(nua_server_request_t *sr, int status, char const *phrase)
{
return (void)(sr->sr_phrase = phrase), (sr->sr_status = status);
@@ -160,7 +160,7 @@
msg_t **return_msg,
tagi_t const *tags);
- /**@a crm_init is called when a client request is sent first time.
+ /**@a crm_init is called when a client request is sent first time.
*
* @retval 1 when request has been responded
* @retval 0 when request should be sent in normal fashion
@@ -278,9 +278,9 @@
uint32_t cr_seq;
unsigned cr_refs; /**< References to client request */
-
+
/* Flags used with offer-answer */
- unsigned short cr_answer_recv; /**< Recv answer in response
+ unsigned short cr_answer_recv; /**< Recv answer in response
* with this status.
*/
unsigned cr_offer_sent:1; /**< Sent offer in this request */
@@ -305,7 +305,7 @@
unsigned cr_restarting:1; /**< Request is being restarted */
unsigned cr_reporting:1; /**< Reporting in progress */
unsigned cr_terminating:1; /**< Request terminates the usage */
- signed int cr_terminated:2; /**< Response terminated usage (1) or
+ signed int cr_terminated:2; /**< Response terminated usage (1) or
whole dialog (-1) */
unsigned cr_graceful:1; /**< Graceful termination required */
};
@@ -347,11 +347,11 @@
sip_to_t const *ds_remote; /**< Remote address */
nta_leg_t *ds_leg;
sip_contact_t *ds_ltarget; /**< Local target */
- char const *ds_remote_tag; /**< Remote tag (if any).
- * Should be non-NULL
+ char const *ds_remote_tag; /**< Remote tag (if any).
+ * Should be non-NULL
* if dialog is established.
*/
-
+
struct nua_dialog_peer_info {
sip_allow_t *nr_allow;
sip_accept_t *nr_accept;
@@ -364,10 +364,10 @@
/* Virtual function pointer table for dialog usage. */
typedef struct {
unsigned usage_size, usage_class_size;
- int (*usage_add)(nua_owner_t *,
+ int (*usage_add)(nua_owner_t *,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du);
- void (*usage_remove)(nua_owner_t *,
+ void (*usage_remove)(nua_owner_t *,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
@@ -382,7 +382,7 @@
sip_t const *sip);
void (*usage_refresh)(nua_owner_t *, nua_dialog_state_t *ds,
nua_dialog_usage_t *, sip_time_t now);
- int (*usage_shutdown)(nua_owner_t *, nua_dialog_state_t *ds,
+ int (*usage_shutdown)(nua_owner_t *, nua_dialog_state_t *ds,
nua_dialog_usage_t *);
} nua_usage_class;
@@ -428,16 +428,16 @@
char const *nua_dialog_usage_name(nua_dialog_usage_t const *du);
-nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *,
+nua_dialog_usage_t *nua_dialog_usage_add(nua_owner_t *,
struct nua_dialog_state *ds,
nua_usage_class const *uclass,
sip_event_t const *event);
-nua_dialog_usage_t *nua_dialog_usage_get(nua_dialog_state_t const *ds,
+nua_dialog_usage_t *nua_dialog_usage_get(nua_dialog_state_t const *ds,
nua_usage_class const *uclass,
sip_event_t const *event);
-void nua_dialog_usage_remove(nua_owner_t *,
+void nua_dialog_usage_remove(nua_owner_t *,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
@@ -463,17 +463,17 @@
void nua_dialog_usage_set_refresh(nua_dialog_usage_t *du, unsigned delta);
-void nua_dialog_usage_set_refresh_range(nua_dialog_usage_t *du,
+void nua_dialog_usage_set_refresh_range(nua_dialog_usage_t *du,
unsigned min, unsigned max);
-void nua_dialog_usage_set_refresh_at(nua_dialog_usage_t *du,
+void nua_dialog_usage_set_refresh_at(nua_dialog_usage_t *du,
sip_time_t target);
void nua_dialog_usage_reset_refresh(nua_dialog_usage_t *du);
void nua_dialog_usage_refresh(nua_owner_t *owner,
nua_dialog_state_t *ds,
- nua_dialog_usage_t *du,
+ nua_dialog_usage_t *du,
sip_time_t now);
int nua_dialog_usage_shutdown(nua_owner_t *owner,
@@ -513,12 +513,12 @@
nua_client_methods_t const *methods,
tagi_t const *tags);
-int nua_client_tcreate(nua_owner_t *nh,
+int nua_client_tcreate(nua_owner_t *nh,
int event,
nua_client_methods_t const *methods,
tag_type_t tag, tag_value_t value, ...);
-su_inline
+su_inline
void *nua_private_client_request(nua_client_request_t const *cr)
{
return (void *)(cr + 1);
@@ -654,14 +654,14 @@
nua_refer_server_methods, /**< REFER */
nua_publish_server_methods; /**< PUBLISH */
-/** Return true if we have not sent final response to request */
-su_inline
+/** Return true if we have not sent final response to request */
+su_inline
int nua_server_request_is_pending(nua_server_request_t const *sr)
{
return sr && sr->sr_response.msg;
}
-su_inline
+su_inline
int nua_server_request_status(nua_server_request_t const *sr)
{
return sr ? nta_incoming_status(sr->sr_irq) : 500;
@@ -694,7 +694,7 @@
int nua_server_report(nua_server_request_t *sr);
-int nua_base_server_treport(nua_server_request_t *sr,
+int nua_base_server_treport(nua_server_request_t *sr,
tag_type_t tag, tag_value_t value, ...);
int nua_base_server_report(nua_server_request_t *sr, tagi_t const *tags);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_event_server.c Tue Dec 16 13:05:22 2008
@@ -54,8 +54,8 @@
/* Event server */
static
-nea_event_t *nh_notifier_event(nua_handle_t *nh,
- su_home_t *home,
+nea_event_t *nh_notifier_event(nua_handle_t *nh,
+ su_home_t *home,
sip_event_t const *event,
tagi_t const *tags);
@@ -81,8 +81,8 @@
nua_stack_init_handle(nua, nh, tags);
- tl_gets(tags,
- NUTAG_URL_REF(url),
+ tl_gets(tags,
+ NUTAG_URL_REF(url),
SIPTAG_EVENT_REF(event),
SIPTAG_EVENT_STR_REF(event_s),
SIPTAG_CONTENT_TYPE_STR_REF(ct_s),
@@ -93,16 +93,16 @@
if (!event && !event_s)
status = 400, phrase = "Missing Event";
- else if (!ct && !ct_s)
+ else if (!ct && !ct_s)
status = 400, phrase = "Missing Content-Type";
else if (!nh->nh_notifier &&
- !(nh->nh_notifier =
+ !(nh->nh_notifier =
nea_server_create(nua->nua_nta, nua->nua_root,
url->us_url,
- NH_PGET(nh, max_subscriptions),
+ NH_PGET(nh, max_subscriptions),
NULL, nh,
- TAG_NEXT(tags))))
+ TAG_NEXT(tags))))
status = 900, phrase = nua_internal_error;
else if (!event && !(event = sip_event_make(home, event_s)))
@@ -117,12 +117,12 @@
else if (nea_server_notify(nh->nh_notifier, ev) < 0)
status = 900, phrase = "Error when notifying watchers";
- else
- nua_stack_tevent(nua, nh, NULL, e, status = SIP_200_OK,
+ else
+ nua_stack_tevent(nua, nh, NULL, e, status = SIP_200_OK,
SIPTAG_EVENT(event),
SIPTAG_CONTENT_TYPE(ct),
TAG_END());
-
+
if (status != 200)
nua_stack_event(nua, nh, NULL, e, status, phrase, NULL);
@@ -132,8 +132,8 @@
/* Create a event view for notifier */
static
-nea_event_t *nh_notifier_event(nua_handle_t *nh,
- su_home_t *home,
+nea_event_t *nh_notifier_event(nua_handle_t *nh,
+ su_home_t *home,
sip_event_t const *event,
tagi_t const *tags)
{
@@ -150,13 +150,13 @@
if (o_subtype)
*o_subtype++ = '\0';
- tl_gets(tags,
+ tl_gets(tags,
SIPTAG_ACCEPT_REF(accept),
SIPTAG_ACCEPT_STR_REF(accept_s),
SIPTAG_CONTENT_TYPE_REF(ct),
SIPTAG_CONTENT_TYPE_STR_REF(ct_s),
TAG_END());
-
+
/*
* XXX - We really should build accept header when we add new content
* types
@@ -168,7 +168,7 @@
if (accept_s == NULL && ct_s)
accept_s = ct_s;
- ev = nea_event_create(nh->nh_notifier,
+ ev = nea_event_create(nh->nh_notifier,
authorize_watcher, nh,
o_type, o_subtype,
ct ? ct->c_type : ct_s,
@@ -196,8 +196,8 @@
/* OK. In nhp (nua_handle_preferences_t) structure we have the
current default action (or state) for incoming
- subscriptions.
- Action can now be modified by the application with NUTAG_SUBSTATE().
+ subscriptions.
+ Action can now be modified by the application with NUTAG_SUBSTATE().
*/
irq = nea_sub_get_request(sn->sn_subscriber);
msg = nta_incoming_getrequest(irq);
@@ -220,7 +220,7 @@
what = "active";
}
- SU_DEBUG_7(("nua(%p): authorize_watcher: %s\n", (void *)nh, what));
+ SU_DEBUG_7(("nua(%p): authorize_watcher: %s\n", (void *)nh, what));
nea_sub_auth(sn->sn_subscriber, substate,
TAG_IF(substate == nua_substate_pending,
NEATAG_FAKE(1)),
@@ -231,8 +231,8 @@
else if (sn->sn_state == nea_terminated || sn->sn_expires == 0) {
substate = nua_substate_terminated;
nea_server_flush(nes, NULL);
- SU_DEBUG_7(("nua(%p): authorize_watcher: %s\n",
- (void *)nh, "watcher is removed"));
+ SU_DEBUG_7(("nua(%p): authorize_watcher: %s\n",
+ (void *)nh, "watcher is removed"));
}
nua_stack_tevent(nua, nh, msg, nua_i_subscription, status, phrase,
@@ -269,7 +269,7 @@
/** @internal Shutdown notifier object */
int nh_notifier_shutdown(nua_handle_t *nh,
nea_event_t *ev,
- tag_type_t t,
+ tag_type_t t,
tag_value_t v, ...)
{
nea_server_t *nes = nh->nh_notifier;
@@ -286,17 +286,17 @@
ta_list ta;
ta_start(ta, t, v);
-
+
for (i = 0; subs[i]; i++)
nea_sub_auth(subs[i]->sn_subscriber, nea_terminated, ta_tags(ta));
-
+
ta_end(ta);
busy++;
}
nea_server_free_subscribers(nes, subs);
-
+
nea_server_flush(nh->nh_notifier, NULL);
if (ev == NULL)
@@ -323,7 +323,7 @@
return;
}
- tl_gets(tags,
+ tl_gets(tags,
SIPTAG_EVENT_REF(event),
SIPTAG_EVENT_STR_REF(event_s),
SIPTAG_CONTENT_TYPE_REF(ct),
@@ -332,15 +332,15 @@
SIPTAG_PAYLOAD_STR_REF(pl_s),
TAG_END());
- nev = nea_event_get(nh->nh_notifier,
+ nev = nea_event_get(nh->nh_notifier,
event ? event->o_type : event_s);
if (nev && (pl || pl_s) && (ct || ct_s)) {
nea_server_update(nh->nh_notifier, nev, TAG_NEXT(tags));
}
- nh_notifier_shutdown(nh, NULL,
- NEATAG_REASON("noresource"),
+ nh_notifier_shutdown(nh, NULL,
+ NEATAG_REASON("noresource"),
TAG_NEXT(tags));
nua_stack_event(nua, nh, NULL, e, SIP_200_OK, NULL);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_extension.c Tue Dec 16 13:05:22 2008
@@ -45,7 +45,7 @@
#include "nua_stack.h"
-/**Send a request message with an extension method.
+/**Send a request message with an extension method.
*
* Send a request message with the request method specified with
* NUTAG_METHOD().
@@ -53,7 +53,7 @@
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* Note that it is possible to send a request with any method (except
@@ -91,9 +91,9 @@
NULL, /* crm_complete */
};
-int
+int
nua_stack_method(nua_t *nua, nua_handle_t *nh, nua_event_t e, tagi_t const *tags)
-{
+{
return nua_client_create(nh, e, &nua_method_client_methods, tags);
}
@@ -109,7 +109,7 @@
* @param nh operation handle associated with the method
* @param hmagic application context associated with the handle
* @param sip response to the extension request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive method in @a phrase parameters)
* @param tags empty
*
@@ -148,11 +148,11 @@
* @END_NUA_EVENT
*/
-nua_server_methods_t const nua_extension_server_methods =
+nua_server_methods_t const nua_extension_server_methods =
{
SIP_METHOD_UNKNOWN,
nua_i_method, /* Event */
- {
+ {
1, /* Do create dialog */
0, /* Can be an initial request */
1, /* Perhaps a target refresh request? */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_message.c Tue Dec 16 13:05:22 2008
@@ -51,14 +51,14 @@
/**@fn void nua_message( \
* nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
*
- * Send an instant message.
+ * Send an instant message.
*
* Send an instant message using SIP MESSAGE method.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -72,7 +72,7 @@
* @sa #nua_i_message, @RFC3428
*/
-static int nua_message_client_init(nua_client_request_t *cr,
+static int nua_message_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
@@ -95,16 +95,16 @@
};
-int
+int
nua_stack_message(nua_t *nua,
nua_handle_t *nh,
nua_event_t e,
tagi_t const *tags)
-{
+{
return nua_client_create(nh, e, &nua_message_client_methods, tags);
}
-static int nua_message_client_init(nua_client_request_t *cr,
+static int nua_message_client_init(nua_client_request_t *cr,
msg_t *msg, sip_t *sip,
tagi_t const *tags)
{
@@ -125,7 +125,7 @@
* @param nh operation handle associated with the message
* @param hmagic application context associated with the handle
* @param sip response to MESSAGE request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
@@ -159,11 +159,11 @@
int nua_message_server_init(nua_server_request_t *sr);
int nua_message_server_params(nua_server_request_t *, tagi_t const *);
-nua_server_methods_t const nua_message_server_methods =
+nua_server_methods_t const nua_message_server_methods =
{
SIP_METHOD_MESSAGE,
nua_i_message, /* Event */
- {
+ {
0, /* Do not create dialog */
0, /* Can be initial request */
0, /* Perhaps a target refresh request? */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_notifier.c Tue Dec 16 13:05:22 2008
@@ -70,10 +70,10 @@
};
static char const *nua_notify_usage_name(nua_dialog_usage_t const *du);
-static int nua_notify_usage_add(nua_handle_t *nh,
+static int nua_notify_usage_add(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du);
-static void nua_notify_usage_remove(nua_handle_t *nh,
+static void nua_notify_usage_remove(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
@@ -103,8 +103,8 @@
return "notify";
}
-static
-int nua_notify_usage_add(nua_handle_t *nh,
+static
+int nua_notify_usage_add(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du)
{
@@ -113,15 +113,15 @@
return 0;
}
-static
-void nua_notify_usage_remove(nua_handle_t *nh,
+static
+void nua_notify_usage_remove(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
nua_server_request_t *sr)
{
- ds->ds_has_events--;
- ds->ds_has_notifys--;
+ ds->ds_has_events--;
+ ds->ds_has_notifys--;
}
/* ====================================================================== */
@@ -173,14 +173,14 @@
* subscriber terminates the subscription, it times out or the application
* terminates the usage with nua_notify() call containing the tag
* NUTAG_SUBSTATE(nua_substate_terminated) or @SubscriptionState header with
- * state "terminated" and/or expiration time 0.
+ * state "terminated" and/or expiration time 0.
*
* When the subscriber terminates the subscription, the application is
* notified of an termination by a #nua_i_subscribe event with
* NUTAG_SUBSTATE(nua_substate_terminated) tag. When the subscription times
* out, nua automatically initiates a NOTIFY transaction. When it is
* terminated, the application is sent a #nua_r_notify event with
- * NUTAG_SUBSTATE(nua_substate_terminated) tag.
+ * NUTAG_SUBSTATE(nua_substate_terminated) tag.
*
* @sa @RFC3265, nua_notify(), NUTAG_SUBSTATE(), @SubscriptionState,
* @Event, nua_subscribe(), #nua_r_subscribe, #nua_i_refer, nua_refer()
@@ -193,11 +193,11 @@
static int nua_subscribe_server_respond(nua_server_request_t*, tagi_t const *);
static int nua_subscribe_server_report(nua_server_request_t*, tagi_t const *);
-nua_server_methods_t const nua_subscribe_server_methods =
+nua_server_methods_t const nua_subscribe_server_methods =
{
SIP_METHOD_SUBSCRIBE,
nua_i_subscribe, /* Event */
- {
+ {
1, /* Create dialog */
0, /* Initial request */
1, /* Target refresh request */
@@ -218,7 +218,7 @@
sip_t const *sip = sr->sr_request.sip;
sip_event_t *o = sip->sip_event;
char const *event = o ? o->o_type : NULL;
-
+
if (sr->sr_initial || !nua_dialog_usage_get(ds, nua_notify_usage, o)) {
if (event && str0cmp(event, "refer") == 0)
/* refer event subscription should be initiated with REFER */
@@ -246,7 +246,7 @@
sip_time_t now = sip_now();
assert(nh && nh->nh_nua->nua_dhandle != nh);
-
+
du = nua_dialog_usage_get(ds, nua_notify_usage, o);
if (du == NULL) {
@@ -271,7 +271,7 @@
nu->nu_requested = SIP_TIME_MAX - 1;
#if SU_HAVE_EXPERIMENTAL
- nu->nu_etags =
+ nu->nu_etags =
sip_suppress_body_if_match(sip) ||
sip_suppress_notify_if_match(sip) ||
sip_has_feature(sr->sr_request.sip->sip_supported, "etags");
@@ -294,7 +294,7 @@
sip_t *sip = sr->sr_response.sip;
if (200 <= sr->sr_status && sr->sr_status < 300) {
- sip_expires_t ex[1];
+ sip_expires_t ex[1];
sip_expires_init(ex);
@@ -304,7 +304,7 @@
if (nu->nu_requested) {
if (sip->sip_expires) {
/* Expires in response can only shorten the expiration time */
- if (nu->nu_requested > now + sip->sip_expires->ex_delta)
+ if (nu->nu_requested > now + sip->sip_expires->ex_delta)
nu->nu_requested = now + sip->sip_expires->ex_delta;
}
else {
@@ -357,14 +357,14 @@
sip_t const *sip = sr->sr_request.sip;
sip_suppress_notify_if_match_t *snim = sip_suppress_notify_if_match(sip);
sip_suppress_body_if_match_t *sbim = sip_suppress_body_if_match(sip);
-
+
if (!nu->nu_tag)
notify = 1;
else if (snim && !strcasecmp(snim->snim_tag, nu->nu_tag))
notify = 0;
else if (sbim && !strcasecmp(snim->snim_tag, nu->nu_tag))
notify = 1, nu->nu_no_body = 1;
- else
+ else
#endif
notify = 1;
@@ -375,12 +375,12 @@
if (retval >= 2 || du == NULL)
return retval;
-
+
if (notify) {
/* Send NOTIFY (and terminate subscription, when needed) */
nua_dialog_usage_refresh(nh, ds, du, sip_now());
}
-
+
return retval;
}
@@ -399,7 +399,7 @@
*
* @bug If the @Event is not given by application, stack uses the @Event
* header from the first subscription usage on handle.
- *
+ *
* If there is no active <i>notifier dialog usage</i> or no notifier dialog
* usage matches the @Event header given by the application the nua_notify()
* request is rejected locally by the stack with status code 481. The local
@@ -413,7 +413,7 @@
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -428,7 +428,7 @@
* @sa @RFC3265, #nua_i_subscribe, #nua_i_refer, NUTAG_ALLOW_EVENTS()
*/
-static int nua_notify_client_init(nua_client_request_t *cr,
+static int nua_notify_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
static int nua_notify_client_init_etag(nua_client_request_t *cr,
@@ -480,7 +480,7 @@
sip_event_t const *o = sip->sip_event;
sip_subscription_state_t *ss = sip->sip_subscription_state;
sip_time_t now = sip_now();
-
+
if (o == NULL && nh->nh_ds->ds_has_notifys == 1)
o = NONE;
@@ -519,7 +519,7 @@
/* We can change the lifetime of unsolicited subscription at will */
if (nu->nu_requested == 0)
nu->nu_expires = nu->nu_requested = now + expires;
- /* Notifier can only shorten the subscribed time */
+ /* Notifier can only shorten the subscribed time */
else if (nu->nu_requested >= now + expires)
nu->nu_expires = nu->nu_requested = now + expires;
}
@@ -617,7 +617,7 @@
sip_suppress_body_if_match_t *sbim;
sip_suppress_notify_if_match_t *snim;
-
+
if (cr->cr_usage->du_ready) {
snim = sip_suppress_notify_if_match(sip);
@@ -643,7 +643,7 @@
msg_t *msg, sip_t *sip,
tagi_t const *tags)
{
- nua_dialog_usage_t *du = cr->cr_usage;
+ nua_dialog_usage_t *du = cr->cr_usage;
struct notifier_usage *nu = nua_dialog_usage_private(du);
su_home_t *home = msg_home(msg);
sip_time_t now = sip_now();
@@ -674,7 +674,7 @@
if (nu->nu_substate == nua_substate_terminated)
expires = nu->nu_expires > now ? "noresource" : "timeout";
- ss = sip_subscription_state_format(home, "%s;%s",
+ ss = sip_subscription_state_format(home, "%s;%s",
nua_substate_name(nu->nu_substate),
expires);
@@ -737,8 +737,8 @@
* @param phrase a short textual description of @a status code
* @param nh operation handle associated with the subscription
* @param hmagic application context associated with the handle
- * @param sip response to @b NOTIFY request or NULL upon an error
- * (status code is in @a status and
+ * @param sip response to @b NOTIFY request or NULL upon an error
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags NUTAG_SUBSTATE() indicating subscription state
* SIPTAG_EVENT() indicating subscription event
@@ -762,7 +762,7 @@
if (nu && !cr->cr_terminated)
substate = nu->nu_substate;
- nua_stack_tevent(nh->nh_nua, nh,
+ nua_stack_tevent(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
@@ -816,7 +816,7 @@
nua_dialog_usage_remove(nh, ds, du, NULL, NULL);
}
-/** @interal Shut down NOTIFY usage.
+/** @interal Shut down NOTIFY usage.
*
* @retval >0 shutdown done
* @retval 0 shutdown in progress
@@ -836,8 +836,8 @@
return 0;
}
else {
- if (nua_client_tcreate(nh, nua_r_notify,
- &nua_notify_client_methods,
+ if (nua_client_tcreate(nh, nua_r_notify,
+ &nua_notify_client_methods,
SIPTAG_EVENT(du->du_event),
NUTAG_SUBSTATE(nua_substate_terminated),
TAG_END()) >= 0)
@@ -857,11 +857,11 @@
static int nua_refer_server_respond(nua_server_request_t*, tagi_t const *);
static int nua_refer_server_report(nua_server_request_t*, tagi_t const *);
-nua_server_methods_t const nua_refer_server_methods =
+nua_server_methods_t const nua_refer_server_methods =
{
SIP_METHOD_REFER,
nua_i_refer, /* Event */
- {
+ {
1, /* Create dialog */
0, /* Initial request */
1, /* Target refresh request */
@@ -914,7 +914,7 @@
if (sr->sr_status < 200 || nu == NULL) {
}
- else if (sr->sr_status < 300 &&
+ else if (sr->sr_status < 300 &&
/* Application included Refer-Sub: false in response */
(rs == NULL || str0casecmp("false", rs->rs_value))) {
sr->sr_usage->du_ready = 1;
@@ -942,7 +942,7 @@
* REFER. The @ReferredBy structure contained in the tag is constructed from
* the @From header if the @ReferredBy header was not present in the REFER
* request.
- *
+ *
* The application can let the nua to send NOTIFYs from the call it
* initiates with nua_invite() if it includes in the nua_invite() arguments
* both the NUTAG_NOTIFY_REFER() with the handle with which nua_i_refer was
@@ -956,8 +956,8 @@
* @param sip incoming REFER request
* @param tags NUTAG_REFER_EVENT() \n
* SIPTAG_REFERRED_BY()
- *
- * @sa nua_refer(), #nua_r_refer, @ReferTo, NUTAG_REFER_EVENT(),
+ *
+ * @sa nua_refer(), #nua_r_refer, @ReferTo, NUTAG_REFER_EVENT(),
* SIPTAG_REFERRED_BY(), @ReferredBy, NUTAG_NOTIFY_REFER(),
* NUTAG_REFER_WITH_ID(), @RFC3515.
*
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_options.c Tue Dec 16 13:05:22 2008
@@ -54,7 +54,7 @@
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -78,7 +78,7 @@
* @param nh operation handle associated with the incoming OPTIONS request
* @param hmagic application context associated with the handle
* @param sip response to OPTIONS request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
@@ -109,6 +109,6 @@
nua_handle_t *nh,
nua_event_t e,
tagi_t const *tags)
-{
+{
return nua_client_create(nh, e, &nua_options_client_methods, tags);
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_params.c Tue Dec 16 13:05:22 2008
@@ -84,7 +84,7 @@
a->nhp_set_.set_unsigned[1] |= b->nhp_set_.set_unsigned[1];
}
-static int nhp_set_tags(su_home_t *home,
+static int nhp_set_tags(su_home_t *home,
nua_handle_preferences_t *nhp,
nua_global_preferences_t *ngp,
tagi_t const *tags);
@@ -127,7 +127,7 @@
"MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE";
/** @internal Set default parameters */
-int nua_stack_set_defaults(nua_handle_t *nh,
+int nua_stack_set_defaults(nua_handle_t *nh,
nua_handle_preferences_t *nhp)
{
su_home_t *home = (su_home_t *)nh;
@@ -222,7 +222,7 @@
sip_contact_t const *m;
m = nua_stack_get_contact(nua->nua_registrations);
-
+
if (m) {
f0->a_display = m->m_display;
*f0->a_url = *m->m_url;
@@ -233,7 +233,7 @@
if (!f)
return -1;
-
+
nua->nua_from_is_set = set;
*nua->nua_from = *f;
return 0;
@@ -269,7 +269,7 @@
*
* @par Related tags:
* NUTAG_ALLOW(), SIPTAG_ALLOW(), and SIPTAG_ALLOW_STR() \n
- * NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
+ * NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
* SIPTAG_ALLOW_EVENTS_STR() \n
* NUTAG_AUTOACK() \n
* NUTAG_AUTOALERT() \n
@@ -323,7 +323,7 @@
*
* nua_set_params() also accepts any soa tags, defined in
* <sofia-sip/soa_tag.h>, and nta tags, defined in <sofia-sip/nta_tag.h>.
- *
+ *
* @par Events:
* #nua_r_set_params
*
@@ -335,7 +335,7 @@
* @par
* When multiple tags for the same header are specified, the behaviour
* depends on the header type. If only a single header field can be included
- * in a SIP message, the latest non-NULL value is used, e.g., @Organization.
+ * in a SIP message, the latest non-NULL value is used, e.g., @Organization.
* However, if the SIP header can consist of multiple lines or header fields
* separated by comma, in this case, @Allow and @Supported, all the tagged
* values are concatenated.
@@ -390,7 +390,7 @@
*
* @par Tags Used to Set Handle-Specific Parameters:
* NUTAG_ALLOW(), SIPTAG_ALLOW(), and SIPTAG_ALLOW_STR() \n
- * NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
+ * NUTAG_ALLOW_EVENTS(), SIPTAG_ALLOW_EVENTS(), and
* SIPTAG_ALLOW_EVENTS_STR() \n
* NUTAG_AUTH_CACHE() \n
* NUTAG_AUTOACK() \n
@@ -437,9 +437,9 @@
* Any soa tags are also considered as handle-specific parameters. They are
* defined in <sofia-sip/soa_tag.h>.
*
- * The global parameters that can not be set by nua_set_hparams() include
+ * The global parameters that can not be set by nua_set_hparams() include
* NUTAG_DETECT_NETWORK_UPDATES(), NUTAG_SMIME_* tags, and all NTA tags.
- *
+ *
* @par Events:
* #nua_r_set_params
*/
@@ -453,12 +453,12 @@
* @param nh NULL when responding to nua_set_params(),
* operation handle when responding to nua_set_hparams()
* @param hmagic NULL when responding to nua_set_params(),
- * application contact associated with the operation handle
+ * application contact associated with the operation handle
* when responding to nua_set_hparams()
* @param sip NULL
* @param tags None
*
- * @sa nua_set_params(), nua_set_hparams(),
+ * @sa nua_set_params(), nua_set_hparams(),
* #nua_r_get_params, nua_get_params(), nua_get_hparams()
*
* @END_NUA_EVENT
@@ -468,7 +468,7 @@
tagi_t const *tags)
{
nua_handle_t *dnh = nua->nua_dhandle;
-
+
int status;
char const *phrase;
@@ -486,8 +486,8 @@
*tmp = *nhp; NHP_UNSET_ALL(tmp);
/*
- * Supported features, allowed methods and events are merged
- * with previous or default settings.
+ * Supported features, allowed methods and events are merged
+ * with previous or default settings.
*
* Here we just copy pointers from default settings. However when saving
* settings we have to be extra careful so that we
@@ -495,20 +495,20 @@
* 2) do not free pointer if the setting has been modified
* See NHP_ZAP_OVERRIDEN() below for gorier details.
*/
- if (!NHP_ISSET(nhp, supported))
+ if (!NHP_ISSET(nhp, supported))
tmp->nhp_supported = dnhp->nhp_supported;
- if (!NHP_ISSET(nhp, allow))
+ if (!NHP_ISSET(nhp, allow))
tmp->nhp_allow = dnhp->nhp_allow;
- if (!NHP_ISSET(nhp, allow_events))
+ if (!NHP_ISSET(nhp, allow_events))
tmp->nhp_allow_events = dnhp->nhp_allow_events;
- if (!NHP_ISSET(nhp, appl_method))
+ if (!NHP_ISSET(nhp, appl_method))
tmp->nhp_appl_method = dnhp->nhp_appl_method;
-
+
if (nh == dnh) /* nua_set_params() call, save stack-wide params, too */
ngp = gtmp, *gtmp = *nua->nua_prefs;
/* Set and save parameters to tmp */
- if (!nh->nh_used_ptags &&
+ if (!nh->nh_used_ptags &&
nhp_set_tags(tmphome, tmp, NULL, nh->nh_ptags) < 0)
status = 900, phrase = "Error storing default handle parameters";
else if (nhp_set_tags(tmphome, tmp, ngp, tags) < 0)
@@ -531,9 +531,9 @@
if (dnh->nh_soa)
nh->nh_soa = soa_clone(dnh->nh_soa, nua->nua_root, nh);
- else
+ else
nh->nh_soa = soa_create(soa_name, nua->nua_root, nh);
-
+
if (!nh->nh_soa)
status = 900, phrase = "Error Creating SOA Object";
else if (soa_set_params(nh->nh_soa, TAG_NEXT(nh->nh_ptags)) < 0)
@@ -544,8 +544,8 @@
soa_destroy(nh->nh_soa), nh->nh_soa = NULL;
}
- if (status == 200 && tags && nh->nh_soa &&
- soa_set_params(nh->nh_soa, TAG_NEXT(tags)) < 0)
+ if (status == 200 && tags && nh->nh_soa &&
+ soa_set_params(nh->nh_soa, TAG_NEXT(tags)) < 0)
status = 900, phrase = "Error Setting SOA Parameters";
}
@@ -598,7 +598,7 @@
* @param ngp structure to store global preferences
* @param tags list of tags to parse
*/
-static int nhp_set_tags(su_home_t *home,
+static int nhp_set_tags(su_home_t *home,
nua_handle_preferences_t *nhp,
nua_global_preferences_t *ngp,
tagi_t const *tags)
@@ -828,12 +828,12 @@
/* SIPTAG_SUPPORTED_STR(supported_str) */
/* SIPTAG_SUPPORTED(supported) */
else if (tag == nutag_supported ||
- tag == siptag_supported ||
+ tag == siptag_supported ||
tag == siptag_supported_str) {
int ok;
sip_supported_t *supported = NULL;
- ok = nhp_merge_lists(home,
+ ok = nhp_merge_lists(home,
sip_supported_class, &supported, nhp->nhp_supported,
NHP_ISSET(nhp, supported), /* already set by tags */
tag == siptag_supported, /* dup it, don't make */
@@ -853,7 +853,7 @@
int ok;
msg_list_t *allow = NULL;
- ok = nhp_merge_lists(home,
+ ok = nhp_merge_lists(home,
sip_allow_class,
&allow,
(msg_list_t const *)nhp->nhp_allow,
@@ -875,9 +875,9 @@
int ok;
sip_allow_events_t *allow_events = NULL;
- ok = nhp_merge_lists(home,
+ ok = nhp_merge_lists(home,
sip_allow_events_class,
- &allow_events,
+ &allow_events,
nhp->nhp_allow_events,
NHP_ISSET(nhp, allow_events), /* already set */
tag == siptag_allow_events, /* dup it, don't make */
@@ -902,7 +902,7 @@
&appl_method,
(msg_list_t const *)nhp->nhp_appl_method,
/* already set by tags? */
- NHP_ISSET(nhp, appl_method),
+ NHP_ISSET(nhp, appl_method),
0, /* dup it, don't make */
1, /* merge with old value */
t->t_value);
@@ -1036,7 +1036,7 @@
return 0;
}
- if (already_parsed)
+ if (already_parsed)
elems = (void *)msg_header_dup_as(home, hc, (msg_header_t *)value);
else
elems = (void *)msg_header_make(home, hc, (char const *)value);
@@ -1065,8 +1065,8 @@
if (msg_params_join(home, (msg_param_t **)&list->k_items, elems->k_items,
2 /* prune */, 0 /* don't dup */) < 0)
return -1;
-
- *return_new_list =
+
+ *return_new_list =
(msg_list_t *)msg_header_dup_as(home, hc, (msg_header_t *)list);
if (!*return_new_list)
return -1;
@@ -1083,9 +1083,9 @@
* @retval 0 - no changes in parameters
* @retval -1 - an error
*/
-static
+static
int nhp_save_params(nua_handle_t *nh,
- su_home_t *tmphome,
+ su_home_t *tmphome,
nua_global_preferences_t *gsrc,
nua_handle_preferences_t *src)
{
@@ -1112,12 +1112,12 @@
/* Move allocations from tmphome to home */
su_home_move(nh->nh_home, tmphome);
-
+
/* Copy parameters that are set from src to dst */
nhp_or_set(dst, src);
/* Handle pointer items. Free changed ones and zap unset ones. */
- /* Note that pointer items where !NHP_ISSET(old, pref) are not freed
+ /* Note that pointer items where !NHP_ISSET(old, pref) are not freed
(because they were just on loan from the default preference set) */
#define NHP_ZAP_OVERRIDEN(old, dst, free, pref) \
(((NHP_ISSET(old, pref) && \
@@ -1142,7 +1142,7 @@
NHP_ZAP_OVERRIDEN(old, dst, msg_header_free, initial_route);
nh->nh_prefs = dst;
-
+
return memcmp(dst, old, sizeof *dst) != 0;
}
@@ -1239,17 +1239,17 @@
else if (to_str)
p_to = sip_to_make(tmphome, to_str);
else if (url)
- p_to = sip_to_create(tmphome, url),
+ p_to = sip_to_create(tmphome, url),
p_to ? sip_aor_strip((url_t*)p_to->a_url) : 0;
else
p_to = SIP_NONE;
-
+
if (p_to == NULL || p_from == NULL) {
su_home_deinit(tmphome);
return -1;
}
- nh->nh_tags =
+ nh->nh_tags =
tl_filtered_tlist(nh->nh_home, tagfilter,
TAG_IF(p_from != SIP_NONE, SIPTAG_FROM(p_from)),
TAG_IF(p_from != SIP_NONE, TAG_FILTER(nua_handle_tags_filter)),
@@ -1257,7 +1257,7 @@
TAG_IF(p_to != SIP_NONE, TAG_FILTER(nua_handle_tags_filter)),
TAG_NEXT(tags));
- nh->nh_ptags =
+ nh->nh_ptags =
tl_filtered_tlist(nh->nh_home, paramfilter, TAG_NEXT(tags));
error = nh->nh_tags == NULL || nh->nh_ptags == NULL;
@@ -1270,7 +1270,7 @@
if (nh->nh_ptags && nh->nh_ptags->t_tag == NULL)
su_free(nh->nh_home, nh->nh_ptags), nh->nh_ptags = NULL;
-
+
if (identity)
nh->nh_identity = nua_handle_ref(identity);
@@ -1287,12 +1287,12 @@
if (!t || !t->t_tag)
return 0;
- if (t->t_tag == nutag_url ||
+ if (t->t_tag == nutag_url ||
t->t_tag == nutag_sips_url ||
t->t_tag == nutag_identity)
return 0;
- ns = t->t_tag->tt_ns;
+ ns = t->t_tag->tt_ns;
if (!ns)
return 0;
@@ -1311,12 +1311,12 @@
if (tag == tag_filter)
return 0;
-
+
/* Accept @From or @To only when they are followed by
TAG_FILTER(nua_handle_tags_filter) */
if (tag == siptag_from || tag == siptag_to) {
t = tl_next(t);
- return t && t->t_tag == tag_filter &&
+ return t && t->t_tag == tag_filter &&
t->t_value == (tag_value_t)nua_handle_tags_filter;
}
@@ -1371,7 +1371,7 @@
return n;
/* XXX - all other S/MIME parameters? */
- return sm_set_params(nua->sm, smime_enable, smime_opt,
+ return sm_set_params(nua->sm, smime_enable, smime_opt,
smime_protection_mode, smime_path);
#endif
@@ -1404,7 +1404,7 @@
*/
/**@fn void nua_get_hparams(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
- *
+ *
* Get values of handle-specific parameters in #nua_r_get_params event.
*
* Application will specify either expilicit list of tags it is interested
@@ -1443,7 +1443,7 @@
* @param nh NULL when responding to nua_get_params(),
* operation handle when responding to nua_get_hparams()
* @param hmagic NULL when responding to nua_get_params(),
- * application contact associated with the operation handle
+ * application contact associated with the operation handle
* when responding to nua_get_hparams()
* @param sip NULL
* @param tags
@@ -1588,7 +1588,7 @@
TAG_IF(nhp->nhp_set.nhb_##pref, TAG(nhp->nhp_##pref))
/* Include tag in the list returned to user
- * if it has been earlier set (by user)
+ * if it has been earlier set (by user)
* but always include in the default parameters */
#define TIFD(TAG, pref) \
TAG_IF(nh == dnh || nhp->nhp_set.nhb_##pref, TAG(nhp->nhp_##pref))
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_publish.c Tue Dec 16 13:05:22 2008
@@ -168,7 +168,7 @@
* @param nh operation handle associated with the publication
* @param hmagic application context associated with the handle
* @param sip response to PUBLISH request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
@@ -206,8 +206,8 @@
*
* @par Events:
* #nua_r_unpublish
- *
- * @sa #nua_r_unpublish, @RFC3903, @SIPIfMatch,
+ *
+ * @sa #nua_r_unpublish, @RFC3903, @SIPIfMatch,
* #nua_i_publish, nua_publish(), #nua_r_publish
*/
@@ -223,7 +223,7 @@
* @param nh operation handle associated with the publication
* @param hmagic application context associated with the handle
* @param sip response to PUBLISH request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
@@ -369,7 +369,7 @@
;
else if (status == 412)
restarting = phrase;
- else if (200 <= status && status < 300 &&
+ else if (200 <= status && status < 300 &&
sip->sip_expires && sip->sip_expires->ex_delta == 0)
restarting = "Immediate re-PUBLISH";
@@ -473,7 +473,7 @@
*
* In order to receive #nua_i_publish events, the application must enable
* both the PUBLISH method with NUTAG_ALLOW() tag and the acceptable SIP
- * events with nua_set_params() tag NUTAG_ALLOW_EVENTS().
+ * events with nua_set_params() tag NUTAG_ALLOW_EVENTS().
*
* The nua_response() call responding to a PUBLISH request must have
* NUTAG_WITH() (or NUTAG_WITH_THIS()/NUTAG_WITH_SAVED()) tag. Note that
@@ -495,8 +495,8 @@
* @param tags empty
*
* @sa @RFC3903, nua_respond(),
- * @Expires, @SIPETag, @SIPIfMatch, @Event,
- * nua_subscribe(), #nua_i_subscribe,
+ * @Expires, @SIPETag, @SIPIfMatch, @Event,
+ * nua_subscribe(), #nua_i_subscribe,
* nua_notifier(), #nua_i_subscription,
*
* @since First used in @VERSION_1_12_4
@@ -506,11 +506,11 @@
int nua_publish_server_init(nua_server_request_t *sr);
-nua_server_methods_t const nua_publish_server_methods =
+nua_server_methods_t const nua_publish_server_methods =
{
SIP_METHOD_PUBLISH,
nua_i_publish, /* Event */
- {
+ {
0, /* Do not create dialog */
0, /* Initial request */
0, /* Not a target refresh request */
@@ -528,7 +528,7 @@
sip_allow_events_t *allow_events = NH_PGET(sr->sr_owner, allow_events);
sip_event_t *o = sr->sr_request.sip->sip_event;
char const *event = o ? o->o_type : NULL;
-
+
if (!allow_events)
return SR_STATUS1(sr, SIP_501_NOT_IMPLEMENTED);
else if (!event || !msg_header_find_param(allow_events->k_common, event))
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c Tue Dec 16 13:05:22 2008
@@ -76,7 +76,7 @@
/* Registrations and contacts */
int nua_registration_from_via(nua_registration_t **list,
- nua_handle_t *nh,
+ nua_handle_t *nh,
sip_via_t const *via,
int public);
@@ -150,7 +150,7 @@
unsigned nr_by_stack:1;
unsigned:0;
-
+
int nr_error_report_id; /**< ID used to ask for error reports from tport */
sip_route_t *nr_route; /**< Outgoing Service-Route */
@@ -285,8 +285,8 @@
};
/**@fn void nua_register(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
- *
- * Send SIP REGISTER request to the registrar.
+ *
+ * Send SIP REGISTER request to the registrar.
*
* Request status will be delivered to the application using #nua_r_register
* event. When successful the registration will be updated periodically.
@@ -306,7 +306,7 @@
*
* @par Events:
* #nua_r_register, #nua_i_outbound
- *
+ *
* @par Generating Contact Header
*
* If the application did not specify the Contact header in the tags,
@@ -314,10 +314,10 @@
* for the host and port number for the Contact URI from the transport
* socket. The diplay name is taken from NUTAG_M_DISPLAY(), URL username
* part is taken from NUTAG_M_USERNAME(), URI parameters from
- * NUTAG_M_PARAMS(), and Contact header parameters from NUTAG_M_FEATURES().
+ * NUTAG_M_PARAMS(), and Contact header parameters from NUTAG_M_FEATURES().
* If NUTAG_CALLEE_CAPS(1) is specified, additional Contact header
* parameters are generated based on SDP capabilities and SIP @Allow header.
- *
+ *
* Note that @b nua may append a identifier of its own to the @Contact URI
* username. Such nua-generated identifier trailer always starts with "="
* (equal sign), rest of the nua-generated identifier may contain any
@@ -349,7 +349,7 @@
* by NUTAG_M_USERNAME() and the non-transport parameters of the request URI
* set by NUTAG_M_PARAMS() when determining to which registration the
* incoming request belongs.
- *
+ *
* For example, a request line correspoding to the @Contact in above example
* may look like:
* @code
@@ -363,17 +363,17 @@
*
* Normally, @b nua will start start a protocol engine for outbound
* connections used for NAT and firewall traversal and connectivity checks
- * when registering.
+ * when registering.
*
* @note If the application provides @b nua with a
* @Contact header of its own (or includes a SIPTAG_CONTACT(NULL) tag in
* nua_register() tags), the outbound protocol engine is not started. It is
* assumed that the application knows better what it is doing when it sets
- * the @Contact, or it is using experimental CPL upload as specified in
+ * the @Contact, or it is using experimental CPL upload as specified in
* <a href="http://www.ietf.org/internet-drafts/draft-lennox-sip-reg-payload-01.txt">
* draft-lennox-sip-reg-payload-01.txt</a>.
*
- * First, outbound engine will probe for NATs in between UA and registrar.
+ * First, outbound engine will probe for NATs in between UA and registrar.
* It will send a REGISTER request as usual. Upon receiving the response it
* checks for the presence of "received" and "rport" parameters in the Via
* header returned by registrar. The presence of NAT is determined from the
@@ -416,14 +416,14 @@
*
* You can disable this kind of NAT traversal by setting "no-natify" into
* NUTAG_OUTBOUND() options string.
- *
+ *
* @par GRUU and Service-Route
*
* After a successful response to the REGISTER request has been received,
* nua_register() will update the information about the registration based
* on it. If there is a "gruu" parameter included in the response,
* nua_register() will save it and use the gruu URI in the Contact header
- * fields of dialog-establishing messages, such as INVITE or SUBSCRIBE.
+ * fields of dialog-establishing messages, such as INVITE or SUBSCRIBE.
* Also, if the registrar has included a Service-Route header in the
* response, and the service route feature has not been disabled using
* NUTAG_SERVICE_ROUTE_ENABLE(), the route URIs from the Service-Route
@@ -444,8 +444,8 @@
* You can disable validation by inserting "no-validate" into
* NUTAG_OUTBOUND() string.
*
- * The keepalive mechanism depends on the network features detected earlier.
- * If @a outbound extension is used, the STUN keepalives will be used.
+ * The keepalive mechanism depends on the network features detected earlier.
+ * If @a outbound extension is used, the STUN keepalives will be used.
* Otherwise, NUA stack will repeatedly send OPTIONS requests to itself. In
* order to save bandwidth, it will include Max-Forwards: 0 in the
* keep-alive requests, however. The keepalive interval is determined by
@@ -462,18 +462,18 @@
*
* As alternative to OPTIONS/STUN keepalives, the client can propose
* a more frequent registration refresh interval with
- * NUTAG_M_FEATURES() (e.g. NUTAG_M_FEATURES("expires=120") given as
+ * NUTAG_M_FEATURES() (e.g. NUTAG_M_FEATURES("expires=120") given as
* parameter to nua_register()).
- *
- * @sa #nua_r_register, nua_unregister(), #nua_r_unregister,
+ *
+ * @sa #nua_r_register, nua_unregister(), #nua_r_unregister,
* #nua_i_register,
* @RFC3261 section 10,
* @Expires, @Contact, @CallID, @CSeq,
* @Path, @RFC3327, @ServiceRoute, @RFC3608, @RFC3680,
* NUTAG_REGISTRAR(), NUTAG_INSTANCE(), NUTAG_OUTBOUND(),
- * NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
+ * NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
* SIPTAG_CONTACT(), SIPTAG_CONTACT_STR(), NUTAG_M_USERNAME(),
- * NUTAG_M_DISPLAY(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
+ * NUTAG_M_DISPLAY(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
*/
/** @NUA_EVENT nua_r_register
@@ -481,8 +481,8 @@
* Response to an outgoing REGISTER.
*
* The REGISTER may be sent explicitly by nua_register() or implicitly by
- * NUA state machines.
- *
+ * NUA state machines.
+ *
* When REGISTER request has been restarted the @a status may be 100 even
* while the real response status returned is different.
*
@@ -494,23 +494,23 @@
* @param nh operation handle associated with the registration
* @param hmagic application context associated with the registration
* @param sip response message to REGISTER request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
* @sa nua_register(), nua_unregister(), #nua_r_unregister,
* @Contact, @CallID, @CSeq, @RFC3261 section 10,
* @Path, @RFC3327, @ServiceRoute, @RFC3608, @RFC3680
- *
+ *
* @END_NUA_EVENT
*/
/**@fn void nua_unregister(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
- * Unregister.
+ * Unregister.
*
- * Send a REGISTER request with expiration time 0. This removes the
- * registration from the registrar. If the handle was earlier used
- * with nua_register() the periodic updates will be terminated.
+ * Send a REGISTER request with expiration time 0. This removes the
+ * registration from the registrar. If the handle was earlier used
+ * with nua_register() the periodic updates will be terminated.
*
* If a SIPTAG_CONTACT_STR() with argument "*" is used, all the
* registrations will be removed from the registrar otherwise only the
@@ -534,9 +534,9 @@
* @Expires, @Contact, @CallID, @CSeq, @RFC3261 section 10,
* @Path, @RFC3327, @ServiceRoute, @RFC3608, @RFC3680,
* NUTAG_REGISTRAR(), NUTAG_INSTANCE(), NUTAG_OUTBOUND(),
- * NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
+ * NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
* SIPTAG_CONTACT(), SIPTAG_CONTACT_STR(), NUTAG_M_USERNAME(),
- * NUTAG_M_DISPLAY(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
+ * NUTAG_M_DISPLAY(), NUTAG_M_PARAMS(), NUTAG_M_FEATURES(),
*/
/** @NUA_EVENT nua_r_unregister
@@ -551,14 +551,14 @@
* @param nh operation handle associated with the registration
* @param hmagic application context associated with the registration
* @param sip response message to REGISTER request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags empty
*
* @sa nua_unregister(), nua_register(), #nua_r_register,
* @Contact, @CallID, @CSeq, @RFC3261 section 10,
* @Path, @RFC3327, @ServiceRoute, @RFC3608, @RFC3680
- *
+ *
* @END_NUA_EVENT
*/
@@ -692,7 +692,7 @@
for (m = sip->sip_contact; m; m = m->m_next)
if (!m->m_expires || strtoul(m->m_expires, NULL, 10) != 0)
break;
-
+
if (m == NULL)
unreg = 1; /* All contacts have expires=0 */
}
@@ -754,7 +754,7 @@
outbound_get_contacts(nr->nr_ob, &m, &previous);
sip_add_dup(msg, sip, (sip_header_t *)m);
- /* previous is an outdated contact generated by stack
+ /* previous is an outdated contact generated by stack
* and it is now unregistered */
if (previous)
sip_add_dup(msg, sip, (sip_header_t *)previous);
@@ -780,10 +780,10 @@
/* Remove the expire parameters from contacts */
msg_header_remove_param(m->m_common, "expires");
}
- else if (nr && nr->nr_min_expires &&
+ else if (nr && nr->nr_min_expires &&
strtoul(m->m_expires, 0, 10) < nr->nr_min_expires) {
- if (min_expires == NULL)
- min_expires = su_sprintf(msg_home(msg), "expires=%lu",
+ if (min_expires == NULL)
+ min_expires = su_sprintf(msg_home(msg), "expires=%lu",
nr->nr_min_expires);
msg_header_replace_param(msg_home(msg), m->m_common, min_expires);
}
@@ -815,7 +815,7 @@
req, sip);
restart = retry >= ob_reregister_now;
-
+
if (retry == ob_reregister)
/* outbound restarts REGISTER later */;
@@ -835,7 +835,7 @@
/* Restart only if nua_base_client_check_restart() did not try to restart */
if (restart && retry_count == cr->cr_retry_count)
return nua_client_restart(cr, 100, "Outbound NAT Detected");
-
+
return 0;
}
@@ -874,7 +874,7 @@
}
#endif
- /* XXX - if store/remove, remove
+ /* XXX - if store/remove, remove
Content-Disposition
Content-Type
body
@@ -886,7 +886,7 @@
reqdelta = req->sip_expires ? req->sip_expires->ex_delta : 0;
for (m = sip->sip_contact; m; m = m->m_next) {
- if (m->m_url->url_type != url_sip &&
+ if (m->m_url->url_type != url_sip &&
m->m_url->url_type != url_sips)
continue;
@@ -901,7 +901,7 @@
if (mdelta == 0)
mdelta = 3600;
-
+
delta = sip_contact_expires(m, sip->sip_expires, sip->sip_date,
mdelta, now);
if (delta > 0 && delta < mindelta)
@@ -975,7 +975,7 @@
if (tport_is_secondary(tport)) {
tport_set_params(tport, TPTAG_SDWN_ERROR(1), TAG_END());
- nr->nr_error_report_id =
+ nr->nr_error_report_id =
tport_pend(tport, NULL, nua_register_connection_closed, nr);
}
}
@@ -1033,7 +1033,7 @@
tpn = tport_name(nr->nr_tport);
- SU_DEBUG_5(("nua_register(%p): tport to %s/%s:%s%s%s closed %s\n",
+ SU_DEBUG_5(("nua_register(%p): tport to %s/%s:%s%s%s closed %s\n",
du->du_dialog->ds_owner,
tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port,
tpn->tpn_comp ? ";comp=" : "",
@@ -1162,13 +1162,13 @@
contact1 = contact2, contact2 = NULL;
if (contact1 &&
- (url_is_string(contact1)
+ (url_is_string(contact1)
? strncasecmp(contact1->us_str, "sips:", 5) == 0
: contact1->us_url->url_type == url_sips))
name1 = "sips";
- if (contact2 &&
- (url_is_string(contact2)
+ if (contact2 &&
+ (url_is_string(contact2)
? strncasecmp(contact2->us_str, "sips:", 5) == 0
: contact2->us_url->url_type == url_sips))
name2 = "sips";
@@ -1205,7 +1205,7 @@
nta_agent_add_tport(nua->nua_nta, contact2,
TPTAG_IDENT(name2),
TPTAG_CERTIFICATE(certificate_dir),
- TAG_NEXT(nua->nua_args)) < 0)
+ TAG_NEXT(nua->nua_args)) < 0)
return -1;
}
@@ -1238,7 +1238,7 @@
case NUA_NW_DETECT_ONLY_INFO:
nua_stack_event(nua, NULL, NULL, nua_i_network_changed, SIP_200_OK, NULL);
break;
-
+
case NUA_NW_DETECT_TRY_FULL:
/* 1) Shutdown all tports */
@@ -1254,7 +1254,7 @@
SIP_200_OK, NULL);
break;
-
+
default:
break;
}
@@ -1270,7 +1270,7 @@
nua->nua_api_root,
nua_network_changed_cb,
nua);
-
+
if (!snc)
return -1;
@@ -1394,13 +1394,13 @@
}
/* if more than one candidate, ignore local entries */
- if (v && (*vv || nr_items > 0) &&
+ if (v && (*vv || nr_items > 0) &&
host_is_local(v->v_host)) {
- SU_DEBUG_9(("nua_register: ignoring contact candidate %s:%s.\n",
+ SU_DEBUG_9(("nua_register: ignoring contact candidate %s:%s.\n",
v->v_host, v->v_port ? v->v_port : ""));
continue;
}
-
+
nr = su_zalloc(home, sizeof *nr);
if (!nr)
break;
@@ -1494,7 +1494,7 @@
continue;
if (nr->nr_ip6 && ip4)
continue;
- if (sips_uri ? nr->nr_secure : !nr->nr_secure)
+ if (sips_uri ? nr->nr_secure : !nr->nr_secure)
return (nua_registration_t *)nr;
if (!registered && nr->nr_aor)
registered = nr;
@@ -1528,7 +1528,7 @@
namewise = nr;
}
- if (!sipswise && ((sips_aor || sips_uri) ?
+ if (!sipswise && ((sips_aor || sips_uri) ?
nr->nr_secure : !nr->nr_secure))
sipswise = nr;
if (!registered)
@@ -1545,8 +1545,8 @@
return (nua_registration_t *)sipswise;
if (registered)
return (nua_registration_t *)registered;
-
- /* XXX -
+
+ /* XXX -
should we do some policing whether sips_aor or sips_uri can be used
with sip contact?
*/
@@ -1572,7 +1572,7 @@
}
nua_registration_t *
-nua_registration_for_response(nua_registration_t const *list,
+nua_registration_for_response(nua_registration_t const *list,
sip_t const *sip,
sip_record_route_t const *record_route,
sip_contact_t const *remote_contact)
@@ -1583,7 +1583,7 @@
if (sip)
aor = sip->sip_to;
-
+
if (record_route)
uri = record_route->r_url;
else if (sip && sip->sip_record_route)
@@ -1647,8 +1647,8 @@
if (nr == NULL)
nr = nua_registration_for_request(nh->nh_nua->nua_registrations, sip);
- return nua_registration_add_contact_and_route(nh, nr, msg, sip,
- add_contact,
+ return nua_registration_add_contact_and_route(nh, nr, msg, sip,
+ add_contact,
add_service_route);
}
@@ -1678,13 +1678,13 @@
nr = nua_registration_for_response(nh->nh_nua->nua_registrations, sip,
record_route, remote_contact);
- return nua_registration_add_contact_and_route(nh, nr, msg, sip,
+ return nua_registration_add_contact_and_route(nh, nr, msg, sip,
1,
0);
}
/** Add a Contact (and Route) header to request */
-static
+static
int nua_registration_add_contact_and_route(nua_handle_t *nh,
nua_registration_t *nr,
msg_t *msg,
@@ -1825,7 +1825,7 @@
return -1;
uri = nr->nr_aor ? nr->nr_aor->a_url : NULL;
-
+
previous = nr->nr_contact;
if (application_contact) {
@@ -1836,7 +1836,7 @@
}
else {
nua_registration_t *nr0;
-
+
nr0 = nua_registration_by_aor(*nr->nr_list, NULL, uri, 1);
if (nr0 && nr0->nr_via) {
@@ -1920,12 +1920,12 @@
* @param phrase a short textual description of @a status code
* @param nh operation handle associated with the outbound engine
* @param hmagic application context associated with the handle
- * @param sip NULL or response message to an keepalive message or
+ * @param sip NULL or response message to an keepalive message or
* registration probe
* (error code and message are in status an phrase parameters)
* @param tags empty
*
- * @sa NUTAG_OUTBOUND(), NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
+ * @sa NUTAG_OUTBOUND(), NUTAG_KEEPALIVE(), NUTAG_KEEPALIVE_STREAM(),
* nua_register(), #nua_r_register, nua_unregister(), #nua_r_unregister
*
* @END_NUA_EVENT
@@ -1967,7 +1967,7 @@
}
/** @internal Callback for obtaining credentials for keepalive */
-static int nua_stack_outbound_credentials(nua_handle_t *nh,
+static int nua_stack_outbound_credentials(nua_handle_t *nh,
auth_client_t **auc)
{
return auc_copy_credentials(auc, nh->nh_auth);
@@ -2080,12 +2080,12 @@
su_strlst_append(l, s[0] == ';' ? "" : ";");
su_strlst_append(l, s);
}
-
+
va_end(va);
if (!in_dialog) {
s = NH_PGET(nh, m_features);
- if (s)
+ if (s)
s[0] == ';' ? "" : su_strlst_append(l, ";"), su_strlst_append(l, s);
if (NH_PGET(nh, callee_caps)) {
@@ -2106,7 +2106,7 @@
if (nh->nh_soa) {
char **media = soa_media_features(nh->nh_soa, 0, home);
-
+
while (*media) {
if (su_strlst_len(l))
su_strlst_append(l, ";");
@@ -2117,8 +2117,8 @@
}
m = sip_contact_make(home, su_strlst_join(l, su_strlst_home(l), ""));
-
+
su_strlst_destroy(l);
-
+
return m;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_registrar.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_registrar.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_registrar.c Tue Dec 16 13:05:22 2008
@@ -93,11 +93,11 @@
* @END_NUA_EVENT
*/
-nua_server_methods_t const nua_register_server_methods =
+nua_server_methods_t const nua_register_server_methods =
{
SIP_METHOD_REGISTER,
nua_i_register, /* Event */
- {
+ {
0, /* Do not create dialog */
0, /* Initial request */
0, /* Not a target refresh request */
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c Tue Dec 16 13:05:22 2008
@@ -92,7 +92,7 @@
typedef struct nua_ee_data {
nua_t *ee_nua;
nua_event_data_t ee_data[1];
-} nua_ee_data_t;
+} nua_ee_data_t;
/** @internal Linked stack frames from nua event callback */
struct nua_event_frame_s {
@@ -170,7 +170,7 @@
dnh->nh_prefs = (void *)(dnh + 1);
dnh->nh_valid = nua_valid_handle_cookie;
dnh->nh_nua = nua;
- nua_handle_ref(dnh); dnh->nh_ref_by_stack = 1;
+ nua_handle_ref(dnh); dnh->nh_ref_by_stack = 1;
nua_handle_ref(dnh); dnh->nh_ref_by_user = 1;
nh_append(nua, dnh);
dnh->nh_identity = dnh;
@@ -201,7 +201,7 @@
TAG_END());
if (nua->nua_nta == NULL ||
- dnh->nh_ds->ds_leg == NULL ||
+ dnh->nh_ds->ds_leg == NULL ||
nta_agent_set_params(nua->nua_nta, NTATAG_UA(1), TAG_END()) < 0 ||
nua_stack_init_transport(nua, nua->nua_args) < 0) {
SU_DEBUG_1(("nua: initializing SIP stack failed\n"));
@@ -295,7 +295,7 @@
if ((event > nua_r_authenticate && event <= nua_r_ack)
|| event < nua_i_error
|| (nh && !nh->nh_valid)
- || (nua->nua_shutdown && event != nua_r_shutdown &&
+ || (nua->nua_shutdown && event != nua_r_shutdown &&
!nua->nua_prefs->ngp_shutdown_events)) {
if (msg)
msg_destroy(msg);
@@ -380,7 +380,7 @@
if (!nh->nh_ref_by_user) {
/* Application must now call nua_handle_destroy() */
nh->nh_ref_by_user = 1;
- nua_handle_ref(nh);
+ nua_handle_ref(nh);
}
}
else if (!nh->nh_valid) { /* Handle has been destroyed */
@@ -398,7 +398,7 @@
if (nua->nua_callback) {
nua_event_frame_t frame[1];
-
+
su_msg_save(frame->nf_saved, sumsg);
frame->nf_next = nua->nua_current, nua->nua_current = frame;
@@ -429,9 +429,9 @@
return NULL;
}
-/** Get request message from saved nua event. @NEW_1_12_4.
+/** Get request message from saved nua event. @NEW_1_12_4.
*
- * @sa nua_save_event(), nua_respond(), NUTAG_WITH_SAVED(),
+ * @sa nua_save_event(), nua_respond(), NUTAG_WITH_SAVED(),
*/
msg_t *nua_saved_event_request(nua_saved_event_t const *saved)
{
@@ -514,7 +514,7 @@
e->e_phrase = phrase;
su_msg_deinitializer(sumsg, nua_event_deinit);
-
+
retval = su_msg_send_to(sumsg, nua->nua_server, nua_stack_signal);
if (retval == 0){
@@ -649,7 +649,7 @@
case nua_r_respond:
nua_stack_respond(nua, nh, e->e_status, e->e_phrase, tags);
break;
- case nua_r_destroy:
+ case nua_r_destroy:
nua_stack_destroy_handle(nua, nh, tags);
su_msg_destroy(nua->nua_signal);
return;
@@ -1102,7 +1102,7 @@
return 0;
}
-sip_replaces_t *nua_stack_handle_make_replaces(nua_handle_t *nh,
+sip_replaces_t *nua_stack_handle_make_replaces(nua_handle_t *nh,
su_home_t *home,
int early_only)
{
@@ -1184,7 +1184,7 @@
/** @NUA_EVENT nua_r_authenticate
*
* Response to nua_authenticate(). Under normal operation, this event is
- * never sent but rather the unauthenticated operation is completed.
+ * never sent but rather the unauthenticated operation is completed.
* However, if there is no operation to authentication or if there is an
* authentication error the #nua_r_authenticate event is sent to the
* application with the status code as follows:
@@ -1195,16 +1195,16 @@
* There was internal problem updating authenticator.
* - <i>904 No matching challenge</i>:\n
* There was no challenge matching with the credentials provided by
- * nua_authenticate(), e.g., their realm did not match with the one
+ * nua_authenticate(), e.g., their realm did not match with the one
* received with the challenge.
- *
- * @param status status code from authentication
+ *
+ * @param status status code from authentication
* @param phrase a short textual description of @a status code
* @param nh operation handle authenticated
* @param hmagic application context associated with the handle
* @param sip NULL
* @param tags empty
- *
+ *
* @sa nua_terminate(), nua_handle_destroy()
*
* @END_NUA_EVENT
@@ -1223,14 +1223,14 @@
nua_client_restart_request(cr, cr->cr_terminating, tags);
}
else {
- nua_stack_event(nua, nh, NULL, e,
+ nua_stack_event(nua, nh, NULL, e,
202, "No operation to restart",
NULL);
}
}
else if (cr && cr->cr_wait_for_cred) {
cr->cr_waiting = cr->cr_wait_for_cred = 0;
-
+
if (status < 0)
nua_client_response(cr, 900, "Operation cannot add credentials", NULL);
else
@@ -1349,7 +1349,7 @@
}
else if (initial && sip->sip_to->a_tag) {
/* RFC 3261 section 12.2.2:
-
+
If the UAS wishes to reject the request because it does not wish to
recreate the dialog, it MUST respond to the request with a 481
(Call/Transaction Does Not Exist) status code and pass that to the
@@ -1465,7 +1465,7 @@
return 0;
return 501;
-}
+}
#undef nua_base_server_init
#undef nua_base_server_preprocess
@@ -1506,7 +1506,7 @@
}
/**@fn void nua_respond(nua_handle_t *nh, int status, char const *phrase, tag_type_t tag, tag_value_t value, ...);
- *
+ *
* Respond to a request with given status code and phrase.
*
* The stack returns a SIP response message with given status code and
@@ -1526,7 +1526,7 @@
* @param phrase free text (default response phrase is used if NULL)
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Responses by Protocol Engine
@@ -1642,7 +1642,7 @@
#undef nua_base_server_params
-int nua_base_server_params(nua_server_request_t *sr, tagi_t const *tags)
+int nua_base_server_params(nua_server_request_t *sr, tagi_t const *tags)
{
return 0;
}
@@ -1714,7 +1714,7 @@
sip_add_dup(msg, sip, (sip_header_t *)NH_PGET(nh, supported)) < 0)
;
else if (!sip->sip_user_agent && NH_PGET(nh, user_agent) &&
- sip_add_make(msg, sip, sip_user_agent_class,
+ sip_add_make(msg, sip, sip_user_agent_class,
NH_PGET(nh, user_agent)) < 0)
;
else if (!sip->sip_organization && NH_PGET(nh, organization) &&
@@ -1724,10 +1724,10 @@
else if (!sip->sip_allow && NH_PGET(nh, allow) &&
sip_add_dup(msg, sip, (void *)NH_PGET(nh, allow)) < 0)
;
- else if (!sip->sip_allow_events &&
+ else if (!sip->sip_allow_events &&
NH_PGET(nh, allow_events) &&
(method == sip_method_publish || method == sip_method_subscribe ||
- method == sip_method_options || method == sip_method_refer ||
+ method == sip_method_options || method == sip_method_refer ||
(sr->sr_initial &&
(method == sip_method_invite ||
method == sip_method_notify))) &&
@@ -1735,8 +1735,8 @@
;
else if (!sip->sip_contact && sr->sr_status < 300 && sr->sr_add_contact &&
(user_contact = 0,
- ds->ds_ltarget
- ? sip_add_dup(msg, sip, (sip_header_t *)ds->ds_ltarget)
+ ds->ds_ltarget
+ ? sip_add_dup(msg, sip, (sip_header_t *)ds->ds_ltarget)
: nua_registration_add_contact_to_response(nh, msg, sip, NULL, m))
< 0)
;
@@ -1748,7 +1748,7 @@
sr->sr_terminating = (term < 0) ? -1 : (term > 0 || sr->sr_terminating);
- if (sr->sr_target_refresh && sr->sr_status < 300 && !sr->sr_terminating &&
+ if (sr->sr_target_refresh && sr->sr_status < 300 && !sr->sr_terminating &&
user_contact && sip->sip_contact) {
/* Save Contact given by application */
ltarget = sip_contact_dup(nh->nh_home, sip->sip_contact);
@@ -1756,7 +1756,7 @@
retval = sr->sr_methods->sm_respond(sr, next_tags);
- if (sr->sr_status < 200)
+ if (sr->sr_status < 200)
sr->sr_response.msg = next.msg, sr->sr_response.sip = next.sip;
else if (next.msg)
msg_destroy(next.msg);
@@ -1767,9 +1767,9 @@
if (sr->sr_status < 300) {
nua_dialog_state_t *ds = nh->nh_ds;
msg_header_free(nh->nh_home, (msg_header_t *)ds->ds_ltarget);
- ds->ds_ltarget = ltarget;
+ ds->ds_ltarget = ltarget;
}
- else
+ else
msg_header_free(nh->nh_home, (msg_header_t *)ltarget);
}
@@ -1807,7 +1807,7 @@
(msg_header_t *)sip->sip_status);
nta_incoming_complete_response(sr->sr_irq, response,
sr->sr_status,
- sr->sr_phrase,
+ sr->sr_phrase,
TAG_END());
}
@@ -1927,17 +1927,17 @@
* exception is the client requests bound to a dialog usage: they are saved
* and re-used when the dialog usage is refreshed (and sometimes when the
* usage is terminated).
- *
+ *
* The client request is subclassed and its behaviour modified using virtual
* function table in #nua_client_methods_t.
- *
+ *
* The first three methods (crm_template(), crm_init(), crm_send()) are
* called when the request is sent first time.
- *
+ *
* The crm_template() is called if a template request message is needed (for
* example, in case of unregister, unsubscribe and unpublish, the template
* message is taken from the request establishing the usage).
- *
+ *
* The crm_init() is called when the template message and dialog leg has
* been created and populated by the tags procided by the application. Its
* parameters msg and sip are pointer to the template request message that
@@ -1966,7 +1966,7 @@
*
* @par Terminating Dialog Usages and Dialogs
*
- * The response is marked as terminating with nua_client_set_terminating().
+ * The response is marked as terminating with nua_client_set_terminating().
* When a terminating request completes the dialog usage is removed and the
* dialog is destroyed (unless there is an another active usage).
*/
@@ -1985,7 +1985,7 @@
* @retval > 0 if error event has been sent
* @retval < 0 upon an error
*/
-int nua_client_create(nua_handle_t *nh,
+int nua_client_create(nua_handle_t *nh,
int event,
nua_client_methods_t const *methods,
tagi_t const * const tags)
@@ -2004,7 +2004,7 @@
cr = su_zalloc(home, sizeof *cr + methods->crm_extra);
if (!cr) {
- return nua_stack_event(nh->nh_nua, nh,
+ return nua_stack_event(nh->nh_nua, nh,
NULL,
event,
NUA_ERROR_AT(__FILE__, __LINE__),
@@ -2052,7 +2052,7 @@
return nua_client_init_request(cr);
}
-int nua_client_tcreate(nua_handle_t *nh,
+int nua_client_tcreate(nua_handle_t *nh,
int event,
nua_client_methods_t const *methods,
tag_type_t tag, tag_value_t value, ...)
@@ -2203,7 +2203,7 @@
nua_client_request_destroy(nua_client_request_t *cr)
{
nua_handle_t *nh;
-
+
if (cr == NULL)
return;
@@ -2237,7 +2237,7 @@
nua_handle_unref(nh);
}
-/** Bind client request to a dialog usage */
+/** Bind client request to a dialog usage */
int nua_client_bind(nua_client_request_t *cr, nua_dialog_usage_t *du)
{
assert(cr);
@@ -2301,7 +2301,7 @@
tagi_t const *t;
int has_contact = 0;
int error = 0;
-
+
if (!cr->cr_method_name)
return nua_client_return(cr, NUA_ERROR_AT(__FILE__, __LINE__), NULL);
@@ -2382,7 +2382,7 @@
if (cr->cr_method == sip_method_register && url == NULL)
url = (url_string_t const *)NH_PGET(nh, registrar);
-
+
if ((t = cr->cr_tags)) {
if (sip_add_tagis(msg, sip, &t) < 0)
return nua_client_return(cr, NUA_ERROR_AT(__FILE__, __LINE__), msg);
@@ -2403,11 +2403,11 @@
*/
if (!ds->ds_leg) {
- if (ds->ds_remote_tag && ds->ds_remote_tag[0] &&
+ if (ds->ds_remote_tag && ds->ds_remote_tag[0] &&
sip_to_tag(nh->nh_home, sip->sip_to, ds->ds_remote_tag) < 0)
return nua_client_return(cr, NUA_ERROR_AT(__FILE__, __LINE__), msg);
- if (sip->sip_from == NULL &&
+ if (sip->sip_from == NULL &&
sip_add_dup(msg, sip, (sip_header_t *)nua->nua_from) < 0)
return nua_client_return(cr, NUA_ERROR_AT(__FILE__, __LINE__), msg);
@@ -2475,7 +2475,7 @@
if (nh->nh_tags) {
tagi_t const *t = nh->nh_tags;
- /* Use the From header from the dialog.
+ /* Use the From header from the dialog.
If From is set, it is always first tag in the handle */
if (ds->ds_leg && t->t_tag == siptag_from)
t++;
@@ -2619,8 +2619,8 @@
if (initial_route) {
initial_route = sip_route_dup(msg_home(msg), initial_route);
if (!initial_route) return -1;
- msg_header_prepend(msg, (msg_pub_t*)sip,
- /* This should be
+ msg_header_prepend(msg, (msg_pub_t*)sip,
+ /* This should be
(msg_header_t **)&sip->sip_route
* but directly casting pointer &sip->sip_route gives
* spurious type-punning warning */
@@ -2629,14 +2629,14 @@
}
}
-
+
/**
* For in-dialog requests, the request URI is taken from the @Contact
- * header received from the remote party during dialog establishment,
+ * header received from the remote party during dialog establishment,
* and the NUTAG_URL() is ignored.
*
* Also, the @CallID and @CSeq headers and @From and @To tags are
- * generated based on the dialog information and added to the request.
+ * generated based on the dialog information and added to the request.
* If the dialog has a route, it is added to the request, too.
*/
if (nta_msg_request_complete(msg, leg, method, name, url) < 0)
@@ -2659,15 +2659,15 @@
*/
if (!sip->sip_allow)
sip_add_dup(msg, sip, (sip_header_t*)NH_PGET(nh, allow));
-
+
if (!sip->sip_supported && NH_PGET(nh, supported))
sip_add_dup(msg, sip, (sip_header_t *)NH_PGET(nh, supported));
-
+
if (method == sip_method_register && NH_PGET(nh, path_enable) &&
!sip_has_feature(sip->sip_supported, "path") &&
!sip_has_feature(sip->sip_require, "path"))
sip_add_make(msg, sip, sip_supported_class, "path");
-
+
if (!sip->sip_organization && NH_PGET(nh, organization))
sip_add_make(msg, sip, sip_organization_class, NH_PGET(nh, organization));
@@ -2704,7 +2704,7 @@
if (cr->cr_method != sip_method_register) {
if (cr->cr_contactize && cr->cr_has_contact) {
sip_contact_t *ltarget = sip_contact_dup(nh->nh_home, sip->sip_contact);
- if (ds->ds_ltarget)
+ if (ds->ds_ltarget)
msg_header_free(nh->nh_home, (msg_header_t *)ds->ds_ltarget);
ds->ds_ltarget = ltarget;
}
@@ -2728,7 +2728,7 @@
return nua_base_client_request(cr, msg, sip, NULL);
}
-/**Add tags to request message and send it,
+/**Add tags to request message and send it,
*
* @retval 0 success
* @retval -1 if error occurred, but event has not been sent
@@ -2764,7 +2764,7 @@
url_string_t * proxy = NH_PGET(nh, proxy);
if (nh->nh_auth) {
- if (cr->cr_challenged ||
+ if (cr->cr_challenged ||
NH_PGET(nh, auth_cache) == nua_auth_cache_dialog) {
if (auc_authorize(&nh->nh_auth, msg, sip) < 0)
return nua_client_return(cr, 900, "Cannot add credentials", msg);
@@ -2895,7 +2895,7 @@
terminated = 0, graceful = 1;
if (terminated < 0)
- cr->cr_terminated = terminated;
+ cr->cr_terminated = terminated;
else if (cr->cr_terminating || terminated)
cr->cr_terminated = 1;
else if (graceful)
@@ -2908,7 +2908,7 @@
else
nua_base_client_response(cr, status, phrase, sip, NULL);
cr->cr_phrase = NULL;
- }
+ }
else {
if (cr->cr_methods->crm_recv)
retval = cr->cr_methods->crm_recv(cr, status, phrase, sip);
@@ -2951,7 +2951,7 @@
char const *phrase,
sip_t const *sip)
{
- nua_handle_t *nh = cr->cr_owner;
+ nua_handle_t *nh = cr->cr_owner;
nta_outgoing_t *orq;
if (status == 302 || status == 305) {
@@ -2983,7 +2983,7 @@
if (status == 423) {
unsigned my_expires = 0;
-
+
if (cr->cr_sip->sip_expires)
my_expires = cr->cr_sip->sip_expires->ex_delta;
@@ -3024,7 +3024,7 @@
SU_DEBUG_7(("nua(%p): bad credentials, clearing them\n", (void *)nh));
auc_clear_credentials(&nh->nh_auth, NULL, NULL);
}
- else if (auc_has_authorization(&nh->nh_auth))
+ else if (auc_has_authorization(&nh->nh_auth))
return nua_client_restart(cr, 100, "Request Authorized by Cache");
orq = cr->cr_orq, cr->cr_orq = NULL;
@@ -3039,8 +3039,8 @@
}
}
- if (500 <= status && status < 600 &&
- sip->sip_retry_after &&
+ if (500 <= status && status < 600 &&
+ sip->sip_retry_after &&
sip->sip_retry_after->af_delta < 32) {
su_timer_t *timer;
char phrase[18]; /* Retry After XXXX\0 */
@@ -3055,7 +3055,7 @@
cr->cr_timer = timer; /* This takes over reference from orq */
- snprintf(phrase, sizeof phrase, "Retry After %u",
+ snprintf(phrase, sizeof phrase, "Retry After %u",
(unsigned)sip->sip_retry_after->af_delta);
orq = cr->cr_orq, cr->cr_orq = NULL;
@@ -3073,7 +3073,7 @@
static
void nua_client_restart_after(su_root_magic_t *magic,
su_timer_t *timer,
- nua_client_request_t *cr)
+ nua_client_request_t *cr)
{
cr->cr_waiting = 0;
su_timer_destroy(cr->cr_timer), cr->cr_timer = NULL;
@@ -3165,7 +3165,7 @@
/**@internal
* Relay response event to the application.
*
- * @todo
+ * @todo
* If handle has already been marked as destroyed by nua_handle_destroy(),
* release the handle with nh_destroy().
*
@@ -3194,7 +3194,7 @@
/**@internal
* Relay response event to the application.
*
- * @todo
+ * @todo
* If handle has already been marked as destroyed by nua_handle_destroy(),
* release the handle with nh_destroy().
*
@@ -3220,7 +3220,7 @@
auc_info(&nh->nh_auth,
sip->sip_authentication_info,
sip_authorization_class);
- if (sip->sip_proxy_authentication_info)
+ if (sip->sip_proxy_authentication_info)
auc_info(&nh->nh_auth,
sip->sip_proxy_authentication_info,
sip_proxy_authorization_class);
@@ -3288,8 +3288,8 @@
return cr->cr_methods->crm_report(cr, status, phrase, sip, orq, tags);
nh = cr->cr_owner;
-
- nua_stack_event(nh->nh_nua, nh,
+
+ nua_stack_event(nh->nh_nua, nh,
nta_outgoing_getresponse(orq),
cr->cr_event,
status, phrase,
@@ -3316,8 +3316,8 @@
for (; cr; cr = cr->cr_next) {
if (cr->cr_method == sip_method_cancel)
continue;
-
- if (invite
+
+ if (invite
? cr->cr_method == sip_method_invite
: cr->cr_method != sip_method_invite)
break;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.h Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
#ifndef NUA_STACK_H
/** Defined when <nua_stack.h> has been included. */
#define NUA_STACK_H
-/**@IFILE nua_stack.h
+/**@IFILE nua_stack.h
* @brief Sofia-SIP User Agent Engine - internal stack interface
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -103,10 +103,10 @@
TAG_IF((include) && (soa) && soa_is_remote_chat_active(soa) >= 0, \
SOATAG_ACTIVE_CHAT(soa_is_remote_chat_active(soa)))
-/** @internal @brief NUA handle.
+/** @internal @brief NUA handle.
*
*/
-struct nua_handle_s
+struct nua_handle_s
{
su_home_t nh_home[1]; /**< Memory home */
nua_handle_t *nh_next;
@@ -205,7 +205,7 @@
unsigned nua_from_is_set;
unsigned :0;
-
+
/**< Local SIP address. Contents are kept around for ever. */
sip_from_t nua_from[1];
@@ -261,12 +261,12 @@
#endif
su_inline nua_t *nua_stack_ref(nua_t *nua)
-{
+{
return (nua_t *)su_home_ref(nua->nua_home);
}
su_inline void nua_stack_unref(nua_t *nua)
-{
+{
su_home_unref(nua->nua_home);
}
@@ -289,25 +289,25 @@
nta_incoming_t *irq,
sip_t const *sip);
-void nua_stack_post_signal(nua_handle_t *nh, nua_event_t event,
+void nua_stack_post_signal(nua_handle_t *nh, nua_event_t event,
tag_type_t tag, tag_value_t value, ...);
-typedef int nua_stack_signal_handler(nua_t *,
- nua_handle_t *,
- nua_event_t,
+typedef int nua_stack_signal_handler(nua_t *,
+ nua_handle_t *,
+ nua_event_t,
tagi_t const *);
void nua_move_signal(nua_saved_signal_t a[1], nua_saved_signal_t b[1]);
nua_signal_data_t const *nua_signal_data(nua_saved_signal_t const saved[1]);
void nua_destroy_signal(nua_saved_signal_t saved[1]);
-nua_stack_signal_handler
+nua_stack_signal_handler
nua_stack_set_params, nua_stack_get_params,
- nua_stack_register,
- nua_stack_invite, nua_stack_ack, nua_stack_cancel,
+ nua_stack_register,
+ nua_stack_invite, nua_stack_ack, nua_stack_cancel,
nua_stack_bye, nua_stack_info, nua_stack_update,
nua_stack_prack,
- nua_stack_options, nua_stack_publish, nua_stack_message,
+ nua_stack_options, nua_stack_publish, nua_stack_message,
nua_stack_subscribe, nua_stack_notify, nua_stack_refer,
nua_stack_method;
@@ -358,7 +358,7 @@
nua_handle_t *nh_validate(nua_t *nua, nua_handle_t *maybe);
-sip_replaces_t *nua_stack_handle_make_replaces(nua_handle_t *handle,
+sip_replaces_t *nua_stack_handle_make_replaces(nua_handle_t *handle,
su_home_t *home,
int early_only);
@@ -386,7 +386,7 @@
sip_contact_t const *nua_stack_get_contact(nua_registration_t const *nr);
int nua_registration_add_contact_to_request(nua_handle_t *nh,
- msg_t *msg,
+ msg_t *msg,
sip_t *sip,
int add_contact,
int add_service_route);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_subnotref.c Tue Dec 16 13:05:22 2008
@@ -69,10 +69,10 @@
};
static char const *nua_subscribe_usage_name(nua_dialog_usage_t const *du);
-static int nua_subscribe_usage_add(nua_handle_t *nh,
+static int nua_subscribe_usage_add(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du);
-static void nua_subscribe_usage_remove(nua_handle_t *nh,
+static void nua_subscribe_usage_remove(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
@@ -102,8 +102,8 @@
return "subscribe";
}
-static
-int nua_subscribe_usage_add(nua_handle_t *nh,
+static
+int nua_subscribe_usage_add(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du)
{
@@ -113,15 +113,15 @@
return 0;
}
-static
-void nua_subscribe_usage_remove(nua_handle_t *nh,
+static
+void nua_subscribe_usage_remove(nua_handle_t *nh,
nua_dialog_state_t *ds,
nua_dialog_usage_t *du,
nua_client_request_t *cr,
nua_server_request_t *sr)
{
- ds->ds_has_events--;
- ds->ds_has_subscribes--;
+ ds->ds_has_events--;
+ ds->ds_has_subscribes--;
}
/* ====================================================================== */
@@ -129,17 +129,17 @@
/**@fn void nua_subscribe(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
*
- * Subscribe to a SIP event.
+ * Subscribe to a SIP event.
*
- * Subscribe a SIP event using the SIP SUBSCRIBE request. If the
- * SUBSCRBE is successful a subscription state is established and
+ * Subscribe a SIP event using the SIP SUBSCRIBE request. If the
+ * SUBSCRBE is successful a subscription state is established and
* the subscription is refreshed regularly. The refresh requests will
* generate #nua_r_subscribe events.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -155,17 +155,17 @@
/**@fn void nua_unsubscribe(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
*
- * Unsubscribe an event.
+ * Unsubscribe an event.
*
- * Unsubscribe an active or pending subscription with SUBSCRIBE request
- * containing Expires: header with value 0. The dialog associated with
- * subscription will be destroyed if there is no other subscriptions or
+ * Unsubscribe an active or pending subscription with SUBSCRIBE request
+ * containing Expires: header with value 0. The dialog associated with
+ * subscription will be destroyed if there is no other subscriptions or
* call using this dialog.
*
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -173,12 +173,12 @@
* Header tags defined in <sofia-sip/sip_tag.h> except SIPTAG_EXPIRES() or SIPTAG_EXPIRES_STR()
*
* @par Events:
- * #nua_r_unsubscribe
+ * #nua_r_unsubscribe
*
* @sa NUTAG_SUBSTATE(), @RFC3265
*/
-static int nua_subscribe_client_init(nua_client_request_t *cr,
+static int nua_subscribe_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
static int nua_subscribe_client_request(nua_client_request_t *cr,
@@ -231,7 +231,7 @@
/* Add Event header */
sip_add_dup(msg, sip, (sip_header_t *)du->du_event);
}
- else if (cr->cr_event == nua_r_subscribe) {
+ else if (cr->cr_event == nua_r_subscribe) {
/* Create dialog usage */
du = nua_dialog_usage_add(nh, nh->nh_ds, nua_subscribe_usage, o);
/* Note that we allow SUBSCRIBE without event */
@@ -246,7 +246,7 @@
msg_t *msg, sip_t *sip,
tagi_t const *tags)
{
- nua_dialog_usage_t *du = cr->cr_usage;
+ nua_dialog_usage_t *du = cr->cr_usage;
sip_time_t expires = 0;
if (cr->cr_event == nua_r_destroy || !du || du->du_shutdown)
@@ -275,7 +275,7 @@
#endif
nua_dialog_usage_reset_refresh(du); /* during SUBSCRIBE transaction */
-
+
if (cr->cr_terminating || cr->cr_event != nua_r_subscribe)
expires = eu->eu_delta = 0;
else if (sip->sip_expires)
@@ -318,7 +318,7 @@
* @param nh operation handle associated with the subscription
* @param hmagic application context associated with the handle
* @param sip response to SUBSCRIBE request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags NUTAG_SUBSTATE()
*
@@ -339,7 +339,7 @@
* @param nh operation handle associated with the subscription
* @param hmagic application context associated with the handle
* @param sip response to SUBSCRIBE request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags NUTAG_SUBSTATE()
*
@@ -368,9 +368,9 @@
du->du_ready = 1;
if (eu->eu_substate != nua_substate_terminated)
- /* If there is no @Expires header,
+ /* If there is no @Expires header,
use default value stored in eu_delta */
- delta = sip_contact_expires(NULL, sip->sip_expires, sip->sip_date,
+ delta = sip_contact_expires(NULL, sip->sip_expires, sip->sip_date,
eu->eu_delta, now);
else
delta = 0;
@@ -379,14 +379,14 @@
delta = eu->eu_delta;
if (win_messenger_enable && !nua_dialog_is_established(nh->nh_ds)) {
- /* Notify from messanger does not match with dialog tag */
+ /* Notify from messanger does not match with dialog tag */
nh->nh_ds->ds_remote_tag = su_strdup(nh->nh_home, "");
}
if (delta > 0) {
nua_dialog_usage_set_refresh(du, delta);
eu->eu_expires = du->du_refquested + delta;
- }
+ }
else {
if (eu->eu_substate == nua_substate_terminated) {
if (!eu->eu_notified)
@@ -396,7 +396,7 @@
if (eu->eu_substate != nua_substate_terminated) {
/* Wait 32 seconds for NOTIFY. */
delta = 64 * NTA_SIP_T1 / 1000;
-
+
eu->eu_final_wait = 1;
if (!eu->eu_notified && win_messenger_enable)
@@ -405,7 +405,7 @@
nua_dialog_usage_set_refresh_range(du, delta, delta);
}
else {
- nua_dialog_usage_reset_refresh(du);
+ nua_dialog_usage_reset_refresh(du);
}
eu->eu_expires = du->du_refquested;
@@ -418,7 +418,7 @@
cr->cr_terminated = 1;
}
- return nua_base_client_tresponse(cr, status, phrase, sip,
+ return nua_base_client_tresponse(cr, status, phrase, sip,
NUTAG_SUBSTATE(substate),
SIPTAG_EVENT(du ? du->du_event : NULL),
TAG_END());
@@ -432,9 +432,9 @@
{
nua_client_request_t *cr = du->du_cr;
struct event_usage *eu = nua_dialog_usage_private(du);
-
+
assert(eu);
-
+
if (eu->eu_final_wait) {
/* Did not receive NOTIFY for fetch */
sip_event_t const *o = du->du_event;
@@ -445,7 +445,7 @@
id ? "; id=" : "", id ? id : ""));
nua_stack_tevent(nh->nh_nua, nh, NULL,
- nua_i_notify, 408, "Fetch Timeouts without NOTIFY",
+ nua_i_notify, 408, "Fetch Timeouts without NOTIFY",
NUTAG_SUBSTATE(nua_substate_terminated),
SIPTAG_EVENT(du->du_event),
TAG_END());
@@ -494,7 +494,7 @@
if (nua_client_resend_request(cr, 1) >= 0)
return 0;
}
-
+
nua_dialog_usage_remove(nh, ds, du, NULL, NULL);
return 200;
}
@@ -514,7 +514,7 @@
* @param tags NUTAG_SUBSTATE() indicating the subscription state
*
* @sa nua_subscribe(), nua_unsubscribe(), @RFC3265, #nua_i_subscribe
- *
+ *
* @END_NUA_EVENT
*/
@@ -522,11 +522,11 @@
int nua_notify_server_preprocess(nua_server_request_t *sr);
int nua_notify_server_report(nua_server_request_t *, tagi_t const *);
-nua_server_methods_t const nua_notify_server_methods =
+nua_server_methods_t const nua_notify_server_methods =
{
SIP_METHOD_NOTIFY,
nua_i_notify, /* Event */
- {
+ {
/* create_dialog: */ 1, /* Do create dialog */
/* in_dialog: */ 0, /* Not always in-dialog request */
/* target_refresh: */ 1, /* Target refresh request */
@@ -546,15 +546,15 @@
nua_dialog_state_t *ds = sr->sr_owner->nh_ds;
/* Check for forked subscription. */
- if (ds->ds_remote_tag && ds->ds_remote_tag[0] &&
+ if (ds->ds_remote_tag && ds->ds_remote_tag[0] &&
str0cmp(ds->ds_remote_tag, sr->sr_request.sip->sip_from->a_tag)) {
sip_contact_t const *m = NULL;
m = nua_stack_get_contact(sr->sr_owner->nh_nua->nua_registrations);
-
+
if (m) {
sip_warning_t w[1];
-
+
sip_warning_init(w)->w_code = 399;
w->w_host = m->m_url->url_host;
w->w_port = m->m_url->url_port;
@@ -593,17 +593,17 @@
if (!du)
return SR_STATUS1(sr, SIP_500_INTERNAL_SERVER_ERROR);
}
-
+
sr->sr_usage = du;
eu = nua_dialog_usage_private(du); assert(eu);
eu->eu_notified++;
- if (!o || !o->o_id)
+ if (!o || !o->o_id)
eu->eu_no_id = 1;
if (subs == NULL) {
/* Compatibility */
unsigned long delta = eu->eu_delta;
- if (sip->sip_expires)
+ if (sip->sip_expires)
delta = sip->sip_expires->ex_delta;
if (delta == 0)
@@ -616,7 +616,7 @@
reason = subs->ss_reason;
if (str0casecmp(reason, "deactivated") == 0 ||
- str0casecmp(reason, "probation") == 0)
+ str0casecmp(reason, "probation") == 0)
substate = nua_substate_embryonic;
}
else if (strcasecmp(subs->ss_substate, what = "pending") == 0) {
@@ -632,7 +632,7 @@
if (!solicited)
eu->eu_unsolicited = 1;
- SU_DEBUG_5(("nua(%p): %s: %s (%s)\n",
+ SU_DEBUG_5(("nua(%p): %s: %s (%s)\n",
(void *)sr->sr_owner, "nua_notify_server_preprocess",
what, reason ? reason : ""));
@@ -672,7 +672,7 @@
if (subs && subs->ss_reason) {
if (str0casecmp(subs->ss_reason, "deactivated") == 0) {
retry = 0; /* retry immediately */
- }
+ }
else if (str0casecmp(subs->ss_reason, "probation") == 0) {
retry = 30;
if (subs->ss_retry_after)
@@ -686,11 +686,11 @@
sr->sr_terminating = 1;
}
}
-
+
retval = nua_base_server_treport(sr, /* can destroy sr */
NUTAG_SUBSTATE(substate),
SIPTAG_EVENT(o),
- TAG_NEXT(tags));
+ TAG_NEXT(tags));
if (retval != 1 || du == NULL)
return retval;
@@ -719,9 +719,9 @@
/**@fn void nua_refer(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...);
*
- * Transfer a call.
- *
- * Send a REFER request asking the recipient to transfer the call.
+ * Transfer a call.
+ *
+ * Send a REFER request asking the recipient to transfer the call.
*
* The REFER request also establishes an implied subscription to the "refer"
* event. The "refer" event can have an "id" parameter, which has the value
@@ -745,7 +745,7 @@
* @param nh Pointer to operation handle
* @param tag, value, ... List of tagged parameters
*
- * @return
+ * @return
* nothing
*
* @par Related Tags:
@@ -776,7 +776,7 @@
* @param nh operation handle associated with the REFER request
* @param hmagic application context associated with the handle
* @param sip response to REFER request or NULL upon an error
- * (status code is in @a status and
+ * (status code is in @a status and
* descriptive message in @a phrase parameters)
* @param tags NUTAG_REFER_EVENT() \n
* NUTAG_SUBSTATE()
@@ -787,7 +787,7 @@
* @END_NUA_EVENT
*/
-static int nua_refer_client_init(nua_client_request_t *cr,
+static int nua_refer_client_init(nua_client_request_t *cr,
msg_t *, sip_t *,
tagi_t const *tags);
static int nua_refer_client_request(nua_client_request_t *cr,
@@ -901,15 +901,15 @@
int status, char const *phrase,
sip_t const *sip)
{
- nua_dialog_usage_t *du = cr->cr_usage;
+ nua_dialog_usage_t *du = cr->cr_usage;
enum nua_substate substate = nua_substate_terminated;
if (du) {
struct event_usage *eu = nua_dialog_usage_private(du);
if (status < 200) {
- substate = eu->eu_substate;
- }
+ substate = eu->eu_substate;
+ }
else if (status < 300) {
sip_refer_sub_t const *rs = sip_refer_sub(sip);
@@ -920,8 +920,8 @@
substate = eu->eu_substate;
}
}
-
- return nua_base_client_tresponse(cr, status, phrase, sip,
+
+ return nua_base_client_tresponse(cr, status, phrase, sip,
NUTAG_SUBSTATE(substate),
SIPTAG_EVENT(du ? du->du_event : NULL),
TAG_END());
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_tag.c Tue Dec 16 13:05:22 2008
@@ -462,15 +462,15 @@
* int (boolean: nonzero is true, zero is false)
*
* @par Values
- * - 0 (false) - include 100rel in all preliminary responses
+ * - 0 (false) - include 100rel in all preliminary responses
* - 1 (true) - include 100rel only in 183 responses
*
- * @note
+ * @note
* This tag takes only effect when NUTAG_EARLY_MEDIA(1) has been used, too.
*
* Corresponding tag taking reference parameter is NUTAG_ONLY183_100REL_REF().
*
- * @sa
+ * @sa
*/
tag_typedef_t nutag_only183_100rel = BOOLTAG_TYPEDEF(only183_100rel);
@@ -527,7 +527,7 @@
*
* @par Values
* - 0 (false) - do not include extra SDP on 200 OK
- * - 1 (true) - include SDP in 200 OK even if it has been sent
+ * - 1 (true) - include SDP in 200 OK even if it has been sent
* a 100rel response, too
*
* Corresponding tag taking reference parameter is
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_types.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_types.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_types.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <nua_types.h> has been included. */
#define NUA_TYPES_H
-/**@internal @file nua_types.h
+/**@internal @file nua_types.h
* @brief Internal types for nua.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -42,8 +42,8 @@
typedef struct nua_dialog_state nua_dialog_state_t;
typedef struct nua_dialog_usage nua_dialog_usage_t;
-typedef struct nua_server_request nua_server_request_t;
-typedef struct nua_client_request nua_client_request_t;
+typedef struct nua_server_request nua_server_request_t;
+typedef struct nua_client_request nua_client_request_t;
typedef struct nua_dialog_peer_info nua_dialog_peer_info_t;
#ifndef NUA_SAVED_SIGNAL_T
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.c Tue Dec 16 13:05:22 2008
@@ -200,7 +200,7 @@
return NULL;
ob = su_home_clone((su_home_t *)owner, sizeof *ob);
-
+
if (ob) {
su_md5_t md5[1];
uint8_t digest[SU_MD5_DIGEST_SIZE];
@@ -224,7 +224,7 @@
su_md5_update(md5, (void *)guid, sizeof guid);
su_md5_digest(md5, digest);
token64_e(ob->ob_cookie, sizeof ob->ob_cookie, digest, sizeof digest);
-
+
if (instance && !ob->ob_instance)
su_home_unref(ob->ob_home), ob = NULL;
}
@@ -310,7 +310,7 @@
su_free(NULL, options);
if (invalid) {
- SU_DEBUG_1(("outbound(%p): invalid options \"%s\"\n",
+ SU_DEBUG_1(("outbound(%p): invalid options \"%s\"\n",
(void *)ob->ob_owner, options));
return -1;
}
@@ -354,8 +354,8 @@
/* ---------------------------------------------------------------------- */
/** Obtain contacts for REGISTER */
-int outbound_get_contacts(outbound_t *ob,
- sip_contact_t **return_current_contact,
+int outbound_get_contacts(outbound_t *ob,
+ sip_contact_t **return_current_contact,
sip_contact_t **return_previous_contact)
{
if (ob) {
@@ -396,7 +396,7 @@
if (terminating) {
ob->ob_registering = ob->ob_registered = 0;
return 0; /* Cleanup is done separately */
- }
+ }
if (!response || !request)
return 0;
@@ -449,7 +449,7 @@
if (!ob->ob_by_stack)
return ob_no_nat;
- /* Application does not want us to do any NAT traversal */
+ /* Application does not want us to do any NAT traversal */
if (!ob->ob_prefs.natify)
return ob_no_nat;
@@ -615,7 +615,7 @@
}
gruu = (char *)msg_header_find_param(m->m_common, "pub-gruu=");
-
+
if (gruu == NULL || gruu[0] == '\0')
gruu = (char *)msg_header_find_param(m->m_common, "gruu=");
@@ -692,7 +692,7 @@
ob->ob_keepalive.interval = interval;
- if (!ob->ob_validated && ob->ob_keepalive.sipstun
+ if (!ob->ob_validated && ob->ob_keepalive.sipstun
&& 0 /* Stun is disabled for now */) {
nta_tport_keepalive(register_transaction);
}
@@ -754,7 +754,7 @@
s = su_strdup(msg_home(msg), s);
msg_header_add_param(msg_home(msg), ac->cp_common, s);
}
-
+
if (features)
msg_header_insert(msg, NULL, (void *)ac);
else
@@ -917,36 +917,36 @@
if (status < 300 && ob->ob_keepalive.validated) {
loglevel = 5;
- if (ob->ob_validated)
+ if (ob->ob_validated)
loglevel = 99; /* only once */
ob->ob_validated = ob->ob_once_validated = 1;
}
- else if (status == 401 || status == 407 || status == 403)
+ else if (status == 401 || status == 407 || status == 403)
loglevel = 5, failed = 1;
else
loglevel = 3, failed = 1;
-
+
if (loglevel >= SU_LOG->log_level) {
sip_contact_t const *m = ob->ob_rcontact;
if (m)
- su_llog(SU_LOG, loglevel,
+ su_llog(SU_LOG, loglevel,
"outbound(%p): %s <" URL_PRINT_FORMAT ">\n",
(void *)ob->ob_owner,
failed ? "FAILED to validate" : "validated",
URL_PRINT_ARGS(m->m_url));
else
- su_llog(SU_LOG, loglevel,
+ su_llog(SU_LOG, loglevel,
"outbound(%p): %s registration\n",
(void *)ob->ob_owner,
failed ? "FAILED to validate" : "validated");
if (failed)
- su_llog(SU_LOG, loglevel, "outbound(%p): FAILED with %u %s\n",
+ su_llog(SU_LOG, loglevel, "outbound(%p): FAILED with %u %s\n",
(void *)ob->ob_owner, status, phrase);
}
- if (failed)
+ if (failed)
ob->ob_oo->oo_probe_error(ob->ob_owner, ob, status, phrase, TAG_END());
}
else if (status == 408) {
@@ -1027,7 +1027,7 @@
/** Check if request should be processed by outbound */
int outbound_targeted_request(sip_t const *sip)
{
- return
+ return
sip && sip->sip_request &&
sip->sip_request->rq_method == sip_method_options &&
sip->sip_accept &&
@@ -1036,7 +1036,7 @@
}
/** Answer to the connectivity probe OPTIONS */
-int outbound_process_request(outbound_t *ob,
+int outbound_process_request(outbound_t *ob,
nta_incoming_t *irq,
sip_t const *sip)
{
@@ -1045,7 +1045,7 @@
return 0;
if (ob->ob_keepalive.validating) {
- SU_DEBUG_5(("outbound(%p): registration check OPTIONS received\n",
+ SU_DEBUG_5(("outbound(%p): registration check OPTIONS received\n",
(void *)ob->ob_owner));
ob->ob_keepalive.validated = 1;
}
@@ -1063,7 +1063,7 @@
/**@internal
* Create contacts for outbound.
*
- * There are two contacts:
+ * There are two contacts:
* one suitable for registrations (ob_rcontact) and another that can be used
* in dialogs (ob_dcontact).
*/
@@ -1082,16 +1082,16 @@
v = v0; *v0 = *via; v0->v_next = NULL;
- dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
+ dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
v, v->v_protocol, NULL);
if (ob->ob_instance && ob->ob_reg_id != 0)
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
- v, v->v_protocol,
+ v, v->v_protocol,
ob->ob_instance, reg_id_param, NULL);
-
+
v = sip_via_dup(home, v);
if (!rcontact || !dcontact || !v) {
@@ -1171,14 +1171,14 @@
if (terminating) {
if (ob->ob_by_stack && application_contact == NULL)
return 0;
-
+
if (ob->ob_contacts)
previous = ob->ob_rcontact;
}
else if (application_contact) {
rcontact = sip_contact_dup(home, application_contact);
- if (!ob->ob_rcontact ||
+ if (!ob->ob_rcontact ||
url_cmp_all(ob->ob_rcontact->m_url, application_contact->m_url)) {
contact_uri_changed = 1;
previous = ob->ob_contacts ? ob->ob_rcontact : NULL;
@@ -1188,10 +1188,10 @@
return 0; /* Xyzzy - nothing happens */
}
else if (v) {
- char const *tport = !v->v_next ? v->v_protocol : NULL;
+ char const *tport = !v->v_next ? v->v_protocol : NULL;
char reg_id_param[20];
- dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
+ dcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 1,
v, tport, NULL);
if (!dcontact)
return -1;
@@ -1200,18 +1200,18 @@
snprintf(reg_id_param, sizeof reg_id_param, ";reg-id=%u", ob->ob_reg_id);
rcontact = ob->ob_oo->oo_contact(ob->ob_owner, home, 0,
- v, v->v_protocol,
+ v, v->v_protocol,
ob->ob_instance, reg_id_param, NULL);
if (!rcontact)
return -1;
- if (!ob->ob_rcontact ||
+ if (!ob->ob_rcontact ||
url_cmp_all(ob->ob_rcontact->m_url, rcontact->m_url)) {
contact_uri_changed = 1;
previous = ob->ob_contacts ? ob->ob_rcontact : NULL;
}
}
-
+
ob->ob_by_stack = application_contact == NULL;
ob->ob_contacts = rcontact != NULL;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/outbound.h Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
#ifndef OUTBOUND_H
/** Defined when <outbound.h> has been included. */
#define OUTBOUND_H
-/**@IFILE outbound.h
+/**@IFILE outbound.h
*
* @brief Interface to SIP NAT traversal and outbound
*
@@ -73,8 +73,8 @@
int outbound_set_proxy(outbound_t *ob,
url_string_t *proxy);
-int outbound_get_contacts(outbound_t *ob,
- sip_contact_t **return_current_contact,
+int outbound_get_contacts(outbound_t *ob,
+ sip_contact_t **return_current_contact,
sip_contact_t **return_previous_contact);
int outbound_start_registering(outbound_t *ob);
@@ -110,7 +110,7 @@
int outbound_targeted_request(sip_t const *sip);
-int outbound_process_request(outbound_t *ob,
+int outbound_process_request(outbound_t *ob,
nta_incoming_t *irq,
sip_t const *sip);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/sofia-sip/nua.h Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*
*/
-/**@file sofia-sip/nua.h
+/**@file sofia-sip/nua.h
* @brief Sofia-SIP User Agent Library API
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -53,13 +53,13 @@
SOFIA_BEGIN_DECLS
-#ifndef NUA_MAGIC_T
+#ifndef NUA_MAGIC_T
#define NUA_MAGIC_T void
#endif
/** Application context for NUA agent. */
typedef NUA_MAGIC_T nua_magic_t;
-#ifndef NUA_HMAGIC_T
+#ifndef NUA_HMAGIC_T
#define NUA_HMAGIC_T void
#endif
/** Application context for NUA handle. */
@@ -112,9 +112,9 @@
nua_i_media_error, /**< Offer-answer error indication */
/* Responses */
- nua_r_set_params, /**< Answer to nua_set_params() or
+ nua_r_set_params, /**< Answer to nua_set_params() or
* nua_get_hparams(). */
- nua_r_get_params, /**< Answer to nua_get_params() or
+ nua_r_get_params, /**< Answer to nua_get_params() or
* nua_get_hparams(). */
nua_r_shutdown, /**< Answer to nua_shutdown() */
nua_r_notifier, /**< Answer to nua_notifier() */
@@ -140,7 +140,7 @@
nua_r_unsubscribe, /**< Answer to outgoing un-SUBSCRIBE */
nua_r_notify, /**< Answer to outgoing NOTIFY */
nua_r_method, /**< Answer to unknown outgoing method */
-
+
nua_r_authenticate, /**< Answer to nua_authenticate() */
/* Internal events: nua hides them from application */
@@ -152,7 +152,7 @@
/* NOTE: Post 1.12 release events come here (below) to keep ABI
compatibility! */
- nua_i_network_changed, /**< Local IP(v6) address has changed.
+ nua_i_network_changed, /**< Local IP(v6) address has changed.
@NEW_1_12_2 */
nua_i_register /**< Incoming REGISTER. @NEW_1_12_4. */
} nua_event_t;
@@ -269,16 +269,16 @@
/** Convert string to enum nua_substate. @NEW_1_12_5. */
SOFIAPUBFUN enum nua_substate nua_substate_make(char const *sip_substate);
-/** Send SIP REGISTER request to the registrar. */
+/** Send SIP REGISTER request to the registrar. */
SOFIAPUBFUN void nua_register(nua_handle_t *nh, tag_type_t, tag_value_t, ...);
-/** Unregister. */
+/** Unregister. */
SOFIAPUBFUN void nua_unregister(nua_handle_t *nh, tag_type_t, tag_value_t, ...);
/** Place a call using SIP INVITE method. */
SOFIAPUBFUN void nua_invite(nua_handle_t *nh, tag_type_t, tag_value_t, ...);
-/** Acknowledge a succesfull response to INVITE request. */
+/** Acknowledge a succesfull response to INVITE request. */
SOFIAPUBFUN void nua_ack(nua_handle_t *nh, tag_type_t, tag_value_t, ...);
/** Acknowledge a reliable preliminary response to INVITE request. */
@@ -320,7 +320,7 @@
/** Transfer a call. */
SOFIAPUBFUN void nua_refer(nua_handle_t *, tag_type_t, tag_value_t, ...);
-/** Update a call */
+/** Update a call */
SOFIAPUBFUN void nua_update(nua_handle_t *, tag_type_t, tag_value_t, ...);
/** Hangdown a call. */
@@ -342,9 +342,9 @@
SOFIAPUBFUN void nua_method(nua_handle_t *, tag_type_t, tag_value_t, ...);
/** Respond to a request with given status code and phrase. */
-SOFIAPUBFUN void nua_respond(nua_handle_t *nh,
+SOFIAPUBFUN void nua_respond(nua_handle_t *nh,
int status, char const *phrase,
- tag_type_t, tag_value_t,
+ tag_type_t, tag_value_t,
...);
/** Check if event can be responded with nua_respond() */
@@ -377,7 +377,7 @@
/** Get current request message. */
SOFIAPUBFUN msg_t *nua_current_request(nua_t const *nua);
-SOFIAPUBFUN sip_replaces_t *nua_handle_make_replaces(nua_handle_t *nh,
+SOFIAPUBFUN sip_replaces_t *nua_handle_make_replaces(nua_handle_t *nh,
su_home_t *home,
int early_only);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c Tue Dec 16 13:05:22 2008
@@ -62,8 +62,8 @@
/* -- Module prototypes ------------------------------------------------- */
static msg_t *s2_msg(int flags);
-static int s2_complete_response(msg_t *response,
- int status, char const *phrase,
+static int s2_complete_response(msg_t *response,
+ int status, char const *phrase,
msg_t *request);
static char *s2_generate_tag(su_home_t *home);
@@ -132,7 +132,7 @@
e->prev = NULL, e->next = NULL;
- return e;
+ return e;
}
void s2_free_event(struct event *e)
@@ -163,7 +163,7 @@
su_root_step(s2->root, 100);
}
-}
+}
struct event *s2_wait_for_event(nua_event_t event, int status)
{
@@ -180,7 +180,7 @@
su_root_step(s2->root, 100);
}
-}
+}
int s2_check_event(nua_event_t event, int status)
{
@@ -206,7 +206,7 @@
return retval;
}
-static void
+static void
s2_nua_callback(nua_event_t event,
int status, char const *phrase,
nua_t *nua, nua_magic_t *_t,
@@ -218,7 +218,7 @@
if (event == nua_i_active || event == nua_i_terminated)
return;
-
+
e = calloc(1, sizeof *e);
nua_save_event(nua, e->event);
e->nh = nua_handle_ref(nh);
@@ -241,7 +241,7 @@
m->prev = NULL, m->next = NULL;
- return m;
+ return m;
}
void
@@ -294,10 +294,10 @@
if (method == sip_method_unknown && name == NULL)
break;
-
+
if (m->sip->sip_cseq == NULL)
continue;
-
+
if (m->sip->sip_cseq->cs_method != method)
continue;
if (name == NULL)
@@ -311,7 +311,7 @@
su_root_step(s2->root, 100);
}
-}
+}
int
s2_check_response(int status, sip_method_t method, char const *name)
@@ -335,9 +335,9 @@
su_root_step(s2->root, 100);
}
-
+
return NULL;
-}
+}
struct message *
s2_wait_for_request(sip_method_t method, char const *name)
@@ -358,9 +358,9 @@
su_root_step(s2->root, 100);
}
-
+
return NULL;
-}
+}
int
s2_check_request(sip_method_t method, char const *name)
@@ -425,7 +425,7 @@
*tpn = *tport_name(m->tport);
- rport = su_sprintf(home, "rport=%u",
+ rport = su_sprintf(home, "rport=%u",
ntohs(((su_sockaddr_t *)
msg_addrinfo(m->msg)->ai_addr)->su_port));
@@ -433,7 +433,7 @@
sip->sip_via->v_rport &&
sip->sip_via->v_rport[0] == '\0') {
msg_header_add_param(home, sip->sip_via->v_common, rport);
- }
+ }
tpn->tpn_port = rport + strlen("rport=");
@@ -446,9 +446,9 @@
}
/** Add headers from the request to the response message. */
-static int
-s2_complete_response(msg_t *response,
- int status, char const *phrase,
+static int
+s2_complete_response(msg_t *response,
+ int status, char const *phrase,
msg_t *request)
{
su_home_t *home = msg_home(response);
@@ -469,7 +469,7 @@
if (!response_sip->sip_to)
response_sip->sip_to = sip_to_dup(home, request_sip->sip_to);
if (!response_sip->sip_call_id)
- response_sip->sip_call_id =
+ response_sip->sip_call_id =
sip_call_id_dup(home, request_sip->sip_call_id);
if (!response_sip->sip_cseq)
response_sip->sip_cseq = sip_cseq_dup(home, request_sip->sip_cseq);
@@ -496,11 +496,11 @@
return 0;
}
-/* Send request (updating dialog).
+/* Send request (updating dialog).
*
* Return zero upon success, nonzero upon failure.
*/
-int
+int
s2_request_to(struct dialog *d,
sip_method_t method, char const *name,
tport_t *tport,
@@ -546,7 +546,7 @@
if (!d->local && sip->sip_from)
d->local = sip_from_dup(d->home, sip->sip_from);
- if (!d->contact && sip->sip_contact)
+ if (!d->contact && sip->sip_contact)
d->contact = sip_contact_dup(d->home, sip->sip_contact);
if (!d->remote && sip->sip_to)
d->remote = sip_to_dup(d->home, sip->sip_to);
@@ -558,7 +558,7 @@
d->call_id = sip_call_id_dup(d->home, sip->sip_call_id);
if (!d->lseq && sip->sip_cseq)
d->lseq = sip->sip_cseq->cs_seq;
-
+
if (!d->local)
d->local = sip_from_dup(d->home, s2->local);
if (!d->contact)
@@ -643,7 +643,7 @@
}
}
- sip_add_tl(msg, sip,
+ sip_add_tl(msg, sip,
TAG_IF(!sip->sip_from, SIPTAG_FROM(d->local)),
TAG_IF(!sip->sip_contact, SIPTAG_CONTACT(d->contact)),
TAG_IF(!sip->sip_to, SIPTAG_TO(d->remote)),
@@ -670,7 +670,7 @@
}
return tport ? 0 : -1;
-
+
error:
ta_end(ta);
return -1;
@@ -809,7 +809,7 @@
/* ---------------------------------------------------------------------- */
/* tport interface */
-static void
+static void
s2_stack_recv(struct tester *s2,
tport_t *tp,
msg_t *msg,
@@ -844,16 +844,16 @@
int errcode,
char const *remote)
{
- fprintf(stderr, "%s(%p): error %d (%s) from %s\n",
+ fprintf(stderr, "%s(%p): error %d (%s) from %s\n",
"nua_tester_error",
- (void *)tp, errcode, su_strerror(errcode),
+ (void *)tp, errcode, su_strerror(errcode),
remote ? remote : "<unknown destination>");
}
static msg_t *
s2_stack_alloc(struct tester *s2, int flags,
char const data[], usize_t size,
- tport_t const *tport,
+ tport_t const *tport,
tp_client_t *tpc)
{
return msg_create(s2->mclass, flags | s2->flags);
@@ -890,7 +890,7 @@
s2->local = sip_from_format(s2->home, "Bob <sip:bob@%s>",
hostname ? hostname : "example.net");
-
+
if (hostname == NULL)
hostname = "127.0.0.1";
@@ -952,8 +952,8 @@
if (protocols == NULL)
protocols = default_protocols;
-
- bound = tport_tbind(s2->master, tpn, protocols,
+
+ bound = tport_tbind(s2->master, tpn, protocols,
TPTAG_SERVER(1),
ta_tags(ta));
assert(bound != -1);
@@ -979,7 +979,7 @@
v = sip_via_format(s2->home, "SIP/2.0/%s %s:%s",
tpn->tpn_proto,
- tpn->tpn_host,
+ tpn->tpn_host,
tpn->tpn_port);
assert(v != NULL);
if (strncasecmp(tpn->tpn_proto, "tls", 3)) {
@@ -988,11 +988,11 @@
tpn->tpn_port,
tpn->tpn_proto);
if (s2->udp.contact == NULL && strcasecmp(tpn->tpn_proto, "udp") == 0) {
- s2->udp.tport = tport_ref(tp);
+ s2->udp.tport = tport_ref(tp);
s2->udp.contact = m;
}
if (s2->tcp.contact == NULL && strcasecmp(tpn->tpn_proto, "tcp") == 0) {
- s2->tcp.tport = tport_ref(tp);
+ s2->tcp.tport = tport_ref(tp);
s2->tcp.contact = m;
}
}
@@ -1007,7 +1007,7 @@
tpn->tpn_host,
tpn->tpn_port);
if (s2->tls.contact == NULL) {
- s2->tls.tport = tport_ref(tp);
+ s2->tls.tport = tport_ref(tp);
s2->tls.contact = m;
}
}
@@ -1519,7 +1519,7 @@
NULL);
ta_start(ta, tag, value);
- s2->nua =
+ s2->nua =
nua_create(s2->root,
s2_nua_callback,
s2,
@@ -1534,7 +1534,7 @@
#endif
ta_tags(ta));
ta_end(ta);
-
+
return s2->nua;
}
@@ -1600,7 +1600,7 @@
struct message *m;
nua_unregister(nh, TAG_END());
-
+
m = s2_wait_for_request(SIP_METHOD_REGISTER); assert(m);
s2_save_register(m);
s2_respond_to(m, NULL,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.h Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*/
#ifndef S2TESTER_H
-#define S2TESTER_H
+#define S2TESTER_H
#define TP_STACK_T struct tester
#define SU_ROOT_MAGIC_T struct tester
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/ChangeLog (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/ChangeLog Tue Dec 16 13:05:22 2008
@@ -17,7 +17,7 @@
* sdp_print.c (sdp_printing_error): Fixed return
for success to be NULL as defined in function
documentation.
-
+
2005-09-29 Pekka Pessi <Pekka.Pessi at nokia.com>
* Added SDPTAG_TYPEDEF().
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/errata
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/errata (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/errata Tue Dec 16 13:05:22 2008
@@ -6,7 +6,7 @@
but example (RTP/AVP!) contains also "/"
* bwtype is restricted to alpha-numeric, but the RFC text discusses
- extensions like b=x-y:100
+ extensions like b=x-y:100
* att-field is restricted to alpha-numeric, but the RFC text discusses
extensions like a=x-nokia-foo
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/run_test_sdp Tue Dec 16 13:05:22 2008
@@ -12,12 +12,12 @@
if test -r $tests/message-1.sdp ; then
for n in 1 2 3 4 5 6 7 8 9 10 11;
-do
+do
echo -n "$n: "
"$test_sdp" < "$tests/message-$n.sdp" && echo OK
done
-else
+else
echo "sdp run-tests: no tests found in $tests, skipping."
exit 77
fi
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c Tue Dec 16 13:05:22 2008
@@ -99,37 +99,37 @@
static size_t list_xtra_all(xtra_f *xtra, void const *v);
static void *list_dup_all(dup_f *dup, char **bb, void const *vsrc);
-static size_t session_xtra(sdp_session_t const *o);
+static size_t session_xtra(sdp_session_t const *o);
static sdp_session_t *session_dup(char **pp, sdp_session_t const *o);
-static size_t origin_xtra(sdp_origin_t const *o);
+static size_t origin_xtra(sdp_origin_t const *o);
static sdp_origin_t *origin_dup(char **pp, sdp_origin_t const *o);
-static size_t connection_xtra(sdp_connection_t const *o);
+static size_t connection_xtra(sdp_connection_t const *o);
static sdp_connection_t *connection_dup(char **pp, sdp_connection_t const *o);
-static size_t bandwidth_xtra(sdp_bandwidth_t const *o);
+static size_t bandwidth_xtra(sdp_bandwidth_t const *o);
static sdp_bandwidth_t *bandwidth_dup(char **pp, sdp_bandwidth_t const *o);
-static size_t time_xtra(sdp_time_t const *o);
+static size_t time_xtra(sdp_time_t const *o);
static sdp_time_t *time_dup(char **pp, sdp_time_t const *o);
-static size_t repeat_xtra(sdp_repeat_t const *o);
+static size_t repeat_xtra(sdp_repeat_t const *o);
static sdp_repeat_t *repeat_dup(char **pp, sdp_repeat_t const *o);
-static size_t zone_xtra(sdp_zone_t const *o);
+static size_t zone_xtra(sdp_zone_t const *o);
static sdp_zone_t *zone_dup(char **pp, sdp_zone_t const *o);
-static size_t key_xtra(sdp_key_t const *o);
+static size_t key_xtra(sdp_key_t const *o);
static sdp_key_t *key_dup(char **pp, sdp_key_t const *o);
-static size_t attribute_xtra(sdp_attribute_t const *o);
+static size_t attribute_xtra(sdp_attribute_t const *o);
static sdp_attribute_t *attribute_dup(char **pp, sdp_attribute_t const *o);
-static size_t list_xtra(sdp_list_t const *o);
+static size_t list_xtra(sdp_list_t const *o);
static sdp_list_t *list_dup(char **pp, sdp_list_t const *o);
-static size_t rtpmap_xtra(sdp_rtpmap_t const *o);
+static size_t rtpmap_xtra(sdp_rtpmap_t const *o);
static sdp_rtpmap_t *rtpmap_dup(char **pp, sdp_rtpmap_t const *o);
static size_t media_xtra(sdp_media_t const *o);
@@ -182,12 +182,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_origin_t structure is
* returned, otherwise NULL is returned.
*/
sdp_origin_t *sdp_origin_dup(su_home_t *h, sdp_origin_t const *o)
-{
+{
SDP_DUP(origin, o);
}
@@ -202,12 +202,12 @@
* @note The duplicated list is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_connection_t structure is
* returned, otherwise NULL is returned.
*/
sdp_connection_t *sdp_connection_dup(su_home_t *h, sdp_connection_t const *c)
-{
+{
SDP_LIST_DUP(connection, c);
}
@@ -222,12 +222,12 @@
* @note The duplicated list is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_bandwidth_t structure is
* returned, otherwise NULL is returned.
*/
sdp_bandwidth_t *sdp_bandwidth_dup(su_home_t *h, sdp_bandwidth_t const *b)
-{
+{
SDP_LIST_DUP(bandwidth, b);
}
@@ -242,12 +242,12 @@
* @note The duplicated list is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_time_t structure is
* returned, otherwise NULL is returned.
*/
sdp_time_t *sdp_time_dup(su_home_t *h, sdp_time_t const *t)
-{
+{
SDP_LIST_DUP(time, t);
}
@@ -262,12 +262,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_repeat_t structure is
* returned, otherwise NULL is returned.
*/
sdp_repeat_t *sdp_repeat_dup(su_home_t *h, sdp_repeat_t const *r)
-{
+{
SDP_DUP(repeat, r);
}
@@ -282,12 +282,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_zone_t structure is
* returned, otherwise NULL is returned.
*/
sdp_zone_t *sdp_zone_dup(su_home_t *h, sdp_zone_t const *z)
-{
+{
SDP_DUP(zone, z);
}
@@ -302,12 +302,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_key_t structure is
* returned, otherwise NULL is returned.
*/
sdp_key_t *sdp_key_dup(su_home_t *h, sdp_key_t const *k)
-{
+{
SDP_DUP(key, k);
}
@@ -322,12 +322,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_attribute_t structure is
* returned, otherwise NULL is returned.
*/
sdp_attribute_t *sdp_attribute_dup(su_home_t *h, sdp_attribute_t const *a)
-{
+{
SDP_LIST_DUP(attribute, a);
}
@@ -342,12 +342,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_list_t structure is
* returned, otherwise NULL is returned.
*/
sdp_list_t *sdp_list_dup(su_home_t *h, sdp_list_t const *l)
-{
+{
SDP_LIST_DUP(list, l);
}
@@ -362,12 +362,12 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_rtpmap_t structure is
* returned, otherwise NULL is returned.
*/
sdp_rtpmap_t *sdp_rtpmap_dup(su_home_t *h, sdp_rtpmap_t const *rm)
-{
+{
SDP_LIST_DUP(rtpmap, rm);
}
@@ -384,11 +384,11 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_media_t structure is
* returned, otherwise NULL is returned.
*/
-sdp_media_t *sdp_media_dup(su_home_t *h, sdp_media_t const *m,
+sdp_media_t *sdp_media_dup(su_home_t *h, sdp_media_t const *m,
sdp_session_t *sdp)
{
sdp_media_t *rv; size_t size; char *p, *end;
@@ -412,11 +412,11 @@
* @note The duplicated list is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to a newly allocated list of sdp_media_t
* structures is returned, otherwise NULL is returned.
*/
-sdp_media_t *sdp_media_dup_all(su_home_t *h, sdp_media_t const *m,
+sdp_media_t *sdp_media_dup_all(su_home_t *h, sdp_media_t const *m,
sdp_session_t *sdp)
{
sdp_media_t *rv; size_t size; char *p, *end;
@@ -441,14 +441,14 @@
* @param dst_c Connection description used instead of duplicate of @a src_c.
* @param src_c Connection description not to be duplicated
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_media_t structure is
* returned, otherwise NULL is returned.
*
* @deprecated
* This function is deprecated. Use sdp_media_dup() instead.
*/
-sdp_media_t *sdp_media_dup_ex(su_home_t *home,
+sdp_media_t *sdp_media_dup_ex(su_home_t *home,
sdp_media_t const *src,
sdp_session_t *sdp,
sdp_connection_t *dst_c,
@@ -479,7 +479,7 @@
char *p;
sdp_origin_t *o;
- p = *pp;
+ p = *pp;
STRUCT_DUP(p, o, src);
STR_DUP(p, o, src, o_username);
PTR_DUP(p, o, src, o_address, connection_dup);
@@ -502,8 +502,8 @@
char *p;
sdp_connection_t *c;
- p = *pp;
- STRUCT_DUP(p, c, src);
+ p = *pp;
+ STRUCT_DUP(p, c, src);
c->c_next = NULL;
STR_DUP(p, c, src, c_address);
@@ -666,12 +666,12 @@
LST_XTRA(rv, m->m_bandwidths, bandwidth_xtra);
PTR_XTRA(rv, m->m_key, key_xtra);
LST_XTRA(rv, m->m_attributes, attribute_xtra);
-
+
return rv;
}
static
-sdp_media_t *media_dup(char **pp,
+sdp_media_t *media_dup(char **pp,
sdp_media_t const *src,
sdp_session_t *sdp)
{
@@ -692,11 +692,11 @@
PTR_DUP(p, m, src, m_key, key_dup);
LST_DUP(p, m, src, m_attributes, attribute_dup);
- /* note! we must not implicitly use 'src->m_session' as it
+ /* note! we must not implicitly use 'src->m_session' as it
might point to a temporary session */
m->m_session = sdp;
-
- m->m_rejected = src->m_rejected;
+
+ m->m_rejected = src->m_rejected;
m->m_mode = src->m_mode;
assert((size_t)(p - *pp) == media_xtra(src));
@@ -730,7 +730,7 @@
}
static
-sdp_media_t *media_dup_ex(char **pp,
+sdp_media_t *media_dup_ex(char **pp,
sdp_media_t const *src,
sdp_session_t *sdp,
sdp_connection_t *dst_c,
@@ -759,12 +759,12 @@
LST_DUP(p, m, src, m_bandwidths, bandwidth_dup);
PTR_DUP(p, m, src, m_key, key_dup);
LST_DUP(p, m, src, m_attributes, attribute_dup);
-
- /* note! we must not implicitly use 'src->m_session' as it
+
+ /* note! we must not implicitly use 'src->m_session' as it
might point to a temporary session */
m->m_session = sdp;
-
- m->m_rejected = src->m_rejected;
+
+ m->m_rejected = src->m_rejected;
m->m_mode = src->m_mode;
assert(m);
@@ -793,7 +793,7 @@
}
static
-sdp_media_t *media_dup_all(char **pp,
+sdp_media_t *media_dup_all(char **pp,
sdp_media_t const *src,
sdp_session_t *sdp)
{
@@ -827,7 +827,7 @@
char *p;
sdp_list_t *l;
- p = *pp;
+ p = *pp;
STRUCT_DUP(p, l, src);
l->l_next = NULL;
STR_DUP(p, l, src, l_text);
@@ -853,7 +853,7 @@
char *p;
sdp_rtpmap_t *rm;
- p = *pp;
+ p = *pp;
STRUCT_DUP(p, rm, src);
rm->rm_next = NULL;
STR_DUP(p, rm, src, rm_encoding);
@@ -954,7 +954,7 @@
char *p;
sdp_session_t *sdp;
- p = *pp;
+ p = *pp;
STRUCT_DUP(p, sdp, src);
sdp->sdp_next = NULL;
@@ -988,13 +988,13 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_session_t structure is
* returned, otherwise NULL is returned.
*/
sdp_session_t *sdp_session_dup(su_home_t *h, sdp_session_t const *sdp)
-{
+{
SDP_DUP(session, sdp);
}
@@ -1026,7 +1026,7 @@
char *p;
sdp_session_t *sdp;
- p = *pp;
+ p = *pp;
STRUCT_DUP(p, sdp, src);
sdp->sdp_next = NULL;
@@ -1044,7 +1044,7 @@
STR_DUP(p, sdp, src, sdp_charset);
sdp->sdp_media = NULL;
-
+
assert((size_t)(p - *pp) == session_without_media_xtra(src));
*pp = p;
return sdp;
@@ -1065,14 +1065,14 @@
* @note The duplicated structure is allocated using a single call to
* su_alloc() and it can be freed with su_free().
*
- * @return
+ * @return
* If successful, a pointer to newly allocated sdp_session_t structure is
* returned, otherwise NULL is returned.
*/
-sdp_session_t *sdp_session_dup_without_media(su_home_t *h,
+sdp_session_t *sdp_session_dup_without_media(su_home_t *h,
sdp_session_t const *sdp)
-{
+{
SDP_DUP(session_without_media, sdp);
}
@@ -1085,7 +1085,7 @@
{
sdp_session_t const *sdp = (sdp_session_t *)t->t_value;
- if (sdp)
+ if (sdp)
return STRUCT_ALIGN(offset) + session_xtra(sdp);
else
return 0;
@@ -1097,7 +1097,7 @@
sdp_session_t const *srcsdp;
char *b;
- assert(src); assert(*bb);
+ assert(src); assert(*bb);
b = *bb;
b += STRUCT_ALIGN(b);
@@ -1121,9 +1121,9 @@
assert(t);
- if (!t || !t->t_value) {
- if (size && b) b[0] = 0;
- return 0;
+ if (!t || !t->t_value) {
+ if (size && b) b[0] = 0;
+ return 0;
}
sdp = (sdp_session_t const *)t->t_value;
@@ -1131,14 +1131,14 @@
print = sdp_print(NULL, sdp, b, size, 0);
retval = sdp_message_size(print);
-
+
sdp_printer_free(print);
return (int)retval;
}
/** Tag class for SDP tags. @HIDE */
-tag_class_t sdptag_session_class[1] =
+tag_class_t sdptag_session_class[1] =
{{
sizeof(sdptag_session_class),
/* tc_next */ NULL,
@@ -1157,7 +1157,7 @@
/* ---------------------------------------------------------------------- */
/* Compare two string pointers */
-su_inline
+su_inline
int str0cmp(char const *a, char const *b)
{
if (a == NULL) a = "";
@@ -1166,7 +1166,7 @@
}
/* Compare two string pointers ignoring case. */
-su_inline
+su_inline
int str0casecmp(char const *a, char const *b)
{
if (a == NULL) a = "";
@@ -1174,16 +1174,16 @@
return strcasecmp(a, b);
}
-/** Compare two session descriptions
+/** Compare two session descriptions
*/
int sdp_session_cmp(sdp_session_t const *a, sdp_session_t const *b)
{
- int rv;
+ int rv;
sdp_bandwidth_t const *ab, *bb;
sdp_attribute_t const *aa, *ba;
sdp_media_t const *am, *bm;
-
- if ((rv = (a != NULL) - (b != NULL)))
+
+ if ((rv = (a != NULL) - (b != NULL)))
return rv;
if (a == b)
return 0;
@@ -1204,8 +1204,8 @@
if ((rv = sdp_connection_cmp(a->sdp_connection, b->sdp_connection)))
return rv;
- for (ab = a->sdp_bandwidths, bb = b->sdp_bandwidths;
- ab || bb;
+ for (ab = a->sdp_bandwidths, bb = b->sdp_bandwidths;
+ ab || bb;
ab = ab->b_next, bb = bb->b_next)
if ((rv = sdp_bandwidth_cmp(a->sdp_bandwidths, b->sdp_bandwidths)))
return rv;
@@ -1215,14 +1215,14 @@
if ((rv = sdp_key_cmp(a->sdp_key, b->sdp_key)))
return rv;
- for (aa = a->sdp_attributes, ba = b->sdp_attributes;
- aa || bb;
+ for (aa = a->sdp_attributes, ba = b->sdp_attributes;
+ aa || bb;
aa = aa->a_next, ba = ba->a_next)
if ((rv = sdp_attribute_cmp(aa, ba)))
return rv;
- for (am = a->sdp_media, bm = b->sdp_media;
- am || bm;
+ for (am = a->sdp_media, bm = b->sdp_media;
+ am || bm;
am = am->m_next, bm = bm->m_next)
if ((rv = sdp_media_cmp(am, bm)))
return rv;
@@ -1230,13 +1230,13 @@
return 0;
}
-/** Compare two origin fields
+/** Compare two origin fields
*/
int sdp_origin_cmp(sdp_origin_t const *a, sdp_origin_t const *b)
{
int rv;
- if ((rv = (a != NULL) - (b != NULL)))
+ if ((rv = (a != NULL) - (b != NULL)))
return rv;
if (a == b)
return 0;
@@ -1252,7 +1252,7 @@
return 0;
}
-/** Compare two connection fields
+/** Compare two connection fields
*/
int sdp_connection_cmp(sdp_connection_t const *a, sdp_connection_t const *b)
{
@@ -1285,7 +1285,7 @@
if (a->b_modifier != b->b_modifier)
return a->b_modifier < b->b_modifier ? -1 : 1;
- if (a->b_modifier == sdp_bw_x &&
+ if (a->b_modifier == sdp_bw_x &&
(rv = strcmp(a->b_modifier_name, b->b_modifier_name)))
return rv;
@@ -1298,9 +1298,9 @@
/** Compare two time fields */
int sdp_time_cmp(sdp_time_t const *a, sdp_time_t const *b)
{
- int rv;
+ int rv;
- if ((rv = (a != NULL) - (b != NULL)))
+ if ((rv = (a != NULL) - (b != NULL)))
return rv;
if (a == b)
return 0;
@@ -1319,7 +1319,7 @@
int sdp_repeat_cmp(sdp_repeat_t const *a, sdp_repeat_t const *b)
{
int i, n;
-
+
if (a == b)
return 0;
if ((a != NULL) != (b != NULL))
@@ -1329,12 +1329,12 @@
return a->r_interval < b->r_interval ? -1 : 1;
if (a->r_duration != b->r_duration)
return a->r_duration < b->r_duration ? -1 : 1;
- n = a->r_number_of_offsets < b->r_number_of_offsets
+ n = a->r_number_of_offsets < b->r_number_of_offsets
? a->r_number_of_offsets : b->r_number_of_offsets;
for (i = 0; i < n; i++)
if (a->r_offsets[i] != b->r_offsets[i])
return a->r_offsets[i] < b->r_offsets[i] ? -1 : 1;
-
+
if (a->r_number_of_offsets != b->r_number_of_offsets)
return a->r_number_of_offsets < b->r_number_of_offsets ? -1 : 1;
@@ -1345,7 +1345,7 @@
int sdp_zone_cmp(sdp_zone_t const *a, sdp_zone_t const *b)
{
int i, n;
-
+
if (a == b)
return 0;
if ((a != NULL) != (b != NULL))
@@ -1379,7 +1379,7 @@
if (a->k_method != b->k_method)
return a->k_method < b->k_method ? -1 : 1;
- if (a->k_method == sdp_key_x &&
+ if (a->k_method == sdp_key_x &&
(rv = str0cmp(a->k_method_name, b->k_method_name)))
return rv;
return str0cmp(a->k_material, b->k_material);
@@ -1427,7 +1427,7 @@
a_param = a->rm_params;
if (b->rm_params)
b_param = b->rm_params;
-
+
rv = strcasecmp(a_param, b_param);
if (rv)
@@ -1457,7 +1457,7 @@
/** Compare two media (m=) fields */
int sdp_media_cmp(sdp_media_t const *a, sdp_media_t const *b)
{
- int rv;
+ int rv;
sdp_connection_t const *ac, *bc;
sdp_bandwidth_t const *ab, *bb;
@@ -1466,7 +1466,7 @@
if (a == b)
return 0;
- if ((rv = (a != NULL) - (b != NULL)))
+ if ((rv = (a != NULL) - (b != NULL)))
return rv;
if (a->m_type != b->m_type)
@@ -1493,8 +1493,8 @@
if (a->m_mode != b->m_mode)
return a->m_mode < b->m_mode ? -1 : 1;
- for (arm = a->m_rtpmaps, brm = b->m_rtpmaps;
- arm || brm;
+ for (arm = a->m_rtpmaps, brm = b->m_rtpmaps;
+ arm || brm;
arm = arm->rm_next, brm = brm->rm_next)
if ((rv = sdp_rtpmap_cmp(arm, brm)))
return rv;
@@ -1505,14 +1505,14 @@
if ((rv = str0cmp(a->m_information, b->m_information)))
return rv;
- for (ac = a->m_connections, bc = b->m_connections;
- ac || bc;
+ for (ac = a->m_connections, bc = b->m_connections;
+ ac || bc;
ac = ac->c_next, bc = bc->c_next)
if ((rv = sdp_connection_cmp(ac, bc)))
return rv;
- for (ab = a->m_bandwidths, bb = b->m_bandwidths;
- ab || bb;
+ for (ab = a->m_bandwidths, bb = b->m_bandwidths;
+ ab || bb;
ab = ab->b_next, bb = bb->b_next)
if ((rv = sdp_bandwidth_cmp(a->m_bandwidths, b->m_bandwidths)))
return rv;
@@ -1520,8 +1520,8 @@
if ((rv = sdp_key_cmp(a->m_key, b->m_key)))
return rv;
- for (aa = a->m_attributes, ba = b->m_attributes;
- aa || bb;
+ for (aa = a->m_attributes, ba = b->m_attributes;
+ aa || bb;
aa = aa->a_next, ba = ba->a_next)
if ((rv = sdp_attribute_cmp(aa, ba)))
return rv;
@@ -1556,8 +1556,8 @@
}
/** Find named attribute from given lists (a or a2). */
-sdp_attribute_t *sdp_attribute_find2(sdp_attribute_t const *a,
- sdp_attribute_t const *a2,
+sdp_attribute_t *sdp_attribute_find2(sdp_attribute_t const *a,
+ sdp_attribute_t const *a2,
char const *name)
{
for (; a; a = a->a_next) {
@@ -1607,7 +1607,7 @@
name = "sendrecv";
else
return NULL;
-
+
a = su_salloc(home, sizeof(*a));
if (a)
a->a_name = name;
@@ -1615,7 +1615,7 @@
return a;
}
-/** Find a mapped attribute.
+/** Find a mapped attribute.
*
* A mapped attribute has form 'a=<name>:<pt> <value>' where pt is a RTP
* payload type, integer in range 0..127. For example, "a=atmmap" [@RFC3108]
@@ -1627,7 +1627,7 @@
* @param pt payload type number (must be 0..127)
* @param return_result return value parameter for mapped attribute value
*
- * @return Pointer to a matching attribute structure, or NULL.
+ * @return Pointer to a matching attribute structure, or NULL.
*
* If a matching attribute is found, @a return_result will point to part of
* the attribute after the payload type and whitespace.
@@ -1670,7 +1670,7 @@
}
/** Append a (list of) attribute(s) to a list of attributes. */
-void sdp_attribute_append(sdp_attribute_t **list,
+void sdp_attribute_append(sdp_attribute_t **list,
sdp_attribute_t const *a)
{
assert(list);
@@ -1684,13 +1684,13 @@
*list = (sdp_attribute_t *)a;
}
-/**Replace or append a attribute within a list of attributes.
+/**Replace or append a attribute within a list of attributes.
*
* @retval 1 if replaced existing attribute
* @retval 0 if attribute was appended
* @retval -1 upon an error
*/
-int sdp_attribute_replace(sdp_attribute_t **list,
+int sdp_attribute_replace(sdp_attribute_t **list,
sdp_attribute_t *a,
sdp_attribute_t **return_replaced)
{
@@ -1712,7 +1712,7 @@
}
replaced = *list, *list = a;
-
+
if (replaced) {
a->a_next = replaced->a_next;
replaced->a_next = NULL;
@@ -1727,7 +1727,7 @@
}
/** Remove a named attribute from a list of attributes. */
-sdp_attribute_t *sdp_attribute_remove(sdp_attribute_t **list,
+sdp_attribute_t *sdp_attribute_remove(sdp_attribute_t **list,
char const *name)
{
sdp_attribute_t *a;
@@ -1876,7 +1876,7 @@
return 1;
if (!aparam) aparam = "1"; if (!bparam) bparam = "1";
-
+
if (strcasecmp(aparam, bparam))
return 0;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.docs (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.docs Tue Dec 16 13:05:22 2008
@@ -69,7 +69,7 @@
show_critical_error(sdp_printing_error(printer));
}
sdp_printer_free(printer);
- at endcode
+ at endcode
@section sdp_example Example
@@ -79,7 +79,7 @@
@a buf.
@code
-size_t increment_sdp_version(char buf[], size_t bsize,
+size_t increment_sdp_version(char buf[], size_t bsize,
char const *original, size_t osize)
{
su_home_t home[1] = { SU_HOME_INIT(home) };
@@ -89,7 +89,7 @@
if (sdp_session(parser)) {
sdp_session_t *sdp = sdp_session(parser);
-
+
sdp->sdp_origin->o_version++;
printer = sdp_print(home, sdp, buf, bsize, 0);
@@ -98,19 +98,19 @@
retval = sdp_message_size(printer);
}
else {
- fprintf(stderr, "increment_sdp_version: %s\n",
+ fprintf(stderr, "increment_sdp_version: %s\n",
sdp_printing_error(printer));
}
sdp_printer_free(printer);
}
else {
- fprintf(stderr, "increment_sdp_version: %s\n",
+ fprintf(stderr, "increment_sdp_version: %s\n",
sdp_parsing_error(parser));
}
sdp_parser_free(parser);
-
+
su_home_deinit(home);
return retval;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
*/
/**@ingroup sdp_parser
- * @CFILE sdp_parse.c
+ * @CFILE sdp_parse.c
* @brief Simple SDP parser interface.
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -46,7 +46,7 @@
#include <limits.h>
#include <assert.h>
-/** @typedef struct sdp_parser_s sdp_parser_t;
+/** @typedef struct sdp_parser_s sdp_parser_t;
*
* SDP parser handle.
*
@@ -105,7 +105,7 @@
* The function sdp_parse() parses an SDP message @a msg of size @a
* msgsize. Parsing is done according to the given @a flags. The SDP message
* may not contain a NUL.
- *
+ *
* The parsing result is stored to an #sdp_session_t structure.
*
* @param home memory home
@@ -115,7 +115,7 @@
*
* The following flags are used by parser:
*
- * @li #sdp_f_strict Parser should accept only messages conforming strictly
+ * @li #sdp_f_strict Parser should accept only messages conforming strictly
* to the specification.
* @li #sdp_f_anynet Parser accepts unknown network or address types.
* @li #sdp_f_insane Do not run sanity check.
@@ -139,7 +139,7 @@
if (msgsize == -1 || msg == NULL) {
p = su_home_clone(home, sizeof(*p));
- if (p)
+ if (p)
parsing_error(p, "invalid input message");
else
p = (sdp_parser_t*)&no_mem_error;
@@ -172,7 +172,7 @@
p->pr_session_mode = sdp_sendrecv;
parse_message(p);
-
+
return p;
}
@@ -216,7 +216,7 @@
*
* @param p SDP parser
*
- * @return
+ * @return
* The function sdp_parsing_error() returns a C string describing parsing
* error, or NULL if no error occurred.
*/
@@ -230,7 +230,7 @@
* The function sdp_parser_free() frees an SDP parser object along with
* the memory blocks associated with it.
*
- * @param p pointer to the SDP parser to be freed
+ * @param p pointer to the SDP parser to be freed
*/
void sdp_parser_free(sdp_parser_t *p)
{
@@ -271,7 +271,7 @@
static void parse_session_attr(sdp_parser_t *p, char *r, sdp_attribute_t **result);
static void parse_media(sdp_parser_t *p, char *r, sdp_media_t **result);
static void parse_payload(sdp_parser_t *p, char *r, sdp_rtpmap_t **result);
-static void parse_media_attr(sdp_parser_t *p, char *r, sdp_media_t *m,
+static void parse_media_attr(sdp_parser_t *p, char *r, sdp_media_t *m,
sdp_attribute_t **result);
static int parse_rtpmap(sdp_parser_t *p, char *r, sdp_media_t *m);
static int parse_fmtp(sdp_parser_t *p, char *r, sdp_media_t *m);
@@ -279,13 +279,13 @@
static void parse_descs(sdp_parser_t *p, char *r, char *m, sdp_media_t **result);
-static int parse_ul(sdp_parser_t *p, char **r, unsigned long *result,
+static int parse_ul(sdp_parser_t *p, char **r, unsigned long *result,
unsigned long max_value);
-static int parse_ull(sdp_parser_t *p, char **r, uint64_t *result,
+static int parse_ull(sdp_parser_t *p, char **r, uint64_t *result,
uint64_t max_value);
static void parse_alloc_error(sdp_parser_t *p, const char *typename);
static char *next(char **message, const char *sep, const char *strip);
-static char *token(char **message, const char *sep, const char *legal,
+static char *token(char **message, const char *sep, const char *legal,
const char *strip);
#if 0
static void check_mandatory(sdp_parser_t *p, sdp_session_t *sdp);
@@ -301,7 +301,7 @@
*/
#define PARSE_ALLOC(p, t, v) \
t *v = su_salloc(p->pr_home, sizeof(*v)); \
- if (!v && (parse_alloc_error(p, #t), 1)) return;
+ if (!v && (parse_alloc_error(p, #t), 1)) return;
/* -------------------------------------------------------------------------
* Macro PARSE_CHECK_REST
@@ -314,10 +314,10 @@
return
/* -------------------------------------------------------------------------
- * Function parse_message() - parse an SDP message
+ * Function parse_message() - parse an SDP message
*
* Description:
- * This function parses an SDP message, which is copied into the
+ * This function parses an SDP message, which is copied into the
* p->pr_message. The p->pr_message is modified during the parsing,
* and parts of it are returned in p->pr_session.
*
@@ -384,7 +384,7 @@
for (;
record && p->pr_ok;
record = next(&message, CRLF, strip)) {
- field = record[0];
+ field = record[0];
rest = record + 2; rest += strspn(rest, strip);
@@ -476,9 +476,9 @@
int sdp_connection_is_inaddr_any(sdp_connection_t const *c)
{
- return
- c &&
- c->c_nettype == sdp_net_in &&
+ return
+ c &&
+ c->c_nettype == sdp_net_in &&
((c->c_addrtype == sdp_addr_ip4 && strcmp(c->c_address, "0.0.0.0")) ||
(c->c_addrtype == sdp_addr_ip6 && strcmp(c->c_address, "::")));
}
@@ -506,7 +506,7 @@
parsing_error(p, "Incorrect version");
return;
}
-
+
/* Go through all media and set mode */
for (m = sdp->sdp_media; m; m = m->m_next) {
if (m->m_port == 0) {
@@ -534,13 +534,13 @@
return;
}
-/** Validates that all mandatory fields exist
+/** Validates that all mandatory fields exist
*
* Checks that all necessary fields (v=, o=) exists in the parsed sdp. If
- * strict, check that all mandatory fields (c=, o=, s=, t=) are present.
+ * strict, check that all mandatory fields (c=, o=, s=, t=) are present.
* This function also goes through all media, marks rejected media as such,
* and updates the mode accordingly.
- *
+ *
* @retval 0 if parsed SDP description is valid
* @retval -1 if some SDP line is missing
* @retval -2 if c= line is missing
@@ -626,7 +626,7 @@
sess-version = 1*(DIGIT)
;0 is a new session
-
+
*/
PARSE_ALLOC(p, sdp_origin_t, o);
@@ -873,7 +873,7 @@
c->c_ttl = 0;
c->c_groups = 1;
}
- else
+ else
parsing_error(p, "invalid address");
}
@@ -916,7 +916,7 @@
if (STRICT(p))
PARSE_CHECK_REST(p, r, "b");
-
+
{
PARSE_ALLOC(p, sdp_bandwidth_t, b);
*result = b;
@@ -974,7 +974,7 @@
* @param p pointer to SDP parser object
* @param r pointer to record data
* @param result pointer to which parsed record is assigned
- *
+ *
*/
static void parse_repeat(sdp_parser_t *p, char *d, sdp_repeat_t **result)
{
@@ -1013,7 +1013,7 @@
return;
}
if (!(r = su_salloc(p->pr_home, offsetof(sdp_repeat_t, r_offsets[N - 1])))) {
- parse_alloc_error(p, "sdp_repeat_t");
+ parse_alloc_error(p, "sdp_repeat_t");
return;
}
@@ -1035,7 +1035,7 @@
while (is_space(*d))
d++;
- }
+ }
*result = r;
}
@@ -1090,7 +1090,7 @@
return;
}
if (!(z = su_salloc(p->pr_home, offsetof(sdp_zone_t, z_adjustments[N])))) {
- parse_alloc_error(p, "sdp_zone_t");
+ parse_alloc_error(p, "sdp_zone_t");
return;
}
@@ -1109,7 +1109,7 @@
z->z_adjustments[n].z_at = at;
z->z_adjustments[n].z_offset = offset;
- }
+ }
*result = z;
}
@@ -1205,7 +1205,7 @@
if (*r)
value = r;
- else
+ else
PARSE_CHECK_REST(p, r, "a");
if (strcasecmp(name, "charset") == 0) {
@@ -1213,7 +1213,7 @@
return;
}
- if (p->pr_mode_manual)
+ if (p->pr_mode_manual)
;
else if (strcasecmp(name, "inactive") == 0)
p->pr_session_mode = sdp_inactive;
@@ -1316,10 +1316,10 @@
parsing_error(p, "m= missing protocol");
return;
}
-
+
if (!STRICT(p) && strcasecmp(s, "RTP") == 0)
m->m_proto = sdp_proto_rtp, m->m_proto_name = "RTP/AVP";
- else
+ else
sdp_media_transport(m, s);
/* RTP format list */
@@ -1331,7 +1331,7 @@
/* "normal" format list */
if (*r) {
sdp_list_t **fmt = &m->m_format;
-
+
while (r && *r) {
PARSE_ALLOC(p, sdp_list_t, l);
*fmt = l;
@@ -1382,7 +1382,7 @@
m->m_proto = sdp_proto_tcp, m->m_proto_name = "TCP";
else if (strcasecmp(s, "TLS") == 0)
m->m_proto = sdp_proto_tls, m->m_proto_name = "TLS";
- else
+ else
m->m_proto = sdp_proto_x, m->m_proto_name = s;
}
@@ -1560,10 +1560,10 @@
if (*r)
value = r;
- else
+ else
PARSE_CHECK_REST(p, r, "a");
- if (p->pr_mode_manual)
+ if (p->pr_mode_manual)
;
else if (strcasecmp(name, "inactive") == 0) {
m->m_mode = sdp_inactive;
@@ -1637,11 +1637,11 @@
return -2;
}
- if (*r == '/')
+ if (*r == '/')
params = ++r;
else
params = 0;
-
+
rm->rm_predef = 0;
rm->rm_encoding = encoding;
rm->rm_rate = rate;
@@ -1690,12 +1690,12 @@
* Parameters:
* p - pointer to SDP parser object
* record - pointer to first media field
- * message - pointer to rest
+ * message - pointer to rest
* medias - pointer to which parsed media structures are assigned
*/
-static void parse_descs(sdp_parser_t *p,
- char *record,
- char *message,
+static void parse_descs(sdp_parser_t *p,
+ char *record,
+ char *message,
sdp_media_t **medias)
{
char *rest;
@@ -1709,7 +1709,7 @@
strip = SPACE TAB; /* skip initial whitespace */
else
strip = "";
-
+
for (;
record && p->pr_ok;
record = next(&message, CRLF, strip)) {
@@ -1767,10 +1767,10 @@
/*
* parse_ul: parse an unsigned long
*/
-static int parse_ul(sdp_parser_t *p, char **r,
+static int parse_ul(sdp_parser_t *p, char **r,
unsigned long *result, unsigned long max)
{
- char *ul = *r;
+ char *ul = *r;
ul += strspn(ul, SPACE TAB);
@@ -1790,12 +1790,12 @@
/*
* parse_ull: parse an unsigned long long
*/
-static int parse_ull(sdp_parser_t *p, char **r,
+static int parse_ull(sdp_parser_t *p, char **r,
uint64_t *result, uint64_t max)
{
unsigned longlong ull;
- char *s = *r;
+ char *s = *r;
s += strspn(s, SPACE TAB);
@@ -1810,9 +1810,9 @@
return -1;
}
-static char *token(char **message,
- const char *sep,
- const char *legal,
+static char *token(char **message,
+ const char *sep,
+ const char *legal,
const char *strip)
{
size_t n;
@@ -1823,7 +1823,7 @@
if (legal)
n = strspn(retval, legal);
- else
+ else
n = strcspn(retval, sep);
if (n == 0)
@@ -1872,8 +1872,8 @@
{
int n;
va_list ap;
- va_start(ap, fmt);
-
+ va_start(ap, fmt);
+
memset(p->pr_error, 0, sizeof(p->pr_error));
n = vsnprintf(p->pr_error, sizeof(p->pr_error), fmt, ap);
va_end(ap);
@@ -1885,6 +1885,6 @@
static void parse_alloc_error(sdp_parser_t *p, const char *typename)
{
- parsing_error(p, "memory exhausted (while allocating memory for %s)",
+ parsing_error(p, "memory exhausted (while allocating memory for %s)",
typename);
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_print.c Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
*
*/
-/**@ingroup sdp_printer
+/**@ingroup sdp_printer
*
* @CFILE sdp_print.c Simple SDP printer interface.
*
@@ -81,7 +81,7 @@
static struct sdp_printer_s printer_memory_error = {
sizeof(printer_memory_error),
NULL,
- "memory exhausted",
+ "memory exhausted",
sizeof(printer_memory_error.pr_buffer),
sizeof(printer_memory_error.pr_buffer)
};
@@ -90,14 +90,14 @@
/** Print a SDP description.
*
- * Encode the contents of the SDP session structure #sdp_session_t
+ * Encode the contents of the SDP session structure #sdp_session_t
* to the @a msgbuf. The @a msgbuf has size @a msgsize
* bytes. If @a msgbuf is @c NULL, the sdp_print() function allocates the
* required buffer from the @a home heap.
*
* @param home Memory home (may be NULL).
* @param session SDP session description structure to be encoded.
- * @param msgbuf Buffer to which encoding is stored (may be NULL).
+ * @param msgbuf Buffer to which encoding is stored (may be NULL).
* @param msgsize Size of @a msgbuf.
* @param flags Flags specifying the encoding options.
*
@@ -117,17 +117,17 @@
*
* @li #sdp_f_mode_manual - Do not generate mode attributes
*
- * @return
+ * @return
* Always return a handle to an #sdp_printer_t object.
*
* @sa #sdp_printer_t, #sdp_session_t, sdp_printing_error(),
* sdp_message(), sdp_message_size(), sdp_printer_free(),
* sdp_parse().
*/
-sdp_printer_t *sdp_print(su_home_t *home,
- sdp_session_t const *session,
- char msgbuf[],
- isize_t msgsize,
+sdp_printer_t *sdp_print(su_home_t *home,
+ sdp_session_t const *session,
+ char msgbuf[],
+ isize_t msgsize,
int flags)
{
sdp_printer_t *p = su_salloc(home, sizeof(*p));
@@ -186,10 +186,10 @@
/** @brief Get encoded SDP message.
*
* Return a pointer to a C string containing the SDP message.
- *
+ *
* @param p Pointer to an #sdp_printer_t object.
*
- * @return
+ * @return
* Return a pointer to a C string containing the encoded SDP message, or
* NULL upon an error.
*/
@@ -207,7 +207,7 @@
*
* @param p Pointer to an #sdp_printer_t object.
*
- * @return
+ * @return
* Number of bytes in SDP message excluding final NUL or 0 upon an error.
*/
isize_t sdp_message_size(sdp_printer_t *p)
@@ -253,10 +253,10 @@
static void print_key(sdp_printer_t *p, sdp_key_t const *k);
static void print_attributes(sdp_printer_t *p, sdp_attribute_t const *a);
static void print_charset(sdp_printer_t *p, sdp_text_t *charset);
-static void print_media(sdp_printer_t *p, sdp_session_t const *,
+static void print_media(sdp_printer_t *p, sdp_session_t const *,
sdp_media_t const *m);
-static void print_text_list(sdp_printer_t*,
+static void print_text_list(sdp_printer_t*,
const char *, sdp_list_t const *l);
static void sdp_printf(sdp_printer_t *p, const char *fmt, ...);
@@ -319,7 +319,7 @@
return;
}
- sdp_printf(p, "o=%s "LLU" "LLU" ",
+ sdp_printf(p, "o=%s "LLU" "LLU" ",
o->o_username,
(ull)o->o_id,
(ull)o->o_version);
@@ -411,7 +411,7 @@
sdp_printf(p, "%s%s%s", nettype, c->c_address);
else
sdp_printf(p, "%s", c->c_address);
-
+
if (c->c_mcast || c->c_ttl) {
sdp_printf(p, "/%u", c->c_ttl);
if (c->c_groups > 1)
@@ -424,13 +424,13 @@
{
for (; b ; b = b->b_next) {
char const *name;
-
+
switch (b->b_modifier) {
case sdp_bw_ct: name = "CT"; break;
case sdp_bw_as: name = "AS"; break;
default: name = b->b_modifier_name; break;
}
-
+
sdp_printf(p, "b=%s:%lu" CRLF, name, b->b_value);
}
}
@@ -463,9 +463,9 @@
for (i = 0; i < z->z_number_of_adjustments; i++) {
int negative = z->z_adjustments[i].z_offset < 0L;
- sdp_printf(p, "%s%lu %s",
+ sdp_printf(p, "%s%lu %s",
i > 0 ? " " : "",
- z->z_adjustments[i].z_at,
+ z->z_adjustments[i].z_at,
negative ? "-" : "");
if (negative)
print_typed_time(p, -z->z_adjustments[i].z_offset);
@@ -523,7 +523,7 @@
return;
}
- sdp_printf(p, "k=%s%s%s" CRLF, method,
+ sdp_printf(p, "k=%s%s%s" CRLF, method,
have_material ? ":" : "",
have_material ? k->k_material : "");
}
@@ -537,7 +537,7 @@
}
}
-static void
+static void
print_attributes_without_mode(sdp_printer_t *p, sdp_attribute_t const *a)
{
for (;a; a = a->a_next) {
@@ -559,7 +559,7 @@
sdp_printf(p, "a=charset%s%s" CRLF, charset ? ":" : "", charset ? charset : "");
}
-static void print_media(sdp_printer_t *p,
+static void print_media(sdp_printer_t *p,
sdp_session_t const *sdp,
sdp_media_t const *m)
{
@@ -582,7 +582,7 @@
case sdp_media_image : media = "image"; break;
default: media = m->m_type_name;
}
-
+
switch (m->m_proto) {
case sdp_proto_tcp: proto = "tcp"; break;
case sdp_proto_udp: proto = "udp"; break;
@@ -592,11 +592,11 @@
case sdp_proto_tls: proto = "tls"; break;
default: proto = m->m_proto_name; break;
}
-
+
if (m->m_number_of_ports <= 1)
sdp_printf(p, "m=%s %u %s", media, m->m_port, proto);
else
- sdp_printf(p, "m=%s %u/%u %s",
+ sdp_printf(p, "m=%s %u/%u %s",
media, m->m_port, m->m_number_of_ports, proto);
if (m->m_rtpmaps) {
@@ -625,7 +625,7 @@
if (m->m_connections)
#ifdef nomore
if (m->m_connections != sdp->sdp_connection)
-#endif
+#endif
print_connection_list(p, m->m_connections);
if (m->m_bandwidths)
print_bandwidths(p, m->m_bandwidths);
@@ -636,10 +636,10 @@
if (!rm->rm_predef || p->pr_all_rtpmaps)
sdp_printf(p, "a=rtpmap:%u %s/%lu%s%s" CRLF,
rm->rm_pt, rm->rm_encoding, rm->rm_rate,
- rm->rm_params ? "/" : "",
+ rm->rm_params ? "/" : "",
rm->rm_params ? rm->rm_params : "");
if (rm->rm_fmtp)
- sdp_printf(p, "a=fmtp:%u %s" CRLF,
+ sdp_printf(p, "a=fmtp:%u %s" CRLF,
rm->rm_pt, rm->rm_fmtp);
}
@@ -670,7 +670,7 @@
}
}
-static void print_text_list(sdp_printer_t *p,
+static void print_text_list(sdp_printer_t *p,
const char *fmt, sdp_list_t const *l)
{
for (;l; l = l->l_next) {
@@ -698,11 +698,11 @@
while (p->pr_ok) {
int n;
-
- va_start(ap, fmt);
+
+ va_start(ap, fmt);
n = vsnprintf(p->pr_buffer + p->pr_used, p->pr_bsiz - p->pr_used, fmt, ap);
va_end(ap);
-
+
if (n > -1 && (size_t)n < p->pr_bsiz - p->pr_used) {
p->pr_used += n;
break;
@@ -716,7 +716,7 @@
}
p->pr_owns_buffer = 0;
}
- else if (p->pr_may_realloc) {
+ else if (p->pr_may_realloc) {
char *buffer;
size_t size;
if (p->pr_bsiz < SDP_BLOCK)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_tag.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp_tag.c Tue Dec 16 13:05:22 2008
@@ -25,11 +25,11 @@
/**@internal
* @file sdp_tag.c
* @brief SDP Tags
- *
+ *
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *
+ *
* @date Created: Mon May 12 12:11:30 2003 ppessi
- *
+ *
*/
#include "config.h"
@@ -43,5 +43,5 @@
tag_typedef_t sdptag_any = NSTAG_TYPEDEF(*);
tag_typedef_t sdptag_session = {{
- TAG_NAMESPACE, "session", sdptag_session_class
+ TAG_NAMESPACE, "session", sdptag_session_class
}};
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h Tue Dec 16 13:05:22 2008
@@ -98,7 +98,7 @@
sdp_media_t *sdp_media; /**< Media descriptors */
};
-/** Session description identification */
+/** Session description identification */
struct sdp_origin_s
{
int o_size; /**< sizeof sdp_origin_t */
@@ -150,7 +150,7 @@
{
int b_size; /**< Size fo sdp_bandwidth_t */
sdp_bandwidth_t *b_next; /**< Next bw description in list */
- sdp_bandwidth_e b_modifier; /**< Meaning of value
+ sdp_bandwidth_e b_modifier; /**< Meaning of value
(total, or per application). */
sdp_text_t *b_modifier_name; /**< Modifier if not well-known */
unsigned long b_value; /**< Bandwidth in kilobits per second */
@@ -197,7 +197,7 @@
sdp_key_clear, /**< Key is included untransformed */
sdp_key_base64, /**< Key is encoded with base64 */
sdp_key_uri, /**< URI used to obtain a key */
- sdp_key_prompt /**< No key is included,
+ sdp_key_prompt /**< No key is included,
prompt user for key */
} sdp_key_method_e;
@@ -249,19 +249,19 @@
/** Session mode. @note Identical to rtp_mode_t. */
typedef enum {
- sdp_inactive = 0,
- sdp_sendonly = 1,
- sdp_recvonly = 2,
+ sdp_inactive = 0,
+ sdp_sendonly = 1,
+ sdp_recvonly = 2,
sdp_sendrecv = sdp_sendonly | sdp_recvonly
} sdp_mode_t;
/** Media announcement.
- *
+ *
* This structure describes one media type, e.g., audio. The description
* contains the transport address (IP address and port) used for the group,
* the transport protocol used, the media formats or RTP payload types, and
* optionally media-specific bandwidth specification, encryption key and
- * attributes.
+ * attributes.
*
* There is a pointer (m_user) for the application data, too.
*/
@@ -286,9 +286,9 @@
sdp_attribute_t *m_attributes; /**< Media attributes */
void *m_user; /**< User data. */
-
+
/** Rejected media */
- unsigned m_rejected : 1;
+ unsigned m_rejected : 1;
/** Inactive, recvonly, sendonly, sendrecv */
/* sdp_mode_t */ unsigned m_mode : 2;
unsigned : 0;
@@ -303,7 +303,7 @@
};
/** Mapping from RTP payload to codec.
- *
+ *
* The sdp_rtpmap_t() structure defines a mapping from an RTP payload to a
* particular codec. In case of well-known payloads, the sdp_rtpmap_t()
* structure may be predefined, that is, generated by SDP parser without
@@ -437,8 +437,8 @@
char const *name);
/** Find named attribute from given lists. */
-SOFIAPUBFUN sdp_attribute_t *sdp_attribute_find2(sdp_attribute_t const *a,
- sdp_attribute_t const *a2,
+SOFIAPUBFUN sdp_attribute_t *sdp_attribute_find2(sdp_attribute_t const *a,
+ sdp_attribute_t const *a2,
char const *name);
/** Get session mode from attribute list. */
@@ -446,26 +446,26 @@
sdp_mode_t defmode);
/** Get session mode from attribute list. */
-SOFIAPUBFUN sdp_attribute_t *sdp_attribute_by_mode(su_home_t *,
+SOFIAPUBFUN sdp_attribute_t *sdp_attribute_by_mode(su_home_t *,
sdp_mode_t mode);
/** Find a mapped attribute. */
-SOFIAPUBFUN
+SOFIAPUBFUN
sdp_attribute_t *sdp_attribute_mapped_find(sdp_attribute_t const *a,
char const *name,
int pt, char **return_result);
/** Append a attribute to a list of attributes. */
-SOFIAPUBFUN void sdp_attribute_append(sdp_attribute_t **list,
+SOFIAPUBFUN void sdp_attribute_append(sdp_attribute_t **list,
sdp_attribute_t const *a);
/** Replace a attribute within a list of attributes. */
-SOFIAPUBFUN int sdp_attribute_replace(sdp_attribute_t **list,
+SOFIAPUBFUN int sdp_attribute_replace(sdp_attribute_t **list,
sdp_attribute_t *a,
sdp_attribute_t **return_replaced);
/** Remove a named attribute from a list of attributes. */
-SOFIAPUBFUN sdp_attribute_t *sdp_attribute_remove(sdp_attribute_t **list,
+SOFIAPUBFUN sdp_attribute_t *sdp_attribute_remove(sdp_attribute_t **list,
char const *name);
/* Return 1 if m= line struct matches with given type and name */
@@ -505,8 +505,8 @@
/** Accept only conforming SDP */
sdp_f_strict = 1,
/** Accept any network type. */
- sdp_f_anynet = 2,
- /** Reallocate message. */
+ sdp_f_anynet = 2,
+ /** Reallocate message. */
sdp_f_realloc = 4,
/** Include well-known rtpmaps in message, too */
sdp_f_all_rtpmaps = 8,
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp_tag.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp_tag.h Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
/** Defined when <sofia-sip/sdp_tag.h> has been included. */
#define SDP_TAG_H
-/**@file sofia-sip/sdp_tag.h
+/**@file sofia-sip/sdp_tag.h
* @brief SDP tags
*
* @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -65,12 +65,12 @@
#if SU_HAVE_INLINE
su_inline
-tag_value_t sdptag_session_v(struct sdp_session_s const *v) {
- return (tag_value_t)v;
+tag_value_t sdptag_session_v(struct sdp_session_s const *v) {
+ return (tag_value_t)v;
}
su_inline
-tag_value_t sdptag_session_vr(struct sdp_session_s const **vp) {
- return (tag_value_t)vp;
+tag_value_t sdptag_session_vr(struct sdp_session_s const **vp) {
+ return (tag_value_t)vp;
}
#else
#define sdptag_session_v(v) (tag_value_t)(v)
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/test_sdp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/test_sdp.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/test_sdp.c Tue Dec 16 13:05:22 2008
@@ -62,7 +62,7 @@
char buffer[2048];
int n;
su_home_t *home = su_home_create();
- int exitcode = 1;
+ int exitcode = 1;
FILE *f;
if (argv[1] && strcmp(argv[1], "-"))
@@ -124,7 +124,7 @@
perror("test_sdp");
}
else {
- fprintf(stderr, "test_sdp: maximum length of sdp messages is %u bytes\n",
+ fprintf(stderr, "test_sdp: maximum length of sdp messages is %u bytes\n",
(unsigned)sizeof(buffer));
}
exit(1);
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/torture_sdp.c Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
/**@internal
*
- * @CFILE sdp_torture.c
+ * @CFILE sdp_torture.c
*
* Torture testing sdp module.
*
@@ -59,10 +59,10 @@
FILE *null;
-static char const e0_msg[] =
+static char const e0_msg[] =
"foo";
-static char const e1_msg[] =
+static char const e1_msg[] =
"v=1\n"
"s=/sdp_torture\n"
"o=sdp_torture 0 0 IN IP4 0.0.0.0\n"
@@ -102,7 +102,7 @@
END();
}
-static char const s0_msg[] =
+static char const s0_msg[] =
"v=0\n"
"s=/sdp_torture\n"
"o=sdp_torture 0 0 IN IP4 0.0.0.0\n"
@@ -136,7 +136,7 @@
su_home_check(home2);
TEST_1(home2);
-
+
TEST_1((parser = sdp_parse(home, s0_msg, sizeof(s0_msg), sdp_f_config)));
TEST_1((sdp_src = sdp_session(parser)));
TEST_1(sdp_src->sdp_media);
@@ -179,7 +179,7 @@
/* destroy the first home instance */
su_home_check(home);
su_home_unref(home);
-
+
/* access all cloned data by printing it */
printer = sdp_print(home2, sdp_target, buffer, sizeof(buffer), 0);
if (printer != NULL) {
@@ -188,7 +188,7 @@
if (tstflags & tst_verbatim) {
printf("sdp_torture.c: parsed SDP message:\"%s\".\n", msg);
}
-
+
sdp_printer_free(printer);
}
@@ -224,7 +224,7 @@
END();
}
-static char const s1_msg[] =
+static char const s1_msg[] =
"v=0\r\n"
"o=- 2435697 2435697 IN IP4 172.21.137.44\r\n"
"s=-\r\n"
@@ -238,7 +238,7 @@
"a=fmtp:97 mode-set=\"0,1,2,3,4\"\r\n"
"a=ptime:400\r\n";
-static char const s2_msg[] =
+static char const s2_msg[] =
"v=0\r\n"
"o=- 308519342 2 IN IP4 172.168.1.55\r\n"
"s=-\r\n"
@@ -413,7 +413,7 @@
&sdp_rtpmap_cn_reserved);
TEST_1(!rm->rm_next);
}
-
+
TEST_1((parser = sdp_parse(home, s2_msg, sizeof (s2_msg), 0)));
TEST_1((sdp = sdp_session(parser)));
TEST_1(m = sdp->sdp_media);
@@ -438,7 +438,7 @@
END();
}
-static char const s3_msg[] =
+static char const s3_msg[] =
"v=0\r\n"
"o=- 2435697 2435697 IN IP4 172.21.137.44\r\n"
"s=-\r\n"
@@ -461,7 +461,7 @@
su_home_check(home); TEST_1(home);
TEST_1((parser = sdp_parse(home, s3_msg, sizeof(s3_msg) - 1, 0)));
-
+
TEST_1(sdp_sanity_check(parser) == 0);
su_home_unref(home);
@@ -469,7 +469,7 @@
END();
}
-static char const pint_msg[] =
+static char const pint_msg[] =
"v=0\r\n"
"o=- 2353687640 2353687640 IN IP4 128.3.4.5\r\n"
"s=marketing\r\n"
@@ -479,7 +479,7 @@
"m=audio 1 voice -\r\n"
;
-static char const pint_torture_msg[] =
+static char const pint_torture_msg[] =
"v=0\r\n"
"o=- 2353687640 2353687640 IN IP4 128.3.4.5\r\n"
"s=marketing\r\n"
@@ -514,7 +514,7 @@
TEST_1((parser = sdp_parse(home, pint_torture_msg, sizeof(pint_torture_msg) - 1,
sdp_f_anynet)));
TEST_1((sdp = sdp_session(parser)));
-
+
su_home_check(home);
su_home_unref(home);
@@ -555,16 +555,16 @@
}
static
-sdp_rtpmap_t const rm0[1] =
- {{
+sdp_rtpmap_t const rm0[1] =
+ {{
sizeof(rm0), NULL, "AMR", 8000, "1",
"mode-set=4,5,6 interleaving crc use-redundancy=1",
0, 96, 0
}};
static
-sdp_rtpmap_t const rm1[1] =
- {{
+sdp_rtpmap_t const rm1[1] =
+ {{
sizeof(rm1), (sdp_