[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_rtpmap_t *)rm0, "PCMA", 8000, "1",
       NULL,
       1, 8, 0,
@@ -605,7 +605,7 @@
 
 static sdp_attribute_t const a0[1] =
   {{ sizeof(a0), NULL, "foo", "2"}};
-static sdp_attribute_t const a1[1] = 
+static sdp_attribute_t const a1[1] =
   {{ sizeof(a1), (sdp_attribute_t *)a0, "bar", "1" }};
 
 static int test_attribute(void)
@@ -648,12 +648,12 @@
   replaced = (void *)-1;
   TEST(sdp_attribute_replace(&list, NULL, &replaced), -1);
   TEST_P(replaced, NULL);
-  TEST(sdp_attribute_replace(&list, a, &replaced), 0); 
+  TEST(sdp_attribute_replace(&list, a, &replaced), 0);
   TEST_P(replaced, NULL);
-  TEST(sdp_attribute_replace(&list, a_new, &replaced), 1); 
+  TEST(sdp_attribute_replace(&list, a_new, &replaced), 1);
   TEST_P(replaced, a);
 
-  TEST_VOID(sdp_attribute_append(&list, a)); 
+  TEST_VOID(sdp_attribute_append(&list, a));
 
   TEST_P(sdp_attribute_remove(&list, "bAr"), a_new);
   TEST_P(sdp_attribute_remove(&list, "BAR"), a);
@@ -672,7 +672,7 @@
   END();
 }
 
-static char const media_msg[] = 
+static char const media_msg[] =
 "v=0\n"
 "s=/sdp_torture\n"
 "o=sdp_torture 0 0 IN IP4 1.2.3.4\n"
@@ -689,13 +689,13 @@
 "c=IN IP4 2.3.4.5\n";
 
 static sdp_media_t const m0[1] =
-  {{ sizeof(m0), 
-     NULL, 
+  {{ sizeof(m0),
+     NULL,
      NULL,
      sdp_media_audio,
-     NULL, 
-     1234, 
-     5, 
+     NULL,
+     1234,
+     5,
      sdp_proto_udp,
      "udp",
   }};
@@ -781,20 +781,20 @@
   TEST_1(sdp_time_cmp(t1, t1) == 0);
   TEST_1(sdp_time_cmp(t1, t2) == 0);
   TEST_1(sdp_time_cmp(t2, t1) == 0);
-  TEST_1((t = t->t_next)); *t1 = *t; t1->t_next = NULL; 
+  TEST_1((t = t->t_next)); *t1 = *t; t1->t_next = NULL;
   TEST_1(sdp_time_cmp(t1, t2) > 0);
   TEST_1(sdp_time_cmp(t2, t1) < 0);
-  TEST_1((t = t->t_next)); *t2 = *t; t2->t_next = NULL; 
+  TEST_1((t = t->t_next)); *t2 = *t; t2->t_next = NULL;
   TEST_1(t2->t_zone); TEST_1(t2->t_repeat);
   TEST_1(sdp_time_cmp(t2, t2) == 0);
   TEST_1(sdp_time_cmp(t1, t2) > 0);
   TEST_1(sdp_time_cmp(t2, t1) < 0);
-  TEST_1((t = t->t_next)); *t1 = *t; t1->t_next = NULL; 
+  TEST_1((t = t->t_next)); *t1 = *t; t1->t_next = NULL;
   TEST_1(t1->t_zone); TEST_1(t1->t_repeat);
   TEST_1(sdp_time_cmp(t1, t1) == 0);
   TEST_1(sdp_time_cmp(t2, t2) == 0);
   TEST_1(sdp_time_cmp(t1, t2) == 0);
-  
+
   sdp_parser_free(parser);
 
   END();
@@ -829,9 +829,9 @@
 
   TEST_1(home = su_home_create());
 
-  /* 
+  /*
    * Allocate an SDP structure using su_salloc().
-   * su_salloc() puts memory area size to the beginning of structure 
+   * su_salloc() puts memory area size to the beginning of structure
    * and zeroes rest of the structure.
    */
   TEST_1(sdp = su_salloc(home, sizeof(*sdp)));
@@ -850,7 +850,7 @@
   o->o_id = rand();
   o->o_version = 1;
   o->o_address = c;
-  
+
   c->c_nettype = sdp_net_in;
   c->c_addrtype = sdp_addr_ip4;
   c->c_address = "172.21.40.40";
@@ -860,10 +860,10 @@
   m->m_port = 5004;
   m->m_proto = sdp_proto_rtp; m->m_proto_name = "RTP/AVP";
   m->m_rtpmaps = rm;
-  
+
   rm->rm_predef = 1;
   rm->rm_pt = 8;
-  rm->rm_encoding = "PCMA"; 
+  rm->rm_encoding = "PCMA";
   rm->rm_rate = 8000;
 
   TEST_1(m1 = su_salloc(home, sizeof(*m1)));

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ADD-A-HEADER
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ADD-A-HEADER	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ADD-A-HEADER	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
     You should add a typedef line like this:
 
      typedef struct sip_example_s sip_example_t;
-	
+
     Note that the typedefs are documented together with the
     implementation in the .c file.
 
@@ -50,16 +50,16 @@
   * Add entry to sip_extra_headers.txt:
    - In this case:
      example @NEW_2_0 /* Example header */
-   - The first is the base C name used for functions and types related to 
+   - The first is the base C name used for functions and types related to
      the type. The AWK script msg_parser.awk automatically creates the
      default prototypes and tags for the newly created header. It will
      complain about mismatches between header name and the base name.
 
-   - If the entry is before #### DEFAULT HEADER LIST ENDS HERE #### 
+   - If the entry is before #### DEFAULT HEADER LIST ENDS HERE ####
      the new header is added to the default parser
    - If after, the new header is added only to the extended parser.
 
-   - The extended parser will be used after call to 
+   - The extended parser will be used after call to
      sip_update_default_mclass(NULL)
 
   * Write parsing tests for your new headers in torture_sip.c:
@@ -79,10 +79,10 @@
       + sip_example_dup_xtra(), sip_example_dup_one()
 
   * If you added a .c file, add to the Makefile.am
-    - remember to run autogen.sh unless you have given --enable-maintainer-mode 
+    - remember to run autogen.sh unless you have given --enable-maintainer-mode
       to configure script
 
-  * Run "make check" after you are ready 
+  * Run "make check" after you are ready
 
   * Run "make check" after you are ready. Really.
 
@@ -95,10 +95,10 @@
     - There is an example package sofia-sip-2543.tar.gz, available from
       sofia-sip.sourceforge.net
 
-      See the extension package for 1) 
+      See the extension package for 1)
 
-    - Create a header template for your header just like 
-      sofia-sip/rfc2543.h.in (found in <sofia-sip/rfc2543.h> package), 
+    - Create a header template for your header just like
+      sofia-sip/rfc2543.h.in (found in <sofia-sip/rfc2543.h> package),
       e.g, sip_example.h.in:
 
 ---8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<---
@@ -107,11 +107,11 @@
  * Template for <sip_example.h>.
  */
 
-#ifndef SIP_EXAMPLE_H 
+#ifndef SIP_EXAMPLE_H
 /** Defined when <sip_example.h> has been included. */
-#define SIP_EXAMPLE_H 
+#define SIP_EXAMPLE_H
 
-/**@file sip_example.h 
+/**@file sip_example.h
 *
  * @brief Example header.
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 2006-01-25  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* Doxyfile (INPUT): Missing sip_dll.c broke refdoc 
-	build. Now changed so that individual are not listed 
+	* Doxyfile (INPUT): Missing sip_dll.c broke refdoc
+	build. Now changed so that individual are not listed
 	anymore in INPUT.
 
 2006-01-10  Kai Vehmanen  <kai.vehmanen at nokia.com>
@@ -52,7 +52,7 @@
 
 	* sip_basic.c: Not encoding comment in Contact. Always using
 	name-addr form for Route headers.
- 
+
 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/sip/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/Doxyfile.in	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 PROJECT_NAME         = "sip"
 OUTPUT_DIRECTORY     = ../docs/html/sip
 
-INPUT 		     = @srcdir@/sofia-sip sofia-sip @srcdir@/sip.docs @srcdir@/sip_parser.docs @srcdir@ . 
+INPUT 		     = @srcdir@/sofia-sip sofia-sip @srcdir@/sip.docs @srcdir@/sip_parser.docs @srcdir@ .
 
 @INCLUDE_PATH = . @srcdir@
 @INCLUDE = ../docs/Doxyfile.conf

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/GRAMMAR
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/GRAMMAR	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/GRAMMAR	Tue Dec 16 13:05:22 2008
@@ -1,19 +1,19 @@
 /* SIP grammar from RFC3261
- * 
+ *
  *    alphanum  =  ALPHA / DIGIT
- * 
+ *
  *    reserved    =  ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+"
  *                   / "$" / ","
  *    unreserved  =  alphanum / mark
  *    mark        =  "-" / "_" / "." / "!" / "~" / "*" / "'"
  *                   / "(" / ")"
  *    escaped     =  "%" HEXDIG HEXDIG
- * 
+ *
  *    LWS  =  [*WSP CRLF] 1*WSP ; linear whitespace
  *    SWS  =  [LWS] ; sep whitespace
- * 
+ *
  *    HCOLON  =  *( SP / HTAB ) ":" SWS
- * 
+ *
  *    TEXT-UTF8-TRIM  =  1*TEXT-UTF8char *(*LWS TEXT-UTF8char)
  *    TEXT-UTF8char   =  %x21-7E / UTF8-NONASCII
  *    UTF8-NONASCII   =  %xC0-DF 1UTF8-CONT
@@ -22,9 +22,9 @@
  *                    /  %xF8-Fb 4UTF8-CONT
  *                    /  %xFC-FD 5UTF8-CONT
  *    UTF8-CONT       =  %x80-BF
- * 
+ *
  *    LHEX  =  DIGIT / %x61-66 ;lowercase a-f
- * 
+ *
  *    token       =  1*(alphanum / "-" / "." / "!" / "%" / "*"
  *                   / "_" / "+" / "`" / "'" / "~" )
  *    separators  =  "(" / ")" / "<" / ">" / "@" /
@@ -37,7 +37,7 @@
  *                   ":" / "\" / DQUOTE /
  *                   "/" / "[" / "]" / "?" /
  *                   "{" / "}" )
- * 
+ *
  *    STAR    =  SWS "*" SWS ; asterisk
  *    SLASH   =  SWS "/" SWS ; slash
  *    EQUAL   =  SWS "=" SWS ; equal
@@ -50,18 +50,18 @@
  *    COLON   =  SWS ":" SWS ; colon
  *    LDQUOT  =  SWS DQUOTE; open double quotation mark
  *    RDQUOT  =  DQUOTE SWS ; close double quotation mark
- * 
+ *
  *    comment  =  LPAREN *(ctext / quoted-pair / comment) RPAREN
  *    ctext    =  %x21-27 / %x2A-5B / %x5D-7E / UTF8-NONASCII
  *                / LWS
- * 
+ *
  *    quoted-string  =  SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
  *    qdtext         =  LWS / %x21 / %x23-5B / %x5D-7E
  *                      / UTF8-NONASCII
- * 
+ *
  *    quoted-pair  =  "\" (%x00-09 / %x0B-0C
  *                    / %x0E-7F)
- * 
+ *
  *    SIP-URI          =  "sip:" [ userinfo ] hostport
  *                        uri-parameters [ headers ]
  *    SIPS-URI         =  "sips:" [ userinfo ] hostport
@@ -84,7 +84,7 @@
  *    hexseq         =  hex4 *( ":" hex4)
  *    hex4           =  1*4HEXDIG
  *    port           =  1*DIGIT
- * 
+ *
  *    uri-parameters    =  *( ";" uri-parameter)
  *    uri-parameter     =  transport-param / user-param / method-param
  *                         / ttl-param / maddr-param / lr-param / other-param
@@ -103,13 +103,13 @@
  *    pvalue            =  1*paramchar
  *    paramchar         =  param-unreserved / unreserved / escaped
  *    param-unreserved  =  "[" / "]" / "/" / ":" / "&" / "+" / "$"
- * 
+ *
  *    headers         =  "?" header *( "&" header )
  *    header          =  hname "=" hvalue
  *    hname           =  1*( hnv-unreserved / unreserved / escaped )
  *    hvalue          =  *( hnv-unreserved / unreserved / escaped )
  *    hnv-unreserved  =  "[" / "]" / "/" / "?" / ":" / "+" / "$"
- * 
+ *
  *    SIP-message    =  Request / Response
  *    Request        =  Request-Line
  *                      *( message-header )
@@ -137,7 +137,7 @@
  *                      / ";" / ":" / "@" / "&" / "=" / "+" )
  *    query          =  *uric
  *    SIP-Version    =  "SIP" "/" 1*DIGIT "." 1*DIGIT
- * 
+ *
  *    message-header  =  (Accept
  *                    /  Accept-Encoding
  *                    /  Accept-Language
@@ -183,7 +183,7 @@
  *                    /  Warning
  *                    /  WWW-Authenticate
  *                    /  extension-header) CRLF
- * 
+ *
  *    INVITEm           =  %x49.4E.56.49.54.45 ; INVITE in caps
  *    ACKm              =  %x41.43.4B ; ACK in caps
  *    OPTIONSm          =  %x4F.50.54.49.4F.4E.53 ; OPTIONS in caps
@@ -198,7 +198,7 @@
  *                         *( message-header )
  *                         CRLF
  *                         [ message-body ]
- * 
+ *
  *    Status-Line     =  SIP-Version SP Status-Code SP Reason-Phrase CRLF
  *    Status-Code     =  Informational
  *                   /   Redirection
@@ -210,21 +210,21 @@
  *    extension-code  =  3DIGIT
  *    Reason-Phrase   =  *(reserved / unreserved / escaped
  *                       / UTF8-NONASCII / UTF8-CONT / SP / HTAB)
- * 
+ *
  *    Informational  =  "100"  ;  Trying
  *                  /   "180"  ;  Ringing
  *                  /   "181"  ;  Call Is Being Forwarded
  *                  /   "182"  ;  Queued
  *                  /   "183"  ;  Session Progress
- * 
+ *
  *    Success  =  "200"  ;  OK
- * 
+ *
  *    Redirection  =  "300"  ;  Multiple Choices
  *                /   "301"  ;  Moved Permanently
  *                /   "302"  ;  Moved Temporarily
  *                /   "305"  ;  Use Proxy
  *                /   "380"  ;  Alternative Service
- * 
+ *
  *    Client-Error  =  "400"  ;  Bad Request
  *                 /   "401"  ;  Unauthorized
  *                 /   "402"  ;  Payment Required
@@ -253,7 +253,7 @@
  *                 /   "488"  ;  Not Acceptable Here
  *                 /   "491"  ;  Request Pending
  *                 /   "493"  ;  Undecipherable
- * 
+ *
  *    Server-Error  =  "500"  ;  Internal Server Error
  *                 /   "501"  ;  Not Implemented
  *                 /   "502"  ;  Bad Gateway
@@ -261,12 +261,12 @@
  *                 /   "504"  ;  Server Time-out
  *                 /   "505"  ;  SIP Version not supported
  *                 /   "513"  ;  Message Too Large
- * 
+ *
  *    Global-Failure  =  "600"  ;  Busy Everywhere
  *                   /   "603"  ;  Decline
  *                   /   "604"  ;  Does not exist anywhere
  *                   /   "606"  ;  Not Acceptable
- * 
+ *
  *    Accept         =  "Accept" HCOLON
  *                       [ accept-range *(COMMA accept-range) ]
  *    accept-range   =  media-range *(SEMI accept-param)
@@ -280,23 +280,23 @@
  *                      / ( "1" [ "." 0*3("0") ] )
  *    generic-param  =  token [ EQUAL gen-value ]
  *    gen-value      =  token / host / quoted-string
- * 
+ *
  *    Accept-Encoding  =  "Accept-Encoding" HCOLON
  *                         [ encoding *(COMMA encoding) ]
  *    encoding         =  codings *(SEMI accept-param)
  *    codings          =  content-coding / "*"
  *    content-coding   =  token
- * 
+ *
  *    Accept-Language  =  "Accept-Language" HCOLON
  *                         [ language *(COMMA language) ]
  *    language         =  language-range *(SEMI accept-param)
  *    language-range   =  ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) / "*" )
- * 
+ *
  *    Alert-Info   =  "Alert-Info" HCOLON alert-param *(COMMA alert-param)
  *    alert-param  =  LAQUOT absoluteURI RAQUOT *( SEMI generic-param )
- * 
+ *
  *    Allow  =  "Allow" HCOLON [Method *(COMMA Method)]
- * 
+ *
  *    Authorization     =  "Authorization" HCOLON credentials
  *    credentials       =  ("Digest" LWS digest-response)
  *                         / other-response
@@ -323,7 +323,7 @@
  *    other-response    =  auth-scheme LWS auth-param
  *                         *(COMMA auth-param)
  *    auth-scheme       =  token
- * 
+ *
  *    Authentication-Info  =  "Authentication-Info" HCOLON ainfo
  *                            *(COMMA ainfo)
  *    ainfo                =  nextnonce / message-qop
@@ -332,29 +332,29 @@
  *    nextnonce            =  "nextnonce" EQUAL nonce-value
  *    response-auth        =  "rspauth" EQUAL response-digest
  *    response-digest      =  LDQUOT *LHEX RDQUOT
- * 
+ *
  *    Call-ID  =  ( "Call-ID" / "i" ) HCOLON callid
  *    callid   =  word [ "@" word ]
- * 
+ *
  *    Call-Info   =  "Call-Info" HCOLON info *(COMMA info)
  *    info        =  LAQUOT absoluteURI RAQUOT *( SEMI info-param)
  *    info-param  =  ( "purpose" EQUAL ( "icon" / "info"
  *                   / "card" / token ) ) / generic-param
- * 
+ *
  *    Contact        =  ("Contact" / "m" ) HCOLON
  *                      ( STAR / (contact-param *(COMMA contact-param)))
  *    contact-param  =  (name-addr / addr-spec) *(SEMI contact-params)
  *    name-addr      =  [ display-name ] LAQUOT addr-spec RAQUOT
  *    addr-spec      =  SIP-URI / SIPS-URI / absoluteURI
  *    display-name   =  *(token LWS)/ quoted-string
- * 
+ *
  *    contact-params     =  c-p-q / c-p-expires
  *                          / contact-extension
  *    c-p-q              =  "q" EQUAL qvalue
  *    c-p-expires        =  "expires" EQUAL delta-seconds
  *    contact-extension  =  generic-param
  *    delta-seconds      =  1*DIGIT
- * 
+ *
  *    Content-Disposition   =  "Content-Disposition" HCOLON
  *                             disp-type *( SEMI disp-param )
  *    disp-type             =  "render" / "session" / "icon" / "alert"
@@ -365,16 +365,16 @@
  *                             / other-handling )
  *    other-handling        =  token
  *    disp-extension-token  =  token
- * 
+ *
  *    Content-Encoding  =  ( "Content-Encoding" / "e" ) HCOLON
  *                         content-coding *(COMMA content-coding)
- * 
+ *
  *    Content-Language  =  "Content-Language" HCOLON
  *                         language-tag *(COMMA language-tag)
  *    language-tag      =  primary-tag *( "-" subtag )
  *    primary-tag       =  1*8ALPHA
  *    subtag            =  1*8ALPHA
- * 
+ *
  *    Content-Length  =  ( "Content-Length" / "l" ) HCOLON 1*DIGIT
  *    Content-Type     =  ( "Content-Type" / "c" ) HCOLON media-type
  *    media-type       =  m-type SLASH m-subtype *(SEMI m-parameter)
@@ -390,9 +390,9 @@
  *    m-parameter      =  m-attribute EQUAL m-value
  *    m-attribute      =  token
  *    m-value          =  token / quoted-string
- * 
+ *
  *    CSeq  =  "CSeq" HCOLON 1*DIGIT LWS Method
- * 
+ *
  *    Date          =  "Date" HCOLON SIP-date
  *    SIP-date      =  rfc1123-date
  *    rfc1123-date  =  wkday "," SP date1 SP time SP "GMT"
@@ -405,32 +405,32 @@
  *    month         =  "Jan" / "Feb" / "Mar" / "Apr"
  *                     / "May" / "Jun" / "Jul" / "Aug"
  *                     / "Sep" / "Oct" / "Nov" / "Dec"
- * 
+ *
  *    Error-Info  =  "Error-Info" HCOLON error-uri *(COMMA error-uri)
  *    error-uri   =  LAQUOT absoluteURI RAQUOT *( SEMI generic-param )
- * 
+ *
  *    Expires     =  "Expires" HCOLON delta-seconds
  *    From        =  ( "From" / "f" ) HCOLON from-spec
  *    from-spec   =  ( name-addr / addr-spec )
  *                   *( SEMI from-param )
  *    from-param  =  tag-param / generic-param
  *    tag-param   =  "tag" EQUAL token
- * 
+ *
  *    In-Reply-To  =  "In-Reply-To" HCOLON callid *(COMMA callid)
- * 
+ *
  *    Max-Forwards  =  "Max-Forwards" HCOLON 1*DIGIT
- * 
+ *
  *    MIME-Version  =  "MIME-Version" HCOLON 1*DIGIT "." 1*DIGIT
- * 
+ *
  *    Min-Expires  =  "Min-Expires" HCOLON delta-seconds
- * 
+ *
  *    Organization  =  "Organization" HCOLON [TEXT-UTF8-TRIM]
- * 
+ *
  *    Priority        =  "Priority" HCOLON priority-value
  *    priority-value  =  "emergency" / "urgent" / "normal"
  *                       / "non-urgent" / other-priority
  *    other-priority  =  token
- * 
+ *
  *    Proxy-Authenticate  =  "Proxy-Authenticate" HCOLON challenge
  *    challenge           =  ("Digest" LWS digest-cln *(COMMA digest-cln))
  *                           / other-challenge
@@ -453,53 +453,53 @@
  *    qop-options         =  "qop" EQUAL LDQUOT qop-value
  *                           *("," qop-value) RDQUOT
  *    qop-value           =  "auth" / "auth-int" / token
- * 
+ *
  *    Proxy-Authorization  =  "Proxy-Authorization" HCOLON credentials
- * 
+ *
  *    Proxy-Require  =  "Proxy-Require" HCOLON option-tag
  *                      *(COMMA option-tag)
  *    option-tag     =  token
- * 
+ *
  *    Record-Route  =  "Record-Route" HCOLON rec-route *(COMMA rec-route)
  *    rec-route     =  name-addr *( SEMI rr-param )
  *    rr-param      =  generic-param
- * 
+ *
  *    Reply-To      =  "Reply-To" HCOLON rplyto-spec
  *    rplyto-spec   =  ( name-addr / addr-spec )
  *                     *( SEMI rplyto-param )
  *    rplyto-param  =  generic-param
  *    Require       =  "Require" HCOLON option-tag *(COMMA option-tag)
- * 
+ *
  *    Retry-After  =  "Retry-After" HCOLON delta-seconds
  *                    [ comment ] *( SEMI retry-param )
- * 
+ *
  *    retry-param  =  ("duration" EQUAL delta-seconds)
  *                    / generic-param
- * 
+ *
  *    Route        =  "Route" HCOLON route-param *(COMMA route-param)
  *    route-param  =  name-addr *( SEMI rr-param )
- * 
+ *
  *    Server           =  "Server" HCOLON server-val *(LWS server-val)
  *    server-val       =  product / comment
  *    product          =  token [SLASH product-version]
  *    product-version  =  token
- * 
+ *
  *    Subject  =  ( "Subject" / "s" ) HCOLON [TEXT-UTF8-TRIM]
- * 
+ *
  *    Supported  =  ( "Supported" / "k" ) HCOLON
  *                  [option-tag *(COMMA option-tag)]
- * 
+ *
  *    Timestamp  =  "Timestamp" HCOLON 1*(DIGIT)
  *                   [ "." *(DIGIT) ] [ LWS delay ]
  *    delay      =  *(DIGIT) [ "." *(DIGIT) ]
- * 
+ *
  *    To        =  ( "To" / "t" ) HCOLON ( name-addr
  *                 / addr-spec ) *( SEMI to-param )
  *    to-param  =  tag-param / generic-param
- * 
+ *
  *    Unsupported  =  "Unsupported" HCOLON option-tag *(COMMA option-tag)
  *    User-Agent  =  "User-Agent" HCOLON server-val *(LWS server-val)
- * 
+ *
  *    Via               =  ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
  *    via-parm          =  sent-protocol LWS sent-by *( SEMI via-params )
  *    via-params        =  via-ttl / via-maddr
@@ -518,7 +518,7 @@
  *                         / other-transport
  *    sent-by           =  host [ COLON port ]
  *    ttl               =  1*3DIGIT ; 0 to 255
- * 
+ *
  *    Warning        =  "Warning" HCOLON warning-value *(COMMA warning-value)
  *    warning-value  =  warn-code SP warn-agent SP warn-text
  *    warn-code      =  3DIGIT
@@ -527,9 +527,9 @@
  *                      ;  the Warning header, for use in debugging
  *    warn-text      =  quoted-string
  *    pseudonym      =  token
- * 
+ *
  *    WWW-Authenticate  =  "WWW-Authenticate" HCOLON challenge
- * 
+ *
  *    extension-header  =  header-name HCOLON header-value
  *    header-name       =  token
  *    header-value      =  *(TEXT-UTF8char / UTF8-CONT / LWS)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run-tests
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run-tests	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run-tests	Tue Dec 16 13:05:22 2008
@@ -36,8 +36,8 @@
 rc=0
 
 for n in "$@";
-do 
-    if "$msg_test" < "$n" > /dev/null ; then 
+do
+    if "$msg_test" < "$n" > /dev/null ; then
 	true
     else
 	echo "$n: ERROR"; rc=1

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run_test_sip_msg
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run_test_sip_msg	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/run_test_sip_msg	Tue Dec 16 13:05:22 2008
@@ -41,20 +41,20 @@
 test=./test_sip_msg
 
 # These are messages that the parser should pass
-good="-t test1.txt test2.txt test3.txt test4.txt 
-      -u test5.txt -t test6.txt test7.txt -u test8.txt -t test9.txt 
-      test14.txt test20.txt test23.txt test24.txt test31.txt 
+good="-t test1.txt test2.txt test3.txt test4.txt
+      -u test5.txt -t test6.txt test7.txt -u test8.txt -t test9.txt
+      test14.txt test20.txt test23.txt test24.txt test31.txt
       own1.txt own2.txt own3.txt own4.txt own5.txt own6.txt"
 # These are messages that the parser should fail
-bad="test10.txt test11.txt test12.txt test13.txt test15.txt 
-     test16.txt test17.txt test18.txt test19.txt 
-     test21.txt test22.txt 
+bad="test10.txt test11.txt test12.txt test13.txt test15.txt
+     test16.txt test17.txt test18.txt test19.txt
+     test21.txt test22.txt
      test26.txt test29.txt test33.txt
-     test35.txt 
+     test35.txt
      test40.txt"
 # These are ugly messages that parser should pass
-ugly="-t test25.txt -u test27.txt test28.txt -t test30.txt 
-      -u test32.txt test34.txt -t test36.txt -u test37.txt 
+ugly="-t test25.txt -u test27.txt test28.txt -t test30.txt
+      -u test32.txt test34.txt -t test36.txt -u test37.txt
       test38.txt test39.txt test41.txt test42.txt"
 
 # These are messages that parser should pass, but it does not
@@ -64,12 +64,12 @@
 
 flag=-t
 for n in $good $ugly;
-do 
+do
     if test $n = -t ; then
 	flag=$n
     elif test $n = -u ; then
 	flag=
-    elif "$test" $flag < "$srcdir/tests/$n" > /dev/null ; then 
+    elif "$test" $flag < "$srcdir/tests/$n" > /dev/null ; then
 	echo "PASS: $n"
     else
 	echo "ERROR: $n"; rc=1
@@ -77,8 +77,8 @@
 done
 
 for n in $bad;
-do 
-    if "$test" -t < "$srcdir/tests/$n" > /dev/null 2>/dev/null ; then 
+do
+    if "$test" -t < "$srcdir/tests/$n" > /dev/null 2>/dev/null ; then
 	echo "ERROR: $n (no error detected)"; rc=1
     else
 	echo "PASS: $n"

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.docs	Tue Dec 16 13:05:22 2008
@@ -44,7 +44,7 @@
  * that drives the parsing process and invokes the SIP parser for each
  * header. As there are no framing between SIP messages, the parser
  * considers any received data, be it a UDP datagram or a TCP stream, as a
- * @em message @em stream, which may consist of one or more SIP messages. 
+ * @em message @em stream, which may consist of one or more SIP messages.
  * The parser works by first separating stream into fragments, then building
  * a complete message based on parsing result. After a message is completed,
  * it can be given to the message stream customer (typically a protocol
@@ -57,7 +57,7 @@
  * one-by-one from the message. After the parser encounters an empty line
  * separating the headers and the message body (payload), it invokes a
  * function parsing the separator and payload fragment(s). When the message
- * is complete, the parser can hand the message over to the protocol engine. 
+ * is complete, the parser can hand the message over to the protocol engine.
  * Then it is ready to start again with first fragment of the next message.
  *
  * @image html sip-parser.gif Separating byte stream to messages
@@ -70,7 +70,7 @@
  * fragment chain, and a whole other stuff is held by the generic message
  * type, #msg_t, defined in <sofia-sip/msg.h>. The internal structure of #msg_t is
  * known only within @b msg module and it is hidden from other modules.
- * 
+ *
  * The abstract message module @b msg also drives the reverse process,
  * invoking the encoding method of each fragment so that the whole outgoing
  * SIP message is encoded properly.
@@ -96,7 +96,7 @@
  * For instance, the @From header has following syntax:
  *
  * @code
- * from           = ("From" | "f") ":" 
+ * from           = ("From" | "f") ":"
  *                  ( name-addr | addr-spec ) *( ";" addr-params )
  * name-addr      = [ display-name ] "<" addr-spec ">"
  * addr-spec      = SIP-URL | URI
@@ -134,7 +134,7 @@
  * access certain headers at the SIP message level, for example, accessing
  * directly the @From header instead of going through all headers and
  * examining their name. The structured view to the SIP message is provided
- * via a C struct with type #sip_t. 
+ * via a C struct with type #sip_t.
  *
  * In other words, a single message is represented by two types, first type
  * (#msg_t) is private to the msg module and inaccessable by an application
@@ -151,7 +151,7 @@
  *   int                 sip_flags;
  *
  *   sip_error_t        *sip_error;	   // Erroneous headers
- * 
+ *
  *   sip_request_t      *sip_request;      // Request line
  *   sip_status_t       *sip_status;       // Status line
  *
@@ -210,11 +210,11 @@
  * pointers to the headers according to their type. If there are multiple
  * headers of the same type (like there are two @Via headers in the above
  * message), the headers are put into a single-linked list.
- * 
+ *
  * Each fragment has pointers to successing and preceding fragment. It also
  * contains pointer to the corresponding data within the I/O buffer and its
  * length.
- * 
+ *
  * The main purpose of the fragment chain is to preserve the original order
  * of the headers.  If there were an third @Via header after @CSeq in the
  * message, the fragment representing it would be after the @CSeq header in
@@ -238,7 +238,7 @@
 
 /**@ingroup sip_headers
  * @defgroup sip_header_x SIP Header X - Conventions
- * 
+ *
  * For a SIP header X, there are types, functions, macros and global data
  * declared in <sofia-sip/sip_protos.h> and <sofia-sip/sip_hclass.h> as
  * follows:
@@ -247,13 +247,13 @@
  *  - sip_X_init() initializes a dynamic instance of #sip_X_t,
  *  - sip_is_X() tests if header object is instance of header X,
  *  - sip_X_make() creates a header X object by decoding given string,
- *  - sip_X_format() creates a header X object by decoding given 
+ *  - sip_X_format() creates a header X object by decoding given
  *    printf() list,
- *  - sip_X_dup() duplicates (deeply copies) the header X, 
+ *  - sip_X_dup() duplicates (deeply copies) the header X,
  *  - sip_X_copy() copies the header X,
- *  - #msg_hclass_t #sip_X_class[] contains the @em header @em class 
+ *  - #msg_hclass_t #sip_X_class[] contains the @em header @em class
  *    for header X.
- * 
+ *
  * All header structures contain the common part, a #sip_common_t structure
  * (@a X_common[]), a link to the next header in list (@a X_next), and
  * various fields describing the header value (in this case, @a X_value).
@@ -264,7 +264,7 @@
  *   struct msg_common_s {
  *     msg_header_t       *h_succ;   // Pointer to succeeding fragment
  *     msg_header_t      **h_prev;   // Pointer to preceeding fragment
- *     msg_hclass_t       *h_class;  // Header class 
+ *     msg_hclass_t       *h_class;  // Header class
  *     void const         *h_data;   // Encoded data
  *     usize_t             h_len;    // Encoding length (including CRLF)
  *   } X_common[1];
@@ -295,7 +295,7 @@
  * parameters. The content of parameters is not parsed, they are just
  * separated from each other and then stored in an dynamically allocated
  * array of string pointers. Pointer to the array is stored to @a X_params.
- * 
+ *
  * For more complex header structures, see #sip_contact_t or #sip_rack_t.
  *
  * @{
@@ -318,18 +318,18 @@
 
 /**@var msg_hclass_t sip_X_class[];
  * @brief Header class for SIP X.
- * 
+ *
  * The header class sip_X_class defines how a SIP
  * X is parsed and printed.  It also
  * contains methods used by SIP parser and other functions
  * to manipulate the sip_X_t header structure.
- * 
+ *
  */
 SIP_DLL extern msg_hclass_t sip_X_class[];
 
-enum { 
+enum {
  /** Hash of X. @internal */
- sip_X_hash = hash 
+ sip_X_hash = hash
 };
 
 /** Parse a X. @internal */
@@ -339,28 +339,28 @@
 msg_print_f sip_X_e;
 
 /**Initializer for structure sip_X_t.
- * 
+ *
  * A static sip_X_t structure must be initialized
  * with the SIP_X_INIT() macro. For instance,
- * @code 
- * 
+ * @code
+ *
  *  sip_X_t sip_X = SIP_X_INIT;
- * 
+ *
  * @endcode
  * @HI
  */
 #define SIP_X_INIT() SIP_HDR_INIT(X)
 
 /**Initialize a structure sip_X_t.
- * 
+ *
  * An sip_X_t structure can be initialized with the
  * sip_X_init() function/macro. For instance,
  * @code
- * 
+ *
  *  sip_X_t sip_X;
- * 
+ *
  *  sip_X_init(&sip_X);
- * 
+ *
  * @endcode
  * @HI
  */
@@ -375,13 +375,13 @@
 #endif
 
 /**Test if header object is instance of sip_X_t.
- * 
+ *
  * The function sip_is_X() returns true (nonzero) if
  * the header class is an instance of X
  * object and false (zero) otherwise.
- * 
+ *
  * @param header pointer to the header structure to be tested
- * 
+ *
  * @return
  * The function sip_is_X() returns true (nonzero) if
  * the header object is an instance of header X and
@@ -399,27 +399,27 @@
 #define sip_X_p(h) sip_is_X((h))
 
 /**Duplicate (deep copy) @c sip_X_t.
- * 
+ *
  * The function sip_X_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
- * 
+ *
  *   X = sip_X_dup(home, sip->sip_X);
- * 
+ *
  * @endcode
- * 
+ *
  * @return
  * The function sip_X_dup() returns a pointer to the
  * newly duplicated sip_X_t header structure, or NULL
@@ -428,29 +428,29 @@
 sip_X_t *sip_X_dup(su_home_t *home, sip_X_t const *hdr);
 
 /**Copy a sip_X_t header structure.
- * 
+ *
  * The function sip_X_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
- * 
+ *
  *   X = sip_X_copy(home, sip->sip_X);
- * 
+ *
  * @endcode
- * 
+ *
  * @return
  * The function sip_X_copy() returns a pointer to
  * newly copied header structure, or NULL upon an error.
@@ -458,18 +458,18 @@
 sip_X_t *sip_X_copy(su_home_t *home, sip_X_t const *hdr);
 
 /**Make a header structure sip_X_t.
- * 
+ *
  * The function sip_X_make() makes a new
  * sip_X_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
  * sip_header_make().
- * 
+ *
  * @return
  * The function sip_X_make() returns a pointer to
  * newly maked sip_X_t header structure, or NULL upon
@@ -485,25 +485,25 @@
 #endif
 
 /**Make a X from formatting result.
- * 
+ *
  * The function sip_X_format() makes a new
  * X 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 sip_X_format() returns a pointer to newly
  * makes header structure, or NULL upon an error.
- * 
+ *
  * @HIDE
  */
 #if SU_HAVE_INLINE
@@ -517,11 +517,11 @@
 {
   sip_header_t *h;
   va_list ap;
-  
+
   va_start(ap, fmt);
   h = sip_header_vformat(home, sip_X_class, fmt, ap);
   va_end(ap);
- 
+
   return h->sh_X;
 }
 #endif
@@ -534,7 +534,7 @@
  * leading and trailing whitespace has been removed from the string @a s.
  *
  * @param home   memory home used to allocate new header structure.
- * @param h      sip_X_t header structure 
+ * @param h      sip_X_t header structure
  * @param s      string to be decoded
  * @param bsiz   length of string @a s
  *
@@ -555,15 +555,15 @@
  * @param bsiz   size of the encoding buffer
  * @param h      header to be encoded.
  * @param flags  flags controlling the encoding
- * 
- * @note 
+ *
+ * @note
  * The encoding buffer size @b must be @b bigger than, not equal to,
  * the actual encoding result.
  *
  * @return
  * The function sip_X_e() returns the number of characters required for the
  * encoding.
- * 
+ *
  */
 int sip_X_e(char buf[], int bsiz, sip_header_t const *h, int flags);
 
@@ -577,7 +577,7 @@
 
 /**@defgroup sip_tag SIP Tags
  *
- * SIP headers in tag item lists and tagged argument lists. 
+ * SIP headers in tag item lists and tagged argument lists.
  *
  * The include file <sofia-sip/sip_tag.h> defines tags and tag items for including SIP
  * headers in tag item lists or tagged argument lists. For each header,
@@ -592,7 +592,7 @@
  * @code
  * sip_payload_t *payload;
  * ...
- * sip_add_tl(msg, sip, 
+ * sip_add_tl(msg, sip,
  *            SIPTAG_CONTENT_TYPE_STR("text/plain"),
  *            SIPTAG_USER_AGENT(agent->user_agent),
  *            SIPTAG_PAYLOAD(payload),

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.doxyaliases
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.doxyaliases	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip.doxyaliases	Tue Dec 16 13:05:22 2008
@@ -69,6 +69,6 @@
  "ReplyTo=@ref sip_reply_to \"Reply-To\"" \
  "SuppressBodyIfMatch=@ref sip_suppress_body_if_match \"Suppress-Body-If-Match\"" \
  "SuppressNotifyIfMatch=@ref sip_suppress_notify_if_match \"Suppress-Notify-If-Match\"" \
- "RemotePartyID=@ref sip_remote_party_id \"Remote-Party-ID\"" \  
- "PAssertedIdentity=@ref sip_p_asserted_identity \"P-Asserted-Identity\"" \  
- "PPreferredIdentity=@ref sip_p_preferred_identity \"P-Preferred-Identity\"" \  
+ "RemotePartyID=@ref sip_remote_party_id \"Remote-Party-ID\"" \
+ "PAssertedIdentity=@ref sip_p_asserted_identity \"P-Asserted-Identity\"" \
+ "PPreferredIdentity=@ref sip_p_preferred_identity \"P-Preferred-Identity\"" \

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_bad_mask
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_bad_mask	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_bad_mask	Tue Dec 16 13:05:22 2008
@@ -15,7 +15,7 @@
 #
 
 #
-# When updating this file, please update 
+# When updating this file, please update
 # NTATAG_BAD_RESP_MASK()/NTATAG_BAD_REQ_MASK() documentation, too.
 #
 
@@ -55,7 +55,7 @@
 
 #
 # Headers that must be valid in UA, proxy or registrar
-# 
+#
 Contact = sip_mask_ua | sip_mask_proxy | sip_mask_registrar
 Require = sip_mask_ua | sip_mask_registrar | sip_mask_timer
 Record-Route = sip_mask_ua | sip_mask_proxy

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_basic.c	Tue Dec 16 13:05:22 2008
@@ -64,7 +64,7 @@
  *
  * The request line is first line in a SIP request message.  Its syntax defined
  * in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Request-Line   =  Method SP Request-URI SP SIP-Version CRLF
  *    Request-URI    =  SIP-URI / SIPS-URI / absoluteURI
@@ -117,7 +117,7 @@
 static msg_dup_f sip_request_dup_one;
 #define sip_request_update NULL
 
-msg_hclass_t sip_request_class[] = 
+msg_hclass_t sip_request_class[] =
 SIP_HEADER_CLASS(request, NULL, "", rq_common, single_critical, request);
 
 /**Parse @ref sip_request "request line" from a a SIP message. */
@@ -181,7 +181,7 @@
 
 /**@ingroup sip_request
  *
- * Create a @ref sip_request "request line" object. 
+ * Create a @ref sip_request "request line" object.
  *
  * Create a request line object with
  * method enum @a method, method name @a name, request URI @a uri, and
@@ -201,7 +201,7 @@
  *   rq = sip_request_create(home, SIP_METHOD_OPTIONS, requestURI, NULL);
  * @endcode
 
- * @note 
+ * @note
  * If you provide an non-NULL @a version string, it is not copied. The
  * version string @b MUST remain constant.
  */
@@ -210,7 +210,7 @@
 				  url_string_t const *uri,
 				  char const *version)
 {
-  size_t xtra; 
+  size_t xtra;
   sip_request_t *rq;
 
   if (method)
@@ -231,7 +231,7 @@
 
     rq->rq_method      = method;
     rq->rq_method_name = name;
-    if (!method) 
+    if (!method)
       MSG_STRING_DUP(b, rq->rq_method_name, name);
 
     URL_DUP(b, end, rq->rq_url, uri->us_url);
@@ -249,7 +249,7 @@
  *
  * The status line is first line in a response message.  It is defined in
  * @RFC3261 as follows:
- * 
+ *
  * @code
  *    Status-Line     =  SIP-Version SP Status-Code SP Reason-Phrase CRLF
  *    Status-Code     =  Informational
@@ -270,7 +270,7 @@
 /**@ingroup sip_status
  * @typedef typedef struct sip_status_s sip_status_t;
  *
- * The structure #sip_status_t contains representation of SIP 
+ * The structure #sip_status_t contains representation of SIP
  * @ref sip_status "status line".
  *
  * The #sip_status_t is defined as follows:
@@ -292,7 +292,7 @@
 #define sip_status_insert msg_status_insert
 #define sip_status_update NULL
 
-msg_hclass_t sip_status_class[] = 
+msg_hclass_t sip_status_class[] =
 SIP_HEADER_CLASS(status, NULL, "", st_common, single_critical, status);
 
 /** Parse status line */
@@ -366,7 +366,7 @@
  * @param phrase  status phrase (may be NULL)
  * @param version version string (defaults to "SIP/2.0" if NULL)
  *
- * @note 
+ * @note
  * If you provide an non-NULL @a version string, it is not copied. The
  * string @b MUST remain constant.
  *
@@ -426,29 +426,29 @@
 
 #define sip_payload_d 	     msg_payload_d
 #define sip_payload_e 	     msg_payload_e
-#define sip_payload_dup_xtra msg_payload_dup_xtra 
+#define sip_payload_dup_xtra msg_payload_dup_xtra
 #define sip_payload_dup_one  msg_payload_dup_one
 #define sip_payload_update   NULL
 
-msg_hclass_t sip_payload_class[] = 
+msg_hclass_t sip_payload_class[] =
 SIP_HEADER_CLASS(payload, NULL, "", pl_common, single, payload);
 
 /**@ingroup sip_payload
  *
- * Create a @ref sip_payload "SIP payload" structure. 
+ * Create a @ref sip_payload "SIP payload" structure.
  *
  * Create a new SIP payload structure. it
  * copies the given data to the the payload data, and NUL terminates it (it
  * allocates one extra byte for NUL).  If a NULL pointer is given as @a data,
  * sip_payload_create() allocates and zeroes a data buffer of @a len bytes.
  *
- * @param home memory home 
- * @param data payload data 
+ * @param home memory home
+ * @param data payload data
  * @param len  payload length
  *
  * @return A pointer to newly created
  * payload structure, if successful, and NULL upon an error.
- */ 
+ */
 sip_payload_t *sip_payload_create(su_home_t *home, void const *data, isize_t len)
 {
   msg_hclass_t *hc = sip_payload_class;
@@ -504,11 +504,11 @@
 #define sip_separator_e msg_separator_e
 #define sip_separator_insert msg_separator_insert
 
-msg_hclass_t sip_separator_class[] = 
+msg_hclass_t sip_separator_class[] =
 SIP_HEADER_CLASS(separator, NULL, "", sep_common, single, any);
 
 /**@ingroup sip_separator
- * 
+ *
  * Create a @ref sip_separator "SIP separator line" structure.
  */
 sip_separator_t *sip_separator_create(su_home_t *home)
@@ -529,7 +529,7 @@
  * The unknown headers are handled with #sip_unknown_t structure. The
  * unknown header name is stored in @a un_name field and the header field
  * following the colon is stored in @a un_value field.
- * 
+ *
  * @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 regarded as unknown and put into
@@ -544,19 +544,19 @@
  * The #sip_unknown_t is defined as follows:
  * @code
  * typedef struct msg_unknown_s {
- *   msg_common_t    un_common[1];  // Common fragment info 
- *   msg_unknown_t  *un_next;       // Link to next unknown header 
- *   char const     *un_name;       // Header name 
- *   char const     *un_value;      // Header field value 
+ *   msg_common_t    un_common[1];  // Common fragment info
+ *   msg_unknown_t  *un_next;       // Link to next unknown header
+ *   char const     *un_name;       // Header name
+ *   char const     *un_value;      // Header field value
  * } sip_unknown_t;
  * @endcode
  */
 
-#define sip_unknown_dup_xtra msg_unknown_dup_xtra 
+#define sip_unknown_dup_xtra msg_unknown_dup_xtra
 #define sip_unknown_dup_one  msg_unknown_dup_one
 #define sip_unknown_update NULL
 
-msg_hclass_t sip_unknown_class[] = 
+msg_hclass_t sip_unknown_class[] =
 SIP_HEADER_CLASS(unknown, "", "", un_common, append, unknown);
 
 issize_t sip_unknown_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -574,7 +574,7 @@
 /**@SIP_HEADER sip_error Erroneous Headers
  *
  * The erroneous headers are stored in #sip_error_t structure.
- * 
+ *
  * @note Other headers (like duplicate @ContentLength headers) may be put
  * into the list of erroneous headers (@c sip->sip_error). If the list of
  * erroneous headers is processed, the header type must be validated first
@@ -588,8 +588,8 @@
  * The #sip_error_t is defined as follows:
  * @code
  * typedef struct msg_error_s {
- *   msg_common_t    er_common[1];  // Common fragment info 
- *   msg_error_t    *er_next;       // Link to next header 
+ *   msg_common_t    er_common[1];  // Common fragment info
+ *   msg_error_t    *er_next;       // Link to next header
  *   char const     *er_name;       // Name of bad header (if any)
  * } sip_error_t;
  * @endcode
@@ -611,7 +611,7 @@
 
 /* ====================================================================== */
 /*
- * addr           = ("To" | "t" | "From" | "f") ":" 
+ * addr           = ("To" | "t" | "From" | "f") ":"
  *                  ( name-addr | addr-spec ) *( ";" addr-params )
  * name-addr      = [ display-name ] "<" addr-spec ">"
  * addr-spec      = SIP-URL | URI
@@ -631,7 +631,7 @@
  * @param inout_s        pointer to pointer to string to be parsed
  * @param return_display value-result parameter for @e display-name
  * @param return_url     value-result parameter for @e addr-spec
- * @param return_params  value-result paramater for @e parameters 
+ * @param return_params  value-result paramater for @e parameters
  * @param return_comment value-result parameter for @e comment
  *
  * @note After succesful call to the function @c sip_name_addr_d(), *ss
@@ -658,7 +658,7 @@
 
   if (*s == '\0')		/* Empty string */
     return -1;
-  
+
   if (return_display && *s == '"') {
     /* Quoted string */
     if (msg_quoted_d(&s, &display) == -1)
@@ -669,24 +669,24 @@
       return -1;
     s++[0] = '\0';		/* NUL terminate quoted string... */
     n = strcspn(s, ">");
-    addr_spec = s; s += n; 
+    addr_spec = s; s += n;
     if (*s) *s++ = '\0'; else return -1;
-  } 
+  }
   else {
-    if (return_display) 
+    if (return_display)
       n = span_token_lws(s);
     else
       n = 0;
 
     if (s[n] == '<') {
       /* OK, we got a display name */
-      display = s; s += n + 1; 
+      display = s; s += n + 1;
       /* NUL terminate display name */
       while (n > 0 && IS_LWS(display[n - 1]))
 	n--;
       if (n > 0)
 	display[n] = '\0';
-      else 
+      else
 	display = "";
 
       n = strcspn(s, ">");
@@ -696,7 +696,7 @@
       /* addr-spec only */
       addr_spec = s;
       /**@sa
-       * Discussion about comma, semicolon and question mark in 
+       * Discussion about comma, semicolon and question mark in
        * @RFC3261 section 20.10.
        */
       if (return_params)
@@ -714,8 +714,8 @@
 
   if (return_display)
     *return_display = display;
-  
-  /* Now, url may still not be NUL terminated, e.g., if 
+
+  /* Now, url may still not be NUL terminated, e.g., if
    * it is like "Contact: url:foo,sip:bar,sip:zunk"
    */
   c = *s; *s = '\0';		/* terminate temporarily */
@@ -753,7 +753,7 @@
  * @param params   pointer to parameter list (may be NULL)
  * @param comment  comment string encoded after others (may be NULL)
  *
- * @return 
+ * @return
  * Returns number of characters in encoding, excluding the
  * final NUL.
  *
@@ -761,9 +761,9 @@
  * The encoding result may be incomplete if the buffer size is not large
  * enough to store the whole encoding result.
  */
-issize_t sip_name_addr_e(char b[], isize_t bsiz, 
-			 int flags, 
-			 char const *display, 
+issize_t sip_name_addr_e(char b[], isize_t bsiz,
+			 int flags,
+			 char const *display,
 			 int brackets, url_t const url[],
 			 msg_param_t const params[],
 			 char const *comment)
@@ -772,8 +772,8 @@
   char const *u;
   char *b0 = b, *end = b + bsiz;
 
-  brackets = brackets || display || 
-    (url && (url->url_params || 
+  brackets = brackets || display ||
+    (url && (url->url_params ||
 	     url->url_headers ||
 	     ((u = url->url_user) && u[strcspn(u, ";,?")]) ||
 	     ((u = url->url_password) && u[strcspn(u, ",")])));
@@ -798,7 +798,7 @@
   }
 
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 
@@ -867,12 +867,12 @@
 {
   sip_addr_t *a = (sip_addr_t *)h;
   char const *comment = NULL;
-  if (sip_name_addr_d(home, 
-		      &s, 
-		      &a->a_display, 
-		      a->a_url, 
+  if (sip_name_addr_d(home,
+		      &s,
+		      &a->a_display,
+		      a->a_url,
 		      &a->a_params,
-		      &comment) == -1 
+		      &comment) == -1
       || *s /* XXX - something extra? */)
     return -1;
 
@@ -887,7 +887,7 @@
 
   return sip_name_addr_e(b, bsiz,
 			 flags,
-			 a->a_display, 
+			 a->a_display,
 			 MSG_IS_CANONIC(flags), a->a_url,
 			 a->a_params,
 			 NULL);
@@ -909,7 +909,7 @@
 {
   sip_addr_t const *a = (sip_addr_t const *)h;
 
-  return sip_name_addr_xtra(a->a_display, 
+  return sip_name_addr_xtra(a->a_display,
 			    a->a_url,
 			    a->a_params,
 			    offset);
@@ -955,7 +955,7 @@
   sip_header_t *h;
 
   n = url_xtra(us->us_url);
-  h = sip_header_alloc(home, hc, n);    
+  h = sip_header_alloc(home, hc, n);
 
   if (h) {
     sip_addr_t *a = (sip_to_t *)h;
@@ -1009,7 +1009,7 @@
  * The @b Call-ID header uniquely identifies a particular invitation or all
  * registrations of a particular client. It is defined in @RFC3261 as
  * follows:
- * 
+ *
  * @code
  *    Call-ID  =  ( "Call-ID" / "i" ) HCOLON callid
  *    callid   =  word [ "@" word ]
@@ -1042,16 +1042,16 @@
 static msg_dup_f sip_call_id_dup_one;
 #define sip_call_id_update NULL
 
-msg_hclass_t sip_call_id_class[] = 
+msg_hclass_t sip_call_id_class[] =
 SIP_HEADER_CLASS(call_id, "Call-ID", "i", i_common, single, call_id);
 
 issize_t sip_call_id_d(su_home_t *home,
 		       sip_header_t *h,
-		       char *s, 
+		       char *s,
 		       isize_t slen)
 {
   sip_call_id_t *i = (sip_call_id_t *)h;
-  
+
   i->i_id = s; /* XXX - why not sip_word_at_word_d(&s); */
   i->i_hash = msg_hash_string(s);
 
@@ -1106,7 +1106,7 @@
 
 /**@ingroup sip_call_id
  *
- * Create a @CallID header object. 
+ * Create a @CallID header object.
  *
  * Create a Call-ID header object with a new unique value. It uses
  * su_guid_generate() function to generate the value. If the local host name
@@ -1127,7 +1127,7 @@
   size_t xtra = su_guid_strlen + 1 + (domain ? strlen(domain) + 1 : 0);
 
   i = (sip_call_id_t *)sip_header_alloc(home, sip_call_id_class, xtra);
-  
+
   if (i) {
     char *b;
     su_guid_t guid[1];
@@ -1158,11 +1158,11 @@
 
 /* ====================================================================== */
 
-/**@SIP_HEADER sip_cseq CSeq Header 
+/**@SIP_HEADER sip_cseq CSeq Header
  *
  * The CSeq header (command sequence) uniquely identifies transactions
  * within a dialog.  It is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    CSeq              =  "CSeq" HCOLON 1*DIGIT LWS Method
  *    Method            =  INVITEm / ACKm / OPTIONSm / BYEm
@@ -1195,7 +1195,7 @@
 static msg_dup_f sip_cseq_dup_one;
 #define sip_cseq_update NULL
 
-msg_hclass_t sip_cseq_class[] = 
+msg_hclass_t sip_cseq_class[] =
 SIP_HEADER_CLASS(cseq, "CSeq", "", cs_common, single, cseq);
 
 issize_t sip_cseq_d(su_home_t *home,
@@ -1253,9 +1253,9 @@
   return b;
 }
 
-/**@ingroup sip_cseq 
+/**@ingroup sip_cseq
  *
- * Create a @CSeq header object. 
+ * Create a @CSeq header object.
  *
  * Create a @CSeq header object with the
  * sequence number @a seq, method enum @a method and method name @a
@@ -1295,7 +1295,7 @@
   xtra = (method ? 0 : (strlen(method_name) + 1));
 
   cs = (sip_cseq_t *)sip_header_alloc(home, sip_cseq_class, xtra);
-  
+
   if (cs) {
     cs->cs_seq = seq;
     cs->cs_method = method;
@@ -1312,7 +1312,7 @@
  *
  * The Contact header contain a list of URLs used to redirect future
  * requests.  Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Contact            =  ("Contact" / "m" ) HCOLON
  *                          ( STAR / (contact-param *(COMMA contact-param)))
@@ -1351,10 +1351,10 @@
  *   char const         *m_comment;     // Comment
  *
  *   char const         *m_q;           // Priority
- *   char const         *m_expires;     // Expiration time 
+ *   char const         *m_expires;     // Expiration time
  * } sip_contact_t;
  * @endcode
- * 
+ *
  * @note The <comment> field @ref sip_contact_s::m_comment "m_comment" is
  * deprecated: it is parsed but not included in encoding.
  */
@@ -1398,7 +1398,7 @@
   while (*s == ',')   /* Ignore empty entries (comma-whitespace) */
     *s = '\0', s += span_lws(s + 1) + 1;
 
-  if (sip_name_addr_d(home, &s, &m->m_display, m->m_url, 
+  if (sip_name_addr_d(home, &s, &m->m_display, m->m_url,
 		      &m->m_params, &m->m_comment) == -1)
     return -1;
 
@@ -1414,7 +1414,7 @@
   assert(sip_is_contact(h));
 
   return sip_name_addr_e(b, bsiz, flags,
-			 m->m_display, always_lt_gt, m->m_url, 
+			 m->m_display, always_lt_gt, m->m_url,
 			 m->m_params,
 			 NULL /* m->m_comment */);
 }
@@ -1446,7 +1446,7 @@
 }
 
 /** Update parameter in #sip_contact_t */
-static int sip_contact_update(msg_common_t *h, 
+static int sip_contact_update(msg_common_t *h,
 			      char const *name, isize_t namelen,
 			      char const *value)
 {
@@ -1460,7 +1460,7 @@
     /* XXX - check for invalid value? */
     m->m_q = value;
   }
-  else if (namelen == strlen("expires") && 
+  else if (namelen == strlen("expires") &&
 	   !strncasecmp(name, "expires", namelen)) {
     m->m_expires = value;
   }
@@ -1468,7 +1468,7 @@
   return 0;
 }
 
-/**@ingroup sip_contact 
+/**@ingroup sip_contact
  *
  * Add a parameter to a @Contact header object
  *
@@ -1524,8 +1524,8 @@
  * @endcode
  */
 
-msg_hclass_t sip_content_length_class[] = 
-SIP_HEADER_CLASS(content_length, "Content-Length", "l", l_common, 
+msg_hclass_t sip_content_length_class[] =
+SIP_HEADER_CLASS(content_length, "Content-Length", "l", l_common,
 		 single_critical, any);
 
 issize_t sip_content_length_d(su_home_t *home,
@@ -1547,9 +1547,9 @@
   return snprintf(b, bsiz, "%lu", (unsigned long)l->l_length);
 }
 
-/**@ingroup sip_content_length 
+/**@ingroup sip_content_length
  *
- * Create a @ContentLength header object. 
+ * Create a @ContentLength header object.
  *
  * Create a @ContentLength
  * header object with the value @a n.  The memory for the header is
@@ -1566,7 +1566,7 @@
 {
   sip_content_length_t *l = (sip_content_length_t *)
     sip_header_alloc(home, sip_content_length_class, 0);
-  
+
   if (l)
     l->l_length = n;
 
@@ -1580,7 +1580,7 @@
  * The Date header field reflects the time when the request or response was
  * first sent.  Its syntax is defined in @RFC3261 and @RFC2616 section 14.18 as
  * follows:
- * 
+ *
  * @code
  *    Date          =  "Date" HCOLON SIP-date
  *    SIP-date      =  rfc1123-date
@@ -1614,7 +1614,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_date_class[] = 
+msg_hclass_t sip_date_class[] =
 SIP_HEADER_CLASS(date, "Date", "", d_common, single, any);
 
 issize_t sip_date_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -1635,7 +1635,7 @@
 }
 
 /**@ingroup sip_date
- * @brief Create an @Date header object. 
+ * @brief Create an @Date header object.
  *
  * Create a @Date header object with
  * the date @a date.  If @date is 0, current time (as returned by sip_now())
@@ -1651,7 +1651,7 @@
 sip_date_t *sip_date_create(su_home_t *home, sip_time_t date)
 {
   sip_date_t *d = (sip_date_t *)sip_header_alloc(home, sip_date_class, 0);
-  
+
   if (d) {
     if (date == 0)
       date = sip_now();
@@ -1667,11 +1667,11 @@
  *
  * The Expires header field gives the date and time after which the message
  * content expires.  Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Expires     =  "Expires" HCOLON delta-seconds
  * @endcode
- * 
+ *
  * Note that the first SIP revision (@RFC2543) also allowed absolute time in
  * Expires.
  *
@@ -1695,15 +1695,15 @@
  * @endcode
  */
 
-msg_hclass_t sip_expires_class[] = 
+msg_hclass_t sip_expires_class[] =
 SIP_HEADER_CLASS(expires, "Expires", "", ex_common, single, any);
 
 issize_t sip_expires_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
 {
   sip_expires_t *expires = (sip_expires_t *)h;
 
-  if (msg_date_delta_d((char const **)&s, 
-		       &expires->ex_date, 
+  if (msg_date_delta_d((char const **)&s,
+		       &expires->ex_date,
 		       &expires->ex_delta) < 0 || *s)
     return -1;
   else
@@ -1721,7 +1721,7 @@
 }
 
 /**@ingroup sip_expires
- * @brief Create an @Expires header object. 
+ * @brief Create an @Expires header object.
  *
  * Create an @Expires header object with the expiration time @a delta.
  *
@@ -1749,7 +1749,7 @@
  *
  * The From header indicates the initiator of the request.  It is defined in
  * @RFC3261 as follows:
- * 
+ *
  * @code
  *    From        =  ( "From" / "f" ) HCOLON from-spec
  *    from-spec   =  ( name-addr / addr-spec )
@@ -1776,13 +1776,13 @@
  *   url_t              a_url[1];       // URL
  *   msg_param_t const *a_params;       // List of from-param
  *   char const        *a_comment;      // Comment
- *   char const        *a_tag;          // Tag parameter 
+ *   char const        *a_tag;          // Tag parameter
  * } sip_from_t;
  * @endcode
  *
  */
 
-msg_hclass_t sip_from_class[] = 
+msg_hclass_t sip_from_class[] =
 SIP_HEADER_CLASS(from, "From", "f", a_params, single, addr);
 
 issize_t sip_from_d(su_home_t *home,
@@ -1844,10 +1844,10 @@
  * be provided either as a single token ("deadbeer") or as in parameter form
  * ("tag=deadbeer"). In both cases the tag is duplicated using the memory
  * home @a home.
- * 
- * @param home memory home used to allocate new tag 
+ *
+ * @param home memory home used to allocate new tag
  * @param from @From header to modify
- * @param tag  tag token or parameter to be added 
+ * @param tag  tag token or parameter to be added
  *
  * @retval 0 when successful
  * @retval -1 upon an error.
@@ -1870,7 +1870,7 @@
  * The Max-Forwards header is used to limit the number of proxies or
  * gateways that can forward the request.  The Max-Forwards syntax is
  * defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Max-Forwards  =  "Max-Forwards" HCOLON 1*DIGIT
  * @endcode
@@ -1895,8 +1895,8 @@
  * @endcode
  */
 
-msg_hclass_t sip_max_forwards_class[] = 
-SIP_HEADER_CLASS(max_forwards, "Max-Forwards", "", mf_common, 
+msg_hclass_t sip_max_forwards_class[] =
+SIP_HEADER_CLASS(max_forwards, "Max-Forwards", "", mf_common,
 		 single, any);
 
 issize_t sip_max_forwards_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -1917,7 +1917,7 @@
  * The Min-Expires header is used to limit the number of proxies or
  * gateways that can forward the request.  The Min-Expires syntax is
  * defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Min-Expires  =  "Min-Expires" HCOLON delta-seconds
  * @endcode
@@ -1941,8 +1941,8 @@
  * @endcode
  */
 
-msg_hclass_t sip_min_expires_class[] = 
-SIP_HEADER_CLASS(min_expires, "Min-Expires", "", me_common, 
+msg_hclass_t sip_min_expires_class[] =
+SIP_HEADER_CLASS(min_expires, "Min-Expires", "", me_common,
 		 single, any);
 
 issize_t sip_min_expires_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -1960,12 +1960,12 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_retry_after Retry-After Header
- * 
+ *
  * The Retry-After response-header field @RFC3261 section 20.33 can be used to
  * indicate how long the service is expected to be unavailable or when the
  * called party anticipates being available again. Its syntax is defined in
  * @RFC3261 as follows:
- * 
+ *
  * @code
  *      Retry-After  =  "Retry-After" HCOLON delta-seconds
  *                      [ comment ] *( SEMI retry-param )
@@ -1977,9 +1977,9 @@
  */
 
 /**@ingroup sip_retry_after
- * @typedef struct sip_retry_after_s sip_retry_after_t; 
+ * @typedef struct sip_retry_after_s sip_retry_after_t;
  *
- * The structure #sip_retry_after_t contains representation of an 
+ * The structure #sip_retry_after_t contains representation of an
  * @RetryAfter header.
  *
  * The #sip_retry_after_t is defined as follows:
@@ -1999,7 +1999,7 @@
 static msg_dup_f sip_retry_after_dup_one;
 static msg_update_f sip_retry_after_update;
 
-msg_hclass_t sip_retry_after_class[] = 
+msg_hclass_t sip_retry_after_class[] =
 SIP_HEADER_CLASS(retry_after, "Retry-After", "", af_params, single,
 		 retry_after);
 
@@ -2031,7 +2031,7 @@
   b += snprintf(b, bsiz, "%lu", af->af_delta);
 
   if (af->af_comment) {
-    if (!compact) 
+    if (!compact)
       MSG_CHAR_E(b, end, ' ');
     MSG_CHAR_E(b, end, '(');
     MSG_STRING_E(b, end, af->af_comment);
@@ -2042,9 +2042,9 @@
 
   if (af->af_params)
     MSG_PARAMS_E(b, end, af->af_params, f);
-    
+
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 
@@ -2098,7 +2098,7 @@
 
 /**Parse a @Route or a @RecordRoute header.
  *
- * @retval 0 when successful, 
+ * @retval 0 when successful,
  * @retval -1 upon an error.
  */
 issize_t sip_any_route_d(su_home_t *home,
@@ -2113,7 +2113,7 @@
   while (*s == ',')   /* Ignore empty entries (comma-whitespace) */
     *s = '\0', s += span_lws(s + 1) + 1;
 
-  if (sip_name_addr_d(home, &s, &r->r_display, 
+  if (sip_name_addr_d(home, &s, &r->r_display,
 		      r->r_url, &r->r_params, NULL) < 0)
     return -1;
 
@@ -2124,14 +2124,14 @@
 {
   sip_route_t const *r = (sip_route_t *)h;
 
-  return sip_name_addr_e(b, bsiz, flags, 
+  return sip_name_addr_e(b, bsiz, flags,
 			 r->r_display, 1, r->r_url, r->r_params, NULL);
 }
 
 isize_t sip_any_route_dup_xtra(sip_header_t const *h, isize_t offset)
 {
   sip_route_t const *r = (sip_route_t *)h;
-  return sip_name_addr_xtra(r->r_display, 
+  return sip_name_addr_xtra(r->r_display,
 			    r->r_url,
 			    r->r_params,
 			    offset);
@@ -2152,7 +2152,7 @@
 #define sip_any_route_update NULL
 
 
-/** Create a route. 
+/** Create a route.
  *
  * Create a route or record-route entry
  * from two URLs; first one provides the URL, second maddr parameter and
@@ -2170,8 +2170,8 @@
 {
   sip_header_t *h;
   sip_route_t *rr;
-  url_t url[1]; 
-  size_t xtra, n, n_url, n_params, n_addr; 
+  url_t url[1];
+  size_t xtra, n, n_url, n_params, n_addr;
   char *b, *param;
 
   *url = *rq_url;
@@ -2183,10 +2183,10 @@
 
   n_params = maddr && maddr->url_params ? strlen(maddr->url_params) : 0;
 
-  if (maddr && (!maddr->url_params || 
+  if (maddr && (!maddr->url_params ||
 		!url_param(maddr->url_params, "maddr", NULL, 0)))
     n_addr = (n_params != 0) + strlen("maddr=") + strlen(maddr->url_host);
-  else 
+  else
     n_addr = 0;
 
   xtra = n_url + n_params + n_addr + (n_params || n_addr);
@@ -2220,9 +2220,9 @@
 
 /**@SIP_HEADER sip_route Route Header
  *
- * The Route headers is used to store the route set of a transaction.  
+ * The Route headers is used to store the route set of a transaction.
  * The Route header is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Route        =  "Route" HCOLON route-param *(COMMA route-param)
  *    route-param  =  name-addr *( SEMI rr-param )
@@ -2248,7 +2248,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_route_class[] = 
+msg_hclass_t sip_route_class[] =
 SIP_HEADER_CLASS(route, "Route", "", r_params, append, any_route);
 
 issize_t sip_route_d(su_home_t *home,
@@ -2265,7 +2265,7 @@
   return sip_any_route_e(b, bsiz, h, flags);
 }
 
-/**@ingroup sip_route 
+/**@ingroup sip_route
  * @brief Create a @Route header object.
  *
  * Creates a route entry from two URLs; first one provides the URL, second
@@ -2279,11 +2279,11 @@
  * Returns a pointer to newly created @Route header object when successful,
  * or NULL upon an error.
  */
-sip_route_t *sip_route_create(su_home_t *home, 
-			      url_t const *url, 
+sip_route_t *sip_route_create(su_home_t *home,
+			      url_t const *url,
 			      url_t const *maddr)
 {
-  return sip_any_route_create(home, sip_route_class, url, maddr);  
+  return sip_any_route_create(home, sip_route_class, url, maddr);
 }
 
 /* ====================================================================== */
@@ -2292,8 +2292,8 @@
  *
  * The Record-Route headers are used to establish a route for transactions
  * belonging to a session.  The Record-Route header is defined in @RFC3261
- * as follows: 
- * 
+ * as follows:
+ *
  * @code
  *    Record-Route  =  "Record-Route" HCOLON rec-route *(COMMA rec-route)
  *    rec-route     =  name-addr *( SEMI rr-param )
@@ -2321,7 +2321,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_record_route_class[] = 
+msg_hclass_t sip_record_route_class[] =
 SIP_HEADER_CLASS(record_route, "Record-Route", "",
 		 r_params, prepend, any_route);
 
@@ -2339,9 +2339,9 @@
   return sip_any_route_e(b, bsiz, h, flags);
 }
 
-/** @ingroup sip_record_route 
+/** @ingroup sip_record_route
  *
- * Create a record-route. 
+ * Create a record-route.
  *
  * Create a record-route entry from two URLs; first one provides the URL,
  * second maddr parameter and port.
@@ -2367,7 +2367,7 @@
  *
  * The To header field specifies the "logical" recipient of the
  * request.  It is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    To        =  ( "To" / "t" ) HCOLON ( name-addr
  *                 / addr-spec ) *( SEMI to-param )
@@ -2391,13 +2391,13 @@
  *   url_t              a_url[1];       // URL
  *   msg_param_t const *a_params;       // List of to-params
  *   char const        *a_comment;      // Comment
- *   char const        *a_tag;          // Tag parameter 
+ *   char const        *a_tag;          // Tag parameter
  * } sip_to_t;
  * @endcode
  *
  */
 
-msg_hclass_t sip_to_class[] = 
+msg_hclass_t sip_to_class[] =
 SIP_HEADER_CLASS(to, "To", "t", a_params, single, addr);
 
 issize_t sip_to_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -2458,7 +2458,7 @@
  * headers can be used to prevent request looping and ensure replies take
  * the same path as the requests.  The Via syntax is defined in @RFC3261
  * as follows:
- * 
+ *
  * @code
  *    Via               =  ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
  *    via-parm          =  sent-protocol LWS sent-by *( SEMI via-params )
@@ -2514,7 +2514,7 @@
  *   char const         *v_port;        // Port number
  *   msg_param_t const  *v_params;      // List of via-params
  *   char const         *v_comment;     // Comment
- * 
+ *
  *   char const         *v_ttl;         // "ttl" parameter
  *   char const         *v_maddr;       // "maddr" parameter
  *   char const         *v_received;    // "received" parameter
@@ -2529,7 +2529,7 @@
 static msg_dup_f sip_via_dup_one;
 static msg_update_f sip_via_update;
 
-msg_hclass_t sip_via_class[] = 
+msg_hclass_t sip_via_class[] =
 SIP_HEADER_CLASS(via, "Via", "v", v_params, prepend, via);
 
 issize_t sip_via_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -2570,14 +2570,14 @@
   MSG_CHAR_E(b, end, ' ');
   MSG_STRING_E(b, end, v->v_host);
   if (v->v_port) {
-    MSG_CHAR_E(b, end, ':');	
+    MSG_CHAR_E(b, end, ':');
     MSG_STRING_E(b, end, v->v_port);
   }
   MSG_PARAMS_E(b, end, v->v_params, flags);
 #if 0
   /* Comment is deprecated in @RFC3265 - accept it, but do not send */
   if (v->v_comment) {
-    if (!MSG_IS_COMPACT(flags)) 
+    if (!MSG_IS_COMPACT(flags))
       MSG_CHAR_E(b, end, ' ');
     MSG_CHAR_E(b, end, '(');
     MSG_STRING_E(b, end, v->v_comment);
@@ -2585,7 +2585,7 @@
   }
 #endif
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 
@@ -2602,7 +2602,7 @@
   return offset;
 }
 
-/** Duplicate one #sip_via_t object */ 
+/** Duplicate one #sip_via_t object */
 char *sip_via_dup_one(sip_header_t *dst, sip_header_t const *src,
 		      char *b, isize_t xtra)
 {
@@ -2621,7 +2621,7 @@
   return b;
 }
 
-static int sip_via_update(msg_common_t *h, 
+static int sip_via_update(msg_common_t *h,
 			  char const *name, isize_t namelen,
 			  char const *value)
 {
@@ -2685,7 +2685,7 @@
 
 /**@ingroup sip_via
  *
- * Create a @Via object. 
+ * Create a @Via object.
  *
  * Create a new @Via header object with
  * given parameters.  If @a transport is NULL, the default transport
@@ -2701,10 +2701,10 @@
  * @return
  * A pointer to newly created
  * @Via header object when successful or NULL upon an error.
- */ 
+ */
 sip_via_t *sip_via_create(su_home_t *home,
                           char const *host,
-                          char const *port, 
+                          char const *port,
                           char const *transport,
                           /* char const *params */
                           ...)
@@ -2728,8 +2728,8 @@
     char const *param;
     va_start(params, transport);
 
-    for (param = va_arg(params, char const *); 
-         param; 
+    for (param = va_arg(params, char const *);
+         param;
          param = va_arg(params, char const *)) {
       if ((param = su_strdup(home, param))) {
 	if (msg_header_replace_param(home, v->v_common, param) < 0)
@@ -2746,7 +2746,7 @@
 /**@ingroup sip_via
  *
  * Get port number corresponding to a @Via line.
- * 
+ *
  * If @a using_rport is non-null, try rport.
  * If *using_rport is non-zero, try rport even if <protocol> is not UDP.
  * If <protocol> is UDP, set *using_rport to zero.
@@ -2760,7 +2760,7 @@
     char const *port;
 
     if (v->v_rport && !v->v_maddr /* multicast */) {
-      if (v->v_protocol == sip_transport_udp || 
+      if (v->v_protocol == sip_transport_udp ||
 	  strcasecmp(v->v_protocol, sip_transport_udp) == 0)
 	port = v->v_rport, *using_rport = 0;
       else if (*using_rport)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_caller_prefs.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_caller_prefs.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_caller_prefs.c	Tue Dec 16 13:05:22 2008
@@ -70,14 +70,14 @@
  * @endcode
  *
  *
- * The parsed Request-Disposition header 
+ * The parsed Request-Disposition header
  * is stored in #sip_request_disposition_t structure.
  */
 
 /**@ingroup sip_request_disposition
  * @typedef typedef struct sip_request_disposition_s sip_request_disposition_t;
  *
- * The structure #sip_request_disposition_t contains representation of 
+ * The structure #sip_request_disposition_t contains representation of
  * @RequestDisposition header.
  *
  * The #sip_request_disposition_t is defined as follows:

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_event.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_event.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_event.c	Tue Dec 16 13:05:22 2008
@@ -56,7 +56,7 @@
  * The Event header is used to indicate the which event or class of events
  * the message contains or subscribes. Its syntax is defined in @RFC3265 as
  * follows:
- * 
+ *
  * @code
  *   Event             =  ( "Event" / "o" ) HCOLON event-type
  *                         *( SEMI event-param )
@@ -72,7 +72,7 @@
  */
 
 /**@ingroup sip_event
- * @typedef struct sip_event_s sip_event_t; 
+ * @typedef struct sip_event_s sip_event_t;
  *
  * The structure #sip_event_t contains representation of an @Event header.
  *
@@ -93,7 +93,7 @@
 static msg_dup_f sip_event_dup_one;
 static msg_update_f sip_event_update;
 
-msg_hclass_t sip_event_class[] = 
+msg_hclass_t sip_event_class[] =
 SIP_HEADER_CLASS(event, "Event", "o", o_params, single, event);
 
 issize_t sip_event_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -134,7 +134,7 @@
   return offset;
 }
 
-/** Duplicate one #sip_event_t object */ 
+/** Duplicate one #sip_event_t object */
 char *sip_event_dup_one(sip_header_t *dst, sip_header_t const *src,
 			char *b, isize_t xtra)
 {
@@ -150,7 +150,7 @@
 }
 
 /** Update parameters in @Event header. */
-static int sip_event_update(msg_common_t *h, 
+static int sip_event_update(msg_common_t *h,
 			   char const *name, isize_t namelen,
 			   char const *value)
 {
@@ -173,9 +173,9 @@
  * The Allow-Events header is used to indicate which events or classes of
  * events the notifier supports. Its syntax is defined in @RFC3265 as
  * follows:
- * 
+ *
  * @code
- *    Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type 
+ *    Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type
  *                                           *(COMMA event-type)
  * @endcode
  *
@@ -190,9 +190,9 @@
  */
 
 /**@ingroup sip_allow_events
- * @typedef struct msg_list_s sip_allow_events_t; 
+ * @typedef struct msg_list_s sip_allow_events_t;
  *
- * The structure #sip_allow_events_t contains representation of an 
+ * The structure #sip_allow_events_t contains representation of an
  * @AllowEvents header.
  *
  * The #sip_allow_events_t is defined as follows:
@@ -206,7 +206,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_allow_events_class[] = 
+msg_hclass_t sip_allow_events_class[] =
 SIP_HEADER_CLASS_LIST(allow_events, "Allow-Events", "u", list);
 
 issize_t sip_allow_events_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -220,14 +220,14 @@
   return msg_list_e(b, bsiz, h, f);
 }
 
-/** Append an event to a @AllowEvents header. 
+/** Append an event to a @AllowEvents header.
  *
  * @note This function @b does @b duplicate @p event.
  *
  * @deprecated Use msg_header_replace_item() directly.
  */
-int sip_allow_events_add(su_home_t *home, 
-			 sip_allow_events_t *ae, 
+int sip_allow_events_add(su_home_t *home,
+			 sip_allow_events_t *ae,
 			 char const *event)
 {
   event = su_strdup(home, event);
@@ -243,7 +243,7 @@
  * The Subscription-State header is used to indicate in which state a
  * subscription is. Its syntax is defined in @RFC3265 section 4.2.4 as
  * follows:
- * 
+ *
  * @code
  *    Subscription-State   = "Subscription-State" HCOLON substate-value
  *                           *( SEMI subexp-params )
@@ -271,7 +271,7 @@
 /**@ingroup sip_subscription_state
  * @typedef struct sip_subscription_state_s sip_subscription_state_t;
  *
- * The structure #sip_subscription_state_t contains representation of an 
+ * The structure #sip_subscription_state_t contains representation of an
  * @SubscriptionState header.
  *
  * The #sip_subscription_state_t is defined as follows:
@@ -281,9 +281,9 @@
  *   sip_common_t       ss_common[1];
  *   sip_unknown_t     *ss_next;
  *   // Subscription state: "pending", "active" or "terminated"
- *   char const        *ss_substate;        
+ *   char const        *ss_substate;
  *   msg_param_t const *ss_params;      // List of parameters
- *   char const        *ss_reason;      // Reason of terminating 
+ *   char const        *ss_reason;      // Reason of terminating
  *   char const        *ss_expires;     // Subscription lifetime in seconds
  *   char const        *ss_retry_after; // Value of retry-after parameter
  * } sip_subscription_state_t;
@@ -294,24 +294,24 @@
 static msg_dup_f sip_subscription_state_dup_one;
 static msg_update_f sip_subscription_state_update;
 
-msg_hclass_t sip_subscription_state_class[] = 
-SIP_HEADER_CLASS(subscription_state, "Subscription-State", "", 
-		 ss_params, single, 
+msg_hclass_t sip_subscription_state_class[] =
+SIP_HEADER_CLASS(subscription_state, "Subscription-State", "",
+		 ss_params, single,
 		 subscription_state);
 
-issize_t sip_subscription_state_d(su_home_t *home, sip_header_t *h, 
+issize_t sip_subscription_state_d(su_home_t *home, sip_header_t *h,
 				  char *s, isize_t slen)
 {
    sip_subscription_state_t *ss = h->sh_subscription_state;
    ss->ss_substate = s;
-   
+
    s += span_token(s); /* forwards the pointer to the end of substate-value */
    if (s == ss->ss_substate)
      return -1;
-   if (IS_LWS(*s)) { 
+   if (IS_LWS(*s)) {
      *s = '\0'; s += span_lws(s + 1) + 1;
    }
-   
+
    /* check if parameters are present and if so parse them */
    if (*s  == ';') {
      if ( msg_params_d(home, &s, &ss->ss_params) < 0)
@@ -327,34 +327,34 @@
 {
   char *end = b + bsiz, *b0 = b;
   sip_subscription_state_t const *ss = h->sh_subscription_state;
-   
+
   assert(sip_is_subscription_state(h));
-   
+
   MSG_STRING_E(b, end, ss->ss_substate);
-  MSG_PARAMS_E(b, end, ss->ss_params, flags);   
+  MSG_PARAMS_E(b, end, ss->ss_params, flags);
 
-  return b - b0;   
+  return b - b0;
 }
 
 isize_t sip_subscription_state_dup_xtra(sip_header_t const *h, isize_t offset)
 {
    sip_subscription_state_t const *ss = h->sh_subscription_state;
-   
+
    /* Calculates memory size occupied */
    MSG_PARAMS_SIZE(offset, ss->ss_params);
    offset += MSG_STRING_SIZE(ss->ss_substate);
-   
-   return offset;   
+
+   return offset;
 }
 
-/** Duplicate one #sip_subscription_state_t object */ 
+/** Duplicate one #sip_subscription_state_t object */
 char *sip_subscription_state_dup_one(sip_header_t *dst, sip_header_t const *src,
 				     char *b, isize_t xtra)
 {
   sip_subscription_state_t *ss_dst = dst->sh_subscription_state;
   sip_subscription_state_t const *ss_src = src->sh_subscription_state;
   char *end = b + xtra;
-   
+
   b = msg_params_dup(&ss_dst->ss_params, ss_src->ss_params, b, xtra);
   MSG_STRING_DUP(b, ss_dst->ss_substate, ss_src->ss_substate);
   assert(b <= end); (void)end;
@@ -362,7 +362,7 @@
   return b;
 }
 
-static int sip_subscription_state_update(msg_common_t *h, 
+static int sip_subscription_state_update(msg_common_t *h,
 					 char const *name, isize_t namelen,
 					 char const *value)
 {
@@ -399,7 +399,7 @@
  * The Publication header is used to indicate the which publication or class
  * of publications the message contains. Its syntax is defined
  * in (draft-niemi-simple-publish-00.txt) as follows:
- * 
+ *
  * @code
  *   Publication          =  ( "Publication") HCOLON publish-package
  *                         *( SEMI publish-param )
@@ -418,7 +418,7 @@
 /**@ingroup sip_publication
  * @brief Structure for Publication header.
  */
-struct sip_publication_s 
+struct sip_publication_s
 {
   sip_common_t        pub_common;	    /**< Common fragment info */
   sip_error_t        *pub_next;	            /**< Link to next (dummy) */
@@ -431,8 +431,8 @@
 static msg_xtra_f sip_publication_dup_xtra;
 static msg_dup_f sip_publication_dup_one;
 
-msg_hclass_t sip_publication_class[] = 
-SIP_HEADER_CLASS(publication, "Publication", "", pub_params, single, 
+msg_hclass_t sip_publication_class[] =
+SIP_HEADER_CLASS(publication, "Publication", "", pub_params, single,
 		 publication);
 
 su_inline void sip_publication_update(sip_publication_t *pub);
@@ -475,7 +475,7 @@
   return offset;
 }
 
-/** Duplicate one #sip_publication_t object */ 
+/** Duplicate one #sip_publication_t object */
 char *sip_publication_dup_one(sip_header_t *dst, sip_header_t const *src,
 			char *b, isize_t xtra)
 {
@@ -512,9 +512,9 @@
  * The Allow-Publication header is used to indicate which publications or classes of
  * publications the server supports.  Its syntax is defined in [niemi]
  * (draft-niemi-simple-publish-00.txt) as follows:
- * 
+ *
  * @code
- *   Allow-Publications   = "Allow-Publications" HCOLON publish-type 
+ *   Allow-Publications   = "Allow-Publications" HCOLON publish-type
  *                          * ( COMMA publish-type )
  * @endcode
  *
@@ -523,7 +523,7 @@
  * is stored in #sip_allow_publications_t structure.
  */
 
-msg_hclass_t sip_allow_publications_class[] = 
+msg_hclass_t sip_allow_publications_class[] =
 SIP_HEADER_CLASS_LIST(allow_publications, "Allow-Publications", "", list);
 
 issize_t sip_allow_publications_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -538,8 +538,8 @@
 }
 
 /** Append an publication to a Allow-Publications header. */
-int sip_allow_publications_add(su_home_t *home, 
-			       sip_allow_publications_t *ae, 
+int sip_allow_publications_add(su_home_t *home,
+			       sip_allow_publications_t *ae,
 			       char const *e)
 {
   e = su_strdup(home, e);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra.c	Tue Dec 16 13:05:22 2008
@@ -24,13 +24,13 @@
 
 /**@CFILE sip_extra.c
  * @brief Non-critical SIP headers
- * 
+ *
  * This file contains implementation of @CallInfo, @ErrorInfo,
  * @Organization, @Priority, @RetryAfter, @Server, @Subject,
  * @Timestamp, and @UserAgent headers.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
- * 
+ *
  * @date Created: Tue Jun 13 02:57:51 2000 ppessi
  */
 
@@ -66,17 +66,17 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_call_info Call-Info Header
- * 
+ *
  * The Call-Info header provides additional information about the caller or
  * callee. Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Call-Info   =  "Call-Info" HCOLON info *(COMMA info)
  *    info        =  LAQUOT absoluteURI RAQUOT *( SEMI info-param)
  *    info-param  =  ( "purpose" EQUAL ( "icon" / "info"
  *                   / "card" / token ) ) / generic-param
  * @endcode
- * 
+ *
  *
  * The parsed Call-Info header is stored in #sip_call_info_t structure.
  */
@@ -84,7 +84,7 @@
 /**@ingroup sip_call_info
  * @typedef struct sip_call_info_s sip_call_info_t;
  *
- * The structure #sip_call_info_t contains representation of an 
+ * The structure #sip_call_info_t contains representation of an
  * @CallInfo header.
  *
  * The #sip_call_info_t is defined as follows:
@@ -130,10 +130,10 @@
 
 /** @internal
  * Update parameter in a @CallInfo object.
- * 
+ *
  */
 static
-int sip_call_info_update(msg_common_t *h, 
+int sip_call_info_update(msg_common_t *h,
 			  char const *name, isize_t namelen,
 			  char const *value)
 {
@@ -142,7 +142,7 @@
   if (name == NULL) {
     ci->ci_purpose = NULL;
   }
-  else if (namelen == strlen("purpose") && 
+  else if (namelen == strlen("purpose") &&
 	   !strncasecmp(name, "purpose", namelen)) {
     ci->ci_purpose = value;
   }
@@ -153,15 +153,15 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_error_info Error-Info Header
- * 
+ *
  * The Error-Info header provides a pointer to additional information about
  * the error status response. Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Error-Info  =  "Error-Info" HCOLON error-uri *(COMMA error-uri)
  *    error-uri   =  LAQUOT absoluteURI RAQUOT *( SEMI generic-param )
  * @endcode
- * 
+ *
  *
  * The parsed Error-Info header is stored in #sip_error_info_t structure.
  */
@@ -169,7 +169,7 @@
 /**@ingroup sip_error_info
  * @typedef struct sip_error_info_s sip_error_info_t;
  *
- * The structure #sip_error_info_t contains representation of an 
+ * The structure #sip_error_info_t contains representation of an
  * @ErrorInfo header.
  *
  * The #sip_error_info_t is defined as follows:
@@ -184,7 +184,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_error_info_class[] = 
+msg_hclass_t sip_error_info_class[] =
 SIP_HEADER_CLASS(error_info, "Error-Info", "",
 		 ei_params, append, info);
 
@@ -377,11 +377,11 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_in_reply_to In-Reply-To Header
- * 
- * The @b In-Reply-To request header field enumerates the 
+ *
+ * The @b In-Reply-To request header field enumerates the
  * @ref sip_call_id "Call-IDs" that this call references or returns.
  * Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    In-Reply-To  =  "In-Reply-To" HCOLON callid *(COMMA callid)
  * @endcode
@@ -392,8 +392,8 @@
 /**@ingroup sip_in_reply_to
  * @typedef struct msg_list_s sip_in_reply_to_t;
  *
- * The structure #sip_in_reply_to_t contains representation of SIP 
- * @InReplyTo header. 
+ * The structure #sip_in_reply_to_t contains representation of SIP
+ * @InReplyTo header.
  *
  * The #sip_in_reply_to_t is defined as follows:
  * @code
@@ -406,7 +406,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_in_reply_to_class[] = 
+msg_hclass_t sip_in_reply_to_class[] =
 SIP_HEADER_CLASS_LIST(in_reply_to, "In-Reply-To", "", list);
 
 issize_t sip_in_reply_to_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -423,23 +423,23 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_organization Organization Header
- * 
+ *
  * The Organization header field conveys the name of the organization to
  * which the entity issuing the request or response belongs. Its syntax is
  * defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Organization  =  "Organization" HCOLON [TEXT-UTF8-TRIM]
  * @endcode
- * 
+ *
  *
  * The parsed Organization header is stored in #sip_organization_t structure.
  */
 
 /**@ingroup sip_organization
- * @typedef struct msg_generic_s sip_organization_t; 
+ * @typedef struct msg_generic_s sip_organization_t;
  *
- * The structure #sip_organization_t contains representation of a SIP 
+ * The structure #sip_organization_t contains representation of a SIP
  * @Organization header.
  *
  * The #sip_organization_t is defined as follows:
@@ -453,7 +453,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_organization_class[] = 
+msg_hclass_t sip_organization_class[] =
 SIP_HEADER_CLASS_G(organization, "Organization", "", single);
 
 issize_t sip_organization_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -470,25 +470,25 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_priority Priority Header
- * 
+ *
  * The Priority request-header field indicates the urgency of the request as
  * perceived by the client. Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Priority        =  "Priority" HCOLON priority-value
  *    priority-value  =  "emergency" / "urgent" / "normal"
  *                       / "non-urgent" / other-priority
  *    other-priority  =  token
  * @endcode
- * 
+ *
  *
  * The parsed Priority header is stored in #sip_priority_t structure.
  */
 
 /**@ingroup sip_priority
- * @typedef struct msg_generic_s sip_priority_t; 
+ * @typedef struct msg_generic_s sip_priority_t;
  *
- * The structure #sip_priority_t contains representation of a SIP 
+ * The structure #sip_priority_t contains representation of a SIP
  * @Priority header.
  *
  * The #sip_priority_t is defined as follows:
@@ -502,13 +502,13 @@
  * @endcode
  */
 
-msg_hclass_t sip_priority_class[] = 
+msg_hclass_t sip_priority_class[] =
 SIP_HEADER_CLASS_G(priority, "Priority", "", single);
 
 issize_t sip_priority_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
 {
   sip_priority_t *priority = (sip_priority_t *)h;
-  
+
   if (msg_token_d(&s, &priority->g_string) < 0)
     return -1;
 
@@ -527,11 +527,11 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_server Server Header
- * 
+ *
  * The Server response-header field contains information about the software
  * used by the user agent server to handle the request. Its syntax is
  * defined in @RFC2616 section 14.38 and @RFC3261 as follows:
- * 
+ *
  * @code
  *    Server           =  "Server" HCOLON server-val *(LWS server-val)
  *    server-val       =  product / comment
@@ -543,9 +543,9 @@
  */
 
 /**@ingroup sip_server
- * @typedef struct msg_generic_s sip_server_t; 
+ * @typedef struct msg_generic_s sip_server_t;
  *
- * The structure #sip_server_t contains representation of a SIP 
+ * The structure #sip_server_t contains representation of a SIP
  * @Server header.
  *
  * The #sip_server_t is defined as follows:
@@ -559,7 +559,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_server_class[] = 
+msg_hclass_t sip_server_class[] =
 SIP_HEADER_CLASS_G(server, "Server", "", single);
 
 issize_t sip_server_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -576,21 +576,21 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_subject Subject Header
- * 
+ *
  * The Subject header provides a summary or indicates the nature of the
  * request. Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Subject  =  ( "Subject" / "s" ) HCOLON [TEXT-UTF8-TRIM]
  * @endcode
- * 
+ *
  * The parsed Subject header is stored in #sip_subject_t structure.
  */
 
 /**@ingroup sip_subject
- * @typedef struct msg_generic_s sip_subject_t; 
+ * @typedef struct msg_generic_s sip_subject_t;
  *
- * The structure #sip_subject_t contains representation of a SIP 
+ * The structure #sip_subject_t contains representation of a SIP
  * @Subject header.
  *
  * The #sip_subject_t is defined as follows:
@@ -604,7 +604,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_subject_class[] = 
+msg_hclass_t sip_subject_class[] =
 SIP_HEADER_CLASS_G(subject, "Subject", "s", single);
 
 issize_t sip_subject_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -621,24 +621,24 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_timestamp Timestamp Header
- * 
+ *
  * The @b Timestamp header describes when the client sent the request to the
  * server, and it is used by the client to adjust its retransmission
  * intervals. Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Timestamp  =  "Timestamp" HCOLON 1*(DIGIT)
  *                   [ "." *(DIGIT) ] [ LWS delay ]
  *    delay      =  *(DIGIT) [ "." *(DIGIT) ]
  * @endcode
- * 
+ *
  * The parsed Timestamp header is stored in #sip_timestamp_t structure.
  */
 
 /**@ingroup sip_timestamp
- * @typedef struct sip_timestamp_s sip_timestamp_t; 
+ * @typedef struct sip_timestamp_s sip_timestamp_t;
  *
- * The structure #sip_timestamp_t contains representation of a SIP 
+ * The structure #sip_timestamp_t contains representation of a SIP
  * @Timestamp header.
  *
  * The #sip_timestamp_t is defined as follows:
@@ -660,7 +660,7 @@
 				   isize_t xtra);
 #define sip_timestamp_update NULL
 
-msg_hclass_t sip_timestamp_class[] = 
+msg_hclass_t sip_timestamp_class[] =
 SIP_HEADER_CLASS(timestamp, "Timestamp", "", ts_common, single,
 		 timestamp);
 
@@ -669,7 +669,7 @@
   sip_timestamp_t *ts = (sip_timestamp_t*)h;
 
   ts->ts_stamp = s;
-  s += span_digit(s); 
+  s += span_digit(s);
   if (s == ts->ts_stamp)
     return -1;
   if (*s == '.') { s += span_digit(s + 1) + 1; }
@@ -685,7 +685,7 @@
     *s++ = '\0';
   else
     return -1;
-  
+
   return 0;
 }
 
@@ -703,7 +703,7 @@
   }
 
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 
@@ -739,25 +739,25 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_user_agent User-Agent Header
- * 
+ *
  * The User-Agent header contains information about the client user agent
  * originating the request. Its syntax is defined in [H14.43, S10.45] as
  * follows:
- * 
+ *
  * @code
  *    User-Agent       =  "User-Agent" HCOLON server-val *(LWS server-val)
  *    server-val       =  product / comment
  *    product          =  token [SLASH product-version]
  *    product-version  =  token
  * @endcode
- * 
+ *
  * The parsed User-Agent header is stored in #sip_user_agent_t structure.
  */
 
 /**@ingroup sip_user_agent
- * @typedef struct msg_generic_s sip_user_agent_t; 
+ * @typedef struct msg_generic_s sip_user_agent_t;
  *
- * The structure #sip_user_agent_t contains representation of a SIP 
+ * The structure #sip_user_agent_t contains representation of a SIP
  * @UserAgent header.
  *
  * The #sip_user_agent_t is defined as follows:
@@ -771,7 +771,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_user_agent_class[] = 
+msg_hclass_t sip_user_agent_class[] =
 SIP_HEADER_CLASS_G(user_agent, "User-Agent", "", single);
 
 issize_t sip_user_agent_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -788,10 +788,10 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_etag SIP-ETag Header
- * 
+ *
  * The @b SIP-ETag header field identifies the published event state. Its
  * syntax is defined in @RFC3903 as follows:
- * 
+ *
  * @code
  *      SIP-ETag           = "SIP-ETag" HCOLON entity-tag
  *      entity-tag         = token
@@ -801,9 +801,9 @@
  */
 
 /**@ingroup sip_etag
- * @typedef struct msg_generic_s sip_etag_t; 
+ * @typedef struct msg_generic_s sip_etag_t;
  *
- * The structure #sip_etag_t contains representation of a SIP 
+ * The structure #sip_etag_t contains representation of a SIP
  * @SIPETag header.
  *
  * The #sip_etag_t is defined as follows:
@@ -817,7 +817,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_etag_class[] = 
+msg_hclass_t sip_etag_class[] =
 SIP_HEADER_CLASS_G(etag, "SIP-ETag", "", single);
 
 issize_t sip_etag_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -835,11 +835,11 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_if_match SIP-If-Match Header
- * 
+ *
  * The @b SIP-If-Match header field identifies the specific entity of event
  * state that the request is refreshing, modifying or removing. Its syntax
  * is defined in @RFC3903 as follows:
- * 
+ *
  * @code
  *      SIP-If-Match       = "SIP-If-Match" HCOLON entity-tag
  *      entity-tag         = token
@@ -849,9 +849,9 @@
  */
 
 /**@ingroup sip_if_match
- * @typedef struct msg_generic_s sip_if_match_t; 
+ * @typedef struct msg_generic_s sip_if_match_t;
  *
- * The structure #sip_if_match_t contains representation of a SIP 
+ * The structure #sip_if_match_t contains representation of a SIP
  * @SIPIfMatch header.
  *
  * The #sip_if_match_t is defined as follows:
@@ -865,7 +865,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_if_match_class[] = 
+msg_hclass_t sip_if_match_class[] =
 SIP_HEADER_CLASS_G(if_match, "SIP-If-Match", "", single);
 
 issize_t sip_if_match_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -943,11 +943,11 @@
  *
  * @sa @RFC3265, draft-niemi-sip-subnot-etags-01.txt
  *
- * @EXP_1_12_5. 
- * In order to use @b Suppress-Body-If-Match header, 
+ * @EXP_1_12_5.
+ * In order to use @b Suppress-Body-If-Match header,
  * initialize the SIP parser with, e.g.,
  * sip_update_default_mclass(sip_extend_mclass(NULL)).
- * 
+ *
  * @note
  * The #sip_t structure does not contain a @a
  * sip_suppress_body_if_match field, but sip_suppress_body_if_match()
@@ -1015,11 +1015,11 @@
  *
  * @sa @RFC3265, draft-niemi-sip-subnot-etag-01
  *
- * @EXP_1_12_5. 
- * In order to use @b Suppress-Notify-If-Match header, 
+ * @EXP_1_12_5.
+ * In order to use @b Suppress-Notify-If-Match header,
  * initialize the SIP parser with, e.g.,
  * sip_update_default_mclass(sip_extend_mclass(NULL)).
- * 
+ *
  * @note
  * The #sip_t struct does not contain @a sip_suppress_notify_if_match field,
  * but sip_suppress_notify_if_match() function should be used for accessing
@@ -1175,12 +1175,12 @@
 }
 
 /** Calculate size of extra data required for duplicating one
- *  sip_remote_party_id_t header. 
+ *  sip_remote_party_id_t header.
  */
 isize_t sip_remote_party_id_dup_xtra(sip_header_t const *h, isize_t offset)
 {
   sip_remote_party_id_t const *rpid = (sip_remote_party_id_t *)h;
-  return sip_name_addr_xtra(rpid->rpid_display, 
+  return sip_name_addr_xtra(rpid->rpid_display,
 			    rpid->rpid_url,
 			    rpid->rpid_params,
 			    offset);
@@ -1200,7 +1200,7 @@
 			   b, xtra);
 }
 
-static int sip_remote_party_id_update(msg_common_t *h, 
+static int sip_remote_party_id_update(msg_common_t *h,
 				      char const *name, isize_t namelen,
 				      char const *value)
 {
@@ -1248,7 +1248,7 @@
  *
  * @sa @RFC3325, @PPreferredIdentity
  *
- * @NEW_1_12_7. In order to use @b P-Asserted-Identity header, 
+ * @NEW_1_12_7. In order to use @b P-Asserted-Identity header,
  * initialize the SIP parser before calling nta_agent_create() or
  * nua_create() with, e.g.,
  * sip_update_default_mclass(sip_extend_mclass(NULL)).
@@ -1318,7 +1318,7 @@
 {
   sip_p_asserted_identity_t const *paid = (sip_p_asserted_identity_t *)h;
 
-  return sip_name_addr_xtra(paid->paid_display, 
+  return sip_name_addr_xtra(paid->paid_display,
 			    paid->paid_url,
 			    NULL,
 			    offset);
@@ -1402,4 +1402,4 @@
   return sip_p_asserted_identity_e(b, bsiz, h, f);
 }
 
-#endif 
+#endif

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra_headers.txt
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra_headers.txt	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_extra_headers.txt	Tue Dec 16 13:05:22 2008
@@ -4,7 +4,7 @@
 # The parsed headers are accessed with function (or macro) like sip_refer_sub()
 # e.g., sip_refer_sub_t *rsub = sip_refer_sub(sip);
 #
-# The line format is: 
+# The line format is:
 # C-name @SINCE sip_t-like-comment
 #
 # Put all experimental things after EXPERIMENTAL HEADER LIST STARTS HERE...

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_feature.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_feature.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_feature.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@CFILE sip_feature.c 
+/**@CFILE sip_feature.c
  *
  * @brief Feature-related SIP header handling
  *
@@ -52,7 +52,7 @@
  * The Allow header lists the set of methods supported by the user agent
  * generating the message.  Its syntax is defined in @RFC3261 as
  * follows:
- * 
+ *
  * @code
  *    Allow  =  "Allow" HCOLON [Method *(COMMA Method)]
  * @endcode
@@ -67,7 +67,7 @@
  */
 
 /**@ingroup sip_allow
- * @typedef struct msg_list_s sip_allow_t; 
+ * @typedef struct msg_list_s sip_allow_t;
  *
  * The structure #sip_allow_t contains representation of an @Allow header.
  *
@@ -89,7 +89,7 @@
 #define sip_allow_dup_one  msg_list_dup_one
 static msg_update_f sip_allow_update;
 
-msg_hclass_t sip_allow_class[] = 
+msg_hclass_t sip_allow_class[] =
 SIP_HEADER_CLASS(allow, "Allow", "", k_items, list, allow);
 
 issize_t sip_allow_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -106,7 +106,7 @@
   return msg_list_e(b, bsiz, h, f);
 }
 
-static int sip_allow_update(msg_common_t *h, 
+static int sip_allow_update(msg_common_t *h,
 			  char const *name, isize_t namelen,
 			  char const *value)
 {
@@ -118,7 +118,7 @@
   else {
     sip_method_t method = sip_method_code(name);
 
-    if (method >= 0 && method < 32) 
+    if (method >= 0 && method < 32)
       k->k_bitmap |= 1 << method;
   }
 
@@ -152,7 +152,7 @@
  * The Proxy-Require header is used to indicate proxy-sensitive features
  * that @b MUST be supported by the proxy.  Its syntax is defined in @RFC3261
  * as follows:
- * 
+ *
  * @code
  *    Proxy-Require  =  "Proxy-Require" HCOLON option-tag *(COMMA option-tag)
  * @endcode
@@ -162,9 +162,9 @@
  */
 
 /**@ingroup sip_proxy_require
- * @typedef struct msg_list_s sip_proxy_require_t; 
+ * @typedef struct msg_list_s sip_proxy_require_t;
  *
- * The structure #sip_proxy_require_t contains representation of an 
+ * The structure #sip_proxy_require_t contains representation of an
  * @ProxyRequire header.
  *
  * The #sip_proxy_require_t is defined as follows:
@@ -178,7 +178,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_proxy_require_class[] = 
+msg_hclass_t sip_proxy_require_class[] =
 SIP_HEADER_CLASS_LIST(proxy_require, "Proxy-Require", "", list);
 
 issize_t sip_proxy_require_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -199,9 +199,9 @@
  *
  * The Require header is used by clients to tell user agent servers about
  * options that the client expects the server to support in order to
- * properly process the request.  Its syntax is defined in @RFC3261 
+ * properly process the request.  Its syntax is defined in @RFC3261
  * as follows:
- * 
+ *
  * @code
  *    Require       =  "Require" HCOLON option-tag *(COMMA option-tag)
  * @endcode
@@ -210,9 +210,9 @@
  */
 
 /**@ingroup sip_require
- * @typedef struct msg_list_s sip_require_t; 
+ * @typedef struct msg_list_s sip_require_t;
  *
- * The structure #sip_require_t contains representation of an 
+ * The structure #sip_require_t contains representation of an
  * @Require header.
  *
  * The #sip_require_t is defined as follows:
@@ -226,7 +226,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_require_class[] = 
+msg_hclass_t sip_require_class[] =
 SIP_HEADER_CLASS_LIST(require, "Require", "", list);
 
 issize_t sip_require_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -247,7 +247,7 @@
  *
  * The Supported header enumerates all the capabilities of the client or
  * server.  Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Supported  =  ( "Supported" / "k" ) HCOLON
  *                  [option-tag *(COMMA option-tag)]
@@ -258,9 +258,9 @@
  */
 
 /**@ingroup sip_supported
- * @typedef struct msg_list_s sip_supported_t; 
+ * @typedef struct msg_list_s sip_supported_t;
  *
- * The structure #sip_supported_t contains representation of an 
+ * The structure #sip_supported_t contains representation of an
  * @Supported header.
  *
  * The #sip_supported_t is defined as follows:
@@ -275,7 +275,7 @@
  */
 
 
-msg_hclass_t sip_supported_class[] = 
+msg_hclass_t sip_supported_class[] =
 SIP_HEADER_CLASS_LIST(supported, "Supported", "k", list);
 
 issize_t sip_supported_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -296,7 +296,7 @@
  *
  * The Unsupported header lists the features not supported by the server.
  * Its syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Unsupported  =  "Unsupported" HCOLON [option-tag *(COMMA option-tag)]
  * @endcode
@@ -306,9 +306,9 @@
  */
 
 /**@ingroup sip_unsupported
- * @typedef struct msg_list_s sip_unsupported_t; 
+ * @typedef struct msg_list_s sip_unsupported_t;
  *
- * The structure #sip_unsupported_t contains representation of an 
+ * The structure #sip_unsupported_t contains representation of an
  * @Unsupported header.
  *
  * The #sip_unsupported_t is defined as follows:
@@ -322,7 +322,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_unsupported_class[] = 
+msg_hclass_t sip_unsupported_class[] =
 SIP_HEADER_CLASS_LIST(unsupported, "Unsupported", "", list);
 
 issize_t sip_unsupported_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -341,13 +341,13 @@
  *
  * @retval NULL if all the required features are supported
  * @retval pointer to a @Unsupported header or
- *         #SIP_NONE if @a home is NULL  
+ *         #SIP_NONE if @a home is NULL
  */
 sip_unsupported_t *sip_has_unsupported(su_home_t *home,
-				       sip_supported_t const *support, 
+				       sip_supported_t const *support,
 				       sip_require_t const *require)
 {
-  return sip_has_unsupported_any(home, support, NULL, NULL, 
+  return sip_has_unsupported_any(home, support, NULL, NULL,
 				 require, NULL, NULL);
 }
 
@@ -364,24 +364,24 @@
 		     sip_require_t const *support_by_require,
 		     sip_require_t const *require)
 {
-  return 
-    sip_has_unsupported_any(home, 
-			    support, support_by_require, NULL, 
+  return
+    sip_has_unsupported_any(home,
+			    support, support_by_require, NULL,
 			    require, NULL, NULL);
 }
 
 
 /** Check if required features are not supported.
  *
- * The supported features can be listed in @Supported, @Require or 
+ * The supported features can be listed in @Supported, @Require or
  * @ProxyRequire headers (in @a supported, @a by_require, or @a
  * by_proxy_require parameters, respectively)
  *
  * @param home (optional) home pointer for allocating @Unsupported header
  * @param supported @Supported features (may be NULL) [IN]
- * @param by_require  supported features listed by 
- *                    @Require (may be NULL) [IN] 
- * @param by_proxy_require supported features listed 
+ * @param by_require  supported features listed by
+ *                    @Require (may be NULL) [IN]
+ * @param by_proxy_require supported features listed
  *                         by @ProxyRequire (may be NULL) [IN]
  *
  * @param require   list of required features (may be NULL) [IN]
@@ -390,7 +390,7 @@
  *
  * @retval NULL if all the required features are supported
  * @retval pointer to a @Unsupported header or
- *         #SIP_NONE if @a home is NULL 
+ *         #SIP_NONE if @a home is NULL
  */
 sip_unsupported_t *
 sip_has_unsupported_any(su_home_t *home,
@@ -446,11 +446,11 @@
 
       if (feature) {
 	if (home) {
-	  if (unsupported == NULL) 
+	  if (unsupported == NULL)
 	    unsupported = sip_unsupported_make(home, feature);
 	  else
-	    msg_params_add(home, 
-			   (msg_param_t **)&unsupported->k_items, 
+	    msg_params_add(home,
+			   (msg_param_t **)&unsupported->k_items,
 			   feature);
 	}
 	else {
@@ -463,7 +463,7 @@
       }
     }
   }
-  
+
   return unsupported;
 }
 
@@ -471,7 +471,7 @@
 int sip_has_feature(msg_list_t const *supported, char const *feature)
 {
   size_t i;
-  
+
   if (!feature || !feature[0])
     return 1;			/* Empty feature is always supported */
 
@@ -498,7 +498,7 @@
  * syntax very similar to the @RecordRoute header field. It is used in
  * conjunction with SIP REGISTER requests and with 200 class messages in
  * response to REGISTER (REGISTER responses).
- * 
+ *
  * @code
  *    Path        =  "Path" HCOLON path-value *(COMMA path-value)
  *    path-value  =  name-addr *( SEMI rr-param )
@@ -547,7 +547,7 @@
  * contain a route vector that will direct requests through a specific
  * sequence of proxies. A registrar may use a Service-Route header field to
  * inform a UA of a service route that, if used by the UA, will provide
- * services from a proxy or set of proxies associated with that registrar. 
+ * services from a proxy or set of proxies associated with that registrar.
  * The Service-Route header field may be included by a registrar in the
  * response to a REGISTER request. The syntax for the Service-Route header
  * field is:
@@ -565,7 +565,7 @@
 /**@ingroup sip_service_route
  * @typedef typedef struct sip_route_s sip_service_route_t;
  *
- * The structure #sip_service_route_t contains representation of SIP 
+ * The structure #sip_service_route_t contains representation of SIP
  * @ServiceRoute header.
  *
  * The #sip_service_route_t is defined as follows:
@@ -581,7 +581,7 @@
  */
 
 msg_hclass_t sip_service_route_class[] =
-SIP_HEADER_CLASS(service_route, "Service-Route", "", 
+SIP_HEADER_CLASS(service_route, "Service-Route", "",
 		 r_params, append, any_route);
 
 issize_t sip_service_route_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_header.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_header.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_header.c	Tue Dec 16 13:05:22 2008
@@ -85,7 +85,7 @@
   return msg_header_d(home, msg, b);
 }
 
-/** Encode a SIP header. 
+/** Encode a SIP header.
  *
  * @deprecated Use msg_header_e() instead.
  */
@@ -94,7 +94,7 @@
   return msg_header_e(b, bsiz, (msg_header_t const *)h, flags);
 }
 
-sip_header_t *sip_header_format(su_home_t *home, 
+sip_header_t *sip_header_format(su_home_t *home,
 				msg_hclass_t *hc,
 				char const *fmt,
 				...)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_mime.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_mime.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_mime.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@CFILE sip_mime.c 
+/**@CFILE sip_mime.c
  *
  * MIME-related SIP headers
  *
@@ -54,7 +54,7 @@
  * The @b Accept request-header field can be used to specify certain media
  * types which are acceptable for the response. Its syntax is defined in
  * [H14.1, S10.6] as follows:
- * 
+ *
  * @code
  *    Accept         =  "Accept" HCOLON
  *                       [ accept-range *(COMMA accept-range) ]
@@ -97,7 +97,7 @@
 #define sip_accept_dup_one  msg_accept_dup_one
 #define sip_accept_update   msg_accept_update
 
-msg_hclass_t sip_accept_class[] = 
+msg_hclass_t sip_accept_class[] =
 SIP_HEADER_CLASS(accept, "Accept", "", ac_params, apndlist, accept);
 
 issize_t sip_accept_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -118,9 +118,9 @@
  * The Accept-Disposition header field is used to indicate what content
  * disposition types are acceptable to a client or server.  Its syntax is
  * defined in draft-lennox-sip-reg-payload-01.txt section 3.2 as follows:
- * 
+ *
  * @code
- *    Accept-Disposition = "Accept-Disposition" ":" 
+ *    Accept-Disposition = "Accept-Disposition" ":"
  *                         #( (disposition-type | "*") *( ";" generic-param ) )
  * @endcode
  *
@@ -129,8 +129,8 @@
  * is stored in #sip_accept_disposition_t structure.
  */
 
-msg_hclass_t sip_accept_disposition_class[] = 
-SIP_HEADER_CLASS(accept_disposition, "Accept-Disposition", "", 
+msg_hclass_t sip_accept_disposition_class[] =
+SIP_HEADER_CLASS(accept_disposition, "Accept-Disposition", "",
 		 ad_params, apndlist, accept_disposition);
 
 issize_t sip_accept_disposition_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -163,7 +163,7 @@
   MSG_STRING_E(b, end, ad->ad_type);
   MSG_PARAMS_E(b, end, ad->ad_params, flags);
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 #endif
@@ -175,7 +175,7 @@
  * The Accept-Encoding header is similar to Accept, but restricts the
  * content-codings that are acceptable in the response.  Its syntax is
  * defined in [H14.3, S10.7] as follows:
- * 
+ *
  * @code
  *    Accept-Encoding  =  "Accept-Encoding" HCOLON
  *                         [ encoding *(COMMA encoding) ]
@@ -202,7 +202,7 @@
  *   sip_accept_encoding_t *aa_next;   // Pointer to next @AcceptEncoding header
  *   char const            *aa_value;  // Encoding token
  *   msg_param_t const     *aa_params; // List of parameters
- *   char const            *aa_q;      // Value of q parameter 
+ *   char const            *aa_q;      // Value of q parameter
  * } sip_accept_encoding_t;
  * @endcode
  */
@@ -211,8 +211,8 @@
 #define sip_accept_encoding_dup_one  msg_accept_any_dup_one
 #define sip_accept_encoding_update   msg_accept_any_update
 
-msg_hclass_t sip_accept_encoding_class[] = 
-SIP_HEADER_CLASS(accept_encoding, "Accept-Encoding", "", 
+msg_hclass_t sip_accept_encoding_class[] =
+SIP_HEADER_CLASS(accept_encoding, "Accept-Encoding", "",
 		 aa_params, apndlist, accept_encoding);
 
 issize_t sip_accept_encoding_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -242,7 +242,7 @@
  * the server in which language it would prefer to receive reason phrases,
  * session descriptions or status responses carried as message bodies.  Its
  * syntax is defined in [H14.4, S10.8] as follows:
- * 
+ *
  * @code
  *    Accept-Language  =  "Accept-Language" HCOLON
  *                         [ language *(COMMA language) ]
@@ -268,7 +268,7 @@
  *   sip_accept_language_t *aa_next;   // Pointer to next <language>
  *   char const            *aa_value;  // Language-range
  *   msg_param_t const     *aa_params; // List of accept-parameters
- *   char const            *aa_q;      // Value of q parameter 
+ *   char const            *aa_q;      // Value of q parameter
  * } sip_accept_language_t;
  * @endcode
  */
@@ -277,8 +277,8 @@
 #define sip_accept_language_dup_one  msg_accept_any_dup_one
 #define sip_accept_language_update   msg_accept_any_update
 
-msg_hclass_t sip_accept_language_class[] = 
-SIP_HEADER_CLASS(accept_language, "Accept-Language", "", 
+msg_hclass_t sip_accept_language_class[] =
+SIP_HEADER_CLASS(accept_language, "Accept-Language", "",
 		 aa_params, apndlist, accept_language);
 
 issize_t sip_accept_language_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -307,7 +307,7 @@
  * in the case of multipart messages, a message body part is to be
  * interpreted by the UAC or UAS.  Its syntax is defined in @RFC3261
  * as follows:
- * 
+ *
  * @code
  *    Content-Disposition   =  "Content-Disposition" HCOLON
  *                             disp-type *( SEMI disp-param )
@@ -320,7 +320,7 @@
  *    other-handling        =  token
  *    disp-extension-token  =  token
  * @endcode
- * 
+ *
  * The Content-Disposition header was extended by
  * draft-lennox-sip-reg-payload-01.txt section 3.1 as follows:
  *
@@ -342,7 +342,7 @@
  */
 
 /**@ingroup sip_content_disposition
- * @typedef struct msg_content_disposition_s sip_content_disposition_t; 
+ * @typedef struct msg_content_disposition_s sip_content_disposition_t;
  *
  * The structure #sip_content_disposition_t contains representation of an
  * @ContentDisposition header.
@@ -366,11 +366,11 @@
 static msg_dup_f sip_content_disposition_dup_one;
 #define sip_content_disposition_update msg_content_disposition_update
 
-msg_hclass_t sip_content_disposition_class[] = 
+msg_hclass_t sip_content_disposition_class[] =
 SIP_HEADER_CLASS(content_disposition, "Content-Disposition", "", cd_params,
 		 single, content_disposition);
 
-issize_t sip_content_disposition_d(su_home_t *home, sip_header_t *h, 
+issize_t sip_content_disposition_d(su_home_t *home, sip_header_t *h,
 				   char *s, isize_t slen)
 {
   return msg_content_disposition_d(home, h, s, slen);
@@ -388,9 +388,9 @@
   return msg_content_disposition_dup_xtra(h, offset);
 }
 
-/** Duplicate one #sip_content_disposition_t object */ 
+/** Duplicate one #sip_content_disposition_t object */
 static
-char *sip_content_disposition_dup_one(sip_header_t *dst, 
+char *sip_content_disposition_dup_one(sip_header_t *dst,
 				      sip_header_t const *src,
 				      char *b, isize_t xtra)
 {
@@ -405,7 +405,7 @@
  * The Content-Encoding header indicates what additional content codings
  * have been applied to the entity-body.  Its syntax is defined in @RFC3261
  * as follows:
- * 
+ *
  * @code
  * Content-Encoding  =  ( "Content-Encoding" / "e" ) HCOLON
  *                      content-coding *(COMMA content-coding)
@@ -417,7 +417,7 @@
  */
 
 /**@ingroup sip_content_encoding
- * @typedef struct msg_list_s sip_content_encoding_t; 
+ * @typedef struct msg_list_s sip_content_encoding_t;
  *
  * The structure #sip_content_encoding_t contains representation of an
  * @ContentEncoding header.
@@ -433,7 +433,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_content_encoding_class[] = 
+msg_hclass_t sip_content_encoding_class[] =
 SIP_HEADER_CLASS_LIST(content_encoding, "Content-Encoding", "e", list);
 
 issize_t sip_content_encoding_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -454,7 +454,7 @@
  * the intended audience for the enclosed entity. Note that this might not
  * be equivalent to all the languages used within the entity-body. Its
  * syntax is defined in @RFC3261 as follows:
- * 
+ *
  * @code
  *    Content-Language  =  "Content-Language" HCOLON
  *                         language-tag *(COMMA language-tag)
@@ -483,7 +483,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_content_language_class[] = 
+msg_hclass_t sip_content_language_class[] =
 SIP_HEADER_CLASS_LIST(content_language, "Content-Language", "", list);
 
 issize_t sip_content_language_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -503,7 +503,7 @@
  * The Content-Type header indicates the media type of the message-body sent
  * to the recipient.  Its syntax is defined in [H3.7, S] as
  * follows:
- * 
+ *
  * @code
  * Content-Type     =  ( "Content-Type" / "c" ) HCOLON media-type
  * media-type       =  m-type SLASH m-subtype *(SEMI m-parameter)
@@ -548,8 +548,8 @@
 static msg_dup_f sip_content_type_dup_one;
 #define sip_content_type_update NULL
 
-msg_hclass_t sip_content_type_class[] = 
-SIP_HEADER_CLASS(content_type, "Content-Type", "c", c_params, 
+msg_hclass_t sip_content_type_class[] =
+SIP_HEADER_CLASS(content_type, "Content-Type", "c", c_params,
 		 single, content_type);
 
 issize_t sip_content_type_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -568,7 +568,7 @@
   return msg_content_type_dup_xtra((msg_header_t *)h, offset);
 }
 
-/** Duplicate one #sip_content_type_t object */ 
+/** Duplicate one #sip_content_type_t object */
 static
 char *sip_content_type_dup_one(sip_header_t *dst, sip_header_t const *src,
 			       char *b, isize_t xtra)
@@ -585,7 +585,7 @@
  * MIME-Version header indicates what version of the MIME protocol was used
  * to construct the message.  Its syntax is defined in [H19.4.1, S10.28]
  * as follows:
- * 
+ *
  * @code
  *    MIME-Version  =  "MIME-Version" HCOLON 1*DIGIT "." 1*DIGIT
  * @endcode
@@ -594,7 +594,7 @@
  */
 
 /**@ingroup sip_mime_version
- * @typedef struct msg_generic_s sip_mime_version_t; 
+ * @typedef struct msg_generic_s sip_mime_version_t;
  *
  * The structure #sip_mime_version_t contains representation of an
  * @MIMEVersion header.
@@ -610,7 +610,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_mime_version_class[] = 
+msg_hclass_t sip_mime_version_class[] =
 SIP_HEADER_CLASS_G(mime_version, "MIME-Version", "", single);
 
 issize_t sip_mime_version_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -626,11 +626,11 @@
 /* ====================================================================== */
 
 /**@SIP_HEADER sip_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 @RFC3261 as
  * follows:
- * 
+ *
  * @code
  *    Warning        =  "Warning" HCOLON warning-value *(COMMA warning-value)
  *    warning-value  =  warn-code SP warn-agent SP warn-text
@@ -646,7 +646,7 @@
  */
 
 /**@ingroup sip_warning
- * @typedef struct msg_warning_s sip_warning_t; 
+ * @typedef struct msg_warning_s sip_warning_t;
  *
  * The structure #sip_warning_t contains representation of an
  * @Warning header.
@@ -669,7 +669,7 @@
 #define sip_warning_dup_one msg_warning_dup_one
 #define sip_warning_update NULL
 
-msg_hclass_t sip_warning_class[] = 
+msg_hclass_t sip_warning_class[] =
 SIP_HEADER_CLASS(warning, "Warning", "", w_common, append, warning);
 
 issize_t sip_warning_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.c	Tue Dec 16 13:05:22 2008
@@ -152,7 +152,7 @@
   return mclass;
 }
 
-/** Extract the SIP message body, including separator line. 
+/** Extract the SIP message body, including separator line.
  *
  * @param msg  message object [IN]
  * @param sip  public SIP message structure [IN/OUT]
@@ -162,13 +162,13 @@
  *
  * @retval -1 error
  * @retval 0  cannot proceed
- * @retval m 
+ * @retval m
  */
 issize_t sip_extract_body(msg_t *msg, sip_t *sip, char b[], isize_t bsiz, int eos)
 {
   ssize_t m = 0;
   size_t body_len;
-  
+
   if (!(sip->sip_flags & MSG_FLG_BODY)) {
     /* We are looking at a potential empty line */
     m = msg_extract_separator(msg, (msg_pub_t *)sip, b, bsiz, eos);
@@ -203,10 +203,10 @@
     return bsiz;
   }
 
-  if ((m = msg_extract_payload(msg, (msg_pub_t *)sip, 
+  if ((m = msg_extract_payload(msg, (msg_pub_t *)sip,
 			       NULL, body_len, b, bsiz, eos)) == -1)
     return -1;
-  
+
   sip->sip_flags |= MSG_FLG_FRAGS;
   if (bsiz >= body_len)
     sip->sip_flags |= MSG_FLG_COMPLETE;
@@ -216,7 +216,7 @@
 
 /** Parse SIP version.
  *
- * Parse a SIP version string. Update the 
+ * Parse a SIP version string. Update the
  * pointer at @a ss to first non-LWS character after the version string.
  *
  * @param ss   string to be parsed [IN/OUT]
@@ -231,7 +231,7 @@
   char const *result;
   size_t const version_size = sizeof(sip_version_2_0) - 1;
 
-  if (strncasecmp(s, sip_version_2_0, version_size) == 0 && 
+  if (strncasecmp(s, sip_version_2_0, version_size) == 0 &&
       !IS_TOKEN(s[version_size])) {
     result = sip_version_2_0;
     s += version_size;
@@ -259,7 +259,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, sip_version_2_0) == 0)
 	result = sip_version_2_0;
     }
@@ -268,10 +268,10 @@
   }
 
   while (IS_WS(*s)) *s++ = '\0';
-  
+
   *ss = s;
 
-  if (ver) 
+  if (ver)
     *ver = result;
 
   return 0;
@@ -344,7 +344,7 @@
 
 /**Parse a SIP method name.
  *
- * Parse a SIP method name and return a code corresponding to the method. 
+ * Parse a SIP method name and return a code corresponding to the method.
  * The address of the first non-LWS character after method name is stored in
  * @a *ss.
  *
@@ -375,11 +375,11 @@
   switch (c) {
   case 'A': if (MATCH(s, "ACK")) code = sip_method_ack; break;
   case 'B': if (MATCH(s, "BYE")) code = sip_method_bye; break;
-  case 'C': 
-    if (MATCH(s, "CANCEL")) 
-      code = sip_method_cancel; 
+  case 'C':
+    if (MATCH(s, "CANCEL"))
+      code = sip_method_cancel;
     break;
-  case 'I': 
+  case 'I':
     if (MATCH(s, "INVITE"))
       code = sip_method_invite;
     else if (MATCH(s, "INFO"))
@@ -388,19 +388,19 @@
   case 'M': if (MATCH(s, "MESSAGE")) code = sip_method_message; break;
   case 'N': if (MATCH(s, "NOTIFY")) code = sip_method_notify; break;
   case 'O': if (MATCH(s, "OPTIONS")) code = sip_method_options; break;
-  case 'P': 
-    if (MATCH(s, "PRACK")) code = sip_method_prack; 
-    else if (MATCH(s, "PUBLISH")) code = sip_method_publish; 
+  case 'P':
+    if (MATCH(s, "PRACK")) code = sip_method_prack;
+    else if (MATCH(s, "PUBLISH")) code = sip_method_publish;
     break;
-  case 'R': 
-    if (MATCH(s, "REGISTER")) 
-      code = sip_method_register; 
+  case 'R':
+    if (MATCH(s, "REGISTER"))
+      code = sip_method_register;
     else if (MATCH(s, "REFER"))
-      code = sip_method_refer; 
+      code = sip_method_refer;
     break;
-  case 'S': 
-    if (MATCH(s, "SUBSCRIBE")) 
-      code = sip_method_subscribe; 
+  case 'S':
+    if (MATCH(s, "SUBSCRIBE"))
+      code = sip_method_subscribe;
     break;
   case 'U':
     if (MATCH(s, "UPDATE"))
@@ -410,7 +410,7 @@
 
 #undef MATCH
 
-  if (IS_NON_WS(s[n])) 
+  if (IS_NON_WS(s[n]))
     /* Unknown method */
     code = sip_method_unknown;
 
@@ -467,14 +467,14 @@
        !TRANSPORT_MATCH(sip_transport_tcp) &&
        !TRANSPORT_MATCH(sip_transport_sctp) &&
        !TRANSPORT_MATCH(sip_transport_tls))) {
-    /* Protocol name */ 
+    /* Protocol name */
     transport = pn = s;
     skip_token(&s);
     pn_len = s - pn;
     skip_lws(&s);
     if (pn_len == 0 || *s++ != '/') return -1;
     skip_lws(&s);
-    
+
     /* Protocol version */
     pv = s;
     skip_token(&s);
@@ -482,13 +482,13 @@
     skip_lws(&s);
     if (pv_len == 0 || *s++ != '/') return -1;
     skip_lws(&s);
-    
+
     /* Transport protocol */
     pt = s;
     skip_token(&s);
     pt_len = s - pt;
     if (pt_len == 0) return -1;
-    
+
     /* Remove whitespace between protocol name and version */
     if (pn + pn_len + 1 != pv) {
       pn[pn_len] = '/';
@@ -500,7 +500,7 @@
       pv[pv_len] = '/';
       pt = memmove(pv + pv_len + 1, pt, pt_len);
       pt[pt_len] = '\0';
-      
+
       /* extra whitespace? */
       if (!strcasecmp(transport, sip_transport_udp))
 	transport = sip_transport_udp;
@@ -580,9 +580,9 @@
   return rv;
 }
 
-/**Add message separator, then test if message is complete. 
+/**Add message separator, then test if message is complete.
  *
- * Add sip_content_length and sip_separator if they are missing. 
+ * Add sip_content_length and sip_separator if they are missing.
  * The test that all necessary message components ( @From, @To,
  * @CSeq, @CallID, @ContentLength and message separator are present.
  *
@@ -622,7 +622,7 @@
     if (mplen == -1)
       return -1;
     len = (size_t)mplen;
-  } 
+  }
 
   if (sip->sip_payload)
     len += sip->sip_payload->pl_len;
@@ -640,14 +640,14 @@
       sip_fragment_clear(sip->sip_content_length->l_common);
     }
   }
-  
-  if (!sip->sip_cseq || 
+
+  if (!sip->sip_cseq ||
       !sip->sip_call_id ||
       !sip->sip_to ||
       !sip->sip_from ||
       !sip->sip_separator ||
       !sip->sip_content_length)
     return -1;
-  
+
   return 0;
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser.docs	Tue Dec 16 13:05:22 2008
@@ -7,7 +7,7 @@
  * new parser is added.
  *
  * The @b sip module contains interface to the SIP headers and message
- * objects. The interface is abstracted using objects known as 
+ * objects. The interface is abstracted using objects known as
  * @ref msg_hclass_s "header classes" and @ref msg_mclass_s "message classes".
  *
  * The @ref msg_mclass_s "message class" defines how a message is handled:
@@ -15,14 +15,14 @@
  * classes. It also contains function pointers used by the parser to handle
  * message body and other details that vary between protocols.
  *
- * A @ref msg_hclass_s "header class" defines how a single header is parsed. 
+ * A @ref msg_hclass_s "header class" defines how a single header is parsed.
  * Each header has its own header class. There are also header classes for
  * message elements that are not really headers, like @ref sip_request
- * "request" and @ref sip_status "status line", 
- * @ref sip_separator "separator between headers" and 
+ * "request" and @ref sip_status "status line",
+ * @ref sip_separator "separator between headers" and
  * @ref sip_payload "message body"
  * (which is also known as payload). There is also a header classes
- * for @ref sip_unknown "unknown headers" and 
+ * for @ref sip_unknown "unknown headers" and
  * @ref sip_error "headers that contained parsing errors".
  *
  *
@@ -33,18 +33,18 @@
  *
  * Create a header template for your header just like sip_rfc2543.h.in,
  * e.g, sip_example.h.in:
- * 
+ *
  *@code
 /**@file sip_example.h.in
  *
  * Template for <sofia-sip/sip_example.h>.
  */
 
-#ifndef SIP_EXAMPLE_H 
+#ifndef SIP_EXAMPLE_H
 /** Defined when <sofia-sip/sip_example.h> has been included. */
-#define SIP_EXAMPLE_H 
+#define SIP_EXAMPLE_H
 
-/**@file sofia-sip/sip_example.h 
+/**@file sofia-sip/sip_example.h
 *
  * @brief Example header.
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser_table.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser_table.c.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_parser_table.c.in	Tue Dec 16 13:05:22 2008
@@ -29,7 +29,7 @@
  *
  */
 
-/**@CFILE sip_parser_table.c 
+/**@CFILE sip_parser_table.c
  * @brief SIP parser table
  *
  * #AUTO#

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_prack.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_prack.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_prack.c	Tue Dec 16 13:05:22 2008
@@ -55,7 +55,7 @@
  * The RAck header indicates the sequence number of the provisional response
  * which is being acknowledged.  Its syntax is defined in
  * @RFC3262 section 10 as follows:
- * 
+ *
  * @code
  *    RAck          =  "RAck" HCOLON response-num LWS CSeq-num LWS Method
  *    response-num  =  1*DIGIT
@@ -91,7 +91,7 @@
 static msg_dup_f sip_rack_dup_one;
 #define sip_rack_update NULL
 
-msg_hclass_t sip_rack_class[] = 
+msg_hclass_t sip_rack_class[] =
 SIP_HEADER_CLASS(rack, "RAck", "", ra_common, single, rack);
 
 issize_t sip_rack_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -121,7 +121,7 @@
 
   assert(sip_is_rack(h));
 
-  return snprintf(b, bsiz, "%u %u %s", 
+  return snprintf(b, bsiz, "%u %u %s",
 		  ra->ra_response, ra->ra_cseq, ra->ra_method_name);
 }
 
@@ -135,7 +135,7 @@
     return offset;
 }
 
-/** Duplicate one #sip_rack_t object */ 
+/** Duplicate one #sip_rack_t object */
 char *sip_rack_dup_one(sip_header_t *dst, sip_header_t const *src,
 			char *b, isize_t xtra)
 {
@@ -162,9 +162,9 @@
 
 /**@SIP_HEADER sip_rseq RSeq Header
  *
- * The RSeq header identifies provisional responses within a transaction. 
+ * The RSeq header identifies provisional responses within a transaction.
  * Its syntax is defined in @RFC3262 section 10 as follows:
- * 
+ *
  * @code
  *    RSeq          =  "RSeq" HCOLON response-num
  *    response-num  =  1*DIGIT
@@ -189,7 +189,7 @@
  * @endcode
  */
 
-msg_hclass_t sip_rseq_class[] = 
+msg_hclass_t sip_rseq_class[] =
 SIP_HEADER_CLASS(rseq, "RSeq", "", rs_common, single, any);
 
 issize_t sip_rseq_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_pref_util.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_pref_util.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_pref_util.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@CFILE sip_pref_util.c
- * 
+ *
  * SIP callercaps and callerprefs utility functions.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -48,8 +48,8 @@
 static double parse_number(char const *str, char **return_end);
 
 /** Parse a single preference */
-int sip_prefs_parse(union sip_pref *sp, 
-		    char const **in_out_s, 
+int sip_prefs_parse(union sip_pref *sp,
+		    char const **in_out_s,
 		    int *return_negation)
 {
   char const *s;
@@ -66,7 +66,7 @@
     return 0;
 
   if (old_type == sp_init) {
-    if (s[0] == '\0' || 
+    if (s[0] == '\0' ||
 	strcasecmp(s, "TRUE") == 0 ||
 	strcasecmp(s, "\"TRUE\"") == 0) {
       /* Boolean */
@@ -76,7 +76,7 @@
       *return_negation = 0;
       *in_out_s = s + strlen(s);
       return 1;
-    } else if (strcasecmp(s, "FALSE") == 0 || 
+    } else if (strcasecmp(s, "FALSE") == 0 ||
 	       strcasecmp(s, "\"FALSE\"") == 0) {
       /* Boolean */
       sp->sp_type = sp_literal;
@@ -88,7 +88,7 @@
     } else if (s[0] == '"' && s[1] != '\0') {
       for (s++; IS_LWS(s[0]); s++);
     } else
-      old_type = sp_error;      
+      old_type = sp_error;
   } else if (!s[0]) {
     sp->sp_type = sp_init;
     return 0;
@@ -106,7 +106,7 @@
     char s0, *e;
 
     for (s++; IS_LWS(s[0]); s++);
-    
+
     s0 = s[0];
 
     if (s0 == '=')
@@ -150,9 +150,9 @@
   else
     old_type = sp_error;
 
-  if (old_type != sp_init && old_type != sp->sp_type) 
+  if (old_type != sp_init && old_type != sp->sp_type)
     sp->sp_type = sp_error;
-    
+
   *in_out_s = s;
 
   return sp->sp_type != sp_error;
@@ -199,7 +199,7 @@
 
 
 /** Return true if preferences match */
-int sip_prefs_match(union sip_pref const *a, 
+int sip_prefs_match(union sip_pref const *a,
 		    union sip_pref const *b)
 {
   if (!a || !b)
@@ -208,20 +208,20 @@
     return 0;
   switch (a->sp_type) {
   default:
-  case sp_error: 
+  case sp_error:
     return 0;
   case sp_literal:
-    return 
+    return
       a->sp_literal.spl_length == b->sp_literal.spl_length &&
       strncasecmp(a->sp_literal.spl_value, b->sp_literal.spl_value,
 		  a->sp_literal.spl_length) == 0;
   case sp_string:
-    return 
+    return
       a->sp_string.sps_length == b->sp_string.sps_length &&
       strncmp(a->sp_string.sps_value, b->sp_string.sps_value,
 	      a->sp_string.sps_length) == 0;
   case sp_range:
-    return 
+    return
       a->sp_range.spr_lower <= b->sp_range.spr_upper &&
       a->sp_range.spr_upper >= b->sp_range.spr_lower;
   }
@@ -260,7 +260,7 @@
 
   memset(np, 0, sizeof np);
 
-  /* Usually nvalue is from Accept/Reject-Contact, 
+  /* Usually nvalue is from Accept/Reject-Contact,
      pvalue is from Contact */
   while (sip_prefs_parse(np, &nvalue, &n_negated)) {
     memset(pp, 0, sizeof pp);
@@ -291,7 +291,7 @@
   return 0;
 }
 
-/** Check if the parameter is a valid feature tag. 
+/** Check if the parameter is a valid feature tag.
  *
  * A feature tag is a parameter starting with a single plus, or a well-known
  * feature tag listed in @RFC3841: "audio", "automata", "application",
@@ -377,7 +377,7 @@
 }
 
 /**Check if @Contact matches by @AcceptContact.
- * 
+ *
  * Matching @AcceptContact and @Contact headers is done as explained in
  * @RFC3841 section 7.2.4. The caller score can be calculated from the
  * returned S and N values.
@@ -393,9 +393,9 @@
  *
  * @param m   pointer to @Contact header structure
  * @param cp   pointer to @AcceptContact header structure
- * @param return_N   return-value parameter for number of 
+ * @param return_N   return-value parameter for number of
  *                   feature tags in @AcceptContact
- * @param return_S   return-value parameter for number of 
+ * @param return_S   return-value parameter for number of
  *                   matching feature tags
  * @param return_error   return-value parameter for parsing error
  *
@@ -428,7 +428,7 @@
  * sip_contact_is_immune(), sip_contact_immunize(), sip_is_callerpref(),
  * sip_prefs_matching().
  */
-int sip_contact_accept(sip_contact_t const *m, 
+int sip_contact_accept(sip_contact_t const *m,
 		       sip_accept_contact_t const *cp,
 		       unsigned *return_S,
 		       unsigned *return_N,
@@ -459,9 +459,9 @@
       eq = strcspn(acc, "=");
       acc += eq + (acc[eq] == '=');
 
-      if (!sip_prefs_matching(cap, acc, return_error)) 
+      if (!sip_prefs_matching(cap, acc, return_error))
 	return 0;
-      
+
       S++;
     }
   }
@@ -469,7 +469,7 @@
   *return_S = S; /* Matched feature tags */
   *return_N = N; /* Number of feature tags in @AcceptContact */
 
-  return 1; 
+  return 1;
 }
 
 
@@ -484,7 +484,7 @@
  * @sa sip_contact_score(), sip_contact_accept(), sip_contact_immunize(),
  * sip_contact_is_immune(), @RFC3841, @RejectContact, @Contact
  */
-int sip_contact_reject(sip_contact_t const *m, 
+int sip_contact_reject(sip_contact_t const *m,
 		       sip_reject_contact_t const *reject)
 {
   unsigned S, N;
@@ -506,7 +506,7 @@
  *
  * @retval pointer to immunized copy if successful
  * @retval NULL upon an error
- * 
+ *
  * @sa @RFC3841, sip_is_callerpref(), sip_contact_score(),
  * sip_contact_accept(), sip_contact_reject(), @Contact
  */
@@ -541,7 +541,7 @@
 /** Calculate score for contact.
  *
  * The caller preference score is an integer in range of 0 to 1000.
- * 
+ *
  * @retval -1 if the contact is rejected
  * @retval 1000 if contact is immune to caller preferences
  * @retval 0..1000 reflecting @RFC3841 score in 0.000 - 1.000.
@@ -563,14 +563,14 @@
     return 1000;		/* Immune */
 
   for (; rc; rc = rc->cp_next)
-    if (sip_contact_reject(m, rc)) 
+    if (sip_contact_reject(m, rc))
       break;
   if (rc)
     return -1;			/* Rejected */
 
   for (; ac; ac = ac->cp_next) {
     unsigned S, N;
-	
+
     if (!sip_contact_accept(m, ac, &S, &N, &error)) {
       if (ac->cp_require)
 	return 0;		/* Discarded */
@@ -586,11 +586,11 @@
 	return 0;		/* Dropped */
     }
 
-    if (S > 0 && N > 0) 
+    if (S > 0 && N > 0)
       S_total += sip_q_value(ac->cp_q) * (scale * S / N + (2 * S >= N));
   }
 
-  if (!M) 
+  if (!M)
     return 0;
 
   S_total /= M;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_reason.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_reason.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_reason.c	Tue Dec 16 13:05:22 2008
@@ -52,7 +52,7 @@
  * The Reason header is used to indicate why a SIP request was issued or why
  * a provisional response was sent. It can be used with HRPF scenarios. It
  * is defined in @RFC3326 as follows:
- * 
+ *
  * @code
  *   Reason            =  "Reason" HCOLON reason-value *(COMMA reason-value)
  *   reason-value      =  protocol *(SEMI reason-params)
@@ -64,7 +64,7 @@
  *   reason-text       =  "text" EQUAL quoted-string
  *   reason-extension  =  generic-param
  * @endcode
- * 
+ *
  * The parsed Reason header is stored in #sip_reason_t structure.
  */
 
@@ -77,12 +77,12 @@
  * @code
  * typedef struct sip_reason_s
  * {
- *   sip_common_t        re_common[1]; // Common fragment info 
- *   sip_reason_t       *re_next;      // Link to next <reason-value> 
- *   char const         *re_protocol;  // Protocol 
- *   msg_param_t const  *re_params;    // List of reason parameters 
- *   char const         *re_cause;     // Value of cause parameter 
- *   char const         *re_text;      // Value of text parameter 
+ *   sip_common_t        re_common[1]; // Common fragment info
+ *   sip_reason_t       *re_next;      // Link to next <reason-value>
+ *   char const         *re_protocol;  // Protocol
+ *   msg_param_t const  *re_params;    // List of reason parameters
+ *   char const         *re_cause;     // Value of cause parameter
+ *   char const         *re_text;      // Value of text parameter
  * } sip_reason_t;
  * @endcode
  */
@@ -91,7 +91,7 @@
 static msg_dup_f sip_reason_dup_one;
 static msg_update_f sip_reason_update;
 
-msg_hclass_t sip_reason_class[] = 
+msg_hclass_t sip_reason_class[] =
 SIP_HEADER_CLASS(reason, "Reason", "", re_params, append, reason);
 
 issize_t sip_reason_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -103,9 +103,9 @@
     *s = '\0', s += span_lws(s + 1) + 1;
 
   re->re_protocol = s;
-  if ((n = span_token(s)) == 0) 
+  if ((n = span_token(s)) == 0)
     return -1;
-  s += n; while (IS_LWS(*s)) *s++ = '\0'; 
+  s += n; while (IS_LWS(*s)) *s++ = '\0';
   if (*s == ';' && msg_params_d(home, &s, &re->re_params) < 0)
     return -1;
 
@@ -134,7 +134,7 @@
   return offset;
 }
 
-/** Duplicate one #sip_reason_t object */ 
+/** Duplicate one #sip_reason_t object */
 char *sip_reason_dup_one(sip_header_t *dst, sip_header_t const *src,
 			char *b, isize_t xtra)
 {
@@ -150,7 +150,7 @@
 }
 
 /** Update parameter values for @Reason header */
-static int sip_reason_update(msg_common_t *h, 
+static int sip_reason_update(msg_common_t *h,
 			     char const *name, isize_t namelen,
 			     char const *value)
 {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_refer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_refer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_refer.c	Tue Dec 16 13:05:22 2008
@@ -280,7 +280,7 @@
   return b;
 }
 
-static int sip_referred_by_update(msg_common_t *h, 
+static int sip_referred_by_update(msg_common_t *h,
 			   char const *name, isize_t namelen,
 			   char const *value)
 {
@@ -338,10 +338,10 @@
  * {
  *   sip_common_t        rp_common[1];   // Common fragment info
  *   sip_error_t        *rp_next;	 // Dummy link to next
- *   char const         *rp_call_id;     // @CallID of dialog to replace 
- *   msg_param_t const  *rp_params;      // List of parameters 
- *   char const         *rp_to_tag;      // Value of "to-tag" parameter 
- *   char const         *rp_from_tag;    // Value of "from-tag" parameter 
+ *   char const         *rp_call_id;     // @CallID of dialog to replace
+ *   msg_param_t const  *rp_params;      // List of parameters
+ *   char const         *rp_to_tag;      // Value of "to-tag" parameter
+ *   char const         *rp_from_tag;    // Value of "from-tag" parameter
  *   unsigned            rp_early_only;  // early-only parameter
  * } sip_replaces_t;
  * @endcode
@@ -414,7 +414,7 @@
 }
 
 /** Update parameters in @Replaces header. */
-static int sip_replaces_update(msg_common_t *h, 
+static int sip_replaces_update(msg_common_t *h,
 			       char const *name, isize_t namelen,
 			       char const *value)
 {
@@ -456,7 +456,7 @@
  *  exten           = generic-param
  *
  * The parsed Refer-Sub header is stored in #sip_refer_sub_t structure.
- * 
+ *
  * @NEW_1_12_5. Note that #sip_t does not contain @a sip_refer_sub field,
  * but sip_refer_sub() accessor function should be used for accessing @b
  * Refer-Sub header structure.
@@ -478,10 +478,10 @@
  *   sip_common_t        rs_common[1];   // Common fragment info
  *   sip_error_t        *rs_next;	 // Dummy link to next
  *   char const         *rs_value;       // "true" or "false"
- *   msg_param_t const  *rs_params;      // List of extension parameters 
+ *   msg_param_t const  *rs_params;      // List of extension parameters
  * } sip_refer_sub_t;
  * @endcode
- * 
+ *
  * @NEW_1_12_5.
  */
 
@@ -502,7 +502,7 @@
   if (msg_token_d(&s, &rs->rs_value) < 0)
     return -1;
 
-  if (strcasecmp(rs->rs_value, "false") && 
+  if (strcasecmp(rs->rs_value, "false") &&
       strcasecmp(rs->rs_value, "true"))
     return -1;
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_security.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_security.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_security.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  *
  * This file contains implementation of headers related to HTTP authentication
  * (@RFC2617):
- * @ref sip_authorization "Authorization", 
+ * @ref sip_authorization "Authorization",
  * @ref sip_authentication_info "Authentication-Info",
  * @ref sip_proxy_authenticate "Proxy-Authenticate",
  * @ref sip_proxy_authentication_info "Proxy-Authentication-Info",
@@ -42,7 +42,7 @@
  * @ref sip_security_verify "Security-Verify" headers.
  *
  * The implementation of @ref sip_privacy "Privacy" header (@RFC3323) is
- * also here. 
+ * also here.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
@@ -118,9 +118,9 @@
  * The #sip_authorization_t is defined as follows:
  * @code
  * typedef struct msg_auth_s {
- *   msg_common_t       au_common[1];  // Common fragment info 
- *   msg_auth_t        *au_next;       // Link to next header 
- *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest" 
+ *   msg_common_t       au_common[1];  // Common fragment info
+ *   msg_auth_t        *au_next;       // Link to next header
+ *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest"
  *   msg_param_t const *au_params;     // Comma-separated parameters
  * } sip_authorization_t;
  * @endcode
@@ -188,9 +188,9 @@
  * The #sip_proxy_authenticate_t is defined as follows:
  * @code
  * typedef struct msg_auth_s {
- *   msg_common_t       au_common[1];  // Common fragment info 
- *   msg_auth_t        *au_next;       // Link to next header 
- *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest" 
+ *   msg_common_t       au_common[1];  // Common fragment info
+ *   msg_auth_t        *au_next;       // Link to next header
+ *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest"
  *   msg_param_t const *au_params;     // Comma-separated parameters
  * } sip_proxy_authenticate_t;
  * @endcode
@@ -244,9 +244,9 @@
  * The #sip_proxy_authorization_t is defined as follows:
  * @code
  * typedef struct msg_auth_s {
- *   msg_common_t       au_common[1];  // Common fragment info 
- *   msg_auth_t        *au_next;       // Link to next header 
- *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest" 
+ *   msg_common_t       au_common[1];  // Common fragment info
+ *   msg_auth_t        *au_next;       // Link to next header
+ *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest"
  *   msg_param_t const *au_params;     // Comma-separated parameters
  * } sip_proxy_authorization_t;
  * @endcode
@@ -299,9 +299,9 @@
  * The #sip_www_authenticate_t is defined as follows:
  * @code
  * typedef struct msg_auth_s {
- *   msg_common_t       au_common[1];  // Common fragment info 
- *   msg_auth_t        *au_next;       // Link to next header 
- *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest" 
+ *   msg_common_t       au_common[1];  // Common fragment info
+ *   msg_auth_t        *au_next;       // Link to next header
+ *   char const        *au_scheme;     // Auth-scheme like "Basic" or "Digest"
  *   msg_param_t const *au_params;     // Comma-separated parameters
  * } sip_www_authenticate_t;
  * @endcode
@@ -441,7 +441,7 @@
   return msg_list_d(home, (msg_header_t *)h, s, slen);
 }
 
-issize_t sip_proxy_authentication_info_e(char b[], isize_t bsiz, 
+issize_t sip_proxy_authentication_info_e(char b[], isize_t bsiz,
 					 sip_header_t const *h, int f)
 {
   assert(sip_is_proxy_authentication_info(h)); /* This is soo popular */
@@ -455,7 +455,7 @@
 typedef struct sip_security_agree_s sip_security_agree_t;
 #define sh_security_agree sh_security_client
 
-static 
+static
 issize_t sip_security_agree_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
 {
   sip_security_agree_t *sa = (sip_security_agree_t *)h;
@@ -465,16 +465,16 @@
   while (*s == ',')   /* Ignore empty entries (comma-whitespace) */
     *s = '\0', s += span_lws(s + 1) + 1;
 
-  if ((n = span_token(s)) == 0) 
+  if ((n = span_token(s)) == 0)
     return -1;
-  sa->sa_mec = s; s += n; while (IS_LWS(*s)) *s++ = '\0'; 
+  sa->sa_mec = s; s += n; while (IS_LWS(*s)) *s++ = '\0';
   if (*s == ';' && msg_params_d(home, &s, &sa->sa_params) < 0)
     return -1;
 
   return msg_parse_next_field(home, h, s, slen);
 }
 
-static 
+static
 issize_t sip_security_agree_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
 {
   char *end = b + bsiz, *b0 = b;
@@ -486,7 +486,7 @@
   return b - b0;
 }
 
-static 
+static
 isize_t sip_security_agree_dup_xtra(sip_header_t const *h, isize_t offset)
 {
   sip_security_agree_t const *sa = h->sh_security_agree;
@@ -497,8 +497,8 @@
   return offset;
 }
 
-/** Duplicate one sip_security_agree_t object */ 
-static 
+/** Duplicate one sip_security_agree_t object */
+static
 char *sip_security_agree_dup_one(sip_header_t *dst, sip_header_t const *src,
 				 char *b, isize_t xtra)
 {
@@ -513,7 +513,7 @@
   return b;
 }
 
-static int sip_security_agree_update(msg_common_t *h, 
+static int sip_security_agree_update(msg_common_t *h,
 				     char const *name, isize_t namelen,
 				     char const *value)
 {
@@ -589,8 +589,8 @@
  * @code
  * typedef struct sip_security_agree_s
  * {
- *   sip_common_t        sa_common[1]; // Common fragment info 
- *   sip_security_client_t *sa_next;   // Link to next mechanism 
+ *   sip_common_t        sa_common[1]; // Common fragment info
+ *   sip_security_client_t *sa_next;   // Link to next mechanism
  *   char const         *sa_mec;       // Security mechanism
  *   msg_param_t const  *sa_params;    // List of mechanism parameters
  *   char const         *sa_q;         // Value of q (preference) parameter
@@ -601,8 +601,8 @@
  * @endcode
  */
 
-msg_hclass_t sip_security_client_class[] = 
-SIP_HEADER_CLASS(security_client, "Security-Client", "", 
+msg_hclass_t sip_security_client_class[] =
+SIP_HEADER_CLASS(security_client, "Security-Client", "",
 		 sa_params, append, security_agree);
 
 issize_t sip_security_client_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -638,8 +638,8 @@
  * @code
  * typedef struct sip_security_agree_s
  * {
- *   sip_common_t        sa_common[1]; // Common fragment info 
- *   sip_security_server_t *sa_next;   // Link to next mechanism 
+ *   sip_common_t        sa_common[1]; // Common fragment info
+ *   sip_security_server_t *sa_next;   // Link to next mechanism
  *   char const         *sa_mec;       // Security mechanism
  *   msg_param_t const  *sa_params;    // List of mechanism parameters
  *   char const         *sa_q;         // Value of q (preference) parameter
@@ -650,8 +650,8 @@
  * @endcode
  */
 
-msg_hclass_t sip_security_server_class[] = 
-SIP_HEADER_CLASS(security_server, "Security-Server", "", 
+msg_hclass_t sip_security_server_class[] =
+SIP_HEADER_CLASS(security_server, "Security-Server", "",
 		 sa_params, append, security_agree);
 
 issize_t sip_security_server_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -687,8 +687,8 @@
  * @code
  * typedef struct sip_security_agree_s
  * {
- *   sip_common_t        sa_common[1]; // Common fragment info 
- *   sip_security_verify_t *sa_next;   // Link to next mechanism 
+ *   sip_common_t        sa_common[1]; // Common fragment info
+ *   sip_security_verify_t *sa_next;   // Link to next mechanism
  *   char const         *sa_mec;       // Security mechanism
  *   msg_param_t const  *sa_params;    // List of mechanism parameters
  *   char const         *sa_q;         // Value of q (preference) parameter
@@ -700,8 +700,8 @@
  */
 
 
-msg_hclass_t sip_security_verify_class[] = 
-SIP_HEADER_CLASS(security_verify, "Security-Verify", "", 
+msg_hclass_t sip_security_verify_class[] =
+SIP_HEADER_CLASS(security_verify, "Security-Verify", "",
 		 sa_params, append, security_agree);
 
 issize_t sip_security_verify_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -718,10 +718,10 @@
 /* RFC 3323 */
 
 /**@SIP_HEADER sip_privacy Privacy Header
- * 
+ *
  * The Privacy header is used by User-Agent to request privacy services from
  * the network. Its syntax is defined in @RFC3323 as follows:
- * 
+ *
  * @code
  *    Privacy-hdr  =  "Privacy" HCOLON priv-value *(";" priv-value)
  *    priv-value   =   "header" / "session" / "user" / "none" / "critical"
@@ -740,9 +740,9 @@
  * The #sip_privacy_t is defined as follows:
  * @code
  * typedef struct sip_privacy_s {
- *   sip_common_t       priv_common[1];	// Common fragment info 
- *   sip_error_t       *priv_next;     	// Dummy link 
- *   msg_param_t const *priv_values;   	// List of privacy values 
+ *   sip_common_t       priv_common[1];	// Common fragment info
+ *   sip_error_t       *priv_next;     	// Dummy link
+ *   msg_param_t const *priv_values;   	// List of privacy values
  * } sip_privacy_t;
  * @endcode
  */
@@ -752,10 +752,10 @@
 
 #define sip_privacy_update NULL
 
-msg_hclass_t sip_privacy_class[] = 
+msg_hclass_t sip_privacy_class[] =
 SIP_HEADER_CLASS(privacy, "Privacy", "", priv_values, single, privacy);
 
-static 
+static
 issize_t sip_privacy_token_scan(char *start)
 {
   char *s = start;
@@ -811,7 +811,7 @@
   }
 
   MSG_TERM_E(b, end);
-    
+
   return b - b0;
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_session.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_session.c	Tue Dec 16 13:05:22 2008
@@ -52,9 +52,9 @@
 
 /**@SIP_HEADER sip_session_expires Session-Expires Header
  *
- * The Session-Expires header is used to convey the lifetime of the session. 
+ * The Session-Expires header is used to convey the lifetime of the session.
  * Its syntax is defined in @RFC4028 as follows:
- * 
+ *
  * @code
  *      Session-Expires  =  ("Session-Expires" | "x") HCOLON delta-seconds
  *                           *(SEMI se-params)
@@ -78,7 +78,7 @@
  *  sip_common_t    x_common[1];
  *  sip_unknown_t  *x_next;
  *  unsigned long   x_delta; //Delta Seconds
- *  msg_param_t    *x_params; 
+ *  msg_param_t    *x_params;
  *  char const     *x_refresher; //Who will send the refresh UAS or UAC
  * } sip_session_expires_t;
  * @endcode
@@ -89,7 +89,7 @@
 static msg_update_f sip_session_expires_update;
 
 msg_hclass_t sip_session_expires_class[] =
-SIP_HEADER_CLASS(session_expires, "Session-Expires", "x", x_params, single, 
+SIP_HEADER_CLASS(session_expires, "Session-Expires", "x", x_params, single,
 		 session_expires);
 
 issize_t sip_session_expires_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
@@ -113,7 +113,7 @@
   sip_session_expires_t const *o = h->sh_session_expires;
 
   n = snprintf(b, bsiz, "%lu", o->x_delta);
-  b += n; 
+  b += n;
   MSG_PARAMS_E(b, end, o->x_params, flags);
 
   return b - b0;
@@ -124,11 +124,11 @@
   sip_session_expires_t const *o = h->sh_session_expires;
 
   MSG_PARAMS_SIZE(offset, o->x_params);
-   
+
   return offset;
 }
 
-/** Duplicate one #sip_session_expires_t object */ 
+/** Duplicate one #sip_session_expires_t object */
 char *sip_session_expires_dup_one(sip_header_t *dst, sip_header_t const *src,
 				  char *b, isize_t xtra)
 {
@@ -144,7 +144,7 @@
 }
 
 /** Update parameters in @SessionExpires header. */
-static int sip_session_expires_update(msg_common_t *h, 
+static int sip_session_expires_update(msg_common_t *h,
 				      char const *name, isize_t namelen,
 				      char const *value)
 {
@@ -153,7 +153,7 @@
   if (name == NULL) {
     x->x_refresher = NULL;
   }
-  else if (namelen == strlen("refresher") && 
+  else if (namelen == strlen("refresher") &&
 	   !strncasecmp(name, "refresher", namelen)) {
     x->x_refresher = value;
   }
@@ -167,7 +167,7 @@
  *
  * The Min-SE header is used to indicate the minimum value for the session
  * interval. Its syntax is defined in @RFC4028 as follows:
- * 
+ *
  * @code
  *      MMin-SE  =  "Min-SE" HCOLON delta-seconds *(SEMI generic-param)
  * @endcode
@@ -221,7 +221,7 @@
   sip_min_se_t const *o = (sip_min_se_t *)h;
 
   n = snprintf(b, bsiz, "%lu", o->min_delta);
-  b += n; 
+  b += n;
   MSG_PARAMS_E(b, end, o->min_params, flags);
 
   return b - b0;
@@ -232,11 +232,11 @@
   sip_min_se_t const *o = (sip_min_se_t *)h;
 
   MSG_PARAMS_SIZE(offset, o->min_params);
-   
+
   return offset;
 }
 
-/** Duplicate one #sip_min_se_t object */ 
+/** Duplicate one #sip_min_se_t object */
 char *sip_min_se_dup_one(sip_header_t *dst, sip_header_t const *src,
 			char *b, isize_t xtra)
 {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_status.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_status.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_status.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@ingroup sip_status_codes
  * @CFILE sip_status.c
- * 
+ *
  * SIP status codes and standard phrases.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -37,22 +37,22 @@
 #include <stddef.h>
 #include <sofia-sip/sip_status.h>
 
-char const 
+char const
   sip_100_Trying[] =                   "Trying",
   sip_180_Ringing[] =                  "Ringing",
   sip_181_Call_is_being_forwarded[] =  "Call Is Being Forwarded",
   sip_182_Queued[] =                   "Queued",
   sip_183_Session_progress[] =         "Session Progress",
-  
+
   sip_200_OK[] =                       "OK",
   sip_202_Accepted[] =                 "Accepted",
-  
+
   sip_300_Multiple_choices[] =         "Multiple Choices",
   sip_301_Moved_permanently[] =        "Moved Permanently",
   sip_302_Moved_temporarily[] =        "Moved Temporarily",
   sip_305_Use_proxy[] =                "Use Proxy",
   sip_380_Alternative_service[] =      "Alternative Service",
-  
+
   sip_400_Bad_request[] =              "Bad Request",
   sip_401_Unauthorized[] =             "Unauthorized",
   sip_402_Payment_required[] =         "Payment Required",
@@ -75,7 +75,7 @@
   sip_421_Extension_required[] =       "Extension Required",
   sip_422_Session_timer[] =            "Session Interval Too Small",
   sip_423_Interval_too_brief[] =       "Interval Too Brief",
-  
+
   sip_480_Temporarily_unavailable[] =  "Temporarily Unavailable",
   sip_481_No_transaction[] =           "Call/Transaction Does Not Exist",
   sip_482_Loop_detected[] =            "Loop Detected",
@@ -114,13 +114,13 @@
  * empty string "" is returned.
  *
  * @param status well-known status code in range 100..699
- * 
+ *
  * @return
  * A response message corresponding to status code, or NULL upon an error.
  */
 char const *sip_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/sip/sip_tag.c.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag.c.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag.c.in	Tue Dec 16 13:05:22 2008
@@ -87,7 +87,7 @@
 };
 
 /** List of all string tags for SIP headers  */
-tag_type_t sip_tag_str_list[] = 
+tag_type_t sip_tag_str_list[] =
 {
   siptag_#xxxxxx#_str,
   NULL

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag_class.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag_class.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_tag_class.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@SIP_TAG
- * 
+ *
  * @CFILE sip_tag_class.c  SIP Tag classes
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -54,7 +54,7 @@
  * Tags in this class are not automatically added to the message with
  * sip_add_tl() or sip_add_tagis().
  */
-tag_class_t sipexthdrtag_class[1] = 
+tag_class_t sipexthdrtag_class[1] =
   {{
     sizeof(siphdrtag_class),
     /* tc_next */     NULL,
@@ -72,7 +72,7 @@
 
 
 /** Tag class for SIP header tags. @HIDE */
-tag_class_t siphdrtag_class[1] = 
+tag_class_t siphdrtag_class[1] =
   {{
     sizeof(siphdrtag_class),
     /* tc_next */     NULL,
@@ -89,7 +89,7 @@
   }};
 
 /** Tag class for SIP header string tags. @HIDE */
-tag_class_t sipstrtag_class[1] = 
+tag_class_t sipstrtag_class[1] =
   {{
     sizeof(sipstrtag_class),
     /* tc_next */     NULL,
@@ -106,7 +106,7 @@
   }};
 
 /** Tag class for SIP message tags. @HIDE */
-tag_class_t sipmsgtag_class[1] = 
+tag_class_t sipmsgtag_class[1] =
   {{
     sizeof(sipmsgtag_class),
     /* tc_next */     NULL,
@@ -125,16 +125,16 @@
 /** Filter a for SIP header tag.
  *
  * @param[in] dst tag list for filtering result. May be NULL.
- * @param[in] f   filter tag 
- * @param[in] src tag item from source list. 
- * @param[in,out] bb pointer to pointer of mempory area used to dup 
+ * @param[in] f   filter tag
+ * @param[in] src tag item from source list.
+ * @param[in,out] bb pointer to pointer of mempory area used to dup
  *                   the filtering result
  *
  * This function is also used to calculate size for filtering result.
  */
 tagi_t *siptag_filter(tagi_t *dst,
 		      tagi_t const f[],
-		      tagi_t const *src, 
+		      tagi_t const *src,
 		      void **bb)
 {
   tagi_t stub[2] = {{ NULL }};
@@ -154,7 +154,7 @@
       return dst;
 
     hh = (sip_header_t const **)
-      msg_hclass_offset((msg_mclass_t *)sip->sip_common->h_class, 
+      msg_hclass_offset((msg_mclass_t *)sip->sip_common->h_class,
 			(msg_pub_t *)sip, hc);
 
     /* Is header present in the SIP message? */
@@ -242,7 +242,7 @@
 	    msg_header_remove(msg, (msg_pub_t *)sip, *hh);
 	}
 	continue;
-      } 
+      }
 
       if (tag == siptag_header)
 	hc = h->sh_class;
@@ -288,13 +288,13 @@
  *
  * @par Example
  * @code
- * url->url_headers = 
+ * url->url_headers =
  *   sip_headers_as_url_query(home, SIPTAG_REPLACES(replaces), TAG_END());
  * @endcode
- * 
+ *
  * @since New in @VERSION_1_12_4.
  *
- * @sa 
+ * @sa
  * url_query_as_header_string(), sip_url_query_as_taglist(),
  * nta_msg_request_complete(),
  * @RFC3261 section 19.1.1 "Headers", #url_t, url_s#url_headers
@@ -383,12 +383,12 @@
     for (;*n; n++)
       if (isupper(*n))
 	*n = tolower(*n);
-    
+
     slen = strlen(s); elen = url_esclen(s, HNV_RESERVED);
 
     if ((size_t)elen == slen)
       return su_strlst_append(l, s);
-    
+
     escaped = su_alloc(lhome, elen + 1);
     if (escaped)
       return su_strlst_append(l, url_escape(escaped, s, HNV_RESERVED));
@@ -403,9 +403,9 @@
  * Unknown headers are encoded as SIPTAG_HEADER_STR().
  *
  * @param home memory home used to alloate string (if NULL, malloc() it)
- * @param query query part from SIP URL 
+ * @param query query part from SIP URL
  * @param parser optional SIP parser used
- * 
+ *
  * @sa sip_add_tl(), sip_add_tagis(), SIPTAG_HEADER_STR(),
  * sip_headers_as_url_query(), url_query_as_header_string(),
  * @RFC3261 section 19.1.1 "Headers", #url_t, url_s#url_headers

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_time.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_time.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_time.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@CFILE sip_time.c 
+/**@CFILE sip_time.c
  * @brief SIP time handling
  *
  * Functions for handling time and dates in SIP.
@@ -53,7 +53,7 @@
 
 /**@ingroup sip_expires
  *
- * Calculate the expiration time for a SIP @Contact. 
+ * Calculate the expiration time for a SIP @Contact.
  *
  * @param m     @Contact header
  * @param ex    @Expires header
@@ -66,8 +66,8 @@
  *
  * @note If @a now is 0, the function gets the current time using sip_now().
  *
- * @return 
- *   The expiration time in seconds. 
+ * @return
+ *   The expiration time in seconds.
  */
 sip_time_t sip_contact_expires(sip_contact_t const *m,
 			       sip_expires_t const *ex,
@@ -92,7 +92,7 @@
   }
 
   if (time) {
-    if (date) 
+    if (date)
       now = date->d_time;
     else if (now == 0)
       now = sip_now();

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_util.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@CFILE sip_util.c
- * 
+ *
  * SIP utility functions.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -59,7 +59,7 @@
 #include <limits.h>
 #include <ctype.h>
 
-/** 
+/**
  * Compare two SIP addresses ( @From or @To headers).
  *
  * @retval nonzero if matching.
@@ -68,12 +68,12 @@
 int sip_addr_match(sip_addr_t const *a, sip_addr_t const *b)
 {
   return
-    (a->a_tag == NULL || b->a_tag == NULL || 
+    (a->a_tag == NULL || b->a_tag == NULL ||
      strcmp(a->a_tag, b->a_tag) == 0)
     &&
-    str0casecmp(a->a_host, b->a_host) == 0 
+    str0casecmp(a->a_host, b->a_host) == 0
     &&
-    str0cmp(a->a_user, b->a_user) == 0 
+    str0cmp(a->a_user, b->a_user) == 0
     &&
     str0cmp(a->a_url->url_scheme, b->a_url->url_scheme);
 }
@@ -142,14 +142,14 @@
  * parameter is included in the URI unless the transport protocol is UDP.
  *
  * @param home      memory home
- * @param v         @Via header field structure 
+ * @param v         @Via header field structure
  *                  (with <sent-protocol> and <sent-by> parameters)
  * @param user      username for @Contact URI (may be NULL)
  *
  * @retval contact header structure
  * @retval NULL upon an error
  *
- * @sa sip_contact_create_from_via_with_transport(), 
+ * @sa sip_contact_create_from_via_with_transport(),
  *     sip_contact_string_from_via()
  */
 sip_contact_t *
@@ -297,12 +297,12 @@
 }
 
 /**Perform sanity check on a SIP message
- * 
- * Check that the SIP message has all the mandatory fields. 
+ *
+ * Check that the SIP message has all the mandatory fields.
  *
  * @param sip SIP message to be checked
  *
- * @return 
+ * @return
  * When the SIP message fulfills the minimum requirements, return zero,
  * otherwise a negative status code.
  */
@@ -331,7 +331,7 @@
 	return -1;
       break;
 
-    case url_tel: 
+    case url_tel:
       if (!ruri->url_user || strlen(ruri->url_user) == 0)
 	return -1;
       break;
@@ -354,7 +354,7 @@
  * string is modified when parsing. The home is used to allocate extra
  * memory required when parsing, e.g., for parameter list or when there
  * string contains multiple header fields.
- * 
+ *
  * @deprecated
  * Use msg_header_make() or header-specific make functions, e.g.,
  * sip_via_make().
@@ -370,9 +370,9 @@
 
     for (n = slen; n >= 1 && IS_LWS(s[n - 1]); n--)
       ;
-    
+
     s[n] = '\0';
-    
+
     assert(SIP_HDR_TEST(h));
 
     return h->sh_class->hc_parse(home, h, s, slen);
@@ -416,9 +416,9 @@
     if (n > -1 && n + 1 <= len)
       break;
     if (n > -1)			/* glibc >2.1 */
-      len = n + 1;		
+      len = n + 1;
     else			/* glibc 2.0 */
-      len *= 2;			
+      len *= 2;
   }
 
   return rv;
@@ -434,7 +434,7 @@
     return h->sh_class->hc_dxtra(h, h->sh_class->hc_size);
 }
 
-/** Duplicate a url or make a url out of string. 
+/** Duplicate a url or make a url out of string.
  * @deprecated Use url_hdup() instead.
  */
 url_t *sip_url_dup(su_home_t *home, url_t const *o)
@@ -443,13 +443,13 @@
 }
 
 /**Calculate Q value.
- * 
+ *
  * Convert q-value string @a q to numeric value
  * in range (0..1000).  Q values are used, for instance, to describe
  * relative priorities of registered contacts.
  *
  * @param q q-value string <code>("1" | "." 1,3DIGIT)</code>
- * 
+ *
  * @return An integer in range 0 .. 1000.
  */
 unsigned sip_q_value(char const *q)
@@ -466,7 +466,7 @@
     return 1000;
   if (q[0] == '\0')
     return 0;
-  if (q[0] != '.')      
+  if (q[0] != '.')
     return 500;    /* Garbage... */
 
   if (q[1] >= '0' && q[1] <= '9') {
@@ -478,7 +478,7 @@
 	if (q[4] > '5' && q[4] <= '9')
 	  /* Round upwards */
 	  value += 1;
-	else if (q[4] == '5') 
+	else if (q[4] == '5')
 	  value += value & 1; /* Round to even */
       }
     }
@@ -490,7 +490,7 @@
 
 /**@ingroup sip_route
  *
- * Get first route header and remove it from its fragment chain. 
+ * Get first route header and remove it from its fragment chain.
  *
  */
 sip_route_t *sip_route_remove(msg_t *msg, sip_t *sip)
@@ -505,14 +505,14 @@
 
 /**@ingroup sip_route
  *
- * Get last route header and remove it from its fragment chain. 
+ * Get last route header and remove it from its fragment chain.
  *
  */
 sip_route_t *sip_route_pop(msg_t *msg, sip_t *sip)
 {
   sip_route_t *r;
 
-  for (r = sip->sip_route; r; r = r->r_next) 
+  for (r = sip->sip_route; r; r = r->r_next)
     if (r->r_next == NULL) {
       msg_header_remove(msg, (msg_pub_t *)sip, (msg_header_t *)r);
       return r;
@@ -524,13 +524,13 @@
 
 /**@ingroup sip_route
  *
- * Get first route header and rewrite the RequestURI. 
+ * Get first route header and rewrite the RequestURI.
  */
 sip_route_t *sip_route_follow(msg_t *msg, sip_t *sip)
 {
   if (sip->sip_route) {
-    /* XXX - in case of outbound proxy, route may contain our address */ 
-      
+    /* XXX - in case of outbound proxy, route may contain our address */
+
     sip_route_t *r = sip_route_remove(msg, sip);
     sip_request_t *rq = sip->sip_request;
 
@@ -546,12 +546,12 @@
 }
 
 /**@ingroup sip_route
- * 
+ *
  * Check if route header has lr param.
  *
  * "lr" param can be either URL or header parameter.
  */
-int 
+int
 sip_route_is_loose(sip_route_t const *r)
 {
   if (!r)
@@ -566,7 +566,7 @@
  *
  * Reverse a route header (@Route, @RecordRoute, @Path, @ServiceRoute).
  */
-sip_route_t *sip_route_reverse_as(su_home_t *home, 
+sip_route_t *sip_route_reverse_as(su_home_t *home,
 				  msg_hclass_t *hc,
 				  sip_route_t const *route)
 {
@@ -580,8 +580,8 @@
     *r->r_url = *route->r_url;
     /* Fix broken (Record-)Routes without <> */
     if (r->r_url->url_params == NULL
-	&& r->r_params 
-	&& r->r_params[0] 
+	&& r->r_params
+	&& r->r_params[0]
 	&& (r->r_params[0][0] == 'l' || r->r_params[0][0] == 'L')
 	&& (r->r_params[0][1] == 'r' || r->r_params[0][1] == 'R')
 	&& (r->r_params[0][2] == '=' || r->r_params[0][2] == 0))
@@ -590,7 +590,7 @@
     else
       r->r_params = route->r_params;
     tmp = (sip_route_t *)msg_header_dup_as(home, hc, (msg_header_t *)r);
-    if (!tmp) 
+    if (!tmp)
       goto error;
     tmp->r_next = reverse;
     reverse = tmp;
@@ -606,7 +606,7 @@
 
 /**@ingroup sip_route
  *
- * Reverse a @Route header. 
+ * Reverse a @Route header.
  *
  * Reverse A route header like @RecordRoute or @Path.
  */
@@ -634,8 +634,8 @@
     *r->r_url = *route->r_url;
     /* Fix broken (Record-)Routes without <> */
     if (r->r_url->url_params == NULL
-	&& r->r_params 
-	&& r->r_params[0] 
+	&& r->r_params
+	&& r->r_params[0]
 	&& (r->r_params[0][0] == 'l' || r->r_params[0][0] == 'L')
 	&& (r->r_params[0][1] == 'r' || r->r_params[0][1] == 'R')
 	&& (r->r_params[0][2] == '=' || r->r_params[0][2] == 0))
@@ -658,7 +658,7 @@
 
 /**@ingroup sip_route
  *
- * Fix and duplicate a @Route header. 
+ * Fix and duplicate a @Route header.
  *
  * Copy a route header like @RecordRoute or @Path as @Route.
  *
@@ -698,14 +698,14 @@
 
   for (r = route; r; r = r->r_next) {
     /* Keep track of first header structure on this header line */
-    if (!h 
+    if (!h
 	|| (char *)h->sh_data + h->sh_len != r->r_common->h_data
 	|| r->r_common->h_len)
       h = (sip_header_t *)r;
 
     if (r->r_url->url_params == NULL
-	&& r->r_params 
-	&& r->r_params[0] 
+	&& r->r_params
+	&& r->r_params[0]
 	&& (r->r_params[0][0] == 'l' || r->r_params[0][0] == 'L')
 	&& (r->r_params[0][1] == 'r' || r->r_params[0][1] == 'R')
 	&& (r->r_params[0][2] == '=' || r->r_params[0][2] == 0)) {
@@ -723,7 +723,7 @@
 
 /**@ingroup sip_via
  *
- * Get first via header and remove it from its fragment chain. 
+ * Get first via header and remove it from its fragment chain.
  */
 sip_via_t *sip_via_remove(msg_t *msg, sip_t *sip)
 {
@@ -731,7 +731,7 @@
 
   if (sip == NULL)
     return NULL;
-  
+
   for (v = sip->sip_via; v; v = v->v_next) {
     sip_fragment_clear(v->v_common);
 
@@ -762,12 +762,12 @@
   return total;
 }
 
-/** 
+/**
  * Remove extra parameters from an AOR URL.
  *
  * The extra parameters listed in the @RFC3261 table 1 include port number,
  * method, maddr, ttl, transport, lr and headers.
- * 
+ *
  * @note The funtion modifies the @a url and the strings attached to it.
  *
  * @retval 0 when successful
@@ -783,9 +783,9 @@
 
   if (url->url_params)
     url_strip_transport(url);
-    
+
   if (url->url_params)
-    url->url_params = 
+    url->url_params =
       url_strip_param_string((char *)url->url_params, "lr");
 
   return 0;
@@ -809,7 +809,7 @@
   for (;;s = s->sa_next, v = v->sa_next) {
     if (s == NULL || v == NULL)
       return (s == NULL) - (v == NULL);
-    
+
     if ((retval = str0cmp(s->sa_mec, v->sa_mec)))
       return retval;
 
@@ -827,7 +827,7 @@
     }
 
     for (i = 0, j = 0;; i++, j++) {
-      if (digest && v_params[j] && 
+      if (digest && v_params[j] &&
 	  strncasecmp(v_params[j], "d-ver=", 6) == 0) {
 	if (return_d_ver)
 	  *return_d_ver = v_params[j] + strlen("d-ver=");
@@ -835,8 +835,8 @@
       }
 
       retval = str0cmp(s_params[i], v_params[j]);
-      
-      if (retval || s_params[i] == NULL || v_params[j] == NULL) 
+
+      if (retval || s_params[i] == NULL || v_params[j] == NULL)
 	break;
     }
 
@@ -845,7 +845,7 @@
   }
 }
 
-/** Select best mechanism from @SecurityClient header. 
+/** Select best mechanism from @SecurityClient header.
  *
  * @note We assume that @SecurityServer header in @a s is sorted by
  * preference.
@@ -871,11 +871,11 @@
 
 /**Checks if the response with given response code terminates dialog or
  * dialog usage.
- * 
+ *
  * @return -1 if the response with given code terminates whole dialog.
  * @return 1 if the response terminates the dialog usage.
  * @return 0 if the response does not terminate dialog or dialog usage.
- * 
+ *
  * @return
  * The @a *return_graceful_terminate_usage is set to 1, if application
  * should gracefully terminate its dialog usage. It is set to 0, if no
@@ -892,25 +892,25 @@
   enum { no_effect, terminate_usage = 1, terminate_dialog = -1 };
   int dummy;
 
-  if (!return_graceful_terminate_usage) 
+  if (!return_graceful_terminate_usage)
     return_graceful_terminate_usage = &dummy;
 
   if (response_code < 300)
     return *return_graceful_terminate_usage = 0;
 
-  /*  
+  /*
       3xx responses: Redirection mid-dialog is not well understood in SIP,
       but whatever effect it has impacts the entire dialog and all of
       its usages equally.  In our example scenario, both the
       subscription and the invite usage would be redirected by this
       single response.
   */
-  if (response_code < 400) 
+  if (response_code < 400)
     return *return_graceful_terminate_usage = 0;
 
   if (response_code < 500) switch (response_code) {
   default:
-  case 400: /** @par 400 and unrecognized 4xx responses 
+  case 400: /** @par 400 and unrecognized 4xx responses
 
       These responses affect only the NOTIFY transaction, not the
       subscription, the dialog it resides in (beyond affecting the local
@@ -921,16 +921,16 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 401: 
+  case 401:
   case 407: /** @par 401 Unauthorized and 407 Proxy Authentication Required
 
       This request, not the subscription or dialog, is being challenged. The
       usages and dialog are not terminated.
-    */ 
+    */
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 402: /** @par 402 Payment Required 
+  case 402: /** @par 402 Payment Required
 
       This is a reserved response code. If encountered, it should be
       treated as an unrecognized 4xx.
@@ -938,7 +938,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 403: /** @par 403 Forbidden 
+  case 403: /** @par 403 Forbidden
 
       This response terminates the subscription, but has no effect on
       any other usages of the dialog. In our example scenario, the
@@ -948,8 +948,8 @@
     */
     *return_graceful_terminate_usage = 0;
     return 0;
-    
-  case 404: /** @par 404 Not Found 
+
+  case 404: /** @par 404 Not Found
 
       This response destroys the dialog and all usages sharing it. The
       Request-URI that is being 404ed is the remote target set by the
@@ -958,7 +958,7 @@
     */
     return terminate_dialog;
 
-  case 405: /** @par 405 Method Not Allowed 
+  case 405: /** @par 405 Method Not Allowed
 
       In our example scenario, this response destroys the subscription,
       but not the invite usage or the dialog. It's an aberrant case for
@@ -977,9 +977,9 @@
       return 0;
     }
 
-  case 406: /** @par 406 Not Acceptable 
+  case 406: /** @par 406 Not Acceptable
 
-      These responses concern details of the message in the transaction. 
+      These responses concern details of the message in the transaction.
       Subsequent requests in this same usage may succeed. Neither the
       usage nor dialog is terminated, other usages sharing this dialog
       are unaffected.
@@ -987,7 +987,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 408: /** @par 408 Request Timeout 
+  case 408: /** @par 408 Request Timeout
 
       Receiving a 408 will have the same effect on
       usages and dialogs as a real transaction timeout as described in
@@ -995,7 +995,7 @@
     */
     return terminate_usage;
 
-  case 410: /** @par 410 Gone 
+  case 410: /** @par 410 Gone
 
       This response destroys the dialog and all usages sharing
       it.  The Request-URI that is being rejected is the remote target
@@ -1007,13 +1007,13 @@
     */
     return terminate_dialog;
 
-  case 412: /* Conditional Request Failed: */ 
+  case 412: /* Conditional Request Failed: */
   case 413: /* Request Entity Too Large: */
   case 414: /* Request-URI Too Long: */
   case 415: /* Unsupported Media Type: */
-    /** @par 412, 413, 414 and 415 
+    /** @par 412, 413, 414 and 415
 
-      These responses concern details of the message in the transaction. 
+      These responses concern details of the message in the transaction.
       Subsequent requests in this same usage may succeed. Neither the usage
       nor dialog is terminated, other usages sharing this dialog are
       unaffected.
@@ -1021,7 +1021,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 416: /** @par 416 Unsupported URI Scheme 
+  case 416: /** @par 416 Unsupported URI Scheme
 
       Similar to 404 and 410, this response
       came to a request whose Request-URI was provided by the peer in a
@@ -1038,7 +1038,7 @@
       @CSeq.  No other usages of the dialog are affected.
     */
 
-  case 420: /* Bad Extension */ 
+  case 420: /* Bad Extension */
   case 421: /* Extension Required */
 
     /** @par 420 Bad Extension and 421 Extension Required
@@ -1060,7 +1060,7 @@
       usages are unaffected.
     */
 
-  case 423: /** @par 423 Interval Too Brief 
+  case 423: /** @par 423 Interval Too Brief
 
       This response won't happen in our example
       scenario, but if it came in response to a re-SUBSCRIBE, the
@@ -1075,11 +1075,11 @@
       affected by a change in its local @CSeq.  No other usages of the
       dialog are affected. */
 
-  case 429: /** @par 429 Provide Referrer Identity 
+  case 429: /** @par 429 Provide Referrer Identity
 
       This response won't be returned to a NOTIFY as in our example
       scenario, but when it is returned to a REFER, it is objecting to
-      the REFER request itself, not any usage the REFER occurs within. 
+      the REFER request itself, not any usage the REFER occurs within.
       The usage is unaffected. Any other usages sharing this dialog are
       unaffected. The dialog is only affected by a change in its local
       @CSeq.
@@ -1087,7 +1087,7 @@
 
   case 436: case 437: case 438:
     /** @par 436 Bad Identity-Info, 437 Unsupported Certificate, 438 Invalid \
-     *  Identity Header 
+     *  Identity Header
      *
      * These responses object to the request, not the usage.
      * The usage is not affected.  The dialog is only affected by a
@@ -1110,7 +1110,7 @@
     return terminate_usage;
 
 
-  case 481: /** @par 481 Call/Transaction Does Not Exist 
+  case 481: /** @par 481 Call/Transaction Does Not Exist
 
       This response indicates that the peer has lost its copy of the dialog
       state. The dialog and any usages sharing it are destroyed.
@@ -1136,7 +1136,7 @@
     return terminate_usage;
 
 
-  case 482: /** @par 482 Loop Detected 
+  case 482: /** @par 482 Loop Detected
 
       This response is aberrant mid-dialog.  It will
       only occur if the @RecordRoute header field was improperly
@@ -1144,12 +1144,12 @@
       initial usage, or if a mid-dialog request forks and merges (which
       should never happen).  Future requests using this dialog state
       will also fail.  The dialog and any usages sharing it are
-      destroyed.  
+      destroyed.
     */
     return terminate_dialog;
 
 
-  case 483: /** @par 483 Too Many Hops 
+  case 483: /** @par 483 Too Many Hops
 
       Similar to 482, receiving this mid-dialog is
       aberrant.  Unlike 482, recovery may be possible by increasing
@@ -1158,7 +1158,7 @@
       than it used for an initial request).  If the request isn't tried
       with an increased @MaxForwards, then the agent should attempt to
       gracefully terminate this usage and all other usages that share
-      its dialog.  
+      its dialog.
     */
     *return_graceful_terminate_usage = 1;
     return 0;
@@ -1174,7 +1174,7 @@
     */
     return terminate_dialog;
 
-  case 486: /** @par 486 Busy Here 
+  case 486: /** @par 486 Busy Here
 
       This response is non-sensical in our example scenario,
       or in any scenario where this response comes inside an established
@@ -1190,7 +1190,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 487: /** @par 487 Request Terminated 
+  case 487: /** @par 487 Request Terminated
 
       This response speaks to the disposition of a
       particular request (transaction).  The usage in which that request
@@ -1201,7 +1201,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 488: /** @par 488 Not Acceptable Here 
+  case 488: /** @par 488 Not Acceptable Here
 
       This response is objecting to the request,
       not the usage.  The usage is not affected.  The dialog is only
@@ -1211,7 +1211,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 489: /** @par 489 Bad Event 
+  case 489: /** @par 489 Bad Event
 
       In our example scenario, @RFC3265 declares that the
       subscription usage in which the NOTIFY is sent is terminated.  The
@@ -1224,7 +1224,7 @@
     *return_graceful_terminate_usage = 0;
     return method == sip_method_notify ? terminate_usage : no_effect;
 
-  case 491: /** @par 491 Request Pending 
+  case 491: /** @par 491 Request Pending
 
       This response addresses in-dialog request glare.
       Its affect is scoped to the request.  The usage in which the
@@ -1235,7 +1235,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 493: /** @par 493 Undecipherable 
+  case 493: /** @par 493 Undecipherable
 
       This response objects to the request, not the
       usage.  The usage is not affected.  The dialog is only affected by
@@ -1245,7 +1245,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 494: /** @par 494 Security Agreement Required 
+  case 494: /** @par 494 Security Agreement Required
 
       This response is objecting to the
       request, not the usage.  The usage is not affected.  The dialog is
@@ -1278,7 +1278,7 @@
     /* Do not change *return_graceful_terminate_usage */
     return 0;
 
-  case 501: /** @par 501 Not Implemented 
+  case 501: /** @par 501 Not Implemented
 
       This would be a degenerate response in our
       example scenario since the NOTIFY is being sent as part of an
@@ -1294,7 +1294,7 @@
     /* Do not change *return_graceful_terminate_usage */
     return 0;
 
-  case 502: /** @par 502 Bad Gateway 
+  case 502: /** @par 502 Bad Gateway
 
       This response is aberrant mid-dialog. It will only occur if the
       @RecordRoute header field was improperly constructed by the
@@ -1304,7 +1304,7 @@
     */
     return terminate_dialog;
 
-  case 503: /** @par 503 Service Unavailable 
+  case 503: /** @par 503 Service Unavailable
 
       As per @RFC3263, the logic handling locating SIP servers for
       transactions may handle 503 requests (effectively sequentially
@@ -1321,7 +1321,7 @@
     /* Do not change *return_graceful_terminate_usage */
     return 0;
 
-  case 504: /** @par 504 Server Time-out 
+  case 504: /** @par 504 Server Time-out
 
       It is not obvious under what circumstances this
       response would be returned to a request in an existing dialog.  If
@@ -1342,7 +1342,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 580: /** @par 580 Precondition Failure 
+  case 580: /** @par 580 Precondition Failure
 
       This response is objecting to the request,
       not the usage.  The usage is not affected.  The dialog is only
@@ -1360,7 +1360,7 @@
 
       Unlike 400 Bad Request, a 600 response code says something about
       the recipient user, not the request that was made. This end user
-      is stating an unwillingness to communicate. 
+      is stating an unwillingness to communicate.
 
       If the response contains a @RetryAfter header field value, the
       user is indicating willingness to communicate later and the
@@ -1378,7 +1378,7 @@
     /* Do not change graceful_terminate */
     return 0;
 
-  case 603: /** @par 603 Decline 
+  case 603: /** @par 603 Decline
 
       This response declines the action indicated by the
       associated request.  It can be used, for example, to decline a
@@ -1389,7 +1389,7 @@
     *return_graceful_terminate_usage = 0;
     return 0;
 
-  case 604: /** @par 604 Does Not Exist Anywhere 
+  case 604: /** @par 604 Does Not Exist Anywhere
 
       Like 404, this response destroys the
       dialog and all usages sharing it.  The Request-URI that is being
@@ -1399,7 +1399,7 @@
     */
     return terminate_dialog;
 
-  case 606: /** @par 606 Not Acceptable 
+  case 606: /** @par 606 Not Acceptable
 
       This response is objecting to aspects of the
       associated request, not the usage the request appears in.  The

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip.h	Tue Dec 16 13:05:22 2008
@@ -26,8 +26,8 @@
 /** Defined when <sofia-sip/sip.h> has been included. */
 #define SIP_H
 
-/**@file sofia-sip/sip.h 
- * 
+/**@file sofia-sip/sip.h
+ *
  * SIP objects.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -185,7 +185,7 @@
 typedef msg_list_t	     	    sip_require_t;
 typedef struct sip_retry_after_s    sip_retry_after_t;
 typedef struct sip_route_s     	    sip_route_t;
-typedef struct sip_rseq_s           sip_rseq_t;     
+typedef struct sip_rseq_s           sip_rseq_t;
 typedef struct msg_generic_s        sip_server_t;
 typedef struct sip_session_expires_s
                                     sip_session_expires_t;
@@ -256,7 +256,7 @@
   sip_rack_t                *sip_rack;          /**< RAck */
 
   /* Caller Preferences */
-  sip_request_disposition_t *sip_request_disposition; 
+  sip_request_disposition_t *sip_request_disposition;
                                                 /**< Request-Disposition (d) */
   sip_accept_contact_t      *sip_accept_contact;/**< Accept-Contact (a) */
   sip_reject_contact_t      *sip_reject_contact;/**< Reject-Contact (j) */
@@ -288,7 +288,7 @@
   /* RFC 3265 */
   sip_event_t               *sip_event;	        /**< Event (o) */
   sip_allow_events_t        *sip_allow_events;  /**< Allow-Events (u) */
-  sip_subscription_state_t  *sip_subscription_state; 
+  sip_subscription_state_t  *sip_subscription_state;
 				/**< Subscription-State */
 
   sip_proxy_authenticate_t  *sip_proxy_authenticate;
@@ -297,7 +297,7 @@
 				/**< Proxy-Authentication-Info */
   sip_proxy_authorization_t *sip_proxy_authorization;
 				/**< Proxy-Authorization */
-  sip_authorization_t       *sip_authorization;       
+  sip_authorization_t       *sip_authorization;
 				/**< Authorization */
   sip_www_authenticate_t    *sip_www_authenticate;
 				/**< WWW-Authenticate */
@@ -333,17 +333,17 @@
   /* Entity headers */
   sip_mime_version_t        *sip_mime_version;	/**< MIME-Version */
   sip_content_type_t        *sip_content_type;	/**< Content-Type (c) */
-  sip_content_encoding_t    *sip_content_encoding; 
+  sip_content_encoding_t    *sip_content_encoding;
 				/**< Content-Encoding (e) */
   sip_content_language_t    *sip_content_language; /**< Content-Language */
-  sip_content_disposition_t *sip_content_disposition; 
+  sip_content_disposition_t *sip_content_disposition;
 				/**< Content-Disposition */
   sip_content_length_t      *sip_content_length;/**< Content-Length (l) */
 
   /* === Headers end here */
 
   sip_unknown_t             *sip_unknown;       /**< Unknown headers */
-  sip_separator_t           *sip_separator;     
+  sip_separator_t           *sip_separator;
 				/**< Separator between headers and payload */
   sip_payload_t             *sip_payload;	/**< Message payload */
   msg_multipart_t           *sip_multipart;     /**< Multipart MIME payload */
@@ -386,7 +386,7 @@
   url_t              a_url[1];	    /**< URL */
   msg_param_t const *a_params;	    /**< Parameter table  */
   char const        *a_comment;	    /**< Comment */
- 
+
   char const        *a_tag;	    /**< Tag parameter */
 };
 
@@ -416,7 +416,7 @@
   msg_common_t       k_common[1];   /**< Common fragment info */
   msg_list_t        *k_next;	    /**< Link to next */
   msg_param_t       *k_items;	    /**< List of allowed items */
-  uint32_t           k_bitmap;	    /**< Bitmap of allowed methods. 
+  uint32_t           k_bitmap;	    /**< Bitmap of allowed methods.
 				       @NEW_1_12_5. */
 };
 
@@ -432,10 +432,10 @@
   msg_param_t const  *ai_params;    /**< List of authentication info */
 };
 
-/**@ingroup sip_call_id 
+/**@ingroup sip_call_id
  * @brief Structure for @CallID (and @InReplyTo) header fields.
  */
-struct sip_call_id_s {		
+struct sip_call_id_s {
   sip_common_t   i_common[1];	    /**< Common fragment info */
   sip_call_id_t *i_next;	    /**< Link to next (In-Reply-To) */
   char const    *i_id;		    /**< ID value */
@@ -531,7 +531,7 @@
 /**@ingroup sip_event
  * @brief Structure for @Event header.
  */
-struct sip_event_s 
+struct sip_event_s
 {
   sip_common_t        o_common[1];  /**< Common fragment info */
   sip_error_t        *o_next;	    /**< Link to next (dummy) */
@@ -686,7 +686,7 @@
   msg_param_t const  *r_params;	    /**< List of route parameters */
 };
 
-/**@ingroup sip_rseq 
+/**@ingroup sip_rseq
  * @brief Structure for @RSeq header.
  */
 struct sip_rseq_s
@@ -696,7 +696,7 @@
   unsigned long       rs_response;	/**< Sequence number of response */
 };
 
-/**@ingroup sip_session_expires 
+/**@ingroup sip_session_expires
  * @brief Structure for @SessionExpires header.
  */
 struct sip_session_expires_s
@@ -709,7 +709,7 @@
 					 * parameter: UAS or UAC */
 };
 
-/**@ingroup sip_min_se 
+/**@ingroup sip_min_se
  * @brief Structure for @MinSE header.
  */
 struct sip_min_se_s
@@ -720,7 +720,7 @@
   msg_param_t const  *min_params;	/**< List of extension parameters */
 };
 
-/**@ingroup sip_subscription_state 
+/**@ingroup sip_subscription_state
  * @brief Structure for @SubscriptionState header.
  */
 struct sip_subscription_state_s
@@ -728,7 +728,7 @@
   sip_common_t        ss_common[1];   /**< Common fragment info */
   sip_error_t        *ss_next;	      /**< Dummy link to next */
   /** Subscription state: "pending", "active" or "terminated" */
-  char const         *ss_substate; 
+  char const         *ss_substate;
   msg_param_t const  *ss_params;      /**< List of parameters */
   char const         *ss_reason;      /**< Reason for termination  */
   char const         *ss_expires;     /**< Subscription lifetime */
@@ -738,7 +738,7 @@
 /**@ingroup sip_timestamp
  * @brief Structure for @Timestamp header.
  */
-struct sip_timestamp_s 
+struct sip_timestamp_s
 {
   sip_common_t        ts_common[1]; /**< Common fragment info */
   sip_error_t        *ts_next;	    /**< Dummy link to next */
@@ -773,7 +773,7 @@
 struct sip_security_agree_s
 {
   sip_common_t        sa_common[1]; /**< Common fragment info */
-  struct sip_security_agree_s 
+  struct sip_security_agree_s
                      *sa_next;	    /**< Link to next mechanism */
   char const         *sa_mec;	    /**< Security mechanism */
   msg_param_t const  *sa_params;    /**< List of mechanism parameters */
@@ -798,7 +798,7 @@
  */
 union sip_header_u
 {
-  sip_common_t               sh_common[1]; 
+  sip_common_t               sh_common[1];
   struct
   {
     sip_common_t             shn_common;
@@ -832,7 +832,7 @@
   sip_cseq_t                 sh_cseq[1];
   sip_rseq_t                 sh_rseq[1];
   sip_rack_t                 sh_rack[1];
-                             
+
   sip_subject_t              sh_subject[1];
   sip_priority_t             sh_priority[1];
 
@@ -851,7 +851,7 @@
   sip_accept_t               sh_accept[1];
   sip_accept_encoding_t      sh_accept_encoding[1];
   sip_accept_language_t      sh_accept_language[1];
-                             
+
   sip_allow_t                sh_allow[1];
   sip_require_t              sh_require[1];
   sip_proxy_require_t        sh_proxy_require[1];
@@ -864,8 +864,8 @@
 
   sip_proxy_authenticate_t   sh_proxy_authenticate[1];
   sip_proxy_authentication_info_t sh_proxy_authentication_info[1];
-  sip_proxy_authorization_t  sh_proxy_authorization[1]; 
-                             
+  sip_proxy_authorization_t  sh_proxy_authorization[1];
+
   sip_authorization_t        sh_authorization[1];
   sip_www_authenticate_t     sh_www_authenticate[1];
   sip_authentication_info_t  sh_authentication_info[1];
@@ -882,7 +882,7 @@
   sip_request_disposition_t  sh_request_disposition[1];
   sip_accept_contact_t       sh_accept_contact[1];
   sip_reject_contact_t       sh_reject_contact[1];
-   
+
   sip_session_expires_t      sh_session_expires[1];
   sip_min_se_t               sh_min_se[1];
 
@@ -899,7 +899,7 @@
 
   sip_etag_t                 sh_etag[1];
   sip_if_match_t             sh_if_match[1];
-    
+
   /* Entity headers */
   sip_mime_version_t         sh_mime_version[1];
   sip_content_type_t         sh_content_type[1];

Modified: 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_hclasses.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h.in	Tue Dec 16 13:05:22 2008
@@ -1,11 +1,11 @@
-/** -*- C -*- 
+/** -*- C -*-
  *
  * @file sofia-sip/sip_hclasses.h.in
  *
  * Template for <sip_hclasses.h>.
  */
 
-/* 
+/*
  * This file is part of the Sofia-SIP package
  *
  * Copyright (C) 2005 Nokia Corporation.
@@ -35,9 +35,9 @@
 
 /**@file sofia-sip/sip_hclasses.h
  * @brief Declarations of SIP header classes.
- * 
+ *
  * #AUTO#
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
  * @date Created: Thu Jan 23 19:26:31 2003 ppessi
@@ -50,18 +50,18 @@
 SOFIA_BEGIN_DECLS
 
 
-enum { 
-  /**@ingroup sip_#xxxxxx# @internal 
+enum {
+  /**@ingroup sip_#xxxxxx# @internal
    *
    * Hash of @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#".
    *
    * @since New in #version#.
    */
-  sip_#xxxxxx#_hash = #hash# 
+  sip_#xxxxxx#_hash = #hash#
 };
 
 /**Header class for @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#".
- * 
+ *
  * The header class sip_#xxxxxx#_class defines how a SIP
  * @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" is parsed and printed.
  * It also contains methods used by SIP parser and other functions to

Modified: 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_header.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_header.h	Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
 
 #ifndef SIP_HEADER_H
 /**Defined when <sofia-sip/sip_header.h> has been included.*/
-#define SIP_HEADER_H 
+#define SIP_HEADER_H
 
-/**@file sofia-sip/sip_header.h 
+/**@file sofia-sip/sip_header.h
  *
  * SIP parser library prototypes.
  *
@@ -96,7 +96,7 @@
 			       msg_hclass_t *hc, sip_header_t const *o);
 
 /** Add duplicates of headers to the SIP message. */
-SOFIAPUBFUN int sip_add_headers(msg_t *msg, sip_t *sip, 
+SOFIAPUBFUN int sip_add_headers(msg_t *msg, sip_t *sip,
 				void const *extra, va_list headers);
 
 /** Add duplicates of headers from taglist to the SIP message. */
@@ -127,11 +127,11 @@
 
 /* Use __attribute__ to allow argument checking for sip_header_format() */
 #if !defined(__GNUC__) && !defined(__attribute__)
-#define __attribute__(x) 
+#define __attribute__(x)
 #endif
 
 /** Make a SIP header with formatting provided. */
-SOFIAPUBFUN sip_header_t *sip_header_format(su_home_t *home, 
+SOFIAPUBFUN sip_header_t *sip_header_format(su_home_t *home,
 					    msg_hclass_t *hc,
 					    char const *fmt,
 					    ...)
@@ -154,15 +154,15 @@
 SOFIAPUBVAR char const sip_method_name_notify[];
 SOFIAPUBVAR char const sip_method_name_refer[];
 
-/** @internal UDP transport version string. */ 
+/** @internal UDP transport version string. */
 SOFIAPUBVAR char const sip_transport_udp[];
-/** @internal TCP transport version string. */ 
+/** @internal TCP transport version string. */
 SOFIAPUBVAR char const sip_transport_tcp[];
-/** @internal SCTP transport version string. */ 
+/** @internal SCTP transport version string. */
 SOFIAPUBVAR char const sip_transport_sctp[];
-/** @internal TLS transport version string. */ 
+/** @internal TLS transport version string. */
 SOFIAPUBVAR char const sip_transport_tls[];
-/** @internal SIP version string. */ 
+/** @internal SIP version string. */
 SOFIAPUBVAR char const sip_version_2_0[];
 
 #define SIP_VERSION_CURRENT sip_version_2_0
@@ -217,12 +217,12 @@
 					      char const *domain);
 
 /** Create a @CSeq header object.  */
-SOFIAPUBFUN sip_cseq_t *sip_cseq_create(su_home_t *, uint32_t seq, 
+SOFIAPUBFUN sip_cseq_t *sip_cseq_create(su_home_t *, uint32_t seq,
 					unsigned method, char const *name);
 
 /** Create a @Contact header object. */
-SOFIAPUBFUN sip_contact_t * sip_contact_create(su_home_t *, 
-					       url_string_t const *url, 
+SOFIAPUBFUN sip_contact_t * sip_contact_create(su_home_t *,
+					       url_string_t const *url,
 					       char const *param,
 					       /* char const *params, */
 					       ...);
@@ -245,7 +245,7 @@
 SOFIAPUBFUN sip_expires_t *sip_expires_create(su_home_t *, sip_time_t delta);
 
 /** Create a @Route header object. */
-SOFIAPUBFUN sip_route_t *sip_route_create(su_home_t *home, url_t const *url, 
+SOFIAPUBFUN sip_route_t *sip_route_create(su_home_t *home, url_t const *url,
 					  url_t const *maddr);
 
 /** Create a @RecordRoute header object. */
@@ -263,10 +263,10 @@
 
 SOFIAPUBFUN int sip_to_tag(su_home_t *, sip_to_t *to, char const *tag);
 
-/** Create a @Via object. */ 
+/** Create a @Via object. */
 SOFIAPUBFUN sip_via_t *sip_via_create(su_home_t *h,
 				      char const *host,
-				      char const *port, 
+				      char const *port,
 				      char const *transport,
 				      /* char const *params */
 				      ...);
@@ -277,7 +277,7 @@
 {
   char const *tp = v->v_protocol;
   if (tp) {
-    tp = strchr(tp, '/'); 
+    tp = strchr(tp, '/');
     if (tp) {
       tp = strchr(tp + 1, '/');
       if (tp)
@@ -297,12 +297,12 @@
 
 /**@ingroup sip_payload
  *
- * Initialize a SIP payload structure with pointer to data and its length. 
+ * Initialize a SIP payload structure with pointer to data and its length.
  *
  * The SIP_PAYLOAD_INIT2() macro initializes a #sip_payload_t header
  * structure with a pointer to data and its length in octets. For
  * instance,
- * @code 
+ * @code
  *  sip_payload_t txt_payload = SIP_PAYLOAD_INIT2(txt, strlen(txt));
  * @endcode
  *
@@ -310,7 +310,7 @@
  * from heap is not required, for instance, when the resulting payload
  * structure is immediately copied.
  *
- * @HIDE 
+ * @HIDE
  */
 #define SIP_PAYLOAD_INIT2(data, length) \
   {{{ 0, 0, sip_payload_class, data, length }, NULL, data, length }}
@@ -321,7 +321,7 @@
 /** Check that a required feature is supported. */
 SOFIAPUBFUN
 sip_unsupported_t *sip_has_unsupported(su_home_t *,
-				       sip_supported_t const *support, 
+				       sip_supported_t const *support,
 				       sip_require_t const *require);
 
 SOFIAPUBFUN
@@ -349,7 +349,7 @@
 int sip_has_feature(msg_list_t const *supported, char const *feature);
 
 /** Return true if the method is listed in @Allow header. */
-SOFIAPUBFUN int sip_is_allowed(sip_allow_t const *allow, 
+SOFIAPUBFUN int sip_is_allowed(sip_allow_t const *allow,
 			       sip_method_t method, char const *name);
 
 /** Check if the well-known method is listed in @Allow header. @NEW_1_12_6. */
@@ -404,7 +404,7 @@
    *
    * @MinExpires, @Authorization, @Path, @Supported, @Contact, @Require, and
    * @Expires.
-   * 
+   *
    */
   sip_mask_registrar = (1 << 4),
 
@@ -419,7 +419,7 @@
   /** Bit marking essential headers for SIP events.
    *
    * @Event, @Expires, and @SubscriptionState.
-   * 
+   *
    * @sa @RFC3265.
    */
   sip_mask_events = (1 << 6),
@@ -427,7 +427,7 @@
   /** Bit marking essential headers for session timer extension.
    *
    * @SessionExpires, and @MinSE.
-   * 
+   *
    * @RFC4028
    */
   sip_mask_timer = (1 << 7),
@@ -435,7 +435,7 @@
   /** Bit marking essential headers for privacy extension.
    *
    * @Privacy.
-   * 
+   *
    * @sa @RFC3323
    */
   sip_mask_privacy = (1 << 8),
@@ -443,7 +443,7 @@
   /** Bit marking essential headers for caller preference extension.
    *
    * @RequestDisposition, @AcceptContact, and @RejectContact.
-   * 
+   *
    * @sa @RFC3841.
    */
   sip_mask_pref = (1 << 9),
@@ -451,13 +451,13 @@
   /** Bit marking essential headers for PUBLISH servers and clients.
    *
    * @SIPETag, and @SIPIfMatch.
-   * 
+   *
    * @sa @RFC3903.
    */
   sip_mask_publish = (1 << 10)
 
   /* NOTE:
-   * When adding bits, please update nta_agent_create() and 
+   * When adding bits, please update nta_agent_create() and
    * NTATAG_BAD_RESP_MASK()/NTATAG_BAD_REQ_MASK() documentation.
    */
 };
@@ -482,15 +482,15 @@
 /** Calculate the size of a SIP header and associated memory areas. */
 SOFIAPUBFUN isize_t sip_header_size(sip_header_t const *h);
 
-/** Duplicate (deep copy) a SIP header or whole list. */ 
+/** Duplicate (deep copy) a SIP header or whole list. */
 SOFIAPUBFUN sip_header_t *sip_header_dup(su_home_t *, sip_header_t const *);
 
 /** Copy a SIP header or whole list. */
 SOFIAPUBFUN sip_header_t *sip_header_copy(su_home_t *, sip_header_t const *o);
 
 /** Add an event to @AllowEvents header. */
-SOFIAPUBFUN int sip_allow_events_add(su_home_t *, 
-				     sip_allow_events_t *ae, 
+SOFIAPUBFUN int sip_allow_events_add(su_home_t *,
+				     sip_allow_events_t *ae,
 				     char const *e);
 
 /** Add a parameter to a @Contact header object. */
@@ -501,7 +501,7 @@
 
 SOFIAPUBFUN int sip_from_add_param(su_home_t *, sip_from_t *, char const *);
 
-/** Add a parameter to a @Via header object. */ 
+/** Add a parameter to a @Via header object. */
 SOFIAPUBFUN int sip_via_add_param(su_home_t *, sip_via_t *, char const *);
 
 #define sip_from_make_url     sip_from_create
@@ -510,4 +510,4 @@
 
 SOFIA_END_DECLS
 
-#endif 
+#endif

Modified: 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_parser.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_parser.h	Tue Dec 16 13:05:22 2008
@@ -24,10 +24,10 @@
 
 #ifndef SIP_PARSER_H
 /** Defined when <sofia-sip/sip_parser.h> has been included.*/
-#define SIP_PARSER_H 
+#define SIP_PARSER_H
 
 
-/**@ingroup sip_parser 
+/**@ingroup sip_parser
  * @file sofia-sip/sip_parser.h
  *
  * SIP parser provider interface.
@@ -130,11 +130,11 @@
 				     msg_param_t const **return_params,
 				     char const **return_comment);
 
-SOFIAPUBFUN issize_t sip_name_addr_e(char b[], isize_t bsiz, 
-				     int flags, 
-				     char const *display, 
+SOFIAPUBFUN issize_t sip_name_addr_e(char b[], isize_t bsiz,
+				     int flags,
+				     char const *display,
 				     int always_ltgt, url_t const url[],
-				     msg_param_t const params[], 
+				     msg_param_t const params[],
 				     char const *comment);
 
 SOFIAPUBFUN isize_t sip_name_addr_xtra(char const *display, url_t const *addr,
@@ -143,7 +143,7 @@
 
 SOFIAPUBFUN char *sip_name_addr_dup(char const **d_display, char const *display,
 				    url_t *d_addr, url_t const *addr,
-				    msg_param_t const **d_params, 
+				    msg_param_t const **d_params,
 				    msg_param_t const params[],
 				    char *b, isize_t xtra);
 
@@ -167,7 +167,7 @@
 #define sip_generic_dup_one	msg_generic_dup_one
 
 
-#define	sip_auth_d              msg_auth_d         
+#define	sip_auth_d              msg_auth_d
 #define	sip_auth_e              msg_auth_e
 
 #define sip_header_dup_as	msg_header_dup_as
@@ -205,12 +205,12 @@
 
 SOFIAPUBFUN int sip_generic_xtra(sip_generic_t const *g);
 
-SOFIAPUBFUN sip_generic_t *sip_generic_dup(su_home_t *home, 
-					   msg_hclass_t *hc, 
+SOFIAPUBFUN sip_generic_t *sip_generic_dup(su_home_t *home,
+					   msg_hclass_t *hc,
 					   sip_generic_t const *u);
 
 SOFIAPUBFUN sip_generic_t *sip_generic_copy(su_home_t *home,
-					    msg_hclass_t *hc, 
+					    msg_hclass_t *hc,
 					    sip_generic_t const *o);
 
 SOFIA_END_DECLS

Modified: 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_protos.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_protos.h.in	Tue Dec 16 13:05:22 2008
@@ -30,14 +30,14 @@
 
 #ifndef SIP_PROTOS_H
 /** Defined when <sofia-sip/sip_protos.h> has been included. */
-#define SIP_PROTOS_H 
-  
+#define SIP_PROTOS_H
+
 /**@file sofia-sip/sip_protos.h
- * 
+ *
  * SIP prototypes and macros for each header.
- * 
+ *
  * #AUTO#
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
  */
@@ -86,7 +86,7 @@
   return msg_header_insert(msg, (msg_pub_t *)sip, (msg_header_t *)h);
 }
 
-/** Remove a header from a SIP message. */ 
+/** Remove a header from a SIP message. */
 su_inline
 int sip_header_remove(msg_t *msg, sip_t *sip, sip_header_t *h)
 {
@@ -131,22 +131,22 @@
 
 /**Access a SIP @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#"
  * structure #sip_#xxxxxx#_t from #sip_t.
- * 
+ *
  * @since New in #version#.
  */
 #define sip_#xxxxxx#(sip) \
   ((sip_#xxxxxx#_t *)msg_header_access((msg_pub_t*)(sip), sip_#xxxxxx#_class))
 
 /**Initializer for structure #sip_#xxxxxx#_t.
- * 
+ *
  * A static #sip_#xxxxxx#_t structure for
  * @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" must be initialized with
- * the SIP_#XXXXXX#_INIT() macro. 
+ * the SIP_#XXXXXX#_INIT() macro.
  * For instance,
- * @code 
- * 
+ * @code
+ *
  *  sip_#xxxxxx#_t sip_#xxxxxx# = SIP_#XXXXXX#_INIT;
- * 
+ *
  * @endcode
  * @HI
  *
@@ -155,16 +155,16 @@
 #define SIP_#XXXXXX#_INIT() SIP_HDR_INIT(#xxxxxx#)
 
 /**Initialize a structure #sip_#xxxxxx#_t.
- * 
+ *
  * An #sip_#xxxxxx#_t structure for
  * @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" can be initialized with the
  * sip_#xxxxxx#_init() function/macro. For instance,
  * @code
- * 
+ *
  *  sip_#xxxxxx#_t sip_#xxxxxx#;
- * 
+ *
  *  sip_#xxxxxx#_init(&sip_#xxxxxx#);
- * 
+ *
  * @endcode
  * @HI
  *
@@ -181,14 +181,14 @@
 #endif
 
 /**Test if header object is instance of #sip_#xxxxxx#_t.
- * 
+ *
  * Check if the header class is an instance of
  * @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" object and return true (nonzero),
  * otherwise return false (zero).
- * 
+ *
  * @param header pointer to the header structure to be tested
- * 
- * @retval 1 (true) if the @a header is an instance of header #xxxxxx# 
+ *
+ * @retval 1 (true) if the @a header is an instance of header #xxxxxx#
  * @retval 0 (false) otherwise
  *
  * @since New in #version#.
@@ -206,27 +206,27 @@
 
 
 /**Duplicate a list of @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" header structures #sip_#xxxxxx#_t.
- * 
+ *
  * Duplicate 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# = sip_#xxxxxx#_dup(home, sip->sip_#xxxxxx#);
- * 
+ *
  * @endcode
- * 
+ *
  * @return
  * A pointer to the
  * newly duplicated #sip_#xxxxxx#_t header structure, or NULL
@@ -237,42 +237,42 @@
 #if SU_HAVE_INLINE
 su_inline
 #endif
-sip_#xxxxxx#_t *sip_#xxxxxx#_dup(su_home_t *home, sip_#xxxxxx#_t const *hdr) 
+sip_#xxxxxx#_t *sip_#xxxxxx#_dup(su_home_t *home, sip_#xxxxxx#_t const *hdr)
      __attribute__((__malloc__));
 
 #if SU_HAVE_INLINE
 su_inline
 sip_#xxxxxx#_t *sip_#xxxxxx#_dup(su_home_t *home, sip_#xxxxxx#_t const *hdr)
-{ 
+{
   return (sip_#xxxxxx#_t *)
     msg_header_dup_as(home, sip_#xxxxxx#_class, (msg_header_t const *)hdr);
 }
 #endif
 
 /**Copy a list of @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" header structures #sip_#xxxxxx#_t.
- * 
+ *
  * The function sip_#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 list of header
  * structure @a hdr.
- * 
+ *
  * @param home    memory home used to allocate new structure
  * @param hdr     pointer to the header structure to be copied
- * 
+ *
  * 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 hdr header, including the encoding of the
  * old header, if present.
- * 
+ *
  * @par Example
  * @code
- * 
+ *
  *   #xxxxxx# = sip_#xxxxxx#_copy(home, sip->sip_#xxxxxx#);
- * 
+ *
  * @endcode
- * 
+ *
  * @return
  * A pointer to newly copied header structure, or NULL upon an error.
  *
@@ -281,28 +281,28 @@
 #if SU_HAVE_INLINE
 su_inline
 #endif
-sip_#xxxxxx#_t *sip_#xxxxxx#_copy(su_home_t *home, sip_#xxxxxx#_t const *hdr) 
+sip_#xxxxxx#_t *sip_#xxxxxx#_copy(su_home_t *home, sip_#xxxxxx#_t const *hdr)
      __attribute__((__malloc__));
 
 #if SU_HAVE_INLINE
 su_inline
-sip_#xxxxxx#_t *sip_#xxxxxx#_copy(su_home_t *home, sip_#xxxxxx#_t const *hdr) 
-{ 
+sip_#xxxxxx#_t *sip_#xxxxxx#_copy(su_home_t *home, sip_#xxxxxx#_t const *hdr)
+{
   return (sip_#xxxxxx#_t *)
-    msg_header_copy_as(home, sip_#xxxxxx#_class, (msg_header_t const *)hdr); 
+    msg_header_copy_as(home, sip_#xxxxxx#_class, (msg_header_t const *)hdr);
 }
 #endif
 
 /**Make a @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" structure #sip_#xxxxxx#_t.
- * 
+ *
  * The function sip_#xxxxxx#_make() makes a new
  * #sip_#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
- * 
+ *
  * @return
  * A pointer to newly maked #sip_#xxxxxx#_t header structure, or NULL upon an
  * error.
@@ -310,7 +310,7 @@
  * @since New in #version#.
  */
 #if SU_HAVE_INLINE
-su_inline 
+su_inline
 #endif
 sip_#xxxxxx#_t *sip_#xxxxxx#_make(su_home_t *home, char const *s)
      __attribute__((__malloc__));
@@ -323,20 +323,20 @@
 #endif
 
 /**Make a @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" from formatting result.
- * 
- * Make a new #sip_#xxxxxx#_t object using formatting result as its value. 
+ *
+ * Make a new #sip_#xxxxxx#_t 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 parses the
  * formatting result to the structure #sip_#xxxxxx#_t.
- * 
+ *
  * @param home   memory home used to allocate new header structure.
  * @param fmt    string used as a printf()-style format
  * @param ...    argument list for format
- * 
+ *
  * @return
  * A pointer to newly
  * makes header structure, or NULL upon an error.
- * 
+ *
  * @HIDE
  *
  * @since New in #version#.
@@ -352,11 +352,11 @@
 {
   sip_header_t *h;
   va_list ap;
-  
+
   va_start(ap, fmt);
   h = sip_header_vformat(home, sip_#xxxxxx#_class, fmt, ap);
   va_end(ap);
- 
+
   return (sip_#xxxxxx#_t *)h;
 }
 #endif

Modified: 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_status.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_status.h	Tue Dec 16 13:05:22 2008
@@ -24,10 +24,10 @@
 
 #ifndef SIP_STATUS_H
 /** Defined when <sofia-sip/sip_status.h> has been included. */
-#define SIP_STATUS_H 
+#define SIP_STATUS_H
 
 /**@addtogroup sip_status_codes
- * @{ 
+ * @{
  */
 /**@file sofia-sip/sip_status.h
  *

Modified: 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.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag.h.in	Tue Dec 16 13:05:22 2008
@@ -107,7 +107,7 @@
 #if SU_INLINE_TAG_CAST
 su_inline
 tag_value_t siptag_sip_v(sip_t const *v) { return (tag_value_t)v; }
-su_inline 
+su_inline
 tag_value_t siptag_sip_vr(sip_t const **vp) { return (tag_value_t)vp; }
 #else
 #define siptag_sip_v(v)   (tag_value_t)(v)
@@ -117,8 +117,8 @@
 /**Tag list item for header string.
  *
  * The SIPTAG_HEADER() macro is used to include a tag item containing an
- * unknown SIP header in the tag list, e.g., 
- * @code 
+ * unknown SIP header in the tag list, e.g.,
+ * @code
  * sip_header_t *hdr;
  *
  * SIPTAG_HEADER(hdr).
@@ -190,7 +190,7 @@
  *
  * @param x pointer to a #sip_#xxxxxx#_t structure, or NULL.
  *
- * The corresponding tag taking reference parameter is 
+ * The corresponding tag taking reference parameter is
  * SIPTAG_#XXXXXX#_REF().
  *
  * @since New in #version#.
@@ -202,7 +202,7 @@
 SOFIAPUBVAR tag_typedef_t siptag_#xxxxxx#;
 
 /**@ingroup sip_#xxxxxx#
- * Tag list item for reference to a 
+ * Tag list item for reference to a
  * @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" pointer.
  */
 #define SIPTAG_#XXXXXX#_REF(x) siptag_#xxxxxx#_ref, siptag_#xxxxxx#_vr(&(x))
@@ -212,17 +212,17 @@
  *
  * Tag list item for string with @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" value.
  *
- * The SIPTAG_#XXXXXX#_STR() macro is used to include a tag item with a 
+ * The SIPTAG_#XXXXXX#_STR() macro is used to include a tag item with a
  * string containing value of a #sip_#xxxxxx#_t header in a tag list.
  *
- * @param s pointer to a string containing 
+ * @param s pointer to a string containing
  *    @ref sip_#xxxxxx# "#xxxxxxx_xxxxxxx#" value, or NULL.
  *
  * The string in SIPTAG_#XXXXXX#_STR() can be converted to a
  * #sip_#xxxxxx#_t header structure by giving the string @a s has
  * second argument to function sip_#xxxxxx#_make().
  *
- * The corresponding tag taking reference parameter is 
+ * The corresponding tag taking reference parameter is
  * SIPTAG_#XXXXXX#_STR_REF().
  *
  * @since New in #version#.

Modified: 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_tag_class.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag_class.h	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 #ifndef SIP_TAG_CLASS_H
 /** Defined when <sip_tag_class.h> have been included */
-#define SIP_TAG_CLASS_H 
+#define SIP_TAG_CLASS_H
 
 
 /**@SIP_TAG @{ */
@@ -81,9 +81,9 @@
 SOFIAPUBVAR tag_class_t sipexthdrtag_class[1];
 
 
-/**@internal Filter SIP header tag items. */ 
+/**@internal Filter SIP header tag items. */
 SOFIAPUBFUN tagi_t *siptag_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/sip/sofia-sip/sip_util.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_util.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_util.h	Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
 
 #ifndef SIP_UTIL_H
 /** Defined when <sofia-sip/sip_util.h> has been included. */
-#define SIP_UTIL_H 
+#define SIP_UTIL_H
 
-/**@file sofia-sip/sip_util.h 
+/**@file sofia-sip/sip_util.h
  * @brief SIP utility functions
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
@@ -50,7 +50,7 @@
 
 SOFIAPUBFUN
 sip_contact_t *
-sip_contact_create_from_via_with_transport(su_home_t *home, 
+sip_contact_create_from_via_with_transport(su_home_t *home,
 					   sip_via_t const *v,
 					   char const *user,
 					   char const *transport);
@@ -78,7 +78,7 @@
 
 SOFIAPUBFUN url_t *sip_url_dup(su_home_t *sh, url_t const *o);
 
-/**Add optional prefix and string to argument list if @a s is non-NULL. 
+/**Add optional prefix and string to argument list if @a s is non-NULL.
  * @HIDE
  */
 #define SIP_STRLOG(prefix, s) ((s) ? (prefix) : ""), ((s) ? (s) : "")
@@ -111,13 +111,13 @@
 
 /** Check callerprefs. */
 SOFIAPUBFUN int sip_prefs_matching(char const *pvalue,
-				   char const *nvalue, 		       
+				   char const *nvalue,
 				   int *return_parse_error);
 SOFIAPUBFUN int sip_is_callerpref(char const *param);
 
 /** Type of the SIP media tag */
-enum sp_type { 
-  sp_error = -1, 
+enum sp_type {
+  sp_error = -1,
   sp_init,
   sp_literal,
   sp_string,
@@ -133,7 +133,7 @@
 
   /** Literal (tag="foo"). */
   struct sp_literal {
-    enum sp_type spl_type; 
+    enum sp_type spl_type;
     char const *spl_value;
     usize_t spl_length;
   } sp_literal;
@@ -155,8 +155,8 @@
 };
 
 /** Parse a single preference */
-SOFIAPUBFUN int sip_prefs_parse(union sip_pref *sp, 
-				char const **in_out_s, 
+SOFIAPUBFUN int sip_prefs_parse(union sip_pref *sp,
+				char const **in_out_s,
 				int *return_negation);
 
 /** Match preferences */
@@ -170,13 +170,13 @@
  */
 #define sip_contact_immune(m) sip_contact_is_immune(m)
 
-SOFIAPUBFUN sip_contact_t *sip_contact_immunize(su_home_t *home, 
+SOFIAPUBFUN sip_contact_t *sip_contact_immunize(su_home_t *home,
 						sip_contact_t const *m);
 
-SOFIAPUBFUN int sip_contact_reject(sip_contact_t const *m, 
+SOFIAPUBFUN int sip_contact_reject(sip_contact_t const *m,
 				   sip_reject_contact_t const *rc);
 
-SOFIAPUBFUN int sip_contact_accept(sip_contact_t const *m, 
+SOFIAPUBFUN int sip_contact_accept(sip_contact_t const *m,
 				   sip_accept_contact_t const *cp,
 				   unsigned *return_S,
 				   unsigned *return_N,
@@ -195,7 +195,7 @@
 					    sip_security_verify_t const *v,
 					    char const **return_d_ver);
 
-SOFIAPUBFUN 
+SOFIAPUBFUN
 sip_security_client_t const *
 sip_security_client_select(sip_security_client_t const *client,
 			   sip_security_server_t const *server);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_date.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_date.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_date.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@internal
  *
- * @CFILE test_date.c  
+ * @CFILE test_date.c
  *
  * Tester for SIP date parser
  *
@@ -46,7 +46,7 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
+  fprintf(stderr,
 	  "usage: test_date [SIP-date] "
 	  "[YYYYy][DDd][HHh][MMm][SS[s]]\n");
   exit(exitcode);
@@ -70,7 +70,7 @@
       fprintf(stderr, "test_date: %s is not valid time\n", s);
       exit(1);
     }
-      
+
     if ((s = av[2])) {
       for (delta = 0; *s; ) {
 	t2 = 0;
@@ -96,7 +96,7 @@
     char buf[80];
 
     msg_date_e(buf, sizeof(buf), t);
-    
+
     if (verbatim)
       printf("%08lx is %s\n", t, buf);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/test_sip_msg.c	Tue Dec 16 13:05:22 2008
@@ -75,7 +75,7 @@
   for (i = 0; i < N; i++) {
     /* Verify each header entry */
     msg_hclass_t *hc = mc->mc_hash[i].hr_class;
-    
+
     if (hc == NULL)
       continue;
 
@@ -94,7 +94,7 @@
 char * url_print(url_t *url, char buf[1024])
 {
   url_e(buf, 1024, url);
-  
+
   return buf;
 }
 
@@ -118,11 +118,11 @@
     }
     fputs(buf, f);
     if (quoted_url) fputs(">", f);
-    
+
     if (m->m_params)
       for (p = m->m_params; *p; p++)
 	fprintf(f, " ;%s", *p);
-    
+
     if (m->m_comment)
       fprintf(f, " (%s)", m->m_comment);
   }
@@ -140,7 +140,7 @@
 
     fprintf(f, "%s %s", v->v_protocol, v->v_host);
     if (v->v_port)
-      fprintf(f, ":%s", v->v_port);      
+      fprintf(f, ":%s", v->v_port);
 
     if (v->v_params)
       for (p = v->v_params; *p; p++)
@@ -158,7 +158,7 @@
   size_t n;
   int m, tcp;
   sip_t *sip;
-  int exitcode = 0; 
+  int exitcode = 0;
   msg_mclass_t const *sip_mclass = sip_default_mclass();
   msg_t *msg = msg_create(sip_mclass, MSG_FLG_EXTRACT_COPY);
   msg_iovec_t iovec[1];
@@ -248,13 +248,13 @@
 	    sip->sip_status->st_version,
 	    sip->sip_status->st_status,
 	    sip->sip_status->st_phrase);
-  
+
   if (sip->sip_cseq)
     fprintf(stdout, "\tCSeq: %u %s (%d)\n",
 	    sip->sip_cseq->cs_seq,
 	    sip->sip_cseq->cs_method_name,
 	    sip->sip_cseq->cs_method);
-  
+
   if (sip->sip_call_id)
     fprintf(stdout, "\tCall-ID: %s (%x)\n",
 	    sip->sip_call_id->i_id,
@@ -264,7 +264,7 @@
     fprintf(stdout, "\tFrom: %s@%s%s%s\n",
 	    sip->sip_from->a_user ? sip->sip_from->a_user : "[nobody]",
 	    sip->sip_from->a_host ? sip->sip_from->a_host : "[nowhere]",
-	    sip->sip_from->a_tag ? " ;tag=" : "",	
+	    sip->sip_from->a_tag ? " ;tag=" : "",
 	    sip->sip_from->a_tag ? sip->sip_from->a_tag : "");
 
   if (sip->sip_to)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@ingroup sip_test @internal
  *
- * @CFILE torture_sip.c  
+ * @CFILE torture_sip.c
  *
  * Unit-testing functions for SIP.
  *
@@ -111,7 +111,7 @@
 
   TEST_1(test_mclass = msg_mclass_clone(def0, 0, 0));
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "BYE sip:foo at bar SIP/2.0\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -136,12 +136,12 @@
 
   msg_destroy(msg);
 
-  TEST_1(msg_mclass_insert_header(test_mclass, 
+  TEST_1(msg_mclass_insert_header(test_mclass,
 				  sip_p_asserted_identity_class, 0) > 0);
-  TEST_1(msg_mclass_insert_header(test_mclass, 
+  TEST_1(msg_mclass_insert_header(test_mclass,
 				  sip_p_preferred_identity_class, 0) > 0);
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "BYE sip:foo at bar SIP/2.0\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -165,7 +165,7 @@
   TEST_1(!sip_remote_party_id(sip));
 
   TEST_1(home = msg_home(msg));
-  
+
   TEST_1((paid = sip_p_asserted_identity_make(home, "sip:joe at example.com")));
   TEST_1((paid = sip_p_asserted_identity_make
 	  (home, "Jaska <sip:joe at example.com>, Helmi <tel:+3587808000>")));
@@ -179,7 +179,7 @@
   /* Now with extensions */
   TEST_1(test_mclass = msg_mclass_clone(def1, 0, 0));
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "BYE sip:foo at bar SIP/2.0\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -211,10 +211,10 @@
     su_home_t *home = su_home_clone(NULL, sizeof *home);
 
     char *s;
-    char const canonic[] = 
+    char const canonic[] =
       "\"Jaska Jokunen\" <sip:jaska.jokunen at example.com>;"
       "screen=yes;party=called;id-type=user;privacy=\"name,uri-network\"";
-    char const canonic2[] = 
+    char const canonic2[] =
       "Jaska Jokunen <sip:jaska.jokunen at example.com>;"
       "screen=yes;party=called;id-type=user;privacy=\"name,uri-network\"";
 
@@ -242,7 +242,7 @@
     TEST_S(d->rpid_display, rpid->rpid_display);
 
     su_home_check(home);
-    
+
     su_home_zap(home);
   }
 
@@ -313,7 +313,7 @@
   TEST_P(t[0].t_tag, siptag_from);    TEST_1(f = (void *)t[0].t_value);
   TEST_P(t[1].t_tag, siptag_accept);  TEST_1(ac = (void *)t[1].t_value);
   TEST_P(t[2].t_tag, siptag_payload); TEST_1(body = (void *)t[2].t_value);
-  TEST_P(t[3].t_tag, siptag_accept); 
+  TEST_P(t[3].t_tag, siptag_accept);
 
   s = "xyzzy=foo";
 
@@ -339,7 +339,7 @@
   msg_t *msg, *msg0;
   sip_t *sip;
 
-  msg0 = read_message(MSG_DO_EXTRACT_COPY, 
+  msg0 = read_message(MSG_DO_EXTRACT_COPY,
     "MESSAGE sip:foo at bar SIP/2.0\r\n"
     "To: Joe User <sip:foo at bar>\r\n"
     "From: \"Bar Owner\" <sip:bar at foo>;tag=foobar\r\n"
@@ -357,11 +357,11 @@
   TEST_1(l = sip_content_length_make(msg_home(msg), "6"));
   TEST_1(pl = sip_payload_make(msg_home(msg), "hello!"));
 
-  TEST_1(msg_header_replace(msg, NULL, 
-			    (void *)sip->sip_content_length, 
+  TEST_1(msg_header_replace(msg, NULL,
+			    (void *)sip->sip_content_length,
 			    (void *)l) >= 0);
-  TEST_1(msg_header_replace(msg, NULL, 
-			    (void *)sip->sip_payload, 
+  TEST_1(msg_header_replace(msg, NULL,
+			    (void *)sip->sip_payload,
 			    (void *)pl) >= 0);
 
   TEST(msg_serialize(msg, NULL), 0);
@@ -440,7 +440,7 @@
   BEGIN();
 
   TEST_1(home);
-  
+
   {
     sip_request_t *rq, *rq1;
 
@@ -452,7 +452,7 @@
 
     su_free(home, rq);
     su_free(home, rq1);
-    
+
     rq = sip_request_make(home, "invite sip:joe at example.com SIP/2.0");
     TEST_1(rq);
     TEST(rq->rq_method, sip_method_unknown);
@@ -463,22 +463,22 @@
     su_free(home, rq);
     su_free(home, rq1);
 
-    TEST_1(!sip_request_create(home, sip_method_unknown, NULL, 
+    TEST_1(!sip_request_create(home, sip_method_unknown, NULL,
 			       (void *)"sip:joe at example.com", NULL));
-    TEST_1(rq = sip_request_create(home, sip_method_unknown, "invite", 
+    TEST_1(rq = sip_request_create(home, sip_method_unknown, "invite",
 				   (void *)"sip:joe at example.com", NULL));
     TEST(rq->rq_method, sip_method_unknown);
     TEST_S(rq->rq_method_name, "invite");
     su_free(home, rq);
 
-    TEST_1(rq = sip_request_create(home, sip_method_unknown, "INVITE", 
+    TEST_1(rq = sip_request_create(home, sip_method_unknown, "INVITE",
 				   (void *)"sip:joe at example.com", NULL));
     TEST(rq->rq_method, sip_method_invite);
     TEST_S(rq->rq_method_name, "INVITE");
 
     su_free(home, rq);
 
-    TEST_1(rq = sip_request_create(home, sip_method_invite, "foobar", 
+    TEST_1(rq = sip_request_create(home, sip_method_invite, "foobar",
 				   (void *)"sip:joe at example.com", NULL));
     TEST(rq->rq_method, sip_method_invite);
     TEST_S(rq->rq_method_name, "INVITE");
@@ -548,8 +548,8 @@
     TEST_1(params);
     TEST_1(comment);
 
-    TEST_SIZE(sip_name_addr_e(ebuf, sizeof(ebuf), 0, display, 0, url, 
-			      params, comment), 
+    TEST_SIZE(sip_name_addr_e(ebuf, sizeof(ebuf), 0, display, 0, url,
+			      params, comment),
 	      strlen(na) - 1);
     TEST_1(strncmp(na, ebuf, strlen(na) - 1) == 0);
 
@@ -648,7 +648,7 @@
 
     TEST_1(!sip_cseq_create(home, 123456789, sip_method_unknown, NULL));
 
-    TEST_1(cs = sip_cseq_create(home, 123456789, sip_method_unknown, 
+    TEST_1(cs = sip_cseq_create(home, 123456789, sip_method_unknown,
 				"invite"));
     TEST(cs->cs_seq, 123456789);
     TEST(cs->cs_method, sip_method_unknown);
@@ -663,9 +663,9 @@
     sip_contact_t *m, *m0;
 
     TEST_1(!sip_contact_make(home, ",,"));
-    
-    TEST_1(m = sip_contact_create(home, (void *)"sip:joe at bar", 
-				  "q=0.2", 
+
+    TEST_1(m = sip_contact_create(home, (void *)"sip:joe at bar",
+				  "q=0.2",
 				  "+message",
 				  NULL));
     TEST_S(m->m_q, "0.2");
@@ -681,7 +681,7 @@
 
     TEST_S(m->m_q, "0.5");
     TEST_S(m->m_expires, "0");
-    
+
     TEST_1(!sip_contact_create(home, (void *)"sip:joe@[baa",
 			       "audio", "video", NULL));
 
@@ -717,7 +717,7 @@
     TEST_1(ex = sip_expires_make(home, "4294967297")); /* XXX */
     su_free(home, ex);
 
-    TEST_1(ex = sip_expires_make(home, "Wed, 25 Mar 2004 14:49:29 GMT")); 
+    TEST_1(ex = sip_expires_make(home, "Wed, 25 Mar 2004 14:49:29 GMT"));
     su_free(home, ex);
 
     TEST_1(ex = sip_expires_create(home, 3600));
@@ -769,7 +769,7 @@
     TEST_1(sip_route_fix(r));
     TEST_1(url_has_param(r->r_url, "lr"));
 
-    su_free(home, r); 
+    su_free(home, r);
     TEST_1(r = sip_route_create(home, r0->r_url, r0->r_url));
 
     su_free(home, r); su_free(home, r0);
@@ -796,9 +796,9 @@
     TEST_1(!sip_via_make(home, "SIP// host:5060 (foo),"));
     TEST_1(!sip_via_make(home, "SIP/2.0/TCP host:5060 (foo) bar,"));
     TEST_1(!sip_via_make(home, "SIP/2.0/TCP [3ffe::1:5060 (foo),"));
-    
-    TEST_1(v = sip_via_create(home, "bar.com", 
-			      "50600", 
+
+    TEST_1(v = sip_via_create(home, "bar.com",
+			      "50600",
 			      "SIP/2.0/UDP",
 			      "hidden",
 			      "rport=50601",
@@ -819,7 +819,7 @@
     TEST_S(v->v_branch, "1");
     TEST_S(v->v_rport, "50601");
     TEST_S(v->v_comp, "sigcomp");
-    
+
     TEST_1(v0 = sip_via_dup(home, v));
 
     TEST(msg_header_add_param(home, v->v_common, "rport"), 0);
@@ -844,8 +844,8 @@
     su_free(home, v);
     su_free(home, v0);
 
-    TEST_1(v = sip_via_create(home, "bar.com", 
-			      "50600", 
+    TEST_1(v = sip_via_create(home, "bar.com",
+			      "50600",
 			      NULL,
 			      "rport=50601",
 			      "branch=1",
@@ -859,7 +859,7 @@
   {
     sip_call_info_t *ci, *ci0;
 
-    TEST_1(ci = sip_call_info_make(home, 
+    TEST_1(ci = sip_call_info_make(home,
 				   "<http://www.nokia.com>;purpose=info"));
     TEST_S(ci->ci_purpose, "info");
     TEST_1(ci0 = sip_call_info_dup(home, ci));
@@ -941,7 +941,7 @@
   for (i = 0; i < N; i++) {
     /* Verify each header entry */
     hc = mc->mc_hash[i].hr_class;
-    
+
     if (hc == NULL)
       continue;
 
@@ -969,7 +969,7 @@
   msg_iovec_t iovec[2];
 
   n = strlen(buffer);
-  if (n == 0) 
+  if (n == 0)
     return NULL;
 
   msg = msg_create(test_mclass, flags);
@@ -996,7 +996,7 @@
 
   TEST_1(home = su_home_new(sizeof *home));
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "SUBSCRIBE sip:foo at bar SIP/2.0\r\n"
     "To: Joe User <sip:foo at bar>\r\n"
     "From: \"Bar Owner\" <sip:bar at foo>;tag=foobar\r\n"
@@ -1073,7 +1073,7 @@
   msg_destroy(msg), msg = NULL;
 
   /* Note: this should be canonic! */
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "SIP/2.0 200 Ok\r\n"
     "To: Joe User <sip:foo at bar>;tag=deadbeef\r\n"
     "From: sip:bar at foo;tag=foobar\r\n"
@@ -1094,7 +1094,7 @@
     "Subscription-State: active;expires=1800\r\n"
     "Call-Info: <http://www.bar.com/xcap/joe/>;purpose=xcap\r\n"
     "Error-Info: <http://www.bar.com/xcap/joe/errors>;param=xcap\r\n"
-    "Server: None\r\n"		     
+    "Server: None\r\n"
     "Timestamp: 3289129810.798259 0.084054\r\n"
     "SIP-ETag: foobar\r\n"
     "SIP-If-Match: foobar\r\n"
@@ -1104,8 +1104,8 @@
     "Warning: 399 presence.bar:5060 \"Unimplemented filter\"\r\n"
     "RSeq: 421414\r\n"
     "Refer-To: <sip:hsdf at cdwf.xcfw.com?Subject=test&Organization=Bar>\r\n"
-    "Alert-Info: <http://alert.example.org/test.mp3>\r\n"		     
-    "Reply-To: Bob <sip:bob at example.com>\r\n"		     
+    "Alert-Info: <http://alert.example.org/test.mp3>\r\n"
+    "Reply-To: Bob <sip:bob at example.com>\r\n"
     "WWW-Authenticate: Digest realm=\"foo\"\r\n"
     "Proxy-Authenticate: Digest realm=\"foo\"\r\n"
     "Security-Server: tls;q=0.2\r\n"
@@ -1141,7 +1141,7 @@
   su_home_check(home);
   su_home_zap(home);
 
-  msg = read_message(0, 
+  msg = read_message(0,
 		     "SIP/2.0 200 Ok\r\n"
 		     "Via: SIP/2.0/UDP 135.180.130.133\r\n"
 		     "Via: SIP/2.0/UDP 135.180.130.130:5060\r\n"
@@ -1153,7 +1153,7 @@
 		     "Record-Route: <sip:135.180.130.130;lr>\r\n"
 		     "Content-Length: 0\r\n"
 		     "\r\n");
-		    
+
   sip = sip_object(msg);
 
   TEST_1(msg); TEST_1(sip); TEST_1(!sip->sip_error);
@@ -1164,7 +1164,7 @@
 
   TEST_1(c = sip->sip_status->st_common);
   TEST_M(c->h_data, "SIP/2.0 200 Ok\r\n", c->h_len);
-  
+
   TEST_1(c = sip->sip_to->a_common);
   TEST_M(c->h_data, "t:Joe User<sip:foo at bar>;tag=deadbeef\r\n", c->h_len);
 
@@ -1201,16 +1201,16 @@
 int tag_test(void)
 {
   su_home_t *home = su_home_new(sizeof(*home));
-  sip_request_t *request = 
+  sip_request_t *request =
     sip_request_make(home, "INVITE sip:joe at example.com SIP/2.0");
-  sip_to_t *to = sip_to_make(home, 
+  sip_to_t *to = sip_to_make(home,
 			     "Joe User <sip:joe.user at example.com;param=1>"
 			     ";tag=12345678");
   sip_via_t *via = sip_via_make(home,
 				"SIP/2.0/UDP sip.example.com"
 				";maddr=128.12.9.254"
 				";branch=289412978y641.321312");
-  url_t *url = url_hdup(home, 
+  url_t *url = url_hdup(home,
     (url_t *)"sip:test:pass at example.com;baz=1?foo&bar");
 
   tagi_t *lst, *dup;
@@ -1224,15 +1224,15 @@
   TEST_1(home && request && to && via);
 
   lst = tl_list(SIPTAG_REQUEST(request),
-		SIPTAG_TO(to), 
+		SIPTAG_TO(to),
 		SIPTAG_VIA(via),
 		URLTAG_URL(url),
 		TAG_NULL());
 
   xtra = 0;
-  xtra += XTRA(xtra, request); 
-  xtra += XTRA(xtra, to); 
-  xtra += XTRA(xtra, via); 
+  xtra += XTRA(xtra, request);
+  xtra += XTRA(xtra, to);
+  xtra += XTRA(xtra, via);
   xtra += SU_ALIGN(xtra) + sizeof(*url) + url_xtra(url);
 
   TEST_SIZE(tl_len(lst), 5 * sizeof(tagi_t));
@@ -1255,7 +1255,7 @@
   TEST_1(request->rq_common->h_class == sip_request_class);
   TEST_S(request->rq_method_name, "INVITE");
   TEST_S(request->rq_version, "SIP/2.0");
-  
+
   TEST_1(t_scan(siptag_to, home, "Example <sip:example.org>;tag=foo", &v));
   TEST_1(to = (void *)v);
   TEST_1(to->a_common->h_class == sip_to_class);
@@ -1283,7 +1283,7 @@
 
   home = su_home_new(sizeof *home);
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
 "SIP/2.0 401 Unauthorized\r\n"
 "Via: SIP/2.0/UDP srlab.sr.ntc.nokia.com:5060;maddr=192.168.102.5\r\n"
 "Via: SIP/2.0/UDP 172.21.9.155\r\n"
@@ -1297,7 +1297,7 @@
 "Proxy-Authenticate: Digest realm=\"IndigoSw\", domain=\"sip:indigosw.com\", "
 "nonce=\"V2VkIEF1ZyAxNSAxODoxMzozMiBCU1QgMjAwMVtCQDJkYjE5ZA==\", "
 "opaque=\"NzA3ZjJhYzU4MGY3MzU0MQ==\", stale=false, "
-"algorithm=md5, algorithm=sha1, qop=\"auth\"\r\n" 
+"algorithm=md5, algorithm=sha1, qop=\"auth\"\r\n"
 /* , qop=\"auth, auth-int\"\r */
 "\r\n");
 
@@ -1323,21 +1323,21 @@
 
   TEST_P(sip->sip_content_length->l_common->h_succ, sip->sip_separator);
 
-  lst = tl_list(SIPTAG_VIA(sip->sip_via), 
-		SIPTAG_RECORD_ROUTE(sip->sip_record_route), 
-		TAG_SKIP(2), 
-		SIPTAG_CSEQ(sip->sip_cseq), 
-		SIPTAG_PAYLOAD(sip->sip_payload), 
+  lst = tl_list(SIPTAG_VIA(sip->sip_via),
+		SIPTAG_RECORD_ROUTE(sip->sip_record_route),
+		TAG_SKIP(2),
+		SIPTAG_CSEQ(sip->sip_cseq),
+		SIPTAG_PAYLOAD(sip->sip_payload),
 		TAG_NULL());
-  filter1 = tl_list(SIPTAG_VIA(0), 
+  filter1 = tl_list(SIPTAG_VIA(0),
 		    TAG_NULL());
-  filter2 = tl_list(SIPTAG_CALL_ID(0), 
+  filter2 = tl_list(SIPTAG_CALL_ID(0),
 		    SIPTAG_FROM(0),
 		    SIPTAG_ROUTE(0),
 		    SIPTAG_CSEQ(0),
 		    TAG_NULL());
-  filter3 = tl_list(SIPTAG_CSEQ(0), 
-		    SIPTAG_CONTENT_LENGTH(0), 
+  filter3 = tl_list(SIPTAG_CSEQ(0),
+		    SIPTAG_CONTENT_LENGTH(0),
 		    TAG_NULL());
   filter4 = tl_list(SIPTAG_STATUS(0),
 		    SIPTAG_VIA(0),
@@ -1381,23 +1381,23 @@
   b3 = tl_afilter(home, filter3, lst);
 
   TEST_SIZE(tl_len(b3), 3 * sizeof(tagi_t));
-  TEST_SIZE(tl_xtra(b3, 0), 
+  TEST_SIZE(tl_xtra(b3, 0),
 	    sizeof(sip_content_length_t) + sizeof(sip_cseq_t));
 
   b4 = tl_afilter(home, filter4, lst);
   TEST_SIZE(tl_len(b4), 11 * sizeof(tagi_t));
   xtra = 0;
-  xtra += XTRA(xtra, sip->sip_status); 
-  xtra += XTRA(xtra, sip->sip_via); 
-  xtra += XTRA(xtra, sip->sip_via->v_next); 
+  xtra += XTRA(xtra, sip->sip_status);
+  xtra += XTRA(xtra, sip->sip_via);
+  xtra += XTRA(xtra, sip->sip_via->v_next);
   xtra += XTRA(xtra, sip->sip_record_route);
-  xtra += XTRA(xtra, sip->sip_from); 
-  xtra += XTRA(xtra, sip->sip_to); 
-  xtra += XTRA(xtra, sip->sip_call_id); 
-  xtra += XTRA(xtra, sip->sip_cseq); 
-  xtra += XTRA(xtra, sip->sip_www_authenticate); 
-  xtra += XTRA(xtra, sip->sip_proxy_authenticate); 
-  xtra += XTRA(xtra, sip->sip_content_length); 
+  xtra += XTRA(xtra, sip->sip_from);
+  xtra += XTRA(xtra, sip->sip_to);
+  xtra += XTRA(xtra, sip->sip_call_id);
+  xtra += XTRA(xtra, sip->sip_cseq);
+  xtra += XTRA(xtra, sip->sip_www_authenticate);
+  xtra += XTRA(xtra, sip->sip_proxy_authenticate);
+  xtra += XTRA(xtra, sip->sip_content_length);
   TEST_SIZE(tl_xtra(b4, 0), xtra);
 
   tl_vfree(filter1); tl_vfree(filter2); tl_vfree(filter3); tl_vfree(filter4);
@@ -1406,10 +1406,10 @@
   su_home_check(home);
 
   su_free(home, b4);
-  su_free(home, b3); 
-  su_free(home, b2); 
+  su_free(home, b3);
+  su_free(home, b2);
   su_free(home, dup);
-  su_free(home, b1); 
+  su_free(home, b1);
 
   su_home_check(home);
 
@@ -1425,7 +1425,7 @@
 {
   BEGIN();
   {
-    struct { int status; char const *phrase; } const errors[] = 
+    struct { int status; char const *phrase; } const errors[] =
       {
 	{ SIP_100_TRYING },
 	{ SIP_180_RINGING },
@@ -1507,10 +1507,10 @@
   sip_request_t        sip_request[1] = { SIP_REQUEST_INIT() };
   sip_status_t         sip_status[1]  = { SIP_STATUS_INIT() };
   sip_header_t         sip_unknown[1]  = { SIP_UNKNOWN_INIT() };
-  sip_separator_t      sip_separator[1] = { SIP_SEPARATOR_INIT() };     
+  sip_separator_t      sip_separator[1] = { SIP_SEPARATOR_INIT() };
   sip_payload_t        sip_payload[1] = { SIP_PAYLOAD_INIT() };
   sip_via_t            sip_via[1] = { SIP_VIA_INIT() };
-  sip_route_t          sip_route[1] = { SIP_ROUTE_INIT() };		
+  sip_route_t          sip_route[1] = { SIP_ROUTE_INIT() };
   sip_record_route_t   sip_record_route[1] = { SIP_RECORD_ROUTE_INIT() };
   sip_max_forwards_t   sip_max_forwards[1] = { SIP_MAX_FORWARDS_INIT() };
   sip_from_t           sip_from[1] = { SIP_FROM_INIT() };
@@ -1518,26 +1518,26 @@
   sip_call_id_t        sip_call_id[1] = { SIP_CALL_ID_INIT() };
   sip_cseq_t           sip_cseq[1] = { SIP_CSEQ_INIT() };
   sip_contact_t        sip_contact[1] = { SIP_CONTACT_INIT() };
-						
+
   sip_expires_t        sip_expires[1] = { SIP_EXPIRES_INIT() };
   sip_date_t           sip_date[1] = { SIP_DATE_INIT() };
   sip_retry_after_t    sip_retry_after[1] = { SIP_RETRY_AFTER_INIT() };
   sip_timestamp_t      sip_timestamp[1] = { SIP_TIMESTAMP_INIT() };
   sip_subject_t        sip_subject[1] = { SIP_SUBJECT_INIT() };
   sip_priority_t       sip_priority[1] = { SIP_PRIORITY_INIT() };
-		           		
+
   sip_call_info_t      sip_call_info[1] = { SIP_CALL_INFO_INIT() };
   sip_organization_t   sip_organization[1] = { SIP_ORGANIZATION_INIT() };
   sip_server_t         sip_server[1] = { SIP_SERVER_INIT() };
   sip_user_agent_t     sip_user_agent[1] = { SIP_USER_AGENT_INIT() };
   sip_in_reply_to_t    sip_in_reply_to[1] = { SIP_IN_REPLY_TO_INIT() };
-		           		
+
   sip_accept_t         sip_accept[1] = { SIP_ACCEPT_INIT() };
   sip_accept_encoding_t sip_accept_encoding[1] = { SIP_ACCEPT_ENCODING_INIT() };
   sip_accept_language_t sip_accept_language[1] = { SIP_ACCEPT_LANGUAGE_INIT() };
-   
+
   sip_session_expires_t sip_session_expires[1] = { SIP_SESSION_EXPIRES_INIT() };
-  sip_min_se_t sip_min_se[1] = { SIP_MIN_SE_INIT() };   
+  sip_min_se_t sip_min_se[1] = { SIP_MIN_SE_INIT() };
 
   sip_allow_t          sip_allow[1] = { SIP_ALLOW_INIT() };
   sip_require_t        sip_require[1] = { SIP_REQUIRE_INIT() };
@@ -1557,7 +1557,7 @@
   sip_www_authenticate_t sip_www_authenticate[1] = { SIP_WWW_AUTHENTICATE_INIT() };
   sip_error_info_t     sip_error_info[1] = { SIP_ERROR_INFO_INIT() };
   sip_warning_t        sip_warning[1] = { SIP_WARNING_INIT() };
-		       
+
   sip_mime_version_t   sip_mime_version[1] = { SIP_MIME_VERSION_INIT() };
   sip_content_type_t   sip_content_type[1] = { SIP_CONTENT_TYPE_INIT() };
   sip_content_encoding_t sip_content_encoding[1] = { SIP_CONTENT_ENCODING_INIT() };
@@ -1568,7 +1568,7 @@
 
   home = su_home_new(sizeof *home);
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "INVITE sip:John_Smith at tct.hut.fi SIP/2.0\r\n"
     "To: John Smith <sip:John_Smith at tct.hut.fi:5066;user=ip;maddr=131.228.16.2>\r\n"
     "  ; tag = deadbeef\r\n"
@@ -1600,24 +1600,24 @@
   TEST_1(sip->sip_via->v_next->v_next == NULL);
   TEST_1(sip_sanity_check(sip) == 0);
 
-  TEST_1(r = sip->sip_route); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
+  TEST_1(r = sip->sip_route); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
   TEST_1(!r->r_next);
 
   TEST_1(r = sip_route_fix(sip->sip_route)); TEST_1(!r->r_common->h_data);
   TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
-  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data); 
-  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data); 
+  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
+  TEST_1(r = r->r_next); TEST_1(!r->r_common->h_data);
   TEST_1(!r->r_next);
 
   /* Quiet lots of warnings */
@@ -1641,21 +1641,21 @@
   TEST_P(msg_header_offset(msg, sip, sip_call_id), &sip->sip_call_id);
   TEST_P(msg_header_offset(msg, sip, sip_cseq), &sip->sip_cseq);
   TEST_P(msg_header_offset(msg, sip, sip_contact), &sip->sip_contact);
-						
+
   TEST_P(msg_header_offset(msg, sip, sip_expires), &sip->sip_expires);
   TEST_P(msg_header_offset(msg, sip, sip_date), &sip->sip_date);
   TEST_P(msg_header_offset(msg, sip, sip_retry_after), &sip->sip_retry_after);
   TEST_P(msg_header_offset(msg, sip, sip_timestamp), &sip->sip_timestamp);
   TEST_P(msg_header_offset(msg, sip, sip_subject), &sip->sip_subject);
   TEST_P(msg_header_offset(msg, sip, sip_priority), &sip->sip_priority);
-		           		
+
   TEST_P(msg_header_offset(msg, sip, sip_call_info), &sip->sip_call_info);
   TEST_P(msg_header_offset(msg, sip, sip_organization),
 	 &sip->sip_organization);
   TEST_P(msg_header_offset(msg, sip, sip_server), &sip->sip_server);
   TEST_P(msg_header_offset(msg, sip, sip_user_agent), &sip->sip_user_agent);
   TEST_P(msg_header_offset(msg, sip, sip_in_reply_to), &sip->sip_in_reply_to);
-		           		
+
   TEST_P(msg_header_offset(msg, sip, sip_accept), &sip->sip_accept);
   TEST_P(msg_header_offset(msg, sip, sip_accept_encoding),
 	 &sip->sip_accept_encoding);
@@ -1664,8 +1664,8 @@
 
   TEST_P(msg_header_offset(msg, sip, sip_session_expires),
 	 &sip->sip_session_expires);
-  TEST_P(msg_header_offset(msg, sip, sip_min_se), &sip->sip_min_se);   
-   
+  TEST_P(msg_header_offset(msg, sip, sip_min_se), &sip->sip_min_se);
+
   TEST_P(msg_header_offset(msg, sip, sip_allow), &sip->sip_allow);
   TEST_P(msg_header_offset(msg, sip, sip_require), &sip->sip_require);
   TEST_P(msg_header_offset(msg, sip, sip_proxy_require),
@@ -1689,7 +1689,7 @@
 	 &sip->sip_www_authenticate);
   TEST_P(msg_header_offset(msg, sip, sip_error_info), &sip->sip_error_info);
   TEST_P(msg_header_offset(msg, sip, sip_warning), &sip->sip_warning);
-		       
+
   TEST_P(msg_header_offset(msg, sip, sip_mime_version), &sip->sip_mime_version);
   TEST_P(msg_header_offset(msg, sip, sip_content_type), &sip->sip_content_type);
   TEST_P(msg_header_offset(msg, sip, sip_content_encoding),
@@ -1706,7 +1706,7 @@
   TEST_SIZE(sip_payload_class->hc_params, 0);
   TEST_SIZE(sip_via_class->hc_params, offsetof(sip_via_t, v_params));
   TEST_SIZE(sip_route_class->hc_params, offsetof(sip_route_t, r_params));
-  TEST_SIZE(sip_record_route_class->hc_params, 
+  TEST_SIZE(sip_record_route_class->hc_params,
 	    offsetof(sip_record_route_t, r_params));
 
   TEST_SIZE(sip_max_forwards_class->hc_params, 0);
@@ -1715,73 +1715,73 @@
   TEST_SIZE(sip_call_id_class->hc_params, 0);
   TEST_SIZE(sip_cseq_class->hc_params, 0);
   TEST_SIZE(sip_contact_class->hc_params, offsetof(sip_contact_t, m_params));
-						
+
   TEST_SIZE(sip_expires_class->hc_params, 0);
   TEST_SIZE(sip_date_class->hc_params, 0);
-  TEST_SIZE(sip_retry_after_class->hc_params, 
+  TEST_SIZE(sip_retry_after_class->hc_params,
 	    offsetof(sip_retry_after_t, af_params));
   TEST_SIZE(sip_timestamp_class->hc_params, 0);
   TEST_SIZE(sip_subject_class->hc_params, 0);
   TEST_SIZE(sip_priority_class->hc_params, 0);
-		           		
-  TEST_SIZE(sip_call_info_class->hc_params, 
+
+  TEST_SIZE(sip_call_info_class->hc_params,
 	    offsetof(sip_call_info_t, ci_params));
   TEST_SIZE(sip_organization_class->hc_params, 0);
   TEST_SIZE(sip_server_class->hc_params, 0);
   TEST_SIZE(sip_user_agent_class->hc_params, 0);
 
-  TEST_SIZE(sip_in_reply_to_class->hc_params, 
+  TEST_SIZE(sip_in_reply_to_class->hc_params,
 	    offsetof(sip_in_reply_to_t, k_items));
   TEST_SIZE(sip_accept_class->hc_params, offsetof(sip_accept_t, ac_params));
-  TEST_SIZE(sip_accept_encoding_class->hc_params, 
+  TEST_SIZE(sip_accept_encoding_class->hc_params,
 	    offsetof(sip_accept_encoding_t, aa_params));
-  TEST_SIZE(sip_accept_language_class->hc_params, 
+  TEST_SIZE(sip_accept_language_class->hc_params,
 	    offsetof(sip_accept_language_t, aa_params));
-   
+
   TEST_SIZE(sip_session_expires_class->hc_params,
 	    offsetof(sip_session_expires_t, x_params));
   TEST_SIZE(sip_min_se_class->hc_params, offsetof(sip_min_se_t, min_params));
 
   TEST_SIZE(sip_allow_class->hc_params, offsetof(sip_allow_t, k_items));
   TEST_SIZE(sip_require_class->hc_params, offsetof(sip_require_t, k_items));
-  TEST_SIZE(sip_proxy_require_class->hc_params, 
+  TEST_SIZE(sip_proxy_require_class->hc_params,
 	    offsetof(sip_proxy_require_t, k_items));
-  TEST_SIZE(sip_supported_class->hc_params, 
+  TEST_SIZE(sip_supported_class->hc_params,
 	    offsetof(sip_supported_t, k_items));
-  TEST_SIZE(sip_unsupported_class->hc_params, 
+  TEST_SIZE(sip_unsupported_class->hc_params,
 	    offsetof(sip_unsupported_t, k_items));
 
 #if SIP_HAVE_ENCRYPTION
-  TEST_SIZE(sip_encryption_class->hc_params, 
+  TEST_SIZE(sip_encryption_class->hc_params,
 	    offsetof(sip_encryption_t, au_params));
 #endif
 #if SIP_HAVE_RESPONSE_KEY
-  TEST_SIZE(sip_response_key_class->hc_params, 
+  TEST_SIZE(sip_response_key_class->hc_params,
 	    offsetof(sip_response_key_t, au_params));
 #endif
-  TEST_SIZE(sip_proxy_authenticate_class->hc_params,  
+  TEST_SIZE(sip_proxy_authenticate_class->hc_params,
 	    offsetof(sip_proxy_authenticate_t, au_params));
-  TEST_SIZE(sip_proxy_authorization_class->hc_params,  
+  TEST_SIZE(sip_proxy_authorization_class->hc_params,
 	    offsetof(sip_proxy_authorization_t, au_params));
-  TEST_SIZE(sip_authorization_class->hc_params,  
+  TEST_SIZE(sip_authorization_class->hc_params,
 	    offsetof(sip_authorization_t, au_params));
-  TEST_SIZE(sip_www_authenticate_class->hc_params,  
+  TEST_SIZE(sip_www_authenticate_class->hc_params,
 	    offsetof(sip_www_authenticate_t, au_params));
 
-  TEST_SIZE(sip_error_info_class->hc_params, 
+  TEST_SIZE(sip_error_info_class->hc_params,
 	    offsetof(sip_error_info_t, ei_params));
-  TEST_SIZE(sip_alert_info_class->hc_params, 
+  TEST_SIZE(sip_alert_info_class->hc_params,
 	    offsetof(sip_alert_info_t, ai_params));
-  TEST_SIZE(sip_reply_to_class->hc_params, 
+  TEST_SIZE(sip_reply_to_class->hc_params,
 	    offsetof(sip_reply_to_t, rplyto_params));
   TEST_SIZE(sip_warning_class->hc_params, 0);
-		       
+
   TEST_SIZE(sip_mime_version_class->hc_params, 0);
-  TEST_SIZE(sip_content_type_class->hc_params, 
+  TEST_SIZE(sip_content_type_class->hc_params,
 	    offsetof(sip_content_type_t, c_params));
-  TEST_SIZE(sip_content_encoding_class->hc_params, 
+  TEST_SIZE(sip_content_encoding_class->hc_params,
 	    offsetof(sip_content_encoding_t, k_items));
-  TEST_SIZE(sip_content_disposition_class->hc_params, 
+  TEST_SIZE(sip_content_disposition_class->hc_params,
 	    offsetof(sip_content_disposition_t, cd_params));
   TEST_SIZE(sip_content_length_class->hc_params, 0);
 
@@ -1796,10 +1796,10 @@
 {
   sip_header_t *sh = (sip_header_t *)h;
   unsigned n;
-  
+
   for (n = 0; sh; sh = sh->sh_next)
     n++;
-  
+
   return n;
 }
 
@@ -1830,7 +1830,7 @@
 
   home = su_home_new(sizeof *home);
 
-  TEST_1(msg = read_message(MSG_DO_EXTRACT_COPY, 
+  TEST_1(msg = read_message(MSG_DO_EXTRACT_COPY,
     "MESSAGE sip:John_Smith at tct.hut.fi SIP/2.0\r\n"
     "To: John Smith <sip:John_Smith at tct.hut.fi:5066;user=ip;maddr=131.228.16.2>\r\n"
     "  ; tag = deadbeef\r\n"
@@ -1928,9 +1928,9 @@
       TEST_1(v->v_branch == v0->v_branch);
   }
   TEST_1(v == NULL && v0 == NULL);
-  
+
   v0 = sip->sip_via;
-  
+
   TEST_1(v = sip_via_dup(home, v0));
   TEST(len(v->v_common), len(v0->v_common));
   for (; v && v0; v = v->v_next, v0 = v0->v_next) {
@@ -1951,7 +1951,7 @@
 
   msg_header_remove(msg, (msg_pub_t *)sip, (msg_header_t *)sip->sip_payload);
 
-  TEST(sip_add_tl(msg, sip, 
+  TEST(sip_add_tl(msg, sip,
 		  SIPTAG_FROM(SIP_NONE),
 		  SIPTAG_VIA(SIP_NONE),
 		  SIPTAG_VIA_STR("SIP/2.0/SCTP foo.bar.com:5060;branch=foo"),
@@ -1997,7 +1997,7 @@
   TEST_P(x, sip->sip_path->r_next);
 
   TEST_1(x = sip->sip_service_route);
-  TEST_1(sip_add_make(msg, sip, sip_service_route_class, 
+  TEST_1(sip_add_make(msg, sip, sip_service_route_class,
 		      "<sip:135.180.130.133>") == 0);
   TEST_P(x, sip->sip_service_route);
   TEST_1(sip->sip_service_route->r_next);
@@ -2005,7 +2005,7 @@
   /* Detect parsing errors */
   TEST_1(!sip_cseq_make(home, "21874624876976 INVITE"));
   TEST_1(!sip_cseq_make(home, "218746INVITE"));
-  
+
   msg_destroy(msg), msg = NULL;
 
   su_home_unref(home), home = NULL;
@@ -2023,7 +2023,7 @@
 
   home = su_home_new(sizeof *home);
 
-  TEST_1(msg = read_message(MSG_DO_EXTRACT_COPY, 
+  TEST_1(msg = read_message(MSG_DO_EXTRACT_COPY,
     "MESSAGE <sip:John_Smith at tct.hut.fi> SIP/2.0\r\n"
     "To: John Smith <sip:John_Smith at tct.hut.fi:5066;user=ip;maddr=131.228.16.2>\r\n"
     "  ; tag = deadbeef\r\n"
@@ -2066,7 +2066,7 @@
 
   home = su_home_new(sizeof *home);
 
-  TEST_1(msg = read_message(0, 
+  TEST_1(msg = read_message(0,
     "MESSAGE sip:John_Smith at tct.hut.fi SIP/2.0\r\n"
     "To: John Smith <sip:John_Smith at tct.hut.fi:5066;user=ip;maddr=131.228.16.2>\r\n"
     "From: <sip:joe at doe.org>;tag=foobar\r\n"
@@ -2141,7 +2141,7 @@
   su_home_t *home;
   sip_rack_t *rack, *rack0;
   sip_rseq_t *rseq, *rseq0;
-  
+
   BEGIN();
 
   TEST_1(home = su_home_create());
@@ -2156,7 +2156,7 @@
   TEST_1(rack0 = sip_rack_dup(home, rack));
   TEST_P(rack0->ra_method_name, rack->ra_method_name);
   TEST_1(rseq0 = sip_rseq_dup(home, rseq));
-  
+
   TEST_1(rack = sip_rack_make(home, "4\r\n\t5\r\n\tEXTRA"));
   TEST(rack->ra_response, 4);
   TEST(rack->ra_cseq, 5);
@@ -2164,13 +2164,13 @@
   TEST_S(rack->ra_method_name, "EXTRA");
   TEST_1(rseq = sip_rseq_make(home, "  6  "));
   TEST(rseq->rs_response, 6);
-  
+
   TEST_1(rack0 = sip_rack_dup(home, rack));
   TEST_1(rack0->ra_method_name != rack->ra_method_name);
   TEST_1(rseq0 = sip_rseq_dup(home, rseq));
 
   su_home_unref(home);
-  
+
   END();
 }
 
@@ -2204,7 +2204,7 @@
   TEST_1(aa = sip_accept_encoding_make(home, "gzip;q=1.0,deflate;q=1.0"));
   TEST_S(aa->aa_value, "gzip"); TEST_S(aa->aa_q, "1.0");
   TEST_1(aa->aa_next);
-  TEST_S(aa->aa_next->aa_value, "deflate"); 
+  TEST_S(aa->aa_next->aa_value, "deflate");
   TEST_1(aa = sip_accept_encoding_make(home, ","));
   TEST_S(aa->aa_value, ""); TEST_1(!aa->aa_next);
   TEST_1(aa = sip_accept_encoding_make(home, ""));
@@ -2214,7 +2214,7 @@
   TEST_1(aa = sip_accept_language_make(home, "fi;q=1.0,sv;q=1.0"));
   TEST_S(aa->aa_value, "fi"); TEST_S(aa->aa_q, "1.0");
   TEST_1(aa->aa_next);
-  TEST_S(aa->aa_next->aa_value, "sv"); 
+  TEST_S(aa->aa_next->aa_value, "sv");
   TEST_1(aa = sip_accept_language_make(home, ","));
   TEST_S(aa->aa_value, ""); TEST_1(!aa->aa_next);
   TEST_1(aa = sip_accept_language_make(home, ""));
@@ -2293,8 +2293,8 @@
 	  "opaque=\"423767123y723742376423762376423784623782a794e58\",\n"
 	  "stale=FALSE,algorithm=MD5"));
   TEST_S(www->au_scheme, "Digest");
-  TEST_1(www->au_params && www->au_params[0] && www->au_params[1] && www->au_params[2] && 
-	 www->au_params[3] && www->au_params[4] && www->au_params[5] && 
+  TEST_1(www->au_params && www->au_params[0] && www->au_params[1] && www->au_params[2] &&
+	 www->au_params[3] && www->au_params[4] && www->au_params[5] &&
 	 !www->au_params[6]);
   TEST_1(s = sip_header_as_string(home, (sip_header_t *)www));
   TEST_1(strlen(s) >= 128);
@@ -2387,7 +2387,7 @@
 
   END();
 }
-   
+
 int test_refer(void)
 {
   sip_refer_to_t *r, *r0;
@@ -2399,7 +2399,7 @@
 
   BEGIN();
 
-  char const m[] = 
+  char const m[] =
     "REFER sip:10.3.3.104 SIP/2.0\r\n"
     "Via: SIP/2.0/UDP 10.3.3.8;branch=z9hG4bKb8389b4c1BA8899\r\n"
     "From: \"Anthony Minessale\" <sip:polycom500 at 10.3.3.104>;tag=5AA04E0-66CFC37F\r\n"
@@ -2425,9 +2425,9 @@
   TEST_1(home = su_home_create());
 
   /* Check that Refer-Sub has now been added to our parser */
-  TEST_1(msg_mclass_insert_with_mask(test_mclass, sip_refer_sub_class, 
+  TEST_1(msg_mclass_insert_with_mask(test_mclass, sip_refer_sub_class,
 				     0, 0) == -1);
-  
+
   msg = read_message(0, m); TEST_1(msg); TEST_1(sip = sip_object(msg));
   TEST_1(sip->sip_refer_to);
   TEST_S(sip->sip_refer_to->r_url->url_headers,
@@ -2441,10 +2441,10 @@
   TEST_1(veclen = msg_iovec(msg, NULL, ISIZE_MAX));
   TEST_1(iovec = su_zalloc(msg_home(home), veclen * (sizeof iovec[0])));
   TEST_SIZE(msg_iovec(msg, iovec, veclen), veclen);
-  
+
   for (i = 0, size = 0; i < veclen; i++)
     size += iovec[i].mv_len;
-  
+
   TEST_1(back = su_zalloc(msg_home(msg), size + 1));
 
   for (i = 0, size = 0; i < veclen; i++) {
@@ -2452,7 +2452,7 @@
     size += iovec[i].mv_len;
   }
   back[size] = '\0';
-  
+
   TEST_S(back, m);
 
   TEST_1(r = r0 = sip_refer_to_make(home, "http://example.com;foo=bar"));
@@ -2474,7 +2474,7 @@
   TEST_P(r->r_params, NULL);
   TEST_S(sip_header_as_string(home, (sip_header_t*)r), s0);
 
-  TEST_1(r = r0 = sip_refer_to_make(home, 
+  TEST_1(r = r0 = sip_refer_to_make(home,
 				    "Web Site <http://example.com>;foo=bar"));
   TEST_S(r->r_display, "Web Site");
   TEST(r->r_url->url_type, url_http);
@@ -2497,7 +2497,7 @@
     TEST_1(r = r0 = sip_refer_to_make(home, s));
     msg_fragment_clear(r->r_common);
     TEST_1(str = sip_header_as_string(home, (void *)r));
-    TEST_S(str, 
+    TEST_S(str,
 	   "<"
 	   "sip:2000 at 10.3.3.104?Replaces=7d84c014-321368da-efa90f41%4010.3.3.8"
 	   "%3Bto-tag%3DpaNKgBB9vQe3D%3Bfrom-tag%3D93AC8D50-7CF6DAAF"
@@ -2505,15 +2505,15 @@
   }
 
   su_home_unref(home);
-    
+
   TEST_1(home = su_home_create());
-  TEST_1(b = b0 = sip_referred_by_make(home, 
+  TEST_1(b = b0 = sip_referred_by_make(home,
 				      "sip:joe at example.edu;param=value"));
   TEST_P(b->b_display, NULL);
   TEST_1(b->b_params);
   TEST_P(b->b_cid, NULL);
 
-  TEST_1(b = sip_referred_by_make(home, 
+  TEST_1(b = sip_referred_by_make(home,
 				  "John Doe <sip:joe at example.edu>"
 				  ";cid=\"foo at bar\""));
   TEST_S(b->b_display, "John Doe");
@@ -2533,7 +2533,7 @@
   TEST_S(b->b_cid, "cid:8u432658725");
   TEST(msg_header_remove_param(b->b_common, "cid"), 1);
   TEST_P(b->b_cid, NULL);
-  
+
   /* XXX */
 #define WORD ALPHA DIGIT "-.!%*_+`'~()<>:\\\"/[]?{}"
   rp = sip_replaces_make(home, WORD "@" WORD ";to-tag=foo;from-tag=bar"
@@ -2586,10 +2586,10 @@
   TEST_1(s->k_items); TEST_S(s->k_items[0], "foo");
 
   TEST_1(u = sip_has_unsupported(home, s, pr));
-  TEST_1(u->k_items); 
-  TEST_S(u->k_items[0], "bar");  
-  TEST_S(u->k_items[1], "dig");  
-  TEST_P(u->k_items[2], NULL);  
+  TEST_1(u->k_items);
+  TEST_S(u->k_items[0], "bar");
+  TEST_S(u->k_items[1], "dig");
+  TEST_P(u->k_items[2], NULL);
 
   TEST_1(u1 = sip_has_unsupported(home, s, r));
   TEST_1(u1->k_items); TEST_S(u1->k_items[0], "dig"); TEST_1(!u1->k_items[1]);
@@ -2622,7 +2622,7 @@
 				 sip_time_t def,
 				 sip_time_t now);
 
-  
+
   END();
 }
 #endif
@@ -2670,7 +2670,7 @@
   TEST(sip_allow_events_add(home, ae, "event8"), 0);
   TEST_S(ae->k_items[8], "event8");
 
-  TEST_1((ss = 
+  TEST_1((ss =
 	 sip_subscription_state_make(home, "terminated ; reason=timeout")));
   TEST_S(ss->ss_substate, "terminated");
   TEST_S(ss->ss_reason, "timeout");
@@ -2686,12 +2686,12 @@
   TEST_S(ss->ss_expires, "200");
   TEST_S(ss->ss_retry_after, "10");
 
-  TEST_1((ss = 
+  TEST_1((ss =
 	 sip_subscription_state_make(home, "active;expires=2")));
   TEST_S(ss->ss_substate, "active");
   TEST_S(ss->ss_expires, "2");
 
-  TEST_1((ss = 
+  TEST_1((ss =
 	  sip_subscription_state_make(home, "terminated;retry-after=3600")));
   TEST_S(ss->ss_substate, "terminated");
   TEST_P(ss->ss_expires, NULL);
@@ -2702,7 +2702,7 @@
   TEST_P(ss->ss_expires, NULL);
   TEST_S(ss->ss_retry_after, "3600");
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "SIP/2.0 202 Accepted\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -2772,11 +2772,11 @@
   TEST_1(p = sip_path_make(home, "<sip:foo@[baa::1]:5060>;lr"));
   TEST_1(p0 = sip_path_dup(home, p));
 
-  su_free(home, p); 
+  su_free(home, p);
   su_free(home, p0);
 
   TEST_1(!sip_service_route_make(home, "<sip:foo@[bar:50>;lr"));
-  TEST_1(!sip_service_route_make(home, 
+  TEST_1(!sip_service_route_make(home,
 				 "<sip:foo@[baa::1]>;lr bar, sip:foo"));
 
   TEST_1(sr = sip_service_route_make(home, "<sip:foo@[baa::1]:5060>;lr"));
@@ -2784,7 +2784,7 @@
   su_free(home, sr);
 
   TEST_1(sr = sip_service_route_make(home, "sip:foo@[baa::1]:5060;lr"));
-  
+
   su_free(home, sr);
   su_free(home, sr0);
 
@@ -2856,9 +2856,9 @@
   TEST_1(!sip_is_callerpref(NULL));
   TEST_1(sip_is_callerpref("+"));
   TEST_1(sip_is_callerpref("+foo"));
-  
+
   /* Booleans (treated as literals) */
-  s = "TRUE"; 
+  s = "TRUE";
   negate = 2; memset(sp, 0, sizeof sp);
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_literal);
@@ -2866,8 +2866,8 @@
   TEST_1(sip_prefs_match(sp, sp));
   TEST_1(!sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_init);
-  
-  s = "FALSE"; 
+
+  s = "FALSE";
   negate = 2; memset(sp, 0, sizeof sp);
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_literal);
@@ -2875,11 +2875,11 @@
   TEST_1(sip_prefs_match(sp, sp));
   TEST_1(!sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_init);
-  
+
   s = "\"!TRUE,!FALSE\""; negate = 0;
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_literal); TEST_1(negate);
-  
+
   /* Literal */
   s = "\" !oukki , doukki  \""; negate = 0; memset(sp, 0, sizeof sp);
 
@@ -2887,7 +2887,7 @@
   TEST(sp->sp_type, sp_literal);
   TEST_SIZE(sp->sp_literal.spl_length, 5);
   TEST_M(sp->sp_literal.spl_value, "oukki", 5); TEST_1(negate);
-  
+
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_literal);
   TEST_SIZE(sp->sp_literal.spl_length, 6);
@@ -2897,19 +2897,19 @@
   TEST(sp->sp_type, sp_init);
 
   /* Strings */
-  s = "\" !<oukki> , <douK\\\"ki  >\""; 
+  s = "\" !<oukki> , <douK\\\"ki  >\"";
   negate = 0; memset(sp, 0, sizeof sp);
 
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_string);
   TEST_SIZE(sp->sp_string.sps_length, 5);
   TEST_M(sp->sp_string.sps_value, "oukki", 5); TEST_1(negate);
-  
+
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_string);
   TEST_SIZE(sp->sp_string.sps_length, 10);
   TEST_M(sp->sp_string.sps_value, "douK\\\"ki  ", 10); TEST_1(!negate);
-  
+
   TEST_1(!sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_init);
 
@@ -2925,7 +2925,7 @@
   TEST_1(negate);
 
   *a = *sp;
-    
+
   TEST_1(sip_prefs_parse(sp, &s, &negate));
   TEST(sp->sp_type, sp_range);
   TEST_D(sp->sp_range.spr_lower, -DBL_MAX);
@@ -3007,15 +3007,15 @@
 
   error = 12;
 
-  TEST_1(sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"", 
-			    "\"INVITE\"", &error)); 
-  TEST_1(!sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"", 
-			     "\"BYE\"", &error)); 
+  TEST_1(sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"",
+			    "\"INVITE\"", &error));
+  TEST_1(!sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"",
+			     "\"BYE\"", &error));
   TEST(error, 12);
-  TEST_1(sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"", 
-			     "\"invite\"", &error)); 
-  TEST_1(sip_prefs_matching("\"!INVITE,MESSAGE,SUBSCRIBE\"", 
-			     "\"foo\"", &error)); 
+  TEST_1(sip_prefs_matching("\"INVITE,MESSAGE,SUBSCRIBE\"",
+			     "\"invite\"", &error));
+  TEST_1(sip_prefs_matching("\"!INVITE,MESSAGE,SUBSCRIBE\"",
+			     "\"foo\"", &error));
   TEST_1(sip_prefs_matching("TRUE", "", &error));
   TEST_1(sip_prefs_matching("", "", &error));
   TEST_1(!sip_prefs_matching("FALSE", "", &error));
@@ -3031,32 +3031,32 @@
   TEST_1(sip_prefs_matching("\"!<INVITE>\"", "\"<invite>\"", &error));
   TEST_1(!sip_prefs_matching("\"INVITE\"", "\"!INVITE\"", &error));
   TEST_1(sip_prefs_matching("\"!INVITE\"", "\"INVITE,MESSAGE\"", &error));
-  TEST_1(sip_prefs_matching("\"!INVITE,!MESSAGE\"", 
+  TEST_1(sip_prefs_matching("\"!INVITE,!MESSAGE\"",
 			     "\"INVITE,MESSAGE\"", &error));
   TEST_1(sip_prefs_matching("\"!MESSAGE\"", "\"INVITE,MESSAGE\"", &error));
-  TEST_1(!sip_prefs_matching("\"<foo>,<bar>\"", 
-			     "\"<FOO>,<BAR>\"", &error)); 
-  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"foo,bar\"", &error)); 
-  TEST_1(sip_prefs_matching("\"#=1\"", "\"#<=2\"", &error)); 
-  TEST_1(sip_prefs_matching("\"#1:2\"", "\"#<=2\"", &error)); 
-  TEST_1(!sip_prefs_matching("\"#1:2\"", "\"!#>=1,!#<=2\"", &error)); 
-  TEST_1(!sip_prefs_matching("\"#=0,#=1\"", "\"<FOO>,<BAR>\"", &error)); 
+  TEST_1(!sip_prefs_matching("\"<foo>,<bar>\"",
+			     "\"<FOO>,<BAR>\"", &error));
+  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"foo,bar\"", &error));
+  TEST_1(sip_prefs_matching("\"#=1\"", "\"#<=2\"", &error));
+  TEST_1(sip_prefs_matching("\"#1:2\"", "\"#<=2\"", &error));
+  TEST_1(!sip_prefs_matching("\"#1:2\"", "\"!#>=1,!#<=2\"", &error));
+  TEST_1(!sip_prefs_matching("\"#=0,#=1\"", "\"<FOO>,<BAR>\"", &error));
   TEST(error, 12);
 
   error = 12;
-  TEST_1(!sip_prefs_matching("\"<foo>,#=1\"", "\"<FOO>,<BAR>\"", &error)); 
+  TEST_1(!sip_prefs_matching("\"<foo>,#=1\"", "\"<FOO>,<BAR>\"", &error));
   TEST(error, -1);
 
   error = 12;
-  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"<foo>,#=1\"", &error)); 
+  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"<foo>,#=1\"", &error));
   TEST(error, -1);
 
   error = 12;
-  TEST_1(!sip_prefs_matching("\"<foo>,bar\"", "\"<FOO>,<BAR>\"", &error)); 
+  TEST_1(!sip_prefs_matching("\"<foo>,bar\"", "\"<FOO>,<BAR>\"", &error));
   TEST(error, -1);
 
   error = 12;
-  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"<foo>,#12:12\"", &error)); 
+  TEST_1(!sip_prefs_matching("\"<FOO>,<BAR>\"", "\"<foo>,#12:12\"", &error));
   TEST(error, -1);
 
   {
@@ -3083,7 +3083,7 @@
     TEST_1(!sip_is_callerpref("+methods=\"foo\""));
   }
 
-  TEST_1(m = sip_contact_make(home, 
+  TEST_1(m = sip_contact_make(home,
 			      "<sip:1 at domain>;video;audio;type=\"<video/H263>\","
 			      "<sip:2 at domain>;video=FALSE;audio;text,"
 			      "<sip:3 at domain>;text;audio=FALSE"));
@@ -3106,37 +3106,37 @@
 
   TEST_1(sip_contact_accept(m0, ac, &S, &N, &error)); TEST(S, 2); TEST(N, 2);
   TEST_1(!sip_contact_accept(m1, ac, &S, &N, &error));
-  TEST_1(!sip_contact_accept(m2, ac, &S, &N, &error)); 
+  TEST_1(!sip_contact_accept(m2, ac, &S, &N, &error));
 
-  TEST_1(ac = sip_accept_contact_make(home, 
+  TEST_1(ac = sip_accept_contact_make(home,
 				      "Joe the Luser "
 				      "<sip:127.0.0.1:5060>;video;audio"));
   TEST_S(ac->cp_params[0], "video");
   TEST_S(ac->cp_params[1], "audio");
   TEST_P(ac->cp_params[2], NULL);
 
-  TEST_1(ac = sip_accept_contact_make(home, 
+  TEST_1(ac = sip_accept_contact_make(home,
 				      "video;audio;explicit"));
   TEST_S(ac->cp_params[0], "video");
   TEST_S(ac->cp_params[1], "audio");
   TEST_S(ac->cp_params[2], "explicit");
   TEST_P(ac->cp_params[3], NULL);
 
-  TEST_1(ac = sip_accept_contact_make(home, 
+  TEST_1(ac = sip_accept_contact_make(home,
 				      "video = foo ;audio;explicit"));
   TEST_S(ac->cp_params[0], "video=foo");
   TEST_S(ac->cp_params[1], "audio");
   TEST_S(ac->cp_params[2], "explicit");
   TEST_P(ac->cp_params[3], NULL);
 
-  TEST_1(ac = sip_accept_contact_make(home, 
+  TEST_1(ac = sip_accept_contact_make(home,
 				      "video = \"bar\" ;audio;explicit"));
   TEST_S(ac->cp_params[0], "video=\"bar\"");
   TEST_S(ac->cp_params[1], "audio");
   TEST_S(ac->cp_params[2], "explicit");
   TEST_P(ac->cp_params[3], NULL);
-  
-  TEST_1(cp = sip_accept_contact_make(home, 
+
+  TEST_1(cp = sip_accept_contact_make(home,
 				     "*;audio;video;require;explicit;q=1.0,"
 				     "*;audio;require;q=0.8"
 				     ));
@@ -3156,8 +3156,8 @@
 
   TEST_1(sip_contact_accept(m0, ac, &S, &N, &error)); TEST(S, 2); TEST(N, 2);
   /* Explicit has short-circuit evaluation */
-  TEST_1(!sip_contact_accept(m1, ac, &S, &N, &error)); 
-  TEST_1(!sip_contact_accept(m2, ac, &S, &N, &error)); 
+  TEST_1(!sip_contact_accept(m1, ac, &S, &N, &error));
+  TEST_1(!sip_contact_accept(m2, ac, &S, &N, &error));
 
   TEST_1(ac = ac->cp_next);
 
@@ -3174,7 +3174,7 @@
 
   TEST_P(ac->cp_next, NULL);
 
-  TEST_1(rejc = sip_reject_contact_make(home, 
+  TEST_1(rejc = sip_reject_contact_make(home,
 					"*;type=\"<video/H263>\";video=TRUE"));
   TEST_S(rejc->cp_params[0], "type=\"<video/H263>\"");
   TEST_S(rejc->cp_params[1], "video=TRUE");
@@ -3184,7 +3184,7 @@
   TEST_1(!sip_contact_reject(m2, rejc));
 
   TEST_1(!sip_contact_immune(m0));
-  m0 = sip_contact_immunize(home, m0); TEST_1(m0); 
+  m0 = sip_contact_immunize(home, m0); TEST_1(m0);
   TEST_1(sip_contact_immune(m0));
 
   TEST_1(!sip_contact_immune(m1));
@@ -3237,7 +3237,7 @@
   int S;
   sip_contact_t *m, *m1, *m2, *m3, *m4, *m5;
 
-  char const contact[] = 
+  char const contact[] =
     "sip:u1 at h.example.com;audio;video;methods=\"INVITE,BYE\";q=0.2,"
     "sip:u2 at h.example.com;audio=\"FALSE\";"
     "methods=\"INVITE\";actor=\"msg-taker\";q=0.2,"
@@ -3246,10 +3246,10 @@
     "sip:u4 at h.example.com;audio;methods=\"INVITE,OPTIONS\";q=0.2,"
     "sip:u5 at h.example.com;q=0.5";
 
-  char const reject[] = 
+  char const reject[] =
     "*;actor=\"msg-taker\";video";
 
-  char const accept[] = 
+  char const accept[] =
     "*;audio;require,"
     "*;video;explicit,"
     "*;methods=\"BYE\";class=\"business\";q=1.0";
@@ -3291,7 +3291,7 @@
   TEST_S(re->re_cause, "200");
   TEST_S(re->re_text, "\"Ok\"");
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "BYE sip:foo at bar SIP/2.0\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -3307,7 +3307,7 @@
 
   sip = sip_object(msg);
 
-  TEST_1(msg); 
+  TEST_1(msg);
   TEST_1(sip);
   TEST_1(re = sip->sip_reason);
   TEST_S(re->re_protocol, "SIP");
@@ -3341,7 +3341,7 @@
 
   /* Not a token */
   TEST_1(!sip_reason_make(home, "\"nSIP\";cause=200;text=\"Ok\""));
-  /* Empty list */ 
+  /* Empty list */
   TEST_1(!sip_reason_make(home, ","));
   /* no protocol token */
   TEST_1(!sip_reason_make(home, "cause=16;text=\"call cleared\""));
@@ -3368,7 +3368,7 @@
 
   TEST_1(home = su_home_create());
 
-  TEST_1((w = sip_warning_make(home, 
+  TEST_1((w = sip_warning_make(home,
 			       "399 host:5060 \"Ok\", "
 			       "399 [::1]:39999 \"foo\\\" bar\"")));
   TEST(w->w_code, 399);
@@ -3383,7 +3383,7 @@
   TEST_S(w->w_text, "foo\" bar");
   TEST_1(w->w_next == NULL);
 
-  TEST_S(sip_header_as_string(home, (sip_header_t *)w), 
+  TEST_S(sip_header_as_string(home, (sip_header_t *)w),
 	 "399 [::1]:39999 \"foo\\\" bar\"");
 
   su_home_unref(home);
@@ -3406,7 +3406,7 @@
 
   BEGIN();
 
-  msg = read_message(MSG_DO_EXTRACT_COPY, 
+  msg = read_message(MSG_DO_EXTRACT_COPY,
     "BYE sip:foo at bar SIP/2.0\r\n"
     "To: <sip:foo at bar>;tag=deadbeef\r\n"
     "From: <sip:bar at foo>;\r\n"
@@ -3419,7 +3419,7 @@
   sip = sip_object(msg);
 
   TEST_1(home = msg_home(msg));
-  
+
   TEST_1(sac = sip_security_client_make(home, "digest;q=0.5,ipsec-3gpp"));
   TEST_S(sac->sa_mec, "digest");
   TEST_S(sac->sa_q, "0.5");
@@ -3458,7 +3458,7 @@
 
   END();
 }
- 
+
 
 static int test_utils(void)
 {
@@ -3492,23 +3492,23 @@
   TEST_S(f->a_url->url_params, "test=1");
 
   TEST_1(secs = sip_security_server_make(home, "Digest"));
-  TEST_1(secv = 
-	 sip_security_verify_make(home, 
+  TEST_1(secv =
+	 sip_security_verify_make(home,
 				  "Digest;"
 				  "d-ver=\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\""));
-  
+
   TEST_1(sip_security_verify_compare(secs, secv, &d_ver) == 0);
   TEST_S(d_ver, "\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"");
 
-  TEST_1(secs = 
-	 sip_security_server_make(home, 
+  TEST_1(secs =
+	 sip_security_server_make(home,
 				  "TLS;q=1,"
 				  "Digest;q=0.1;"
 				  "d-alg=MD5;d-qop=\"auth,auth-int\","
 				  "Digest;d-alg=AKA-MD5;q=0.9"
 				  ));
-  TEST_1(secv = 
-	 sip_security_verify_make(home, 
+  TEST_1(secv =
+	 sip_security_verify_make(home,
 				  "TLS;q=1,"
 				  "Digest ; q = 0.1;"
 				  "d-ver=\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\";"
@@ -3521,12 +3521,12 @@
   TEST_1(sip_security_verify_compare(secs->sa_next, secv, &d_ver) != 0);
   TEST_1(sip_security_verify_compare(secs, secv->sa_next, &d_ver) != 0);
   d_ver = "kuik";
-  TEST_1(sip_security_verify_compare(secs->sa_next, secv->sa_next, &d_ver) 
+  TEST_1(sip_security_verify_compare(secs->sa_next, secv->sa_next, &d_ver)
 	 == 0);
   TEST_S(d_ver, "\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"");
   d_ver = "kuik";
-  TEST_1(sip_security_verify_compare(secs->sa_next->sa_next, 
-				     secv->sa_next->sa_next, &d_ver) 
+  TEST_1(sip_security_verify_compare(secs->sa_next->sa_next,
+				     secv->sa_next->sa_next, &d_ver)
 	 == 0);
   TEST_1(d_ver == NULL);
 
@@ -3535,15 +3535,15 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }
 
 char *lastpart(char *path)
 {
-  if (strchr(path, '/')) 
+  if (strchr(path, '/'))
     return strrchr(path, '/') + 1;
   else
     return path;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/validator.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@internal @IFILE validator.c  
+/**@internal @IFILE validator.c
  *
  * SIP parser tester. This uses output from tport dump where messages are
  * separated with Control-K ('\v') from each other.
@@ -74,7 +74,7 @@
   unsigned o_very_verbose : 1;	/**< Be very verbose */
   unsigned o_requests : 1;	/**< Only requests */
   unsigned o_responses : 1;	/**< Only responses */
-  unsigned o_decode : 1;	/**< Only try to decode, 
+  unsigned o_decode : 1;	/**< Only try to decode,
 				   print error if unknown headers */
   unsigned o_print : 1;		/**< Print whole message */
   unsigned o_times : 1;		/**< Generate timing information */
@@ -107,7 +107,7 @@
 {
   if (h->bsize > 1)
     n /= h->bsize;
-    
+
   if (n < h->N)
     return &h->buckets[n];
   else
@@ -119,7 +119,7 @@
 {
   size_t i;
   assert(h->N == n->N); assert(h->bsize == n->bsize);
-  
+
   for (i = 0; i <= h->N; i++) {
     if (n->buckets[i]) {
       h->buckets[i] /= n->buckets[i];
@@ -165,8 +165,8 @@
 
 void usage(void)
 {
-  fprintf(stderr, 
-	  "usage: %s [-vdp]\n", 
+  fprintf(stderr,
+	  "usage: %s [-vdp]\n",
 	  name);
   exit(2);
 }
@@ -175,7 +175,7 @@
 {
   char *p = strrchr(path, '/');
 
-  if (p) 
+  if (p)
     return p + 1;
   else
     return path;
@@ -204,23 +204,23 @@
     else if (argv[1][1] == 0) {
       argv++; break;
     }
-    else if (strcmp(argv[1], "-v") == 0) 
+    else if (strcmp(argv[1], "-v") == 0)
       o->o_very_verbose = o->o_verbose, o->o_verbose = 1;
-    else if (strcmp(argv[1], "-d") == 0) 
+    else if (strcmp(argv[1], "-d") == 0)
       o->o_decode = 1;		/* Decode only */
-    else if (strcmp(argv[1], "-p") == 0) 
+    else if (strcmp(argv[1], "-p") == 0)
       o->o_print = 1;
-    else if (strcmp(argv[1], "-q") == 0) 
+    else if (strcmp(argv[1], "-q") == 0)
       o->o_requests = 1;
-    else if (strcmp(argv[1], "-Q") == 0) 
+    else if (strcmp(argv[1], "-Q") == 0)
       o->o_responses = 1;
-    else if (strcmp(argv[1], "-t") == 0) 
+    else if (strcmp(argv[1], "-t") == 0)
       o->o_times = 1;
-    else if (strcmp(argv[1], "-m") == 0) 
+    else if (strcmp(argv[1], "-m") == 0)
       o->o_memstats = 1;
-    else if (strcmp(argv[1], "-s") == 0) 
+    else if (strcmp(argv[1], "-s") == 0)
       o->o_vsipstats = o->o_sipstats, o->o_sipstats = 1;
-    else if (strcmp(argv[1], "-h") == 0) 
+    else if (strcmp(argv[1], "-h") == 0)
       o->o_histogram = 1;
     else
       usage();
@@ -246,7 +246,7 @@
     validate_file(0, "", ctx);
 
   report(ctx);
-  
+
   exit(0);
 }
 
@@ -289,11 +289,11 @@
   errno = EINVAL;
   perror("mmap not implemented");
   return -1;
-#endif    
+#endif
 
 }
 
-su_inline 
+su_inline
 void nul_terminate(char *b, off_t size)
 {
   char *end;
@@ -320,9 +320,9 @@
       return 1;			/* status */
 
     linelen = strcspn(b, "\r\n");
-    
-    if (linelen > plen + 1 && 
-	b[linelen - plen - 1] == ' ' && 
+
+    if (linelen > plen + 1 &&
+	b[linelen - plen - 1] == ' ' &&
 	strncmp(b + linelen - plen, protocol, plen) == 0)
       return 1;			/* request */
 
@@ -334,7 +334,7 @@
 int validate_dump(char *b, off_t size, context_t *ctx)
 {
   size_t n = 0, N = 0;
-  struct message { 
+  struct message {
     char *b;
     int   size;
   } *msgs = NULL;
@@ -352,7 +352,7 @@
     if (o->o_responses &&
 	memcmp(b, SIP_VERSION_CURRENT, strlen(SIP_VERSION_CURRENT)) != 0)
       ;
-    else if (o->o_requests && 
+    else if (o->o_requests &&
 	memcmp(b, SIP_VERSION_CURRENT, strlen(SIP_VERSION_CURRENT)) == 0)
       ;
     else {
@@ -361,7 +361,7 @@
 
       if (n == N) {
 	N *= 2; if (n == N) N = 16;
-      
+
 	msgs = realloc(msgs, sizeof(*msgs) * N);
 	if (msgs == NULL) {
 	  perror("realloc");
@@ -370,13 +370,13 @@
       }
       msgs[n].b = b; msgs[n].size = msize;
       n++;
-      
+
       ctx->bytes += msize;
-      
+
       if (msize > maxsize)
 	maxsize = msize;
     }
-    
+
     b += msize; if (*b) *b++ = '\0';
   }
 
@@ -408,16 +408,16 @@
 
     if (o->o_memstats)
       su_home_init_stats(msg_home(msg));
-    
+
     msg_buf_set(msg, msgs[n].b, msgs[n].size + 1);
     msg_buf_commit(msg, msgs[n].size, 1);
-    
+
     su_home_preload(msg_home(msg), 1, msgs[n].size + 384);
 
     m = msg_extract(msg);
 
     if (m < 0) {
-      fprintf(stderr, "%s%sparsing error in message "MOD_ZU"\n", 
+      fprintf(stderr, "%s%sparsing error in message "MOD_ZU"\n",
 	      ctx->name, ctx->sep, n);
       ctx->errors++;
     }
@@ -434,7 +434,7 @@
 
     msg_destroy(msg);
   }
-  
+
   time1 = su_nanocounter();
 
   if (o->o_times) {
@@ -470,7 +470,7 @@
 	   (ull)hs->hs_frees.hsf_number, (ull)hs->hs_frees.hsf_bytes,
 	   (ull)hs->hs_frees.hsf_rbytes);
   if (hs->hs_rehash || hs->hs_clones)
-    printf("\t"LLU" rehashes, "LLU" clones\n", 
+    printf("\t"LLU" rehashes, "LLU" clones\n",
 	   (ull)hs->hs_rehash, (ull)hs->hs_clones);
 }
 
@@ -506,11 +506,11 @@
 void report_sipstat(char const *what, sipstat_t const *sss)
 {
   printf("%s: "LLU" with %.1f headers (total "LLU")\n",
-	 what, (ull)sss->number, (double)sss->headers / sss->number, 
+	 what, (ull)sss->number, (double)sss->headers / sss->number,
 	 (ull)sss->headers);
   if (sss->payloads)
     printf("\t"LLU" with body of %.1f bytes (total "LLU")\n",
-	   (ull)sss->payloads, (double)sss->pl_bytes / sss->payloads, 
+	   (ull)sss->payloads, (double)sss->pl_bytes / sss->payloads,
 	   (ull)sss->payloads);
 }
 
@@ -541,7 +541,7 @@
   sss->number++;
 
   /* Count headers */
-  for (n = 0, h = h->sh_succ; h && !sip_is_separator((sip_header_t *)h); h = h->sh_succ) 
+  for (n = 0, h = h->sh_succ; h && !sip_is_separator((sip_header_t *)h); h = h->sh_succ)
     n++;
 
   sss->headers += n;
@@ -574,7 +574,7 @@
   for (i = h->N - 1; i >= 0 && h->buckets[i] == 0.0; i--)
     ;
   max_i = i;
-  
+
   if (min_i >= max_i)
     return;
 
@@ -600,7 +600,7 @@
   if (ctx->hist_msgsize)
     report_histogram("Message size", ctx->hist_msgsize);
 
-  if (o->o_times && ctx->files > 1) 
+  if (o->o_times && ctx->files > 1)
     printf("total "LLU" messages in %g seconds (%g msg/sec)\n",
 	   (ull)n, ctx->time, (double)n / ctx->time);
 
@@ -620,7 +620,7 @@
 
     *hs = *ctx->hs;
     report_memstats("total", hs);
-    
+
     /* Calculate mean */
     hs->hs_clones /= n; hs->hs_rehash /= n;
     hs->hs_allocs.hsa_number /= n; hs->hs_allocs.hsa_bytes /= n;
@@ -632,7 +632,7 @@
 
     report_memstats("mean", hs);
 
-    printf("\testimator fails %.1f%% times (mean slack %.0f bytes)\n", 
+    printf("\testimator fails %.1f%% times (mean slack %.0f bytes)\n",
 	   100 * (double)ctx->est_fail / (ctx->est_fail + ctx->est_succ),
 	   (double)ctx->est_slack / ctx->est_succ);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -17,7 +17,7 @@
 2005-10-15  Pekka Pessi  <Pekka.Pessi at nokia.com>
 
   * Updated API of soa_get_local_sdp() and friends.
-  
+
   Added parameter for returning SDP C structure to soa_get_capability_sdp(),
   soa_get_remote_sdp(), soa_get_user_sdp(), and soa_get_local_sdp().
 
@@ -62,11 +62,11 @@
     M ./libsofia-sip-ua/soa/test_soa.c -2 +2
 
 2005-10-12  Pekka Pessi  <Pekka.Pessi at nokia.com>
-	
+
   * Updated SOA_VALID_ACTIONS().
 
     M ./libsofia-sip-ua/soa/soa.c -1 +13
-  	      
+
   * Added soa_name.
 
     M ./libsofia-sip-ua/soa/soa.c +1

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Doxyfile.in	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 PROJECT_NAME         = "soa"
 OUTPUT_DIRECTORY     = ../docs/html/soa
 
-INPUT 		     = @srcdir@/soa.docs @srcdir@/sofia-sip/soa.h 
+INPUT 		     = @srcdir@/soa.docs @srcdir@/sofia-sip/soa.h
 INPUT               += @srcdir@/sofia-sip/soa_add.h @srcdir@/soa.c
 INPUT		    += @srcdir@/sofia-sip/soa_tag.h @srcdir@/soa_tag.c
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/Makefile.am	Tue Dec 16 13:05:22 2008
@@ -35,7 +35,7 @@
 			sofia-sip/soa_add.h sofia-sip/soa_tag.h
 
 libsoa_la_SOURCES = 	soa.c soa_static.c \
-			soa_tag.c soa_tag_ref.c 
+			soa_tag.c soa_tag_ref.c
 
 COVERAGE_INPUT = 	$(libsoa_la_SOURCES) $(include_sofia_HEADERS)
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c	Tue Dec 16 13:05:22 2008
@@ -72,13 +72,13 @@
 /* Internal prototypes */
 su_inline int soa_media_is_ready(soa_session_t const *ss);
 
-enum soa_sdp_kind { 
+enum soa_sdp_kind {
   soa_capability_sdp_kind,
   soa_user_sdp_kind,
   soa_remote_sdp_kind
 };
 
-static int soa_set_sdp(soa_session_t *ss, 
+static int soa_set_sdp(soa_session_t *ss,
 		       enum soa_sdp_kind what,
 		       sdp_session_t const *sdp0,
 		       char const *sdp_str, issize_t str_len);
@@ -247,7 +247,7 @@
     return (void)su_seterrno(EFAULT), NULL;
 
   namelen = strlen(name) + 1;
-  
+
   ss = su_home_new(actions->sizeof_soa_session + namelen);
   if (ss) {
     ss->ss_root = root;
@@ -520,7 +520,7 @@
     }
   }
 
-  if (af < SOA_AF_ANY || af > SOA_AF_IP6_IP4) 
+  if (af < SOA_AF_ANY || af > SOA_AF_IP6_IP4)
     af = ss->ss_af;
 
   if (rtp_select < SOA_RTP_SELECT_SINGLE || rtp_select > SOA_RTP_SELECT_ALL)
@@ -533,7 +533,7 @@
   srtp_confidentiality = srtp_confidentiality != 0;
   srtp_integrity = srtp_integrity != 0;
 
-  change_session 
+  change_session
     =  af != (int)ss->ss_af
     || rtp_select != (int)ss->ss_rtp_select
     || rtp_sort != (int)ss->ss_rtp_sort
@@ -705,8 +705,8 @@
 
 
 /** Base bethod for getting list of parameters. */
-tagi_t *soa_base_get_paramlist(soa_session_t const *ss, 
-			       tag_type_t tag, tag_value_t value, 
+tagi_t *soa_base_get_paramlist(soa_session_t const *ss,
+			       tag_type_t tag, tag_value_t value,
 			       ...)
 {
   ta_list ta;
@@ -714,7 +714,7 @@
 
   if (ss == NULL)
     return NULL;
-  
+
   ta_start(ta, tag, value);
 
   params = tl_llist(
@@ -739,7 +739,7 @@
 			  SOATAG_REMOTE_SDP_STR(ss->ss_remote->ssd_unparsed)),
 
 		   SOATAG_AF(ss->ss_af),
-		   TAG_IF(ss->ss_address, 
+		   TAG_IF(ss->ss_address,
 			  SOATAG_ADDRESS(ss->ss_address)),
 
 		   SOATAG_SRTP_ENABLE(ss->ss_srtp_enable),
@@ -755,7 +755,7 @@
 
 #include <sofia-sip/sip_status.h>
 
-/** Convert @soa error to a SIP response code and phrase. */ 
+/** Convert @soa error to a SIP response code and phrase. */
 int soa_error_as_sip_response(soa_session_t *ss,
 			      char const **return_phrase)
 {
@@ -773,7 +773,7 @@
   return ss->ss_status;
 }
 
-/** Convert @soa error to a SIP @Reason header. */ 
+/** Convert @soa error to a SIP @Reason header. */
 char const *soa_error_as_sip_reason(soa_session_t *ss)
 {
   char const *phrase;
@@ -789,7 +789,7 @@
   status = soa_error_as_sip_response(ss, &phrase);
 
   reason = su_sprintf(ss->ss_home, "SIP;cause=%u;text=\"%s\"", status, phrase);
-  
+
   if (ss->ss_reason)
     su_free(ss->ss_home, reason);
 
@@ -815,7 +815,7 @@
 /** Return SDP description of capabilities.
  *
  * @param ss  pointer to @soa session
- * @param return_sdp      return value for capability SDP structure 
+ * @param return_sdp      return value for capability SDP structure
  * @param return_sdp_str  return value for capability SDP string
  * @param return_len  return value for length of capability SDP string
  *
@@ -823,8 +823,8 @@
  * @retval 1 if description is returned
  * @retval -1 upon an error
  *
- * @sa @RFC3261 section 11, soa_set_capability_sdp(), 
- * SOATAG_CAPS_SDP(), SOATAG_CAPS_SDP_STR(), 
+ * @sa @RFC3261 section 11, soa_set_capability_sdp(),
+ * SOATAG_CAPS_SDP(), SOATAG_CAPS_SDP_STR(),
  * nua_options(), #nua_i_options
  */
 int soa_get_capability_sdp(soa_session_t const *ss,
@@ -858,10 +858,10 @@
 }
 
 
-/** Set capability SDP. 
+/** Set capability SDP.
  *
  * Capability SDP is used instead of user SDP when generating OPTIONS
- * responses describing media capabilities. 
+ * responses describing media capabilities.
  *
  * @param ss  pointer to @soa session
  * @param sdp pointer to SDP session structure
@@ -874,10 +874,10 @@
  * @retval -1 upon an error
  *
  * @sa @RFC3261 section 11, soa_get_capability_sdp(),
- * SOATAG_CAPS_SDP(), SOATAG_CAPS_SDP_STR(), 
+ * SOATAG_CAPS_SDP(), SOATAG_CAPS_SDP_STR(),
  * nua_options(), #nua_i_options
  */
-int soa_set_capability_sdp(soa_session_t *ss, 
+int soa_set_capability_sdp(soa_session_t *ss,
 			   struct sdp_session_s const *sdp,
 			   char const *str, issize_t len)
 {
@@ -888,7 +888,7 @@
 }
 
 /** Set capabilities */
-int 
+int
 soa_base_set_capability_sdp(soa_session_t *ss,
 			    sdp_session_t *_sdp,
 			    char const *str0, isize_t len0)
@@ -947,12 +947,12 @@
  *
  * @param ss  pointer to @soa session
  * @param return_sdp SDP  session structure return value
- * @param return_sdp_str  return value for pointer to string 
+ * @param return_sdp_str  return value for pointer to string
  *                        containing the user SDP session description
  * @param return_len  return value for user SDP session description string
- *                    length 
+ *                    length
  *
- * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len 
+ * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len
  * may be NULL.
  *
  * @retval 0 if there is no description to return
@@ -1008,9 +1008,9 @@
 {
   assert(ss != NULL);
   return ss ? (int)ss->ss_user_version : -1;
-} 
+}
 
-/**Store user SDP to soa session. 
+/**Store user SDP to soa session.
  *
  * User SDP is used as basis for SDP Offer/Answer negotiation. It can be
  * very minimal, consisting just m= line containing media name, transport
@@ -1039,7 +1039,7 @@
  * soa_generate_answer(), soa_get_local_sdp(), soa_set_capability_sdp(),
  * soa_set_remote_sdp()
  */
-int soa_set_user_sdp(soa_session_t *ss, 
+int soa_set_user_sdp(soa_session_t *ss,
 		     struct sdp_session_s const *sdp,
 		     char const *str, issize_t len)
 {
@@ -1050,7 +1050,7 @@
 }
 
 /** Set user SDP (base version). */
-int soa_base_set_user_sdp(soa_session_t *ss, 
+int soa_base_set_user_sdp(soa_session_t *ss,
 			  sdp_session_t *sdp, char const *str0, isize_t len0)
 {
   ++ss->ss_user_version;
@@ -1064,12 +1064,12 @@
  *
  * @param ss  pointer to @soa session
  * @param return_sdp SDP  session structure return value
- * @param return_sdp_str  return value for pointer to string 
+ * @param return_sdp_str  return value for pointer to string
  *                        containing the user SDP session description
  * @param return_len  return value for user SDP session descrioption string
- *                    length 
+ *                    length
  *
- * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len 
+ * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len
  * may be NULL.
  *
  * @retval 0 if there is no description to return
@@ -1125,11 +1125,11 @@
 {
   assert(ss != NULL);
   return ss->ss_remote_version;
-} 
+}
 
 /** Set remote SDP (offer or answer).
  *
- * <i>Remote SDP</i> is an SDP offer or answer received from the remote end. 
+ * <i>Remote SDP</i> is an SDP offer or answer received from the remote end.
  * It is used together with <i>User SDP</i> as basis for SDP Offer/Answer
  * negotiation in soa_generate_answer() or soa_process_answer(). Remote SDP
  * can be set using soa_set_params() and SOATAG_REMOTE_SDP() or
@@ -1158,7 +1158,7 @@
  * soa_clear_remote_sdp(), soa_init_offer_answer(), soa_get_local_sdp(),
  * soa_set_user_sdp(), soa_set_capability_sdp().
  */
-int soa_set_remote_sdp(soa_session_t *ss, 
+int soa_set_remote_sdp(soa_session_t *ss,
 		       struct sdp_session_s const *sdp,
 		       char const *str, issize_t len)
 {
@@ -1178,11 +1178,11 @@
 
   if (!new_version)
     return 0;
-    
+
   soa_set_activity(ss, sdp->sdp_media, soa_activity_remote);
 
   ss->ss_remote_version++;
-  
+
   return soa_description_set(ss, ss->ss_remote, sdp, str0, len0);
 }
 
@@ -1236,12 +1236,12 @@
  *
  * @param ss  pointer to @soa session
  * @param return_sdp SDP  session structure return value
- * @param return_sdp_str  return value for pointer to string 
+ * @param return_sdp_str  return value for pointer to string
  *                        containing the user SDP session description
  * @param return_len  return value for user SDP session descrioption string
- *                    length 
+ *                    length
  *
- * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len 
+ * Any of the parameters @a return_sdp, @a return_sdp_str, or @a return_len
  * may be NULL.
  *
  * @retval 0 if there is no description to return
@@ -1398,7 +1398,7 @@
  * SOATAG_LOCAL_SDP() or SOATAG_LOCAL_SDP_STR().
  *
  * The user SDP has been stored to the soa session with soa_set_user_sdp()
- * or with soa_set_params() tags SOATAG_USER_SDP() or SOATAG_USER_SDP_STR(). 
+ * or with soa_set_params() tags SOATAG_USER_SDP() or SOATAG_USER_SDP_STR().
  * There are various other parameters directing the generation of offer, set
  * by soa_set_params().
  *
@@ -1566,7 +1566,7 @@
   return 0;
 }
 
-/** Complete offer-answer after receiving answer. 
+/** Complete offer-answer after receiving answer.
  *
  * The SDP offer/answer negotiation is completed after receiving answer from
  * remote end. The answer is combined with the offer, and the application
@@ -1597,7 +1597,7 @@
   if (ss->ss_in_progress)
     return su_seterrno(EALREADY), -1;
 
-  /** @ERROR EPROTO We have not sent an offer 
+  /** @ERROR EPROTO We have not sent an offer
       or already have received answer. */
   if (!ss->ss_offer_sent || ss->ss_answer_recv)
     return su_seterrno(EPROTO), -1;
@@ -1647,7 +1647,7 @@
   return 0;
 }
 
-/** Process rejection of offer. 
+/** Process rejection of offer.
  *
  * If the SDP offer was rejected (e.g., an offer in re-INVITE asked remote
  * end to add video to the session but the request was rejected), the
@@ -1678,7 +1678,7 @@
   if (ss->ss_in_progress)
     return su_seterrno(EALREADY), -1;
 
-  /** @ERROR EPROTO We have not sent an offer 
+  /** @ERROR EPROTO We have not sent an offer
       or already have received answer. */
   if (!ss->ss_offer_sent || ss->ss_answer_recv)
     return su_seterrno(EPROTO), -1;
@@ -1713,7 +1713,7 @@
   return 0;
 }
 
-/** Activate session. 
+/** Activate session.
  *
  * Mark soa session as active.
  *
@@ -1982,7 +1982,7 @@
 
 /**
  * Parses and stores session description
- * 
+ *
  * @param ss instance pointer
  * @param what caps, local or remote
  * @param sdp0 new sdp (parsed)
@@ -1990,7 +1990,7 @@
  * @param str_len length on unparsed data
  **/
 static
-int soa_set_sdp(soa_session_t *ss, 
+int soa_set_sdp(soa_session_t *ss,
 		enum soa_sdp_kind what,
 		sdp_session_t const *sdp0,
 		char const *sdp_str, issize_t str_len)
@@ -2037,17 +2037,17 @@
     if (what == soa_remote_sdp_kind) {
       *sdp = *ssd->ssd_sdp;
       /* Calls soa_static_set_remote_sdp() by default */
-      return ss->ss_actions->soa_set_remote_sdp(ss, new_version, 
+      return ss->ss_actions->soa_set_remote_sdp(ss, new_version,
 						sdp, sdp_str, str_len);
       /* XXX - should check changes by soa_set_remote_sdp */
     }
     return 0;
-  } 
+  }
 
   if (sdp0) {
     /* note: case 1 - src in parsed form */
     *sdp = *sdp0;
-  } 
+  }
   else /* if (sdp_str) */ {
     /* note: case 2 - src in unparsed form */
     parser = sdp_parse(ss->ss_home, sdp_str, str_len, flags | sdp_f_anynet);
@@ -2059,7 +2059,7 @@
 
     *sdp = *sdp_session(parser);
   }
- 
+
   switch (what) {
   case soa_capability_sdp_kind:
     /* Calls soa_static_set_capability_sdp() by default */
@@ -2110,7 +2110,7 @@
     sdp_str0_new = su_strndup(ss->ss_home, sdp_str, str_len);
   else
     sdp_str0_new = sdp_str_new;
-  
+
   if (sdp_new && printer && sdp_str_new && sdp_str0_new) {
     tbf1 = ssd->ssd_sdp, tbf2 = ssd->ssd_printer;
     tbf3 = (void *)ssd->ssd_str, tbf4 = (void *)ssd->ssd_unparsed;
@@ -2118,14 +2118,14 @@
     ssd->ssd_sdp = sdp_new;
     ssd->ssd_printer = printer;
     ssd->ssd_str = sdp_str_new;
-    ssd->ssd_unparsed = sdp_str0_new;      
+    ssd->ssd_unparsed = sdp_str0_new;
 
     retval = 1;
   }
   else {
     tbf1 = sdp_new, tbf2 = printer, tbf3 = sdp_str_new, tbf4 = sdp_str0_new;
   }
-  
+
   su_free(ss->ss_home, tbf1);
   sdp_printer_free(tbf2);
   if (tbf3 != tbf4)
@@ -2136,7 +2136,7 @@
 
 
 /** Duplicate a session descriptions. */
-int soa_description_dup(su_home_t *home, 
+int soa_description_dup(su_home_t *home,
 			struct soa_description *ssd,
 			struct soa_description const *ssd0)
 {
@@ -2154,7 +2154,7 @@
 }
 
 /** Free session descriptions. */
-void soa_description_free(soa_session_t *ss, 
+void soa_description_free(soa_session_t *ss,
 			  struct soa_description *ssd)
 {
   void *tbf1, *tbf2, *tbf3, *tbf4;
@@ -2257,12 +2257,12 @@
     /* Use the application-specified address -
      * do not check that it is found from the local address list */
     c->c_nettype = sdp_net_in;
-    
+
     if (host_is_ip4_address(address))
       c->c_addrtype = sdp_addr_ip4;
     else
       c->c_addrtype = sdp_addr_ip6;
-    
+
     if (!host_is_ip6_reference(address)) {
       c->c_address = strcpy(buffer, address);
     }
@@ -2270,7 +2270,7 @@
       /* Remove brackets [] around the reference */
       size_t len = strlen(address + 1);
       c->c_address = memcpy(buffer, address + 1, len - 1);
-      buffer[len - 1] = '\0'; 
+      buffer[len - 1] = '\0';
     }
     return 0;
   }
@@ -2299,7 +2299,7 @@
   }
 
   for (res = NULL; res == NULL;) {
-    if ((error = su_getlocalinfo(hints, &res)) < 0 
+    if ((error = su_getlocalinfo(hints, &res)) < 0
 	&& error != ELI_NOADDRESS) {
       SU_DEBUG_1(("%s: su_localinfo: %s\n", __func__,
 		  su_gli_strerror(error)));

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.docs	Tue Dec 16 13:05:22 2008
@@ -15,7 +15,7 @@
 
 SIP uses SDP and a negotiation procedure known as "SDP
 Offer-Answer Model" to establish the multimedia sessions. The
-SDP Offer-Answer negotiation is specified in 
+SDP Offer-Answer negotiation is specified in
 <a href="http://ietf.org/rfc/rfc3264.txt">RFC 3264</a>.
 
 The soa engine is implemented in object-oriented manner. The default soa
@@ -32,17 +32,17 @@
 -# modifying session (section 8)
 -# indicating capabilities (section 9)
 
-The offerer indicates its capabilities in the offer: 
+The offerer indicates its capabilities in the offer:
 - the media streams it wants to establish
-- transport addresses it uses to receive by media streams 
-  (IP addresses, port numbers, transport protocols) 
+- transport addresses it uses to receive by media streams
+  (IP addresses, port numbers, transport protocols)
 - the codecs used by particular streams
 - codec parameters (for instance, codec profile used by H.263)
 
 The answerer indicates which parts of the offer are acceptable to
 it in the answer:
 - the media streams it agrees to establish
-- transport addresses answerer uses to receive by media streams 
+- transport addresses answerer uses to receive by media streams
 - the codecs and codec parameters used by particular streams
 
 Note that the capabilites indicate what the party generating the
@@ -57,24 +57,24 @@
 as session <i>preconditions</i> is defined
 <a href="http://ietf.org/rfc/rfc3312.txt">RFC 3312</a>.
 Another example of two-phase negotiation is presented in RFC
-3264 section 10.2, showing how a single codec can be selected. 
+3264 section 10.2, showing how a single codec can be selected.
 
- at section soa_motivation SOA Design 
+ at section soa_motivation SOA Design
 
 Why to have simple interface? Is it not simple enough to include SDP offer
 with your INVITE, and act on SDP answer in 200 OK?
 
 Our design goal is to allow application to follow the simple call
 model, regardless of the underlying complications - early
-sessions, preconditions, session timers, 3rd party call control. 
+sessions, preconditions, session timers, 3rd party call control.
 In other words, we would like a have a simple "cooked" interface
 toward naive applications even if the underlying call follows the
 byzantine call model chosen by 3GPP.
 
 @section soa_with_sip Using SDP Offer/Answer with SIP
 
-Using SDP Offer/Answer with SIP is specified in 
-<a href="http://ietf.org/rfc/rfc3261.txt">RFC 3261</a>, 
+Using SDP Offer/Answer with SIP is specified in
+<a href="http://ietf.org/rfc/rfc3261.txt">RFC 3261</a>,
 <a href="http://ietf.org/rfc/rfc3262.txt">RFC 3262 (100rel and PRACK)</a>, and
 <a href="http://ietf.org/rfc/rfc3211.txt">RFC 3311 (UPDATE)</a>.
 
@@ -90,7 +90,7 @@
 
 PRACK may only be sent when an unacknowledged 100rel (reliable 1XX
 series response) is received. UPDATE may be sent during early or
-established dialog. 
+established dialog.
 
 Only one INVITE request may be pending within a dialog. Only one
 non-INVITE request may be pending within a dialog (in one
@@ -120,13 +120,13 @@
 - if offer was sent in INVITE, first session description in any
   non-error response to INVITE is treated as the answer
 - if offer was sent in 2XX response, session description in
-  ACK is answer 
+  ACK is answer
 - if offer was sent in 100rel response, session description in
-  PRACK is answer 
-- if offer was sent in PRACK or UPDATE, session description in 
+  PRACK is answer
+- if offer was sent in PRACK or UPDATE, session description in
   2XX response is answer
 
-Rules for situations when endpoint MUST ignore the SDP: 
+Rules for situations when endpoint MUST ignore the SDP:
 - If offer was sent in INVITE, only the first session description in
   any non-error (1XX or 2XX) response to INVITE is processed, rest
   are ignored
@@ -146,7 +146,7 @@
 
 Rules for resolving glare (both endpoints trying to send offer at the same
 time):
-- if a offer is received while UAS has generated an offer, 
+- if a offer is received while UAS has generated an offer,
   it must be rejected (with SIP 491 response).
 
 @section soa_use_cases SOA and SDP Offer/Answer Scenarios
@@ -154,11 +154,11 @@
 Note that due to limitations in space
 - soa_set_params() is referred as @c set_params
 - soa_set_remote_sdp() is referred as @c set_remote
-- soa_generate_offer() followed by soa_get_session_sdp() 
-  is referred as @c gen_offer  
-- soa_generate_answer() followed by soa_get_session_sdp() 
-  is referred as @c gen_answer 
-- soa_process_answer() is referred as @c proc_answer 
+- soa_generate_offer() followed by soa_get_session_sdp()
+  is referred as @c gen_offer
+- soa_generate_answer() followed by soa_get_session_sdp()
+  is referred as @c gen_answer
+- soa_process_answer() is referred as @c proc_answer
 
 @subsection soa_uc_basic_out Basic Call Out
 
@@ -228,7 +228,7 @@
 	|		|		|			|
 </pre>
 
- at subsection soa_uc_basic_3p 3rd Party Call In 
+ at subsection soa_uc_basic_3p 3rd Party Call In
 
 The 3rd-party call model just reverses the O/A roles of callee and caller.
 
@@ -442,10 +442,10 @@
 @page soa_sdp_oa_use_cases Use Cases for SIP and SDP Offer/Answer
 
 This page contains a list of use cases or call scenarios for SIP and SDP
-Offer/Answer. 
+Offer/Answer.
 
 There are a few call scenarios that we expect to see when dealing with more
-telephone-like side of SIP: 
+telephone-like side of SIP:
 - calling to existing PSTN networks (early session)
 - doing resource reservations
 - calling to 3G IMS
@@ -531,9 +531,9 @@
 
 @section soa_use_case_4 Case #4: UPDATE with Offer
 
-This is a call model with two rounds of offer/answer and 100rel. 
+This is a call model with two rounds of offer/answer and 100rel.
 It can be used, for instance, when the endpoints have to make sure
-that there are enough network capacity for the call to succeed. 
+that there are enough network capacity for the call to succeed.
 They can establish a new radio bearer, for instance, before
 progressing with the call. The initial offer would contain SDP
 attribute "inactive", the second "sendrev":
@@ -542,9 +542,9 @@
 	A		        B
 	|			|
 	|----INVITE (offer)---->|
-	|			| 
-	|			| 
-	|<----183 (answer)------| 
+	|			|
+	|			|
+	|<----183 (answer)------|
 	|--------PRACK--------->|
 	|<-----200/PRACK--------|
 	|			|
@@ -594,7 +594,7 @@
 </pre>
 
 
- at section soa_use_case_6 Case #6: Callee Making 2nd Offer 
+ at section soa_use_case_6 Case #6: Callee Making 2nd Offer
 
 Alternative 2 to above: two rounds of offer/answer and 100rel, but
 now it is B who wants to do two rounds and initiates second
@@ -636,9 +636,9 @@
         	A		        B
         	|			|
         	|----INVITE (offer)---->|
-        	|			| 
-        	|			| 
-        	|<----183 (answer)------| 
+        	|			|
+        	|			|
+        	|<----183 (answer)------|
         	|-----PRACK(offer2)---->|
         	|<--200/PRACK(answer2)--|
         	|			|
@@ -718,7 +718,7 @@
 
 @section soa_use_case_10 Case #10: Upgrade Session with Re-INVITE
 
-The session is upgraded: a new media is added to the session. 
+The session is upgraded: a new media is added to the session.
 
 <pre>
 	A		        B
@@ -775,7 +775,7 @@
 
 /** @typedef struct soa_session soa_session_t;
 
- at brief "soa" session object. 
+ at brief "soa" session object.
 
 The @soa session object is responsible for
 @ref soa_with_sip "SDP offer/answer negotiation"
@@ -796,7 +796,7 @@
 @code
 int soa_set_params(soa_session_t *ss,
                    tag_type_t tag, tag_value_t value, ...);
-int soa_get_params(soa_session_t const *ss, 
+int soa_get_params(soa_session_t const *ss,
                    tag_type_t tag, tag_value_t value, ...);
 
 tagi_t *soa_get_paramlist(soa_session_t const *ss,
@@ -805,7 +805,7 @@
 
 @par Functions used to obtain status information from "soa" session objects:
 @code
-int soa_error_as_sip_response(soa_session_t *soa, 
+int soa_error_as_sip_response(soa_session_t *soa,
                               char const **return_phrase);
 
 char const *soa_error_as_sip_reason(soa_session_t *soa);
@@ -814,9 +814,9 @@
 @endcode
 
 
- at par Functions used to store and retrieve SDP descriptions: 
+ at par Functions used to store and retrieve SDP descriptions:
 @code
-int soa_set_capability_sdp(soa_session_t *ss, 
+int soa_set_capability_sdp(soa_session_t *ss,
                            struct sdp_session_s const *sdp,
                            char const *str, issize_t len);
 
@@ -825,7 +825,7 @@
                            char const **return_sdp_str,
                            isize_t *return_len);
 
-int soa_set_remote_sdp(soa_session_t *ss, 
+int soa_set_remote_sdp(soa_session_t *ss,
                        struct sdp_session_s const *sdp,
                        char const *str, issize_t len);
 
@@ -838,7 +838,7 @@
 
 int soa_get_remote_version(soa_session_t const *ss);
 
-int soa_set_user_sdp(soa_session_t *ss, 
+int soa_set_user_sdp(soa_session_t *ss,
                      struct sdp_session_s const *sdp,
                      char const *str, issize_t len);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_static.c	Tue Dec 16 13:05:22 2008
@@ -35,11 +35,11 @@
  *    a) generating offer (upgrade with user-SDP)
  *    b) generating answer (upgrade with remote-SDP, rejects with user-SDP)
  *  2. session exists
- *    a) generating offer: 
+ *    a) generating offer:
  *       upgrades with user-SDP
- *    b) generating answer: 
+ *    b) generating answer:
  *       upgrades with remote-SDP, rejects with user-SDP
- *    c) processing answer: 
+ *    c) processing answer:
  *       rejects with user-SDP, no upgrades
  *
  * Upgrading session with user SDP:
@@ -101,16 +101,16 @@
 static int soa_static_set_params(soa_session_t *ss, tagi_t const *tags);
 static int soa_static_get_params(soa_session_t const *ss, tagi_t *tags);
 static tagi_t *soa_static_get_paramlist(soa_session_t const *ss,
-					tag_type_t tag, tag_value_t value, 
+					tag_type_t tag, tag_value_t value,
 					...);
-static int soa_static_set_capability_sdp(soa_session_t *ss, 
+static int soa_static_set_capability_sdp(soa_session_t *ss,
 				       sdp_session_t *sdp,
 				       char const *, isize_t);
-static int soa_static_set_remote_sdp(soa_session_t *ss, 
+static int soa_static_set_remote_sdp(soa_session_t *ss,
 				   int new_version,
 				   sdp_session_t *sdp,
 				   char const *, isize_t);
-static int soa_static_set_user_sdp(soa_session_t *ss, 
+static int soa_static_set_user_sdp(soa_session_t *ss,
 				   sdp_session_t *sdp,
 				   char const *, isize_t);
 static int soa_static_generate_offer(soa_session_t *ss, soa_callback_f *);
@@ -122,7 +122,7 @@
 static int soa_static_deactivate(soa_session_t *ss, char const *option);
 static void soa_static_terminate(soa_session_t *ss, char const *option);
 
-struct soa_session_actions const soa_default_actions = 
+struct soa_session_actions const soa_default_actions =
   {
     (sizeof soa_default_actions),
     sizeof (struct soa_static_session),
@@ -213,7 +213,7 @@
 }
 
 static tagi_t *soa_static_get_paramlist(soa_session_t const *ss,
-					tag_type_t tag, tag_value_t value, 
+					tag_type_t tag, tag_value_t value,
 					...)
 {
   soa_static_session_t *sss = (soa_static_session_t *)ss;
@@ -237,28 +237,28 @@
   return tl;
 }
 
-static int soa_static_set_capability_sdp(soa_session_t *ss, 
+static int soa_static_set_capability_sdp(soa_session_t *ss,
 					 sdp_session_t *sdp,
-					 char const *sdp_str, 
+					 char const *sdp_str,
 					 isize_t sdp_len)
 {
   return soa_base_set_capability_sdp(ss, sdp, sdp_str, sdp_len);
 }
 
 
-static int soa_static_set_remote_sdp(soa_session_t *ss, 
+static int soa_static_set_remote_sdp(soa_session_t *ss,
 				     int new_version,
 				     sdp_session_t *sdp,
-				     char const *sdp_str, 
+				     char const *sdp_str,
 				     isize_t sdp_len)
 {
   return soa_base_set_remote_sdp(ss, new_version, sdp, sdp_str, sdp_len);
 }
 
 
-static int soa_static_set_user_sdp(soa_session_t *ss, 
+static int soa_static_set_user_sdp(soa_session_t *ss,
 				   sdp_session_t *sdp,
-				   char const *sdp_str, 
+				   char const *sdp_str,
 				   isize_t sdp_len)
 {
   return soa_base_set_user_sdp(ss, sdp, sdp_str, sdp_len);
@@ -266,7 +266,7 @@
 
 /** Generate a rejected m= line */
 static
-sdp_media_t *soa_sdp_make_rejected_media(su_home_t *home, 
+sdp_media_t *soa_sdp_make_rejected_media(su_home_t *home,
 					 sdp_media_t const *m,
 					 sdp_session_t *sdp,
 					 int include_all_codecs)
@@ -317,7 +317,7 @@
   return expanded;
 }
 
-/** Check if @a session should be upgraded with @a remote */ 
+/** Check if @a session should be upgraded with @a remote */
 int soa_sdp_upgrade_is_needed(sdp_session_t const *session,
 			      sdp_session_t const *remote)
 {
@@ -328,7 +328,7 @@
   if (!session)
     return 1;
 
-  for (rm = remote->sdp_media, lm = session->sdp_media; 
+  for (rm = remote->sdp_media, lm = session->sdp_media;
        rm && lm ; rm = rm->m_next, lm = lm->m_next) {
     if (rm->m_rejected)
       continue;
@@ -394,12 +394,12 @@
 
 /** Find first matching media in table @a mm.
  *
- * - if allow_rtp_mismatch == 0, search for a matching codec 
+ * - if allow_rtp_mismatch == 0, search for a matching codec
  * - if allow_rtp_mismatch == 1, prefer m=line with matching codec
  * - if allow_rtp_mismatch > 1, ignore codecs
  */
 static
-int soa_sdp_matching_mindex(soa_session_t *ss, 
+int soa_sdp_matching_mindex(soa_session_t *ss,
 			    sdp_media_t *mm[],
 			    sdp_media_t const *with,
 			    int *return_codec_mismatch)
@@ -425,11 +425,11 @@
 
     if (!sdp_media_match_with(mm[i], with))
       continue;
-    
+
     if (!rtp)
       break;
 
-    if (soa_sdp_media_matching_rtpmap(with->m_rtpmaps, 
+    if (soa_sdp_media_matching_rtpmap(with->m_rtpmaps,
 				      mm[i]->m_rtpmaps,
 				      auxiliary))
       break;
@@ -445,11 +445,11 @@
 }
 
 /** Set payload types in @a l_m according to the values in @a r_m.
- * 
+ *
  * @retval number of common codecs
  */
 static
-int soa_sdp_set_rtpmap_pt(sdp_media_t *l_m, 
+int soa_sdp_set_rtpmap_pt(sdp_media_t *l_m,
 			  sdp_media_t const *r_m)
 {
   sdp_rtpmap_t *lrm, **next_lrm;
@@ -489,7 +489,7 @@
       lrm->rm_any = 1;
     }
   }
-  
+
   if (local_codecs == common_codecs)
     return common_codecs;
 
@@ -511,7 +511,7 @@
       next_lrm = &lrm->rm_next;
       continue;
     }
-    
+
     lrm->rm_any = 0;
 
     pt = lrm->rm_pt;
@@ -520,7 +520,7 @@
       for (pt = 96; pt < 128; pt++)
         if (!dynamic_pt[pt])
           break;
-      
+
       if (pt == 128) {
         for (pt = 0; pt < 128; pt++)
           if (!sdp_rtpmap_well_known[pt] && !dynamic_pt[pt])
@@ -544,7 +544,7 @@
     }
 
     dynamic_pt[pt] = 1;
-  
+
     next_lrm = &lrm->rm_next;
   }
 
@@ -557,7 +557,7 @@
  * @return Number of common codecs
  */
 static
-int soa_sdp_sort_rtpmap(sdp_rtpmap_t **inout_list, 
+int soa_sdp_sort_rtpmap(sdp_rtpmap_t **inout_list,
 			sdp_rtpmap_t const *rrm,
 			char const *auxiliary)
 {
@@ -611,7 +611,7 @@
  * @return Number of common codecs
  */
 static
-int soa_sdp_select_rtpmap(sdp_rtpmap_t **inout_list, 
+int soa_sdp_select_rtpmap(sdp_rtpmap_t **inout_list,
 			  sdp_rtpmap_t const *rrm,
 			  char const *auxiliary,
 			  int select_single)
@@ -628,7 +628,7 @@
   for (left = inout_list; *left; ) {
     if (auxiliary && soa_sdp_is_auxiliary_codec(*left, auxiliary))
       /* Insert into list of auxiliary codecs */
-      *next_aux = *left, *left = (*left)->rm_next, 
+      *next_aux = *left, *left = (*left)->rm_next,
 	next_aux = &(*next_aux)->rm_next;
     else if (!(select_single && common_codecs > 0)
 	     && sdp_rtpmap_find_matching(rrm, (*left)))
@@ -645,7 +645,7 @@
 }
 
 
-/** Sort and select rtpmaps  */ 
+/** Sort and select rtpmaps  */
 static
 int soa_sdp_media_upgrade_rtpmaps(soa_session_t *ss,
 				  sdp_media_t *sm,
@@ -660,7 +660,7 @@
   if (rm->m_type == sdp_media_audio)
     auxiliary = sss->sss_audio_aux;
 
-  if (ss->ss_rtp_sort == SOA_RTP_SORT_REMOTE || 
+  if (ss->ss_rtp_sort == SOA_RTP_SORT_REMOTE ||
       (ss->ss_rtp_sort == SOA_RTP_SORT_DEFAULT &&
        rm->m_mode == sdp_recvonly)) {
     soa_sdp_sort_rtpmap(&sm->m_rtpmaps, rm->m_rtpmaps, auxiliary);
@@ -679,7 +679,7 @@
 }
 
 
-/** Sort and select rtpmaps within session */ 
+/** Sort and select rtpmaps within session */
 static
 int soa_sdp_session_upgrade_rtpmaps(soa_session_t *ss,
 				    sdp_session_t *session,
@@ -688,8 +688,8 @@
   sdp_media_t *sm;
   sdp_media_t const *rm;
 
-  for (sm = session->sdp_media, rm = remote->sdp_media; 
-       sm && rm; 
+  for (sm = session->sdp_media, rm = remote->sdp_media;
+       sm && rm;
        sm = sm->m_next, rm = rm->m_next) {
     if (!sm->m_rejected && sdp_media_uses_rtp(sm))
       soa_sdp_media_upgrade_rtpmaps(ss, sm, rm);
@@ -698,7 +698,7 @@
   return 0;
 }
 
-/** Upgrade m= lines within session */ 
+/** Upgrade m= lines within session */
 static
 int soa_sdp_upgrade(soa_session_t *ss,
 		    su_home_t *home,
@@ -737,7 +737,7 @@
   if (!s_media || !o_media || !u_media || !r_media)
     return -1;
 
-  um = sdp_media_dup_all(home, user->sdp_media, session); 
+  um = sdp_media_dup_all(home, user->sdp_media, session);
   if (!um && user->sdp_media)
     return -1;
 
@@ -819,7 +819,7 @@
 	for (i = 0; i < Ns; i++) {
 	  if (s_media[i])
 	    continue;
-	  s_media[i] = 
+	  s_media[i] =
 	    soa_sdp_make_rejected_media(home, o_media[i], session, 0);
 	}
       }
@@ -905,7 +905,7 @@
   return NULL;
 }
 
-/** Check if @a session contains media that are rejected by @a remote. */ 
+/** Check if @a session contains media that are rejected by @a remote. */
 static
 int soa_sdp_reject_is_needed(sdp_session_t const *session,
 			     sdp_session_t const *remote)
@@ -917,7 +917,7 @@
   if (!session)
     return 0;
 
-  for (sm = session->sdp_media, rm = remote->sdp_media; 
+  for (sm = session->sdp_media, rm = remote->sdp_media;
        sm && rm; sm = sm->m_next, rm = rm->m_next) {
     if (rm->m_rejected) {
       if (!sm->m_rejected)
@@ -937,7 +937,7 @@
   return 0;
 }
 
-/** If m= line is rejected by remote mark m= line rejected within session */ 
+/** If m= line is rejected by remote mark m= line rejected within session */
 static
 int soa_sdp_reject(su_home_t *home,
 		   sdp_session_t *session,
@@ -983,7 +983,7 @@
  * @sa soatag_hold
  *
  * @retval 1 if session was changed (or to be changed, if @a dryrun is nonzero)
- */ 
+ */
 static
 int soa_sdp_mode_set(sdp_session_t const *user,
 		     int const *s2u,
@@ -1129,7 +1129,7 @@
   if (local && remote) switch (action) {
   case generate_answer:
   case process_answer:
-    if (sdp_media_count(remote, sdp_media_any, "*", 0, 0) < 
+    if (sdp_media_count(remote, sdp_media_any, "*", 0, 0) <
 	sdp_media_count(local, sdp_media_any, "*", 0, 0)) {
       SU_DEBUG_5(("%s: remote %s is truncated: expanding\n",
 		  by, action == generate_answer ? "offer" : "answer"));
@@ -1140,7 +1140,7 @@
   default:
     break;
   }
-  
+
   /* Step A: Create local SDP session (based on user-supplied SDP) */
   if (local == NULL) switch (action) {
   case generate_offer:
@@ -1156,7 +1156,7 @@
       /* o->o_address = local->sdp_origin->o_address; */
     }
     if (!o->o_address)
-      o->o_address = c0; 
+      o->o_address = c0;
     local->sdp_origin = o;
 
     if (soa_init_sdp_origin(ss, o, c_address) < 0) {
@@ -1179,7 +1179,7 @@
       break;
     if (local != local0)
       *local0 = *local, local = local0;
-    SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by, 
+    SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
 		"upgrade with local description"));
     if (soa_sdp_upgrade(ss, tmphome, local, user, NULL, &u2s, &s2u) < 0)
       goto internal_error;
@@ -1226,7 +1226,7 @@
 	} while (0)
 	DUP_LOCAL(local);
       }
-      SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by, 
+      SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
 		  "marking rejected media"));
       soa_sdp_reject(tmphome, local, remote);
     }
@@ -1269,7 +1269,7 @@
       SU_DEBUG_7(("soa_static(%p, %s): %s\n", (void *)ss, by,
 		  "upgrade codecs with remote description"));
       if (local != local0) {
-	*local0 = *local, local = local0; 
+	*local0 = *local, local = local0;
 	DUP_LOCAL(local);
       }
       soa_sdp_session_upgrade_rtpmaps(ss, local, remote);
@@ -1281,7 +1281,7 @@
     break;
   }
 
-  /* Step F: Update c= line */ 
+  /* Step F: Update c= line */
   switch (action) {
   case generate_offer:
   case generate_answer:
@@ -1290,12 +1290,12 @@
 	local->sdp_connection)
       break;
 
-    if (local->sdp_connection == NULL || 
-	(user->sdp_connection != NULL && 
+    if (local->sdp_connection == NULL ||
+	(user->sdp_connection != NULL &&
 	 sdp_connection_cmp(local->sdp_connection, user->sdp_connection))) {
       sdp_media_t *m;
 
-      /* Every m= line (even rejected one) must have a c= line 
+      /* Every m= line (even rejected one) must have a c= line
        * or there must be a c= line at session level
        */
       if (user->sdp_connection)
@@ -1309,7 +1309,7 @@
 
       if (m) {
 	if (local != local0) {
-	  *local0 = *local, local = local0; 
+	  *local0 = *local, local = local0;
 	  DUP_LOCAL(local);
 	}
 	local->sdp_connection = c;
@@ -1324,7 +1324,7 @@
   soa_description_free(ss, ss->ss_previous);
 
   if (u2s) {
-    u2s = u2s_alloc(ss->ss_home, u2s); 
+    u2s = u2s_alloc(ss->ss_home, u2s);
     s2u = u2s_alloc(ss->ss_home, s2u);
     if (!u2s || !s2u)
       goto internal_error;
@@ -1379,7 +1379,7 @@
 	ss->ss_previous_user_version = 0;
 	ss->ss_previous_remote_version = 0;
       }
-      
+
       su_free(ss->ss_home, u2s), su_free(ss->ss_home, s2u);
 
       goto internal_error;
@@ -1444,7 +1444,7 @@
 {
   /* NOTE:
    * - local SDP might have changed
-   * - remote SDP might have been updated 
+   * - remote SDP might have been updated
    */
 
   if (offer_answer_step(ss, generate_answer, "soa_generate_answer") < 0)
@@ -1459,7 +1459,7 @@
   /* NOTE:
    * - both local and remote information is available
    * - local SDP might have changed
-   * - remote SDP might have been updated 
+   * - remote SDP might have been updated
    */
   if (offer_answer_step(ss, process_answer, "soa_process_answer") < 0)
     return -1;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa_tag.c	Tue Dec 16 13:05:22 2008
@@ -58,7 +58,7 @@
   if (!t || !t->t_tag)
     return 0;
 
-  ns = t->t_tag->tt_ns; 
+  ns = t->t_tag->tt_ns;
   if (!ns)
     return 0;
 
@@ -66,7 +66,7 @@
 }
 
 /**@def SOATAG_ANY()
- * 
+ *
  * Filter tag matching any SOATAG_*() item.
  */
 tag_typedef_t soatag_any = NSTAG_TYPEDEF(*);
@@ -218,7 +218,7 @@
  *
  * User SDP is used as basis for SDP Offer/Answer negotiation. It can be
  * very minimal, listing just m= lines with the port numbers and RTP payload
- * numbers of supported codecs, like 
+ * numbers of supported codecs, like
  * @code
  *   SOATAG_USER_SDP_STR("m=audio 5004 RTP/AVP 0 8")
  * @endcode
@@ -256,7 +256,7 @@
  *      #SOA_AF_ANY,
  *      #SOA_AF_IP4_ONLY, #SOA_AF_IP6_ONLY,
  *      #SOA_AF_IP4_IP6,  #SOA_AF_IP6_IP4
- *    } 
+ *    }
  *
  * @par Values
  *    - #SOA_AF_ANY       (0) any address family (default)
@@ -303,7 +303,7 @@
  *    soa_set_params(), soa_get_params(), soa_get_paramlist() \n
  *
  * @par Parameter type
- *    enum { 
+ *    enum {
  *      #SOA_RTP_SELECT_SINGLE, #SOA_RTP_SELECT_COMMON, #SOA_RTP_SELECT_ALL
  *    } \n
  *    (int in range 0..2)
@@ -330,7 +330,7 @@
  * The named audio codecs are considered auxiliary, that is, they are
  * considered as common codec only when they are the only codec listed on
  * the media line.
- * 
+ *
  * When generating answer or second offer soa includes auxiliary audio
  * codecs in the list of codecs even if it is selecting only one codec or
  * common codecs.
@@ -358,10 +358,10 @@
 /**@def SOATAG_RTP_SORT(x)
  *
  * When selecting the common codecs, soa can either select first local codec
- * supported by remote end, or first remote codec supported by local codecs. 
+ * supported by remote end, or first remote codec supported by local codecs.
  * The preference is indicated with ordering: the preferred codec is
  * first and so on.
- * 
+ *
  * The auxiliary audio codecs (specified with SOATAG_AUDIO_AUX()) are listed
  * after other codecs.
  *
@@ -415,14 +415,14 @@
 
 
 /**@def SOATAG_ACTIVE_AUDIO(x)
- * 
+ *
  * Audio session status.
  *
  * @par Used with
  *
  * @par Parameter type
- *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED, 
- *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY, 
+ *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
+ *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
  *           #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
  *
  * @par Values
@@ -438,14 +438,14 @@
 tag_typedef_t soatag_active_audio = INTTAG_TYPEDEF(active_audio);
 
 /**@def SOATAG_ACTIVE_VIDEO(x)
- * 
+ *
  * Video session status
  *
  * @par Used with
  *
  * @par Parameter type
- *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED, 
- *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY, 
+ *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
+ *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
  *           #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
  *
  * @par Values
@@ -460,7 +460,7 @@
 tag_typedef_t soatag_active_video = INTTAG_TYPEDEF(active_video);
 
 /**@def SOATAG_ACTIVE_IMAGE(x)
- * 
+ *
  * Active image session status
  *
  * @par Used with
@@ -468,8 +468,8 @@
  *    #nua_i_state \n
  *
  * @par Parameter type
- *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED, 
- *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY, 
+ *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
+ *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
  *           #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
  *
  * @par Values
@@ -480,8 +480,8 @@
  *    - #SOA_ACTIVE_SENDRECV  (3)
  *
  * @par Parameter type
- *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED, 
- *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY, 
+ *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
+ *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
  *           #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
  *
  * @par Values
@@ -496,7 +496,7 @@
 tag_typedef_t soatag_active_image = INTTAG_TYPEDEF(active_image);
 
 /**@def SOATAG_ACTIVE_CHAT(x)
- * 
+ *
  * Active chat session status.
  *
  * @par Used with
@@ -504,8 +504,8 @@
  *    #nua_i_state \n
  *
  * @par Parameter type
- *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED, 
- *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY, 
+ *    enum { #SOA_ACTIVE_DISABLED, #SOA_ACTIVE_REJECTED,
+ *           #SOA_ACTIVE_INACTIVE, #SOA_ACTIVE_SENDONLY,
  *           #SOA_ACTIVE_RECVONLY, #SOA_ACTIVE_SENDRECV }
  *
  * @par Values
@@ -520,7 +520,7 @@
 tag_typedef_t soatag_active_chat = INTTAG_TYPEDEF(active_chat);
 
 /**@def SOATAG_SRTP_ENABLE(x)
- *  
+ *
  * Enable SRTP
  *
  * @par Used with
@@ -533,7 +533,7 @@
  *    @c !=0 enable \n
  *    @c 0 disable
  *
- * Corresponding tag taking reference parameter is 
+ * Corresponding tag taking reference parameter is
  * SOATAG_SRTP_ENABLE_REF()
  *
  * @todo SRTP functionality is not implemented.
@@ -541,7 +541,7 @@
 tag_typedef_t soatag_srtp_enable = BOOLTAG_TYPEDEF(srtp_enable);
 
 /**@def SOATAG_SRTP_CONFIDENTIALITY(x)
- *  
+ *
  * Enable SRTP confidentiality negotiation.
  *
  * @par Used with
@@ -554,16 +554,16 @@
  *    @c != 0 enable SRTP confidentiality \n
  *    @c 0 disable SRTP conidentiality
  *
- * Corresponding tag taking reference parameter is 
+ * Corresponding tag taking reference parameter is
  * SOATAG_SRTP_CONFIDENTIALITY_REF()
  *
  * @todo SRTP functionality is not implemented.
  */
-tag_typedef_t soatag_srtp_confidentiality = 
+tag_typedef_t soatag_srtp_confidentiality =
   BOOLTAG_TYPEDEF(srtp_confidentiality);
 
 /**@def SOATAG_SRTP_INTEGRITY(x)
- *  
+ *
  * Enable SRTP integrity protection
  *
  * @par Used with
@@ -576,7 +576,7 @@
  *    @c !=0 enable \n
  *    @c 0 disable
  *
- * Corresponding tag taking reference parameter is 
+ * Corresponding tag taking reference parameter is
  * SOATAG_SRTP_INTEGRITY_REF()
  *
  * @todo SRTP functionality is not implemented.
@@ -585,12 +585,12 @@
 
 /**@def SOATAG_HOLD(x)
  *
- * Hold media stream or streams. 
+ * Hold media stream or streams.
  *
  * The hold media stream will have the attribute a=sendonly (meaning that
  * some hold announcements or pause music is sent to the held party but that
  * the held party should not generate any media) or a=inactive (meaning that
- * no media is sent). 
+ * no media is sent).
  *
  * When putting a SIP session on hold with sendonly, the application can
  * include, e.g., SOATAG_HOLD("audio") or SOATAG_HOLD("video") or
@@ -636,7 +636,7 @@
  *   - true (1) - update session with m= line in user SDP based on their order
  *
  * The default value is false and session are updated based on media types.
- * 
+ *
  *
  * Corresponding tag taking a reference parameter is SOATAG_RTP_SELECT_REF().
  *

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa.h	Tue Dec 16 13:05:22 2008
@@ -62,20 +62,20 @@
 
 SOFIAPUBFUN int soa_set_params(soa_session_t *ss,
 			       tag_type_t tag, tag_value_t value, ...);
-SOFIAPUBFUN int soa_get_params(soa_session_t const *ss, 
+SOFIAPUBFUN int soa_get_params(soa_session_t const *ss,
 			       tag_type_t tag, tag_value_t value, ...);
 
 SOFIAPUBFUN tagi_t *soa_get_paramlist(soa_session_t const *ss,
 				      tag_type_t tag, tag_value_t value, ...);
 
-SOFIAPUBFUN int soa_error_as_sip_response(soa_session_t *soa, 
+SOFIAPUBFUN int soa_error_as_sip_response(soa_session_t *soa,
 					  char const **return_phrase);
 
 SOFIAPUBFUN char const *soa_error_as_sip_reason(soa_session_t *soa);
 
 SOFIAPUBFUN int soa_get_warning(soa_session_t *ss, char const **return_phrase);
 
-SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss, 
+SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss,
 				       struct sdp_session_s const *sdp,
 				       char const *str, issize_t len);
 
@@ -84,7 +84,7 @@
 				       char const **return_sdp_str,
 				       isize_t *return_len);
 
-SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss, 
+SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss,
 				   struct sdp_session_s const *sdp,
 				   char const *str, issize_t len);
 
@@ -97,7 +97,7 @@
 
 SOFIAPUBFUN int soa_get_remote_version(soa_session_t const *ss);
 
-SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss, 
+SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
 				 struct sdp_session_s const *sdp,
 				 char const *str, issize_t len);
 

Modified: 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_session.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_session.h	Tue Dec 16 13:05:22 2008
@@ -57,7 +57,7 @@
   void (*soa_deinit)(soa_session_t *ss);
   int (*soa_set_params)(soa_session_t *ss, tagi_t const *tags);
   int (*soa_get_params)(soa_session_t const *ss, tagi_t *tags);
-  tagi_t *(*soa_get_paramlist)(soa_session_t const *ss, 
+  tagi_t *(*soa_get_paramlist)(soa_session_t const *ss,
 			       tag_type_t, tag_value_t, ...);
   char **(*soa_media_features)(soa_session_t *, int live, su_home_t *);
   char const * const *(*soa_sip_require)(soa_session_t const *ss);
@@ -98,10 +98,10 @@
 SOFIAPUBFUN int soa_base_remote_sip_features(soa_session_t *ss,
 					     char const * const *support,
 					     char const * const *required);
-SOFIAPUBFUN int soa_base_set_capability_sdp(soa_session_t *ss, 
+SOFIAPUBFUN int soa_base_set_capability_sdp(soa_session_t *ss,
 					    sdp_session_t *sdp,
 					    char const *, isize_t);
-SOFIAPUBFUN int soa_base_set_remote_sdp(soa_session_t *ss, 
+SOFIAPUBFUN int soa_base_set_remote_sdp(soa_session_t *ss,
 					int new_version,
 					sdp_session_t *sdp, char const *, isize_t);
 SOFIAPUBFUN int soa_base_set_user_sdp(soa_session_t *ss,
@@ -120,7 +120,7 @@
 SOFIAPUBFUN int soa_base_deactivate(soa_session_t *ss, char const *option);
 SOFIAPUBFUN void soa_base_terminate(soa_session_t *ss, char const *option);
 
-struct soa_description 
+struct soa_description
 {
   sdp_session_t  *ssd_sdp;	/**< Session description  */
   char const     *ssd_unparsed;	/**< Original session description as string */
@@ -205,7 +205,7 @@
   int             ss_status;	/**< Status from last media operation */
   char const     *ss_phrase;	/**< Phrase from last media operation */
   char           *ss_reason;	/**< Reason generated by media operation */
-  
+
 
   /* Media parameters */
   char const     *ss_address;
@@ -240,26 +240,26 @@
 
 enum soa_activity { soa_activity_local, soa_activity_remote, soa_activity_session };
 
-SOFIAPUBFUN void soa_set_activity(soa_session_t *ss, 
-				  sdp_media_t const *m, 
+SOFIAPUBFUN void soa_set_activity(soa_session_t *ss,
+				  sdp_media_t const *m,
 				  enum soa_activity activity);
 
-SOFIAPUBFUN int soa_description_set(soa_session_t *ss, 
+SOFIAPUBFUN int soa_description_set(soa_session_t *ss,
 				    struct soa_description *ssd,
 				    sdp_session_t *sdp,
 				    char const *sdp_str,
 				    isize_t sdp_len);
 
-SOFIAPUBFUN void soa_description_free(soa_session_t *, 
+SOFIAPUBFUN void soa_description_free(soa_session_t *,
 				      struct soa_description *ssd);
 
-SOFIAPUBFUN int soa_description_dup(su_home_t *, 
+SOFIAPUBFUN int soa_description_dup(su_home_t *,
 				    struct soa_description *ssd,
 				    struct soa_description const *ssd0);
 
 SOFIAPUBFUN int soa_init_sdp_origin(soa_session_t *ss,
 				    sdp_origin_t *o, char buf[64]);
-SOFIAPUBFUN int soa_init_sdp_connection(soa_session_t *, 
+SOFIAPUBFUN int soa_init_sdp_connection(soa_session_t *,
 					sdp_connection_t *, char buf[64]);
 
 /* ====================================================================== */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_tag.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/sofia-sip/soa_tag.h	Tue Dec 16 13:05:22 2008
@@ -48,7 +48,7 @@
 SOFIAPUBVAR tag_typedef_t soatag_any;
 
 /**
- * Media states 
+ * Media states
  */
 enum {
   SOA_ACTIVE_REJECTED = -8, /**< Media rejected in negotiation */
@@ -164,7 +164,7 @@
 SOFIAPUBVAR tag_typedef_t soatag_rtp_select_ref;
 
 /** Parameter type for SOATAG_RTP_SELECT() */
-enum { 
+enum {
   SOA_RTP_SELECT_SINGLE,	/**< Select the best common codec */
   SOA_RTP_SELECT_COMMON,	/**< Select all common codecs */
   SOA_RTP_SELECT_ALL		/**< Select all local codecs */
@@ -183,7 +183,7 @@
 /** Parameter type for SOATAG_RTP_SORT() */
 enum {
   SOA_RTP_SORT_DEFAULT,		/**< Select codecs by local preference
-				 *  when media is recvonly, 
+				 *  when media is recvonly,
 				 * remote preference othewise.
 				 */
   SOA_RTP_SORT_LOCAL,		/**< Select codecs by local preference. */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/test_soa.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/test_soa.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/test_soa.c	Tue Dec 16 13:05:22 2008
@@ -72,7 +72,7 @@
 
 #define NONE ((void*)-1)
 
-struct context 
+struct context
 {
   su_home_t home[1];
   su_root_t *root;
@@ -130,11 +130,11 @@
   TEST_1(soa_get_user_sdp(NULL, NULL, NULL, NULL) < 0);
   TEST_1(soa_get_local_sdp(NULL, NULL, NULL, NULL) < 0);
 
-  TEST_1(-1 == soa_generate_offer(NULL, 0, test_api_completed)); 
+  TEST_1(-1 == soa_generate_offer(NULL, 0, test_api_completed));
 
-  TEST_1(-1 == soa_generate_answer(NULL, test_api_completed)); 
+  TEST_1(-1 == soa_generate_answer(NULL, test_api_completed));
 
-  TEST_1(-1 == soa_process_answer(NULL, test_api_completed)); 
+  TEST_1(-1 == soa_process_answer(NULL, test_api_completed));
 
   TEST_1(-1 == soa_process_reject(NULL, test_api_completed));
 
@@ -162,7 +162,7 @@
 int test_soa_tags(struct context *ctx)
 {
   BEGIN();
-  
+
   su_home_t home[1] = { SU_HOME_INIT(home) };
   tagi_t *t;
 
@@ -194,7 +194,7 @@
 
   ctx->root = su_root_create(ctx); TEST_1(ctx->root);
 
-  ctx->asynch.a = soa_create("asynch", ctx->root, ctx); 
+  ctx->asynch.a = soa_create("asynch", ctx->root, ctx);
   TEST_1(!ctx->asynch.a);
 
 #if 0
@@ -205,7 +205,7 @@
 
   TEST_1(soa_find("asynch"));
 
-  ctx->asynch.a = soa_create("asynch", ctx->root, ctx); 
+  ctx->asynch.a = soa_create("asynch", ctx->root, ctx);
   TEST_1(ctx->asynch.a);
 
   ctx->asynch.b = soa_create("asynch", ctx->root, ctx);
@@ -214,7 +214,7 @@
 
   /* Create asynchronous endpoints */
 
-  ctx->a = soa_create("static", ctx->root, ctx); 
+  ctx->a = soa_create("static", ctx->root, ctx);
   TEST_1(!ctx->a);
 
   TEST_1(!soa_find("static"));
@@ -349,7 +349,7 @@
 {
   BEGIN();
   int n;
-  
+
   soa_session_t *a, *b;
 
   char const *caps = NONE, *offer = NONE, *answer = NONE;
@@ -359,19 +359,19 @@
 
   su_home_t home[1] = { SU_HOME_INIT(home) };
 
-  char const a_caps[] = 
+  char const a_caps[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
     "m=audio 0 RTP/AVP 0 8\r\n";
 
-  char const b_caps[] = 
+  char const b_caps[] =
     "m=audio 5004 RTP/AVP 96 8\n"
     "m=rtpmap:96 GSM/8000\n";
 
-  TEST(soa_set_capability_sdp(ctx->a, 0, "m=audio 0 RTP/AVP 0 8", -1), 
+  TEST(soa_set_capability_sdp(ctx->a, 0, "m=audio 0 RTP/AVP 0 8", -1),
        1);
-  TEST(soa_set_capability_sdp(ctx->a, 0, a_caps, strlen(a_caps)), 
+  TEST(soa_set_capability_sdp(ctx->a, 0, a_caps, strlen(a_caps)),
        1);
   TEST(soa_get_capability_sdp(ctx->a, NULL, &caps, &capslen), 1);
 
@@ -402,7 +402,7 @@
 		     SOATAG_AF(SOA_AF_IP4_ONLY),
 		     SOATAG_ADDRESS("1.2.3.4"),
 		     TAG_END());
-  
+
   n = soa_generate_answer(b, test_completed); TEST(n, 0);
 
   TEST_1(soa_is_complete(b));
@@ -498,7 +498,7 @@
   TEST(soa_is_audio_active(b), SOA_ACTIVE_INACTIVE);
   TEST(soa_is_remote_audio_active(b), SOA_ACTIVE_INACTIVE);
 
-  /* 'A' will release hold. */ 
+  /* 'A' will release hold. */
   TEST(soa_set_params(a, SOATAG_HOLD(NULL), TAG_END()), 1);
 
   TEST(soa_generate_offer(a, 1, test_completed), 0);
@@ -540,7 +540,7 @@
       c = sdp->sdp_connection;
     TEST_1(c);
     c->c_address = "0.0.0.0";
-    
+
     TEST_1(p = sdp_print(home, sdp, NULL, 0, sdp_f_realloc));
     TEST_1(sdp_message(p));
     offer = sdp_message(p); offerlen = strlen(offer);
@@ -562,10 +562,10 @@
   TEST(soa_is_audio_active(b), SOA_ACTIVE_RECVONLY);
   TEST(soa_is_remote_audio_active(b), SOA_ACTIVE_RECVONLY);
 
-  /* 'A' will propose adding video. */ 
-  /* 'B' will reject. */ 
+  /* 'A' will propose adding video. */
+  /* 'B' will reject. */
   TEST(soa_set_params(a,
-		      SOATAG_HOLD(NULL),  /* 'A' will release hold. */ 
+		      SOATAG_HOLD(NULL),  /* 'A' will release hold. */
 		      SOATAG_USER_SDP_STR("m=audio 5008 RTP/AVP 0 8\r\ni=x\r\n"
 					  "m=video 5006 RTP/AVP 34\r\n"),
 		      TAG_END()), 2);
@@ -596,7 +596,7 @@
     sdp_session_t const *l = NULL, *u = NULL, *r = NULL;
     sdp_media_t const *m;
 
-    TEST(soa_get_params(b, 
+    TEST(soa_get_params(b,
 			SOATAG_LOCAL_SDP_REF(l),
 			SOATAG_USER_SDP_REF(u),
 			SOATAG_REMOTE_SDP_REF(r),
@@ -611,7 +611,7 @@
 
   /* 'B' will now propose adding video. */
   /* 'A' will accept. */
-  TEST(soa_set_params(b, 
+  TEST(soa_set_params(b,
 		      SOATAG_USER_SDP_STR("m=audio 5004 RTP/AVP 0 8\r\n"
 					  "m=video 5006 RTP/AVP 34\r\n"),
 		      TAG_END()), 1);
@@ -636,14 +636,14 @@
   TEST(soa_is_audio_active(a), SOA_ACTIVE_SENDRECV);
   TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_SENDRECV);
   TEST(soa_is_video_active(a), SOA_ACTIVE_SENDRECV);
-  
+
   TEST_VOID(soa_terminate(a, NULL));
 
   TEST(soa_is_audio_active(a), SOA_ACTIVE_DISABLED);
   TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_DISABLED);
 
   TEST_VOID(soa_terminate(b, NULL));
-  
+
   TEST_VOID(soa_destroy(a));
   TEST_VOID(soa_destroy(b));
 
@@ -656,7 +656,7 @@
 {
   BEGIN();
   int n;
-  
+
   soa_session_t *a, *b;
 
   char const *offer = NONE, *answer = NONE;
@@ -666,7 +666,7 @@
   sdp_media_t const *m;
   sdp_rtpmap_t const *rm;
 
-  char const a_caps[] = 
+  char const a_caps[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
@@ -674,7 +674,7 @@
     "a=rtpmap:97 GSM/8000\n"
     ;
 
-  char const b_caps[] = 
+  char const b_caps[] =
     "m=audio 5004 RTP/AVP 96 97\n"
     "a=rtpmap:96 G7231/8000\n"
     "a=rtpmap:97 G729/8000\n";
@@ -791,7 +791,7 @@
   /* Re-O/A: add a common codec */
 
   /* Accept media without common codecs */
-  TEST_1(soa_set_params(a, SOATAG_RTP_MISMATCH(0), 
+  TEST_1(soa_set_params(a, SOATAG_RTP_MISMATCH(0),
 			SOATAG_USER_SDP_STR(
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
@@ -799,11 +799,11 @@
     "m=audio 5008 RTP/AVP 0 8 96 3 127\r\n"
     "a=rtpmap:96 G729/8000\n"
     "a=rtpmap:127 CN/8000\n"
-    ),			
+    ),
 			SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
 			SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL),
 			TAG_END()));
-  TEST_1(soa_set_params(b, SOATAG_RTP_MISMATCH(0), 
+  TEST_1(soa_set_params(b, SOATAG_RTP_MISMATCH(0),
 			SOATAG_USER_SDP_STR(
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
@@ -813,7 +813,7 @@
     "a=rtpmap:97 G729/8000\n"
     "a=rtpmap:111 telephone-event/8000\n"
     "a=fmtp:111 0-15\n"
-    ),			
+    ),
 			SOATAG_AUDIO_AUX("cn telephone-event"),
 			SOATAG_RTP_SORT(SOA_RTP_SORT_LOCAL),
 			SOATAG_RTP_SELECT(SOA_RTP_SELECT_COMMON),
@@ -865,7 +865,7 @@
   /* ---------------------------------------------------------------------- */
   /* Re-O/A: prune down to single codec. */
 
-  TEST_1(soa_set_params(a, 
+  TEST_1(soa_set_params(a,
 			SOATAG_USER_SDP_STR(
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
@@ -874,7 +874,7 @@
     "a=rtpmap:96 G729/8000\n"
     "a=rtpmap:97 GSM/8000\n"
     "a=rtpmap:127 CN/8000\n"
-    ),			
+    ),
 			SOATAG_RTP_MISMATCH(0),
 			SOATAG_RTP_SELECT(SOA_RTP_SELECT_COMMON),
 			TAG_END()));
@@ -911,8 +911,8 @@
   TEST_S(rm->rm_encoding, "CN");
   TEST_1(!rm->rm_next);
 
-  /* Answering end matches payload types 
-     then sorts by local preference, 
+  /* Answering end matches payload types
+     then sorts by local preference,
      then select best codec => GSM with pt 97 */
   TEST_1(m = b_sdp->sdp_media); TEST_1(!m->m_rejected);
   TEST_1(rm = m->m_rtpmaps); TEST(rm->rm_pt, 97);
@@ -1181,7 +1181,7 @@
 
   TEST_VOID(soa_terminate(a, NULL));
   TEST_VOID(soa_terminate(b, NULL));
-  
+
   TEST_VOID(soa_destroy(a));
   TEST_VOID(soa_destroy(b));
 
@@ -1295,7 +1295,7 @@
 {
   BEGIN();
   int n;
-  
+
   soa_session_t *a, *b;
 
   char const *offer = NONE, *answer = NONE;
@@ -1304,14 +1304,14 @@
   sdp_session_t const *a_sdp, *b_sdp;
   sdp_media_t const *m;
 
-  char const a_caps[] = 
+  char const a_caps[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
     "m=audio 5008 RTP/AVP 0 8\r\n"
     ;
 
-  char const b_caps[] = 
+  char const b_caps[] =
     "m=audio 5004 RTP/AVP 0 8\n"
     "a=rtpmap:96 G7231/8000\n"
     "a=rtpmap:97 G729/8000\n"
@@ -1369,7 +1369,7 @@
     "a=T38FaxTranscodingJBIG:0\r\n"
     "a=T38FaxRateManagement:transferredTCF\r\n"
     "a=T38FaxMaxDatagram:400\r\n"
-    ),			
+    ),
 			TAG_END()));
 
   n = soa_generate_offer(a, 1, test_completed); TEST(n, 0);
@@ -1392,21 +1392,21 @@
   TEST_1(m = a_sdp->sdp_media); TEST_1(!m->m_rejected);
   TEST(m->m_type, sdp_media_image);
   TEST(m->m_proto, sdp_proto_udptl);
-  TEST_1(m->m_format); 
-  TEST_S(m->m_format->l_text, "t38"); 
+  TEST_1(m->m_format);
+  TEST_S(m->m_format->l_text, "t38");
 
   TEST_1(m = b_sdp->sdp_media); TEST_1(!m->m_rejected);
   TEST(m->m_type, sdp_media_image);
   TEST(m->m_proto, sdp_proto_udptl);
-  TEST_1(m->m_format); 
-  TEST_S(m->m_format->l_text, "t38"); 
+  TEST_1(m->m_format);
+  TEST_S(m->m_format->l_text, "t38");
 
   TEST(soa_is_audio_active(a), SOA_ACTIVE_DISABLED);
   TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_DISABLED);
 
   TEST_VOID(soa_terminate(a, NULL));
   TEST_VOID(soa_terminate(b, NULL));
-  
+
   TEST_VOID(soa_destroy(a));
   TEST_VOID(soa_destroy(b));
 
@@ -1571,7 +1571,7 @@
 {
   BEGIN();
   int n;
-  
+
   soa_session_t *a, *b;
 
   char const *offer = NONE, *answer = NONE;
@@ -1579,7 +1579,7 @@
 
   sdp_session_t const *b_sdp;
 
-  char const a_caps[] = 
+  char const a_caps[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
@@ -1587,7 +1587,7 @@
     "a=rtpmap:97 GSM/8000\n"
     ;
 
-  char const b_caps[] = 
+  char const b_caps[] =
     "m=audio 0 RTP/AVP 96 97\n"
     "a=rtpmap:96 G7231/8000\n"
     "a=rtpmap:97 G729/8000\n";
@@ -1620,7 +1620,7 @@
 
   TEST_VOID(soa_terminate(a, NULL));
   TEST_VOID(soa_terminate(b, NULL));
-  
+
   TEST_VOID(soa_destroy(a));
   TEST_VOID(soa_destroy(b));
 
@@ -1632,7 +1632,7 @@
 {
   BEGIN();
   int n;
-  
+
   soa_session_t *a, *b;
 
   char const *offer = NONE, *answer = NONE;
@@ -1641,7 +1641,7 @@
   sdp_session_t const *a_sdp, *b_sdp;
   sdp_media_t const *m;
 
-  char const a_caps[] = 
+  char const a_caps[] =
     "v=0\r\n"
     "o=a 432432423423 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
@@ -1657,7 +1657,7 @@
     "a=rtpmap:96 G7231/8000\n"
     "a=rtpmap:97 G729/8000\n";
 
-  char const a_caps2[] = 
+  char const a_caps2[] =
     "v=0\r\n"
     "o=a 432432423423 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
@@ -1671,14 +1671,14 @@
     "a=T38FaxRateManagement:transferredTCF\r\n"
     "a=T38FaxMaxDatagram:400\r\n";
 
-  char const b_caps[] = 
+  char const b_caps[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
     "m=audio 5008 RTP/AVP 0 8\r\n"
     ;
 
-  char const b_caps2[] = 
+  char const b_caps2[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
@@ -1759,22 +1759,22 @@
   TEST_1(m = m->m_next);
   TEST(m->m_type, sdp_media_image);
   TEST(m->m_proto, sdp_proto_udptl);
-  TEST_1(m->m_format); 
-  TEST_S(m->m_format->l_text, "t38"); 
+  TEST_1(m->m_format);
+  TEST_S(m->m_format->l_text, "t38");
 
   TEST_1(m = b_sdp->sdp_media); TEST_1(m->m_rejected);
   TEST_1(m = m->m_next);
   TEST(m->m_type, sdp_media_image);
   TEST(m->m_proto, sdp_proto_udptl);
-  TEST_1(m->m_format); 
-  TEST_S(m->m_format->l_text, "t38"); 
+  TEST_1(m->m_format);
+  TEST_S(m->m_format->l_text, "t38");
 
   TEST(soa_is_audio_active(a), SOA_ACTIVE_DISABLED);
   TEST(soa_is_remote_audio_active(a), SOA_ACTIVE_DISABLED);
 
   TEST_VOID(soa_terminate(a, NULL));
   TEST_VOID(soa_terminate(b, NULL));
-  
+
   TEST_VOID(soa_destroy(a));
   TEST_VOID(soa_destroy(b));
 
@@ -1788,25 +1788,25 @@
 
 #if 0				/* This has never been implemented */
   int n;
-  
+
   char const *caps = NONE, *offer = NONE, *answer = NONE;
   isize_t capslen = -1, offerlen = -1, answerlen = -1;
 
-  char const a[] = 
+  char const a[] =
     "v=0\r\n"
     "o=left 219498671 2 IN IP4 127.0.0.2\r\n"
     "c=IN IP4 127.0.0.2\r\n"
     "m=audio 5004 RTP/AVP 0 8\r\n";
 
-  char const b[] = 
+  char const b[] =
     "v=0\n"
     "o=right 93298573265 321974 IN IP4 127.0.0.3\n"
     "c=IN IP4 127.0.0.3\n"
     "m=audio 5006 RTP/AVP 96\n"
     "m=rtpmap:96 GSM/8000\n";
 
-  n = soa_set_capability_sdp(ctx->asynch.a, 0, 
-			     "m=audio 5004 RTP/AVP 0 8", -1); 
+  n = soa_set_capability_sdp(ctx->asynch.a, 0,
+			     "m=audio 5004 RTP/AVP 0 8", -1);
   TEST(n, 1);
 
   n = soa_set_capability_sdp(ctx->asynch.a, 0, a, strlen(a)); TEST(n, 1);
@@ -1819,7 +1819,7 @@
 
   n = soa_generate_offer(ctx->asynch.a, 1, test_completed); TEST(n, 1);
 
-  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.a); 
+  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.a);
   ctx->completed = NULL;
 
   n = soa_get_local_sdp(ctx->asynch.a, 0, &offer, &offerlen); TEST(n, 1);
@@ -1828,7 +1828,7 @@
 
   n = soa_generate_answer(ctx->asynch.b, test_completed); TEST(n, 1);
 
-  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.b); 
+  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.b);
   ctx->completed = NULL;
 
   TEST_1(soa_is_complete(ctx->asynch.b));
@@ -1840,7 +1840,7 @@
 
   n = soa_process_answer(ctx->asynch.a, test_completed); TEST(n, 1);
 
-  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.a); 
+  su_root_run(ctx->root); TEST(ctx->completed, ctx->asynch.a);
   ctx->completed = NULL;
 
   TEST_1(soa_is_complete(ctx->asynch.a));
@@ -1867,7 +1867,7 @@
   TEST_VOID(soa_terminate(ctx->asynch.b, NULL));
 
 #endif
-  
+
   END();
 }
 
@@ -1878,7 +1878,7 @@
   su_root_destroy(ctx->root), ctx->root = NULL;
   soa_destroy(ctx->a);
   soa_destroy(ctx->b);
-  
+
   END();
 }
 
@@ -1892,8 +1892,8 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v|-q] [-a] [-l level] [-p outbound-proxy-uri]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v|-q] [-a] [-l level] [-p outbound-proxy-uri]\n",
 	  name);
   exit(exitcode);
 }
@@ -1927,7 +1927,7 @@
 
       if (rest == NULL || *rest)
 	usage(1);
-      
+
       su_log_set_level(soa_log, level);
     }
     else if (strcmp(argv[i], "--attach") == 0) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/127.zone
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/127.zone	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/127.zone	Tue Dec 16 13:05:22 2008
@@ -3,7 +3,7 @@
 			1 ; serial
 			28800 ; refresh
 			7200 ; retry
-			604800 ; expire	
+			604800 ; expire
 			86400 ; ttk
 			)
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/194.2.188
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/194.2.188	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/194.2.188	Tue Dec 16 13:05:22 2008
@@ -7,7 +7,7 @@
 	     36000000   ; EXPIRE
 	     120        ; MINIMUM
 	     )
-	       	
+
 	    NS	 ns.example.com.
 
 133	    PTR  sip00.example.com.

Modified: 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	(original)
+++ 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	Tue Dec 16 13:05:22 2008
@@ -7,7 +7,7 @@
 	     36000000   ; EXPIRE
 	     120        ; MINIMUM
 	     )
-	       	
+
 	    NS	 ns.example.com.
 
 c.a.7.e.d.7.e.f.f.f.0.2.8.0.a.0 PTR  sip01.example.com.

Modified: 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/3.f.f.e.1.2.0.0.3.0.1.2.c.0.0.0.arpa	(original)
+++ 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	Tue Dec 16 13:05:22 2008
@@ -7,7 +7,7 @@
 	     36000000   ; EXPIRE
 	     120        ; MINIMUM
 	     )
-	       	
+
 	    NS	 ns.example.com.
 
 c.a.7.e.d.7.e.f.f.f.0.2.8.0.a.0 PTR  sip01.example.com.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/Makefile.am	Tue Dec 16 13:05:22 2008
@@ -17,9 +17,9 @@
 
 noinst_LTLIBRARIES = 	libsresolv.la
 
-check_PROGRAMS = 	torture_sresolv test_sresolv 
+check_PROGRAMS = 	torture_sresolv test_sresolv
 
-TESTS = 		torture_sresolv run_test_sresolv 
+TESTS = 		torture_sresolv run_test_sresolv
 
 CLEANFILES =		resolv.conf error.conf named.conf.tmp \
 			.test_sresolv.api.conf.?????? \

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/example.com
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/example.com	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/example.com	Tue Dec 16 13:05:22 2008
@@ -53,7 +53,7 @@
 full	A6	0 3ff0:12:3012:c006:0a08:20ff:fe7d:e7ac
 
 sip00	A	194.2.188.133
-	AAAA	3ff0:0010:3012:c000:02c0:95ff:fee2:4b78 
+	AAAA	3ff0:0010:3012:c000:02c0:95ff:fee2:4b78
 
 sip01	A	194.2.188.134
 	AAAA	3ff0:0012:3012:c006:0a08:20ff:fe7d:e7ac

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/resolve_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/resolve_sip.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/resolve_sip.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@file resolve_sip.c Use sresolv library to resolve a SIP or SIPS domain.
  *
- * This is an example program for @b sresolv library. 
+ * This is an example program for @b sresolv library.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
@@ -94,9 +94,9 @@
 static int query_a(struct context *sr, char const *domain);
 
 /* Process NAPTR records */
-static 
-void answer_to_naptr_query(sres_context_t *sr, 
-			   sres_query_t *q, 
+static
+void answer_to_naptr_query(sres_context_t *sr,
+			   sres_query_t *q,
 			   sres_record_t *answers[])
 {
   int i;
@@ -104,7 +104,7 @@
   sr->sr_query = NULL;
 
   /* Sort NAPTR records by the order. */
-  sres_sort_answers(sr->sres, answers);  
+  sres_sort_answers(sr->sres, answers);
 
   for (i = 0; answers && answers[i]; i++) {
     sres_naptr_record_t const *na = answers[i]->sr_naptr;
@@ -114,8 +114,8 @@
       continue;
 
     printf("naptr: %s\n\t%d IN NAPTR %u %u \"%s\" \"%s\" \"%s\" %s\n",
-	   na->na_record->r_name, na->na_record->r_ttl, 
-	   na->na_order, na->na_prefer, 
+	   na->na_record->r_name, na->na_record->r_ttl,
+	   na->na_order, na->na_prefer,
 	   na->na_flags, na->na_services,
 	   na->na_regexp, na->na_replace);
 
@@ -162,8 +162,8 @@
 }
 
 /* Process SRV records */
-static 
-void answer_to_srv_query(sres_context_t *sr, sres_query_t *q, 
+static
+void answer_to_srv_query(sres_context_t *sr, sres_query_t *q,
 			 sres_record_t *answers[])
 {
   int i;
@@ -206,8 +206,8 @@
 }
 
 /* Process A records */
-static 
-void answer_to_a_query(sres_context_t *sr, sres_query_t *q, 
+static
+void answer_to_a_query(sres_context_t *sr, sres_query_t *q,
 		       sres_record_t *answers[])
 {
   int i;
@@ -260,11 +260,11 @@
   sr->sr_n_sockets = 1;
   sr->sr_sockets = calloc(1, sizeof(*sr->sr_sockets));
   sr->sr_pollfds = calloc(1, sizeof(*sr->sr_pollfds));
-  
+
   if (!sr->sr_sockets || !sr->sr_pollfds ||
       (sres_resolver_sockets(sr->sres, sr->sr_sockets, 1) == -1))
     return 0;
-  
+
   sr->sr_pollfds[0].fd = sr->sr_sockets[0];
   sr->sr_pollfds[0].events = POLLIN | POLLERR;
 
@@ -280,14 +280,14 @@
   while (!sr->sr_ready) {
     events = poll(sr->sr_pollfds, n, 500);
 
-    if (events) 
+    if (events)
       for (i = 0; i < n; i++) {
 	if (sr->sr_pollfds[i].revents)
 	  sres_resolver_receive(sr->sres, sr->sr_pollfds[i].fd);
       }
 
     /* No harm is done (except wasted CPU) if timer is called more often */
-    sres_resolver_timer(sr->sres, sr->sr_sockets[0]); 
+    sres_resolver_timer(sr->sres, sr->sr_sockets[0]);
   }
 }
 
@@ -310,8 +310,8 @@
 
   sr->sres = sres_resolver_new(getenv("SRESOLV_CONF"));
 
-  if (sr->sres) 
-    if (prepare_run(sr)) 
+  if (sr->sres)
+    if (prepare_run(sr))
       if (query_naptr(sr, sr->sr_canon = argv[1]) == 0)
 	run(sr);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/root.zone
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/root.zone	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/root.zone	Tue Dec 16 13:05:22 2008
@@ -10,5 +10,3 @@
 ns.example.com	A	127.0.0.2
 		AAAA	::2
 		A6	0 ::2
-
-	
\ No newline at end of file

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/run_test_sresolv	Tue Dec 16 13:05:22 2008
@@ -61,14 +61,14 @@
 } || {
 echo test_sresolv: there is no BIND 9 named in you path, skipping
 exit 77
-} 
+}
 
 if eval $ipv6
 then
     # Figure out nice IPv6 address for us
     ns=`ip addr ls | awk '
     /^[0-9]:/ { up = ($3 ~ /UP/) && ($3 !~ /LOOPBACK/); }
-    /inet6 fe80::/ { next; } # no link-local 
+    /inet6 fe80::/ { next; } # no link-local
     up && $1 ~ /inet6/ { sub(/\/.*$/, "", $2); print $2; exit 0; }'`
 
     # Nothing found, use localnode ::1
@@ -161,13 +161,13 @@
 echo $0: started named pid $!
 for i in 1 2 3 4 5; do
     test -r $t/named.pid && break
-    sleep 1; 
+    sleep 1;
 done
 
-test -r $t/named.pid || { 
-    echo $0: cannot start named >&2 ; 
+test -r $t/named.pid || {
+    echo $0: cannot start named >&2 ;
     if fgrep -i -e SELINUX=enforcing /etc/selinux/config >/dev/null 2>&1 ; then
-	echo $0: perhaps you have to disable SELinux protection for named 
+	echo $0: perhaps you have to disable SELinux protection for named
     fi
     exit 77
 }

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres.h	Tue Dec 16 13:05:22 2008
@@ -94,7 +94,7 @@
 /** Opaque type of DNS resolver object. */
 typedef struct sres_resolver_s sres_resolver_t;
 
-#ifndef SRES_CONTEXT_T 
+#ifndef SRES_CONTEXT_T
 #define SRES_CONTEXT_T struct sres_context_s
 #endif
 /** Application-defined type for sres_query_t context. */
@@ -119,7 +119,7 @@
 			     char const *options, ...);
 
 /** New resolver object. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_resolver_t *
 sres_resolver_new_with_cache_va(char const *conf_file_path,
 				sres_cache_t *cache,
@@ -148,12 +148,12 @@
  * function is responsible for freeing the list of answers and it must
  * (eventually) call sres_free_answers().
  */
-typedef void sres_answer_f(sres_context_t *context, 
+typedef void sres_answer_f(sres_context_t *context,
 			   sres_query_t *query,
 			   sres_record_t **answers);
 
 /** Make a DNS query. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_query_t *sres_query(sres_resolver_t *res,
                          sres_answer_f *callback,
                          sres_context_t *context,
@@ -161,7 +161,7 @@
                          char const *domain);
 
 /** Search DNS. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_query_t *sres_search(sres_resolver_t *res,
 			  sres_answer_f *callback,
 			  sres_context_t *context,
@@ -169,7 +169,7 @@
 			  char const *name);
 
 /** Make a reverse DNS query. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_query_t *sres_query_sockaddr(sres_resolver_t *res,
                                   sres_answer_f *callback,
                                   sres_context_t *context,
@@ -177,7 +177,7 @@
 				  struct sockaddr const *addr);
 
 /** Make a DNS query with socket. @deprecated */
-SRESPUBFUN 
+SRESPUBFUN
 sres_query_t *sres_query_make(sres_resolver_t *res,
 			      sres_answer_f *callback,
 			      sres_context_t *context,
@@ -186,7 +186,7 @@
 			      char const *domain);
 
 /** Make a reverse DNS query with socket. @deprecated */
-SRESPUBFUN 
+SRESPUBFUN
 sres_query_t *sres_query_make_sockaddr(sres_resolver_t *res,
 				       sres_answer_f *callback,
 				       sres_context_t *context,
@@ -195,25 +195,25 @@
 				       struct sockaddr const *addr);
 
 /** Rebind a DNS query. */
-SRESPUBFUN 
+SRESPUBFUN
 void sres_query_bind(sres_query_t *q,
                      sres_answer_f *callback,
                      sres_context_t *context);
 
 /**Get a list of matching (type/domain) records from cache. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_record_t **sres_cached_answers(sres_resolver_t *res,
 				    uint16_t type,
 				    char const *domain);
 
 /**Search for a list of matching (type/name) records from cache. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_record_t **sres_search_cached_answers(sres_resolver_t *res,
 					   uint16_t type,
 					   char const *name);
 
 /**Get a list of matching (type/domain) records from cache. */
-SRESPUBFUN 
+SRESPUBFUN
 sres_record_t **sres_cached_answers_sockaddr(sres_resolver_t *res,
                                              uint16_t type,
 					     struct sockaddr const *addr);
@@ -229,7 +229,7 @@
 
 
 /** Send a query, wait for answer, return results. */
-SRESPUBFUN 
+SRESPUBFUN
 int sres_blocking_query(sres_resolver_t *res,
 			uint16_t type,
 			char const *domain,
@@ -237,7 +237,7 @@
 			sres_record_t ***return_records);
 
 /** Search DNS, return results. */
-SRESPUBFUN 
+SRESPUBFUN
 int sres_blocking_search(sres_resolver_t *res,
 			 uint16_t type,
 			 char const *name,
@@ -245,7 +245,7 @@
 			 sres_record_t ***return_records);
 
 /** Send a a reverse DNS query, wait for answer, return results. */
-SRESPUBFUN 
+SRESPUBFUN
 int sres_blocking_query_sockaddr(sres_resolver_t *res,
 				 uint16_t type,
 				 struct sockaddr const *addr,
@@ -260,8 +260,8 @@
 
 /** Filter and sort the list of records */
 SRESPUBFUN
-int sres_filter_answers(sres_resolver_t *res, 
-			sres_record_t **answers, 
+int sres_filter_answers(sres_resolver_t *res,
+			sres_record_t **answers,
 			uint16_t type);
 
 /** Free the list records. */

Modified: 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_async.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_async.h	Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
 #define SOFIA_RESOLV_SRES_ASYNC_H
 
 /**
- * @file sofia-resolv/sres_async.h 
+ * @file sofia-resolv/sres_async.h
  *
  * Asynchronous interface for Sofia DNS Resolver.
  *
@@ -50,7 +50,7 @@
 extern "C" {
 #endif
 
-#ifndef SRES_ASYNC_T 
+#ifndef SRES_ASYNC_T
 #define SRES_ASYNC_T struct sres_async_s
 #endif
 /** Application-defined type for context used by asynchronous operation. */
@@ -59,7 +59,7 @@
 /** Prototype for update function.
  *
  * This kind of function is called when the nameserver configuration has
- * been updated. 
+ * been updated.
  *
  * If the old_socket is not -1, it indicates that old_socket will be closed
  * and it should be removed from poll() or select() set.
@@ -75,7 +75,7 @@
 
 /** Set asynchronous operation data. */
 SRESPUBFUN
-sres_async_t *sres_resolver_set_async(sres_resolver_t *res, 
+sres_async_t *sres_resolver_set_async(sres_resolver_t *res,
 				      sres_update_f *update,
 				      sres_async_t *async,
 				      int update_all);
@@ -86,7 +86,7 @@
 				      sres_update_f *update);
 
 /** Create sockets for resolver. */
-SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *, 
+SRESPUBFUN int sres_resolver_sockets(sres_resolver_t *,
 				     sres_socket_t *sockets,
 				     int n);
 

Modified: 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_cache.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_cache.h	Tue Dec 16 13:05:22 2008
@@ -81,7 +81,7 @@
 
 /** Free answers not matching with type */
 SRESPUBFUN int sres_cache_filter(sres_cache_t *cache,
-				 sres_record_t **answers, 
+				 sres_record_t **answers,
 				 uint16_t type);
 
 /** Free the list records. */
@@ -103,7 +103,7 @@
 SRESPUBFUN void sres_cache_store(sres_cache_t *, sres_record_t *, time_t now);
 
 /** Modify the priority in the specified SRV record */
-SRESPUBFUN int sres_cache_set_srv_priority(sres_cache_t *, 
+SRESPUBFUN int sres_cache_set_srv_priority(sres_cache_t *,
 					   char const *domain,
 					   char const *target,
 					   uint16_t port,

Modified: 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_config.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_config.h	Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
 #define SOFIA_RESOLV_SRES_CONFIG_H
 
 /**
- * @file sofia-resolv/sres_config.h 
+ * @file sofia-resolv/sres_config.h
  *
  * Configuration for Sofia DNS Resolver.
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_record.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_record.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_record.h	Tue Dec 16 13:05:22 2008
@@ -45,7 +45,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-  
+
 /** Common part of all DNS records. */
 typedef struct sres_common
 {
@@ -101,7 +101,7 @@
   struct in_addr a_addr;	/**< IP4 address */
 } sres_a_record_t;
 
-/** IPv6 address used by sresolv library. 
+/** IPv6 address used by sresolv library.
  *
  * @sa #sres_aaaa_record, #sres_a6_record
  */
@@ -225,10 +225,10 @@
   sres_type_nxt = 30,	    /**< Next domain. */
   sres_type_eid = 31,	    /**< Endpoint identifier. */
   sres_type_nimloc = 32,    /**< Nimrod Locator. */
-  sres_type_srv = 33,	    /**< Server Selection (@RFC2782, 
+  sres_type_srv = 33,	    /**< Server Selection (@RFC2782,
 			         #sres_srv_record). */
   sres_type_atma = 34,	    /**< ATM Address */
-  sres_type_naptr = 35,	    /**< Naming Authority PoinTeR (@RFC2915, 
+  sres_type_naptr = 35,	    /**< Naming Authority PoinTeR (@RFC2915,
                                  #sres_naptr_record) */
   sres_type_kx = 36,	    /**< Key Exchange */
   sres_type_cert = 37,	    /**< Certification record */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-sip/sresolv.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-sip/sresolv.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-sip/sresolv.h	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-#ifndef SRESOLV_H 
+#ifndef SRESOLV_H
 /** Defined when <sofia-sip/sresolv.h> has been included. */
 #define SRESOLV_H
 
@@ -64,7 +64,7 @@
 #define SRESTAG_CACHE_REF(x) srestag_cache_ref, tag_ptr_vr(&(x), (x))
 
 /** Create a resolver object using @a root reactor. */
-SOFIAPUBFUN sres_resolver_t *sres_resolver_create(su_root_t *root, 
+SOFIAPUBFUN sres_resolver_t *sres_resolver_create(su_root_t *root,
 						  char const *resolv_conf,
 				                  tag_type_t, tag_value_t,
 						  ...);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c	Tue Dec 16 13:05:22 2008
@@ -25,13 +25,13 @@
 
 /**@CFILE sres.c
  * @brief Sofia DNS Resolver implementation.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Teemu Jalava <Teemu.Jalava at nokia.com>
  * @author Mikko Haataja
- * @author Kai Vehmanen <kai.vehmanen at nokia.com> 
- *         (work on the win32 nameserver discovery) 
- * @author Dimitri E. Prado 
+ * @author Kai Vehmanen <kai.vehmanen at nokia.com>
+ *         (work on the win32 nameserver discovery)
+ * @author Dimitri E. Prado
  *         (initial version of win32 nameserver discovery)
  *
  * @todo The resolver should allow handling arbitrary records, too.
@@ -105,7 +105,7 @@
 
 #if HAVE_WINSOCK2_H
 /* Posix send() */
-su_inline 
+su_inline
 ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
 {
   if (length > INT_MAX)
@@ -114,7 +114,7 @@
 }
 
 /* Posix recvfrom() */
-su_inline 
+su_inline
 ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
 		      struct sockaddr *from, socklen_t *fromlen)
 {
@@ -126,7 +126,7 @@
   if (length > INT_MAX)
     length = INT_MAX;
 
-  retval = recvfrom(s, buffer, (int)length, flags, 
+  retval = recvfrom(s, buffer, (int)length, flags,
 		    (void *)from, fromlen ? &ilen : NULL);
 
   if (fromlen)
@@ -202,7 +202,7 @@
 static char const sres_conf_file_path[] = "/etc/resolv.conf";
 
 /** EDNS0 support. @internal */
-enum edns { 
+enum edns {
   edns_not_tried = -1,
   edns_not_supported = 0,
   edns0_configured = 1,
@@ -220,7 +220,7 @@
 
   /** ICMP/temporary error received, zero when successful. */
   time_t                  dns_icmp;
-  /** Persistent error, zero when successful or timeout. 
+  /** Persistent error, zero when successful or timeout.
    *
    * Never selected if dns_error is SRES_TIME_MAX.
    */
@@ -251,7 +251,7 @@
   short               res_update_all;
 
   uint16_t            res_id;
-  short               res_i_server;  /**< Current server to try 
+  short               res_i_server;  /**< Current server to try
 					(when doing round-robin) */
   short               res_n_servers; /**< Number of servers */
   sres_server_t     **res_servers;
@@ -338,7 +338,7 @@
 #define m_qdcount m_packet.mp_header.mh_qdcount
 #define m_ancount m_packet.mp_header.mh_ancount
 #define m_nscount m_packet.mp_header.mh_nscount
-#define m_arcount m_packet.mp_header.mh_arcount 
+#define m_arcount m_packet.mp_header.mh_arcount
 #define m_data    m_packet.mp_data
 };
 
@@ -385,7 +385,7 @@
    (void *)&((struct sockaddr *)ss)->sa_data)
 #endif
 
-static int sres_config_changed_servers(sres_config_t const *new_c, 
+static int sres_config_changed_servers(sres_config_t const *new_c,
 				       sres_config_t const *old_c);
 static sres_server_t **sres_servers_new(sres_resolver_t *res,
 					sres_config_t const *c);
@@ -398,8 +398,8 @@
 }
 
 /** Return true if we have a search list or a local domain name. */
-static int 
-sres_has_search_domain(sres_resolver_t *res) 
+static int
+sres_has_search_domain(sres_resolver_t *res)
 {
   return res->res_config->c_search[0] != NULL;
 }
@@ -409,7 +409,7 @@
 sres_resolver_t *
 sres_resolver_new_with_cache_va(char const *conf_file_path,
 				sres_cache_t *cache,
-				char const *options, 
+				char const *options,
 				va_list va);
 static
 sres_resolver_t *
@@ -434,25 +434,25 @@
 
 static void sres_free_query(sres_resolver_t *res, sres_query_t *q);
 
-static 
-int sres_sockaddr2string(sres_resolver_t *, 
-			 char name[], size_t namelen, 
+static
+int sres_sockaddr2string(sres_resolver_t *,
+			 char name[], size_t namelen,
 			 struct sockaddr const *);
 
-static 
+static
 sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res,
 				      char const **options);
 
 static
-sres_server_t *sres_next_server(sres_resolver_t *res, 
+sres_server_t *sres_next_server(sres_resolver_t *res,
 				uint8_t *in_out_i,
 				int always);
 
 static
 int sres_send_dns_query(sres_resolver_t *res, sres_query_t *q);
 
-static 
-void sres_answer_subquery(sres_context_t *context, 
+static
+void sres_answer_subquery(sres_context_t *context,
 			  sres_query_t *query,
 			  sres_record_t **answers);
 
@@ -468,26 +468,26 @@
 static void
 sres_resend_dns_query(sres_resolver_t *res, sres_query_t *q, int timeout);
 
-static 
+static
 sres_server_t *sres_server_by_socket(sres_resolver_t const *ts,
 				     sres_socket_t socket);
 
 static
-int sres_resolver_report_error(sres_resolver_t *res, 
+int sres_resolver_report_error(sres_resolver_t *res,
 			       sres_socket_t socket,
 			       int errcode,
 			       struct sockaddr_storage *remote,
-			       socklen_t remotelen, 
+			       socklen_t remotelen,
 			       char const *info);
 
 static
-void sres_log_response(sres_resolver_t const *res, 
+void sres_log_response(sres_resolver_t const *res,
 		       sres_message_t const *m,
 		       struct sockaddr_storage const *from,
 		       sres_query_t const *query,
 		       sres_record_t * const *reply);
 
-static int sres_decode_msg(sres_resolver_t *res, 
+static int sres_decode_msg(sres_resolver_t *res,
 			   sres_message_t *m,
 			   sres_query_t **,
 			   sres_record_t ***aanswers);
@@ -531,9 +531,9 @@
 static void m_put_uint16(sres_message_t *m, uint16_t h);
 static void m_put_uint32(sres_message_t *m, uint32_t w);
 
-static uint16_t m_put_domain(sres_message_t *m, 
-                             char const *domain, 
-                             uint16_t top, 
+static uint16_t m_put_domain(sres_message_t *m,
+                             char const *domain,
+                             uint16_t top,
                              char const *topdomain);
 
 static uint32_t m_get_uint32(sres_message_t *m);
@@ -560,7 +560,7 @@
  *
  * The SRESOLV_DEBUG environment variable is used to determine the debug
  * logging level for @b sresolv module. The default level is 3.
- * 
+ *
  * @sa <sofia-sip/su_debug.h>, sresolv_log, SOFIA_DEBUG
  */
 #ifdef DOXYGEN
@@ -571,8 +571,8 @@
 #define SU_DEBUG 3
 #endif
 
-/**Debug log for @b sresolv module. 
- * 
+/**Debug log for @b sresolv module.
+ *
  * The sresolv_log is the log object used by @b sresolv module. The level of
  * #sresolv_log is set using #SRESOLV_DEBUG environment variable.
  */
@@ -593,7 +593,7 @@
  * file can be overriden by giving the name of the configuration file as @a
  * conf_file_path.
  *
- * @param conf_file_path name of the resolv.conf configuration file 
+ * @param conf_file_path name of the resolv.conf configuration file
  *
  * @return A pointer to a newly created sres resolver object, or NULL upon
  * an error.
@@ -638,9 +638,9 @@
  * It is also possible to override the values in the resolv.conf and
  * RES_OPTIONS by giving the directives in the NULL-terminated list.
  *
- * @param conf_file_path name of the resolv.conf configuration file 
+ * @param conf_file_path name of the resolv.conf configuration file
  * @param cache          optional pointer to a resolver cache (may be NULL)
- * @param option, ...    list of resolv.conf options directives 
+ * @param option, ...    list of resolv.conf options directives
  *                       (overriding options in conf_file)
  *
  * @par Environment Variables
@@ -667,7 +667,7 @@
 
 /**Create a resolver.
  *
- * Allocate and initialize a new sres resolver object. 
+ * Allocate and initialize a new sres resolver object.
  *
  * This is a stdarg version of sres_resolver_new_with_cache().
  */
@@ -683,7 +683,7 @@
   sres_resolver_t *res;
 
   va_copy(va0, va);
-  
+
   for (i = 0, o = option; o; o = va_arg(va0, char const *)) {
     if (i < 16)
       olist[i] = o;
@@ -716,7 +716,7 @@
   sres_resolver_t *res;
   size_t i, n, len;
   char **array, *o, *end;
- 
+
   for (n = 0, len = 0; options && options[n]; n++)
     len += strlen(options[n]) + 1;
 
@@ -785,7 +785,7 @@
 {
   return su_home_ref(res->res_home);
 }
-		     
+
 /** Decrease the reference count on a resolver object.  */
 void
 sres_resolver_unref(sres_resolver_t *res)
@@ -796,12 +796,12 @@
 /** Set userdata pointer.
  *
  * @return New userdata pointer.
- * 
+ *
  * @ERRORS
  * @ERROR EFAULT @a res points outside the address space
  */
 void *
-sres_resolver_set_userdata(sres_resolver_t *res, 
+sres_resolver_set_userdata(sres_resolver_t *res,
 			   void *userdata)
 {
   void *old;
@@ -817,7 +817,7 @@
 /**Get userdata pointer.
  *
  * @return Userdata pointer.
- * 
+ *
  * @ERRORS
  * @ERROR EFAULT @a res points outside the address space
  */
@@ -833,7 +833,7 @@
 /** Set async object.
  *
  * @return Set async object.
- * 
+ *
  * @ERRORS
  * @ERROR EFAULT @a res points outside the address space
  * @ERROR EALREADY different async callback already set
@@ -841,7 +841,7 @@
 sres_async_t *
 sres_resolver_set_async(sres_resolver_t *res,
 			sres_update_f *callback,
-			sres_async_t *async, 
+			sres_async_t *async,
 			int update_all)
 {
   if (!res)
@@ -849,7 +849,7 @@
 
   if (res->res_updcb && res->res_updcb != callback)
     return su_seterrno(EALREADY), (void *)NULL;
-    
+
   res->res_async = async;
   res->res_updcb = callback;
   res->res_update_all = callback && update_all != 0;
@@ -906,12 +906,12 @@
  * Query types also indicate the record type of the result.
  * Any record can be queried with #sres_qtype_any.
  * Well-known query types understood and decoded by @b sres include
- * #sres_type_a, 
+ * #sres_type_a,
  * #sres_type_aaaa,
  * #sres_type_cname,
- * #sres_type_ptr 
- * #sres_type_soa, 
- * #sres_type_aaaa, 
+ * #sres_type_ptr
+ * #sres_type_soa,
+ * #sres_type_aaaa,
  * #sres_type_srv, and
  * #sres_type_naptr.
  *
@@ -939,7 +939,7 @@
 {
   sres_query_t *query = NULL;
   size_t dlen;
-  
+
   char b[8];
   SU_DEBUG_9(("sres_query(%p, %p, %s, \"%s\") called\n",
 			  (void *)res, (void *)context, sres_record_type(type, b), domain));
@@ -970,12 +970,12 @@
 
 /**Search DNS.
  *
- * Sends DNS queries with specified @a type and @a name to the DNS server. 
+ * Sends DNS queries with specified @a type and @a name to the DNS server.
  * If the @a name does not contain enought dots, the search domains are
  * appended to the name and resulting domain name are also queried. When
  * answer to all the search domains is received, the @a callback function
  * is called with @a context and combined records from answers as arguments.
- * 
+ *
  * The sres resolver takes care of retransmitting the queries if a root
  * object is associate with the resolver or if sres_resolver_timer() is
  * called in regular intervals. It generates an error record with nonzero
@@ -1031,7 +1031,7 @@
     dots = res->res_config->c_opt.ndots;
   else if (sres_has_search_domain(res))
     for (dots = 0, dot = strchr(domain, '.');
-	 dots < res->res_config->c_opt.ndots && dot; 
+	 dots < res->res_config->c_opt.ndots && dot;
 	 dots++, dot = strchr(dot + 1, '.'))
       ;
   else
@@ -1057,7 +1057,7 @@
       for (i = 0, subs = 0; i <= SRES_MAX_SEARCH; i++) {
 	if (domains[i]) {
 	  len = strlen(domains[i]);
-	  
+
 	  if (dlen + len + 1 > SRES_MAXDNAME)
 	    continue;
 
@@ -1106,7 +1106,7 @@
  * @param context pointer given as an extra argument to @a callback function
  * @param type record type to query (or sres_qtype_any for any record)
  * @param addr socket address structure
- * 
+ *
  * The @a type should be #sres_type_ptr. The @a addr should contain either
  * IPv4 (AF_INET) or IPv6 (AF_INET6) address.
  *
@@ -1132,7 +1132,7 @@
 		    uint16_t type,
 		    struct sockaddr const *addr)
 {
-  char name[80]; 
+  char name[80];
 
   if (!res || !addr)
     return su_seterrno(EFAULT), (void *)NULL;
@@ -1171,7 +1171,7 @@
 			 uint16_t type,
 			 struct sockaddr const *addr)
 {
-  char name[80]; 
+  char name[80];
 
   if (!res || !addr)
     return su_seterrno(EFAULT), (void *)NULL;
@@ -1226,7 +1226,7 @@
 
   if (!domain)
     return NULL;
-  
+
   if (!sres_cache_get(res->res_cache, type, domain, &result))
     return su_seterrno(ENOENT), (void *)NULL;
 
@@ -1267,7 +1267,7 @@
 
   if (sres_has_search_domain(res))
     for (dots = 0, dot = strchr(domain, '.');
-	 dots < res->res_config->c_opt.ndots && dot; 
+	 dots < res->res_config->c_opt.ndots && dot;
 	 dots++, dot = strchr(dot + 1, '.'))
       ;
   else
@@ -1315,7 +1315,7 @@
  * @param res pointer to resolver
  * @param type record type to query (or sres_qtype_any for any record)
  * @param addr socket address structure
- * 
+ *
  * The @a type should be #sres_type_ptr. The @a addr should contain either
  * IPv4 (AF_INET) or IPv6 (AF_INET6) address.
  *
@@ -1324,7 +1324,7 @@
  * "ip6-dotint", the IPv6 addresses are resolved using suffix ".ip6.int"
  * instead of default ".ip6.arpa".
  *
- * @retval 
+ * @retval
  * pointer to an array of pointers to cached records, or
  * NULL if no entry was found.
  *
@@ -1363,13 +1363,13 @@
  * @param res      pointer to resolver
  * @param domain   domain name of the SRV record(s) to modify
  * @param target   SRV target of the SRV record(s) to modify
- * @param port     port number of SRV record(s) to modify 
- *                 (in host byte order) 
+ * @param port     port number of SRV record(s) to modify
+ *                 (in host byte order)
  * @param ttl      new ttl for SRV records of the domain
  * @param priority new priority value (0=highest, 65535=lowest)
  *
  * @sa sres_cache_set_srv_priority()
- * 
+ *
  * @NEW_1_12_8
  */
 int sres_set_cached_srv_priority(sres_resolver_t *res,
@@ -1389,8 +1389,8 @@
   if (!domain)
     return -1;
 
-  return sres_cache_set_srv_priority(res->res_cache, 
-				     domain, target, port, 
+  return sres_cache_set_srv_priority(res->res_cache,
+				     domain, target, port,
 				     ttl, priority);
 }
 
@@ -1409,7 +1409,7 @@
 
   /* Simple insertion sorting */
   /*
-   * We do not use qsort because we want later extend this to sort 
+   * We do not use qsort because we want later extend this to sort
    * local A records first etc.
    */
   for (i = 1; answers[i]; i++) {
@@ -1431,10 +1431,10 @@
 
 /** Sort and filter query results */
 int
-sres_filter_answers(sres_resolver_t *res, 
-		    sres_record_t **answers, 
+sres_filter_answers(sres_resolver_t *res,
+		    sres_record_t **answers,
 		    uint16_t type)
-{		    
+{
   int i, n;
 
   if (res == NULL || answers == NULL)
@@ -1465,11 +1465,11 @@
 }
 
 /** Free and zero an array of records.
- * 
- * The array of records can be returned by sres_cached_answers() or 
+ *
+ * The array of records can be returned by sres_cached_answers() or
  * given by callback function.
  */
-void 
+void
 sres_free_answers(sres_resolver_t *res,
 		  sres_record_t **answers)
 {
@@ -1528,7 +1528,7 @@
   case sres_qtype_mailb: return "MAILB";
   case sres_qtype_maila: return "MAILA";
   case sres_qtype_any: return "ANY";
-    
+
   default:
     sprintf(buffer, "%u?", type & 65535);
     return buffer;
@@ -1553,7 +1553,7 @@
 }
 
 /** Compare two records. */
-int 
+int
 sres_record_compare(sres_record_t const *aa, sres_record_t const *bb)
 {
   int D;
@@ -1565,9 +1565,9 @@
 
   if (a->r_status)
     return 0;
-  
+
   switch (a->r_type) {
-  case sres_type_soa: 
+  case sres_type_soa:
     {
       sres_soa_record_t const *A = aa->sr_soa, *B = bb->sr_soa;
       D = A->soa_serial - B->soa_serial; if (D) return D;
@@ -1588,7 +1588,7 @@
     {
       sres_a6_record_t const *A = aa->sr_a6, *B = bb->sr_a6;
       D = A->a6_prelen - B->a6_prelen; if (D) return D;
-      D = !A->a6_prename - !B->a6_prename; 
+      D = !A->a6_prename - !B->a6_prename;
       if (D == 0 && A->a6_prename && B->a6_prename)
 	D = strcasecmp(A->a6_prename, B->a6_prename); if (D) return D;
       return memcmp(&A->a6_suffix, &B->a6_suffix, sizeof A->a6_suffix);
@@ -1596,7 +1596,7 @@
   case sres_type_aaaa:
     {
       sres_aaaa_record_t const *A = aa->sr_aaaa, *B = bb->sr_aaaa;
-      return memcmp(&A->aaaa_addr, &B->aaaa_addr, sizeof A->aaaa_addr);      
+      return memcmp(&A->aaaa_addr, &B->aaaa_addr, sizeof A->aaaa_addr);
     }
   case sres_type_cname:
     {
@@ -1625,7 +1625,7 @@
       D = strcmp(A->na_flags, B->na_flags); if (D) return D;
       D = strcmp(A->na_services, B->na_services); if (D) return D;
       D = strcmp(A->na_regexp, B->na_regexp); if (D) return D;
-      return strcmp(A->na_replace, B->na_replace); 
+      return strcmp(A->na_replace, B->na_replace);
     }
   default:
     return 0;
@@ -1636,14 +1636,14 @@
 /* Private functions */
 
 /** Destruct */
-static 
-void 
+static
+void
 sres_resolver_destructor(void *arg)
 {
   sres_resolver_t *res = arg;
 
   assert(res);
-  sres_cache_unref(res->res_cache); 
+  sres_cache_unref(res->res_cache);
   res->res_cache = NULL;
 
   sres_servers_close(res, res->res_servers);
@@ -1656,7 +1656,7 @@
 }
 
 /*
- * 3571 is a prime => 
+ * 3571 is a prime =>
  * we hash successive id values to different parts of hash tables
  */
 #define Q_PRIME 3571
@@ -1697,18 +1697,18 @@
     query->q_i_server = res->res_i_server;
     query->q_n_servers = res->res_n_servers;
     query->q_hash = query->q_id * Q_PRIME /* + query->q_i_server */;
-    
+
     sres_qtable_append(res->res_queries, query);
 
     if (res->res_schedulecb && res->res_queries->qt_used == 1)
-      res->res_schedulecb(res->res_async, 2 * SRES_RETRANSMIT_INTERVAL); 
+      res->res_schedulecb(res->res_async, 2 * SRES_RETRANSMIT_INTERVAL);
   }
 
   return query;
 }
 
 su_inline
-void 
+void
 sres_remove_query(sres_resolver_t *res, sres_query_t *q, int all)
 {
   int i;
@@ -1749,7 +1749,7 @@
       sres_cache_free_answers(res->res_cache, q->q_subanswers[i]);
     q->q_subanswers[i] = NULL;
   }
- 
+
   su_free(res->res_home, q);
 }
 
@@ -1767,7 +1767,7 @@
       for (j = 0; search_results[i][j]; j++)
 	found++;
 
-  combined_result = su_alloc((su_home_t *)res->res_cache, 
+  combined_result = su_alloc((su_home_t *)res->res_cache,
 			     (found + 1) * (sizeof combined_result[0]));
   if (combined_result) {
     for (i = 0, found = 0; i <= SRES_MAX_SEARCH; i++)
@@ -1832,7 +1832,7 @@
       name[4 * i + 2] = hex > 9 ? hex + 'a' - 10 : hex + '0';
       name[4 * i + 3] = '.';
     }
-    
+
     strcpy(name + 4 * i, postfix);
 
     return (int)required;
@@ -1840,7 +1840,7 @@
 #endif /* HAVE_SIN6 */
   else {
     su_seterrno(EAFNOSUPPORT);
-    SU_DEBUG_3(("%s: %s\n", "sres_sockaddr2string", 
+    SU_DEBUG_3(("%s: %s\n", "sres_sockaddr2string",
                 su_strerror(EAFNOSUPPORT)));
     return 0;
   }
@@ -1848,8 +1848,8 @@
 
 /** Make a domain name a top level domain name.
  *
- * The function sres_toplevel() returns a copies string @a domain and 
- * terminates it with a dot if it is not already terminated. 
+ * The function sres_toplevel() returns a copies string @a domain and
+ * terminates it with a dot if it is not already terminated.
  */
 static
 char const *
@@ -1926,7 +1926,7 @@
  * @retval 0 when otherwise successful
  * @retval -1 upon an error
  */
-static 
+static
 int sres_update_config(sres_resolver_t *res, int always, time_t now)
 {
   sres_config_t *c = NULL;
@@ -1938,9 +1938,9 @@
   if (!always && previous && now < res->res_checked)
     return 0;
   /* Try avoid checking for changes too often. */
-  res->res_checked = now + SRES_UPDATE_INTERVAL_SECS; 
-  
-  if (!always && previous && 
+  res->res_checked = now + SRES_UPDATE_INTERVAL_SECS;
+
+  if (!always && previous &&
       sres_config_timestamp(previous) == previous->c_modified)
     return 0;
 
@@ -1999,7 +1999,7 @@
  * name server IP addresses.
  *
  * @return number of server addresses added
- */ 
+ */
 static int sres_parse_win32_reg_parse_dnsserver(sres_config_t *c, HKEY key, LPCTSTR lpValueName)
 {
   su_home_t *home = c->c_home;
@@ -2009,10 +2009,10 @@
   int ret, servers_added = 0;
 
   /* get name servers and ... */
-  while((ret = RegQueryValueEx(key, 
-			       lpValueName, 
-			       NULL, NULL, 
-			       name_servers, 
+  while((ret = RegQueryValueEx(key,
+			       lpValueName,
+			       NULL, NULL,
+			       name_servers,
 			       &name_servers_length)) == ERROR_MORE_DATA) {
     name_servers_length += QUERY_DATALEN;
 
@@ -2033,14 +2033,14 @@
 
       /* add to list */
       reg_dns_list = su_strlst_split(home, (char *)name_servers, " ");
-	    
+
       for(i = 0 ; i < su_strlst_len(reg_dns_list); i++) {
 	const char *item = su_strlst_item(reg_dns_list, i);
 	SU_DEBUG_3(("Adding nameserver: %s (key=%s)\n", item, (char*)lpValueName));
 	sres_parse_nameserver(c, item);
 	++servers_added;
       }
-	    
+
       su_strlst_destroy(reg_dns_list);
 
     }
@@ -2069,9 +2069,9 @@
 #define MAX_VALUE_NAME_LEN    16383
 
   su_home_t *home = c->c_home;
-  HKEY key_handle;  
+  HKEY key_handle;
 #if 0
-  HKEY interface_key_handle;  
+  HKEY interface_key_handle;
   FILETIME ftime;
   int index, i;
 #endif
@@ -2085,13 +2085,13 @@
   int guid_size = MAX_VALUE_NAME_LEN;
 #endif
 
-  /* step: find interface specific nameservers 
+  /* step: find interface specific nameservers
    * - this is currently disabled 2006/Jun (the current check might insert
-   *   multiple unnecessary nameservers to the search list) 
+   *   multiple unnecessary nameservers to the search list)
    */
   /* open the 'Interfaces' registry Key */
-  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-		   "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces", 
+  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+		   "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces",
 		   0, KEY_READ, &key_handle)) {
     SU_DEBUG_2(("RegOpenKeyEx failed\n"));
   } else {
@@ -2101,12 +2101,12 @@
 			interface_guid, &guid_size,
 			NULL,NULL,0,&ftime) == ERROR_SUCCESS){
       if (RegOpenKeyEx(key_handle, interface_guid,
-		       0, KEY_READ, 
+		       0, KEY_READ,
 		       &interface_key_handle) == ERROR_SUCCESS) {
 
 	/* note: 'NameServer' is preferred over 'DhcpNameServer' */
 	found += sres_parse_win32_reg_parse_dnsserver(c, interface_key_handle, "NameServer");
-	if (found == 0) 
+	if (found == 0)
 	  found += sres_parse_win32_reg_parse_dnsserver(c, interface_key_handle, "DhcpNameServer");
 
 	RegCloseKey(interface_key_handle);
@@ -2120,16 +2120,16 @@
   }
 #endif /* #if 0: interface-specific nameservers */
 
-  /* step: if no interface-specific nameservers are found, 
+  /* step: if no interface-specific nameservers are found,
    *       check for system-wide nameservers */
   if (found == 0) {
-    if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
-		     "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters", 
+    if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+		     "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
 		     0, KEY_READ, &key_handle)) {
       SU_DEBUG_2(("RegOpenKeyEx failed (2)\n"));
     } else {
       found += sres_parse_win32_reg_parse_dnsserver(c, key_handle, "NameServer");
-      if (found == 0) 
+      if (found == 0)
 	found += sres_parse_win32_reg_parse_dnsserver(c, key_handle, "DhcpNameServer");
       RegCloseKey(key_handle);
     }
@@ -2149,13 +2149,13 @@
 
 /** Parse /etc/resolv.conf file.
  *
- * @retval #sres_config_t structure when successful 
+ * @retval #sres_config_t structure when successful
  * @retval NULL upon an error
  *
- * @todo The resolv.conf directives @b sortlist and most of the options 
+ * @todo The resolv.conf directives @b sortlist and most of the options
  *       are currently ignored.
  */
-static 
+static
 sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res,
 				      char const **options)
 {
@@ -2164,7 +2164,7 @@
   if (c) {
     FILE *f;
     int i;
-    
+
     f = fopen(c->c_filename = res->res_cnffile, "r");
 
     sres_parse_config(c, f);
@@ -2172,7 +2172,7 @@
     if (f)
       fclose(f);
 
-#if HAVE_WIN32    
+#if HAVE_WIN32
     /* note: no 127.0.0.1 on win32 systems */
     /* on win32, query the registry for nameservers */
     if (sres_parse_win32_ip(c) == 0 || sres_parse_win32_reg(c) == 0)
@@ -2184,14 +2184,14 @@
     if (c->c_nameservers[0] == NULL)
       sres_parse_nameserver(c, "127.0.0.1");
 #endif
-      
+
     for (i = 0; c->c_nameservers[i] && i < SRES_MAX_NAMESERVERS; i++) {
       struct sockaddr_in *sin = (void *)c->c_nameservers[i]->ns_addr;
       sin->sin_port = htons(c->c_port);
     }
 
     sres_parse_options(c, getenv("RES_OPTIONS"));
-    
+
     if (options)
       for (i = 0; options[i]; i++)
 	sres_parse_options(c, options[i]);
@@ -2206,7 +2206,7 @@
 
 uint16_t _sres_default_port = 53;
 
-/** Parse config file. 
+/** Parse config file.
  *
  * @return Number of search domains, if successful.
  * @retval -1 upon an error (never happens).
@@ -2230,7 +2230,7 @@
   c->c_opt.attempts = SRES_MAX_RETRY_COUNT;
   c->c_port = _sres_default_port;
 
-  if (f != NULL) {  
+  if (f != NULL) {
     for (line = 1; fgets(buf, sizeof(buf), f); line++) {
       size_t len;
       char *value, *b;
@@ -2320,7 +2320,7 @@
  * - @b attempts:<i>n</i> fail after <i>n</i> retries
  * - @b rotate          use round robin selection of nameservers
  * - @b no-check-names  do not check names for invalid characters
- * - @b inet6           (no effect) 
+ * - @b inet6           (no effect)
  * - @b ip6-dotint      IPv6 addresses are resolved using suffix ".ip6.int"
  *                      instead of the standard ".ip6.arpa" suffix
  * - @b ip6-bytestring  (no effect)
@@ -2358,7 +2358,7 @@
 #endif
 
 /* Parse options line or #SRES_OPTIONS or #RES_OPTIONS environment variable. */
-static int 
+static int
 sres_parse_options(sres_config_t *c, char const *value)
 {
   if (!value)
@@ -2440,8 +2440,8 @@
     struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
     memset(sa, 0, ns->ns_addrlen = sizeof *sin6);
     err = su_inet_pton(sa->sa_family = AF_INET6, server, &sin6->sin6_addr);
-  } 
-  else 
+  }
+  else
 #endif
     {
       struct sockaddr_in *sin = (struct sockaddr_in *)sa;
@@ -2486,8 +2486,8 @@
 /* ---------------------------------------------------------------------- */
 
 /** Check if the new configuration has different servers than the old */
-static 
-int sres_config_changed_servers(sres_config_t const *new_c, 
+static
+int sres_config_changed_servers(sres_config_t const *new_c,
 				sres_config_t const *old_c)
 {
   int i;
@@ -2534,7 +2534,7 @@
     dns->dns_socket = INVALID_SOCKET;
     ns = c->c_nameservers[i];
     memcpy(dns->dns_addr, ns->ns_addr, dns->dns_addrlen = ns->ns_addrlen);
-    su_inet_ntop(dns->dns_addr->ss_family, SS_ADDR(dns->dns_addr), 
+    su_inet_ntop(dns->dns_addr->ss_family, SS_ADDR(dns->dns_addr),
 	      dns->dns_name, sizeof dns->dns_name);
     dns->dns_edns = c->c_opt.edns;
     servers[i] = dns++;
@@ -2575,7 +2575,7 @@
   for (i = 0; i < SRES_MAX_NAMESERVERS; i++) {
     if (!servers[i])
       break;
-  }  
+  }
 
   return i;
 }
@@ -2637,7 +2637,7 @@
     sres_close(s);
     return INVALID_SOCKET;
   }
-  
+
   if (res->res_updcb) {
     if (res->res_updcb(res->res_async, s, INVALID_SOCKET) < 0) {
       SU_DEBUG_1(("%s: %s: %s\n", "sres_server_socket", "update callback",
@@ -2648,18 +2648,18 @@
   }
 
   dns->dns_socket = s;
-  
+
   return s;
 }
 
 /* ---------------------------------------------------------------------- */
 
 /** Send a query packet */
-static 
-int 
-sres_send_dns_query(sres_resolver_t *res, 
+static
+int
+sres_send_dns_query(sres_resolver_t *res,
 		    sres_query_t *q)
-{                        
+{
   sres_message_t m[1];
   uint8_t i, i0, N = res->res_n_servers;
   sres_socket_t s;
@@ -2680,7 +2680,7 @@
     return -1;
   if (servers == NULL)
     return -1;
-  if (N == 0) 
+  if (N == 0)
     return -1;
 
   memset(m, 0, offsetof(sres_message_t, m_data[sizeof m->m_packet.mp_header]));
@@ -2689,16 +2689,16 @@
   size = sizeof(m->m_packet.mp_header);
   m->m_size = (uint16_t)sizeof(m->m_data);
   m->m_offset = (uint16_t)size;
-  
+
   m->m_id = id;
   m->m_flags = htons(SRES_HDR_QUERY | SRES_HDR_RD);
-  
+
   /* Query record */
   m->m_qdcount = htons(1);
   m_put_domain(m, domain, 0, NULL);
   m_put_uint16(m, type);
   m_put_uint16(m, sres_class_in);
-  
+
   no_edns_size = m->m_offset;
 
   /* EDNS0 record (optional) */
@@ -2707,7 +2707,7 @@
   m_put_uint16(m, sizeof(m->m_packet)); /* Class: our UDP payload size */
   m_put_uint32(m, 0);		/* TTL: extended RCODE & flags */
   m_put_uint16(m, 0);
-  
+
   edns_size = m->m_offset;
 
   if (m->m_error) {
@@ -2727,9 +2727,9 @@
     /* If server supports EDNS, include EDNS0 record */
     q->q_edns = dns->dns_edns;
     /* 0 (no EDNS) or 1 (EDNS supported) additional data records */
-    m->m_arcount = htons(q->q_edns != 0); 
+    m->m_arcount = htons(q->q_edns != 0);
     /* Size with or without EDNS record */
-    size = q->q_edns ? edns_size : no_edns_size; 
+    size = q->q_edns ? edns_size : no_edns_size;
 
     s = sres_server_socket(res, dns);
 
@@ -2757,10 +2757,10 @@
 
   q->q_i_server = i;
 
-  SU_DEBUG_5(("%s(%p, %p) id=%u %s %s (to [%s]:%u)\n", 
+  SU_DEBUG_5(("%s(%p, %p) id=%u %s %s (to [%s]:%u)\n",
 	      "sres_send_dns_query",
-	      (void *)res, (void *)q, id, sres_record_type(type, b), domain, 
-	      dns->dns_name, 
+	      (void *)res, (void *)q, id, sres_record_type(type, b), domain,
+	      dns->dns_name,
 	      htons(((struct sockaddr_in *)dns->dns_addr)->sin_port)));
 
   return 0;
@@ -2779,7 +2779,7 @@
  * @param always return always a server
  */
 static
-sres_server_t *sres_next_server(sres_resolver_t *res, 
+sres_server_t *sres_next_server(sres_resolver_t *res,
 				uint8_t *in_out_i,
 				int always)
 {
@@ -2801,7 +2801,7 @@
 	dns->dns_error != SRES_TIME_MAX)
       dns->dns_error = 0;
   }
-  
+
   /* Retry using another server? */
   for (j = (i + 1) % N; (j != i); j = (j + 1) % N) {
     dns = servers[j]; if (!dns) continue;
@@ -2820,7 +2820,7 @@
   if (!always)
     return NULL;
 
-  dns = servers[i]; 
+  dns = servers[i];
   if (dns && dns->dns_error < now && dns->dns_error != SRES_TIME_MAX)
     return dns;
 
@@ -2829,7 +2829,7 @@
     if (dns->dns_error < now && dns->dns_error != SRES_TIME_MAX)
       return *in_out_i = j, dns;
   }
-  
+
   return NULL;
 }
 
@@ -2837,7 +2837,7 @@
  * Callback function for subqueries
  */
 static
-void sres_answer_subquery(sres_context_t *context, 
+void sres_answer_subquery(sres_context_t *context,
 			  sres_query_t *query,
 			  sres_record_t **answers)
 {
@@ -2908,7 +2908,7 @@
 
     SU_DEBUG_5(("sres(q=%p): reporting errors for %u %s\n",
 		(void *)q, q->q_type, q->q_name));
- 
+
     sres_remove_query(q->q_res, q, 1);
     (q->q_callback)(q->q_context, q, answers);
   }
@@ -2922,7 +2922,7 @@
  * recommend calling it in 500 ms intervals.
  *
  * @param res pointer to resolver object
- * @param dummy argument for compatibility 
+ * @param dummy argument for compatibility
  */
 void sres_resolver_timer(sres_resolver_t *res, int dummy)
 {
@@ -2943,16 +2943,16 @@
      */
     for (i = 0; i < res->res_queries->qt_size; i++) {
       q = res->res_queries->qt_table[i];
-      
+
       if (!q)
 	continue;
-      
+
       /* Exponential backoff */
       retry_time = q->q_timestamp + ((time_t)1 << q->q_retry_count);
-      
+
       if (now < retry_time)
 	continue;
-      
+
       sres_resend_dns_query(res, q, 1);
 
       if (q != res->res_queries->qt_table[i])
@@ -2960,14 +2960,14 @@
     }
 
     if (res->res_schedulecb && res->res_queries->qt_used)
-      res->res_schedulecb(res->res_async, SRES_RETRANSMIT_INTERVAL); 
+      res->res_schedulecb(res->res_async, SRES_RETRANSMIT_INTERVAL);
   }
 
   sres_cache_clean(res->res_cache, res->res_now);
 }
 
 /** Resend DNS query, report error if cannot resend any more.
- * 
+ *
  * @param res  resolver object
  * @param q    query object
  * @param timeout  true if resent because of timeout
@@ -2978,10 +2978,10 @@
 {
   uint8_t i, N;
   sres_server_t *dns;
-  
+
   SU_DEBUG_9(("sres_resend_dns_query(%p, %p, %s) called\n",
 	      (void *)res, (void *)q, timeout ? "timeout" : "error"));
-  
+
   N = res->res_n_servers;
 
   if (N > 0 && q->q_retry_count < SRES_MAX_RETRY_COUNT) {
@@ -2994,12 +2994,12 @@
       if (q->q_retry_count > res->res_n_servers + 1 &&
 	  dns->dns_edns == edns_not_tried)
 	q->q_edns = edns_not_supported;
-      
+
       sres_send_dns_query(res, q);
 
       if (timeout)
 	q->q_retry_count++;
-      
+
       return;
     }
   }
@@ -3015,7 +3015,7 @@
 
 
 /** Get a server by socket */
-static 
+static
 sres_server_t *
 sres_server_by_socket(sres_resolver_t const *res, sres_socket_t socket)
 {
@@ -3045,7 +3045,7 @@
 
   if (from->ss_family == AF_INET6) {
     struct in6_addr const *ip6 = &sin6->sin6_addr;
-  
+
     if (IN6_IS_ADDR_V4MAPPED(ip6) || IN6_IS_ADDR_V4COMPAT(ip6)) {
       /* Convert to a IPv4 address */
       struct sockaddr_in *sin = (struct sockaddr_in *)from;
@@ -3086,7 +3086,7 @@
 /** Create connected sockets for resolver.
  */
 int sres_resolver_sockets(sres_resolver_t *res,
-			  sres_socket_t *return_sockets, 
+			  sres_socket_t *return_sockets,
 			  int n)
 {
   sres_socket_t s = INVALID_SOCKET;
@@ -3108,7 +3108,7 @@
 
     if (s == INVALID_SOCKET) {	/* Mark as a bad destination */
       dns->dns_icmp = SRES_TIME_MAX;
-      dns->dns_error = SRES_TIME_MAX;	
+      dns->dns_error = SRES_TIME_MAX;
     }
 
     return_sockets[i++] = s;
@@ -3121,18 +3121,18 @@
 /** Get a server by socket address */
 static
 sres_server_t *
-sres_server_by_sockaddr(sres_resolver_t const *res, 
+sres_server_by_sockaddr(sres_resolver_t const *res,
 			void const *from, socklen_t fromlen)
 {
   int i;
 
   for (i = 0; i < res->res_n_servers; i++) {
     sres_server_t *dns = res->res_servers[i];
-    if (dns->dns_addrlen == fromlen && 
+    if (dns->dns_addrlen == fromlen &&
 	memcmp(dns->dns_addr, from, fromlen) == 0)
       return dns;
   }
-  
+
   return NULL;
 }
 #endif
@@ -3206,11 +3206,11 @@
 	strcpy(info, origin = "local");
 	break;
       case SO_EE_ORIGIN_ICMP:
-	snprintf(info, sizeof(info), "%s type=%u code=%u", 
+	snprintf(info, sizeof(info), "%s type=%u code=%u",
 		 origin = "icmp", ee->ee_type, ee->ee_code);
 	break;
       case SO_EE_ORIGIN_ICMP6:
-	snprintf(info, sizeof(info), "%s type=%u code=%u", 
+	snprintf(info, sizeof(info), "%s type=%u code=%u",
 		 origin = "icmp6", ee->ee_type, ee->ee_code);
 	break;
       case SO_EE_ORIGIN_NONE:
@@ -3222,7 +3222,7 @@
       }
 
       if (ee->ee_info)
-	snprintf(info + strlen(info), sizeof(info) - strlen(info), 
+	snprintf(info + strlen(info), sizeof(info) - strlen(info),
 		 " info=%08x", ee->ee_info);
       errcode = ee->ee_errno;
 
@@ -3231,9 +3231,9 @@
 
 	sres_canonize_sockaddr(from, &fromlen);
 
-	snprintf(info + strlen(info), sizeof(info) - strlen(info), 
+	snprintf(info + strlen(info), sizeof(info) - strlen(info),
 		 " reported by ");
-	su_inet_ntop(from->ss_family, SS_ADDR(from), 
+	su_inet_ntop(from->ss_family, SS_ADDR(from),
 		  info + strlen(info), sizeof(info) - strlen(info));
       }
 
@@ -3246,8 +3246,8 @@
 	/* Get error, if any */
 	getsockopt(socket, SOL_SOCKET, SO_ERROR, (void *)&error, &errorlen);
       }
-      
-      if (sres_resolver_report_error(res, socket, errcode, 
+
+      if (sres_resolver_report_error(res, socket, errcode,
 				     msg->msg_name, msg->msg_namelen,
 				     info))
 	return errcode;
@@ -3279,12 +3279,12 @@
 
 /** Report error */
 static
-int 
+int
 sres_resolver_report_error(sres_resolver_t *res,
 			   sres_socket_t socket,
 			   int errcode,
 			   struct sockaddr_storage *remote,
-			   socklen_t remotelen, 
+			   socklen_t remotelen,
 			   char const *info)
 {
   char buf[80];
@@ -3298,7 +3298,7 @@
       struct sockaddr_in const *sin = (struct sockaddr_in *)remote;
       uint8_t const *in_addr = (uint8_t*)&sin->sin_addr;
       su_inet_ntop(AF_INET, in_addr, buf, sizeof(buf));
-    } 
+    }
 #if HAVE_SIN6
     else if (remote->ss_family == AF_INET6) {
       struct sockaddr_in6 const *sin6 = (struct sockaddr_in6 *)remote;
@@ -3308,9 +3308,9 @@
 #endif
   }
 
-  SU_DEBUG_5(("sres: network error %u (%s)%s%s%s%s\n", 
+  SU_DEBUG_5(("sres: network error %u (%s)%s%s%s%s\n",
 	      errcode, su_strerror(errcode),
-	      buf[0] ? " from " : "", buf, 
+	      buf[0] ? " from " : "", buf,
 	      info ? " by " : "",
 	      info ? info : ""));
 
@@ -3328,7 +3328,7 @@
 
       for (i = 0; i < res->res_queries->qt_size; i++) {
 	q = res->res_queries->qt_table[i];
-      
+
 	if (!q || dns != res->res_servers[q->q_i_server])
 	  continue;
 
@@ -3340,13 +3340,13 @@
       }
     }
   }
-  
+
   return 1;
 }
 
 
 /** Receive a response packet from socket. */
-int 
+int
 sres_resolver_receive(sres_resolver_t *res, int socket)
 {
   ssize_t num_bytes;
@@ -3363,8 +3363,8 @@
   SU_DEBUG_9(("%s(%p, %u) called\n", "sres_resolver_receive",
 	      (void *)res, socket));
 
-  memset(m, 0, offsetof(sres_message_t, m_data)); 
-  
+  memset(m, 0, offsetof(sres_message_t, m_data));
+
   num_bytes = sres_recvfrom(socket, m->m_data, sizeof (m->m_data), 0,
 			    (void *)from, &fromlen);
 
@@ -3398,12 +3398,12 @@
     sres_qtable_append(res->res_queries, query);
     sres_send_dns_query(res, query);
     query->q_retry_count++;
-  } 
+  }
   else if (!error && reply) {
     /* Remove the query from the pending list and notify the listener */
     sres_remove_query(res, query, 1);
     if (query->q_callback != NULL)
-      (query->q_callback)(query->q_context, query, reply); 
+      (query->q_callback)(query->q_context, query, reply);
     sres_free_query(res, query);
   }
   else {
@@ -3414,7 +3414,7 @@
 }
 
 static
-void sres_log_response(sres_resolver_t const *res, 
+void sres_log_response(sres_resolver_t const *res,
 		       sres_message_t const *m,
 		       struct sockaddr_storage const *from,
 		       sres_query_t const *query,
@@ -3433,7 +3433,7 @@
       struct sockaddr_in const *sin = (void *)from;
       su_inet_ntop(AF_INET, &sin->sin_addr, host, sizeof host);
       port = sin->sin_port;
-    } 
+    }
 #if HAVE_SIN6
     else if (from->ss_family == AF_INET6) {
       struct sockaddr_in6 const *sin6 = (void *)from;
@@ -3442,8 +3442,8 @@
     }
 #endif
 
-    SU_DEBUG_5(("sres_resolver_receive(%p, %p) id=%u (from [%s]:%u)\n", 
-		(void *)res, (void *)query, m->m_id, 
+    SU_DEBUG_5(("sres_resolver_receive(%p, %p) id=%u (from [%s]:%u)\n",
+		(void *)res, (void *)query, m->m_id,
 		host, ntohs(port)));
   }
 }
@@ -3457,7 +3457,7 @@
  */
 static
 int
-sres_decode_msg(sres_resolver_t *res, 
+sres_decode_msg(sres_resolver_t *res,
 		sres_message_t *m,
 		sres_query_t **qq,
 		sres_record_t ***return_answers)
@@ -3486,9 +3486,9 @@
 
   m->m_flags   = ntohs(m->m_flags);
   m->m_qdcount = ntohs(m->m_qdcount);
-  m->m_ancount = ntohs(m->m_ancount); 
-  m->m_nscount = ntohs(m->m_nscount); 
-  m->m_arcount = ntohs(m->m_arcount); 
+  m->m_ancount = ntohs(m->m_ancount);
+  m->m_nscount = ntohs(m->m_nscount);
+  m->m_arcount = ntohs(m->m_arcount);
 
   hash = Q_PRIME * m->m_id;
 
@@ -3530,8 +3530,8 @@
   if (m->m_ancount == 0 && err == 0)
     err = SRES_RECORD_ERR;
 
-  if (err == SRES_RECORD_ERR || 
-      err == SRES_NAME_ERR || 
+  if (err == SRES_RECORD_ERR ||
+      err == SRES_NAME_ERR ||
       err == SRES_UNIMPL_ERR)
     errorcount = 1;
 
@@ -3547,7 +3547,7 @@
       rr = error = sres_create_error_rr(res->res_cache, query, err);
     else
       rr = sres_create_record(res, m);
- 
+
     if (!rr) {
       SU_DEBUG_5(("sres_create_record: %s\n", m->m_error));
       break;
@@ -3577,7 +3577,7 @@
       rr->sr_refcount++;
     else
       /* Do not pass extra records to user */
-      answers[i] = NULL;	
+      answers[i] = NULL;
 
     sres_cache_store(res->res_cache, rr, res->res_now);
   }
@@ -3585,7 +3585,7 @@
   *return_answers = answers;
 
   return err;
-}  
+}
 
 static
 sres_record_t *
@@ -3600,13 +3600,13 @@
   char btype[8], bclass[8];
 
   sr = memset(sr0, 0, sizeof sr0);
-  
+
   len = m_get_domain(sr->sr_name = name, sizeof(name) - 1, m, 0); /* Name */
   sr->sr_type = m_get_uint16(m);  /* Type */
   sr->sr_class = m_get_uint16(m); /* Class */
   sr->sr_ttl = m_get_uint32(m);   /* TTL */
   sr->sr_rdlen = m_get_uint16(m); /* rdlength */
-  sr->sr_parsed = 1;		
+  sr->sr_parsed = 1;
   if (m->m_error)
     goto error;
 
@@ -3672,7 +3672,7 @@
 
   return sr;
 
- error:  
+ error:
   if (sr && sr != sr0)
     sres_cache_free_record(cache, sr);
   SU_DEBUG_5(("%s: %s\n", "sres_create_record", m->m_error));
@@ -3697,7 +3697,7 @@
   soa->soa_retry = m_get_uint32(m);
   soa->soa_expire = m_get_uint32(m);
   soa->soa_minimum = m_get_uint32(m);
-  
+
   if (m->m_error)
     return NULL;
 
@@ -3849,7 +3849,7 @@
   offset = m->m_offset, dlen = m_get_domain(NULL, 0, m, 0) + 1;
   if (m->m_error)
     return NULL;
-  
+
   srv = (void *)sres_cache_alloc_record(cache, (void *)srv, dlen);
   if (srv)
     m_get_domain(srv->srv_target = (char *)(srv + 1), dlen, m, offset);
@@ -3942,7 +3942,7 @@
 
 static
 void
-m_put_uint16(sres_message_t *m, 
+m_put_uint16(sres_message_t *m,
 	     uint16_t h)
 {
   uint8_t *p;
@@ -3962,8 +3962,8 @@
 }
 
 static
-void 
-m_put_uint32(sres_message_t *m, 
+void
+m_put_uint32(sres_message_t *m,
 	     uint32_t w)
 {
   uint8_t *p;
@@ -3988,7 +3988,7 @@
 static
 uint16_t
 m_put_domain(sres_message_t *m,
-	     char const *domain, 
+	     char const *domain,
 	     uint16_t top,
 	     char const *topdomain)
 {
@@ -4065,7 +4065,7 @@
 }
 
 static
-uint16_t 
+uint16_t
 m_get_uint16(sres_message_t *m)
 {
   uint8_t const *p = m->m_data + m->m_offset;
@@ -4084,7 +4084,7 @@
 }
 
 static
-uint8_t 
+uint8_t
 m_get_uint8(sres_message_t *m)
 {
   uint8_t const *p = m->m_data + m->m_offset;
@@ -4105,7 +4105,7 @@
 /**
  * Get a string.
  */
-static int m_get_string(char *d, 
+static int m_get_string(char *d,
 			int n,
 			sres_message_t *m,
 			uint16_t offset)
@@ -4123,7 +4123,7 @@
     save_offset = 0;
 
   size = p[offset++];
-  
+
   if (size + offset >= m->m_size) {
     m->m_error = "truncated message";
     return size;
@@ -4150,7 +4150,7 @@
  *
  * @param offset start uncompression from this point in message
  */
-static int m_get_domain(char *d, 
+static int m_get_domain(char *d,
 			int n,
 			sres_message_t *m,
 			uint16_t offset)
@@ -4164,7 +4164,7 @@
   if (m->m_error)
     return 0;
 
-  if (d == NULL) 
+  if (d == NULL)
     n = 0;
 
   if (offset == 0)
@@ -4191,7 +4191,7 @@
 
       offset = new_offset;
       save_offset = 0;
-    } 
+    }
     else {
       if (offset + cnt >= m->m_size) {
         m->m_error = "truncated message";
@@ -4204,13 +4204,13 @@
 
       i += cnt + 1;
       offset += cnt;
-    }  
+    }
   }
 
-  if (i == 0) { 
-    if (i < n) 
+  if (i == 0) {
+    if (i < n)
       d[i] = '.';
-    i++; 
+    i++;
   }
 
   if (i < n)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_blocking.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_blocking.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_blocking.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@CFILE sres_blocking.c
  * @brief Blocking interface for Sofia DNS Resolver implementation.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @date Created: Fri Mar 24 15:23:08 EET 2006 ppessi
  */
@@ -94,7 +94,7 @@
   short revents;    /* returned events */
 } fds[SRES_MAX_NAMESERVERS];
 #endif
-  sres_record_t ***return_records;  
+  sres_record_t ***return_records;
 };
 
 struct sres_blocking_context_s
@@ -103,7 +103,7 @@
   sres_resolver_t *resolver;
   sres_blocking_t *block;
   sres_query_t *query;
-  sres_record_t ***return_records;  
+  sres_record_t ***return_records;
 };
 
 static
@@ -143,7 +143,7 @@
 
     b->n_sockets = N;
   }
-  
+
   if (new_socket != INVALID_SOCKET) {
     if (N == SRES_MAX_NAMESERVERS)
       return -1;
@@ -194,7 +194,7 @@
     }
 
     n = select(n, readfds, NULL, errorfds, timeval);
-  
+
     if (n <= 0)
       sres_resolver_timer(c->resolver, -1);
     else for (i = 0; n > 0 && i < c->block->n_sockets; i++) {
@@ -213,7 +213,7 @@
 }
 
 static
-void sres_blocking_callback(sres_blocking_context_t *c, 
+void sres_blocking_callback(sres_blocking_context_t *c,
 			    sres_query_t *query,
 			    sres_record_t **answers)
 {
@@ -221,13 +221,13 @@
   *c->return_records = answers;
 }
 
-static 
+static
 sres_blocking_t *sres_set_blocking(sres_resolver_t *res)
 {
   sres_blocking_t *b;
   int i;
 
-  b = sres_resolver_get_async(res, sres_blocking_update); 
+  b = sres_resolver_get_async(res, sres_blocking_update);
   if (b)
     return b;
 
@@ -241,7 +241,7 @@
   if (b) {
     for (i = 0; i < SRES_MAX_NAMESERVERS; i++)
       b->fds[i].fd = INVALID_SOCKET;
-  
+
     if (!sres_resolver_set_async(res, sres_blocking_update, b, 0)) {
       free(b), b = NULL;
     }
@@ -261,7 +261,7 @@
 /**Send a DNS query, wait for response, return results.
  *
  * Sends a DNS query with specified @a type and @a domain to the DNS server,
- * if @a ignore_cache is not given or no records are found from cache. 
+ * if @a ignore_cache is not given or no records are found from cache.
  * Function returns an error record with nonzero status if no response is
  * received from DNS server.
  *
@@ -280,7 +280,7 @@
  * @ERROR ENAMETOOLONG @a domain is longer than SRES_MAXDNAME
  * @ERROR ENETDOWN no DNS servers configured
  * @ERROR ENOMEM memory exhausted
- * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode 
+ * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode
  *
  * @sa sres_query(), sres_blocking_search()
  *
@@ -305,7 +305,7 @@
 
   c->block = sres_set_blocking(res);
   if (c->block == NULL)
-    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */ 
+    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */
 
   if (!ignore_cache) {
     cached = sres_cached_answers(res, type, domain);
@@ -325,7 +325,7 @@
 
 /** Search DNS, return results.
  *
- * Search for @a name with specified @a type and @a name from the DNS server. 
+ * Search for @a name with specified @a type and @a name from the DNS server.
  * If the @a name does not contain enought dots, the search domains are
  * appended to the name and resulting domain name are also queried.
  *
@@ -344,7 +344,7 @@
  * @ERROR ENAMETOOLONG @a domain is longer than SRES_MAXDNAME
  * @ERROR ENETDOWN no DNS servers configured
  * @ERROR ENOMEM memory exhausted
- * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode 
+ * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode
  *
  * @sa sres_blocking_query(), sres_search()
  *
@@ -369,7 +369,7 @@
 
   c->block = sres_set_blocking(res);
   if (c->block == NULL)
-    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */ 
+    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */
 
   if (!ignore_cache) {
     cached = sres_search_cached_answers(res, type, name);
@@ -402,7 +402,7 @@
  * @ERROR EFAULT @a res or @a addr point outside the address space
  * @ERROR ENOMEM memory exhausted
  * @ERROR ENETDOWN no DNS servers configured
- * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode 
+ * @ERROR EOPNOTSUPP  resolver @a res is in asynchronous mode
  *
  * @sa sres_blocking_query(), sres_query_sockaddr(), sres_cached_answers_sockaddr()
  *
@@ -427,7 +427,7 @@
 
   c->block = sres_set_blocking(res);
   if (c->block == NULL)
-    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */ 
+    return su_seterrno(EOPNOTSUPP); /* Resolver in asynchronous mode */
 
   if (!ignore_cache) {
     cached = sres_cached_answers_sockaddr(res, type, addr);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@CFILE sres_cache.c
  * @brief Cache for Sofia DNS Resolver.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Teemu Jalava <Teemu.Jalava at nokia.com>
  * @author Mikko Haataja
@@ -38,7 +38,7 @@
 #include <stdint.h>
 #elif HAVE_INTTYPES_H
 #include <inttypes.h>
-#else 
+#else
 #if defined(_WIN32)
 typedef unsigned _int8 uint8_t;
 typedef unsigned _int16 uint16_t;
@@ -200,8 +200,8 @@
   rr_iter2 = sres_htable_hash(cache->cache_hash, hash);
 
   /* Find the domain records from the hash table */
-  for (rr_iter = rr_iter2; 
-       rr_iter && *rr_iter; 
+  for (rr_iter = rr_iter2;
+       rr_iter && *rr_iter;
        rr_iter = sres_htable_next(cache->cache_hash, rr_iter)) {
     rr = (*rr_iter)->rr;
 
@@ -209,7 +209,7 @@
 	now <= (*rr_iter)->rr_expires &&
         (type == sres_qtype_any || rr->sr_type == type) &&
         rr->sr_name != NULL &&
-        strcasecmp(rr->sr_name, domain) == 0) 
+        strcasecmp(rr->sr_name, domain) == 0)
       rr_count++;
   }
 
@@ -227,8 +227,8 @@
 
   /* Second pass: add the rr pointers to the allocated array */
 
-  for (rr_iter = rr_iter2, rr_count = 0; 
-       rr_iter && *rr_iter; 
+  for (rr_iter = rr_iter2, rr_count = 0;
+       rr_iter && *rr_iter;
        rr_iter = sres_htable_next(cache->cache_hash, rr_iter)) {
     rr = (*rr_iter)->rr;
 
@@ -237,7 +237,7 @@
         (type == sres_qtype_any || rr->sr_type == type) &&
         rr->sr_name != NULL &&
         strcasecmp(rr->sr_name, domain) == 0) {
-      SU_DEBUG_9(("rr found in cache: %s %02d\n", 
+      SU_DEBUG_9(("rr found in cache: %s %02d\n",
 		  rr->sr_name, rr->sr_type));
 
       result[rr_count++] = rr;
@@ -249,7 +249,7 @@
 
   UNLOCK(cache);
 
-  SU_DEBUG_9(("%s(%p, %s, \"%s\") returned %d entries\n", "sres_cache_get", 
+  SU_DEBUG_9(("%s(%p, %s, \"%s\") returned %d entries\n", "sres_cache_get",
 	      (void *)cache, sres_record_type(type, b), domain, rr_count));
 
   *return_cached = result;
@@ -282,7 +282,7 @@
     memcpy(&sr->sr_status, &template->sr_status,
 	   size - offsetof(sres_common_t, r_status));
   }
-    
+
   return sr;
 }
 
@@ -298,7 +298,7 @@
 }
 
 /** Store record to cache */
-void 
+void
 sres_cache_store(sres_cache_t *cache, sres_record_t *rr, time_t now)
 {
   sres_rr_hash_entry_t **rr_iter, *rr_hash_entry;
@@ -322,7 +322,7 @@
     }
 
   for (rr_iter = sres_htable_hash(cache->cache_hash, hash);
-       (rr_hash_entry = *rr_iter); 
+       (rr_hash_entry = *rr_iter);
        rr_iter = sres_htable_next(cache->cache_hash, rr_iter)) {
     sres_record_t *or = rr_hash_entry->rr;
 
@@ -334,13 +334,13 @@
       continue;
     if (!!or->sr_name != !!rr->sr_name)
       continue;
-    if (or->sr_name != rr->sr_name && 
+    if (or->sr_name != rr->sr_name &&
 	strcasecmp(or->sr_name, rr->sr_name) != 0)
       continue;
     if (rr->sr_type != sres_type_soa /* There can be only one */
 	&& sres_record_compare(or, rr))
       continue;
-    
+
     /* There was an old entry in the cache.. Zap it, replace this with it */
     sres_heap_remove(cache->cache_heap, rr_hash_entry->rr_heap_index);
     rr_hash_entry->rr_expires = now + rr->sr_ttl;
@@ -354,7 +354,7 @@
 
     return;
   }
-  
+
   rr_hash_entry = su_zalloc(cache->cache_home, sizeof(*rr_hash_entry));
 
   if (rr_hash_entry) {
@@ -402,7 +402,7 @@
   for (i = 0; answers[i] != NULL; i++) {
     if (answers[i]->sr_refcount <= 1)
       su_free(cache->cache_home, answers[i]);
-    else 
+    else
       answers[i]->sr_refcount--;
     answers[i] = NULL;
   }
@@ -416,7 +416,7 @@
   if (answer) {
     if (answer->sr_refcount <= 1)
       su_free(cache->cache_home, answer);
-    else 
+    else
       answer->sr_refcount--;
   }
 }
@@ -427,7 +427,7 @@
 sres_hash_key(const char *string)
 {
   unsigned int result = 0;
-  
+
   while (string && *string)
     result = result * 797 + (unsigned char) * (string++);
 
@@ -460,7 +460,7 @@
 	UNLOCK(cache);
 	return;
       }
-      
+
       sres_heap_remove(cache->cache_heap, 1);
       sres_htable_remove(cache->cache_hash, e);
       _sres_cache_free_one(cache, e->rr);
@@ -478,16 +478,16 @@
  * greylisting of SIP servers.
  *
  * @param cache    pointer to DNS cache object
- * @param domain   domain name of the SRV record(s) to modify 
+ * @param domain   domain name of the SRV record(s) to modify
  *                 (including final dot)
  * @param target   SRV target of the SRV record(s) to modify
- * @param port     port number of SRV record(s) to modify 
- *                 (in host byte order) 
+ * @param port     port number of SRV record(s) to modify
+ *                 (in host byte order)
  * @param ttl      new ttl
  * @param priority new priority value (0=highest, 65535=lowest)
  *
  * @sa sres_set_cached_srv_priority()
- * 
+ *
  * @NEW_1_12_8
  */
 int sres_cache_set_srv_priority(sres_cache_t *cache,
@@ -501,7 +501,7 @@
   unsigned hash;
   sres_rr_hash_entry_t **iter;
   time_t expires;
-  
+
   if (cache == NULL || domain == NULL || target == NULL)
     return -1;
 
@@ -517,13 +517,13 @@
        iter && *iter;
        iter = sres_htable_next(cache->cache_hash, iter)) {
     sres_record_t *rr = (*iter)->rr;
-    
+
     if (rr && rr->sr_name &&
 	sres_type_srv == rr->sr_type &&
 	strcasecmp(rr->sr_name, domain) == 0) {
 
       (*iter)->rr_expires = expires;
-      
+
       if ((port == 0 || rr->sr_srv->srv_port == port) &&
 	  rr->sr_srv->srv_target &&
 	  strcasecmp(rr->sr_srv->srv_target, target) == 0) {
@@ -552,12 +552,12 @@
 
 static inline
 void sres_heap_set_entry(sres_rr_hash_entry_t **heap,
-			 size_t index, 
+			 size_t index,
 			 sres_rr_hash_entry_t *entry)
 {
   entry->rr_heap_index = index;
   heap[index] = entry;
-}  
+}
 
 HEAP_BODIES(static inline,
 	    sres_heap_t,

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@CFILE sresolv.c
  * @brief Sofia DNS Resolver interface using su_root_t.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Teemu Jalava <Teemu.Jalava at nokia.com>
  * @author Mikko Haataja
@@ -78,17 +78,17 @@
   sres_sofia_register_t srs_reg[SRES_MAX_NAMESERVERS];
 };
 
-static int sres_sofia_update(sres_sofia_t *, 
+static int sres_sofia_update(sres_sofia_t *,
 			     su_socket_t new_socket,
 			     su_socket_t old_socket);
 
-static void sres_sofia_timer(su_root_magic_t *magic, 
+static void sres_sofia_timer(su_root_magic_t *magic,
 			     su_timer_t *t,
 			     sres_sofia_t *arg);
 
 static int sres_sofia_set_timer(sres_sofia_t *srs, unsigned long interval);
 
-static int sres_sofia_poll(su_root_magic_t *, su_wait_t *, 
+static int sres_sofia_poll(su_root_magic_t *, su_wait_t *,
 			   sres_sofia_register_t *);
 
 /**Create a resolver.
@@ -97,7 +97,7 @@
  * the resolver object using the Sofia asynchronous reactor #su_root_t.
  */
 sres_resolver_t *
-sres_resolver_create(su_root_t *root, 
+sres_resolver_create(su_root_t *root,
 		     char const *conf_file_path,
 		     tag_type_t tag, tag_value_t value, ...)
 {
@@ -127,7 +127,7 @@
     srs->srs_socket = INVALID_SOCKET;
 
     sres_resolver_set_async(res, sres_sofia_update, srs, 0);
-    
+
     t = su_timer_create(su_root_task(root), SRES_RETRANSMIT_INTERVAL);
     srs->srs_timer = t;
 
@@ -150,7 +150,7 @@
 }
 
 /** Destroy a resolver object. */
-int 
+int
 sres_resolver_destroy(sres_resolver_t *res)
 {
   sres_sofia_t *srs;
@@ -163,9 +163,9 @@
     return su_seterrno(EINVAL);
 
   /* Remove sockets from too, zap timers. */
-  sres_sofia_update(srs, INVALID_SOCKET, INVALID_SOCKET); 
+  sres_sofia_update(srs, INVALID_SOCKET, INVALID_SOCKET);
 
-  sres_resolver_unref(res); 
+  sres_resolver_unref(res);
 
   return 0;
 }
@@ -229,7 +229,7 @@
 
       reg = srs->srs_reg + i;
     }
-    else 
+    else
       reg = old_reg;
   }
 
@@ -271,7 +271,7 @@
 
   SU_DEBUG_3(("sres: %s: %s\n", what, su_strerror(error)));
 
-  return su_seterrno(error);			
+  return su_seterrno(error);
 }
 
 
@@ -317,20 +317,20 @@
       return INVALID_SOCKET;
   }
 
-  return srs->srs_socket; 
+  return srs->srs_socket;
 }
 
 
 /** Sofia timer wrapper. */
-static 
-void 
+static
+void
 sres_sofia_timer(su_root_magic_t *magic, su_timer_t *t, sres_sofia_t *srs)
 {
   sres_resolver_timer(srs->srs_resolver, -1);
 }
 
 /** Sofia timer set wrapper. */
-static 
+static
 int
 sres_sofia_set_timer(sres_sofia_t *srs, unsigned long interval)
 {
@@ -342,10 +342,10 @@
 
 
 /** Sofia poll/select wrapper, called by su_root_t object */
-static 
-int 
-sres_sofia_poll(su_root_magic_t *magic, 
-		su_wait_t *w, 
+static
+int
+sres_sofia_poll(su_root_magic_t *magic,
+		su_wait_t *w,
 		sres_sofia_register_t *reg)
 {
   sres_sofia_t *srs = reg->reg_ptr;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sresolv.docs	Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
 Sofia resolver uses the usual configuration for DNS. In Unix-based systems,
 the DNS configuration is stored in the file /etc/resolv.conf, on Windows, it
 is available through the registry. Sofia resolvers reloads the configuration
-when it detect that it has been changed. 
+when it detect that it has been changed.
 
 In addition to the configuration files, the environment variables
 #SRES_OPTIONS and #RES_OPTIONS can be used to change the behaviour of the
@@ -68,7 +68,7 @@
 @code
 #include <sofia-sip/sresolv.h>
 
-sres_resolver_t *sres_resolver_create(su_root_t *root, 
+sres_resolver_t *sres_resolver_create(su_root_t *root,
 				      char const *resolv_conf,
 				      tag_type_t, tag_value_t, ...);
 
@@ -80,7 +80,7 @@
 
 The second part of interface is used when sending DNS queries:
 
- at code 
+ at code
 sres_query_t *sres_query(sres_resolver_t *res,
 			 sres_answer_f *callback,
 			 sres_context_t *context,
@@ -116,7 +116,7 @@
 
 int sres_sort_answers(sres_resolver_t *res, sres_record_t **answers);
 
-int sres_filter_answers(sres_resolver_t *sres, sres_record_t **answers, 
+int sres_filter_answers(sres_resolver_t *sres, sres_record_t **answers,
 			uint16_t type);
 
 void sres_free_answers(sres_resolver_t *res, sres_record_t **answers);
@@ -127,7 +127,7 @@
 
 @section sofia_resolv_sres_h Interface in <sofia-resolv/sres.h>
 
-The generic interface to Sofia resolver is defined in <sofia-resolv/sres.h>. 
+The generic interface to Sofia resolver is defined in <sofia-resolv/sres.h>.
 The first part of interface consists of functions for handling resolver
 objects:
 
@@ -182,7 +182,7 @@
 
 @subsection sresolv_async Asynchronous Interface in <sofia-resolv/sres_async.h>
 
-It is also possible to use resolver asynchronously without #su_root_t object. 
+It is also possible to use resolver asynchronously without #su_root_t object.
 
 @code
 #include <sys/types.h>
@@ -191,7 +191,7 @@
 
 #include <sofia-resolv/sres_async.h>
 
-sres_async_t *sres_resolver_set_async(sres_resolver_t *res, 
+sres_async_t *sres_resolver_set_async(sres_resolver_t *res,
 				      sres_update_f *update,
 				      sres_async_t *async,
 				      int update_all);
@@ -239,7 +239,7 @@
     process_natpr(context, NULL, results);
   }
   else {
-    context->query = sres_query(context->sres, 
+    context->query = sres_query(context->sres,
                                 process_natpr, context,
 	                        sres_type_naptr, domain);
     if (!context->query)
@@ -253,9 +253,9 @@
 		   sres_record_t *answers[])
 {
   sres_sort_answers(context->sres, answers);
- 
+
   ...
- 
+
   sres_free_answers(context->sres, answers);
 }
 @endcode

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.c	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 /**@internal
  *
  * @CFILE test_sresolv.c Test module for sresolv
- * 
+ *
  * @author Mikko Haataja
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
@@ -103,7 +103,7 @@
   sres_socket_t    sink;
   int              sinkidx;
   char const      *sinkconf;
-  
+
   int              ready;
   int              n_sockets;
   sres_socket_t    sockets[SRES_MAX_NAMESERVERS];
@@ -122,7 +122,7 @@
 #if HAVE_WINSOCK2_H
 
 /* Posix send() */
-su_inline 
+su_inline
 ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
 {
   if (length > INT_MAX)
@@ -130,7 +130,7 @@
   return (ssize_t)send(s, b, (int)length, flags);
 }
 
-su_inline 
+su_inline
 ssize_t sres_sendto(sres_socket_t s, void *b, size_t length, int flags,
 		    struct sockaddr const *sa, socklen_t salen)
 {
@@ -140,7 +140,7 @@
 }
 
 /* Posix recvfrom() */
-su_inline 
+su_inline
 ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
 		      struct sockaddr *from, socklen_t *fromlen)
 {
@@ -152,7 +152,7 @@
   if (length > INT_MAX)
     length = INT_MAX;
 
-  retval = recvfrom(s, buffer, (int)length, flags, 
+  retval = recvfrom(s, buffer, (int)length, flags,
 		    (void *)from, fromlen ? &ilen : NULL);
 
   if (fromlen)
@@ -218,7 +218,7 @@
   if (mode < 0)
      return -1;
 
-  if (blocking) 
+  if (blocking)
     mode &= ~(O_NDELAY | O_NONBLOCK);
   else
     mode |= O_NDELAY | O_NONBLOCK;
@@ -255,7 +255,7 @@
     TEST_1(setblocking(s2, 0) == 0);
     TEST_1(setblocking(s3, 0) == 0);
     TEST_1(setblocking(s4, 0) == 0);
-    
+
     memset(a, 0, sizeof a);
     memset(a1, 0, sizeof a1);
     memset(a2, 0, sizeof a2);
@@ -280,10 +280,10 @@
 
     TEST(bind(s3, (struct sockaddr *)a3, a3len), 0);
     TEST(bind(s4, (struct sockaddr *)a4, a4len), 0);
-    
+
     alen = sizeof a;
     TEST(getsockname(s3, (struct sockaddr *)a, &alen), 0);
-    sin3->sin_port = sin->sin_port; 
+    sin3->sin_port = sin->sin_port;
     memset(sin->sin_zero, 0, sizeof sin->sin_zero);
     TEST(alen, a3len); TEST_M(a, a3, a3len);
 
@@ -329,7 +329,7 @@
   n = ctx->n_sockets;
 
   events = poll(ctx->fds, ctx->n_sockets, ctx->timeout ? 50 : 500);
-      
+
   if (!events)
     return events;
 
@@ -339,7 +339,7 @@
     if (ctx->fds[i].revents & POLLIN)
       sres_resolver_receive(ctx->resolver, ctx->fds[i].fd);
   }
-  
+
   return events;
 }
 
@@ -353,9 +353,9 @@
       ctx->timeout <<= 1;
       offset += ctx->timeout;
     }
-    
+
     /* No harm is done (except wasted CPU) if timer is called more often */
-    sres_resolver_timer(ctx->resolver, -1); 
+    sres_resolver_timer(ctx->resolver, -1);
   }
 }
 
@@ -376,7 +376,7 @@
   TEST_RUN(ctx);
 
   TEST_1(result = sres_cached_answers(res, sres_type_soa, domain));
-  
+
   TEST_1(result != NULL);
   TEST_1(result[0] != NULL);
 
@@ -415,7 +415,7 @@
 
   for (i = 0; result[i] != NULL; i++) {
     rr = (sres_naptr_record_t *) result[i]->sr_naptr;
-                                        
+
     switch(rr->na_order) {
     case 20:
       TEST(rr->na_record->r_type, sres_type_naptr);
@@ -475,7 +475,7 @@
   END();
 }
 
-char const longname[1026] = 
+char const longname[1026] =
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -484,7 +484,7 @@
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
-  
+
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -493,7 +493,7 @@
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
-  
+
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -502,7 +502,7 @@
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
-  
+
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa."
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -512,7 +512,7 @@
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.";
 
-char name2048[2049] = 
+char name2048[2049] =
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
   "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
@@ -556,7 +556,7 @@
   sres_record_t **result;
   const sres_a_record_t *rr_a;
   char const *domain = "sip00.example.com";
-  char name1025[1026] = 
+  char name1025[1026] =
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -565,7 +565,7 @@
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-		  
+
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -583,7 +583,7 @@
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-		  
+
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -592,7 +592,7 @@
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
 		  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-		  
+
 		  ".";
 
   BEGIN();
@@ -612,7 +612,7 @@
   query = sres_query(res, test_answer, ctx, sres_type_a, longname);
   TEST_1(query);
   sres_query_bind(query, NULL, NULL);
-  
+
   TEST_1(sres_query(res, test_answer, ctx, sres_type_a, domain));
 
   TEST_RUN(ctx);
@@ -660,7 +660,7 @@
   sres_free_answers(res, ctx->result), ctx->result = NULL;
 
   /* Try missing domain */
-  TEST_1(sres_query(res, test_answer, ctx, sres_type_a, 
+  TEST_1(sres_query(res, test_answer, ctx, sres_type_a,
 			 "no-sip.example.com"));
 
   TEST_RUN(ctx);
@@ -675,9 +675,9 @@
 
   sres_free_answers(res, ctx->result), ctx->result = NULL;
 
-  /* Try domain without A record => 
+  /* Try domain without A record =>
      we should get a record with SRES_RECORD_ERR */
-  TEST_1(sres_query(res, test_answer, ctx, sres_type_a, 
+  TEST_1(sres_query(res, test_answer, ctx, sres_type_a,
 			 "aaaa.example.com"));
 
   TEST_RUN(ctx);
@@ -736,7 +736,7 @@
 
   TEST_1(result = ctx->result);
   TEST_1(result[0]);
-  
+
   rr_a6 = result[0]->sr_a6;
   TEST(rr_a6->a6_record->r_type, sres_type_a6);
   TEST(rr_a6->a6_record->r_class, sres_class_in);
@@ -807,7 +807,7 @@
   TEST_S(su_inet_ntop(AF_INET6, &rr_a6->a6_suffix, buf, sizeof(buf)),
 	 "3ff0:12:3012:c006:a08:20ff:fe7d:e7ac");
   TEST_P(rr_a6->a6_prename, NULL);
- 
+
   sres_free_answers(res, ctx->result), ctx->result = NULL;
 
   /* Check parsing of special case: no suffix */
@@ -822,7 +822,7 @@
   TEST(rr_a6->a6_prelen, 128);
   TEST_S(su_inet_ntop(AF_INET6, &rr_a6->a6_suffix, buf, sizeof(buf)), "::");
   TEST_S(rr_a6->a6_prename, "a6.example.com.");
- 
+
   sres_free_answers(res, ctx->result), ctx->result = NULL;
 
   TEST_1(result = sres_cached_answers(res, sres_type_a6, domain));
@@ -868,7 +868,7 @@
   sres_free_answers(res, ctx->result), ctx->result = NULL;
 
   TEST_1(result = sres_cached_answers(res, sres_type_aaaa, domain));
-  
+
   TEST_1(rr_aaaa = result[0]->sr_aaaa);
   TEST(rr_aaaa->aaaa_record->r_type, sres_type_aaaa);
   TEST(rr_aaaa->aaaa_record->r_class, sres_class_in);
@@ -900,7 +900,7 @@
 
   for (i = 0; result[i] != NULL; i++) {
     TEST_1(rr = (sres_srv_record_t *) result[i]->sr_srv);
-    
+
     switch(rr->srv_priority) {
     case 3:
       TEST(rr->srv_record->r_type, sres_type_srv);
@@ -940,7 +940,7 @@
 
   for (i = 0; result[i] != NULL; i++) {
     TEST_1(rr = (sres_srv_record_t *) result[i]->sr_srv);
-    
+
     switch(rr->srv_priority) {
     case 3:
       TEST(rr->srv_record->r_type, sres_type_srv);
@@ -1035,7 +1035,7 @@
   sres_query_t *query;
   const sres_ptr_record_t *rr;
   struct sockaddr_in sin = {0};
-  
+
   su_inet_pton(AF_INET, "127.0.0.1", &sin.sin_addr);
   sin.sin_family = AF_INET;
 
@@ -1048,7 +1048,7 @@
   TEST_RUN(ctx);
 
   result = ctx->result;
-  
+
   TEST_1(result != NULL);
   TEST_1(result[0] != NULL);
 
@@ -1067,7 +1067,7 @@
   sres_resolver_t *res = ctx->resolver;
   sres_record_t **result;
   const sres_ptr_record_t *rr;
-  char const *domain = 
+  char const *domain =
     "c.a.7.e.d.7.e.f.f.f.0.2.8.0.a.0.0.0.0.c.2.1.0.3.0.0.2.1.e.f.f.3.ip6.int";
 
   BEGIN();
@@ -1076,7 +1076,7 @@
   TEST_RUN(ctx);
 
   result = ctx->result;
-  
+
   TEST_1(result != NULL);
   TEST_1(result[0] != NULL);
 
@@ -1098,12 +1098,12 @@
 
   BEGIN();
 
-  su_inet_pton(AF_INET6, "3ffe:1200:3012:c000:0a08:20ff:fe7d:e7ac", 
+  su_inet_pton(AF_INET6, "3ffe:1200:3012:c000:0a08:20ff:fe7d:e7ac",
 	       &sin6.sin6_addr);
 
   sin6.sin6_family = AF_INET6;
 
-  ctx->query = 
+  ctx->query =
     sres_query_sockaddr(res, test_answer, ctx,
 			     sres_type_ptr, (struct sockaddr*)&sin6);
   TEST_1(ctx->query != NULL);
@@ -1111,7 +1111,7 @@
   TEST_RUN(ctx);
 
   result = ctx->result;
-  
+
   TEST_1(result != NULL);
   TEST_1(result[0] != NULL);
 
@@ -1153,7 +1153,7 @@
   sres_query(res, test_answer_multi, ctx,
 		  sres_qtype_any, "_sips._tcp.example.com");
 
-  sres_query(res, test_answer_multi, ctx, 
+  sres_query(res, test_answer_multi, ctx,
 		  sres_qtype_any, "sip.example.com");
 
   sres_query(res, test_answer_multi, ctx,
@@ -1179,11 +1179,11 @@
 
   /* For a chance, a fully qualified domain name with final "." */
   domain = "example.com.";
-  
-  result = sres_cached_answers(res, 
+
+  result = sres_cached_answers(res,
 			       sres_qtype_any,
 			       domain);
-  
+
   TEST_1(result != NULL);
 
   for (i = 0; result[i] != NULL; i++) {
@@ -1227,7 +1227,7 @@
         TEST_S(rr_naptr->na_flags, "u");
         TEST_S(rr_naptr->na_services, "TEST+D2U");
 
-        TEST_S(rr_naptr->na_regexp, 
+        TEST_S(rr_naptr->na_regexp,
 	       "/(tst:([^@]+@))?example.com$/\\1operator.com/i");
 
         TEST_S(rr_naptr->na_replace, ".");
@@ -1251,7 +1251,7 @@
       }
     }
   }
-  
+
   TEST(ok, 7);
 
   /* Reverse order before sorting */
@@ -1269,8 +1269,8 @@
     sort_array[0] = result[i], sort_array[1] = result[i], sort_array[2] = NULL;
     sres_sort_answers(res, sort_array);
   }
-  
-  /* Test free */ 
+
+  /* Test free */
   for (i = 0; result[i]; i++) {
     sres_free_answer(res, result[i]);
     result[i] = NULL;
@@ -1279,10 +1279,10 @@
   /* Test sres_free_answers() */
   sres_free_answers(res, result);
 
-  result = sres_cached_answers(res, 
+  result = sres_cached_answers(res,
 			       sres_qtype_any,
 			       "_sips._tcp.example.com");
-  
+
   TEST_1(result != NULL);
 
   ok = 0;
@@ -1340,7 +1340,7 @@
   sres_free_answers(res, result);
 
   domain = "sip.example.com";
-  result = sres_cached_answers(res, 
+  result = sres_cached_answers(res,
 			       sres_qtype_any,
 			       domain);
 
@@ -1357,7 +1357,7 @@
 
 #if HAVE_SIN6
   domain = "subnet.example.com";
-  result = sres_cached_answers(res, 
+  result = sres_cached_answers(res,
 			       sres_qtype_any,
 			       domain);
 
@@ -1386,10 +1386,10 @@
 	 "3ffe:1200:3012:c000:206:5bff:fe55:462f");
   sres_free_answers(res, result);
 
-  result = sres_cached_answers_sockaddr(res, 
+  result = sres_cached_answers_sockaddr(res,
                                         sres_type_ptr,
                                         (struct sockaddr *)&sin6);
-  
+
   TEST_1(result != NULL);
 
   rr_ptr = result[0]->sr_ptr;
@@ -1397,7 +1397,7 @@
 
   TEST(rr_ptr->ptr_record->r_type, sres_type_ptr);
   TEST(rr_ptr->ptr_record->r_class, sres_class_in);
-  TEST_S(rr_ptr->ptr_domain, "sip01.example.com.");    
+  TEST_S(rr_ptr->ptr_domain, "sip01.example.com.");
 
   sres_free_answers(res, result);
 #endif /* HAVE_SIN6 */
@@ -1412,7 +1412,7 @@
   sres_record_t **result;
   const sres_aaaa_record_t *rr_aaaa;
   char buf[50] = {0};
-  
+
   BEGIN();
 
   TEST_1(sres_query(res, test_answer, ctx,
@@ -1447,7 +1447,7 @@
   struct sockaddr_in sin[1];
   socklen_t sinsize = sizeof sin;
   FILE *f;
-  
+
   BEGIN();
 
   sink = socket(AF_INET, SOCK_DGRAM, 0); TEST_1(sink != INVALID_SOCKET);
@@ -1458,21 +1458,21 @@
 
   ctx->sink = sink;
 
-  template = su_sprintf(ctx->home, "%s/test_sresolv.XXXXXX", 
+  template = su_sprintf(ctx->home, "%s/test_sresolv.XXXXXX",
 			tmpdir ? tmpdir : "/tmp");
   TEST_1(template);
 
-#ifndef _WIN32  
+#ifndef _WIN32
   fd = mkstemp(template); TEST_1(fd != -1);
 #else
   fd = open(template, O_WRONLY); TEST_1(fd != -1);
-#endif  
+#endif
 
   f = fdopen(fd, "w"); TEST_1(f);
-  fprintf(f, 
+  fprintf(f,
 	  "domain example.com\n"
 	  "search foo.bar.com\n"
-	  "port %u\n", 
+	  "port %u\n",
 	  ntohs(sin->sin_port));
   fclose(f);
 
@@ -1563,7 +1563,7 @@
   ctx->query = q;
   if (ctx->result)
     sres_free_answers(ctx->resolver, ctx->result);
-  ctx->result = answer; 
+  ctx->result = answer;
   BREAK(ctx);
 }
 
@@ -1720,9 +1720,9 @@
   TEST_1(ctx->sink != INVALID_SOCKET && ctx->sink != (sres_socket_t)0);
 
   /* Prepare for test_answer() callback */
-  sres_free_answers(ctx->resolver, ctx->result); 
+  sres_free_answers(ctx->resolver, ctx->result);
   ctx->result = NULL;
-  ctx->query = NULL; 
+  ctx->query = NULL;
 
   /* Get canned response */
   TEST_1(bin = hex2bin(__func__, hextest, NULL, &binlen));
@@ -1795,12 +1795,12 @@
   ctx->n_sockets = n;
   TEST_1(n < SRES_MAX_NAMESERVERS);
   TEST(sres_resolver_sockets(res, ctx->sockets, n), n);
-  
+
   for (i = 0; i < n; i++) {
     ctx->fds[i].fd = ctx->sockets[i];
     ctx->fds[i].events = POLLIN | POLLERR;
   }
-  
+
   TEST_P(sres_resolver_ref(ctx->resolver), ctx->resolver);
   sres_resolver_unref(ctx->resolver);
 
@@ -1823,7 +1823,7 @@
   offset = 0;
   memset(ctx, 0, sizeof ctx);
   ctx->home->suh_size = sizeof ctx;
-  
+
   return 0;
 }
 
@@ -1839,7 +1839,7 @@
   TEST_1(res = sres_resolver_new(conf_file));
   n = sres_resolver_sockets(res, NULL, 0);
   TEST_1(n > 0);
-    
+
   TEST(sres_resolver_sockets(res, &socket, 1), n);
 
 #if !__linux
@@ -1852,12 +1852,12 @@
 port $port
 -->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8-->8--
   */
-  printf("%s:%u: %s test should be updated\n", 
+  printf("%s:%u: %s test should be updated\n",
 	 __FILE__, __LINE__, __func__);
 #else
   TEST_P(sres_query(res, test_answer, ctx, sres_type_a, "example.com"), NULL);
 #endif
-    
+
   sres_resolver_unref(res);
 
   END();
@@ -1882,7 +1882,7 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
+  fprintf(stderr,
 	  "usage: %s OPTIONS [-] [conf-file] [error-conf-file]\n"
 	  "\twhere OPTIONS are\n"
 	  "\t    -v be verbose\n"
@@ -1932,7 +1932,7 @@
 
       if (rest == NULL || *rest)
 	usage(1);
-      
+
       su_log_set_level(sresolv_log, level);
     } else
       usage(1);
@@ -1949,7 +1949,7 @@
 #if HAVE_ALARM
   else if (o_alarm) {
     alarm(60);
-    signal(SIGALRM, sig_alarm); 
+    signal(SIGALRM, sig_alarm);
   }
 #endif
 
@@ -1975,7 +1975,7 @@
     /* These tests are run with (local) nameserver,
      */
     int initerror = test_init(ctx, argv[i]);
-    if (!initerror) { 
+    if (!initerror) {
       error |= test_a(ctx);
       error |= test_soa(ctx);
       error |= test_naptr(ctx);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/torture_sresolv.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/torture_sresolv.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/torture_sresolv.c	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 /**@internal
  *
  * @CFILE torture_sresolv.c Torture tests for Sofia resolver.
- * 
+ *
  * @author Mikko Haataja
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  */
@@ -96,7 +96,7 @@
 {
 }
 
-static char name2048[2049] = 
+static char name2048[2049] =
   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
   "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
   "cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
@@ -151,7 +151,7 @@
 
   template = su_sprintf(ctx->home, ".torture_sresolv_api.conf.XXXXXX");
   TEST_1(template);
-  
+
   TEST_1(res = sres_resolver_new(NULL));
   TEST(su_home_threadsafe((su_home_t *)res), 0);
   TEST_VOID(sres_resolver_unref(res));
@@ -160,7 +160,7 @@
   fd = mkstemp(template); TEST_1(fd != -1);
 #else
   fd = open(template, O_WRONLY); TEST_1(fd != -1);
-#endif  
+#endif
 
   f = fdopen(fd, "w"); TEST_1(f);
   fprintf(f, "domain example.com\n");
@@ -173,9 +173,9 @@
   TEST(su_home_threadsafe((su_home_t *)res), 0);
 
   unlink(template);
-  
+
   s = sockets[0];
-  
+
   TEST_P(sres_resolver_ref(NULL), NULL);
   TEST(errno, EFAULT);
   sres_resolver_unref(NULL);
@@ -188,7 +188,7 @@
   TEST_P(sres_resolver_get_userdata(res), NULL);
   TEST_P(sres_resolver_set_userdata(res, sa), NULL);
   TEST_P(sres_resolver_get_userdata(res), sa);
-  TEST_P(sres_resolver_set_userdata(res, NULL), sa); 
+  TEST_P(sres_resolver_set_userdata(res, NULL), sa);
   TEST_P(sres_resolver_get_userdata(res), NULL);
 
   errno = 0;
@@ -218,7 +218,7 @@
   sres_sort_answers(NULL, NULL);
 
   sres_resolver_unref(res);
-  
+
   END();
 }
 
@@ -232,7 +232,7 @@
 int test_cache(void)
 {
   BEGIN();
- 
+
   sres_a_record_t *a, a0[1], **all;
   char host[128];
   sres_cache_t *cache;
@@ -285,7 +285,7 @@
     t2.tv_sec = t1.tv_sec - t0.tv_sec, t2.tv_nsec = t1.tv_nsec - t0.tv_nsec;
     if (t1.tv_nsec < t0.tv_nsec)
       t2.tv_sec--, t2.tv_nsec += 1000000000;
-    printf("sres_cache: stored %u entries: %lu.%09lu sec\n", 
+    printf("sres_cache: stored %u entries: %lu.%09lu sec\n",
 	   (unsigned)N, (long unsigned)t2.tv_sec, t2.tv_nsec);
   }
 
@@ -302,7 +302,7 @@
     t2.tv_sec = t1.tv_sec - t0.tv_sec, t2.tv_nsec = t1.tv_nsec - t0.tv_nsec;
     if (t1.tv_nsec < t0.tv_nsec)
       t2.tv_sec--, t2.tv_nsec += 1000000000;
-    printf("sres_cache: cleaned %u entries: %lu.%09lu sec\n", 
+    printf("sres_cache: cleaned %u entries: %lu.%09lu sec\n",
 	   (unsigned)N, (long unsigned)t2.tv_sec, t2.tv_nsec);
   }
 
@@ -324,7 +324,7 @@
     t2.tv_sec = t1.tv_sec - t0.tv_sec, t2.tv_nsec = t1.tv_nsec - t0.tv_nsec;
     if (t1.tv_nsec < t0.tv_nsec)
       t2.tv_sec--, t2.tv_nsec += 1000000000;
-    printf("sres_cache: stored %u entries: %lu.%09lu sec\n", 
+    printf("sres_cache: stored %u entries: %lu.%09lu sec\n",
 	   (unsigned)N, (long unsigned)t2.tv_sec, t2.tv_nsec);
   }
 
@@ -337,12 +337,12 @@
     sres_cache_clean(cache, now + 3600);
 
   clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t1);
-  
+
   if (o_timing) {
     t2.tv_sec = t1.tv_sec - t0.tv_sec, t2.tv_nsec = t1.tv_nsec - t0.tv_nsec;
     if (t1.tv_nsec < t0.tv_nsec)
       t2.tv_sec--, t2.tv_nsec += 1000000000;
-    printf("sres_cache: cleaned %u entries: %lu.%09lu sec\n", 
+    printf("sres_cache: cleaned %u entries: %lu.%09lu sec\n",
 	   (unsigned)N, (long unsigned)t2.tv_sec, t2.tv_nsec);
   }
 
@@ -369,7 +369,7 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
+  fprintf(stderr,
 	  "usage: %s OPTIONS [-]\n"
 	  "\twhere OPTIONS are\n"
 	  "\t    -v be verbose\n"
@@ -419,7 +419,7 @@
 
       if (rest == NULL || *rest)
 	usage(1);
-      
+
       su_log_set_level(sresolv_log, level);
     }
     else
@@ -429,7 +429,7 @@
 #if HAVE_ALARM
   if (o_alarm) {
     alarm(60);
-    signal(SIGALRM, sig_alarm); 
+    signal(SIGALRM, sig_alarm);
   }
 #endif
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -11,14 +11,14 @@
 2006-05-07  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
 	* sofia-sip/stun.h: Added new NAT types stun_nattype_t. The
-	naming is now compliant with the terms used by IETF BEHAVE 
+	naming is now compliant with the terms used by IETF BEHAVE
 	documents.
 
 2006-05-06  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
 	* sofia-sip/stun.h (stun_nattype_str): Added a new function to the
 	public API.
-	
+
 	* sofia-sip/stun.h (stun_nattype): Modified the function signature.
 
 	* sofia-sip/stun.h (stun_state_t): Moved all request-specific states
@@ -54,7 +54,7 @@
 
 2006-02-09  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* stun_tag.h: Added STUN_DOMAIN() and STUN_REQUIRE_INTEGRITY(). 
+	* stun_tag.h: Added STUN_DOMAIN() and STUN_REQUIRE_INTEGRITY().
 	Deprecated STUN_INTEGRITY.
 
 	* stun.c: Mark wait entries as deregistered after
@@ -95,7 +95,7 @@
 	* stun_internal.h: included stun_common.h
 
 	* torture_stun.c: updated get_localinfo() to get_address()
-	
+
 2006-01-13  Martti Mela  <martti.mela at nokia.com>
 
 	* stun.c: actions are now very separate from each other. Bug fixes.
@@ -111,7 +111,7 @@
 	glueing into TPORT.
 
 	* stunc.c: Removed unnecessary su_root_break()s.
-	
+
 2006-01-10  Martti Mela  <martti.mela at nokia.com>
 
 	* stun.c: First working version of get_lifetime functionality. All
@@ -165,7 +165,7 @@
 	stun_handle functionality.
 
 	* stunc.c, torture_stun.c: modified in accordance to stun.h.
-	
+
 2005-12-16  Martti Mela  <martti.mela at nokia.com>
 
 	* stun.h: changed stun_engine_t to stun_handle_t.
@@ -175,7 +175,7 @@
 	representation, too.
 
 	* stunc.c, torture_stun.c: behave now in conformance to stun.h
-	
+
 2005-12-15  Martti Mela  <martti.mela at nokia.com>
 
 	* STUN updated to work asynchronously.
@@ -189,7 +189,7 @@
 
 2005-11-19  Kai Vehmanen  <kaiv at .devtag.AUTHORS>
 
-	* stun.h (stun_set_uname_pwd): Changed from unsigned to signed 
+	* stun.h (stun_set_uname_pwd): Changed from unsigned to signed
 	char pointers for passing username and password.
 
 2005-11-18  Kai Vehmanen  <kai.vehmanen at nokia.com>
@@ -207,7 +207,7 @@
 
 2005-10-24  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* stun.c: Fixed stun_bind() behaviour when STUN 
+	* stun.c: Fixed stun_bind() behaviour when STUN
 	discovery fails. Added enum for tracking client
 	state.
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/lookup_stun_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/lookup_stun_server.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/lookup_stun_server.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@internal
- * @file lookup_stun_server.c 
+ * @file lookup_stun_server.c
  * @brief Test app for STUN DNS-SRV lookups.
  *
  * @author Kai Vehmanen <Kai.Vehmanen at nokia.com>
@@ -53,16 +53,16 @@
   uint16_t tcp_port = 0, udp_port = 0, stp_port = 0;
   int res = 0;
 
-  printf("STUN DNS-SRV lookup results:\n"); 
+  printf("STUN DNS-SRV lookup results:\n");
 
   res = stun_dns_lookup_udp_addr(self, &udp_target, &udp_port);
-  printf(" _stun._udp.%s:     %s:%u (%s).\n", g_domain, udp_target, udp_port, RESULT(res)); 
+  printf(" _stun._udp.%s:     %s:%u (%s).\n", g_domain, udp_target, udp_port, RESULT(res));
 
   res = stun_dns_lookup_tcp_addr(self, &tcp_target, &tcp_port);
-  printf(" _stun._tcp.%s:     %s:%u (%s).\n", g_domain, tcp_target, tcp_port, RESULT(res)); 
+  printf(" _stun._tcp.%s:     %s:%u (%s).\n", g_domain, tcp_target, tcp_port, RESULT(res));
 
   res = stun_dns_lookup_stp_addr(self, &stp_target, &stp_port);
-  printf(" _stun-tls._tcp.%s: %s:%u (%s).\n", g_domain, stp_target, stp_port, RESULT(res)); 
+  printf(" _stun-tls._tcp.%s: %s:%u (%s).\n", g_domain, stp_target, stp_port, RESULT(res));
 
   su_root_break(root);
 }
@@ -71,7 +71,7 @@
 {
   su_root_t *root;
   stun_dns_lookup_t *lookup;
-  
+
   if (argc < 2) {
     printf("usage: ./lookup_stun_server <domain>\n");
     return -1;
@@ -87,7 +87,7 @@
 
   /* step: initiate the DNS-SRV lookup */
   lookup = stun_dns_lookup(root, root, lookup_cb, g_domain);
- 
+
   if (lookup) {
     /* step: enter the main loop (break fro lookup_cb()) */
     su_root_run(root);

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun.h	Tue Dec 16 13:05:22 2008
@@ -56,13 +56,13 @@
 
 typedef struct stun_mini_s     stun_mini_t;
 
-#ifndef STUN_MAGIC_T 
+#ifndef STUN_MAGIC_T
 #define STUN_MAGIC_T            struct stun_magic_t
 #endif
 /** STUN server context */
 typedef STUN_MAGIC_T stun_magic_t;
 
-#ifndef STUN_DISCOVERY_MAGIC_T 
+#ifndef STUN_DISCOVERY_MAGIC_T
 #define STUN_DISCOVERY_MAGIC_T            struct stun_discovery_magic_t
 #endif
 /** STUN discovery_ context */
@@ -90,44 +90,44 @@
  * XXX: should be extended to distinguish between filtering and
  *      mapping allocation behaviour (see IETF BEHAVE documents)
  *
- * Note: the NAT type detection algorithm can fail in 
- *       case where the NAT behaves in a nondeterministic 
+ * Note: the NAT type detection algorithm can fail in
+ *       case where the NAT behaves in a nondeterministic
  *       fashion.
  **/
 typedef enum stun_nattype_e {
-  stun_nat_unknown = 0, 
-      
+  stun_nat_unknown = 0,
+
   /* no NAT between client and STUN server */
-  stun_open_internet,     
+  stun_open_internet,
 
   /* UDP communication blocked by FW */
-  stun_udp_blocked,       
+  stun_udp_blocked,
 
   /* No NAT, but a FW element is performing address and port
    * restricted filtering. */
-  stun_sym_udp_fw,        
+  stun_sym_udp_fw,
 
-  /* Endpoint independent filtering (endpoint independent mapping) 
+  /* Endpoint independent filtering (endpoint independent mapping)
    * RFC3489 full cone NAT. */
-  stun_nat_full_cone,     
+  stun_nat_full_cone,
 
   /* Address restricted filtering (endpoint independent mapping),
    * RFC3489 restricted cone NAT. */
-  stun_nat_res_cone,      
+  stun_nat_res_cone,
 
-  /* Address and port restricted filtering (endpoint 
+  /* Address and port restricted filtering (endpoint
    * independent mapping), RFC3489 port restricted cone */
-  stun_nat_port_res_cone, 
+  stun_nat_port_res_cone,
 
   /* Endpoint independent filtering, endpoint dependent mapping. */
-  stun_nat_ei_filt_ad_map, 
+  stun_nat_ei_filt_ad_map,
 
   /* Address dependent filtering, endpoint dependent mapping. */
-  stun_nat_ad_filt_ad_map, 
+  stun_nat_ad_filt_ad_map,
 
-  /* Address and port dependent filtering, endpoint dependent mapping 
+  /* Address and port dependent filtering, endpoint dependent mapping
    * RFC3489 symmetric NAT). */
-  stun_nat_adp_filt_ad_map, 
+  stun_nat_adp_filt_ad_map,
 
 } stun_nattype_t;
 
@@ -138,9 +138,9 @@
  * @see stun_obtain_shared_secret()
  * @see stun_test_nattype()
  * @see stun_test_lifetime()
- */ 
+ */
 typedef enum stun_state_e {
-  
+
   stun_no_assigned_event,
 
   /* TLS events; see stun_obtain_shared_request() */
@@ -211,7 +211,7 @@
 			 int sid, su_sockaddr_t *from_addr,
 			 socklen_t from_len);
 
-/* ------------------------------------------------------------------- 
+/* -------------------------------------------------------------------
  * Functions for 'Binding Discovery' usage (RFC3489/3489bis) */
 
 SOFIAPUBFUN
@@ -219,12 +219,12 @@
 			      stun_discovery_magic_t *magic,
 			      tag_type_t tag, tag_value_t value, ...);
 
-SOFIAPUBFUN 
-int stun_bind(stun_handle_t *sh, 
+SOFIAPUBFUN
+int stun_bind(stun_handle_t *sh,
 	      stun_discovery_f, stun_discovery_magic_t *magic,
 	      tag_type_t tag, tag_value_t value, ...);
 
-SOFIAPUBFUN 
+SOFIAPUBFUN
 int stun_discovery_get_address(stun_discovery_t *sd,
 			       void *addr,
 			       socklen_t *return_addrlen);
@@ -244,13 +244,13 @@
 		       tag_type_t tag, tag_value_t value, ...);
 SOFIAPUBFUN int stun_lifetime(stun_discovery_t *sd);
 
-/* ------------------------------------------------------------------- 
+/* -------------------------------------------------------------------
  * Functions for 'Connectivity Check' and 'NAT Keepalives' usages (RFC3489bis) */
 
-SOFIAPUBFUN 
+SOFIAPUBFUN
 int stun_set_uname_pwd(stun_handle_t *sh,
 		       const char *uname,
-		       isize_t len_uname, 
+		       isize_t len_uname,
 		       const char *pwd,
 		       isize_t len_pwd);
 
@@ -259,7 +259,7 @@
 
 /* Create a keepalive dispatcher for bound SIP sockets */
 
-SOFIAPUBFUN 
+SOFIAPUBFUN
 int stun_keepalive(stun_handle_t *sh,
 		   su_sockaddr_t *sa,
 		   tag_type_t tag, tag_value_t value,
@@ -274,10 +274,10 @@
 /* -------------------------------------------------------------------
  * Functions for STUN server discovery using DNS (RFC3489/3489bis) */
 
-SOFIAPUBFUN 
-stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic, 
+SOFIAPUBFUN
+stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic,
 				   su_root_t *root,
-				   stun_dns_lookup_f func, 
+				   stun_dns_lookup_f func,
 				   const char *domain);
 SOFIAPUBFUN void stun_dns_lookup_destroy(stun_dns_lookup_t *self);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun_common.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun_common.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/sofia-sip/stun_common.h	Tue Dec 16 13:05:22 2008
@@ -28,12 +28,12 @@
 
 /**
  * @file sofia-sip/stun_common.h
- * @brief 
- * 
+ * @brief
+ *
  * @author Tat Chan <Tat.Chan at nokia.com>
- * 
+ *
  * @date Created: Fri Oct  3 13:39:55 2003 ppessi
- * 
+ *
  */
 
 #include <sofia-sip/su_localinfo.h>
@@ -69,7 +69,7 @@
 #define STUN_A_REFRESH_INTERVAL       0x8024
 
 /* Defines for mandatory and optional attributes */
-#define STUN_A_LAST_MANDATORY         0x0023 /**< largest attribute in the current 
+#define STUN_A_LAST_MANDATORY         0x0023 /**< largest attribute in the current
 						spec (see above for exceptions
 						for buggy servers) */
 #define STUN_A_OPTIONAL               0x7fff
@@ -209,7 +209,7 @@
 int stun_encode_type_len(stun_attr_t *attr, uint16_t len);
 int stun_encode_response_address(stun_attr_t *attr);
 
-int stun_validate_message_integrity(stun_msg_t *msg, stun_buffer_t *pwd); 
+int stun_validate_message_integrity(stun_msg_t *msg, stun_buffer_t *pwd);
 
 int stun_copy_buffer(stun_buffer_t *p, stun_buffer_t *p2);
 void stun_init_buffer(stun_buffer_t *p);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun.c	Tue Dec 16 13:05:22 2008
@@ -31,11 +31,11 @@
  * @author Tat Chan <Tat.Chan at nokia.com>
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Kai Vehmanen <Kai.Vehmanen at nokia.com>
- * 
+ *
  * @date Created: Thu Jul 24 17:21:00 2003 ppessi
  */
 
-#include "config.h" 
+#include "config.h"
 
 #include <assert.h>
 #include <string.h>
@@ -79,7 +79,7 @@
 #endif
 
 /** STUN log. */
-su_log_t stun_log[] = { SU_LOG_INIT("stun", "STUN_DEBUG", SU_DEBUG) }; 
+su_log_t stun_log[] = { SU_LOG_INIT("stun", "STUN_DEBUG", SU_DEBUG) };
 
 /**@var char const STUN_DEBUG[]
  *
@@ -87,7 +87,7 @@
  *
  * The STUN_DEBUG environment variable is used to determine the debug logging
  * level for @b stun module. The default level is 3.
- * 
+ *
  * @sa <sofia-sip/su_debug.h>, stun_log, SOFIA_DEBUG
  */
 extern char const STUN_DEBUG[];
@@ -100,7 +100,7 @@
 /**
  * States of STUN requests. See stun_state_e for states
  * discovery processes.
- */ 
+ */
 typedef enum stun_req_state_e {
   stun_req_no_assigned_event,
   stun_req_dispose_me,            /**< request can be disposed */
@@ -214,7 +214,7 @@
   char           *sh_domain;        /**< domain address for DNS-SRV lookups */
 
   stun_dns_lookup_t  *sh_dns_lookup;
-  stun_action_t       sh_dns_pend_action; 
+  stun_action_t       sh_dns_pend_action;
   stun_discovery_f    sh_dns_pend_cb;
   stun_discovery_magic_t *sh_dns_pend_ctx;
   tagi_t             *sh_dns_pend_tags;
@@ -259,13 +259,13 @@
   STUN_STATE_STR(stun_tls_ssl_connect_failed);
   STUN_STATE_STR(stun_discovery_timeout);
   /* STUN_STATE_STR(stun_req_timeout); */
-  
+
   case stun_error:
   default: return "stun_error";
   }
 }
 
-/** 
+/**
  * Returns the NAT type attached to STUN discovery handle.
  *
  * @see stun_nattype_str().
@@ -294,7 +294,7 @@
 
 /**
  * Returns the detected NAT type.
- * 
+ *
  * @see stun_nattype_str().
  * @see stun_test_nattype().
  */
@@ -318,10 +318,10 @@
 
 
 #if HAVE_OPENSSL
-char const stun_version[] = 
+char const stun_version[] =
  "sofia-sip-stun using " OPENSSL_VERSION_TEXT;
 #else
-char const stun_version[] = 
+char const stun_version[] =
  "sofia-sip-stun";
 #endif
 
@@ -349,18 +349,18 @@
 #endif
 
 /* timers */
-static void stun_sendto_timer_cb(su_root_magic_t *magic, 
+static void stun_sendto_timer_cb(su_root_magic_t *magic,
 				 su_timer_t *t,
 				 su_timer_arg_t *arg);
 #if HAVE_OPENSSL
-static void stun_tls_connect_timer_cb(su_root_magic_t *magic, 
+static void stun_tls_connect_timer_cb(su_root_magic_t *magic,
 				      su_timer_t *t,
 				      su_timer_arg_t *arg);
 #endif
-static void stun_test_lifetime_timer_cb(su_root_magic_t *magic, 
+static void stun_test_lifetime_timer_cb(su_root_magic_t *magic,
 					su_timer_t *t,
 					su_timer_arg_t *arg);
-static void stun_keepalive_timer_cb(su_root_magic_t *magic, 
+static void stun_keepalive_timer_cb(su_root_magic_t *magic,
 				    su_timer_t *t,
 				    su_timer_arg_t *arg);
 
@@ -387,8 +387,8 @@
 /**
  * Check if a STUN handle should be created.
  *
- * Return true if STUNTAG_SERVER() or STUNTAG_DOMAIN() tags have 
- * been specified, or otherwise if STUN_SERVER environment variable 
+ * Return true if STUNTAG_SERVER() or STUNTAG_DOMAIN() tags have
+ * been specified, or otherwise if STUN_SERVER environment variable
  * is set.
  *
  * @TAGS
@@ -408,7 +408,7 @@
   ta_start(ta, tag, value);
   t = tl_find(ta_args(ta), stuntag_server);
   t2 = tl_find(ta_args(ta), stuntag_domain);
-  if (t && t->t_value) 
+  if (t && t->t_value)
     stun_server = (char *)t->t_value;
   else if (t2 && t2->t_value)
     stun_server = (char *)t2->t_value;
@@ -420,14 +420,14 @@
 }
 
 
-/** 
+/**
  * Creates a STUN handle.
  *
- * The created handles can be used for STUN binding discovery, 
+ * The created handles can be used for STUN binding discovery,
  * keepalives, and other STUN usages.
  *
  * @param root eventloop to used by the stun state machine
- * @param tag,value,... tag-value list 
+ * @param tag,value,... tag-value list
  *
  * @TAGS
  * @TAG STUNTAG_DOMAIN() domain to use in DNS-SRV based STUN server
@@ -444,7 +444,7 @@
   int req_msg_integrity = 1;
   int err;
   ta_list ta;
-  
+
   enter;
 
   ta_start(ta, tag, value);
@@ -470,7 +470,7 @@
     SU_DEBUG_5(("%s: using STUN_SERVER=%s\n", __func__, server));
   }
 
-  SU_DEBUG_5(("%s(\"%s\"): called\n", 
+  SU_DEBUG_5(("%s(\"%s\"): called\n",
 	      __func__, server));
 
   /* fail, if no server or a domain for a DNS-SRV lookup is specified */
@@ -478,7 +478,7 @@
     errno = ENOENT;
     return NULL;
   }
-  
+
   stun->sh_pri_info.ai_addrlen = 16;
   stun->sh_pri_info.ai_addr = &stun->sh_pri_addr->su_sa;
 
@@ -490,7 +490,7 @@
 
   stun->sh_domain = su_strdup(stun->sh_home, domain);
   stun->sh_dns_lookup = NULL;
-  
+
   if (server) {
     err = stun_atoaddr(stun->sh_home, AF_INET, &stun->sh_pri_info, server);
     if (err < 0) {
@@ -512,16 +512,16 @@
   /* initialize username and password */
   stun_init_buffer(&stun->sh_username);
   stun_init_buffer(&stun->sh_passwd);
-  
+
   stun->sh_nattype = stun_nat_unknown;
-  
+
   /* initialize random number generator */
   srand(time(NULL));
- 
+
   return stun;
 }
 
-/** 
+/**
  * Performs shared secret request/response processing.
  * Result will be trigged in STUN handle callback (state
  * one of stun_tls_*).
@@ -549,13 +549,13 @@
 
   if (!sh->sh_pri_addr[0].su_port) {
     /* no STUN server address, perform a DNS-SRV lookup */
-   
+
     ta_list ta;
     ta_start(ta, tag, value);
     SU_DEBUG_5(("Delaying STUN shared-secret req. for DNS-SRV query.\n"));
     err = priv_dns_queue_action(sh, stun_action_tls_query, sdf, magic, ta_tags(ta));
     ta_end(ta);
-       
+
     return err;
   }
 
@@ -588,7 +588,7 @@
 
   /* Do an asynchronous connect(). Three error codes are ok,
    * others cause return -1. */
-  if (connect(s, (struct sockaddr *) &sh->sh_pri_addr, 
+  if (connect(s, (struct sockaddr *) &sh->sh_pri_addr,
 	      ai->ai_addrlen) == SOCKET_ERROR) {
     err = su_errno();
     if (err != EINPROGRESS && err != EAGAIN && err != EWOULDBLOCK) {
@@ -598,7 +598,7 @@
 
   SU_DEBUG_9(("%s: %s: %s\n", __func__, "connect",
 	      su_strerror(err)));
-  
+
   sd = stun_discovery_create(sh, stun_action_tls_query, sdf, magic);
   sd->sd_socket = s;
   /* req = stun_request_create(sd); */
@@ -650,16 +650,16 @@
 
   /* This is the default */
   req->sr_socket = sd->sd_socket;
-  
+
   req->sr_localinfo.li_addrlen = sizeof(su_sockaddr_t);
   req->sr_localinfo.li_addr = req->sr_local_addr;
-  
+
   /* default timeout for next sendto() */
   req->sr_timeout = STUN_SENDTO_TIMEOUT;
   req->sr_retry_count = 0;
   /* req->sr_action = action; */
   req->sr_request_mask = 0;
-  
+
   req->sr_msg = calloc(sizeof(stun_msg_t), 1);
 
   req->sr_state = stun_req_discovery_init;
@@ -706,9 +706,9 @@
 }
 
 
-/** Destroy a STUN client */ 
+/** Destroy a STUN client */
 void stun_handle_destroy(stun_handle_t *sh)
-{ 
+{
   stun_discovery_t *sd = NULL, *kill = NULL;
   stun_request_t *a, *b;
 
@@ -753,7 +753,7 @@
 
 /** Create wait object and register it to the handle callback */
 static
-int assign_socket(stun_discovery_t *sd, su_socket_t s, int register_socket) 
+int assign_socket(stun_discovery_t *sd, su_socket_t s, int register_socket)
 {
   stun_handle_t *sh = sd->sd_handle;
   int events;
@@ -763,7 +763,7 @@
   socklen_t sulen;
   char addr[SU_ADDRSIZE];
   int err;
-  
+
   su_wait_t wait[1] = { SU_WAIT_INIT };
 
   enter;
@@ -806,7 +806,7 @@
 #endif
 
     if ((err = bind(s, &su->su_sa, sulen)) < 0) {
-      SU_DEBUG_3(("%s: bind(%s:%u): %s\n",  __func__, 
+      SU_DEBUG_3(("%s: bind(%s:%u): %s\n",  __func__,
 		  su_inet_ntop(su->su_family, SU_ADDR(su), addr, sizeof(addr)),
 		  (unsigned) ntohs(su->su_port),
 		  su_strerror(su_errno())));
@@ -867,13 +867,13 @@
 
       memcpy(su, li->li_addr, *return_len = li->li_addrlen);
 
-      SU_DEBUG_3(("%s: using local address %s\n", __func__, 
+      SU_DEBUG_3(("%s: using local address %s\n", __func__,
 		  su_inet_ntop(family, SU_ADDR(su), addr, sizeof(addr))));
       break;
     }
 
     su_freelocalinfo(res);
-    
+
     if (!li) {			/* Not found */
       return STUN_ERROR(error, su_getlocalinfo);
     }
@@ -898,13 +898,13 @@
   if (res == 0 && udp_target) {
     /* XXX: assumption that same host and port used for UDP/TLS */
     stun_atoaddr(sh->sh_home, AF_INET, &sh->sh_pri_info, udp_target);
-    
-    if (udp_port) 
+
+    if (udp_port)
       sh->sh_pri_addr[0].su_port = htons(udp_port);
     else
       sh->sh_pri_addr[0].su_port = htons(STUN_DEFAULT_PORT);
 
-    /* step: now that server address is known, continue 
+    /* step: now that server address is known, continue
      *       the pending action */
 
     SU_DEBUG_5(("STUN server address found, running queue actions (%d).\n",
@@ -918,15 +918,15 @@
     case stun_action_binding_request:
       stun_bind(sh, sh->sh_dns_pend_cb, sh->sh_dns_pend_ctx, TAG_NEXT(sh->sh_dns_pend_tags));
       break;
-      
+
     case stun_action_test_lifetime:
       stun_test_lifetime(sh, sh->sh_dns_pend_cb, sh->sh_dns_pend_ctx, TAG_NEXT(sh->sh_dns_pend_tags));
       break;
-      
+
     case stun_action_test_nattype:
       stun_test_nattype(sh, sh->sh_dns_pend_cb, sh->sh_dns_pend_ctx, TAG_NEXT(sh->sh_dns_pend_tags));
       break;
-      
+
     default:
       SU_DEBUG_5(("Warning: unknown pending STUN DNS-SRV action.\n"));
     }
@@ -963,7 +963,7 @@
       sh->sh_dns_lookup = stun_dns_lookup((stun_magic_t*)sh, sh->sh_root, priv_lookup_cb, sh->sh_domain);
       ta_start(ta, tag, value);
       assert(sh->sh_dns_pend_tags == NULL);
-      sh->sh_dns_pend_tags = tl_tlist(sh->sh_home, 
+      sh->sh_dns_pend_tags = tl_tlist(sh->sh_home,
 				      ta_tags(ta));
       ta_end(ta);
       sh->sh_dns_pend_cb = sdf;
@@ -974,7 +974,7 @@
 
     return 0;
   }
-  
+
   return -1;
 }
 
@@ -988,17 +988,17 @@
   return res;
 }
 
-/** 
+/**
  * Performs a STUN Binding Discovery (see RFC3489/3489bis) process
  *
- * To integrity protect the discovery process, first call 
+ * To integrity protect the discovery process, first call
  * stun_request_shared_secret() on the handle 'sh'.
  *
  * If STUNTAG_REGISTER_SOCKET() is omitted, or set to false, the
  * client is responsible for socket i/o. Other stun module will
  * perform the whole discovery process and return the results
  * via callback 'sdf'.
- * 
+ *
  * @param sh       pointer to valid stun handle
  * @param sdf      callback to signal process progress
  * @param magic    context pointer attached to 'sdf'
@@ -1011,16 +1011,16 @@
  * @return
  * On success, zero is returned.  Upon error, -1 is returned, and @e errno is
  * set appropriately.
- * 
+ *
  * @ERRORS
  * @ERROR EFAULT          An invalid address is given as argument
  * @ERROR EPROTONOSUPPORT Not a UDP socket.
  * @ERROR EINVAL          The socket is already bound to an address.
- * @ERROR EACCESS   	  The address is protected, and the user is not 
+ * @ERROR EACCESS   	  The address is protected, and the user is not
  *                  	  the super-user.
  * @ERROR ENOTSOCK  	  Argument is a descriptor for a file, not a socket.
- * @ERROR EAGAIN          Operation in progress. Application should call 
- *                        stun_bind() again when there is data available on 
+ * @ERROR EAGAIN          Operation in progress. Application should call
+ *                        stun_bind() again when there is data available on
  *                        the socket.
  */
 int stun_bind(stun_handle_t *sh,
@@ -1034,7 +1034,7 @@
   stun_discovery_t *sd = NULL;
   ta_list ta;
   int s_reg = 0;
-  
+
   enter;
 
   if (sh == NULL)
@@ -1077,7 +1077,7 @@
 }
 
 
-/** 
+/**
  * Returns the address of the public binding allocated by the NAT.
  *
  * In case of multiple on path NATs, the binding allocated by
@@ -1091,7 +1091,7 @@
 			       socklen_t *return_addrlen)
 {
   socklen_t siz;
-  
+
   enter;
 
   assert(sd && addr);
@@ -1105,7 +1105,7 @@
     *return_addrlen = siz;
 
   memcpy(addr, sd->sd_addr_seen_outside, siz);
-  
+
   return 0;
 }
 
@@ -1149,7 +1149,7 @@
 
   sh = sd->sd_handle;
 
-  if (sd->sd_timer) 
+  if (sd->sd_timer)
     su_timer_destroy(sd->sd_timer), sd->sd_timer = NULL;
 
   /* if we are in the queue*/
@@ -1163,12 +1163,12 @@
 }
 
 /**
- * Initiates STUN discovery process to find out NAT 
- * characteristics. 
+ * Initiates STUN discovery process to find out NAT
+ * characteristics.
  *
- * Process partly follows the algorithm defined in RFC3489 section 
+ * Process partly follows the algorithm defined in RFC3489 section
  * 10.1. Due the known limitations of RFC3489, some of the tests
- * are done. 
+ * are done.
  *
  * Note: does not support STUNTAG_DOMAIN() even if specified to
  * stun_handle_init().
@@ -1198,13 +1198,13 @@
 
   if (!sh->sh_pri_addr[0].su_port) {
     /* no STUN server address, perform a DNS-SRV lookup */
-   
+
     ta_list ta;
     ta_start(ta, tag, value);
     SU_DEBUG_5(("Delaying STUN get-nat-type req. for DNS-SRV query.\n"));
     err = priv_dns_queue_action(sh, stun_action_test_nattype, sdf, magic, ta_tags(ta));
     ta_end(ta);
-       
+
     return err;
   }
 
@@ -1238,10 +1238,10 @@
   destination = (su_sockaddr_t *) sd->sd_pri_addr;
 
   req = stun_request_create(sd);
-  if (stun_make_binding_req(sh, req, req->sr_msg, 
-			    STUNTAG_CHANGE_IP(0), 
+  if (stun_make_binding_req(sh, req, req->sr_msg,
+			    STUNTAG_CHANGE_IP(0),
 			    STUNTAG_CHANGE_PORT(0),
-			    TAG_END()) < 0) 
+			    TAG_END()) < 0)
     return -1;
 
   err = stun_send_binding_request(req, destination);
@@ -1253,10 +1253,10 @@
   /* Same Public IP and port, Test III, server ip 0 or 1 should be
      the same */
   req = stun_request_create(sd);
-  if (stun_make_binding_req(sh, req, req->sr_msg, 
-			    STUNTAG_CHANGE_IP(0), 
+  if (stun_make_binding_req(sh, req, req->sr_msg,
+			    STUNTAG_CHANGE_IP(0),
 			    STUNTAG_CHANGE_PORT(1),
-			    TAG_END()) < 0) 
+			    TAG_END()) < 0)
     return -1;
 
   err = stun_send_binding_request(req, destination);
@@ -1267,12 +1267,12 @@
   req = NULL;
 
   req = stun_request_create(sd);
-  if (stun_make_binding_req(sh, req, req->sr_msg, 
-			    STUNTAG_CHANGE_IP(1), 
+  if (stun_make_binding_req(sh, req, req->sr_msg,
+			    STUNTAG_CHANGE_IP(1),
 			    STUNTAG_CHANGE_PORT(1),
-			    TAG_END()) < 0) 
+			    TAG_END()) < 0)
     return -1;
-  
+
   err = stun_send_binding_request(req, destination);
   if (err < 0) {
     stun_free_message(req->sr_msg);
@@ -1286,7 +1286,7 @@
  *******************************************************************/
 
 #if HAVE_OPENSSL
-static 
+static
 int stun_tls_callback(su_root_magic_t *m, su_wait_t *w, su_wakeup_arg_t *arg)
 {
   stun_discovery_t *sd = arg;
@@ -1349,7 +1349,7 @@
       stun_free_buffer(&msg_req->enc_buf);
       return -1;
     }
-    
+
     /* openssl initiation */
     SSLeay_add_ssl_algorithms();
     SSL_load_error_strings();
@@ -1361,13 +1361,13 @@
       stun_free_buffer(&msg_req->enc_buf);
       return -1;
     }
-    
+
     if (SSL_CTX_set_cipher_list(ctx, "AES128-SHA") == 0) {
       STUN_ERROR(errno, SSL_CTX_set_cipher_list);
       stun_free_buffer(&msg_req->enc_buf);
       return -1;
     }
-    
+
     /* Start TLS negotiation */
     ssl = SSL_new(ctx);
     self->sh_ssl = ssl;
@@ -1406,7 +1406,7 @@
 
       return -1;
     }
-    
+
     /* Inform application about the progress  */
     sd->sd_state = stun_tls_writing;
     /* self->sh_callback(self->sh_context, self, self->sh_state); */
@@ -1424,16 +1424,16 @@
 		      sd->sd_socket, events);
 
     SU_DEBUG_3(("TLS connection using %s\n", SSL_get_cipher(ssl)));
-    
-    server_cert = SSL_get_peer_certificate(ssl); 
+
+    server_cert = SSL_get_peer_certificate(ssl);
     if(server_cert) {
       SU_DEBUG_3(("\t subject: %s\n", X509_NAME_oneline(X509_get_subject_name(server_cert), 0, 0)));
       SU_DEBUG_3(("\t issuer: %s\n", X509_NAME_oneline(X509_get_issuer_name(server_cert), 0, 0)));
     }
     X509_free(server_cert);
-    
+
     z = SSL_write(ssl, msg_req->enc_buf.data, msg_req->enc_buf.size);
-    
+
     if (z < 0) {
       err = SSL_get_error(ssl, z);
       if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE)
@@ -1484,7 +1484,7 @@
     SSL_CTX_free(self->sh_ctx), ctx = NULL;
 
     stun_free_buffer(&msg_req->enc_buf);
-  
+
     /* process response */
     if (stun_parse_message(resp) < 0) {
       perror("stun_parse_message");
@@ -1505,17 +1505,17 @@
 
     case SHARED_SECRET_ERROR_RESPONSE:
       if (stun_process_error_response(resp) < 0) {
-	SU_DEBUG_5(("Error in Shared Secret Error Response.\n")); 
+	SU_DEBUG_5(("Error in Shared Secret Error Response.\n"));
       }
       stun_free_buffer(&resp->enc_buf);
       return -1;
-    
+
       break;
 
     default:
       break;
     }
-    
+
     su_wait_destroy(w);
     su_root_deregister(self->sh_root, sd->sd_index);
     sd->sd_index = -1; /* mark index as deregistered */
@@ -1539,7 +1539,7 @@
 
 
 #if HAVE_OPENSSL
-static void stun_tls_connect_timer_cb(su_root_magic_t *magic, 
+static void stun_tls_connect_timer_cb(su_root_magic_t *magic,
 				      su_timer_t *t,
 				      su_timer_arg_t *arg)
 {
@@ -1562,7 +1562,7 @@
 
   su_root_deregister(sh->sh_root, sd->sd_index);
   sd->sd_index = -1; /* mark index as deregistered */
-  
+
   sd->sd_state = stun_tls_connection_timeout;
   sd->sd_callback(sd->sd_magic, sh, sd, sd->sd_action, sd->sd_state);
 
@@ -1577,7 +1577,7 @@
 int stun_make_sharedsecret_req(stun_msg_t *msg)
 {
 
-  int i, len; 
+  int i, len;
   uint16_t tmp;
 
   /* compose header */
@@ -1586,17 +1586,17 @@
 				stun_send_message */
   for (i = 0; i < STUN_TID_BYTES; i++) {
     msg->stun_hdr.tran_id[i] = (1 + rand() % RAND_MAX_16);
-  } 
-  
+  }
+
   /* no buffer assigned yet */
   stun_init_buffer(&msg->enc_buf);
-  
+
   msg->enc_buf.data = malloc(20);
   msg->enc_buf.size = 20;
 
   tmp = htons(msg->stun_hdr.msg_type);
   len = 0;
-  
+
   memcpy(msg->enc_buf.data, &tmp, sizeof(tmp));
   len+=sizeof(tmp);
 
@@ -1606,7 +1606,7 @@
 
   memcpy(msg->enc_buf.data+len, msg->stun_hdr.tran_id, STUN_TID_BYTES);
   len+=STUN_TID_BYTES;
-    
+
   return 0;
 }
 
@@ -1695,12 +1695,12 @@
   binding_response.enc_buf.size = dgram_len;
   memcpy(binding_response.enc_buf.data, dgram, dgram_len);
 
-  
+
   SU_DEBUG_5(("%s: response from server %s:%u\n", __func__,
 	      su_inet_ntop(recv.su_family, SU_ADDR(&recv), addr, sizeof(addr)),
 	      ntohs(recv.su_port)));
 
-  debug_print(&binding_response.enc_buf);      
+  debug_print(&binding_response.enc_buf);
 
   /* Parse here the incoming message. */
   if (stun_parse_message(&binding_response) < 0) {
@@ -1722,13 +1722,13 @@
 
     msg = &binding_response;
     for (a = &msg->stun_attr; *a;) {
-      
+
       if ((*a)->pattr)
 	free((*a)->pattr);
-      
+
       if ((*a)->enc_buf.data)
 	free((*a)->enc_buf.data);
-      
+
       b = *a;
       b = b->next;
       free(*a);
@@ -1792,7 +1792,7 @@
     req->sr_state = stun_req_dispose_me;
     break;
   }
-  
+
   return 0;
 }
 
@@ -1837,14 +1837,14 @@
     }
 
     break;
-    
+
   case BINDING_ERROR_RESPONSE:
   default:
     if (stun_process_error_response(binding_response) < 0) {
       SU_DEBUG_3(("%s: Error in Binding Error Response.\n", __func__));
     }
     req->sr_state = stun_req_error;
-      
+
     break;
   }
 
@@ -1852,7 +1852,7 @@
 
 }
 
-static void stun_test_lifetime_timer_cb(su_root_magic_t *magic, 
+static void stun_test_lifetime_timer_cb(su_root_magic_t *magic,
 				       su_timer_t *t,
 				       su_timer_arg_t *arg)
 {
@@ -1921,7 +1921,7 @@
 
     new = stun_request_create(sd);
     new->sr_from_y = 0;
-    if (stun_make_binding_req(sh, new, new->sr_msg, 0, 0) < 0) 
+    if (stun_make_binding_req(sh, new, new->sr_msg, 0, 0) < 0)
       return -1;
 
     destination = (su_sockaddr_t *) sd->sd_pri_addr;
@@ -1957,16 +1957,16 @@
   li = &req->sr_localinfo;
   sa = req->sr_local_addr;
   stun_free_message(binding_response);
-  
+
   /* Destroy me with the bad mofo timer */
   req->sr_state = stun_req_dispose_me, req = NULL;
-  
+
   new = stun_request_create(sd);
   /* Use sockfdy */
   new->sr_socket = sockfdy;
   new->sr_from_y = 1;
 
-  if (stun_make_binding_req(sh, new, new->sr_msg, 0, 0) < 0) 
+  if (stun_make_binding_req(sh, new, new->sr_msg, 0, 0) < 0)
     return -1;
 
   stun_add_response_address(new->sr_msg, (struct sockaddr_in *) sa);
@@ -1999,7 +1999,7 @@
 
   sd->sd_state = stun_discovery_done;
   req->sr_state = stun_req_dispose_me;
-  
+
   if (sd->sd_callback)
     sd->sd_callback(sd->sd_magic, sh, sd, action, sd->sd_state);
 
@@ -2016,7 +2016,7 @@
   int af;
   char addr[SU_ADDRSIZE];
 
-  SU_DEBUG_5(("%s: checking if %s is a local address.\n", __func__, 
+  SU_DEBUG_5(("%s: checking if %s is a local address.\n", __func__,
 	      su_inet_ntop(AF_INET, SU_ADDR(su), addr, sizeof(addr))));
 
   hints->li_family = af = su->su_family;
@@ -2028,15 +2028,15 @@
   for (li = res; li; li = li->li_next) {
     if (li->li_family != af)
       continue;
-      
+
     if (memcmp(SU_ADDR(su), SU_ADDR(li->li_addr), SU_ADDRLEN(su)) == 0) {
       SU_DEBUG_5(("%s: found matching local address\n", __func__));
       break;
     }
 
-    SU_DEBUG_9(("%s: skipping local address %s.\n", __func__, 
+    SU_DEBUG_9(("%s: skipping local address %s.\n", __func__,
 		su_inet_ntop(af, SU_ADDR(li->li_addr), addr, sizeof(addr))));
-  }  
+  }
 
   su_freelocalinfo(res);
 
@@ -2046,9 +2046,9 @@
 /**
  * Helper function for action_determine_nattype().
  */
-static void priv_mark_discovery_done(stun_discovery_t *sd, 
-				     stun_handle_t *sh, 
-				     stun_action_t action, 
+static void priv_mark_discovery_done(stun_discovery_t *sd,
+				     stun_handle_t *sh,
+				     stun_action_t action,
 				     stun_request_t *req)
 {
   sd->sd_state = stun_discovery_done;
@@ -2059,7 +2059,7 @@
 
 /**
  * Handles responses related to the NAT type discovery process.
- * 
+ *
  * The requests for Tests I-III are sent in parallel, so the
  * callback has to keep track of which requests have been received
  * and postpone decisions until enough responses have been processed.
@@ -2095,7 +2095,7 @@
   li = &req->sr_localinfo;
 
   /* check whether the response timed out or not */
-  if (req->sr_state == stun_req_timeout) 
+  if (req->sr_state == stun_req_timeout)
     reply_res = -1;
   else
     reply_res = 1;
@@ -2127,7 +2127,7 @@
        inet_ntoa(li->li_addr->su_sin.sin_addr),
        li->li_addr->su_port)); */
 
-    /* note: check whether MAPPED-ADDRESS address has changed (when 
+    /* note: check whether MAPPED-ADDRESS address has changed (when
      *       sending to a different IP:port -> NAT mapping behaviour) */
     if (su_cmp_sockaddr(sd->sd_addr_seen_outside, li->li_addr) != 0) {
       sd->sd_mapped_addr_match = 0;
@@ -2146,21 +2146,21 @@
     sd->sd_nattype = stun_udp_blocked;
     priv_mark_discovery_done(sd, sh, action, req);
   }
-  /* case 2: mapped address matches our local address 
+  /* case 2: mapped address matches our local address
    *         not behind a NAT, result of test two determinces
    *         whether we are behind a symmetric FW or not */
   else if (sd->sd_first > 0 &&
-	   sd->sd_second && 
+	   sd->sd_second &&
 	   priv_find_matching_localadress(sd->sd_addr_seen_outside)) {
-    if (sd->sd_second > 0) 
+    if (sd->sd_second > 0)
       sd->sd_nattype = stun_open_internet;
     else
       sd->sd_nattype = stun_sym_udp_fw;
     priv_mark_discovery_done(sd, sh, action, req);
   }
-  /* case 3: response ok to Test-II, and behind a NAT 
+  /* case 3: response ok to Test-II, and behind a NAT
    *         do not make conclusions until Test-IV has been scheduled */
-  else if (sd->sd_first > 0 && 
+  else if (sd->sd_first > 0 &&
 	   sd->sd_second > 0 &&
 	   sd->sd_fourth) {
     if (sd->sd_mapped_addr_match == 1)
@@ -2169,28 +2169,28 @@
       sd->sd_nattype = stun_nat_ei_filt_ad_map;
     priv_mark_discovery_done(sd, sh, action, req);
   }
-  /* case 4: tests I-III done, perform IV 
+  /* case 4: tests I-III done, perform IV
    *         see notes below */
-  else if (sd->sd_first > 0 && 
+  else if (sd->sd_first > 0 &&
 	   sd->sd_second &&
 	   sd->sd_third &&
 	   sd->sd_fourth == 0) {
 
-    /* 
+    /*
      * No response received, so we now perform Test IV using the address
-     * learnt from response to Test-I. 
-     * 
+     * learnt from response to Test-I.
+     *
      * Unfortunately running  this test will potentially affect
      * results of a subsequent Test-II (depends on NAT binding timeout
-     * values). To get around this, the STUN server would ideally have 
+     * values). To get around this, the STUN server would ideally have
      * a dedicated IP:port for Test-IV. But within the currents specs,
-     * we need to reuse one of the IP:port addresses already used in 
+     * we need to reuse one of the IP:port addresses already used in
      * Test-II by the STUN server to send us packets.
      */
 
     SU_DEBUG_7(("Sending STUN NAT type Test-IV request to %s.\n",
 	       inet_ntoa(sd->sd_sec_addr[0].su_sin.sin_addr)));
-    
+
     sd->sd_fourth = 2; /* request, -1, 0, 1 reserved for results */
     req->sr_state = stun_req_dispose_me;
     req = stun_request_create(sd);
@@ -2212,13 +2212,13 @@
       action_determine_nattype(req, binding_response);
       return -1;
     }
-    
+
     return 0; /* we don't want to dispose this req */
   }
   /* case 5: no response Test-II, and success with III
    *         the NAT is filtering packets from different IP
    *         do not make conclusions until Test-IV has been scheduled */
-  else if (sd->sd_first > 0 && 
+  else if (sd->sd_first > 0 &&
 	   sd->sd_second < 0 &&
 	   sd->sd_third > 0 &&
 	   sd->sd_fourth) {
@@ -2228,10 +2228,10 @@
       sd->sd_nattype = stun_nat_ad_filt_ad_map;
     priv_mark_discovery_done(sd, sh, action, req);
   }
-  /* case 6: no response to Test-II nor III 
+  /* case 6: no response to Test-II nor III
    *         the NAT is filtering packets from different port
    *         do not make conclusions until Test-IV has been scheduled */
-  else if (sd->sd_first > 0 && 
+  else if (sd->sd_first > 0 &&
 	   sd->sd_second < 0 &&
 	   sd->sd_third < 0 &&
 	   sd->sd_fourth) {
@@ -2249,7 +2249,7 @@
 }
 
 
-static void stun_sendto_timer_cb(su_root_magic_t *magic, 
+static void stun_sendto_timer_cb(su_root_magic_t *magic,
 				 su_timer_t *t,
 				 su_timer_arg_t *arg)
 {
@@ -2269,7 +2269,7 @@
 
   ++req->sr_retry_count;
 
-  /* check if max retry count has been exceeded; or if 
+  /* check if max retry count has been exceeded; or if
    * action type is NAT type check (XXX: the request attributes
    * are not passed correctly to resend function) */
   if (req->sr_retry_count >= sh->sh_max_retries ||
@@ -2283,7 +2283,7 @@
     /* Either the server was dead, address wrong or STUN_UDP_BLOCKED */
     /* sd->sd_nattype = stun_udp_blocked; */
     req->sr_state = stun_req_timeout;
-    
+
     /* If the action is binding request, we are done. If action was
        NAT type determination, process with the state machine. */
     switch (action) {
@@ -2300,11 +2300,11 @@
     case stun_action_test_nattype:
       action_determine_nattype(req, NULL);
       break;
-      
+
     case stun_action_test_lifetime:
       process_test_lifetime(req, NULL);
       break;
-      
+
     case stun_action_keepalive:
       sd->sd_state = stun_discovery_timeout;
 
@@ -2313,7 +2313,7 @@
 	sd->sd_callback(sd->sd_magic, sh, sd, action, sd->sd_state);
 
       stun_keepalive_destroy(sh, sd->sd_socket);
-      
+
       break;
 
     default:
@@ -2338,10 +2338,10 @@
     timeout = req->sr_timeout *= 2;
 
   }
-  
+
   su_timer_set_at(t, stun_sendto_timer_cb, (su_wakeup_arg_t *) req,
 		  su_time_add(su_now(), timeout));
-  
+
   return;
 }
 
@@ -2355,20 +2355,20 @@
  * @return
  * On success, zero is returned.  Upon error, -1 is returned, and @e errno is
  * set appropriately.
- * 
+ *
  * @ERRORS
  * @ERROR EBADF           @a sockfd is not a valid deseriptor.
  * @ERROR EPROTONOSUPPORT @a sockfd is not an UDP socket.
  * @ERROR EINVAL          The socket is already bound to an address.
- * @ERROR EACCESS   	  The address is protected, and the user is not 
+ * @ERROR EACCESS   	  The address is protected, and the user is not
  *                  	  the super-user.
  * @ERROR ENOTSOCK  	  Argument is a descriptor for a file, not a socket.
- * @ERROR EAGAIN          Operation in progress. Application should call 
- *                        stun_bind() again when there is data available on 
+ * @ERROR EAGAIN          Operation in progress. Application should call
+ *                        stun_bind() again when there is data available on
  *                        the socket.
  * @ERROR ETIMEDOUT       Request timed out.
- * 
- */   
+ *
+ */
 static int stun_send_binding_request(stun_request_t *req,
 				     su_sockaddr_t  *srvr_addr)
 {
@@ -2406,9 +2406,9 @@
 			  tag_type_t tag, tag_value_t value, ...)
 {
   int i;
-  stun_attr_t *tmp, **p; 
+  stun_attr_t *tmp, **p;
   int bits = 0;
-  int chg_ip = 0, chg_port = 0; 
+  int chg_ip = 0, chg_port = 0;
 
   ta_list ta;
 
@@ -2422,7 +2422,7 @@
 	  TAG_END());
 
   ta_end(ta);
-  
+
   if (chg_ip)
     bits |= CHG_IP;
   if (chg_port)
@@ -2430,15 +2430,15 @@
 
   if (req)
     req->sr_request_mask = bits;
-  
+
   /* compose header */
   msg->stun_hdr.msg_type = BINDING_REQUEST;
   msg->stun_hdr.msg_len = 0; /* actual len computed by
 				stun_send_message */
   for (i = 0; i < STUN_TID_BYTES; i++) {
     msg->stun_hdr.tran_id[i] = (1 + rand() % RAND_MAX_16);
-  } 
-  
+  }
+
   /* optional attributes:
    * - Response Address
    * - Change Request X
@@ -2463,7 +2463,7 @@
 
   /* USERNAME */
   if (sh->sh_use_msgint &&
-      sh->sh_username.data && 
+      sh->sh_username.data &&
       sh->sh_passwd.data) {
     stun_buffer_t *a_pattr = (stun_buffer_t*)malloc(sizeof(stun_buffer_t));
     tmp = (stun_attr_t *) malloc(sizeof(stun_attr_t));
@@ -2507,7 +2507,7 @@
   /* check message digest if exists */
   switch (msg->stun_hdr.msg_type) {
   case BINDING_RESPONSE:
-    if (stun_process_binding_response(msg) < 0) 
+    if (stun_process_binding_response(msg) < 0)
       return -1;
     break;
   case BINDING_ERROR_RESPONSE:
@@ -2546,7 +2546,7 @@
   }
 
   ec = (stun_attr_errorcode_t *)attr->pattr;
-  
+
   SU_DEBUG_5(("%s: Received Binding Error Response:\n", __func__));
   SU_DEBUG_5(("%s: Error: %d %s\n", __func__, ec->code, ec->phrase));
 
@@ -2554,7 +2554,7 @@
 }
 
 /**
- * Sets values for USERNAME and PASSWORD stun fields 
+ * Sets values for USERNAME and PASSWORD stun fields
  * for the handle.
  */
 int stun_set_uname_pwd(stun_handle_t *sh,
@@ -2572,7 +2572,7 @@
   }
   else
     return -1;
-  
+
   sh->sh_passwd.data = malloc(len_pwd);
   if (sh->sh_passwd.data) {
     memcpy(sh->sh_passwd.data, pwd, len_pwd);
@@ -2582,13 +2582,13 @@
     return -1;
 
   sh->sh_use_msgint = 1; /* turn on message integrity ussage */
-  
+
   return 0;
 }
 
-  
+
 /**
- * Converts character address format to sockaddr_in 
+ * Converts character address format to sockaddr_in
  */
 int stun_atoaddr(su_home_t *home,
 		 int ai_family,
@@ -2608,7 +2608,7 @@
   dstaddr = (su_sockaddr_t *) info->ai_addr;
 
   /* note: works only for IPv4 */
-  if (ai_family != AF_INET) 
+  if (ai_family != AF_INET)
     return -1;
 
   hints->ai_family = ai_family;
@@ -2624,7 +2624,7 @@
     host = tmp;
     ++port;
   }
-    
+
   err = su_getaddrinfo(host, NULL, hints, &res);
   if (err == 0) {
     for (ai = res; ai; ai = ai->ai_next) {
@@ -2637,12 +2637,12 @@
       info->ai_protocol = ai->ai_protocol;
       info->ai_addrlen = ai->ai_addrlen;
       info->ai_canonname = su_strdup(home, host);
-      
+
       memcpy(&dstaddr->su_sa, res->ai_addr, sizeof(struct sockaddr));
       break;
     }
 
-    if (port) 
+    if (port)
       dstaddr->su_port = htons(atoi(port));
     else
       dstaddr->su_port = htons(STUN_DEFAULT_PORT);
@@ -2659,7 +2659,7 @@
 }
 
 /**
- * Initiates STUN discovery process to find out NAT 
+ * Initiates STUN discovery process to find out NAT
  * binding life-time settings.
  *
  * @TAGS
@@ -2693,13 +2693,13 @@
 
   if (!sh->sh_pri_addr[0].su_port) {
     /* no STUN server address, perform a DNS-SRV lookup */
-   
+
     ta_list ta;
     ta_start(ta, tag, value);
     SU_DEBUG_5(("Delaying STUN get-lifetime req. for DNS-SRV query.\n"));
     err = priv_dns_queue_action(sh, stun_action_test_lifetime, sdf, magic, ta_tags(ta));
     ta_end(ta);
-       
+
     return err;
   }
 
@@ -2768,7 +2768,7 @@
 
   SU_DEBUG_1(("%s: determining binding life time, this may take a while.\n", __func__));
 
-  if (stun_make_binding_req(sh, req, req->sr_msg, 0, 0) < 0) 
+  if (stun_make_binding_req(sh, req, req->sr_msg, 0, 0) < 0)
     return -1;
 
   err = stun_send_binding_request(req, destination);
@@ -2794,7 +2794,7 @@
   addr = malloc(sizeof(stun_attr_sockaddr_t));
   memcpy(addr, mapped_addr, sizeof(stun_attr_sockaddr_t));
   tmp->pattr = addr;
-  
+
   if (req->stun_attr == NULL) {
     tmp->next = NULL;
   }
@@ -2808,7 +2808,7 @@
 
 
 /**
- * Determines if the message is STUN message (-1 if not stun). 
+ * Determines if the message is STUN message (-1 if not stun).
  */
 int stun_msg_is_keepalive(uint16_t data)
 {
@@ -2826,7 +2826,7 @@
 }
 
 /**
- * Determines length of STUN message (0 (-1?) if not stun). 
+ * Determines length of STUN message (0 (-1?) if not stun).
  */
 int stun_message_length(void *data, isize_t len, int end_of_message)
 {
@@ -2851,7 +2851,7 @@
 }
 
 /** Process incoming message */
-int stun_process_message(stun_handle_t *sh, su_socket_t s, 
+int stun_process_message(stun_handle_t *sh, su_socket_t s,
 			 su_sockaddr_t *sa, socklen_t salen,
 			 void *data, isize_t len)
 {
@@ -2866,8 +2866,8 @@
   /* Message received. */
   msg.enc_buf.data = data;
   msg.enc_buf.size = (unsigned)len;
- 
-  debug_print(&msg.enc_buf);      
+
+  debug_print(&msg.enc_buf);
 
   /* Parse here the incoming message. */
   if (stun_parse_message(&msg) < 0) {
@@ -2904,8 +2904,8 @@
 }
 
 
-/** 
- * Creates a keepalive dispatcher for bound SIP sockets 
+/**
+ * Creates a keepalive dispatcher for bound SIP sockets
  */
 int stun_keepalive(stun_handle_t *sh,
 		   su_sockaddr_t *sa,
@@ -2937,7 +2937,7 @@
   /* If there already is keepalive associated with the given socket,
    * destroy it. */
   stun_keepalive_destroy(sh, s);
-  
+
   sd = stun_discovery_create(sh, action, NULL, NULL); /* XXX --
 							 specify last
 							 params if
@@ -2948,17 +2948,17 @@
 
   req = stun_request_create(sd);
 
-  SU_DEBUG_3(("%s: Starting to send STUN keepalives to %s:%u\n", __func__, 
+  SU_DEBUG_3(("%s: Starting to send STUN keepalives to %s:%u\n", __func__,
 	      su_inet_ntop(sa->su_family, SU_ADDR(sa), addr, sizeof(addr)),
 	      (unsigned) ntohs(sa->su_port)));
-  
+
   if (stun_make_binding_req(sh, req, req->sr_msg, 0, 0) < 0 ||
       stun_send_binding_request(req, sa) < 0) {
     stun_request_destroy(req);
     stun_discovery_destroy(sd);
     return -1;
   }
-  
+
   sd->sd_timer = su_timer_create(su_root_task(sh->sh_root), timeout);
   su_timer_set(sd->sd_timer, stun_keepalive_timer_cb, (su_wakeup_arg_t *) sd);
 
@@ -2966,7 +2966,7 @@
 }
 
 /** Send SIP keepalives */
-static void stun_keepalive_timer_cb(su_root_magic_t *magic, 
+static void stun_keepalive_timer_cb(su_root_magic_t *magic,
 				    su_timer_t *t,
 				    su_timer_arg_t *arg)
 {
@@ -2984,14 +2984,14 @@
     return;
 
   req = stun_request_create(sd);
-  
+
   if (stun_make_binding_req(sh, req, req->sr_msg, 0, 0) < 0 ||
       stun_send_binding_request(req, destination) < 0) {
     stun_request_destroy(req);
     stun_discovery_destroy(sd);
     return;
   }
-  
+
   sd->sd_timer = su_timer_create(su_root_task(sh->sh_root), timeout);
   su_timer_set(sd->sd_timer, stun_keepalive_timer_cb, (su_wakeup_arg_t *) sd);
 
@@ -3088,9 +3088,9 @@
       break;
 
     default:
-      return -1;    
+      return -1;
     }
-  }   
+  }
 
   tmp = s_attr;
   tmp->attr_type = SOURCE_ADDRESS;
@@ -3115,10 +3115,10 @@
 
   stun_send_message(s, &to_addr, &resp, NULL);
   return 0;
-} 
+}
 
 /**
- * Returns socket attached to the discovery object 
+ * Returns socket attached to the discovery object
  */
 su_socket_t stun_discovery_get_socket(stun_discovery_t *sd)
 {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_common.c	Tue Dec 16 13:05:22 2008
@@ -24,13 +24,13 @@
 
 /**@internal
  * @file stun_common.c
- * @brief 
- * 
+ * @brief
+ *
  * @author Tat Chan <Tat.Chan at nokia.com>
  * @author Kai Vehmanen <kai.vehmanen at nokia.com>
- *  
+ *
  * @date Created: Fri Oct  3 13:40:41 2003 ppessi
- * 
+ *
  */
 
 #include "config.h"
@@ -88,7 +88,7 @@
   /* parse header first */
   p = msg->enc_buf.data;
   msg->stun_hdr.msg_type = get16(p, 0);
-  msg->stun_hdr.msg_len = get16(p, 2); 
+  msg->stun_hdr.msg_len = get16(p, 2);
   memcpy(msg->stun_hdr.tran_id, p + 4, STUN_TID_BYTES);
 
   SU_DEBUG_5(("%s: Parse STUN message: Length = %d\n", __func__,
@@ -120,7 +120,7 @@
   attr_type = get16(p, 0);
   len = get16(p, 2);
 
-  SU_DEBUG_5(("%s: received attribute: Type %02X, Length %d - %s\n", 
+  SU_DEBUG_5(("%s: received attribute: Type %02X, Length %d - %s\n",
 	      __func__, attr_type, len, stun_attr_phrase(attr_type)));
 
   if (attr_type > STUN_A_LAST_MANDATORY && attr_type < STUN_A_OPTIONAL) {
@@ -197,8 +197,8 @@
   return len+4;
 }
 
-int stun_parse_attr_address(stun_attr_t *attr, 
-			    const unsigned char *p, 
+int stun_parse_attr_address(stun_attr_t *attr,
+			    const unsigned char *p,
 			    unsigned len)
 {
   su_sockaddr_t *addr;
@@ -398,7 +398,7 @@
   /* note: align the phrase len (see RFC3489:11.2.9) */
   padded = phrase_len + (phrase_len % 4 == 0 ? 0 : 4 - (phrase_len % 4));
 
-  /* note: error-code has four octets of headers plus the 
+  /* note: error-code has four octets of headers plus the
    *       reason field -> len+4 octets */
   if (stun_encode_type_len(attr, (uint16_t)(padded + 4)) < 0) {
     return -1;
@@ -409,7 +409,7 @@
     attr->enc_buf.data[6] = class;
     attr->enc_buf.data[7] = num;
     /* note: 4 octets of TLV header and 4 octets of error-code header */
-    memcpy(attr->enc_buf.data+8, error->phrase, 
+    memcpy(attr->enc_buf.data+8, error->phrase,
 	   phrase_len);
     memset(attr->enc_buf.data + 8 + phrase_len, 0, padded - phrase_len);
   }
@@ -491,8 +491,8 @@
   return 0;
 }
 
-/** 
- * Validate the message integrity based on given 
+/**
+ * Validate the message integrity based on given
  * STUN password 'pwd'. The received content should be
  * in msg->enc_buf.
  */
@@ -506,7 +506,7 @@
   unsigned char *padded_text;
 #endif
 
-  /* password NULL so shared-secret not established and 
+  /* password NULL so shared-secret not established and
      messege integrity checks can be skipped */
   if (pwd->data == NULL)
     return 0;
@@ -610,7 +610,7 @@
 
 
 int stun_send_message(su_socket_t s, su_sockaddr_t *to_addr,
-		      stun_msg_t *msg, stun_buffer_t *pwd) 
+		      stun_msg_t *msg, stun_buffer_t *pwd)
 {
   int err;
   char ipaddr[SU_ADDRSIZE + 2];
@@ -618,7 +618,7 @@
 
   stun_encode_message(msg, pwd);
 
-  err = su_sendto(s, msg->enc_buf.data, msg->enc_buf.size, 0, 
+  err = su_sendto(s, msg->enc_buf.data, msg->enc_buf.size, 0,
 		  to_addr, SU_SOCKADDR_SIZE(to_addr));
 
   free(msg->enc_buf.data), msg->enc_buf.data = NULL;
@@ -648,9 +648,9 @@
   }
   else
     STUN_ERROR(errno, sendto);
-  
+
   return err;
-}  
+}
 
 
 /** Send a STUN message.
@@ -673,7 +673,7 @@
       case MAPPED_ADDRESS:
       case SOURCE_ADDRESS:
       case CHANGED_ADDRESS:
-      case REFLECTED_FROM:	
+      case REFLECTED_FROM:
 #ifdef USE_TURN
       case TURN_ALTERNATE_SERVER:
       case TURN_DESTINATION_ADDRESS:
@@ -717,7 +717,7 @@
     msg->stun_hdr.msg_len = len;
     buf_len = 20 + msg->stun_hdr.msg_len;
     buf = (unsigned char *) malloc(buf_len);
-    
+
     /* convert to binary format for transmission */
     set16(buf, 0, msg->stun_hdr.msg_type);
     set16(buf, 2, msg->stun_hdr.msg_len);
@@ -730,7 +730,7 @@
     while(attr) {
       /* attach only if enc_buf is not null */
       if(attr->enc_buf.data && attr->attr_type != MESSAGE_INTEGRITY) {
-	memcpy(buf+len, (void *)attr->enc_buf.data, attr->enc_buf.size); 
+	memcpy(buf+len, (void *)attr->enc_buf.data, attr->enc_buf.size);
 	len += attr->enc_buf.size;
       }
       attr = attr->next;
@@ -742,10 +742,10 @@
 	free(buf);
 	return -1;
       }
-      memcpy(buf+len, (void *)msg_int->enc_buf.data, 
+      memcpy(buf+len, (void *)msg_int->enc_buf.data,
 	     msg_int->enc_buf.size);
     }
-    
+
     /* save binary buffer for future reference */
     if (msg->enc_buf.data)
       free(msg->enc_buf.data);
@@ -782,10 +782,10 @@
   sa = &temp->su_sin;
 
   address_size = strlen(inet_ntoa(sa->sin_addr));
-  
+
   local_ip_address = malloc(address_size + 1);
   strcpy(local_ip_address, (char *) inet_ntoa(sa->sin_addr)); /* otherwise? */
-    
+
   su_freelocalinfo(li);
 
   return local_ip_address;
@@ -807,7 +807,7 @@
   case UNKNOWN_ATTRIBUTES: return "UNKNOWN-ATTRIBUTES";
   case REFLECTED_FROM: return "REFLECTED-FROM";
   case STUN_A_ALTERNATE_SERVER:
-  case STUN_A_ALTERNATE_SERVER_DEP: 
+  case STUN_A_ALTERNATE_SERVER_DEP:
     return "ALTERNATE-SERVER";
   case STUN_A_REALM: return "REALM";
   case STUN_A_NONCE: return "NONCE";

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_dns.c	Tue Dec 16 13:05:22 2008
@@ -23,13 +23,13 @@
  */
 
 /**@internal
- * @file stun_dns.c 
+ * @file stun_dns.c
  * @brief Functins to discover STUN server address using DNS-SRV.
  *
- * Refs: 
+ * Refs:
  *   - RFC3489/3489bis
  *   - RFC2782
- * 
+ *
  * @author Kai Vehmanen <kai.vehmanen at nokia.com>
  */
 
@@ -100,16 +100,16 @@
 	self->stun_tcp_target = su_strdup(self->stun_home, rr->srv_target);
 	self->stun_tcp_port = rr->srv_port;
 	self->stun_state |= stun_dns_tls;
-	SU_DEBUG_5(("%s: stun (tcp) for domain %s is at %s:%u.\n", 
-		    __func__, rr->srv_record->r_name, self->stun_tcp_target, self->stun_tcp_port)); 
+	SU_DEBUG_5(("%s: stun (tcp) for domain %s is at %s:%u.\n",
+		    __func__, rr->srv_record->r_name, self->stun_tcp_target, self->stun_tcp_port));
       }
       else if ((self->stun_state & stun_dns_udp) == 0 &&
 	       strncmp(rr->srv_record->r_name, udp_name, strlen(udp_name)) == 0) {
 	self->stun_udp_target = su_strdup(self->stun_home, rr->srv_target);
 	self->stun_udp_port = rr->srv_port;
 	self->stun_state |= stun_dns_udp;
-	SU_DEBUG_5(("%s: stun (udp) for domain %s is at %s:%u.\n", 
-		    __func__, rr->srv_record->r_name, self->stun_udp_target, self->stun_udp_port)); 
+	SU_DEBUG_5(("%s: stun (udp) for domain %s is at %s:%u.\n",
+		    __func__, rr->srv_record->r_name, self->stun_udp_target, self->stun_udp_port));
       }
     }
   }
@@ -130,18 +130,18 @@
  * The result will be delivered asynchronously in the
  * 'func' callback. 'root' will be used as the event loop.
  */
-stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic, 
+stun_dns_lookup_t *stun_dns_lookup(stun_magic_t *magic,
 				   su_root_t *root,
-				   stun_dns_lookup_f func, 
+				   stun_dns_lookup_f func,
 				   const char *domain)
 {
   stun_dns_lookup_t *self;
   sres_query_t *query;
 
-  if (!domain || 
+  if (!domain ||
       strlen(domain) + strlen(STUN_SRV_SERVICE_UDP ".") + 1>= SRES_MAXDNAME)
     return NULL;
-  
+
   self = su_home_new(sizeof(stun_dns_lookup_t));
 
   /* see nta.c:outgoing_answer_srv() */
@@ -167,7 +167,7 @@
   else {
     su_free(NULL, self), self = NULL;
   }
-  
+
   return self;
 }
 
@@ -192,7 +192,7 @@
  * @param port location where to store port number
  *
  * @return 0 on success, non-zero otherwise
- */ 
+ */
 int stun_dns_lookup_udp_addr(stun_dns_lookup_t *self, const char **target, uint16_t *port)
 {
   int result = -1;
@@ -215,7 +215,7 @@
  * @param port location where to store port number
  *
  * @return 0 on success, non-zero otherwise
- */ 
+ */
 int stun_dns_lookup_tcp_addr(stun_dns_lookup_t *self, const char **target, uint16_t *port)
 {
   int result = -1;
@@ -238,7 +238,7 @@
  * @param port location where to store port number
  *
  * @return 0 on success, non-zero otherwise
- */ 
+ */
 int stun_dns_lookup_stp_addr(stun_dns_lookup_t *self, const char **target, uint16_t *port)
 {
   /* XXX: not implemented */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_internal.h	Tue Dec 16 13:05:22 2008
@@ -99,7 +99,7 @@
 		      stun_msg_t *msg, stun_buffer_t *pwd);
 
 int stun_make_binding_req(stun_handle_t *se, stun_request_t *req,
-			  stun_msg_t *msg, 
+			  stun_msg_t *msg,
 			  tag_type_t, tag_value_t, ...);
 int stun_process_response(stun_msg_t *msg);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_mini.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_mini.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_mini.c	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 /**@internal
  * @file stun_mini.c
- * @brief Minimal stun server 
- * 
+ * @brief Minimal stun server
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Tat Chan <Tat.Chan at nokia.com>
  * @author Kai Vehmanen <kai.vehmanen at nokia.com>
- *  
+ *
  * @date Created: Fri Oct  3 13:40:41 2003 ppessi
- * 
+ *
  */
 
 #include "config.h"
@@ -62,11 +62,11 @@
   stun_bound_t *sockets;
 };
 
-static int process_3489_request(stun_mini_t *mini, 
+static int process_3489_request(stun_mini_t *mini,
 				stun_msg_t *request, stun_msg_t *response,
 				su_socket_t socket, void *, socklen_t);
 
-static int process_bis_request(stun_mini_t *mini, 
+static int process_bis_request(stun_mini_t *mini,
 			       stun_msg_t *request, stun_msg_t *response,
 			       su_socket_t socket, void *, socklen_t);
 
@@ -118,12 +118,12 @@
     return su_seterrno(EAFNOSUPPORT);
 
   ss = calloc(1, offsetof(stun_bound_t, ss_addr.array[addrlen]));
-  
+
   ss->ss_socket = socket;
   ss->ss_scope = su_sockaddr_scope((void *)addr, addrlen);
 
   memcpy(ss->ss_addr.array, addr, ss->ss_addrlen = addrlen);
-  
+
   *next = ss;
 
   return 0;
@@ -168,7 +168,7 @@
 
   if (mini == NULL || msg == NULL || from == NULL)
     return;
-    
+
   if (msglen < 20)
     verdict = "runt";
   else if (data[0] == 1)
@@ -218,7 +218,7 @@
 			 stun_msg_t *request,
 			 stun_msg_t *response,
 			 su_socket_t socket,
-			 void *from, 
+			 void *from,
 			 socklen_t fromlen)
 {
   stun_bound_t *ss, *changed = NULL, ss0[1];
@@ -239,12 +239,12 @@
   a = stun_get_attr(request->stun_attr, RESPONSE_ADDRESS);
   if (a)
     return STUN_600_GLOBAL_FAILURE;
- 
+
   /* compose header */
   response->stun_hdr.msg_type = BINDING_RESPONSE;
-  memcpy(response->stun_hdr.tran_id, request->stun_hdr.tran_id, 
+  memcpy(response->stun_hdr.tran_id, request->stun_hdr.tran_id,
 	 sizeof response->stun_hdr.tran_id);
-  
+
   next = &response->stun_attr;
 
   /* MAPPED-ADDRESS */
@@ -265,7 +265,7 @@
     struct sockaddr_in const *sin, *sin2;
     int scope = su_sockaddr_scope(from, fromlen);
     stun_bound_t *changed_ip = NULL, *same_scope = NULL;
-    
+
     sin = from;
 
     for (changed = mini->sockets; changed; changed = changed->ss_next) {
@@ -296,7 +296,7 @@
       /* We don't have socekt with both changed port and ip */
       changed = changed_ip;
 
-    if (changed == NULL) 
+    if (changed == NULL)
       changed = same_scope;
   }
 
@@ -337,11 +337,11 @@
   stun_send_message(socket, (void *)from, response, NULL);
 
   return 0;
-} 
+}
 
-static int process_bis_request(stun_mini_t *mini, 
+static int process_bis_request(stun_mini_t *mini,
 			       stun_msg_t *request, stun_msg_t *response,
-			       su_socket_t socket, 
+			       su_socket_t socket,
 			       void *from, socklen_t fromlen)
 {
   return process_3489_request(mini, request, response, socket, from, fromlen);
@@ -365,7 +365,7 @@
 
   response->stun_hdr.msg_type = BINDING_ERROR_RESPONSE;
   response->stun_hdr.msg_len = 0; /* actual len computed later */
-  
+
   memcpy(response->stun_hdr.tran_id, transaction_id, 16);
 
   /* ERROR-CODE */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stun_tag.c	Tue Dec 16 13:05:22 2008
@@ -39,13 +39,13 @@
 #include <sofia-sip/stun_tag.h>
 
 /**@def STUNTAG_ANY()
- * 
+ *
  * Filter tag matching any STUNTAG_*().
  */
 tag_typedef_t stuntag_any = NSTAG_TYPEDEF(*);
 
 /**@def STUNTAG_DOMAIN(x)
- * 
+ *
  * The domain to use in DNS-SRV based STUN server discovery.
  * Note: this is commonly the domain part of a public SIP
  * address (AOR). See sect 9.1 of RFC3489.
@@ -64,9 +64,9 @@
 
 /**@def STUNTAG_SERVER(x)
  *
- * Fully qualified host name, or dotted IP address of the STUN server 
+ * Fully qualified host name, or dotted IP address of the STUN server
  * address. If defined, the DNS-SRV based discovery (@see STUNTAG_DOMAIN())
- * will be skipped. 
+ * will be skipped.
  *
  * @par Used with
  *    nua_set_params() \n
@@ -86,9 +86,9 @@
 tag_typedef_t stuntag_server = STRTAG_TYPEDEF(server);
 
 /**@def STUNTAG_REQUIRE_INTEGRITY(x)
- *  
+ *
  * Whether to require support for shared-secret based packet
- * authentication and integrity checks (see sect 9.2 of RFC3489). 
+ * authentication and integrity checks (see sect 9.2 of RFC3489).
  * If false, integrity checks are performed only when server supports it.
  *
  * @par Used with
@@ -113,7 +113,7 @@
 tag_typedef_t stuntag_integrity = BOOLTAG_TYPEDEF(integrity);
 
 /**@def STUNTAG_SOCKET(x)
- *  
+ *
  * Bind socket for STUN.
  *
  * @par Used with
@@ -130,7 +130,7 @@
 tag_typedef_t stuntag_socket = SOCKETTAG_TYPEDEF(socket);
 
 /**@def STUNTAG_REGISTER_EVENTS(x)
- *  
+ *
  * Register socket events for eventloop owned by STUN.
  *
  * @par Used with
@@ -150,7 +150,7 @@
 tag_typedef_t stuntag_register_events = BOOLTAG_TYPEDEF(register_events);
 
 /**@def STUNTAG_ACTION(x)
- *  
+ *
  * Command action for STUN request.
  *
  * @par Used with
@@ -169,7 +169,7 @@
 /* ---------------------------------------------------------------------- */
 
 /**@def STUNTAG_CHANGE_IP(x)
- *  
+ *
  * Add CHANGE-REQUEST attribute with "change IP" flag to the request.
  *
  * @par Used with
@@ -183,7 +183,7 @@
 tag_typedef_t stuntag_change_ip = BOOLTAG_TYPEDEF(change_ip);
 
 /**@def STUNTAG_CHANGE_PORT(x)
- *  
+ *
  * Add CHANGE-REQUEST attribute with "change port" flag to the request.
  *
  * @par Used with
@@ -199,7 +199,7 @@
 /* ---------------------------------------------------------------------- */
 
 /**@def STUNTAG_TIMEOUT(x)
- *  
+ *
  * Timeout controls the launching of the STUN keepalive timer.
  *
  * @par Used with

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/stun/stunc.c	Tue Dec 16 13:05:22 2008
@@ -24,22 +24,22 @@
 
 /**
  * STUN test client
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Martti Mela <Martti.Mela at nokia.com>
  * @author Kai Vehmanen <Kai.Vehmanen at nokia.com>
- * 
+ *
  * @date Created: Thu Jul 24 17:21:00 2003 ppessi
  */
 
 /**@page stunc STUN test client.
- * 
+ *
  * @section stunc_synopsis Synopsis
  * <tt>stunc [OPTIONS] \<stun-server-address\></tt>
  *
  * @section stunc_description Description
  * The @em stunc utility can be used to gather information about possible
- * NAT devices that are located between the client and STUN server. 
+ * NAT devices that are located between the client and STUN server.
  *
  * @em stunc can provide the following information: the IP address and
  * port as seen by the STUN server, detecting presence of NATs, and
@@ -78,7 +78,7 @@
  *
  * <dt>-s</dt>
  * <dd>Request a shared-secret over TLS. Tests whether the STUN server
- * supports the shared-secret mechanism (needed to protect message 
+ * supports the shared-secret mechanism (needed to protect message
  * integrity). Can be combined with @em -b, @em -l and @em -n.
  * </dd>
  *
@@ -99,7 +99,7 @@
  *
  * @section stunc_environment Environment
  * #STUN_DEBUG
- * 
+ *
  * @section stunc_bugs Reporting Bugs
  * Report bugs to <sofia-sip-devel at lists.sourceforge.net>.
  *
@@ -116,7 +116,7 @@
  * PARTICULAR PURPOSE.
  */
 
-#include "config.h" 
+#include "config.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -156,7 +156,7 @@
 
 void usage(char *name)
 {
-  fprintf(stderr, 
+  fprintf(stderr,
 	  "stunc (%s)\n"
 	  "usage: %s <server> [-b] [-n] [-l] [-r] [-s]\n"
 	  "  -b\tmake a binding request\n"
@@ -216,14 +216,14 @@
 		      STUNTAG_SOCKET(stunc->sc_socket),
 		      STUNTAG_REGISTER_EVENTS(1),
 		      TAG_NULL());
-    
+
       if (err < 0) {
 	SU_DEBUG_0(("%s: %s  failed\n", __func__, "stun_handle_bind()"));
 	su_root_break(stun_root(sh));
       }
     }
     break;
-    
+
   case stun_tls_connection_failed:
     SU_DEBUG_0(("%s: Obtaining shared secret failed.\n",
 		__func__));
@@ -269,7 +269,7 @@
   case stun_discovery_done:
     addrlen = sizeof(*sa);
     memset(sa, 0, addrlen);
-    
+
     if (stun_discovery_get_address(sd, sa, &addrlen) < 0) {
       SU_DEBUG_0(("%s: stun_discovery_get_address() failed", __func__));
       return;
@@ -313,7 +313,7 @@
     break;
 
   case stun_discovery_done:
-    SU_DEBUG_3(("%s: NAT type determined to be '%s' (%d).\n", 
+    SU_DEBUG_3(("%s: NAT type determined to be '%s' (%d).\n",
 		__func__, stun_nattype_str(sd), (int)stun_nattype(sd)));
     break;
 
@@ -361,12 +361,12 @@
 int main(int argc, char *argv[])
 {
   int err = 0, i, sflags = 0;
-  stunc_t stunc[1]; 
+  stunc_t stunc[1];
   su_root_t *root;
   stun_handle_t *sh;
   su_socket_t s;
 
-  if (su_init() != 0) 
+  if (su_init() != 0)
     return -1;
 
   root = su_root_create(stunc);
@@ -393,16 +393,16 @@
 
   /* Running this test requires a local STUN server on default port */
   sh = stun_handle_init(root,
-			STUNTAG_SERVER(argv[1]), 
+			STUNTAG_SERVER(argv[1]),
 			STUNTAG_REQUIRE_INTEGRITY(sflags & do_secret),
-			TAG_NULL()); 
+			TAG_NULL());
 
   if (!sh) {
     SU_DEBUG_0(("%s: %s failed\n", __func__, "stun_handle_init()"));
     return -1;
   }
 
-  s = su_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); 
+  s = su_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
   if (s == -1) {
     SU_DEBUG_0(("%s: %s  failed: %s\n", __func__,
 		"su_socket()", su_gli_strerror(errno)));
@@ -424,7 +424,7 @@
     sockaddr.su_family = AF_INET;
 
     SU_DEBUG_3(("stunc: Binding to local port %u.\n", ntohs(sockaddr.su_port)));
-  
+
     err = bind(s, (struct sockaddr *)&sockaddr, socklen);
     if (err < 0) {
       SU_DEBUG_1(("%s: Error %d binding to %s:%u\n", __func__, err,
@@ -452,7 +452,7 @@
 		    STUNTAG_SOCKET(s),
 		    STUNTAG_REGISTER_EVENTS(1),
 		    TAG_NULL());
-    
+
     if (err < 0) {
       SU_DEBUG_0(("%s: %s  failed\n", __func__, "stun_bind()"));
       return -1;
@@ -464,7 +464,7 @@
 			    STUNTAG_REGISTER_EVENTS(1),
 			    STUNTAG_SOCKET(stunc->sc_socket),
 			    TAG_NULL());
-    
+
     if (err < 0) {
       SU_DEBUG_0(("%s: %s  failed\n", __func__, "stun_test_nattype()"));
       su_root_break(stun_root(sh));
@@ -476,13 +476,13 @@
 			     STUNTAG_REGISTER_EVENTS(1),
 			     STUNTAG_SOCKET(stunc->sc_socket),
 			     TAG_NULL());
-    
+
     if (err < 0) {
       SU_DEBUG_0(("%s: %s  failed\n", __func__, "stun_test_lifetime()"));
       su_root_break(stun_root(sh));
     }
   }
- 
+
   if (err == 0)
     su_root_run(root);
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -93,7 +93,7 @@
 
 2005-08-17  Pekka Pessi  <Pekka.Pessi at nokia.com>
 
-	* Added su_strlst_dup() and su_strlst_copy(). 
+	* Added su_strlst_dup() and su_strlst_copy().
 
 	* Added { to BEGIN() and } to END() in <tstdef.h>
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/Makefile.am	Tue Dec 16 13:05:22 2008
@@ -14,7 +14,7 @@
 
 noinst_LTLIBRARIES = 	libsu.la
 
-bin_PROGRAMS = 		addrinfo localinfo 
+bin_PROGRAMS = 		addrinfo localinfo
 
 check_PROGRAMS = 	torture_su torture_su_port \
 			torture_su_alloc torture_su_time torture_su_tag \

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/addrinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/addrinfo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/addrinfo.c	Tue Dec 16 13:05:22 2008
@@ -23,13 +23,13 @@
  */
 
 /**@page addrinfo Resolve network services
- * 
+ *
  * @section synopsis Synopsis
  *
  * <tt>addrinfo [-pcn46] service-name host</tt>
  *
  * @section description Description
- * 
+ *
  * The @em addrinfo utility will use su_getaddrinfo() to resolve the network
  * services and print resolved names. See sect 6.1 of RFC3493 and the getaddrinfo(3)
  * manual page of POSIX 1003.1g, for more information.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/foo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/foo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/foo.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@file smoothsort.c
  * @brief Smoothsort implementation
- * 
+ *
  * Smoothsort is a in-place sorting algorithm with performance of O(NlogN)
  * in worst case and O(n) in best case.
  *
@@ -60,7 +60,7 @@
   size_t next;
 
   s->p >>= 1;
-  
+
   next = s->b + s->c + 1, s->c = s->b, s->b = next;
 
   return next;
@@ -87,8 +87,8 @@
     return "0";
 
   binary[64] = 0;
-  
-  for (i = 64; p; p >>= 1) 
+
+  for (i = 64; p; p >>= 1)
     binary[--i] = "01"[p & 1];
 
   return binary + i;
@@ -107,7 +107,7 @@
  * @param s       description of current stretch
  */
 static void sift(array const *array, size_t r, stretch s)
-{ 
+{
   while (s.b >= 3) {
     size_t r2 = r - s.b + s.c;
 
@@ -115,7 +115,7 @@
       r2 = r - 1;
       stretch_down(&s, 0);
     }
- 
+
     if (array->less(array->m, r2, r))
       break;
 
@@ -125,8 +125,8 @@
 
     stretch_down(&s, 0);
   }
-} 
- 
+}
+
 /** Trinkle the roots of the given stretches
  *
  * @param array   description of array to sort
@@ -160,12 +160,12 @@
     }
 
     r2 = r - s.b + s.c;
- 
+
     if (array->less(array->m, r2, r - 1)) {
       r2 = r - 1;
       stretch_down(&s, 0);
     }
- 
+
     if (array->less(array->m, r2, r3)) {
       DEBUG(("swap(%p [%zu]=[%zu])\n", array, r, r3));
       array->swap(array->m, r, r3); r = r3;
@@ -175,9 +175,9 @@
     DEBUG(("\tswap(%p @%zu <=> @%zu b=%u)\n", array, r, r2, s.b));
     array->swap(array->m, r, r2); r = r2;
     stretch_down(&s, 0);
-    break; 
+    break;
   }
- 
+
   sift(array, r, s);
 }
 
@@ -198,7 +198,7 @@
     array->swap(array->m, r, r1);
     trinkle(array, r1, s);
   }
-} 
+}
 
 /** Sort array using smoothsort.
  *
@@ -251,10 +251,10 @@
     DEBUG(("loop1 q=%zu: b=%u p=%s\n", q, s.b, binary(s.p)));
 
     if (s.b <= 1) {
-      while ((s.p & 1) == 0) 
+      while ((s.p & 1) == 0)
 	stretch_up(&s);
       --r;
-    } 
+    }
     else /* if b >= 3 */ {
       if (s.p) semitrinkle(array, r - (s.b - s.c), s);
       stretch_down(&s, 1);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/getopt.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/getopt.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/getopt.c	Tue Dec 16 13:05:22 2008
@@ -1,177 +1,177 @@
-/***************************************************************************** 
- * 
- *  MODULE NAME : GETOPT.C 
- * 
- *  COPYRIGHTS: 
- *             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. 
- * 
- *  AUTHOR:   Original author: 
- *                 G. R. Blair (BOBBLAIR at AUSVM1) 
- *                 Internet: bobblair at bobblair.austin.ibm.com 
- * 
- *            Extensively revised by: 
- *                 John Q. Walker II, Ph.D. (JOHHQ at RALVM6) 
- *                 Internet: johnq at ralvm6.vnet.ibm.com 
- * 
- *****************************************************************************/ 
- 
-/****************************************************************************** 
- * getopt() 
- * 
- * The getopt() function is a command line parser.  It returns the next 
- * option character in argv that matches an option character in opstring. 
- * 
- * The argv argument points to an array of argc+1 elements containing argc 
- * pointers to character strings followed by a null pointer. 
- * 
- * The opstring argument points to a string of option characters; if an 
- * option character is followed by a colon, the option is expected to have 
- * an argument that may or may not be separated from it by white space. 
- * The external variable optarg is set to point to the start of the option 
- * argument on return from getopt(). 
- * 
- * The getopt() function places in optind the argv index of the next argument 
- * to be processed.  The system initializes the external variable optind to 
- * 1 before the first call to getopt(). 
- * 
- * When all options have been processed (that is, up to the first nonoption 
- * argument), getopt() returns EOF.  The special option "--" may be used to 
- * delimit the end of the options; EOF will be returned, and "--" will be 
- * skipped. 
- * 
- * The getopt() function returns a question mark (?) when it encounters an 
- * option character not included in opstring.  This error message can be 
- * disabled by setting opterr to zero.  Otherwise, it returns the option 
- * character that was detected. 
- * 
- * If the special option "--" is detected, or all options have been 
- * processed, EOF is returned. 
- * 
- * Options are marked by either a minus sign (-) or a slash (/). 
- * 
- * No errors are defined. 
- *****************************************************************************/ 
- 
-#include <stdio.h>                  /* for EOF */ 
-#include <string.h>                 /* for strchr() */ 
- 
- 
-/* static (global) variables that are specified as exported by getopt() */ 
-char *optarg = NULL;    /* pointer to the start of the option argument  */ 
-int   optind = 1;       /* number of the next argv[] to be evaluated    */ 
-int   opterr = 1;       /* non-zero if a question mark should be returned 
-                           when a non-valid option character is detected */ 
- 
-/* handle possible future character set concerns by putting this in a macro */ 
-#define _next_char(string)  (char)(*(string+1)) 
- 
-int getopt(int argc, char *argv[], char *opstring) 
-{ 
-    static char *pIndexPosition = NULL; /* place inside current argv string */ 
-    char *pArgString = NULL;        /* where to start from next */ 
-    char *pOptString;               /* the string in our program */ 
- 
- 
-    if (pIndexPosition != NULL) { 
-        /* we last left off inside an argv string */ 
-        if (*(++pIndexPosition)) { 
-            /* there is more to come in the most recent argv */ 
-            pArgString = pIndexPosition; 
-        } 
-    } 
- 
-    if (pArgString == NULL) { 
-        /* we didn't leave off in the middle of an argv string */ 
-        if (optind >= argc) { 
-            /* more command-line arguments than the argument count */ 
-            pIndexPosition = NULL;  /* not in the middle of anything */ 
-            return EOF;             /* used up all command-line arguments */ 
-        } 
- 
-        /*--------------------------------------------------------------------- 
-         * If the next argv[] is not an option, there can be no more options. 
-         *-------------------------------------------------------------------*/ 
-        pArgString = argv[optind++]; /* set this to the next argument ptr */ 
- 
-        if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */ 
-            ('-' != *pArgString)) { 
-            --optind;               /* point to current arg once we're done */ 
-            optarg = NULL;          /* no argument follows the option */ 
-            pIndexPosition = NULL;  /* not in the middle of anything */ 
-            return EOF;             /* used up all the command-line flags */ 
-        } 
- 
-        /* check for special end-of-flags markers */ 
-        if ((strcmp(pArgString, "-") == 0) || 
-            (strcmp(pArgString, "--") == 0)) { 
-            optarg = NULL;          /* no argument follows the option */ 
-            pIndexPosition = NULL;  /* not in the middle of anything */ 
-            return EOF;             /* encountered the special flag */ 
-        } 
- 
-        pArgString++;               /* look past the / or - */ 
-    } 
- 
-    if (':' == *pArgString) {       /* is it a colon? */ 
-        /*--------------------------------------------------------------------- 
-         * Rare case: if opterr is non-zero, return a question mark; 
-         * otherwise, just return the colon we're on. 
-         *-------------------------------------------------------------------*/ 
-        return (opterr ? (int)'?' : (int)':'); 
-    } 
-    else if ((pOptString = strchr(opstring, *pArgString)) == 0) { 
-        /*--------------------------------------------------------------------- 
-         * The letter on the command-line wasn't any good. 
-         *-------------------------------------------------------------------*/ 
-        optarg = NULL;              /* no argument follows the option */ 
-        pIndexPosition = NULL;      /* not in the middle of anything */ 
-        return (opterr ? (int)'?' : (int)*pArgString); 
-    } 
-    else { 
-        /*--------------------------------------------------------------------- 
-         * The letter on the command-line matches one we expect to see 
-         *-------------------------------------------------------------------*/ 
-        if (':' == _next_char(pOptString)) { /* is the next letter a colon? */ 
-            /* It is a colon.  Look for an argument string. */ 
-            if ('\0' != _next_char(pArgString)) {  /* argument in this argv? */ 
-                optarg = &pArgString[1];   /* Yes, it is */ 
-            } 
-            else { 
-                /*------------------------------------------------------------- 
-                 * The argument string must be in the next argv. 
-                 * But, what if there is none (bad input from the user)? 
-                 * In that case, return the letter, and optarg as NULL. 
-                 *-----------------------------------------------------------*/ 
-                if (optind < argc) 
-                    optarg = argv[optind++]; 
-                else { 
-                    optarg = NULL; 
-                    return (opterr ? (int)'?' : (int)*pArgString); 
-                } 
-            } 
-            pIndexPosition = NULL;  /* not in the middle of anything */ 
-        } 
-        else { 
-            /* it's not a colon, so just return the letter */ 
-            optarg = NULL;          /* no argument follows the option */ 
-            pIndexPosition = pArgString;    /* point to the letter we're on */ 
-        } 
-        return (int)*pArgString;    /* return the letter that matched */ 
-    } 
+/*****************************************************************************
+ *
+ *  MODULE NAME : GETOPT.C
+ *
+ *  COPYRIGHTS:
+ *             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.
+ *
+ *  AUTHOR:   Original author:
+ *                 G. R. Blair (BOBBLAIR at AUSVM1)
+ *                 Internet: bobblair at bobblair.austin.ibm.com
+ *
+ *            Extensively revised by:
+ *                 John Q. Walker II, Ph.D. (JOHHQ at RALVM6)
+ *                 Internet: johnq at ralvm6.vnet.ibm.com
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ * getopt()
+ *
+ * The getopt() function is a command line parser.  It returns the next
+ * option character in argv that matches an option character in opstring.
+ *
+ * The argv argument points to an array of argc+1 elements containing argc
+ * pointers to character strings followed by a null pointer.
+ *
+ * The opstring argument points to a string of option characters; if an
+ * option character is followed by a colon, the option is expected to have
+ * an argument that may or may not be separated from it by white space.
+ * The external variable optarg is set to point to the start of the option
+ * argument on return from getopt().
+ *
+ * The getopt() function places in optind the argv index of the next argument
+ * to be processed.  The system initializes the external variable optind to
+ * 1 before the first call to getopt().
+ *
+ * When all options have been processed (that is, up to the first nonoption
+ * argument), getopt() returns EOF.  The special option "--" may be used to
+ * delimit the end of the options; EOF will be returned, and "--" will be
+ * skipped.
+ *
+ * The getopt() function returns a question mark (?) when it encounters an
+ * option character not included in opstring.  This error message can be
+ * disabled by setting opterr to zero.  Otherwise, it returns the option
+ * character that was detected.
+ *
+ * If the special option "--" is detected, or all options have been
+ * processed, EOF is returned.
+ *
+ * Options are marked by either a minus sign (-) or a slash (/).
+ *
+ * No errors are defined.
+ *****************************************************************************/
+
+#include <stdio.h>                  /* for EOF */
+#include <string.h>                 /* for strchr() */
+
+
+/* static (global) variables that are specified as exported by getopt() */
+char *optarg = NULL;    /* pointer to the start of the option argument  */
+int   optind = 1;       /* number of the next argv[] to be evaluated    */
+int   opterr = 1;       /* non-zero if a question mark should be returned
+                           when a non-valid option character is detected */
+
+/* handle possible future character set concerns by putting this in a macro */
+#define _next_char(string)  (char)(*(string+1))
+
+int getopt(int argc, char *argv[], char *opstring)
+{
+    static char *pIndexPosition = NULL; /* place inside current argv string */
+    char *pArgString = NULL;        /* where to start from next */
+    char *pOptString;               /* the string in our program */
+
+
+    if (pIndexPosition != NULL) {
+        /* we last left off inside an argv string */
+        if (*(++pIndexPosition)) {
+            /* there is more to come in the most recent argv */
+            pArgString = pIndexPosition;
+        }
+    }
+
+    if (pArgString == NULL) {
+        /* we didn't leave off in the middle of an argv string */
+        if (optind >= argc) {
+            /* more command-line arguments than the argument count */
+            pIndexPosition = NULL;  /* not in the middle of anything */
+            return EOF;             /* used up all command-line arguments */
+        }
+
+        /*---------------------------------------------------------------------
+         * If the next argv[] is not an option, there can be no more options.
+         *-------------------------------------------------------------------*/
+        pArgString = argv[optind++]; /* set this to the next argument ptr */
+
+        if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */
+            ('-' != *pArgString)) {
+            --optind;               /* point to current arg once we're done */
+            optarg = NULL;          /* no argument follows the option */
+            pIndexPosition = NULL;  /* not in the middle of anything */
+            return EOF;             /* used up all the command-line flags */
+        }
+
+        /* check for special end-of-flags markers */
+        if ((strcmp(pArgString, "-") == 0) ||
+            (strcmp(pArgString, "--") == 0)) {
+            optarg = NULL;          /* no argument follows the option */
+            pIndexPosition = NULL;  /* not in the middle of anything */
+            return EOF;             /* encountered the special flag */
+        }
+
+        pArgString++;               /* look past the / or - */
+    }
+
+    if (':' == *pArgString) {       /* is it a colon? */
+        /*---------------------------------------------------------------------
+         * Rare case: if opterr is non-zero, return a question mark;
+         * otherwise, just return the colon we're on.
+         *-------------------------------------------------------------------*/
+        return (opterr ? (int)'?' : (int)':');
+    }
+    else if ((pOptString = strchr(opstring, *pArgString)) == 0) {
+        /*---------------------------------------------------------------------
+         * The letter on the command-line wasn't any good.
+         *-------------------------------------------------------------------*/
+        optarg = NULL;              /* no argument follows the option */
+        pIndexPosition = NULL;      /* not in the middle of anything */
+        return (opterr ? (int)'?' : (int)*pArgString);
+    }
+    else {
+        /*---------------------------------------------------------------------
+         * The letter on the command-line matches one we expect to see
+         *-------------------------------------------------------------------*/
+        if (':' == _next_char(pOptString)) { /* is the next letter a colon? */
+            /* It is a colon.  Look for an argument string. */
+            if ('\0' != _next_char(pArgString)) {  /* argument in this argv? */
+                optarg = &pArgString[1];   /* Yes, it is */
+            }
+            else {
+                /*-------------------------------------------------------------
+                 * The argument string must be in the next argv.
+                 * But, what if there is none (bad input from the user)?
+                 * In that case, return the letter, and optarg as NULL.
+                 *-----------------------------------------------------------*/
+                if (optind < argc)
+                    optarg = argv[optind++];
+                else {
+                    optarg = NULL;
+                    return (opterr ? (int)'?' : (int)*pArgString);
+                }
+            }
+            pIndexPosition = NULL;  /* not in the middle of anything */
+        }
+        else {
+            /* it's not a colon, so just return the letter */
+            optarg = NULL;          /* no argument follows the option */
+            pIndexPosition = pArgString;    /* point to the letter we're on */
+        }
+        return (int)*pArgString;    /* return the letter that matched */
+    }
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/localinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/localinfo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/localinfo.c	Tue Dec 16 13:05:22 2008
@@ -23,13 +23,13 @@
  */
 
 /**@page localinfo list local network addresses
- * 
+ *
  * @section synopsis Synopsis
  *
  * <tt>localinfo [-imdn46gslh] [domainname]</tt>
  *
  * @section description Description
- * 
+ *
  * The @em localinfo utility will obtain the local network addresses
  * and print them.
  *
@@ -61,7 +61,7 @@
  *
  * @section examples Examples
  *
- * You want to find out local IPv6 addresses: 
+ * You want to find out local IPv6 addresses:
  * @code
  * $ localinfo -6
  * @endcode

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memccpy.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memccpy.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memccpy.c	Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
 
 /**@internal @file memccpy.c
  * @brief The memccpy() replacement function.
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Nov 17 17:45:51 EET 2005 ppessi
  */
 
@@ -46,7 +46,7 @@
  * @param n          size of destination area
  *
  * @return
- * Returns a pointer to the next character in @a dest after @a c, 
+ * Returns a pointer to the next character in @a dest after @a c,
  * or NULL if @a c was not found in the first @a n characters of @a src.
  */
 void *memccpy(void *dest, const void *src, int c, size_t n)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memcspn.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memcspn.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memcspn.c	Tue Dec 16 13:05:22 2008
@@ -24,9 +24,9 @@
 
 /**@internal @file memcspn.c
  * @brief The memcspn() replacement function.
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Nov 17 17:45:51 EET 2005 ppessi
  */
 
@@ -48,7 +48,7 @@
  * @return
  * The memspn() function returns the number of bytes in the memory area @a
  * which consists entirely of bytes not in @a reject.
- * @par 
+ * @par
  * If @a rejectlen is 0, or @a reject is NULL, it returns @a memlen, size of
  * the memory area.
  */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memmem.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memmem.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memmem.c	Tue Dec 16 13:05:22 2008
@@ -25,11 +25,11 @@
 /**@internal @file memmem.c
  *
  * @brief Backup implementation of memmem()
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Sat Apr 12 19:32:33 2003 ppessi
- * 
+ *
  */
 
 #include "config.h"

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memspn.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memspn.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/memspn.c	Tue Dec 16 13:05:22 2008
@@ -23,13 +23,13 @@
  */
 
 /**@internal @file memspn.c
- * 
+ *
  * The memspn() replacement function.
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Sat Apr 12 19:32:33 2003 ppessi
- * 
+ *
  */
 
 #include "config.h"

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c	Tue Dec 16 13:05:22 2008
@@ -8,7 +8,7 @@
 
    Copyright (C) 1994,1996,1997,1998,1999,2001,2002
    Free Software Foundation, Inc.
-   
+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
@@ -57,7 +57,7 @@
 #define FDSETSIZE(n) (((n) + NFDBITS - 1) / NFDBITS * (NFDBITS / NBBY))
 #define roundup(n, x) (((n) + (x) - 1) / (x) * (x))
 
-/* Emulated poll() using select(). 
+/* Emulated poll() using select().
 
 This is used by su_wait().
 
@@ -241,7 +241,7 @@
       break;
     }
 
-  if (ready > 0) 
+  if (ready > 0)
     for (f = fds; f < &fds[nfds]; ++f)
       {
 	if (f->fd >= 0)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/smoothsort.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/smoothsort.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/smoothsort.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@file smoothsort.c
  * @brief Smoothsort implementation
- * 
+ *
  * Smoothsort is a in-place sorting algorithm with performance of O(NlogN)
  * in worst case and O(n) in best case.
  *
@@ -60,7 +60,7 @@
   size_t next;
 
   s->p >>= 1;
-  
+
   next = s->b + s->c + 1, s->c = s->b, s->b = next;
 
   return next;
@@ -87,8 +87,8 @@
     return "0";
 
   binary[64] = 0;
-  
-  for (i = 64; p; p >>= 1) 
+
+  for (i = 64; p; p >>= 1)
     binary[--i] = "01"[p & 1];
 
   return binary + i;
@@ -107,7 +107,7 @@
  * @param s       description of current stretch
  */
 static void sift(array const *array, size_t r, stretch s)
-{ 
+{
   while (s.b >= 3) {
     size_t r2 = r - s.b + s.c;
 
@@ -115,7 +115,7 @@
       r2 = r - 1;
       stretch_down(&s, 0);
     }
- 
+
     if (array->less(array->m, r2, r))
       break;
 
@@ -125,8 +125,8 @@
 
     stretch_down(&s, 0);
   }
-} 
- 
+}
+
 /** Trinkle the roots of the given stretches
  *
  * @param array   description of array to sort
@@ -160,12 +160,12 @@
     }
 
     r2 = r - s.b + s.c;
- 
+
     if (array->less(array->m, r2, r - 1)) {
       r2 = r - 1;
       stretch_down(&s, 0);
     }
- 
+
     if (array->less(array->m, r2, r3)) {
       DEBUG(("swap(%p [%zu]=[%zu])\n", array, r, r3));
       array->swap(array->m, r, r3); r = r3;
@@ -175,9 +175,9 @@
     DEBUG(("\tswap(%p @%zu <=> @%zu b=%u)\n", array, r, r2, s.b));
     array->swap(array->m, r, r2); r = r2;
     stretch_down(&s, 0);
-    break; 
+    break;
   }
- 
+
   sift(array, r, s);
 }
 
@@ -198,7 +198,7 @@
     array->swap(array->m, r, r1);
     trinkle(array, r1, s);
   }
-} 
+}
 
 /** Sort array using smoothsort.
  *
@@ -251,10 +251,10 @@
     DEBUG(("loop1 q=%zu: b=%u p=%s\n", q, s.b, binary(s.p)));
 
     if (s.b <= 1) {
-      while ((s.p & 1) == 0) 
+      while ((s.p & 1) == 0)
 	stretch_up(&s);
       --r;
-    } 
+    }
     else /* if b >= 3 */ {
       if (s.p) semitrinkle(array, r - (s.b - s.c), s);
       stretch_down(&s, 1);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/heap.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/heap.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/heap.h	Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
  *
  * This file contain template macros implementing @a heap in C. The @a heap
  * keeps its element in a known order and it can be used to implement, for
- * example, a prioritye queue or an ordered queue. 
+ * example, a prioritye queue or an ordered queue.
  *
  * The ordering within the heap is defined as follows:
  * - indexing starts from 1
@@ -53,14 +53,14 @@
  * to be removed. The template defines also a predicate used to check if the
  * heap is full, and a function used to resize the heap.
  *
- * The heap user must define four primitives: 
- * - less than comparison 
+ * The heap user must define four primitives:
+ * - less than comparison
  * - array setter
  * - heap array allocator
  * - empty element
  *
  * Please note that in order to remove an entry in the heap, the application
- * must know its index in the heap array. 
+ * must know its index in the heap array.
  *
  * The heap struct is declared with macro HEAP_DECLARE(). The prototypes for
  * heap functions are instantiated with macro HEAP_PROTOS(). The
@@ -68,7 +68,7 @@
  *
  * Example code can be found from <su/torture_heap.c> and
  * <sresolv/sres_cache.c>.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  * @NEW_1_12_7.
  */
@@ -77,9 +77,9 @@
 #define HEAP_MIN_SIZE 31
 
 /** Declare heap structure type.
- * 
+ *
  * The macro #HEAP_TYPE contains declaration of the heap structure.
- * 
+ *
  * @showinitializer
  */
 #define HEAP_TYPE struct { void *private; }
@@ -100,7 +100,7 @@
  * @param heaptype  type of heap
  * @param prefix    function prefix
  * @param type      type of entries
- * 
+ *
  * The declared functions will have scope @a scope (for example, @c static
  * or @c static inline). The declared function names will have prefix @a
  * prefix. The heap structure has type @a heaptype. The heap element type is
@@ -144,7 +144,7 @@
  * Functions have scope @a scope, e.g., @c static @c inline.
  * The heap structure has type @a type.
  * The function names start with @a prefix, the field names start
- * with @a pr. The entry type is @a entrytype. 
+ * with @a pr. The entry type is @a entrytype.
 
  * The function (or macro) @a less compares two entries in heap. It gets two
  * arguments and it returns true if its left argument is less than its right

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable.h	Tue Dec 16 13:05:22 2008
@@ -48,11 +48,11 @@
  * When a entry with new identical hash key is added to the table, it can be
  * either @e inserted (before any other entry with same key value) or
  * @e appended.
- * 
+ *
  * Example code can be found from <htable_test.c>.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Sep 25 17:42:40 2001 ppessi
  */
 
@@ -62,7 +62,7 @@
 #define HTABLE_MIN_SIZE 31
 
 /** Declare hash table structure type.
- * 
+ *
  * The macro HTABLE_DECLARE() expands to a declaration for hash table
  * structure.  The its typedef will be <em>prefix</em><code>_t</code>, the
  * field names start withb @a pr.  The entry type is @a entry_t.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable2.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable2.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/htable2.h	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 #ifndef HTABLE2_H
 /** Defined when <sofia-sip/htable2.h> has been included. */
-#define HTABLE2_H 
+#define HTABLE2_H
 
 /**@file sofia-sip/htable2.h
  *
@@ -33,7 +33,7 @@
  * Note: this version stores the given element types as entries (instead of
  * always storing a pointer to element). It can be used without
  * <sofia-sip/su_alloc.h>.
- * 
+ *
  * This file contain a hash table template for C. The hash tables are
  * resizeable, and they usually contain pointers to entries. The declaration
  * for template datatypes is instantiated with macro HTABLE2_DECLARE2(). The
@@ -51,9 +51,9 @@
  * When a entry with new identical key is added to the table, it can be
  * either @e inserted (before any other entry with same key value) or @e
  * appended.
- * 
+ *
  * Example code can be found from <htable_test.c>.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
  * @date Created: Tue Sep 25 17:42:40 2001 ppessi
@@ -65,7 +65,7 @@
 #define HTABLE2_MIN_SIZE 31
 
 /** Declare hash table structure type.
- * 
+ *
  * The macro HTABLE2_DECLARE2() expands to a declaration for hash table
  * structure. The its typedef will be @a type, the field names start with @a
  * pr. The entry type is @a entrytype.
@@ -127,8 +127,8 @@
  * hash value of each entry is given as @a hfun.
  *
  * @param type      hash table type
- * @param prefix    function prefix for hash table 
- * @param pr        field prefix for hash table 
+ * @param prefix    function prefix for hash table
+ * @param pr        field prefix for hash table
  * @param entrytype type of entry element
  * @param sizetype  size_t type
  * @param hfun      function or macro returning hash value of entry
@@ -297,7 +297,7 @@
 #define HTABLE2_BODIES(type, prefix, pr, entrytype, \
 		        hfun, is_used, reclaim, is_equal, halloc) \
   HTABLE2_BODIES2(type, prefix, pr, entrytype, unsigned, \
-		        hfun, is_used, reclaim, is_equal, halloc) 
+		        hfun, is_used, reclaim, is_equal, halloc)
 
 
 #endif /** !defined(HTABLE2_H) */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/rbtree.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/rbtree.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/rbtree.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef RBTREE_H
 /** Defined when <sofia-sip/rbtree.h> has been included. */
-#define RBTREE_H 
+#define RBTREE_H
 
 /**@file sofia-sip/rbtree.h
  *
  * Red-black tree.
  *
  * This file contain a red-black-tree template for C. The red-black-tree is
- * a balanced binary tree containing structures as nodes. 
+ * a balanced binary tree containing structures as nodes.
  *
  * The prototypes for red-black-tree functions are declared with macro
  * RBTREE_PROTOS(). The implementation is instantiated with macro
@@ -40,9 +40,9 @@
  * When a entry with new identical key is added to the tree, it can be
  * either @e inserted (replacing other node with same key value) or @e
  * appended.
- * 
+ *
  * Example code can be found from <rbtree_test.c>.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
  * @date Created: Tue Sep  7 19:45:11 EEST 2004 ppessi
@@ -80,7 +80,7 @@
   left(c) = x;					   \
   parent(x) = c;				   \
 } \
-extern int const prefix##_dummy 
+extern int const prefix##_dummy
 
   /*               x                c
    *              / \              / \
@@ -259,11 +259,11 @@
  *
  * @param tree pointer to the root of the tree
  * @param node pointer to node to be inserted
- * @param return_old return value parameter for matching node 
+ * @param return_old return value parameter for matching node
  *                   already in the @a tree
  *
  * @retval 0 if node was inserted
- * @retval -1 if there already was an matching node 
+ * @retval -1 if there already was an matching node
  *            and return_old is NULL.
  */
 int rbtree_insert(Type **tree, Type *node, Type **return_old);
@@ -387,7 +387,7 @@
  * @param tree pointer to the root of the tree
  * @param node pointer to node to be appended
  */
-void rbtree_remove(Type **tree, Type *node);				
+void rbtree_remove(Type **tree, Type *node);
 #endif
 
 #define RBTREE_REMOVE(SCOPE, prefix, Type, left, right, parent,		\
@@ -584,7 +584,7 @@
 } \
 extern int const prefix##_dummy
 
-/** Define prototypes for red-black tree functions. @HIDE 
+/** Define prototypes for red-black tree functions. @HIDE
  *
  * @param SCOPE function scope (e.g., su_inline)
  * @param prefix function prefix (e.g., rbtree)
@@ -605,12 +605,12 @@
   SCOPE Type *prefix ## _last(Type const *);				\
   SCOPE int prefix ## _height(Type const *)
 
-/** Define bodies for red-black tree functions. @HIDE 
+/** Define bodies for red-black tree functions. @HIDE
  *
  * @param SCOPE function scope (e.g., su_inline)
  * @param prefix function prefix (e.g., rbtree)
  * @param Type node type
- * @param left accessor of left node 
+ * @param left accessor of left node
  * @param right accessor of right node
  * @param parent accessor of parent node
  * @param IS_RED predicate testing if node is red
@@ -621,7 +621,7 @@
  * @param CMP method comparing two nodes
  * @param INSERT setter marking node as inserted to the tree
  * @param REMOVE method marking node as removed and possibly deleting node
- * 
+ *
  * @par Example
  *
  * @code
@@ -637,7 +637,7 @@
  * #define INSERT(node) ((node)->inserted = 1)
  * #define REMOVE(node) ((node)->left = (node)->right = (node)->parent = NULL, \
  *                       (node)->inserted = 0)
- * 
+ *
  * RBTREE_BODIES(su_inline, rbtree, struct node,
  *               LEFT, RIGHT, PARENT,
  *               IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su.h	Tue Dec 16 13:05:22 2008
@@ -25,11 +25,11 @@
 #ifndef SU_H
 /** Defined when <sofia-sip/su.h> has been included. */
 #define SU_H
-/**@ingroup su_socket 
+/**@ingroup su_socket
  * @file sofia-sip/su.h Socket and network address interface
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
 
@@ -83,14 +83,14 @@
 
 #if SU_HAVE_BSDSOCK || DOCUMENTATION_ONLY
 enum {
-  /** Invalid socket descriptor, error from socket() or accept() */ 
+  /** Invalid socket descriptor, error from socket() or accept() */
   INVALID_SOCKET = -1,
 #define INVALID_SOCKET ((su_socket_t)INVALID_SOCKET)
   /** Error from other socket calls */
   SOCKET_ERROR = -1,
 #define SOCKET_ERROR SOCKET_ERROR
   /** Return code for a successful call */
-  su_success = 0, 
+  su_success = 0,
   /** Return code for an unsuccessful call */
   su_failure = -1
 };
@@ -98,9 +98,9 @@
 #define MSG_NOSIGNAL (0)
 #endif
 #elif SU_HAVE_WINSOCK
-enum { 
-  su_success = 0, 
-  su_failure = 0xffffffffUL 
+enum {
+  su_success = 0,
+  su_failure = 0xffffffffUL
 };
 
 #define MSG_NOSIGNAL (0)
@@ -168,7 +168,7 @@
 #define               su_len          su_array[0]
   short               su_family;
 #endif
-#define               su_port         su_sin.sin_port  
+#define               su_port         su_sin.sin_port
 #endif
 
   char                su_array[32];   /**< Presented as chars */
@@ -230,8 +230,8 @@
  * For historical reasons, the structure is known as #msg_iovec_t in @msg
  * module.
  *
- * @sa #su_ioveclen_t, SU_IOVECLEN_MAX, su_vsend(), su_vrecv(), 
- * #msg_iovec_t, msg_iovec(), msg_recv_iovec(), 
+ * @sa #su_ioveclen_t, SU_IOVECLEN_MAX, su_vsend(), su_vrecv(),
+ * #msg_iovec_t, msg_iovec(), msg_recv_iovec(),
  * @c struct @c iovec defined in <sys/uio.h>, writev(2), readv(2),
  * sendmsg(), recvmsg(),
  * <a href="http://msdn.microsoft.com/library/en-us/winsock/winsock/wsabuf_2.asp">
@@ -242,7 +242,7 @@
   su_ioveclen_t siv_len;		/**< Size of buffer.  */
 } su_iovec_t;
 
-/** Maximum size of buffer in a single su_iovec_t element. 
+/** Maximum size of buffer in a single su_iovec_t element.
  * @sa #su_ioveclen_t, #su_iovec_t
  *
  * @since New in @VERSION_1_12_2.
@@ -277,7 +277,7 @@
 SOFIAPUBFUN int su_ioctl(su_socket_t s, int request, ...);
 
 /**Check for in-progress error codes.
- * 
+ *
  * Checks if the @a errcode indicates that the socket call failed because
  * it would have blocked.
  *
@@ -287,7 +287,7 @@
  */
 SOFIAPUBFUN int su_is_blocking(int errcode);
 
-/** Set/reset blocking option. */ 
+/** Set/reset blocking option. */
 SOFIAPUBFUN int su_setblocking(su_socket_t s, int blocking);
 /** Set/reset address reusing option. */
 SOFIAPUBFUN int su_setreuseaddr(su_socket_t s, int reuse);
@@ -314,7 +314,7 @@
 #define su_ioctl  ioctl
 /*
  * Note: before 1.12.2, there was su_isblocking() which did not take argument
- * and which was missing from WINSOCK 
+ * and which was missing from WINSOCK
  */
 #define su_is_blocking(e) \
   ((e) == EINPROGRESS || (e) == EAGAIN || (e) == EWOULDBLOCK)
@@ -324,7 +324,7 @@
 SOFIAPUBFUN int su_inet_pton(int af, char const *src, void *dst);
 SOFIAPUBFUN const char *su_inet_ntop(int af, void const *src,
 				  char *dst, size_t size);
-SOFIAPUBFUN ssize_t 
+SOFIAPUBFUN ssize_t
   su_send(su_socket_t s, void *buffer, size_t length, int flags),
   su_sendto(su_socket_t s, void *buffer, size_t length, int flags,
 	    su_sockaddr_t const *to, socklen_t tolen),
@@ -424,7 +424,7 @@
 
 #define SU_SOCKADDR_INADDR_ANY(su) SU_HAS_INADDR_ANY(su)
 
-/**@HI Calculate correct size of su_sockaddr_t structure. */ 
+/**@HI Calculate correct size of su_sockaddr_t structure. */
 #if SU_HAVE_IN6
 #define SU_SOCKADDR_SIZE(su) \
   ((socklen_t)((su)->su_family == AF_INET ? sizeof((su)->su_sin)	  \

Modified: 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_addrinfo.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_addrinfo.h	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -13,7 +13,7 @@
  * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -30,12 +30,12 @@
 #ifndef SU_ADDRINFO_H
 /* Defined when <sofia-sip/su_addrinfo.h> has been included */
 #define SU_ADDRINFO_H
-/**@ingroup su_socket 
+/**@ingroup su_socket
  *
  * @file sofia-sip/su_addrinfo.h Network address and service translation.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Nov 30 17:07:04 EET 2005 ppessi
  */
 
@@ -115,10 +115,10 @@
 };
 #endif	/* SU_WITH_GETADDRINFO */
 
-#ifndef EAI_BADHINTS     
+#ifndef EAI_BADHINTS
 #define EAI_BADHINTS	10012
 #endif
-#ifndef EAI_PROTOCOL  
+#ifndef EAI_PROTOCOL
 #define EAI_PROTOCOL	10013
 #endif
 

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_alloc.h	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
  * @file sofia-sip/su_alloc.h Home-based memory management interface
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Aug 19 01:12:25 1999 ppessi
  */
 
@@ -54,7 +54,7 @@
 typedef struct su_alock su_alock_t;
 
 /** Memory home structure */
-struct su_home_s { 
+struct su_home_s {
   int         suh_size;
   su_block_t *suh_blocks;
   su_alock_t *suh_lock;
@@ -140,7 +140,7 @@
      __attribute__((__malloc__));
 
 /* free an independent block */
-SU_DLL void su_free(su_home_t *h, void *);		
+SU_DLL void su_free(su_home_t *h, void *);
 
 /** Check if a memory home is threadsafe */
 SU_DLL int su_home_is_threadsafe(su_home_t const *home);

Modified: 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_alloc_stat.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_alloc_stat.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef SU_ALLOC_STAT_H
 /** Defined when <sofia-sip/su_alloc_stat.h> has been included. */
-#define SU_ALLOC_STAT_H 
+#define SU_ALLOC_STAT_H
 
 /**@ingroup su_alloc
  *
  * @file sofia-sip/su_alloc_stat.h Home-based memory management statistics
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Apr  9 10:24:05 2002 ppessi
  */
 
@@ -48,10 +48,10 @@
 typedef struct su_home_stat_t su_home_stat_t;
 
 SU_DLL void su_home_init_stats(su_home_t *h);
-SU_DLL void su_home_get_stats(su_home_t *, int include_clones, 
+SU_DLL void su_home_get_stats(su_home_t *, int include_clones,
 			      su_home_stat_t *stats, isize_t statssize);
 
-SU_DLL void su_home_stat_add(su_home_stat_t *total, 
+SU_DLL void su_home_stat_add(su_home_stat_t *total,
 			     su_home_stat_t const *hs);
 
 struct su_home_stat_t

Modified: 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_bm.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_bm.h	Tue Dec 16 13:05:22 2008
@@ -29,9 +29,9 @@
 /**
  * @file sofia-sip/su_bm.h
  * @brief Boyer-Moore search algorithm
- *  
+ *
  * @author Pekka.Pessi at nokia.com
- * 
+ *
  * @date Created: Mon Apr 11 17:03:13 2005 ppessi
  */
 

Modified: 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_config.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_config.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 #ifndef SU_CONFIG_H
 /** Defined when <sofia-sip/su_config.h> has been included. */
 #define SU_CONFIG_H
-/**@file sofia-sip/su_config.h 
- * 
+/**@file sofia-sip/su_config.h
+ *
  * @b su library configuration
- * 
+ *
  * This file includes an appropriate <sofia-sip/su_configure*.h> include file.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
 
@@ -45,7 +45,7 @@
 #define __malloc__		/* avoid spurious warnigns */
 #endif
 #elif !defined(__attribute__)
-#  define __attribute__(x) 
+#  define __attribute__(x)
 #endif
 
 /* C++ linkage needs to know that types and declarations are C, not C++.  */

Modified: 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_configure.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_configure.h.in	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 #ifndef SU_CONFIGURE_H
 /** Defined when <sofia-sip/su_configure.h> has been included. */
-#define SU_CONFIGURE_H 
+#define SU_CONFIGURE_H
 
 /**@file sofia-sip/su_configure.h
  *
@@ -37,7 +37,7 @@
  * in "config.h".
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Mon Aug 21 20:32:25 2000 ppessi
  */
 
@@ -70,7 +70,7 @@
 #undef SU_HAVE_WINSOCK
 
 /** Define as 1 if you have Winsock2 interface */
-#undef SU_HAVE_WINSOCK2     	
+#undef SU_HAVE_WINSOCK2
 
 /** Define as 1 if you have OSX CoreFoundation interface */
 #undef SU_HAVE_OSX_CF_API
@@ -92,7 +92,7 @@
 #undef SU_INLINE_TAG_CAST
 
 /** Define this as 1 if we can use tags directly from stack. */
-#undef SU_HAVE_TAGSTACK 
+#undef SU_HAVE_TAGSTACK
 
 /* These are valid only for GCC */
 

Modified: 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_debug.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_debug.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef SU_DEBUG_H
 /** Defined when <sofia-sip/su_debug.h> has been included */
-#define SU_DEBUG_H 
+#define SU_DEBUG_H
 
 /**@ingroup su_log
  * @file sofia-sip/su_debug.h
  * @brief SU debugging macros
  *
  * The logging levels and macros to use are defined as follows:
- *  - SU_DEBUG_0()  fatal errors, panic 
+ *  - SU_DEBUG_0()  fatal errors, panic
  *  - SU_DEBUG_1()  critical errors, minimal progress at subsystem level
  *  - SU_DEBUG_2()  non-critical errors
  *  - SU_DEBUG_3()  warnings, progress messages
@@ -44,10 +44,10 @@
  * structure, e.g., "iptsec_debug.h".
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Feb  8 10:06:33 2000 ppessi
  *
- * @sa @ref debug_logs, su_llog(), su_vllog(), #su_log_t, 
+ * @sa @ref debug_logs, su_llog(), su_vllog(), #su_log_t,
  */
 
 #ifndef SU_LOG_H
@@ -82,7 +82,7 @@
 SU_DEBUG_DEF(0)
 /** Log messages at level 0.
  *
- * Fatal errors and panic messages should be logged at level 0. 
+ * Fatal errors and panic messages should be logged at level 0.
  *
  * @sa su_llog(), su_vllog(), #su_log_t, @ref debug_logs
  */
@@ -115,7 +115,7 @@
 
 #if SU_DEBUG_MAX >= 2
 SU_DEBUG_DEF(2)
-/**Log messages at level 2. 
+/**Log messages at level 2.
  *
  * Non-critical errors should be logged at level 2.
  *
@@ -173,7 +173,7 @@
 SU_DEBUG_DEF(7)
 /** Log messages at level 7.
  *
- * Media protocol actions (incoming packets, etc) should be logged at level 7. 
+ * Media protocol actions (incoming packets, etc) should be logged at level 7.
  *
  * @sa su_llog(), su_vllog(), #su_log_t, @ref debug_logs
  */

Modified: 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_errno.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_errno.h	Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
  * socket library and C libraries).
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Dec 22 18:16:06 EET 2005 pessi
  */
 

Modified: 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_localinfo.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_localinfo.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef SU_LOCALINFO_H
 /** Defined when <sofia-sip/su_localinfo.h> has been included. */
-#define SU_LOCALINFO_H 
+#define SU_LOCALINFO_H
 
 
 /**@ingroup su_socket
  * @file sofia-sip/su_localinfo.h  Interface for obtaining local addresses.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Aug 10 18:58:01 2000 ppessi
  */
 
@@ -46,8 +46,8 @@
 
 /** Local address info structure. */
 struct su_localinfo_s {
-  /**Bitwise or of flags: 
-   * #LI_V4MAPPED, #LI_CANONNAME, #LI_NAMEREQD, 
+  /**Bitwise or of flags:
+   * #LI_V4MAPPED, #LI_CANONNAME, #LI_NAMEREQD,
    * #LI_NUMERIC, #LI_DOWN, #LI_IFNAME */
   int li_flags;
   int li_family;		/**< Address family. */

Modified: 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_log.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_log.h	Tue Dec 16 13:05:22 2008
@@ -22,9 +22,9 @@
  *
  */
 
-/**@ingroup su_log 
+/**@ingroup su_log
  * @file sofia-sip/su_log.h   SU logging interface
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
  *
  * @date Created: Thu Feb 22 18:09:02 2001 ppessi
@@ -79,7 +79,7 @@
 
 SOFIAPUBFUN void su_llog(su_log_t *log, unsigned level, char const *fmt, ...)
   __attribute__ ((__format__ (printf, 3, 4)));
-SOFIAPUBFUN void su_vllog(su_log_t *log, unsigned level, 
+SOFIAPUBFUN void su_vllog(su_log_t *log, unsigned level,
 			  char const *fmt, va_list ap);
 SOFIAPUBFUN void su_log_redirect(su_log_t *log, su_logger_f *f, void *stream);
 SOFIAPUBFUN void su_log_set_level(su_log_t *log, unsigned level);

Modified: 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_md5.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_md5.h	Tue Dec 16 13:05:22 2008
@@ -40,7 +40,7 @@
 /** @file sofia-sip/su_md5.h MD5 digest interface.
  *
  * @author <Pekka.Pessi at nokia.com>
- */ 
+ */
 
 #ifndef SU_TYPES_H
 #include "sofia-sip/su_types.h"

Modified: 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_os_nw.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_os_nw.h	Tue Dec 16 13:05:22 2008
@@ -98,9 +98,9 @@
 
 typedef struct su_network_changed_s su_network_changed_t;
 
-/** Function prototype for network-changed callback . 
+/** Function prototype for network-changed callback .
+ *
  *
- * 
  * @since New in @VERSION_1_12_2.
  */
 typedef void (su_network_changed_f)(su_network_changed_magic_t *, su_root_t *);
@@ -112,8 +112,8 @@
 /* Network-changed */
 SOFIAPUBFUN su_network_changed_t *
 su_root_add_network_changed(su_home_t *home,
-			    su_root_t *root, 
-			    su_network_changed_f *, 
+			    su_root_t *root,
+			    su_network_changed_f *,
 			    su_network_changed_magic_t *);
 SOFIAPUBFUN int su_root_remove_network_changed(su_network_changed_t *);
 

Modified: 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_osx_runloop.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_osx_runloop.h	Tue Dec 16 13:05:22 2008
@@ -29,11 +29,11 @@
 /**
  * @file sofia-sip/su_osx_runloop.h
  * @brief OSX Run Loop integration.
- * 
+ *
  * @author Martti Mela <Martti.Mela at nokia.com>
- *  
+ *
  * @date Created: Fri Sep 22 16:49:51 EEST 2006 mela
- * 
+ *
  * @NEW_1_12_4.
  */
 

Modified: 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_strlst.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_strlst.h	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * @file sofia-sip/su_strlst.h String lists
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Fri May  3 09:13:22 2002 ppessi
  */
 
@@ -58,7 +58,7 @@
      __attribute__((__malloc__));
 
 SU_DLL su_strlst_t *su_strlst_vcreate_with_dup(su_home_t *,
-					       char const *, 
+					       char const *,
 					       va_list va)
      __attribute__((__malloc__));
 
@@ -84,14 +84,14 @@
 SU_DLL char const *su_strlst_item(su_strlst_t const *, usize_t i);
 
 /** Set a numbered item to list */
-SU_DLL char const *su_strlst_set_item(su_strlst_t *self, usize_t i, 
+SU_DLL char const *su_strlst_set_item(su_strlst_t *self, usize_t i,
 				      char const *s);
 
 /** Remove a numbered item from list. */
 SU_DLL char const *su_strlst_remove(su_strlst_t *, usize_t i);
 
 /** Concatenate list of strings to one string. */
-SU_DLL char *su_strlst_join(su_strlst_t *s, su_home_t *home, 
+SU_DLL char *su_strlst_join(su_strlst_t *s, su_home_t *home,
 			     char const *sep)
      __attribute__((__malloc__));
 
@@ -100,7 +100,7 @@
      __attribute__((__malloc__));
 
 /** Duplicate and split a string. */
-SU_DLL su_strlst_t *su_strlst_dup_split(su_home_t *, char const *s, 
+SU_DLL su_strlst_t *su_strlst_dup_split(su_home_t *, char const *s,
 					char const *sep)
      __attribute__((__malloc__));
 

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag.h	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
  * @file sofia-sip/su_tag.h  Object-oriented tags and tag list interface.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Feb 20 19:48:18 2001 ppessi
  */
 
@@ -68,7 +68,7 @@
 /** Tag type class */
 typedef struct tag_class_s const tag_class_t;
 
-/** Tag structure. 
+/** Tag structure.
  *
  * The tag structure contains the name, namespace and class of the tag. The
  * fourth field, @a tt_magic, is interpreted by the tag class.
@@ -77,7 +77,7 @@
   char const    *tt_ns;		/**< Tag namespace (e.g., "sip" or "nua") */
   char const 	*tt_name;	/**< Tag name (e.g, "min_se")  */
   tag_class_t   *tt_class;	/**< Tag class defines the type of the value */
-  tag_value_t    tt_magic;	/**< Class-specific data 
+  tag_value_t    tt_magic;	/**< Class-specific data
 				   (e.g., pointer to header class structure) */
 };
 
@@ -96,12 +96,12 @@
 /** Any tag accepted when filtering. */
 SOFIAPUBVAR tag_typedef_t tag_any;
 
-/** Filter tag using function as argument. 
+/** Filter tag using function as argument.
  * @since New in @VERSION_1_12_2.
  */
 SOFIAPUBVAR tag_typedef_t tag_filter;
 
-/** Prototype for filtering function used with TAG_FILTER(). 
+/** Prototype for filtering function used with TAG_FILTER().
  * @since New in @VERSION_1_12_2.
  */
 typedef int tag_filter_f(tagi_t const *filter, tagi_t const *dest);
@@ -121,11 +121,11 @@
 /** @HI Initialize a filter tag item accepting any item. */
 #define TAG_ANY()   tag_any,  (tag_value_t)0
 
-/** @HI Initialize a @a item if condition is true; 
+/** @HI Initialize a @a item if condition is true;
  * otherwise, initialize an empty tag item. */
 #define TAG_IF(condition, item) !(condition) ? tag_skip : item
 
-/** @HI Initialize a filter tag item accepting any item. 
+/** @HI Initialize a filter tag item accepting any item.
  * @since New in @VERSION_1_12_2.
  */
 #define TAG_FILTER(function)  tag_filter, tag_filter_v(function)
@@ -134,7 +134,7 @@
 SOFIAPUBFUN int t_snprintf(tagi_t const *t, char b[], size_t size);
 
 /** Convert string to a tag value */
-SOFIAPUBFUN int t_scan(tag_type_t tt, su_home_t *home, char const *s, 
+SOFIAPUBFUN int t_scan(tag_type_t tt, su_home_t *home, char const *s,
 		       tag_value_t *return_value);
 
 /* Tagarg functions */
@@ -142,7 +142,7 @@
 SOFIAPUBFUN size_t tl_tmove(tagi_t *dst, size_t, tag_type_t, tag_value_t, ...);
 SOFIAPUBFUN int tl_gets(tagi_t const lst[], tag_type_t, tag_value_t, ...);
 SOFIAPUBFUN int tl_tgets(tagi_t lst[], tag_type_t, tag_value_t, ...);
-SOFIAPUBFUN tagi_t *tl_tfilter(su_home_t *, tagi_t const lst[], 
+SOFIAPUBFUN tagi_t *tl_tfilter(su_home_t *, tagi_t const lst[],
 			       tag_type_t, tag_value_t, ...);
 SOFIAPUBFUN int tl_tremove(tagi_t lst[], tag_type_t, tag_value_t, ...);
 
@@ -162,7 +162,7 @@
 SOFIAPUBFUN tagi_t *tl_afilter(su_home_t *, tagi_t const filter[],
 			       tagi_t const lst[]);
 
-SOFIAPUBFUN tagi_t *tl_filtered_tlist(su_home_t *home, tagi_t const filter[], 
+SOFIAPUBFUN tagi_t *tl_filtered_tlist(su_home_t *home, tagi_t const filter[],
 				      tag_type_t, tag_value_t, ...);
 
 SOFIAPUBFUN size_t  tl_vlen(va_list ap);
@@ -192,7 +192,7 @@
 su_inline tag_value_t tag_ptr_vr(void *vp, void *v)
   { (void)v; return(tag_value_t)vp; }
 su_inline tag_value_t tag_cptr_v(void const *v) { return (tag_value_t)v; }
-su_inline tag_value_t tag_cptr_vr(void *vp, void const *v) 
+su_inline tag_value_t tag_cptr_vr(void *vp, void const *v)
   { (void)v; return(tag_value_t)vp; }
 su_inline tag_value_t tag_cstr_v(char const *v) { return (tag_value_t)v; }
 su_inline tag_value_t tag_cstr_vr(char const**vp) {return(tag_value_t)vp;}
@@ -202,7 +202,7 @@
 extern "C++" {
   su_inline tag_value_t tag_ptr_v(void const *v)
   { return (tag_value_t)v; }
-  su_inline tag_value_t tag_ptr_vr(void *vp, void const *p) 
+  su_inline tag_value_t tag_ptr_vr(void *vp, void const *p)
   { return (tag_value_t)vp; }
   su_inline tag_value_t tag_str_v(char *v) { return (tag_value_t)v; }
   su_inline tag_value_t tag_str_vr(char **vp) {return (tag_value_t)vp;}

Modified: 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_class.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_class.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef SU_TAG_CLASS_H
 /** Defined when <sofia-sip/su_tag_class.h> has been included. */
-#define SU_TAG_CLASS_H 
+#define SU_TAG_CLASS_H
 
 /**@SU_TAG
  * @file  su_tag_class.h
- * @brief Tag class interface for object-oriented tags 
+ * @brief Tag class interface for object-oriented tags
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Feb 21 00:49:41 2001 ppessi
  */
 

Modified: 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_inline.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_inline.h	Tue Dec 16 13:05:22 2008
@@ -24,13 +24,13 @@
 
 #ifndef SU_TAG_INLINE_H
 /** Defined when <sofia-sip/su_tag_inline.h> has been included */
-#define SU_TAG_INLINE_H 
+#define SU_TAG_INLINE_H
 /**@SU_TAG
  * @file sofia-sip/su_tag_inline.h
  * Inline functions for object tags and tag lists.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Feb 20 19:48:18 2001 ppessi
  */
 
@@ -69,7 +69,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(t);
 
-  if (tt->tt_next) 
+  if (tt->tt_next)
     return tt->tt_next(t);
   else
     return t + 1;
@@ -79,7 +79,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(src);
 
-  if (tt->tt_move) 
+  if (tt->tt_move)
     return tt->tt_move(dst, src);
 
   *dst = *src;
@@ -90,7 +90,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(t);
 
-  if (tt->tt_xtra) 
+  if (tt->tt_xtra)
     return tt->tt_xtra(t, offset);
 
   return 0;
@@ -100,7 +100,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(src);
 
-  if (tt->tt_dup) 
+  if (tt->tt_dup)
     return tt->tt_dup(dst, src, bb);
 
   *dst = *src;
@@ -112,7 +112,7 @@
   if (!tt)
     return NULL;
 
-  if (tt->tt_find) 
+  if (tt->tt_find)
     return tt->tt_find(tt, lst);
 
   for (; lst; lst = t_next(lst)) {
@@ -127,7 +127,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(t);
 
-  if (tt->tt_free) 
+  if (tt->tt_free)
     return tt->tt_free(t);
   else if (tt->tt_next)
     return (tagi_t *)tt->tt_next(t);
@@ -139,7 +139,7 @@
 {
   tag_type_t tt = TAG_TYPE_OF(t);
 
-  if (tt->tt_len) 
+  if (tt->tt_len)
     return tt->tt_len(t);
 
   return sizeof(*t);

Modified: 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_tag_io.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tag_io.h	Tue Dec 16 13:05:22 2008
@@ -24,14 +24,14 @@
 
 #ifndef SU_TAG_IO_H
 /** Defined when <sofia-sip/su_tag_io.h> has been included */
-#define SU_TAG_IO_H 
+#define SU_TAG_IO_H
 
 /**@SU_TAG
  * @file sofia-sip/su_tag_io.h
  * @brief I/O interface for tag lists
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Feb 21 12:10:06 2001 ppessi
  */
 
@@ -52,8 +52,8 @@
 su_inline tag_value_t tag_socket_v(su_socket_t v) {
   return (tag_value_t)v;
 }
-su_inline tag_value_t tag_socket_vr(su_socket_t *vp) { 
-  return (tag_value_t)vp; 
+su_inline tag_value_t tag_socket_vr(su_socket_t *vp) {
+  return (tag_value_t)vp;
 }
 #else
 #define tag_socket_v(v)   (tag_value_t)(v)

Modified: 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_tagarg.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_tagarg.h	Tue Dec 16 13:05:22 2008
@@ -26,11 +26,11 @@
 /** Defined when <sofia-sip/su_tagarg.h> has been included. */
 #define SU_TAGARG_H
 
-/**@SU_TAG 
+/**@SU_TAG
  * @file sofia-sip/su_tagarg.h  Tagged argument lists
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Feb 20 19:48:18 2001 ppessi
  */
 
@@ -54,14 +54,14 @@
  *
  * Such a function could be called as follows:
  * @code
- *   tag_print(stdout, 
- *             TAG_STRING("a is"), TAG_INT(a), 
+ *   tag_print(stdout,
+ *             TAG_STRING("a is"), TAG_INT(a),
  *             TAG_STRING("b is"), URLTAG_URL(b),
  *             TAG_IF(c, TAG_STRING("and c is true")),
  *             TAG_END());
  * @endcode
  *
- * @note 
+ * @note
  * The tagged argument list @b must be terminated by a TAG_END(),
  * TAG_NULL() or TAG_NEXT().
  */
@@ -180,7 +180,7 @@
   (ta).tl[0].t_tag, (ta).tl[0].t_value, (ta).tl[1].t_tag, (ta).tl[1].t_value
 
 /**Handle return from function with tagged argument list
- * 
+ *
  * The ta_end() macro handles return from function whose tagged argument
  * list was initialized by ta_start().
  *

Modified: 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_time.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_time.h	Tue Dec 16 13:05:22 2008
@@ -26,9 +26,9 @@
 /** Defined when <sofia-sip/su_time.h> has been included. */
 #define SU_TIME_H
 /**@ingroup su_time
- * @file sofia-sip/su_time.h 
+ * @file sofia-sip/su_time.h
  * @brief Time types and functions.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  *
@@ -40,35 +40,35 @@
 
 SOFIA_BEGIN_DECLS
 
-/** Time in seconds and microsecondcs. 
+/** Time in seconds and microsecondcs.
  *
  * The structure su_time_t contains time in seconds and microseconds since
  * epoch (January 1, 1900).
  */
-struct su_time_s { 
+struct su_time_s {
   unsigned long tv_sec;		/**< Seconds */
   unsigned long tv_usec;	/**< Microseconds  */
 };
 /** Time in seconds and microsecondcs. */
 typedef struct su_time_s su_time_t;
 
-/** Time difference in microseconds. 
- * 
+/** Time difference in microseconds.
+ *
  * The type su_duration_t is used to present small time differences (24
  * days), usually calculated between two su_time_t timestamps.  Note that
  * the su_duration_t is signed.
  */
 typedef long su_duration_t;
 
-enum { 
+enum {
   /** Maximum duration in milliseconds. */
-  SU_DURATION_MAX = 0x7fffffffL 
+  SU_DURATION_MAX = 0x7fffffffL
 };
 #define SU_DURATION_MAX SU_DURATION_MAX
 
-/** NTP timestamp. 
- * 
- * NTP timestamp is defined as microseconds since epoch (1-Jan-1900) 
+/** NTP timestamp.
+ *
+ * NTP timestamp is defined as microseconds since epoch (1-Jan-1900)
  * with 64-bit resolution.
  */
 typedef uint64_t su_ntp_t;
@@ -79,11 +79,11 @@
 #define SU_TIME_CMP(t1, t2) su_time_cmp(t1, t2)
 
 /** Seconds from 1.1.1900 to 1.1.1970. @NEW_1_12_4. */
-#define SU_TIME_EPOCH 2208988800UL 
+#define SU_TIME_EPOCH 2208988800UL
 
 typedef uint64_t su_nanotime_t;
 
-#define SU_E9 (1000000000U) 
+#define SU_E9 (1000000000U)
 
 SOFIAPUBFUN su_nanotime_t su_nanotime(su_nanotime_t *return_time);
 SOFIAPUBFUN su_nanotime_t su_monotime(su_nanotime_t *return_time);
@@ -116,7 +116,7 @@
 {
   /*
    * Multiply usec by 0.065536 (ie. 2**16 / 1E6)
-   * 
+   *
    * Utilize fact that 0.065536 == 1024 / 15625
    */
   return (t.tv_sec << 16) + (1024 * t.tv_usec + 7812) / 15625;

Modified: 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_types.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_types.h	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
 /**@file sofia-sip/su_types.h Basic integer types for @b su library.
  *
  * This include file provides <stdint.h> or <inttypes.h> types.
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
@@ -79,21 +79,21 @@
 typedef unsigned SU_INTPTR_T uintptr_t;
 #endif
 
-/** 64-bit unsigned integer */ 
+/** 64-bit unsigned integer */
 typedef SU_U64_T uint64_t;
-/** 64-bit signed integer */   
+/** 64-bit signed integer */
 typedef SU_S64_T int64_t;
-/** 32-bit unsigned integer */ 
+/** 32-bit unsigned integer */
 typedef SU_U32_T uint32_t;
-/** 32-bit signed integer */   
+/** 32-bit signed integer */
 typedef SU_S32_T int32_t;
-/** 16-bit unsigned integer */ 
+/** 16-bit unsigned integer */
 typedef SU_U16_T uint16_t;
-/** 16-bit signed integer */   
+/** 16-bit signed integer */
 typedef SU_S16_T int16_t;
-/** 8-bit unsigned integer */  
+/** 8-bit unsigned integer */
 typedef SU_U8_T  uint8_t;
-/** 8-bit signed integer */    
+/** 8-bit signed integer */
 typedef SU_S8_T  int8_t;
 
 /** At least 64-bit integer */
@@ -119,9 +119,9 @@
 #endif
 
 #ifdef SOFIA_ISIZE_T
-/** Compatibility type. 
+/** Compatibility type.
  *
- * sofia-sip <= 1.12.1 often used int for count of bytes. 
+ * sofia-sip <= 1.12.1 often used int for count of bytes.
  * When configured for compatibility with sofia-sip 1.12.0, this is defined
  * as int, otherwise as size_t. Note that int is signed and size_t is
  * unsigned.
@@ -134,9 +134,9 @@
 #endif
 
 #ifdef SOFIA_ISSIZE_T
-/**Compatibility type. 
+/**Compatibility type.
  *
- * sofia-sip <= 1.12.1 used int for count of bytes. 
+ * sofia-sip <= 1.12.1 used int for count of bytes.
  * When configured for compatibility with sofia-sip 1.12.0, this is defined
  * as int, otherwise as ssize_t. (-1 is used for error indication).
  *
@@ -148,9 +148,9 @@
 #endif
 
 #ifdef SOFIA_USIZE_T
-/**Compatibility type. 
+/**Compatibility type.
  *
- * sofia-sip <= 1.12.1 sometimes used unsigned int for count of bytes. 
+ * sofia-sip <= 1.12.1 sometimes used unsigned int for count of bytes.
  * When configured for compatibility with sofia-sip 1.12.0, this is defined
  * as unsigned int, otherwise as size_t.
  *

Modified: 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_uniqueid.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_uniqueid.h	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 #ifndef SU_UNIQUEID_H
 /** Defined when <sofia-sip/su_uniqueid.h> has been included. */
-#define SU_UNIQUEID_H 
+#define SU_UNIQUEID_H
 
 
 /**@ingroup su_uniqueid
@@ -33,7 +33,7 @@
  * Functions to handle GloballyUniqueIDs.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Apr 15 06:31:41 1997 pessi
  *
  */
@@ -45,8 +45,8 @@
 SOFIA_BEGIN_DECLS
 
 /** Globally unique identifier type. */
-typedef union GloballyUniqueIdentifier { 
-  unsigned char id[16]; 
+typedef union GloballyUniqueIdentifier {
+  unsigned char id[16];
   struct {
     uint32_t  time_low;
     uint16_t  time_mid;
@@ -60,8 +60,8 @@
 /** Return node identifier */
 SOFIAPUBFUN size_t su_node_identifier(void *address, size_t addrlen);
 
-/** Generate a GUID 
- * 
+/** Generate a GUID
+ *
  * The function guid_generate() generates a new globally unique identifier
  * for an IP telephony call.  The guid follows the structure specified in
  * the ITU-T recommendation H.225.0 v2.  The guid is usable also in SIP
@@ -78,19 +78,19 @@
  * H.225.0 v2.  The printed identifier can be used as a SIP @b Call-ID if
  * the colons in IEEE MAC address are replaced with '-', '+' or other
  * character allowed in SIP @e token.
- * 
+ *
  * @param buf  [out] buffer to store the formatted globally unique identifier
  * @param len  [in] size of buffer @a buf (should be at least guid_strlen bytes)
  * @param guid [in] pointer to structure containing globally unique identifier
- * 
- * @retval 
+ *
+ * @retval
  * The function guid_sprintf() returns length of the formatted
  * globally unique identifier excluding the final NUL.
  */
 SOFIAPUBFUN isize_t su_guid_sprintf(char* buf, size_t len, su_guid_t const *guid);
 
-enum { 
-  /** Length of guid in hex format */ 
+enum {
+  /** Length of guid in hex format */
   su_guid_strlen = 8 + 5 + 5 + 5 + 13
 };
 
@@ -102,7 +102,7 @@
  * @param lb [in] lower bound
  * @param ub [in] upper bound
  *
- * @return 
+ * @return
 * The function randint() returns a pseudo-random integer.
  */
 SOFIAPUBFUN int su_randint(int lb, int ub);

Modified: 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_vector.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_vector.h	Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
 
 /**@file sofia-sip/su_vector.h
  * @brief Vector interface
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *  
+ *
  * @date Created: Fri Sep 27 14:31:15 2002 ppessi
  */
 

Modified: 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/su_wait.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/su_wait.h	Tue Dec 16 13:05:22 2008
@@ -31,7 +31,7 @@
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Martti Mela <Martti.Mela at nokia.com>
- * 
+ *
  * @date Created: Tue Sep 14 15:51:04 1999 ppessi
  */
 
@@ -236,8 +236,8 @@
 typedef SU_ROOT_MAGIC_T su_root_magic_t;
 
 #ifndef SU_WAKEUP_ARG_T
-/**Default type of @link ::su_wakeup_f wakeup function @endlink 
- * @link ::su_wakeup_arg_t argument type @endlink.  
+/**Default type of @link ::su_wakeup_f wakeup function @endlink
+ * @link ::su_wakeup_arg_t argument type @endlink.
  *
  * The application can define the typedef ::su_wakeup_arg_t by defining
  * the SU_WAKEUP_ARG_T () before including <sofia-sip/su_wait.h>, for example,
@@ -249,7 +249,7 @@
 #define SU_WAKEUP_ARG_T void
 #endif
 
-/** @link ::su_wakeup_f Wakeup callback @endlink argument type. 
+/** @link ::su_wakeup_f Wakeup callback @endlink argument type.
  *
  * The application can define the typedef ::su_wakeup_arg_t by defining
  * the SU_WAKEUP_ARG_T () before including <sofia-sip/su_wait.h>, for example,
@@ -260,7 +260,7 @@
  */
 typedef SU_WAKEUP_ARG_T su_wakeup_arg_t;
 
-/** Wakeup callback function pointer type. 
+/** Wakeup callback function pointer type.
  *
  * Whenever a registered wait object receives an event, the @link
  * ::su_wakeup_f callback function @endlink is invoked.
@@ -269,7 +269,7 @@
 			   su_wait_t *,
 			   su_wakeup_arg_t *arg);
 
-enum { 
+enum {
   su_pri_normal,		/**< Normal priority */
   su_pri_first,			/**< Elevated priority */
   su_pri_realtime		/**< Real-time priority */
@@ -310,9 +310,9 @@
 typedef SU_PREPOLL_MAGIC_T su_prepoll_magic_t;
 
 
-/** Pre-poll callback function prototype. 
+/** Pre-poll callback function prototype.
+ *
  *
- * 
  */
 typedef void su_prepoll_f(su_prepoll_magic_t *, su_root_t *);
 
@@ -327,7 +327,7 @@
 /** Default type of timer expiration callback function argument type.
  * Application may define this to appropriate type before including
  * <sofia-sip/su_wait.h>. */
-#define SU_TIMER_ARG_T void 
+#define SU_TIMER_ARG_T void
 #endif
 
 /** Timer object type. */
@@ -337,7 +337,7 @@
 typedef SU_TIMER_ARG_T su_timer_arg_t;
 
 /** Timeout function type. */
-typedef void (*su_timer_f)(su_root_magic_t *magic, 
+typedef void (*su_timer_f)(su_root_magic_t *magic,
 			   su_timer_t *t,
 			   su_timer_arg_t *arg);
 
@@ -372,7 +372,7 @@
 /** Default type of su_msg_t message data.  Application may define this to
  * appropriate type before including <sofia-sip/su_wait.h>.
  */
-#define SU_MSG_ARG_T void 
+#define SU_MSG_ARG_T void
 #endif
 
 /** Message argument type. */
@@ -394,7 +394,7 @@
 #define SU_MSG_R_INIT   { NULL }
 
 /** Message delivery function type. */
-typedef void su_msg_function(su_root_magic_t *magic, 
+typedef void su_msg_function(su_root_magic_t *magic,
 			     su_msg_r msg,
 			     su_msg_arg_t *arg);
 
@@ -454,14 +454,14 @@
 SOFIAPUBFUN char const *su_root_name(su_root_t *self);
 SOFIAPUBFUN int su_root_set_magic(su_root_t *self, su_root_magic_t *magic);
 SOFIAPUBFUN su_root_magic_t *su_root_magic(su_root_t *root);
-SOFIAPUBFUN int su_root_register(su_root_t*, su_wait_t *, 
+SOFIAPUBFUN int su_root_register(su_root_t*, su_wait_t *,
 				 su_wakeup_f, su_wakeup_arg_t *,
 				 int priority);
 /* This is slow. Deprecated. */
-SOFIAPUBFUN int su_root_unregister(su_root_t*, su_wait_t *, 
+SOFIAPUBFUN int su_root_unregister(su_root_t*, su_wait_t *,
 				   su_wakeup_f, su_wakeup_arg_t*);
 SOFIAPUBFUN int su_root_deregister(su_root_t*, int);
-SOFIAPUBFUN int su_root_eventmask(su_root_t *, 
+SOFIAPUBFUN int su_root_eventmask(su_root_t *,
 				  int index, int socket, int events);
 SOFIAPUBFUN su_duration_t su_root_step(su_root_t *root, su_duration_t timeout);
 SOFIAPUBFUN su_duration_t su_root_sleep(su_root_t *root, su_duration_t);
@@ -471,8 +471,8 @@
 SOFIAPUBFUN _su_task_r su_root_task(su_root_t const *root);
 SOFIAPUBFUN _su_task_r su_root_parent(su_root_t const *root);
 
-SOFIAPUBFUN int su_root_add_prepoll(su_root_t *root, 
-				    su_prepoll_f *, 
+SOFIAPUBFUN int su_root_add_prepoll(su_root_t *root,
+				    su_prepoll_f *,
 				    su_prepoll_magic_t *);
 SOFIAPUBFUN int su_root_remove_prepoll(su_root_t *root);
 
@@ -494,13 +494,13 @@
 SOFIAPUBFUN int su_timer_set_at(su_timer_t *, su_timer_f,
 				su_timer_arg_t *, su_time_t);
 SOFIAPUBFUN int su_timer_run(su_timer_t *, su_timer_f, su_timer_arg_t *);
-SOFIAPUBFUN int su_timer_set_for_ever(su_timer_t *, su_timer_f, 
+SOFIAPUBFUN int su_timer_set_for_ever(su_timer_t *, su_timer_f,
 				      su_timer_arg_t *);
 SOFIAPUBFUN int su_timer_reset(su_timer_t *);
 
 SOFIAPUBFUN su_root_t *su_timer_root(su_timer_t const *);
 
-SOFIAPUBFUN int su_timer_expire(su_timer_queue_t * const, 
+SOFIAPUBFUN int su_timer_expire(su_timer_queue_t * const,
 				su_duration_t *tout,
 				su_time_t now);
 
@@ -526,7 +526,7 @@
 
 /* Messages */
 SOFIAPUBFUN int su_msg_create(su_msg_r msg,
-			      su_task_r const to, su_task_r const from, 
+			      su_task_r const to, su_task_r const from,
 			      su_msg_f wakeup, isize_t size);
 SOFIAPUBFUN int su_msg_report(su_msg_r msg, su_msg_f report);
 SOFIAPUBFUN int su_msg_deinitializer(su_msg_r msg, su_msg_deinit_function *);
@@ -543,7 +543,7 @@
 
 SOFIAPUBFUN int su_msg_new(su_msg_r msg, size_t size);
 SOFIAPUBFUN int su_msg_send_to(su_msg_r msg,
-			       su_task_r const to, 
+			       su_task_r const to,
 			       su_msg_f wakeup);
 
 /** Does reference contain a message? */
@@ -559,10 +559,10 @@
 
 /* Clones */
 SOFIAPUBFUN int su_root_threading(su_root_t *self, int enable);
-SOFIAPUBFUN int su_clone_start(su_root_t *root, 
+SOFIAPUBFUN int su_clone_start(su_root_t *root,
 			       su_clone_r,
 			       su_root_magic_t *magic,
-			       su_root_init_f, 
+			       su_root_init_f,
 			       su_root_deinit_f);
 SOFIAPUBFUN _su_task_r su_clone_task(su_clone_r);
 SOFIAPUBFUN void su_clone_forget(su_clone_r);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/tstdef.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/tstdef.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/tstdef.h	Tue Dec 16 13:05:22 2008
@@ -25,14 +25,14 @@
 /**@file sofia-sip/tstdef.h Macros for unit tests
  *
  * The macros defined here can be used by unit test programs. When a test
- * fails, the TEST macros print the offending file name and line number. 
+ * fails, the TEST macros print the offending file name and line number.
  * They use format that is accepted by Emacs and other fine editors so you
  * can directly go to the source code of the failed test with next-error.
- * 
- * @note There is no protection agains multiple inclusion. 
+ *
+ * @note There is no protection agains multiple inclusion.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Aug 22 13:53:24 2001 ppessi
  *
  * @par Example Program
@@ -45,50 +45,50 @@
  *
  * You should typedef longlong to integer type at least 64 bit wide before
  * including <sofia-sip/tstdef.h>, too.
- * 
+ *
  * As an example, we provide a test program making sure that inet_ntop() and
  * inet_pton() behave as expected and that we can create UDP/IPv4 sockets
  * with @b su library:
  *
  * @code
  * #include "config.h"
- * 
+ *
  * #include <stdio.h>
  * #include <limits.h>
- * 
+ *
  * #include <sofia-sip/su.h>
- * 
+ *
  * #define TSTFLAGS tstflags
  *
  * #include <stdlib.h>
  * #include <sofia-sip/tstdef.h>
  *
  * static int tstflags = 0;
- * 
+ *
  * void usage(void)
  * {
  *   fprintf(stderr, "usage: %s [-v|--verbatim]\n", name);
  *   exit(2);
  * }
- * 
+ *
  * static int socket_test(void);
- * 
+ *
  * int main(int argc, char *argv[])
  * {
  *   int retval = 0, i;
- * 
+ *
  *   for (i = 1; argv[i]; i++) {
  *     if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbatim") == 0)
  *       tstflags |= tst_verbatim;
  *     else
  *       usage();
  *   }
- * 
+ *
  *   retval |= socket_test(); fflush(stdout);
- * 
+ *
  *   return retval;
  * }
- * 
+ *
  * double max_bandwidth()
  *
  * int socket_test(void)
@@ -99,19 +99,19 @@
  *   unsigned long addr;
  *
  *   BEGIN();
- * 
+ *
  *   // Check inet_ntop() return value (Tests equality of integral values)
  *   TEST(inet_ntop(AF_INET, &localhost, buf, sizeof buf), buf);
- * 
+ *
  *   // Check inet_ntop() result (Tests equality of strings)
  *   TEST_S(buf, "127.0.0.1");
- * 
+ *
  *   // Check inet_pton() argument validation (Tests equality of ints)
  *   TEST(inet_pton(0, buf, &addr), -1);
- * 
+ *
  *   // Check inet_pton() return value (Tests for true value (non-zero))
  *   TEST_1(inet_pton(AF_INET, buf, &addr) > 0);
- * 
+ *
  *   // Check inet_pton() result (Tests equality of memory areas)
  *   TEST_M(&addr, &localhost, sizeof(addr));
  *
@@ -158,7 +158,7 @@
 /** End a test function. @HIDE */
 #define END() (void) tstdef_dummy; } END_(TSTFLAGS)
 /**Test that @a suite returns a nonzero value.
- * @deprecated Use TEST_1() 
+ * @deprecated Use TEST_1()
  * @HIDE */
 #define TEST0(suite) TEST_1_(TSTFLAGS, suite)
 /** Test that @a suite returns a nonzero value. @HIDE */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strcasestr.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strcasestr.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strcasestr.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@internal @file strcasestr.c
  * @brief Backup implementation of strcasestr()
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  */
 
@@ -67,7 +67,7 @@
       }
     }
     haystack++;
-  } 
+  }
 
   return NULL;		/* Not found */
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strtoull.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strtoull.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/strtoull.c	Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-/* 
+/*
  * strtoull.c --
  *
  *	Source code for the "strtoull" library procedure.
@@ -8,7 +8,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
@@ -40,7 +40,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
@@ -48,7 +48,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.
  */
 
 #include "config.h"
@@ -132,7 +132,7 @@
      * If no base was provided, pick one from the leading characters
      * of the string.
      */
-    
+
     if (base == 0) {
 	if (*p == '0') {
 	    p += 1;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.c	Tue Dec 16 13:05:22 2008
@@ -24,13 +24,13 @@
 
 /**@ingroup su_socket
  * @CFILE su.c OS-independent socket functions
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
 
-#include "config.h" 
+#include "config.h"
 
 #if HAVE_SYS_SOCKIO_H
 #include <sys/sockio.h>
@@ -68,12 +68,12 @@
 
 /** Create a socket endpoint for communication.
  *
- * @param af addressing family 
- * @param socktype socket type 
+ * @param af addressing family
+ * @param socktype socket type
  * @param proto protocol number specific to the addressing family
  *
  * The newly created socket is nonblocking unless global variable
- * su_socket_blocking is set to true. 
+ * su_socket_blocking is set to true.
  *
  * Also, the newly created socket is closed on exec() if global variable
  * su_socket_close_on_exec is set to true. Note that a multithreaded program
@@ -109,7 +109,7 @@
 
   /* Assign socket to an already active access point (interface) */
   ioctl(s, SIOCSIFNAME, &ifr);
-  ioctl(s, SIOCIFSTART, &ifr);	
+  ioctl(s, SIOCIFSTART, &ifr);
 #endif
 
   return s;
@@ -123,7 +123,7 @@
 extern void *su_localinfo_ap_set(su_sockaddr_t *su, int *index);
 extern int su_localinfo_ap_deinit(void *aconn);
 #define NUMIFS 64
-  
+
 int su_localinfo_ap_name_to_index(int ap_index)
 {
   struct ifconf ifc;
@@ -136,7 +136,7 @@
   s= socket(AF_INET, SOCK_STREAM, 0);
   if (s < 0)
     return -1;
-  
+
   ifc.ifc_len = NUMIFS * sizeof (struct ifreq);
 
   memset(buf, 0, ifc.ifc_len);
@@ -179,12 +179,12 @@
 #error Unknown index field in struct ifreq
 #endif
 
-    if (ap_index == if_index) 
+    if (ap_index == if_index)
     {
       strncpy(su_global_ap_name, (const char *) if_name, sizeof(su_global_ap_name));
       error = 0;
     };
-  
+
 #else
 #error su_localinfo() cannot map interface name to number
 #endif
@@ -200,8 +200,8 @@
 /** Initialize socket implementation.
  *
  * Before using any sofia-sip-ua functions, the application should call
- * su_init() in order to initialize run-time environment including sockets. 
- * This function may prepare plugins if there are any. 
+ * su_init() in order to initialize run-time environment including sockets.
+ * This function may prepare plugins if there are any.
  *
  * @par POSIX Implementation
  * The su_init() initializes debugging logs and ignores the SIGPIPE signal.
@@ -260,7 +260,7 @@
   if (mode < 0)
      return -1;
 
-  if (blocking) 
+  if (blocking)
     mode &= ~(O_NDELAY | O_NONBLOCK);
   else
     mode |= O_NDELAY | O_NONBLOCK;
@@ -320,7 +320,7 @@
 int su_setblocking(su_socket_t s, int blocking)
 {
   unsigned long nonBlock = !blocking;
-  
+
   return ioctlsocket(s, FIONBIO, &nonBlock);
 }
 
@@ -350,7 +350,7 @@
 
 int su_setreuseaddr(su_socket_t s, int reuse)
 {
-  return setsockopt(s, SOL_SOCKET, SO_REUSEADDR, 
+  return setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
 		    (void *)&reuse, (socklen_t)sizeof(reuse));
 }
 
@@ -442,7 +442,7 @@
   if (length > INT_MAX)
     length = INT_MAX;
 
-  retval = recvfrom(s, buffer, (int)length, flags, 
+  retval = recvfrom(s, buffer, (int)length, flags,
 		    &from->su_sa, fromlen ? &ilen : NULL);
 
   if (fromlen)
@@ -458,7 +458,7 @@
 {
   int ret;
   DWORD bytes_sent = (DWORD)su_failure;
-  
+
   ret = WSASendTo(s,
 		  (LPWSABUF)iov,
 		  (DWORD)iovlen,
@@ -552,13 +552,13 @@
 
   if ((rv = a->su_family - b->su_family))
     return rv;
-  
+
   if (a->su_family == AF_INET)
-    rv = memcmp(&a->su_sin.sin_addr, &b->su_sin.sin_addr, 
+    rv = memcmp(&a->su_sin.sin_addr, &b->su_sin.sin_addr,
 		sizeof(struct in_addr));
 #if SU_HAVE_IN6
   else if (a->su_family == AF_INET6)
-    rv = memcmp(&a->su_sin6.sin6_addr, &b->su_sin6.sin6_addr, 
+    rv = memcmp(&a->su_sin6.sin6_addr, &b->su_sin6.sin6_addr,
 		sizeof(struct in6_addr));
 #endif
   else
@@ -566,7 +566,7 @@
 
   if (rv)
     return rv;
-  
+
   return a->su_port - b->su_port;
 }
 
@@ -592,7 +592,7 @@
   if (a->su_family == 0 || SU_SOCKADDR_INADDR_ANY(a))
     ;
   else if (a->su_family == AF_INET) {
-    if (memcmp(&a->su_sin.sin_addr, &b->su_sin.sin_addr, 
+    if (memcmp(&a->su_sin.sin_addr, &b->su_sin.sin_addr,
 	       sizeof(struct in_addr)))
       return 0;
   }
@@ -600,7 +600,7 @@
   else if (a->su_family == AF_INET6) {
     if (a->su_scope_id != 0 && a->su_scope_id != b->su_scope_id)
       return 0;
-    if (memcmp(&a->su_sin6.sin6_addr, &b->su_sin6.sin6_addr, 
+    if (memcmp(&a->su_sin6.sin6_addr, &b->su_sin6.sin6_addr,
 	       sizeof(struct in6_addr)))
       return 0;
   }
@@ -610,7 +610,7 @@
 
   if (a->su_port == 0)
     return 1;
-  
+
   return a->su_port == b->su_port;
 }
 
@@ -624,10 +624,10 @@
   if (!IN6_IS_ADDR_V4MAPPED(&su->su_sin6.sin6_addr) &&
       !IN6_IS_ADDR_V4COMPAT(&su->su_sin6.sin6_addr))
     return;
-  
+
   su->su_family = AF_INET;
   su->su_array32[1] = su->su_array32[5];
-  su->su_array32[2] = 0; 
+  su->su_array32[2] = 0;
   su->su_array32[3] = 0;
 #endif
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su.docs	Tue Dec 16 13:05:22 2008
@@ -6,11 +6,11 @@
  *
  * The @b su module contains a simple, portable socket/timing/synchronizing
  * library developed for Sofia communications software.
- * 
+ *
  * @CONTACT Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @STATUS @SofiaSIP Core library
- * 
+ *
  * @LICENSE LGPL
  *
  * @section su_overview Overview
@@ -19,9 +19,9 @@
  *
  * - <sofia-sip/su_types.h> - integral types
  * - <sofia-sip/su_alloc.h> - @ref su_alloc memory management
- * - <sofia-sip/su.h> - @ref su_socket 
+ * - <sofia-sip/su.h> - @ref su_socket
  *   - <sofia-sip/su_localinfo.h> - get list of local IP addresses
- * - <sofia-sip/su_wait.h> - @ref su_wait 
+ * - <sofia-sip/su_wait.h> - @ref su_wait
  * - <sofia-sip/su_time.h> - @ref su_time
  * - <sofia-sip/su_log.h> - @ref su_log
  * - <sofia-sip/su_tag.h> - @ref su_tag
@@ -62,19 +62,19 @@
  * - <a href=group_su_alloc.html>su_alloc</a> - memory management functions
  * - <a href=group_su_log.html>su_log</a> - generic logging functions
  * - <a href=group_su_tag.html>su_tag</a> - tag list function
- * - <a href=group_su_md5.html>su_md5</a> - MD5 hashing 
+ * - <a href=group_su_md5.html>su_md5</a> - MD5 hashing
  */
 
 /**@defgroup su_programs Shell Programs
- * 
+ *
  * The @b su module provides few shell utilities:
  * - @ref localinfo (localinfo.c)
- * - @ref addrinfo (addrinfo.c) 
+ * - @ref addrinfo (addrinfo.c)
  */
 
 /**@defgroup su_socket Socket Functions
  *
- *  @brief The <sofia-sip/su.h> contains the portable socket functions. 
+ *  @brief The <sofia-sip/su.h> contains the portable socket functions.
  *
  *  The <sofia-sip/su.h> contains following functions, macros, and types:
  *    - su_init(): initializes sockets
@@ -84,7 +84,7 @@
  *    - su_ioctl(): ioctl to a socket
  *    - su_setreuseaddr(): set/reset reusing the addresses/ports for a socket
  *    - su_setblocking(): enables/disables blocking
- *    - su_is_blocking(): checks if the previous call failed because it 
+ *    - su_is_blocking(): checks if the previous call failed because it
  *  	would have blocked
  *    - su_errno(): the latest socket error
  *    - su_perror(): prints the latest socket error message to stderr

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_addrinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_addrinfo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_addrinfo.c	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -13,7 +13,7 @@
  * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -83,7 +83,7 @@
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 
 };
-static const char in_loopback[] = { 127, 0, 0, 1 }; 
+static const char in_loopback[] = { 127, 0, 0, 1 };
 static const char in6_loopback[] = {
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
 };
@@ -100,7 +100,7 @@
 	int a_socklen;
 	int a_off;
 	const char *a_addrany;
-	const char *a_loopback;	
+	const char *a_loopback;
 } gai_afdl [] = {
 #if SU_HAVE_IN6
 #define N_INET6 0
@@ -142,7 +142,7 @@
 static int get_addr(const char *, int, struct addrinfo **,
 		    struct addrinfo *, int);
 static int str_isnumber(const char *);
-	
+
 #define GET_CANONNAME(ai, str) \
 if (pai->ai_flags & AI_CANONNAME) {\
 	if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
@@ -243,7 +243,7 @@
 	pai->ai_addr = NULL;
 	pai->ai_next = NULL;
 	port = GAI_ANY;
-	
+
 	if (hostname == NULL && servname == NULL)
 		return EAI_NONAME;
 	if (hints) {
@@ -373,7 +373,7 @@
 			}
 		}
 	}
-	
+
 	/*
 	 * hostname == NULL.
 	 * passive socket -> anyaddr (0.0.0.0 or ::)
@@ -408,7 +408,7 @@
 		else
 			ERR(EAI_FAMILY);
 	}
-	
+
 	/* hostname as numeric name */
 	for (i = 0; gai_afdl[i].a_af; i++) {
 		if (su_inet_pton(gai_afdl[i].a_af, hostname, pton)) {
@@ -432,7 +432,7 @@
 				break;
 #endif
 			}
-			
+
 			if (pai->ai_family == gai_afdl[i].a_af ||
 			    pai->ai_family == PF_UNSPEC) {
 				if (! (pai->ai_flags & AI_CANONNAME)) {
@@ -450,7 +450,7 @@
 				 */
 				get_name(pton, &gai_afdl[i], &top, pton, pai, port);
 				goto good;
-			} else 
+			} else
 				ERR(EAI_FAMILY);	/*xxx*/
 		}
 	}
@@ -489,7 +489,7 @@
 	struct hostent *hp;
 	struct addrinfo *cur;
 	int error = 0, h_error;
-	
+
 #if SU_HAVE_IN6
 	hp = getipnodebyaddr(addr, gai_afd->a_addrlen, gai_afd->a_af, &h_error);
 #else
@@ -500,7 +500,7 @@
 		GET_CANONNAME(cur, hp->h_name);
 	} else
 		GET_AI(cur, gai_afd, numaddr, port);
-	
+
 #if SU_HAVE_IN6
 	if (hp)
 		freehostent(hp);
@@ -568,7 +568,7 @@
 	if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
 	    (hp->h_addr_list[0] == NULL))
 		ERR(EAI_FAIL);
-	
+
 	for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
 		switch (af) {
 #if SU_HAVE_IN6
@@ -700,7 +700,7 @@
 #else
 	len = salen;
 #endif
-	
+
 	family = sa->sa_family;
 	for (i = 0; gni_afdl[i].a_af; i++)
 		if (gni_afdl[i].a_af == family) {
@@ -708,10 +708,10 @@
 			goto found;
 		}
 	return ENI_FAMILY;
-	
+
  found:
 	if (len != gni_afd->a_socklen) return ENI_SALEN;
-	
+
 	port = ((struct gni_sockinet *)sa)->si_port; /* network byte order */
 	addr = (char *)sa + gni_afd->a_off;
 
@@ -739,7 +739,7 @@
 			flags |= NI_NUMERICHOST;
 		v4a >>= IN_CLASSA_NSHIFT;
 		if (v4a == 0 || v4a == IN_LOOPBACKNET)
-			flags |= NI_NUMERICHOST;			
+			flags |= NI_NUMERICHOST;
 		break;
 #if SU_HAVE_IN6
 	case AF_INET6:
@@ -799,7 +799,7 @@
 #endif	/* !HAVE_GETNAMEINFO */
 
 #if !HAVE_FREEADDRINFO
-static 
+static
 void
 freeaddrinfo(ai)
 	struct addrinfo *ai;
@@ -820,13 +820,13 @@
 #endif
 
 #if !HAVE_GAI_STRERROR
-static 
+static
 char *
 gai_strerror(ecode)
 	int ecode;
 {
   switch (ecode) {
-  case 0: 
+  case 0:
     return "success.";
 #if defined(EAI_ADDRFAMILY)
   case EAI_ADDRFAMILY:
@@ -908,7 +908,7 @@
     int socktype;
 
     socktype = hints->ai_socktype;
-    
+
     if (!(socktype == 0 ||
 	  socktype == SOCK_SEQPACKET ||
 	  socktype == SOCK_STREAM ||
@@ -950,7 +950,7 @@
 	continue;
       }
 
-      if (ai->ai_family != AF_INET 
+      if (ai->ai_family != AF_INET
 #if SU_HAVE_IN6
 	  && ai->ai_family != AF_INET6
 #endif
@@ -992,7 +992,7 @@
 	       int flags)
 {
   return getnameinfo(&su->su_sa, (socklen_t)sulen,
-		     return_host, (socklen_t)hostlen, 
-		     return_serv, (socklen_t)servlen, 
+		     return_host, (socklen_t)hostlen,
+		     return_serv, (socklen_t)servlen,
 		     flags);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc.c	Tue Dec 16 13:05:22 2008
@@ -43,7 +43,7 @@
  *   ...
  * }
  * @endcode
- * 
+ *
  * A new home memory pool can be created with su_home_new():
  * @code
  * struct context *ctx = su_home_new(sizeof (struct context));
@@ -58,7 +58,7 @@
  *
  * Note that the tophome has a reference to @a ctx structure; whenever
  * tophome is freed, the @a ctx is also freed.
- * 
+ *
  * You can also create an independent home object by passing NULL as @a
  * tophome argument. This is identical to the call to su_home_new().
  *
@@ -92,7 +92,7 @@
  * @code
  *    su_free(tophome, ctx);
  * @endcode
- * 
+ *
  * @note
  *
  * The su_home_destroy() function is deprecated as it does not free the home
@@ -122,13 +122,13 @@
  * and one wants to keep the allocations, the allocations can be combined
  * into an existing home with su_home_move(). For example,
  * @code
- * int example(su_home_t *home, ...) 
+ * int example(su_home_t *home, ...)
  * {
  *   su_home_t temphome[1] = { SU_HOME_INIT(temphome) };
- *   
+ *
  *   ... do lot of allocations with temphome ...
- *  
- *   if (success) 
+ *
+ *   if (success)
  *     su_home_move(home, temphome);
  *   su_home_deinit(temphome);
  *
@@ -156,7 +156,7 @@
  * allocator is used. The overhead caused by the large number of small
  * allocations can be reduced by using su_home_preload(): it allocates or
  * preloads some a memory to home to be used as a kind of private heap. The
- * preloaded memory area is then used to satisfy small enough allocations. 
+ * preloaded memory area is then used to satisfy small enough allocations.
  * For instance, the SIP parser typically preloads some 2K of memory when it
  * starts to parse the message.
  *
@@ -177,7 +177,7 @@
  * @CFILE su_alloc.c  Home-based memory management.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>.
- * 
+ *
  * @date Created: Thu Aug 19 01:12:25 1999 ppessi
  */
 
@@ -224,13 +224,13 @@
 #define MEMCHECK_EXTRA sizeof (size_t)
 #endif
 
-enum { 
+enum {
   SUB_N = 31,			/**< Initial size */
   SUB_N_AUTO = 7,		/**< Initial size for autohome */
   SUB_P = 29			/**< Secondary probe.
-				 * Secondary probe must be relative prime 
+				 * Secondary probe must be relative prime
 				 * with all sub_n values */
-};		
+};
 
 #define ALIGNMENT (8)
 #define ALIGN(n) (size_t)(((n) + (ALIGNMENT - 1)) & (size_t)~(ALIGNMENT - 1))
@@ -279,7 +279,7 @@
 size_t count_su_block_find, count_su_block_find_loop;
 size_t size_su_block_find, used_su_block_find;
 size_t max_size_su_block_find, max_used_su_block_find;
-size_t su_block_find_collision, su_block_find_collision_used, 
+size_t su_block_find_collision, su_block_find_collision_used,
   su_block_find_collision_size;
 #endif
 
@@ -287,7 +287,7 @@
 {
   size_t h, h0, probe;
 
-#if SU_ALLOC_STATS  
+#if SU_ALLOC_STATS
   size_t collision = 0;
 
   count_su_block_find++;
@@ -315,7 +315,7 @@
       h -= b->sub_n;
 #if SU_ALLOC_STATS
     if (++collision > su_block_find_collision)
-      su_block_find_collision = collision, 
+      su_block_find_collision = collision,
 	su_block_find_collision_used = b->sub_used,
 	su_block_find_collision_size = b->sub_n;
     count_su_block_find_loop++;
@@ -350,8 +350,8 @@
 su_inline int su_is_preloaded(su_block_t const *sub, char *data)
 {
   return
-    sub->sub_preload && 
-    sub->sub_preload <= data && 
+    sub->sub_preload &&
+    sub->sub_preload <= data &&
     sub->sub_preload + sub->sub_prsize > data;
 }
 
@@ -414,14 +414,14 @@
  *             if > 1, allocate a subhome
  *
  */
-static 
-void *sub_alloc(su_home_t *home, 
+static
+void *sub_alloc(su_home_t *home,
 		su_block_t *sub,
 		size_t size,
 		enum sub_zero zero)
 {
   void *data, *preload = NULL;
-  
+
   assert (size < (((size_t)1) << SIZEBITS));
 
   if (size >= ((size_t)1) << SIZEBITS)
@@ -472,7 +472,7 @@
   if (size && sub && zero < do_clone &&
       sub->sub_preload && size <= sub->sub_prsize) {
     /* Use preloaded memory */
-    size_t prused = sub->sub_prused + size + MEMCHECK_EXTRA; 
+    size_t prused = sub->sub_prused + size + MEMCHECK_EXTRA;
     prused = ALIGN(prused);
     if (prused <= sub->sub_prsize) {
       preload = (char *)sub->sub_preload + sub->sub_prused;
@@ -501,13 +501,13 @@
       sub->sub_auto_all = 0;
 
     if (zero >= do_clone) {
-      /* Prepare cloned home */ 
+      /* Prepare cloned home */
       su_home_t *subhome = data;
 
       assert(preload == 0);
 
       subhome->suh_blocks = su_hash_alloc(SUB_N);
-      if (!subhome->suh_blocks) 
+      if (!subhome->suh_blocks)
 	return (void)safefree(data), NULL;
 
       subhome->suh_size = (unsigned)size;
@@ -532,7 +532,7 @@
  *
  * Create a home object used to collect multiple memory allocations under
  * one handle. The memory allocations made using this home object is freed
- * either when this home is destroyed. 
+ * either when this home is destroyed.
  *
  * The maximum @a size of a home object is INT_MAX (2 gigabytes).
  *
@@ -580,7 +580,7 @@
       UNLOCK(home);
       return NULL;
     }
-    
+
     if (sub->sub_ref != REF_MAX)
       sub->sub_ref++;
     UNLOCK(home);
@@ -746,7 +746,7 @@
 /** Return true if home is a clone. */
 int su_home_has_parent(su_home_t const *home)
 {
-  return home && !home->suh_lock && 
+  return home && !home->suh_lock &&
     home->suh_blocks && home->suh_blocks->sub_parent;
 }
 
@@ -905,8 +905,8 @@
  * Creates a home object. A home object is used to collect multiple memory
  * allocations, so that they all can be freed by calling su_home_unref().
  *
- * @return This function returns a pointer to an #su_home_t object, or 
- * NULL upon an error. 
+ * @return This function returns a pointer to an #su_home_t object, or
+ * NULL upon an error.
  */
 su_home_t *su_home_create(void)
 {
@@ -950,7 +950,7 @@
  *
  * @sa SU_HOME_INIT(), su_home_deinit(), su_home_new(), su_home_clone()
  *
- * @bug 
+ * @bug
  * Prior to @VERSION_1_12_8 the su_home_t structure should have been
  * initialized with SU_HOME_INIT() or otherwise zeroed before calling
  * su_home_init().
@@ -958,7 +958,7 @@
 int su_home_init(su_home_t *home)
 {
   su_block_t *sub;
-    
+
   if (home == NULL)
     return -1;
 
@@ -1089,7 +1089,7 @@
 	destructor(src);
       }
 
-      if (d) 
+      if (d)
 	used = s->sub_used + d->sub_used;
       else
 	used = s->sub_used;
@@ -1109,7 +1109,7 @@
 	dst->suh_blocks = d2;
 
       	for (i = 0; i < n; i++)
-	  if (d->sub_nodes[i].sua_data) 
+	  if (d->sub_nodes[i].sua_data)
 	    su_block_add(d2, d->sub_nodes[i].sua_data)[0] = d->sub_nodes[i];
 
 	if (d) {
@@ -1149,7 +1149,7 @@
     UNLOCK(dst); UNLOCK(src);
   }
   else {
-    s = MEMLOCK(src); 
+    s = MEMLOCK(src);
 
     if (s && s->sub_used) {
       s->sub_used = 0;
@@ -1173,7 +1173,7 @@
   if (home == NULL)
     return;
 
-  if (home->suh_blocks == NULL) 
+  if (home->suh_blocks == NULL)
     su_home_init(home);
 
   sub = MEMLOCK(home);
@@ -1249,7 +1249,7 @@
  *   @param home  pointer to memory pool object
  *   @param data  pointer to old memory block
  *   @param size  size of the memory block to be allocated
- *   
+ *
  * @return
  *   A pointer to the allocated memory block or
  *   NULL if an error occurred.
@@ -1262,7 +1262,7 @@
   size_t p;
   size_t term = 0 - size;
 
-  if (!home) 
+  if (!home)
     return realloc(data, size);
 
   if (size == 0) {
@@ -1282,11 +1282,11 @@
 
   if (!su_alloc_check(sub, sua))
     return UNLOCK(home);
-  
+
   assert(!sua->sua_home);
   if (sua->sua_home)
     return UNLOCK(home);
-  
+
   if (!su_is_preloaded(sub, data)) {
     ndata = realloc(data, size + MEMCHECK_EXTRA);
     if (ndata) {
@@ -1356,7 +1356,7 @@
       if (sub->sub_stats)
 	su_home_stats_free(sub, data, data, sua->sua_size);
     }
-    
+
     memcpy(ndata, data,
 	   (size_t)sua->sua_size < size
 	   ? (size_t)sua->sua_size
@@ -1409,7 +1409,7 @@
 
     UNLOCK(home);
   }
-  
+
   return retval;
 }
 
@@ -1450,7 +1450,7 @@
  *
  * Allocates a structure with a given size, zeros
  * it, and initializes the size field to the given size.  The size field
- * is an int at the beginning of the structure. Note that it has type of int. 
+ * is an int at the beginning of the structure. Note that it has type of int.
  *
  * @param home  pointer to memory pool object
  * @param size  size of the structure
@@ -1463,12 +1463,12 @@
  *     char *tst_name;
  *     void *tst_ptr[3];
  *   };
- * 
+ *
  *   struct test *t;
  *   ...
- *   t = su_salloc(home, sizeof (*t)); 
+ *   t = su_salloc(home, sizeof (*t));
  *   assert(t && t->t_size == sizeof (*t));
- *   
+ *
  * @endcode
  * After calling su_salloc() we get a pointer t to a struct test,
  * initialized to zero except the tst_size field, which is initialized to
@@ -1505,13 +1505,13 @@
   return home && home->suh_lock;
 }
 
-/** Increase refcount and obtain exclusive lock on home. 
+/** Increase refcount and obtain exclusive lock on home.
  *
  * @note The #su_home_t structure must be created with su_home_new() or
  * su_home_clone(), or initialized with su_home_init() before using this
- * function. 
+ * function.
  *
- * In order to enable actual locking, use su_home_threadsafe(), too. 
+ * In order to enable actual locking, use su_home_threadsafe(), too.
  * Otherwise the su_home_mutex_lock() will just increase the reference
  * count.
  */
@@ -1559,7 +1559,7 @@
 }
 
 
-/** Obtain exclusive lock on home without increasing refcount. 
+/** Obtain exclusive lock on home without increasing refcount.
  *
  * Unless su_home_threadsafe() has been used to intialize locking on home
  * object the function just returns -1.
@@ -1582,9 +1582,9 @@
 }
 
 
-/** Try to obtain exclusive lock on home without increasing refcount. 
+/** Try to obtain exclusive lock on home without increasing refcount.
  *
- * @return 0 if successful, -1 if not threadsafe, 
+ * @return 0 if successful, -1 if not threadsafe,
  * EBUSY if already locked, error code otherwise.
  *
  * @sa su_home_lock(), su_home_unlock().
@@ -1649,7 +1649,7 @@
   }
   else
     size = sub->sub_stats->hs_size;
-  
+
   memset(sub->sub_stats, 0, size);
   sub->sub_stats->hs_size = (int)size;
   sub->sub_stats->hs_blocksize = sub->sub_n;
@@ -1657,7 +1657,7 @@
 
 /** Retrieve statistics from memory home.
  */
-void su_home_get_stats(su_home_t *home, int include_clones, 
+void su_home_get_stats(su_home_t *home, int include_clones,
 		       su_home_stat_t *hs,
 		       isize_t size)
 {
@@ -1683,7 +1683,7 @@
   UNLOCK(home);
 }
 
-static 
+static
 void su_home_stats_alloc(su_block_t *sub, void *p, void *preload,
 			 size_t size, int zero)
 {
@@ -1706,13 +1706,13 @@
   hs->hs_allocs.hsa_rbytes += rsize;
   if (hs->hs_allocs.hsa_rbytes > hs->hs_allocs.hsa_maxrbytes)
     hs->hs_allocs.hsa_maxrbytes = hs->hs_allocs.hsa_rbytes;
-  
+
   hs->hs_blocks.hsb_number++;
   hs->hs_blocks.hsb_bytes += size;
   hs->hs_blocks.hsb_rbytes += rsize;
 }
 
-static 
+static
 void su_home_stats_free(su_block_t *sub, void *p, void *preload,
 			unsigned size)
 {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc_lock.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc_lock.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_alloc_lock.c	Tue Dec 16 13:05:22 2008
@@ -23,11 +23,11 @@
  */
 
 /**@ingroup su_alloc
- * @CFILE su_alloc_lock.c 
+ * @CFILE su_alloc_lock.c
  * @brief Thread-locking for su_alloc module.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Fri Feb 23 17:38:11 2001 ppessi
  */
 
@@ -121,7 +121,7 @@
   if (mutex) {
     /* Mutex for memory operations */
     pthread_mutex_init(mutex, NULL);
-    /* Mutex used for explicit locking */ 
+    /* Mutex used for explicit locking */
     pthread_mutex_init(mutex + 1, NULL);
     home->suh_lock = (void *)mutex;
     return 0;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_base_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_base_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_base_port.c	Tue Dec 16 13:05:22 2008
@@ -39,7 +39,7 @@
 #include "config.h"
 
 #define su_base_port_s su_port_s
-#define SU_CLONE_T su_msg_t 
+#define SU_CLONE_T su_msg_t
 
 #include "sofia-sip/su.h"
 #include "su_port.h"
@@ -98,7 +98,7 @@
  *
  * Currently this is only used if SU_HAVE_PTHREADS is 0.
  */
-int su_base_port_thread(su_port_t const *self, 
+int su_base_port_thread(su_port_t const *self,
 			enum su_port_thread_op op)
 {
   switch (op) {
@@ -120,7 +120,7 @@
 void su_base_port_incref(su_port_t *self, char const *who)
 {
   su_home_ref(self->sup_home);
-  PORT_REFCOUNT_DEBUG(("incref(%p) to %u by %s\n", self, 
+  PORT_REFCOUNT_DEBUG(("incref(%p) to %u by %s\n", self,
 		       su_home_refcount(self->sup_home), who));
 }
 
@@ -128,14 +128,14 @@
 {
   int zapped = su_home_unref(self->sup_home);
 
-  PORT_REFCOUNT_DEBUG(("%s(%p) to %u%s by %s\n", 
+  PORT_REFCOUNT_DEBUG(("%s(%p) to %u%s by %s\n",
 		       blocking ? "zapref" : "decref",
 		       self, zapped ? 0 : su_home_refcount(self->sup_home),
 		       blocking && !zapped ? " FAILED" :"",
 		       who));
 
   /* We should block until all references are destroyed */
-  if (blocking) 
+  if (blocking)
     /* ...but we just abort() */
     assert(zapped);
 
@@ -159,7 +159,7 @@
     int wakeup;
 
     su_port_lock(self, "su_port_send");
-    
+
     wakeup = self->sup_head == NULL;
 
     *self->sup_tail = rmsg[0]; rmsg[0] = NULL;
@@ -219,7 +219,7 @@
       *tail = msg, *next = msg->sum_next, tail = &msg->sum_next;
     }
     else
-      next = &msg->sum_next;      
+      next = &msg->sum_next;
   }
 
   *tail = NULL, self->sup_tail = next;
@@ -248,11 +248,11 @@
       *tail = msg, *next = msg->sum_next, tail = &msg->sum_next;
     }
     else
-      next = &msg->sum_next;      
+      next = &msg->sum_next;
   }
 
   *tail = NULL, self->sup_tail = next;
-  
+
   su_port_unlock(self, "su_base_port_getmsgs_of_root");
 
   return su_base_port_execute_msgs(selected);
@@ -293,7 +293,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -304,16 +304,16 @@
 }
 
 /** @internal Main loop.
- * 
+ *
  * The function @c su_port_run() waits for wait objects and the timers
  * associated with the port object.  When any wait object is signaled or
  * timer is expired, it invokes the callbacks, and returns waiting.
- * 
+ *
  * The function @c su_port_run() runs until @c su_port_break() is called
  * from a callback.
- * 
+ *
  * @param self     pointer to port object
- * 
+ *
  */
 void su_base_port_run(su_port_t *self)
 {
@@ -395,27 +395,27 @@
 /** @internal
  * The function @c su_port_break() is used to terminate execution of @c
  * su_port_run(). It can be called from a callback function.
- * 
+ *
  * @param self     pointer to port
- * 
+ *
  */
 void su_base_port_break(su_port_t *self)
 {
-  self->sup_running = 0; 
+  self->sup_running = 0;
 }
 
 /** @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.
@@ -465,8 +465,8 @@
  */
 
 int su_base_port_add_prepoll(su_port_t *self,
-			     su_root_t *root, 
-			     su_prepoll_f *callback, 
+			     su_root_t *root,
+			     su_prepoll_f *callback,
 			     su_prepoll_magic_t *magic)
 {
   if (self->sup_prepoll)
@@ -501,8 +501,8 @@
   return &self->sup_timers;
 }
 
-/* ====================================================================== 
- * Clones 
+/* ======================================================================
+ * Clones
  */
 
 #define SU_TASK_COPY(d, s, by) (void)((d)[0]=(s)[0], \
@@ -529,7 +529,7 @@
   child->sur_deinit = deinit;
   child->sur_threading = parent->sur_threading;
 
-  SU_TASK_COPY(child->sur_parent, su_root_task(parent), 
+  SU_TASK_COPY(child->sur_parent, su_root_task(parent),
 	       su_base_port_clone_start);
   SU_TASK_COPY(child->sur_task, child->sur_parent,
 	       su_base_port_clone_start);
@@ -564,7 +564,7 @@
  * @internal
  *
  * Called by su_port_wait() and su_clone_wait()
- */ 
+ */
 void su_base_port_wait(su_clone_r rclone)
 {
   su_port_t *self;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_bm.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_bm.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_bm.c	Tue Dec 16 13:05:22 2008
@@ -25,11 +25,11 @@
 /**@internal
  * @file su_bm.c
  * @brief Search with Boyer-Moore algorithm
- *  
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
  * @date Created: Mon Apr 11 16:35:16 2005 ppessi
- * 
+ *
  */
 
 #include "config.h"
@@ -47,7 +47,7 @@
 #define TORTURELOG(x) (void)0
 #endif
 
-struct bw_fwd_table { 
+struct bw_fwd_table {
   unsigned char table[UCHAR_MAX + 1];
 };
 
@@ -81,7 +81,7 @@
  * naive implementation if the searched substring is shorter than the cache
  * line.
  *
- */ 
+ */
 
 /**@ingroup su_bm
  * @typedef struct bw_fwd_table bm_fwd_table_t;
@@ -90,7 +90,7 @@
  *
  */
 
-/** Build case-sensitive forward skip table #bm_fwd_table_t 
+/** Build case-sensitive forward skip table #bm_fwd_table_t
  *  for Boyer-Moore algorithm.
  * @ingroup su_bm
  */
@@ -134,9 +134,9 @@
   for (i = j = nlen - 1; i < hlen;) {
     unsigned char h = haystack[i];
     if (h == needle[j]) {
-      TORTURELOG(("match \"%s\" at %u\nwith  %*s\"%.*s*%s\": %s\n", 
-		  haystack, (unsigned)i, 
-		  (int)(i - j), "", (int)j, needle, needle + j + 1, 
+      TORTURELOG(("match \"%s\" at %u\nwith  %*s\"%.*s*%s\": %s\n",
+		  haystack, (unsigned)i,
+		  (int)(i - j), "", (int)j, needle, needle + j + 1,
 		  j == 0 ? "match!" : "back by 1"));
       if (j == 0)
 	return (char *)haystack + i;
@@ -145,24 +145,24 @@
     else {
       if (fwd->table[h] > nlen - j) {
 	TORTURELOG(("match \"%s\" at %u\n"
-		    "last  %*s\"%.*s*%s\": (by %u)\n", 
+		    "last  %*s\"%.*s*%s\": (by %u)\n",
 		    haystack, (unsigned)i,
-		    (int)(i - j), "", 
+		    (int)(i - j), "",
 		    (int)j, needle, needle + j + 1, fwd->table[h]));
       	i += fwd->table[h];
       }
       else {
 	TORTURELOG(("match \"%s\" at %u\n"
-		    "2nd   %*s\"%.*s*%s\": (by %u)\n", 
+		    "2nd   %*s\"%.*s*%s\": (by %u)\n",
 		    haystack, (unsigned)i,
-		    (int)(i - j), "", 
+		    (int)(i - j), "",
 		    (int)j, needle, needle + j + 1, (unsigned)(nlen - j)));
 	i += nlen - j;
       }
       j = nlen - 1;
     }
   }
-  
+
   return NULL;
 }
 
@@ -233,7 +233,7 @@
 
   for (i = j = nlen - 1; i < hlen;) {
     unsigned char h = haystack[i], n = needle[j];
-    if (isupper(h)) 
+    if (isupper(h))
       h = tolower(h);
     if (isupper(n))
       n = tolower(n);
@@ -242,7 +242,7 @@
       TORTURELOG(("match \"%s\" at %u\n"
 		  "with  %*s\"%.*s*%s\": %s\n",
 		  haystack, (unsigned)i,
-		  (int)(i - j), "", (int)j, needle, needle + j + 1, 
+		  (int)(i - j), "", (int)j, needle, needle + j + 1,
 		  j == 0 ? "match!" : "back by 1"));
       if (j == 0)
 	return (char *)haystack + i;
@@ -253,21 +253,21 @@
 	TORTURELOG(("match \"%s\" at %u\n"
 		    "last  %*s\"%.*s*%s\": (by %u)\n",
 		    haystack, (unsigned)i,
-		    (int)(i - j), "", (int)j, needle, needle + j + 1, 
+		    (int)(i - j), "", (int)j, needle, needle + j + 1,
 		    fwd->table[h]));
       	i += fwd->table[h];
       }
       else {
 	TORTURELOG(("match \"%s\" at %u\n"
-		    "2nd   %*s\"%.*s*%s\": (by %u)\n", 
+		    "2nd   %*s\"%.*s*%s\": (by %u)\n",
 		    haystack, (unsigned)i,
-		    (int)(i - j), "", (int)j, needle, needle + j + 1, 
+		    (int)(i - j), "", (int)j, needle, needle + j + 1,
 		    (unsigned)(nlen - j)));
 	i += nlen - j;
       }
       j = nlen - 1;
     }
   }
-  
+
   return NULL;
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_default_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_default_log.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_default_log.c	Tue Dec 16 13:05:22 2008
@@ -26,7 +26,7 @@
  * @CFILE su_default_log.c
  *
  * Default debug log object.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
  * @date Created: Fri Feb 23 17:30:46 2001 ppessi
@@ -52,7 +52,7 @@
  *
  * The SOFIA_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
  */
 extern char const SOFIA_DEBUG[];
@@ -63,7 +63,7 @@
 #define SOFIA_DEBUG_ 3
 #endif
 
-/**Default debug log. 
+/**Default debug log.
  *
  * If a source module does not define a log object, the output from su_log()
  * function or SU_DEBUG_X() macros use this log object. Also, if a log
@@ -80,13 +80,13 @@
  * The level of #su_log_default is set using SOFIA_DEBUG environment
  * variable.
  */
-su_log_t su_log_default[1] = {{ 
-  sizeof(su_log_t), 
+su_log_t su_log_default[1] = {{
+  sizeof(su_log_t),
   "sofia",		/* Log name */
   "SOFIA_DEBUG",	/* Environment variable controlling logging level */
   SOFIA_DEBUG_,		/* Default level */
   SU_LOG_MAX,		/* Maximum log level */
   0,
-  default_logger, 
+  default_logger,
   NULL
 }};

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_devpoll_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_devpoll_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_devpoll_port.c	Tue Dec 16 13:05:22 2008
@@ -58,7 +58,7 @@
 #define POLL2EPOLL_NEEDED \
   (POLLIN != EPOLLIN || POLLOUT != EPOLLOUT || POLLPRI != EPOLLPRI || \
    POLLERR != EPOLLERR || POLLHUP != EPOLLHUP)
- 
+
 #define POLL2EPOLL(e) (e & (POLLIN|POLLOUT|POLLPRI|POLLERR|POLLHUP))
 #define EPOLL2POLL(e) (e & (POLLIN|POLLOUT|POLLPRI|POLLERR|POLLHUP))
 
@@ -71,8 +71,8 @@
   int              sup_devpoll;
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
   int              sup_n_registrations;
@@ -82,9 +82,9 @@
   /** Structure containing registration data */
   struct su_devpoll {
     struct su_devpoll *ser_next; /* Next in free list */
-    su_wakeup_f     ser_cb; 
-    su_wakeup_arg_t*ser_arg; 
-    su_root_t      *ser_root; 
+    su_wakeup_f     ser_cb;
+    su_wakeup_arg_t*ser_arg;
+    su_root_t      *ser_root;
     int             ser_id; /** registration identifier */
     su_wait_t       ser_wait[1];
   } **sup_indices;
@@ -99,19 +99,19 @@
 				   int blocking,
 				   char const *who);
 static int su_devpoll_port_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_devpoll_port_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_devpoll_port_deregister(su_port_t *self, int i);
 static int su_devpoll_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_devpoll_port_eventmask(su_port_t *self, 
+static int su_devpoll_port_eventmask(su_port_t *self,
 				   int index,
 				   int socket,
 				   int events);
@@ -182,22 +182,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_devpoll_port_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)
@@ -223,7 +223,7 @@
 
   if (!ser) {
     i = self->sup_max_index, j = i == 0 ? 15 : i + 16;
-    
+
     if (j >= self->sup_size_indices) {
       /* Reallocate index table */
       n = n < 1024 ? 2 * n : n + 1024;
@@ -255,17 +255,17 @@
   if ((size_t)wait->fd >= self->sup_n_devpoll_by_socket) {
     size_t n_devpoll_by_socket = ((size_t)wait->fd + 32) / 32 * 32;
 
-    devpoll_by_socket = su_realloc(h, devpoll_by_socket, 
-				   n_devpoll_by_socket * 
+    devpoll_by_socket = su_realloc(h, devpoll_by_socket,
+				   n_devpoll_by_socket *
 				   (sizeof devpoll_by_socket[0]));
     if (devpoll_by_socket == NULL)
       return -1;
-    
+
     memset(&devpoll_by_socket[self->sup_n_devpoll_by_socket],
 	   0,
-	   (char *)&devpoll_by_socket[n_devpoll_by_socket] - 
+	   (char *)&devpoll_by_socket[n_devpoll_by_socket] -
 	   (char *)&devpoll_by_socket[self->sup_n_devpoll_by_socket]);
-    
+
     self->sup_devpoll_by_socket = devpoll_by_socket;
     self->sup_n_devpoll_by_socket = n_devpoll_by_socket;
   }
@@ -273,7 +273,7 @@
 
   if (devpoll_by_socket[wait->fd])
     /* XXX - we should lift this limitation with epoll, too */
-    return errno = EEXIST, -1;  
+    return errno = EEXIST, -1;
 
   i = ser->ser_id;
 
@@ -282,7 +282,7 @@
   pollfd->revents = 0;
 
   if (write(self->sup_devpoll, pollfd, (sizeof pollfd)) != (sizeof pollfd)) {
-    return errno = EIO, -1;  
+    return errno = EIO, -1;
   }
 
   indices[0] = ser->ser_next;
@@ -327,7 +327,7 @@
 
   if (destroy_wait)
     su_wait_destroy(ser->ser_wait);
-  
+
   memset(ser, 0, sizeof *ser);
   ser->ser_id = i;
   ser->ser_next = indices[0], indices[0] = ser;
@@ -341,25 +341,25 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  *  The function su_devpoll_port_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)
  *
- * @deprecated Use su_devpoll_port_deregister() instead. 
+ * @deprecated Use su_devpoll_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_devpoll_port_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)
 {
@@ -387,14 +387,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_devpoll_port_deregister(su_port_t *self, int i)
@@ -417,10 +417,10 @@
  *
  * The function su_devpoll_port_unregister_all() unregisters all su_wait_t
  * objects associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
 int su_devpoll_port_unregister_all(su_port_t *self, su_root_t *root)
@@ -479,7 +479,7 @@
   w[1].revents = 0;
 
   if (write(self->sup_devpoll, w, (sizeof w)) == -1) {
-    SU_DEBUG_1(("su_devpoll_port_eventmask(%p): %d: %s\n", (void *)self, 
+    SU_DEBUG_1(("su_devpoll_port_eventmask(%p): %d: %s\n", (void *)self,
 		socket, su_strerror(su_errno())));
     return -1;
   }
@@ -496,7 +496,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -508,7 +508,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -546,7 +546,7 @@
     if (socket < 0 || self->sup_n_devpoll_by_socket <= socket)
       continue;
     ser = self->sup_devpoll_by_socket[socket]; assert(ser);
-      
+
     magic = ser->ser_root ? su_root_magic(ser->ser_root) : NULL;
     ser->ser_wait->revents = ev[j].revents;
     ser->ser_cb(magic, ser->ser_wait, ser->ser_arg);
@@ -554,7 +554,7 @@
     if (version != self->sup_registers)
       /* Callback function used su_register()/su_deregister() */
       break;
-  }    
+  }
 
   return events;
 }
@@ -568,7 +568,7 @@
 
   if (devpoll == -1) {
     /* Fallback to poll() */
-    SU_DEBUG_3(("%s(): open(\"%s\") => %u: %s\n", 
+    SU_DEBUG_3(("%s(): open(\"%s\") => %u: %s\n",
 		"su_devpoll_port_create", "/dev/poll",
 		errno, strerror(errno)));
     return su_poll_port_create();
@@ -581,9 +581,9 @@
   }
 
   if (su_home_destructor(su_port_home(self), su_devpoll_port_deinit) < 0 ||
-      !(self->sup_indices = 
+      !(self->sup_indices =
 	su_zalloc(su_port_home(self),
-		  (sizeof self->sup_indices[0]) * 
+		  (sizeof self->sup_indices[0]) *
 		  (self->sup_size_indices = 64)))) {
     su_home_unref(su_port_home(self));
     close(devpoll);
@@ -608,7 +608,7 @@
 			 su_root_init_f init,
 			 su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_devpoll_port_create, 
+  return su_pthreaded_port_start(su_devpoll_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_epoll_port.c	Tue Dec 16 13:05:22 2008
@@ -58,7 +58,7 @@
 #define POLL2EPOLL_NEEDED \
   (POLLIN != EPOLLIN || POLLOUT != EPOLLOUT || POLLPRI != EPOLLPRI || \
    POLLERR != EPOLLERR || POLLHUP != EPOLLHUP)
- 
+
 #define POLL2EPOLL(e) (e & (POLLIN|POLLOUT|POLLPRI|POLLERR|POLLHUP))
 #define EPOLL2POLL(e) (e & (POLLIN|POLLOUT|POLLPRI|POLLERR|POLLHUP))
 
@@ -71,8 +71,8 @@
   int              sup_epoll;
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
   int              sup_n_registrations;
@@ -82,9 +82,9 @@
   /** Structure containing registration data */
   struct su_epoll_register {
     struct su_epoll_register *ser_next; /* Next in free list */
-    su_wakeup_f     ser_cb; 
-    su_wakeup_arg_t*ser_arg; 
-    su_root_t      *ser_root; 
+    su_wakeup_f     ser_cb;
+    su_wakeup_arg_t*ser_arg;
+    su_root_t      *ser_root;
     int             ser_id; /** registration identifier */
     su_wait_t       ser_wait[1];
   } **sup_indices;
@@ -94,19 +94,19 @@
 				 int blocking,
 				 char const *who);
 static int su_epoll_port_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_epoll_port_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_epoll_port_deregister(su_port_t *self, int i);
 static int su_epoll_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_epoll_port_eventmask(su_port_t *self, 
+static int su_epoll_port_eventmask(su_port_t *self,
 				   int index,
 				   int socket,
 				   int events);
@@ -174,22 +174,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_epoll_port_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)
@@ -212,7 +212,7 @@
     su_home_t *h = su_port_home(self);
 
     i = self->sup_max_index, j = i == 0 ? 15 : i + 16;
-    
+
     if (j >= self->sup_size_indices) {
       /* Reallocate index table */
       n = n < 1024 ? 2 * n : n + 1024;
@@ -246,7 +246,7 @@
   ev.events = POLL2EPOLL(wait->events);
   ev.data.u64 = 0;
   ev.data.u32 = (uint32_t)i;
-  
+
   if (epoll_ctl(self->sup_epoll, EPOLL_CTL_ADD, wait->fd, &ev) == -1) {
     SU_DEBUG_0(("EPOLL_CTL_ADD(%u, %u) failed: %s\n",
 		wait->fd, ev.events, strerror(errno)));
@@ -282,13 +282,13 @@
   assert(ser->ser_id == i);
 
   if (epoll_ctl(self->sup_epoll, EPOLL_CTL_DEL, ser->ser_wait->fd, NULL) == -1) {
-    SU_DEBUG_1(("su_port(%p): EPOLL_CTL_DEL(%u): %s\n", (void *)self, 
+    SU_DEBUG_1(("su_port(%p): EPOLL_CTL_DEL(%u): %s\n", (void *)self,
 		ser->ser_wait->fd, su_strerror(su_errno())));
   }
 
   if (destroy_wait)
     su_wait_destroy(ser->ser_wait);
-  
+
   memset(ser, 0, sizeof *ser);
   ser->ser_id = i;
   ser->ser_next = indices[0], indices[0] = ser;
@@ -301,25 +301,25 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  *  The function su_epoll_port_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)
  *
- * @deprecated Use su_epoll_port_deregister() instead. 
+ * @deprecated Use su_epoll_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_epoll_port_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)
 {
@@ -347,14 +347,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_epoll_port_deregister(su_port_t *self, int i)
@@ -377,10 +377,10 @@
  *
  * The function su_epoll_port_unregister_all() unregisters all su_wait_t
  * objects associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
 int su_epoll_port_unregister_all(su_port_t *self, su_root_t *root)
@@ -437,7 +437,7 @@
   ev.data.u32 = (uint32_t)index;
 
   if (epoll_ctl(self->sup_epoll, EPOLL_CTL_MOD, socket, &ev) == -1) {
-    SU_DEBUG_1(("su_port(%p): EPOLL_CTL_MOD(%u): %s\n", (void *)self, 
+    SU_DEBUG_1(("su_port(%p): EPOLL_CTL_MOD(%u): %s\n", (void *)self,
 		socket, su_strerror(su_errno())));
     return -1;
   }
@@ -454,7 +454,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -466,7 +466,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -487,7 +487,7 @@
 
   int const M = 4;
   struct epoll_event ev[M];
-    
+
   n = epoll_wait(self->sup_epoll, ev, self->sup_multishot ? M : 1, tout);
 
   assert(n <= M);
@@ -508,7 +508,7 @@
     if (version != self->sup_registers)
       /* Callback function used su_register()/su_deregister() */
       return events;
-  }    
+  }
 
   return n;
 }
@@ -522,7 +522,7 @@
 
   if (epoll == -1) {
     /* Fallback to poll() */
-    SU_DEBUG_3(("%s(): epoll_create() => %u: %s\n", 
+    SU_DEBUG_3(("%s(): epoll_create() => %u: %s\n",
 		"su_port_create", epoll, strerror(errno)));
     return su_poll_port_create();
   }
@@ -537,9 +537,9 @@
 	      "su_port_create", (void *)self, self->sup_epoll, "OK"));
 
   if (su_home_destructor(su_port_home(self), su_epoll_port_deinit) < 0 ||
-      !(self->sup_indices = 
+      !(self->sup_indices =
 	su_zalloc(su_port_home(self),
-		  (sizeof self->sup_indices[0]) * 
+		  (sizeof self->sup_indices[0]) *
 		  (self->sup_size_indices = 64)))) {
     su_home_unref(su_port_home(self));
     close(epoll);
@@ -561,7 +561,7 @@
 			 su_root_init_f init,
 			 su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_epoll_port_create, 
+  return su_pthreaded_port_start(su_epoll_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_errno.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_errno.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_errno.c	Tue Dec 16 13:05:22 2008
@@ -23,14 +23,14 @@
  */
 
 /**@CFILE su_errno.c errno compatibility
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Original: Thu Mar 18 19:40:51 1999 pessi
  * @date Split to su_errno.c: Thu Dec 22 18:37:02 EET 2005 pessi
  */
 
-#include "config.h" 
+#include "config.h"
 
 #include <sofia-sip/su_errno.h>
 #include <sofia-sip/su.h>
@@ -128,7 +128,7 @@
   };
   static char buf[64];
 
-  if (errcode < WSABASEERR) 
+  if (errcode < WSABASEERR)
     return strerror(errcode);
 
   if (errcode < 20000)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_global_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_global_log.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_global_log.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * Global SU debug log.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Mon May  7 11:08:36 2001 ppessi
  */
 
@@ -45,7 +45,7 @@
  *
  * The SU_DEBUG environment variable is used to determine the debug logging
  * level for @b su module. The default level is 3.
- * 
+ *
  * @sa <sofia-sip/su_debug.h>, su_log_global
  */
 extern char const SU_DEBUG[];
@@ -57,18 +57,18 @@
 #define SU_DEBUG_ 3
 #endif
 
-/**Debug log for @b su module. 
- * 
+/**Debug log for @b su module.
+ *
  * The su_log_global is the log object used by @b su module. The level of
  * #su_log_global is set using #SU_DEBUG environment variable.
  */
-su_log_t su_log_global[1] = {{ 
-  sizeof(su_log_t), 
-  "su", 
-  "SU_DEBUG", 
-  SU_DEBUG_, 
+su_log_t su_log_global[1] = {{
+  sizeof(su_log_t),
+  "su",
+  "SU_DEBUG",
+  SU_DEBUG_,
   SU_LOG_MAX,
   0,
-  NULL, 
+  NULL,
   NULL
 }};

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_kqueue_port.c	Tue Dec 16 13:05:22 2008
@@ -67,8 +67,8 @@
   int              sup_kqueue;
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
   int              sup_n_registrations;
@@ -80,9 +80,9 @@
   /** Structure containing registration data */
   struct su_register {
     struct su_register *ser_next; /* Next in free list */
-    su_wakeup_f     ser_cb; 
-    su_wakeup_arg_t*ser_arg; 
-    su_root_t      *ser_root; 
+    su_wakeup_f     ser_cb;
+    su_wakeup_arg_t*ser_arg;
+    su_root_t      *ser_root;
     int             ser_id; /** registration identifier */
     su_wait_t       ser_wait[1];
   } **sup_indices;
@@ -91,19 +91,19 @@
 static void su_kqueue_port_decref(su_port_t *, int blocking, char const *who);
 
 static int su_kqueue_port_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_kqueue_port_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_kqueue_port_deregister(su_port_t *self, int i);
 static int su_kqueue_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_kqueue_port_eventmask(su_port_t *self, 
+static int su_kqueue_port_eventmask(su_port_t *self,
 				  int index,
 				  int socket,
 				  int events);
@@ -171,22 +171,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_kqueue_port_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)
@@ -210,7 +210,7 @@
     su_home_t *h = su_port_home(self);
 
     i = self->sup_max_index, j = i == 0 ? 15 : i + 16;
-    
+
     if (j >= self->sup_size_indices) {
       /* Reallocate index table */
       n = n < 1024 ? 2 * n : n + 1024;
@@ -310,7 +310,7 @@
 
   if (destroy_wait)
     su_wait_destroy(wait);
-  
+
   memset(ser, 0, sizeof *ser);
   ser->ser_id = i;
   ser->ser_next = indices[0], indices[0] = ser;
@@ -323,25 +323,25 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  *  The function su_kqueue_port_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)
  *
- * @deprecated Use su_kqueue_port_deregister() instead. 
+ * @deprecated Use su_kqueue_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_kqueue_port_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)
 {
@@ -369,14 +369,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_kqueue_port_deregister(su_port_t *self, int i)
@@ -398,13 +398,13 @@
  *
  * The function su_kqueue_port_unregister_all() unregisters all su_wait_t objects
  * and destroys all queued timers associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
-int su_kqueue_port_unregister_all(su_port_t *self, 
+int su_kqueue_port_unregister_all(su_port_t *self,
 				su_root_t *root)
 {
   int i, I, n;
@@ -490,7 +490,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -502,7 +502,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -523,7 +523,7 @@
 
   int const M = 4;
   struct kevent ev[M];
-  
+
   struct timespec ts;
 
   ts.tv_sec = tout / 1000;
@@ -534,7 +534,7 @@
 	     tout < SU_DURATION_MAX ? &ts : NULL);
 
   assert(n <= M);
-  
+
   for (j = 0; j < n; j++) {
     struct su_register *ser;
     su_root_magic_t *magic;
@@ -559,7 +559,7 @@
 	/* Callback function used su_register()/su_deregister() */
 	return events;
     }
-  }    
+  }
 
   return n;
 }
@@ -589,7 +589,7 @@
 
   self->sup_kqueue = kq, kq = -1;
   self->sup_indices = su_zalloc(su_port_home(self),
-				(sizeof self->sup_indices[0]) * 
+				(sizeof self->sup_indices[0]) *
 				(self->sup_size_indices = 64));
   if (!self->sup_indices)
     goto failed;
@@ -614,7 +614,7 @@
 			su_root_init_f init,
 			su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_kqueue_port_create, 
+  return su_pthreaded_port_start(su_kqueue_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c	Tue Dec 16 13:05:22 2008
@@ -29,7 +29,7 @@
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Martti Mela <Martti.Mela at nokia.com>
- * 
+ *
  * @date Created: Wed Oct  4 14:09:29 EET 2000 ppessi
  */
 
@@ -118,9 +118,9 @@
  * - #LI_V4MAPPED: when returning IPv4 addresses, map them as IPv6
  *   addresses.  If this flag is specified, IPv4 addresses are returned even
  *   if @a hints->li_family is set to @c AF_INET6.
- * - #LI_CANONNAME: return the domain name (DNS PTR) corresponding to the 
+ * - #LI_CANONNAME: return the domain name (DNS PTR) corresponding to the
  *   local address in @a li_canonname.
- * - #LI_NAMEREQD: Do not return addresses not in DNS. 
+ * - #LI_NAMEREQD: Do not return addresses not in DNS.
  * - #LI_NUMERIC: instead of domain name, return the text presentation of
  *   the addresss in @a li_canonname.
  * - #LI_DOWN: include interfaces and their addresses even if the interfaces
@@ -151,12 +151,12 @@
  * matching scope are returned. The different address scopes can be combined
  * with bitwise or. They are defined as follows
  * - #LI_SCOPE_HOST: host-local address, valid within host (::1, 127.0.0.1/8)
- * - #LI_SCOPE_LINK: link-local address, valid within link 
- *   (IP6 addresses with prefix fe80::/10, 
+ * - #LI_SCOPE_LINK: link-local address, valid within link
+ *   (IP6 addresses with prefix fe80::/10,
  *    IP4 addresses in net 169.254.0.0/16).
  * - #LI_SCOPE_SITE: site-local address, addresses valid within organization
  *   (IPv6 addresses with prefix  fec::/10,
- *    private IPv4 addresses in nets 10.0.0.0/8, 172.16.0.0/12, 
+ *    private IPv4 addresses in nets 10.0.0.0/8, 172.16.0.0/12,
  *    and 192.168.0.0/16 as defined in @RFC1918)
  * - #LI_SCOPE_GLOBAL: global address.
  *
@@ -173,13 +173,13 @@
  *
  * @return Zero (#ELI_NOERROR) when successful, or negative error code when
  * failed.
- * 
+ *
  * @par Diagnostics
  * Use su_gli_strerror() in order to obtain a string describing the error
  * code returned by su_getlocalinfo().
  *
  */
-int su_getlocalinfo(su_localinfo_t const *hints, 
+int su_getlocalinfo(su_localinfo_t const *hints,
 		    su_localinfo_t **return_localinfo)
 {
   int error = 0, ip4 = 0, ip6 = 0;
@@ -214,14 +214,14 @@
     break;
 
   case 0:
-    ip6 = ip4 = 1;    
+    ip6 = ip4 = 1;
     break;
 
   default:
     return -1;
   }
 
-#if USE_LOCALINFO0 
+#if USE_LOCALINFO0
   error = localinfo0(hh, rr);
 #else
 
@@ -230,8 +230,8 @@
     error = localinfo6(hh, rr);
     if (error == ELI_NOADDRESS && ip4)
       error = 0;
-    
-    if (!error) 
+
+    if (!error)
       /* Search end of list */
       for (; *rr; rr = &(*rr)->li_next)
 	;
@@ -254,7 +254,7 @@
   return error;
 }
 
-/** Free local address information. 
+/** Free local address information.
  *
  * Free a list of su_localinfo_t structures obtained with su_getlocalinfo()
  * or su_copylocalinfo() along with socket addresses and strings associated
@@ -274,7 +274,7 @@
   }
 }
 
-/** Describe su_localinfo errors. 
+/** Describe su_localinfo errors.
  *
  * The function su_gli_strerror() returns a string describing the error
  * condition indicated by the code that was returned by the function
@@ -332,7 +332,7 @@
     }
 
     if (li0->li_ifname)
-      li->li_ifname = strcpy(li->li_addrlen + (char *)li->li_addr, 
+      li->li_ifname = strcpy(li->li_addrlen + (char *)li->li_addr,
 			     li0->li_ifname);
   }
 
@@ -341,7 +341,7 @@
 
 
 /** Return IPv4 address scope */
-static int 
+static int
 li_scope4(uint32_t ip4)
 {
   ip4 = ntohl(ip4);
@@ -369,16 +369,16 @@
 {
   uint8_t const *u = ip6;
 
-  return 
-    u[0] == 0 && u[1] == 0 && u[2] == 0 && u[3] == 0 && 
-    u[4] == 0 && u[5] == 0 && u[6] == 0 && u[7] == 0 && 
-    u[8] == 0 && u[9] == 0 && u[10] == 0 && u[11] == 0 && 
+  return
+    u[0] == 0 && u[1] == 0 && u[2] == 0 && u[3] == 0 &&
+    u[4] == 0 && u[5] == 0 && u[6] == 0 && u[7] == 0 &&
+    u[8] == 0 && u[9] == 0 && u[10] == 0 && u[11] == 0 &&
     u[12] == 0 && u[13] == 0 && u[14] == 0 && u[15] == 1;
 }
 #endif
 
 /** Return IPv6 address scope */
-static int 
+static int
 li_scope6(struct in6_addr const *ip6)
 {
   if (IN6_IS_ADDR_V4MAPPED(ip6) || IN6_IS_ADDR_V4COMPAT(ip6)) {
@@ -446,7 +446,7 @@
 
   s = su_socket(AF_INET, SOCK_DGRAM, 0);
   if (s == -1) {
-    SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n", 
+    SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n",
 		su_strerror(su_errno())));
     return ELI_SYSTEM;
   }
@@ -475,7 +475,7 @@
 
   if (scope == LI_SCOPE_HOST || scope == LI_SCOPE_LINK)
     gni_flags = NI_NUMERICHOST;
-    
+
   if (su_xtra) {
     /* Map IPv4 address to IPv6 address */
     memset(sa, 0, sizeof(*sa));
@@ -500,7 +500,7 @@
   }
   else
     li->li_flags = 0;
-  
+
   li->li_canonname = canonname;
 
   canonname = NULL;
@@ -546,7 +546,7 @@
 
   s = su_socket(AF_INET, SOCK_DGRAM, 0);
   if (s == -1) {
-    SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n", 
+    SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n",
 		su_strerror(su_errno())));
     return ELI_SYSTEM;
   }
@@ -555,13 +555,13 @@
   /* Get the list of known IP address from the kernel */
   if (ioctl(s, SIOCGIFNUM, (char *) &numifs) < 0) {
     /* can't get number of interfaces -- fall back */
-    SU_DEBUG_1(("su_localinfo: SIOCGIFNUM failed: %s\n", 
+    SU_DEBUG_1(("su_localinfo: SIOCGIFNUM failed: %s\n",
 		su_strerror(su_errno())));
     error = ELI_SYSTEM;
     goto err;
   }
 
-  SU_DEBUG_9(("su_localinfo: %d active interfaces according to SIOCGIFNUM\n", 
+  SU_DEBUG_9(("su_localinfo: %d active interfaces according to SIOCGIFNUM\n",
 	      numifs));
 
   if (numifs < 0)
@@ -584,20 +584,20 @@
     error = ELI_MEMORY;
     goto err;
   }
-  
+
   li_first = (su_localinfo_t *)buffer;
   memset(li_first, 0, sizeof(su_localinfo_t) + su_xtra);
   ifc.ifc_buf = buffer + sizeof(su_localinfo_t) + su_xtra;
 #if HAVE_OPEN_C
   if (ioctl(s, SIOCGIFACTIVECONF, (char *)&ifc) < 0) {
-    SU_DEBUG_1(("su_localinfo: SIOCGIFCONF failed: %s\n", 
+    SU_DEBUG_1(("su_localinfo: SIOCGIFCONF failed: %s\n",
 		su_strerror(su_errno())));
     error = ELI_SYSTEM;
     goto err;
   }
 #else
   if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
-    SU_DEBUG_1(("su_localinfo: SIOCGIFCONF failed: %s\n", 
+    SU_DEBUG_1(("su_localinfo: SIOCGIFCONF failed: %s\n",
 		su_strerror(su_errno())));
     error = ELI_SYSTEM;
     goto err;
@@ -628,7 +628,7 @@
 #if defined(SIOCGIFINDEX)
     ifreq[0] = *ifr;
     if (ioctl(s, SIOCGIFINDEX, ifreq) < 0) {
-      SU_DEBUG_1(("su_localinfo: SIOCGIFINDEX failed: %s\n", 
+      SU_DEBUG_1(("su_localinfo: SIOCGIFINDEX failed: %s\n",
 		  su_strerror(su_errno())));
       error = ELI_SYSTEM;
       goto err;
@@ -657,7 +657,7 @@
 
     if (su_get_local_ip_addr(sa) < 0)
       goto err;
-      
+
     li->li_family = sa->su_family;
     li->li_scope = LI_SCOPE_GLOBAL /* scope */;
     li->li_index = if_index;
@@ -687,14 +687,14 @@
 #if defined(SIOCGIFFLAGS)
     ifreq[0] = *ifr;
     if (ioctl(s, SIOCGIFFLAGS, ifreq) < 0) {
-      SU_DEBUG_1(("su_localinfo: SIOCGIFFLAGS failed: %s\n", 
+      SU_DEBUG_1(("su_localinfo: SIOCGIFFLAGS failed: %s\n",
 		  su_strerror(su_errno())));
       error = ELI_SYSTEM;
       goto err;
     }
     /* Do not include interfaces that are down unless explicitly asked */
     if ((ifreq->ifr_flags & IFF_UP) == 0 && (hints->li_flags & LI_DOWN) == 0) {
-      SU_DEBUG_9(("su_localinfo: if %s with index %d is down\n", 
+      SU_DEBUG_9(("su_localinfo: if %s with index %d is down\n",
 		  if_name, if_index));
       continue;
     }
@@ -708,7 +708,7 @@
     *ifreq = *ifr;
     ifreq->ifr_addr.sa_family = AF_INET;
     if (ioctl(s, SIOCGIFADDR, ifreq) < 0) {
-      SU_DEBUG_1(("su_localinfo: SIOCGIFADDR failed: %s\n", 
+      SU_DEBUG_1(("su_localinfo: SIOCGIFADDR failed: %s\n",
 		  su_strerror(su_errno())));
       error = ELI_SYSTEM;
       goto err;
@@ -746,7 +746,7 @@
       goto err;
     else if (error > 0)
       continue;
-    
+
     if (canonname)
       if (strchr(canonname, ':') ||
 	  strspn(canonname, "0123456789.") == strlen(canonname))
@@ -807,7 +807,7 @@
   su_localinfo_t *li = NULL, **lli = &tbf;
   su_sockaddr_t *su;
 #if SU_HAVE_IN6
-  socklen_t su_sockaddr_size = 
+  socklen_t su_sockaddr_size =
     (hints->li_flags & LI_V4MAPPED) ? sizeof(*su) : sizeof(struct sockaddr_in);
   flags = hints->li_flags & (LI_V4MAPPED|LI_CANONNAME|LI_NUMERIC|LI_IFNAME);
 #else
@@ -822,7 +822,7 @@
       name = hints->li_canonname;
     else if (gethostname(name = hostname, sizeof(hostname)) != 0)
       return ELI_SYSTEM;
-  
+
     h = gethostbyname(name);
 
     if (name)
@@ -845,7 +845,7 @@
 
       li->li_addrlen = su_sockaddr_size;
       li->li_addr = su = (su_sockaddr_t *)(li + 1);
-      su->su_family = li->li_family = 
+      su->su_family = li->li_family =
 	li->li_flags & LI_V4MAPPED ? AF_INET6 : AF_INET;
 
 #if SU_HAVE_IN6
@@ -854,10 +854,10 @@
 	memcpy(&((int32_t*)&su->su_sin6.sin6_addr)[3],
 	       h->h_addr_list[i], h->h_length);
       }
-      else 
+      else
 #endif
 	memcpy(&su->su_sin.sin_addr.s_addr, h->h_addr_list[i], h->h_length);
-      if (li->li_flags & LI_IFNAME) 
+      if (li->li_flags & LI_IFNAME)
 	li->li_ifname = ifname;
       if (li->li_scope == LI_SCOPE_HOST || li->li_scope == LI_SCOPE_LINK)
 	gni_flags = NI_NUMERICHOST;
@@ -876,7 +876,7 @@
       error = ELI_MEMORY;
       goto err;
     }
-    li->li_flags = hints->li_flags & 
+    li->li_flags = hints->li_flags &
       (LI_V4MAPPED|LI_CANONNAME|LI_NUMERIC|LI_IFNAME);
     li->li_scope = LI_SCOPE_HOST, li->li_index = 1;
     if (li->li_flags & LI_IFNAME)
@@ -889,7 +889,7 @@
       ((int32_t*)&su->su_sin6.sin6_addr)[2] = htonl(0xffff);
       ((int32_t*)&su->su_sin6.sin6_addr)[3] = htonl(0x7f000001);
     }
-    else 
+    else
 #endif
       su->su_family = li->li_family = AF_INET,
       su->su_sin.sin_addr.s_addr = htonl(0x7f000001);
@@ -897,7 +897,7 @@
     if ((error = li_name(hints, NI_NUMERICHOST, su, &li->li_canonname)) < 0) {
       goto err;
     } else if (error > 0) {
-      free(li); li = NULL; 
+      free(li); li = NULL;
     } else {
       *lli = li; lli = &li->li_next; li = NULL;
     }
@@ -918,7 +918,7 @@
 
 #if USE_LOCALINFO0 || !SU_HAVE_IN6
 
-#elif HAVE_PROC_NET_IF_INET6 
+#elif HAVE_PROC_NET_IF_INET6
 /** Build a list of local IPv6 addresses and append it to *return_result. */
 static
 int localinfo6(su_localinfo_t const *hints, su_localinfo_t **return_result)
@@ -947,7 +947,7 @@
 		 &in6.s6_addr32[0],
 		 &in6.s6_addr32[1],
 		 &in6.s6_addr32[2],
-		 &in6.s6_addr32[3], 
+		 &in6.s6_addr32[3],
 		 &if_index, &prefix_len, &scope, &flags, ifname) != 9)
 	break;
 
@@ -970,10 +970,10 @@
 	  (hints->li_index && hints->li_index != if_index) ||
 	  (hints->li_ifname && strcmp(hints->li_ifname, ifname) != 0))
 	continue;
-      
+
       su->su_family = AF_INET6;
-      su->su_sin6.sin6_addr = in6; 
-      
+      su->su_sin6.sin6_addr = in6;
+
       addrlen = su_sockaddr_size(su);
 
       if ((error = li_name(hints, 0, su, &canonname)) < 0)
@@ -983,7 +983,7 @@
       else
 	error = ELI_NOADDRESS;
 
-      if (canonname && 
+      if (canonname &&
 	  (strchr(canonname, ':') ||
 	   strspn(canonname, "0123456789.") == strlen(canonname)))
 	flags |= LI_NUMERIC;
@@ -1009,14 +1009,14 @@
       li->li_canonname = canonname;
       if (if_namelen)
 	li->li_ifname = memcpy(addrlen + (char *)addr, ifname, if_namelen);
-      
+
       canonname = NULL;
     }
 
     fclose(f);
   }
 
-  if (canonname) 
+  if (canonname)
     free(canonname);
 
   return error;
@@ -1031,7 +1031,7 @@
   su_localinfo_t *li = NULL;
   su_sockaddr_t *su;
   int const su_sockaddr_size = sizeof(*su);
-  
+
   error = ELI_NOADDRESS;
 
 #if defined(__APPLE_CC__)
@@ -1049,39 +1049,39 @@
 	sa->su_family = AF_INET6;
 	if (su_inet_pton(AF_INET6, addr, &sa->su_sin6.sin6_addr) <= 0)
 	  goto err;
-	
+
 	s = su_socket(AF_INET6, SOCK_DGRAM, 0);
 	if (s == -1) {
-	  SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n", 
+	  SU_DEBUG_1(("su_localinfo: su_socket failed: %s\n",
 		      su_strerror(su_errno())));
 	  return ELI_SYSTEM;
 	}
-	
+
 	error = getsockname(s, (struct sockaddr *) sa, &salen);
 	if (error < 0 && errno == SOCKET_ERROR) {
 	  SU_DEBUG_1(("%s: getsockname() failed: %s\n", __func__,
 		      su_strerror(su_errno())));
 	}
-	
+
 	error = bind(s, (struct sockaddr *) sa, salen);
-	
+
 	if (error < 0) {
 	  SU_DEBUG_1(("%s: bind() failed: %s\n", __func__,
 		      su_strerror(su_errno())));
 	  goto err;
 	}
-	
+
 	su_close(s);
-	
+
 	li->li_family = sa->su_family;
 	li->li_scope = LI_SCOPE_GLOBAL;
 	li->li_index = 0;
 	li->li_addrlen = su_sockaddr_size(sa);
 	li->li_addr = sa;
-	
+
 	if ((error = li_name(hints, NI_NUMERICHOST, sa, &li->li_canonname)) < 0)
 	  goto err;
-	
+
 	li->li_flags = NI_NUMERICHOST;
       }
     }
@@ -1107,12 +1107,12 @@
       su->su_family = li->li_family = AF_INET6;
       if (su_inet_pton(AF_INET6, addr, &su->su_sin6.sin6_addr) <= 0)
 	goto err;
-      if (li->li_flags & LI_IFNAME) 
+      if (li->li_flags & LI_IFNAME)
 	li->li_ifname = ifname;
       if ((error = li_name(hints, NI_NUMERICHOST, su, &li->li_canonname)) < 0)
 	goto err;
       else if (error > 0) {
-	free(li); li = NULL; 
+	free(li); li = NULL;
       }
     }
   }
@@ -1133,7 +1133,7 @@
 #include <ifaddrs.h>
 
 static
-int bsd_localinfo(su_localinfo_t const hints[1], 
+int bsd_localinfo(su_localinfo_t const hints[1],
 		  su_localinfo_t **return_result)
 {
   struct ifaddrs *ifa, *results;
@@ -1186,7 +1186,7 @@
       scope = li_scope6(&su->su_sin6.sin6_addr);
     }
 #endif
-    else 
+    else
       continue;
 
     if (hints->li_flags & LI_IFNAME) {
@@ -1200,7 +1200,7 @@
 	(hints->li_ifname && (!ifname || strcmp(hints->li_ifname, ifname))) ||
 	(hints->li_index && hints->li_index != if_index))
       continue;
-    
+
     if (scope == LI_SCOPE_HOST || scope == LI_SCOPE_LINK)
       gni_flags = NI_NUMERICHOST;
 
@@ -1222,7 +1222,7 @@
       error = 0;
       continue;
     }
-    
+
     if (canonname)
       if (strchr(canonname, ':') ||
 	  canonname[strspn(canonname, "0123456789.")] == '\0')
@@ -1232,7 +1232,7 @@
       SU_DEBUG_1(("su_getlocalinfo: memory exhausted\n"));
       error = ELI_MEMORY;
       break;
-    } 
+    }
     *return_result = li, return_result = &li->li_next;
 
     li->li_flags = flags;
@@ -1259,7 +1259,7 @@
 
 #elif USE_LOCALINFO0 && HAVE_IPHLPAPI_H && SU_HAVE_IN6
 
-static 
+static
 char const *ws2ifname(DWORD iftype)
 {
   switch (iftype) {
@@ -1321,21 +1321,21 @@
       goto err;
     }
 
-    if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 
-	               FORMAT_MESSAGE_FROM_SYSTEM | 
+    if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+	               FORMAT_MESSAGE_FROM_SYSTEM |
 	               FORMAT_MESSAGE_IGNORE_INSERTS,
 	  	       NULL,
 	  	       error,
 		       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
 		       msg, 0, NULL))
       msg = empty;
- 
+
     SU_DEBUG_1(("su_localinfo: GetAdaptersAddresses: %s (%d)\n", msg, error));
     if (msg != empty) LocalFree((LPVOID)msg);
     error = ELI_SYSTEM;
     goto err;
   }
-  
+
   for (iaa = iaa0; iaa; iaa = iaa->Next) {
     IP_ADAPTER_UNICAST_ADDRESS *ua;
     IP_ADAPTER_UNICAST_ADDRESS lua[1];
@@ -1382,11 +1382,11 @@
 	  continue;
 	scope = li_scope6(&su->su_sin6.sin6_addr);
       }
-      else 
+      else
 	continue;
 
       if (hints->li_flags & LI_IFNAME) {
-	snprintf(ifname, sizeof(ifname), "%s%u", 
+	snprintf(ifname, sizeof(ifname), "%s%u",
 		 ws2ifname(iaa->IfType), if_index);
 	ifnamelen = strlen(ifname) + 1;
       }
@@ -1396,7 +1396,7 @@
 	  /* (hints->li_ifname && strcmp(hints->li_ifname, ifname) != 0) || */
 	  (hints->li_index && hints->li_index != if_index))
 	continue;
-    
+
       if (scope == LI_SCOPE_HOST || scope == LI_SCOPE_LINK)
 	gni_flags = NI_NUMERICHOST;
 
@@ -1413,7 +1413,7 @@
 	goto err;
       else if (error > 0)
 	continue;
-    
+
       if (canonname)
 	if (strchr(canonname, ':') ||
 	    strspn(canonname, "0123456789.") == strlen(canonname))
@@ -1422,7 +1422,7 @@
       if (!(li = calloc(1, sizeof(*li) + sulen + ifnamelen))) {
 	SU_DEBUG_1(("su_getlocalinfo: memory exhausted\n"));
 	error = ELI_MEMORY; goto err;
-      } 
+      }
       *next = li, next = &li->li_next;
 
       li->li_flags = flags;
@@ -1463,7 +1463,7 @@
   union {
     SOCKET_ADDRESS_LIST sal[1];
 #if HAVE_INTERFACE_INFO_EX
-    INTERFACE_INFO_EX   ii[1];    
+    INTERFACE_INFO_EX   ii[1];
 #else
     INTERFACE_INFO      ii[1];
 #endif
@@ -1497,7 +1497,7 @@
     SU_DEBUG_1(("su_getlocalinfo: no local addresses\n"));
     error = -1; goto err;
   }
-  
+
   for (i = 0; i < b.sal->iAddressCount; i++) {
     su_sockaddr_t *su = (su_sockaddr_t *)b.sal->Address[i].lpSockaddr;
 #if SU_HAVE_IN6
@@ -1512,7 +1512,7 @@
 
     if (hints->li_scope && (hints->li_scope & scope) == 0)
       continue;
-    
+
     if (scope == LI_SCOPE_HOST || scope == LI_SCOPE_LINK)
       gni_flags = NI_NUMERICHOST;
 
@@ -1537,12 +1537,12 @@
       goto err;
     else if (error > 0)
       continue;
-    
+
     if (canonname)
       if (strchr(canonname, ':') ||
 	  strspn(canonname, "0123456789.") == strlen(canonname))
 	flags |= LI_NUMERIC;
-   
+
     li->li_flags = flags;
     li->li_family = su->su_family;
     li->li_scope = scope;
@@ -1552,7 +1552,7 @@
     li->li_canonname = canonname, canonname = NULL;
     if (hints->li_flags & LI_IFNAME)
       li->li_ifname = if_name;
-    li->li_addr = (su_sockaddr_t *)(li + 1); 
+    li->li_addr = (su_sockaddr_t *)(li + 1);
     li->li_addrlen = sulen;
     memcpy(li->li_addr, su, sulen);
   }
@@ -1571,10 +1571,10 @@
 }
 #endif
 
-static 
-int li_name(su_localinfo_t const *hints, 
+static
+int li_name(su_localinfo_t const *hints,
 	    int gni_flags,
-	    su_sockaddr_t const *su, 
+	    su_sockaddr_t const *su,
 	    char **ccanonname)
 {
   char name[SU_MAXHOST];
@@ -1585,11 +1585,11 @@
 
   if ((flags & LI_CANONNAME) || hints->li_canonname) {
     if ((flags & LI_NAMEREQD) == LI_NAMEREQD)
-      gni_flags |= NI_NAMEREQD;      
+      gni_flags |= NI_NAMEREQD;
     if (flags & LI_NUMERIC)
       gni_flags |= NI_NUMERICHOST;
 
-    error = su_getnameinfo(su, su_sockaddr_size(su), 
+    error = su_getnameinfo(su, su_sockaddr_size(su),
 			   name, sizeof(name), NULL, 0,
 			   gni_flags);
     if (error) {
@@ -1654,6 +1654,6 @@
     su_freelocalinfo(li);
     return 0;
   }
-  else 
+  else
     return -1;
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_log.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * Implementation of generic logging interface.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Fri Feb 23 17:30:13 2001 ppessi
  */
 
@@ -51,7 +51,7 @@
 #else
 #define SU_LOG_IS_INIT(log) ((log)->log_init)
 #define SU_LOG_DO_INIT(log) ((log)->log_init = 1)
-#define SU_LOG_LOCK(log) 
+#define SU_LOG_LOCK(log)
 #define SU_LOG_UNLOCK(log)
 #endif
 
@@ -63,9 +63,9 @@
  * interface provides means for redirecting the log and filtering log
  * messages based on message priority.
  *
- * @sa @ref debug_logs, <sofia-sip/su_log.h>, 
+ * @sa @ref debug_logs, <sofia-sip/su_log.h>,
  * su_llog(), su_vllog(), #su_log_t, #SU_DEBUG,
- * SU_DEBUG_0(), SU_DEBUG_1(), SU_DEBUG_2(), SU_DEBUG_3(), SU_DEBUG_5(), 
+ * SU_DEBUG_0(), SU_DEBUG_1(), SU_DEBUG_2(), SU_DEBUG_3(), SU_DEBUG_5(),
  * SU_DEBUG_7(), SU_DEBUG_9()
  */
 
@@ -81,7 +81,7 @@
   su_perror2(s, su_errno());
 }
 
-/** Log a message to default log. 
+/** Log a message to default log.
  *
  * This function is a replacement for printf().
  *
@@ -96,7 +96,7 @@
   va_end(ap);
 }
 
-/** Log a message with level. 
+/** Log a message with level.
  *
  * @note This function is used mainly by SU_DEBUG_n() macros.
  */
@@ -120,7 +120,7 @@
   if (!log->log_init)
     su_log_init(log);
 
-  if (log->log_init > 1 ? 
+  if (log->log_init > 1 ?
       level > log->log_level :
       level > su_log_default->log_level)
     return;
@@ -156,14 +156,14 @@
 
   if (log->log_env && (env = getenv(log->log_env))) {
     int level = atoi(env);
-    
+
     /* Why? */
     /* if (level == 0) level = 1; */
     log->log_level = level;
     log->log_init = 2;
 
-    if (explicitly_initialized) 
-      su_llog(log, 0, "%s: initialized log to level %u (%s=%s)\n", 
+    if (explicitly_initialized)
+      su_llog(log, 0, "%s: initialized log to level %u (%s=%s)\n",
 	      log->log_name, log->log_level, log->log_env, env);
   }
   else {
@@ -171,10 +171,10 @@
     log->log_init = 1;
     if (explicitly_initialized) {
       if (log != su_log_default)
-	su_llog(log, 0, "%s: logging at default level %u\n", 
+	su_llog(log, 0, "%s: logging at default level %u\n",
 		log->log_name, su_log_default->log_level);
       else
-	su_llog(log, 0, "%s: initialized log to level %u (default)\n", 
+	su_llog(log, 0, "%s: initialized log to level %u (default)\n",
 		log->log_name, log->log_level);
     }
   }
@@ -188,7 +188,7 @@
  * @code
  * void logger(void *logarg, char const *format, va_list ap);
  * @endcode
- * 
+ *
  * If @a logger is NULL, the default logger will be used. If @a log is NULL,
  * the default logger is changed.
  */
@@ -206,7 +206,7 @@
  * The function su_log_set_level() sets the logging level.  The log events
  * have certain level (0..9); if logging level is lower than the level of
  * the event, the log message is ignored.
- * 
+ *
  * If @a log is NULL, the default log level is changed.
  */
 void su_log_set_level(su_log_t *log, unsigned level)
@@ -221,7 +221,7 @@
     explicitly_initialized = getenv("SHOW_DEBUG_LEVELS");
 
   if (explicitly_initialized)
-    su_llog(log, 0, "%s: set log to level %u\n", 
+    su_llog(log, 0, "%s: set log to level %u\n",
 	    log->log_name, log->log_level);
 }
 
@@ -229,11 +229,11 @@
  *
  * The function su_log_soft_set_level() sets the logging level if it is not
  * already set, or the environment variable controlling the log level is not
- * set. 
+ * set.
  *
  * The log events have certain level (0..9); if logging level is lower than
  * the level of the event, the log message is ignored.
- * 
+ *
  * If @a log is NULL, the default log level is changed.
  */
 void su_log_soft_set_level(su_log_t *log, unsigned level)
@@ -254,7 +254,7 @@
       explicitly_initialized = getenv("SHOW_DEBUG_LEVELS");
 
     if (explicitly_initialized)
-      su_llog(log, 0, "%s: soft set log to level %u\n", 
+      su_llog(log, 0, "%s: soft set log to level %u\n",
 	      log->log_name, log->log_level);
   }
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_md5.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_md5.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_md5.c	Tue Dec 16 13:05:22 2008
@@ -38,7 +38,7 @@
  */
 
 /** @ingroup su_md5
- * 
+ *
  * @CFILE su_md5.c MD5 Implementation
  *
  * To compute the message digest of a chunk of bytes, declare an su_md5_t
@@ -58,7 +58,7 @@
  * @note Regarding su_* namespace: this avoids potential conflicts
  * with libraries such as some versions of Kerberos.  No particular
  * need to worry about whether the system supplies an MD5 library, as
- * this file is only about 3k of object code. 
+ * this file is only about 3k of object code.
  *
  */
 
@@ -93,7 +93,7 @@
  *
  * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
  * initialization constants.
- * 
+ *
  * @param ctx Pointer to context structure.
  */
 void
@@ -103,7 +103,7 @@
   ctx->buf[1] = 0xefcdab89;
   ctx->buf[2] = 0x98badcfe;
   ctx->buf[3] = 0x10325476;
-  
+
   ctx->bits[0] = 0;
   ctx->bits[1] = 0;
 }
@@ -111,7 +111,7 @@
 /** Clear MD5 context.
  *
  * The function su_md5_deinit() clears MD5 context.
- * 
+ *
  * @param context  Pointer to MD5 context structure.
  */
 void su_md5_deinit(su_md5_t *context)
@@ -142,14 +142,14 @@
   if ((ctx->bits[0] = (t + ((uint32_t)len << 3)) & 0xffffffff) < t)
     ctx->bits[1]++;	/* Carry from low to high */
   ctx->bits[1] += (uint32_t)(len >> 29);
-  
+
   t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
-  
+
   /* Handle any leading odd-sized chunks */
-  
+
   if ( t ) {
     unsigned char *p = ctx->in + t;
-    
+
     t = 64 - t;
 
     if (len < t) {
@@ -162,9 +162,9 @@
     buf += t;
     len -= t;
   }
-  
+
   /* Process data in 64-byte chunks */
-  
+
   while (len >= 64) {
     su_md5_transform(ctx->buf, buf);
     buf += 64;
@@ -176,7 +176,7 @@
 }
 
 /** Copy memory, fix case to lower. */
-static 
+static
 void mem_i_cpy(unsigned char *d, unsigned char const *s, size_t len)
 {
   size_t i;
@@ -211,14 +211,14 @@
   if ((ctx->bits[0] = (t + ((uint32_t)len << 3)) & 0xffffffff) < t)
     ctx->bits[1]++;	/* Carry from low to high */
   ctx->bits[1] += (uint32_t)(len >> 29);
-  
+
   t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
-  
+
   /* Handle any leading odd-sized chunks */
-  
+
   if ( t ) {
     unsigned char *p = ctx->in + t;
-    
+
     t = sizeof(ctx->in) - t;
 
     if (len < t) {
@@ -230,7 +230,7 @@
     buf += t;
     len -= t;
   }
-  
+
   /* Process data in 64-byte chunks */
   while (len >= sizeof(ctx->in)) {
     mem_i_cpy(ctx->in, buf, sizeof(ctx->in));
@@ -253,7 +253,7 @@
  */
 void su_md5_strupdate(su_md5_t *ctx, char const *s)
 {
-  if (s) 
+  if (s)
     su_md5_update(ctx, s, strlen(s));
 }
 
@@ -267,7 +267,7 @@
  */
 void su_md5_str0update(su_md5_t *ctx, char const *s)
 {
-  if (!s) 
+  if (!s)
     s = "";
 
   su_md5_update(ctx, s, strlen(s) + 1);
@@ -283,7 +283,7 @@
  */
 void su_md5_striupdate(su_md5_t *ctx, char const *s)
 {
-  if (s) 
+  if (s)
     su_md5_iupdate(ctx, s, strlen(s));
 }
 
@@ -298,7 +298,7 @@
  */
 void su_md5_stri0update(su_md5_t *ctx, char const *s)
 {
-  if (!s) 
+  if (!s)
     s = "";
 
   su_md5_iupdate(ctx, s, strlen(s) + 1);
@@ -323,35 +323,35 @@
   su_md5_t ctx[1];
 
   ctx[0] = context[0];
-  
+
   /* Compute number of bytes mod 64 */
   count = (ctx->bits[0] >> 3) & 0x3F;
-  
+
   /* Set the first char of padding to 0x80.  This is safe since there is
      always at least one byte free */
   p = ctx->in + count;
   *p++ = 0x80;
-  
+
   /* Bytes of padding needed to make 64 bytes */
   count = 64 - 1 - count;
-  
+
   /* Pad out to 56 mod 64 */
   if (count < 8) {
     /* Two lots of padding:  Pad the first block to 64 bytes */
     memset(p, 0, count);
     su_md5_transform (ctx->buf, ctx->in);
-    
+
     /* Now fill the next block with 56 bytes */
     memset(ctx->in, 0, 56);
   } else {
     /* Pad block to 56 bytes */
     memset(p, 0, count-8);
   }
-  
+
   /* Append length in bits and transform */
   putu32(ctx->bits[0], ctx->in + 56);
   putu32(ctx->bits[1], ctx->in + 60);
-  
+
   su_md5_transform(ctx->buf, ctx->in);
   putu32(ctx->buf[0], digest);
   putu32(ctx->buf[1], digest + 4);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_module_debug.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_module_debug.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_module_debug.h	Tue Dec 16 13:05:22 2008
@@ -34,9 +34,9 @@
  * functions within @b su module.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *  
+ *
  * @date Created: Wed Jan 29 18:18:49 2003 ppessi
- * 
+ *
  */
 
 #include <sofia-sip/su_log.h>

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_open_c_localinfo.cpp
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_open_c_localinfo.cpp	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_open_c_localinfo.cpp	Tue Dec 16 13:05:22 2008
@@ -35,7 +35,7 @@
 #include "config.h"
 
 #include <unistd.h>
-#include <in_sock.h> 
+#include <in_sock.h>
 #include <es_sock.h>
 #include <e32base.h>
 #include <s32mem.h>
@@ -58,7 +58,7 @@
 	su->su_sin.sin_addr.s_addr = sa_global->su_sin.sin_addr.s_addr;
 	su->su_family = sa_global->su_family;
 	su->su_len = sa_global->su_len;
-	
+
 	return 0;
 }
 
@@ -76,32 +76,32 @@
   TCommDbConnPref iPref;
   RSocketServ aSocketServ;
   RSocket sock;
-  
+
   /* Get the IAP id of the underlying interface of this RConnection */
   TUint32 iapId;
-  
+
   iPref.SetDirection(ECommDbConnectionDirectionOutgoing);
   iPref.SetDialogPreference(ECommDbDialogPrefPrompt);
   iPref.SetBearerSet(KCommDbBearerUnknown /*PSD*/);
-  
+
   aSocketServ = RSocketServ();
   aSocketServ.Connect();
   RConnection *aConnection = new RConnection();
   aConnection->Open(aSocketServ);
   aConnection->Start(iPref);
-  
+
   User::LeaveIfError(sock.Open(aSocketServ, KAfInet, KSockStream,
 			       KProtocolInetTcp));
-  
+
   User::LeaveIfError(aConnection->GetIntSetting(_L("IAP\\Id"), iapId));
-  
+
   /* Get IP information from the socket */
   TSoInetInterfaceInfo ifinfo;
   TPckg<TSoInetInterfaceInfo> ifinfopkg(ifinfo);
-  
+
   TSoInetIfQuery ifquery;
   TPckg<TSoInetIfQuery> ifquerypkg(ifquery);
-  
+
   /* To find out which interfaces are using our current IAP, we
    * must enumerate and go through all of them and make a query
    * by name for each. */
@@ -109,7 +109,7 @@
   while(sock.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, ifinfopkg) == KErrNone) {
     ifquery.iName = ifinfo.iName;
     TInt err = sock.GetOpt(KSoInetIfQueryByName, KSolInetIfQuery, ifquerypkg);
-    
+
     /* IAP ID is index 1 of iZone */
     if(err == KErrNone && ifquery.iZone[1] == iapId) {
       /* We have found an interface using the IAP we are interested in. */
@@ -126,7 +126,7 @@
     else if(err != KErrNone)
       break;
   }
-  
+
   sock.Close();
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_os_nw.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_os_nw.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_os_nw.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@ingroup su_os_nw
  *
- * @CFILE su_os_nw.c  
+ * @CFILE su_os_nw.c
  * Implementation of OS-specific network events interface.
  *
  * @author Martti Mela <Martti.Mela at nokia.com>
@@ -97,8 +97,8 @@
 }
 
 
-void nw_changed_cb(SCDynamicStoreRef store, 
-		   CFArrayRef changedKeys, 
+void nw_changed_cb(SCDynamicStoreRef store,
+		   CFArrayRef changedKeys,
 		   void *info)
 {
   su_network_changed_t *snc = (su_network_changed_t *) info;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_osx_runloop.c	Tue Dec 16 13:05:22 2008
@@ -46,7 +46,7 @@
 #include <limits.h>
 #include <errno.h>
 
-#define su_port_s su_osx_port_s 
+#define su_port_s su_osx_port_s
 
 #include "su_port.h"
 #include "sofia-sip/su_osx_runloop.h"
@@ -64,14 +64,14 @@
 static su_port_t *su_osx_runloop_create(void) __attribute__((__malloc__));
 
 /* Callback for CFObserver and CFSocket */
-static void cf_observer_cb(CFRunLoopObserverRef observer, 
-			   CFRunLoopActivity activity, 
+static void cf_observer_cb(CFRunLoopObserverRef observer,
+			   CFRunLoopActivity activity,
 			   void *info);
 
-static void su_osx_port_socket_cb(CFSocketRef s, 
-				  CFSocketCallBackType callbackType, 
-				  CFDataRef address, 
-				  const void *data, 
+static void su_osx_port_socket_cb(CFSocketRef s,
+				  CFSocketCallBackType callbackType,
+				  CFDataRef address,
+				  const void *data,
 				  void *info);
 
 static void su_osx_port_deinit(void *arg);
@@ -87,15 +87,15 @@
 static int su_osx_port_send(su_port_t *self, su_msg_r rmsg);
 
 static int su_osx_port_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_osx_port_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_osx_port_deregister(su_port_t *self, int i);
@@ -118,9 +118,9 @@
 }
 
 /*
- * 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_osx_port_s {
   su_socket_port_t sup_socket[1];
@@ -143,11 +143,11 @@
     int        o_current;
     int        o_count;
   } osx_magic[1];
-  
+
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
   int              sup_n_waits; /**< Active su_wait_t in su_waits */
@@ -157,21 +157,21 @@
 
 #define INDEX_MAX (0x7fffffff)
 
-  /** Indices from index returned by su_root_register() to tables below. 
+  /** Indices from index returned by su_root_register() to tables below.
    *
    * Free elements are negative. Free elements form a list, value of free
    * element is (0 - index of next free element).
    *
-   * First element sup_indices[0] points to first free element. 
+   * First element sup_indices[0] points to first free element.
    */
   int             *sup_indices;
 
   int             *sup_reverses; /** Reverse index */
-  su_wakeup_f     *sup_wait_cbs; 
-  su_wakeup_arg_t**sup_wait_args; 
-  su_root_t      **sup_wait_roots; 
+  su_wakeup_f     *sup_wait_cbs;
+  su_wakeup_arg_t**sup_wait_args;
+  su_root_t      **sup_wait_roots;
 
-  su_wait_t       *sup_waits; 
+  su_wait_t       *sup_waits;
 };
 
 
@@ -223,10 +223,10 @@
   return su_root_create_with_port(magic, su_osx_runloop_create());
 }
 
-void osx_enabler_cb(CFSocketRef s, 
-		    CFSocketCallBackType type, 
-		    CFDataRef address, 
-		    const void *data, 
+void osx_enabler_cb(CFSocketRef s,
+		    CFSocketCallBackType type,
+		    CFDataRef address,
+		    const void *data,
 		    void *info)
 {
   CFRunLoopRef  rl;
@@ -234,21 +234,21 @@
   su_port_t    *self = magic->o_port;
   su_duration_t tout = 0;
   su_time_t     now = su_now();
-  
+
   rl = CFRunLoopGetCurrent();
 
   if (self->sup_base->sup_running) {
-    
+
     if (self->sup_base->sup_prepoll)
       self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
-    
+
     if (self->sup_base->sup_head)
       su_base_port_getmsgs(self);
-    
+
     if (self->sup_base->sup_timers)
       su_timer_expire(&self->sup_base->sup_timers, &tout, now);
   }
-  
+
   CFRunLoopWakeUp(rl);
 }
 
@@ -259,7 +259,7 @@
  *
  * @return
  *   If successful a pointer to the new message port is returned, otherwise
- *   NULL is returned.  
+ *   NULL is returned.
  */
 su_port_t *su_osx_runloop_create(void)
 {
@@ -279,7 +279,7 @@
     self->osx_magic->o_port = self;
     self->sup_observer_cntx->info = self->osx_magic;
     self->sup_observer =
-      CFRunLoopObserverCreate(NULL, 
+      CFRunLoopObserverCreate(NULL,
 			      kCFRunLoopAfterWaiting | kCFRunLoopBeforeWaiting,
 			      TRUE, 0, cf_observer_cb, self->sup_observer_cntx);
 #if 0
@@ -295,8 +295,8 @@
 }
 
 static
-void cf_observer_cb(CFRunLoopObserverRef observer, 
-		    CFRunLoopActivity activity, 
+void cf_observer_cb(CFRunLoopObserverRef observer,
+		    CFRunLoopActivity activity,
 		    void *info)
 {
   CFRunLoopRef  rl;
@@ -311,17 +311,17 @@
 
     if (self->sup_base->sup_prepoll)
       self->sup_base->sup_prepoll(self->sup_base->sup_pp_magic, self->sup_base->sup_pp_root);
-    
+
     if (self->sup_base->sup_head)
       su_port_getmsgs(self);
-    
+
     if (self->sup_base->sup_timers)
       su_timer_expire(&self->sup_base->sup_timers, &tout, now);
   } else
     SU_DEBUG_9(("cf_observer_cb(): PORT IS NOT RUNNING!\n"));
 
   CFRunLoopWakeUp(rl);
-  
+
   return;
 }
 
@@ -342,14 +342,14 @@
 
   if (events & SU_WAIT_IN)
     type |= kCFSocketReadCallBack;
-  
+
   if (events & SU_WAIT_OUT)
     type |= kCFSocketWriteCallBack;
-  
+
 #if 0
   if (events & SU_WAIT_CONNECT)
     type |= kCFSocketConnectCallBack;
-  
+
   if (events & SU_WAIT_ACCEPT)
     type |= kCFSocketAcceptCallBack;
 #endif
@@ -366,13 +366,13 @@
 
   if (type & kCFSocketReadCallBack)
     event |= SU_WAIT_IN;
-  
+
   if (type & kCFSocketWriteCallBack)
     event |= SU_WAIT_OUT;
-  
+
   if (type & kCFSocketConnectCallBack)
     event |= SU_WAIT_CONNECT;
-  
+
   if (type & kCFSocketAcceptCallBack)
     event |= SU_WAIT_ACCEPT;
 
@@ -381,37 +381,37 @@
 #endif
 
 static
-void su_osx_port_socket_cb(CFSocketRef s, 
-			   CFSocketCallBackType type, 
-			   CFDataRef address, 
-			   const void *data, 
+void su_osx_port_socket_cb(CFSocketRef s,
+			   CFSocketCallBackType type,
+			   CFDataRef address,
+			   const void *data,
 			   void *info)
 {
   struct osx_magic *magic = (struct osx_magic *) info;
   su_port_t        *self = magic->o_port;
   int               curr = magic->o_current;
   su_duration_t tout = 0;
-  
+
 #if SU_HAVE_POLL
   {
     su_root_t *root;
     su_wait_t *waits = self->sup_waits;
     int n = self->sup_indices[curr];
-    
+
     assert(self->sup_reverses[n] == curr);
-    
+
     SU_DEBUG_9(("socket_cb(%p): count %u index %d\n", self->sup_sources[n], magic->o_count, curr));
-    
+
     waits[n].revents = map_poll_event_to_cf_event(type);
 
     root = self->sup_wait_roots[n];
-    self->sup_wait_cbs[n](root ? su_root_magic(root) : NULL, 
-			  &waits[n], 
+    self->sup_wait_cbs[n](root ? su_root_magic(root) : NULL,
+			  &waits[n],
 			  self->sup_wait_args[n]);
-    
+
     if (self->sup_base->sup_running) {
       su_port_getmsgs(self);
-      
+
       if (self->sup_base->sup_timers)
 	su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
 
@@ -420,12 +420,12 @@
 
       /* CFRunLoopWakeUp(CFRunLoopGetCurrent()); */
     }
-    
+
     /* Tell to run loop an su socket fired */
     self->sup_source_fired = 1;
   }
 #endif
-  
+
 }
 
 /** @internal Send a message to the port. */
@@ -437,7 +437,7 @@
     int wakeup;
 
     //XXX - mela SU_OSX_PORT_LOCK(self, "su_osx_port_send");
-    
+
     wakeup = self->sup_base->sup_head == NULL;
 
     *self->sup_base->sup_tail = rmsg[0]; rmsg[0] = NULL;
@@ -480,21 +480,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_osx_port_register returns nonzero index of the wait object, 
+ *   The function @su_osx_port_register returns nonzero index of the wait object,
  *   or -1 upon an error.  */
 int su_osx_port_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)
@@ -527,7 +527,7 @@
 
     if (self->sup_size_waits == 0)
       size = su_root_size_hint;
-    else 
+    else
       size = 2 * self->sup_size_waits;
 
     if (size < SU_WAIT_MIN)
@@ -551,7 +551,7 @@
 	reverses[i] = -1;
       self->sup_reverses = reverses;
     }
-      
+
     sources = realloc(self->sup_sources, size * sizeof(*sources));
     if (sources)
       self->sup_sources = sources;
@@ -574,10 +574,10 @@
 
     /* 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 && 
+    if (!(indices &&
 	  reverses && sources && sockets && waits && wait_cbs && wait_args && wait_tasks)) {
       return -1;
     }
@@ -598,7 +598,7 @@
       self->sup_waits[n] = self->sup_waits[n-1];
       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];
     }
 
     self->sup_pri_offset++;
@@ -672,7 +672,7 @@
   n = indices[i]; assert(n >= 0); assert(i == reverses[n]);
 
   N = --self->sup_n_waits;
-  
+
   rl = CFRunLoopGetCurrent();
   CFSocketInvalidate(self->sup_sockets[n]);
   CFRelease(self->sup_sockets[n]);
@@ -723,7 +723,7 @@
   self->sup_wait_cbs[n] = NULL;
   self->sup_wait_args[n] = NULL;
   self->sup_wait_roots[n] = NULL;
-  
+
   indices[i] = indices[0];
   indices[0] = -i;
 
@@ -734,23 +734,23 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  *  The function su_osx_port_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_osx_port_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)
 {
@@ -773,14 +773,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
- *  The function su_osx_port_deregister() deregisters a su_wait_t registrattion. 
+ *
+ *  The function su_osx_port_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_osx_port_deregister(su_port_t *self, int i)
@@ -796,7 +796,7 @@
 
   if (self->sup_indices[i] < 0)
     return su_seterrno(EBADF);
-    
+
   retval = su_osx_port_deregister0(self, i);
 
   su_wait_destroy(wait);
@@ -810,13 +810,13 @@
  *
  * The function su_osx_port_unregister_all() unregisters all su_wait_t objects
  * and destroys all queued timers associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
-int su_osx_port_unregister_all(su_port_t *self, 
+int su_osx_port_unregister_all(su_port_t *self,
 			   su_root_t *root)
 {
   int i, j, index, N;
@@ -834,13 +834,13 @@
   N          = self->sup_n_waits;
   indices    = self->sup_indices;
   reverses   = self->sup_reverses;
-  sources    = self->sup_sources; 
-  sockets    = self->sup_sockets; 
-  waits      = self->sup_waits; 
-  wait_cbs   = self->sup_wait_cbs; 
+  sources    = self->sup_sources;
+  sockets    = self->sup_sockets;
+  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;
+
   rl = CFRunLoopGetCurrent();
 
   for (i = j = 0; i < N; i++) {
@@ -871,7 +871,7 @@
       wait_args[j]  = wait_args[i];
       wait_roots[j] = wait_roots[i];
     }
-    
+
     j++;
   }
 
@@ -931,7 +931,7 @@
 
   CFSocketSetSocketFlags(self->sup_sockets[n],
 			 map_poll_event_to_cf_event(events));
-  
+
   return ret;
 }
 
@@ -939,7 +939,7 @@
  *
  *  Copies the su_wait_t objects from the port. The number of wait objects
  *  can be found out by calling su_osx_port_query() with @a n_waits as zero.
- * 
+ *
  * @note This function is called only by friends.
  *
  * @param self     - pointer to port object
@@ -976,7 +976,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -987,7 +987,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -1007,9 +1007,9 @@
  * using Core Foundation's Run Loop.
  *
  * The function su_root_osx_prepare_run() returns immmediately.
- * 
+ *
  * @param root     pointer to root object
- * 
+ *
  * @NEW_1_12_4.
  */
 void su_root_osx_prepare_run(su_root_t *root)
@@ -1030,7 +1030,7 @@
 
   if (self->sup_base->sup_head)
     su_port_getmsgs(self);
-  
+
   if (self->sup_base->sup_timers)
     su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
 
@@ -1044,16 +1044,16 @@
 }
 
 /** @internal Main loop.
- * 
+ *
  * The function @c su_osx_port_run() waits for wait objects and the timers
  * associated with the port object.  When any wait object is signaled or
  * timer is expired, it invokes the callbacks, and returns waiting.
- * 
+ *
  * The function @c su_osx_port_run() runs until @c su_osx_port_break() is called
  * from a callback.
- * 
+ *
  * @param self     pointer to port object
- * 
+ *
  */
 void su_osx_port_run(su_port_t *self)
 {
@@ -1072,7 +1072,7 @@
 
   if (self->sup_base->sup_head)
     su_port_getmsgs(self);
-  
+
   if (self->sup_base->sup_timers)
     su_timer_expire(&self->sup_base->sup_timers, &tout, su_now());
 
@@ -1144,16 +1144,16 @@
 /** @internal
  * The function @c su_osx_port_break() is used to terminate execution of @c
  * su_osx_port_run(). It can be called from a callback function.
- * 
+ *
  * @param self     pointer to port
- * 
+ *
  */
 void su_osx_port_break(su_port_t *self)
 {
   if (self->sup_main_loop)
     CFRunLoopStop(self->sup_main_loop);
 
-  self->sup_base->sup_running = 0; 
+  self->sup_base->sup_running = 0;
 }
 
 /** @internal
@@ -1178,7 +1178,7 @@
   i = su_wait(waits, n, tout);
 
   if (i >= 0 && (unsigned)i < n) {
-#if HAVE_POLL			
+#if HAVE_POLL
     /* poll() can return events for multiple wait objects */
     if (self->sup_multishot) {
       for (; i < n; i++) {
@@ -1212,16 +1212,16 @@
 
 /** @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.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_perf.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_perf.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_perf.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * Performance test for su message passing
  *
  * @internal
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
@@ -80,7 +80,7 @@
 {
   su_time_t now = su_now();
   double dur = su_time_diff(now, m->started);
-  
+
   printf("su_perf: %g message exchanges per second"
 	 " (%d message exchanges in %g seconds)\n",
 	 (double)p->n / dur, p->n, dur);
@@ -126,7 +126,7 @@
  *
  * Create a ponger and pinger, responding to incoming message do_ping
  *
- * After "target" rounds, print out elapsed time and number of messages 
+ * After "target" rounds, print out elapsed time and number of messages
  * passed.
  *
  */
@@ -136,8 +136,8 @@
   su_clone_r ping = SU_CLONE_R_INIT, pong = SU_CLONE_R_INIT;
   su_msg_r start_msg = SU_MSG_R_INIT;
 
-  struct perf 
-    pinger = { PINGER, "ping", 1, 0 }, 
+  struct perf
+    pinger = { PINGER, "ping", 1, 0 },
     ponger = { PONGER, "pong", 1, 0x7fffffff};
 
   int have_threads = 1;
@@ -158,15 +158,15 @@
   su_init(); atexit(su_deinit);
 
   root = su_root_create(NULL);
-  
+
   su_root_threading(root, have_threads);
 
   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);
 
-  if (su_msg_create(start_msg, su_clone_task(pong), su_clone_task(ping), 
+  if (su_msg_create(start_msg, su_clone_task(pong), su_clone_task(ping),
 		    do_ping, sizeof(struct message)) == 0) {
     su_msg_data(start_msg)->started = su_now();
     su_msg_send(start_msg);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_poll_port.c	Tue Dec 16 13:05:22 2008
@@ -61,8 +61,8 @@
 
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
 
@@ -72,39 +72,39 @@
 
 #define INDEX_MAX (0x7fffffff)
 
-  /** Indices from index returned by su_root_register() to tables below. 
+  /** Indices from index returned by su_root_register() to tables below.
    *
    * Free elements are negative. Free elements form a list, value of free
    * element is (0 - index of next free element).
    *
-   * First element sup_indices[0] points to first free element. 
+   * First element sup_indices[0] points to first free element.
    */
   int             *sup_indices;
 
   int             *sup_reverses; /** Reverse index */
-  su_wakeup_f     *sup_wait_cbs; 
-  su_wakeup_arg_t**sup_wait_args; 
-  su_root_t      **sup_wait_roots; 
-  su_wait_t       *sup_waits; 
+  su_wakeup_f     *sup_wait_cbs;
+  su_wakeup_arg_t**sup_wait_args;
+  su_root_t      **sup_wait_roots;
+  su_wait_t       *sup_waits;
 
 };
 
 static void su_poll_port_decref(su_port_t *, int blocking, char const *who);
 
 static int su_poll_port_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_poll_port_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_poll_port_deregister(su_port_t *self, int i);
 static int su_poll_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_poll_port_eventmask(su_port_t *self, 
+static int su_poll_port_eventmask(su_port_t *self,
 				  int index,
 				  int socket,
 				  int events);
@@ -170,22 +170,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_poll_port_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)
@@ -212,7 +212,7 @@
 
     if (self->sup_size_waits == 0)
       size = su_root_size_hint;
-    else 
+    else
       size = 2 * self->sup_size_waits;
 
     if (size < SU_WAIT_MIN)
@@ -239,7 +239,7 @@
 	reverses[i] = -1;
       self->sup_reverses = reverses;
     }
-      
+
     waits = su_realloc(h, self->sup_waits, size * sizeof(*waits));
     if (waits)
       self->sup_waits = waits;
@@ -254,10 +254,10 @@
 
     /* Add sup_wait_roots array, if needed */
     wait_tasks = su_realloc(h, self->sup_wait_roots, size * sizeof(*wait_tasks));
-    if (wait_tasks) 
+    if (wait_tasks)
       self->sup_wait_roots = wait_tasks;
 
-    if (!(indices && 
+    if (!(indices &&
 	  reverses && waits && wait_cbs && wait_args && wait_tasks)) {
       return -1;
     }
@@ -276,7 +276,7 @@
       self->sup_waits[n] = self->sup_waits[n-1];
       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];
     }
 
     self->sup_pri_offset++;
@@ -316,9 +316,9 @@
 
   if (destroy_wait)
     su_wait_destroy(&self->sup_waits[n]);
-  
+
   N = --self->sup_n_waits;
-  
+
   if (n < self->sup_pri_offset) {
     int j = --self->sup_pri_offset;
     if (n != j) {
@@ -354,7 +354,7 @@
   self->sup_wait_cbs[n] = NULL;
   self->sup_wait_args[n] = NULL;
   self->sup_wait_roots[n] = NULL;
-  
+
   indices[i] = indices[0];
   indices[0] = -i;
 
@@ -365,25 +365,25 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  *  The function su_poll_port_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)
  *
- * @deprecated Use su_poll_port_deregister() instead. 
+ * @deprecated Use su_poll_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_poll_port_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)
 {
@@ -406,14 +406,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_poll_port_deregister(su_port_t *self, int i)
@@ -429,7 +429,7 @@
 
   if (self->sup_indices[i] < 0)
     return su_seterrno(EBADF);
-    
+
   retval = su_poll_port_deregister0(self, i, 1);
 
   su_wait_destroy(wait);
@@ -443,13 +443,13 @@
  *
  * The function su_poll_port_unregister_all() unregisters all su_wait_t objects
  * and destroys all queued timers associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
-int su_poll_port_unregister_all(su_port_t *self, 
+int su_poll_port_unregister_all(su_port_t *self,
 				su_root_t *root)
 {
   int i, j, index, N;
@@ -464,11 +464,11 @@
   N          = self->sup_n_waits;
   indices    = self->sup_indices;
   reverses   = self->sup_reverses;
-  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; i < N; i++) {
     index = reverses[i]; assert(index > 0 && indices[index] == i);
 
@@ -490,10 +490,10 @@
       wait_args[j]  = wait_args[i];
       wait_roots[j] = wait_roots[i];
     }
-    
+
     j++;
   }
-  
+
   for (i = j; i < N; i++) {
     reverses[i] = -1;
     wait_cbs[i] = NULL;
@@ -545,7 +545,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -557,7 +557,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -637,7 +637,7 @@
 #endif
   fprintf(f, "\t%d wait objects\n", self->sup_n_waits);
   for (i = 0; i < self->sup_n_waits; i++) {
-    
+
   }
 }
 
@@ -669,7 +669,7 @@
 			su_root_init_f init,
 			su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_poll_port_create, 
+  return su_pthreaded_port_start(su_poll_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * OS-Independent Socket Syncronization Interface.
  *
  * This looks like nth reincarnation of "reactor". It implements the
- * poll/select/WaitForMultipleObjects and message passing functionality. 
+ * poll/select/WaitForMultipleObjects and message passing functionality.
  * This is virtual implementation:
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
@@ -149,17 +149,17 @@
   }
 #endif
 
-  if (create == NULL) 
+  if (create == NULL)
     create = su_default_port_create;
 
   if (!preferred_su_port_create ||
-      preferred_su_port_create == su_default_port_create) 
+      preferred_su_port_create == su_default_port_create)
     preferred_su_port_create = create;
 
   if (start == NULL)
     start = su_default_clone_start;
 
-  if (!preferred_su_clone_start || 
+  if (!preferred_su_clone_start ||
       preferred_su_clone_start == su_default_clone_start)
     preferred_su_clone_start = start;
 }
@@ -184,25 +184,25 @@
  */
 
 /**@ingroup su_wait
- * 
+ *
  * @page su_clone_t Clone Objects
  *
  * The process may be divided into many tasks via cloning. Several tasks may
- * run in context of one thread, or each task may be run by its own thread. 
+ * run in context of one thread, or each task may be run by its own thread.
  * However, only a single thread can execute code within a task. There can
  * be a 1-to-N mapping from thread to tasks. Thus, software using tasks can
  * be executed by multiple threads in a multithreaded environment and by a
  * single thread in a singlethreaded environment.
- * 
+ *
  * The clones are useful for handling tasks that can be executed by a
  * separate threads, but which do not block excessively. When threads are
  * not available or they are not needed, clones can also be run in a
  * single-threaded mode. Running in single-threaded mode is especially
  * useful while debugging.
- * 
+ *
  * A clone task is created with function su_clone_start(). Each clone has
  * its own root object (su_root_t), which holds a context pointer
- * (su_root_magic_t *). The context object can be different from that of 
+ * (su_root_magic_t *). The context object can be different from that of
  * parent task.
  *
  * When a clone is started, the clone initialization function is called. The
@@ -211,7 +211,7 @@
  * initialization is successful, the clone task reverts to run the event
  * loop and invoking the event callbacks until its parent stops it by
  * calling su_clone_wait() which invokes the deinit function. The clone task
- * is destroyed when the deinit function returns. 
+ * is destroyed when the deinit function returns.
  *
  * The public API consists of following functions:
  *    - su_clone_start()
@@ -219,7 +219,7 @@
  *    - su_clone_wait()
  *    - su_clone_forget()
  *
- * @note 
+ * @note
  * There is only one event loop for each thread which can be shared by
  * multiple clone tasks. Therefore, the clone tasks can not explicitly run
  * or step the event loop, but they are limited to event callbacks. A clone
@@ -239,7 +239,7 @@
  *
  * Allocate and initialize a sub-task. Depending on the su_root_threading()
  * settings, a separate thread may be created to execute the sub-task. The
- * sub-task is represented by clone handle to the rest of the application. 
+ * sub-task is represented by clone handle to the rest of the application.
  * The function su_clone_start() returns the clone handle in @a
  * return_clone. The clone handle is used to communicate with the newly
  * created clone task using messages.
@@ -255,14 +255,14 @@
  * Messages can also be used to pass information between tasks or threads.
  *
  * In multi-threaded implementation, su_clone_start() launches a new thread,
- * and the initialization routine is executed by this newly created thread. 
+ * and the initialization routine is executed by this newly created thread.
  * The calling thread blocks until the initialization routine completes. If
  * the initialization routine returns #su_success (0), the sub-task is
  * considered to be created successfully. After the successful
  * initialization, the sub-task continues to execeute the function
  * su_root_run().
  *
- * In single-threaded implementations, just a new root object is created. 
+ * In single-threaded implementations, just a new root object is created.
  * The initialization routine is called directly from su_clone_start().
  *
  * If the initalization function @a init fails, the sub-task (either the
@@ -297,7 +297,7 @@
   if (deinit == NULL)
     deinit = su_root_deinit_nothing;
 
-    
+
   if (parent == NULL || parent->sur_threading) {
     if (preferred_su_clone_start == NULL)
       su_port_set_system_preferences(getenv("SU_PORT"));
@@ -314,7 +314,7 @@
 }
 
 /** Get reference to a clone task.
- * 
+ *
  * @param clone Clone pointer
  *
  * @return A reference to the task structure of the clone.
@@ -325,7 +325,7 @@
 }
 
 /**Forget the clone.
- * 
+ *
  * Normally, the clone task executes until it is stopped.  If the parent
  * task does not need to stop the task, it can "forget" the clone.  The
  * clone exits independently of the parent task.
@@ -341,7 +341,7 @@
  *
  * This can used only if clone task has sent no report messages (messages
  * with delivery report sent back to clone).
- * 
+ *
  * @deprecated. Use su_clone_wait().
  */
 void su_clone_stop(su_clone_r rclone)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h	Tue Dec 16 13:05:22 2008
@@ -26,14 +26,14 @@
 /** Defined when <su_port.h> has been included. */
 #define SU_PORT_H
 
-/**@internal @file su_port.h 
+/**@internal @file su_port.h
  *
  * @brief Internal OS-independent syncronization interface.
  *
  * This looks like the "reactor" pattern.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Fri May 12 14:13:34 2000 ppessi
  */
 
@@ -91,7 +91,7 @@
   su_port_thread_op_release,
   su_port_thread_op_obtain
 };
-  
+
 /** @internal Virtual function table for port */
 typedef struct su_port_vtable {
   unsigned su_vtable_size;
@@ -102,15 +102,15 @@
   struct _GSource *(*su_port_gsource)(su_port_t *port);
   int (*su_port_send)(su_port_t *self, su_msg_r rmsg);
   int (*su_port_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);
   int (*su_port_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);
   int (*su_port_deregister)(su_port_t *self, int i);
   int (*su_port_unregister_all)(su_port_t *self,
@@ -119,15 +119,15 @@
   void (*su_port_run)(su_port_t *self);
   void (*su_port_break)(su_port_t *self);
   su_duration_t (*su_port_step)(su_port_t *self, su_duration_t tout);
-  
+
   /* Reused slot */
   int (*su_port_thread)(su_port_t *port, enum su_port_thread_op op);
-  
+
   int (*su_port_add_prepoll)(su_port_t *port,
-			     su_root_t *root, 
-			     su_prepoll_f *, 
+			     su_root_t *root,
+			     su_prepoll_f *,
 			     su_prepoll_magic_t *);
-  
+
   int (*su_port_remove_prepoll)(su_port_t *port,
 				su_root_t *root);
 
@@ -149,7 +149,7 @@
   void (*su_port_wait)(su_clone_r rclone);
   int (*su_port_execute)(su_task_r const task,
 			 int (*function)(void *), void *arg,
-			 int *return_value);  
+			 int *return_value);
 } su_port_vtable_t;
 
 SOFIAPUBFUN su_port_t *su_port_create(void)
@@ -170,7 +170,7 @@
 
 /* ---------------------------------------------------------------------- */
 
-/* React to multiple events per one poll() to make sure 
+/* React to multiple events per one poll() to make sure
  * that high-priority events can never completely mask other events.
  * Enabled by default on all platforms except WIN32 */
 #if !defined(WIN32)
@@ -245,8 +245,8 @@
 
 su_inline
 int su_port_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)
@@ -258,9 +258,9 @@
 
 su_inline
 int su_port_unregister(su_port_t *self,
-		       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)
 {
   su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -353,8 +353,8 @@
 
 su_inline
 int su_port_add_prepoll(su_port_t *self,
-			su_root_t *root, 
-			su_prepoll_f *prepoll, 
+			su_root_t *root,
+			su_prepoll_f *prepoll,
 			su_prepoll_magic_t *magic)
 {
   su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -415,9 +415,9 @@
   su_port_vtable_t const *sup_vtable;
 
   /* Implementation may vary stuff below, too. */
-  
+
   /* Pre-poll callback */
-  su_prepoll_f    *sup_prepoll; 
+  su_prepoll_f    *sup_prepoll;
   su_prepoll_magic_t *sup_pp_magic;
   su_root_t       *sup_pp_root;
 
@@ -460,8 +460,8 @@
 					    su_duration_t tout);
 
 SOFIAPUBFUN int su_base_port_add_prepoll(su_port_t *self,
-					 su_root_t *root, 
-					 su_prepoll_f *, 
+					 su_root_t *root,
+					 su_prepoll_f *,
 					 su_prepoll_magic_t *);
 
 SOFIAPUBFUN int su_base_port_remove_prepoll(su_port_t *self, su_root_t *root);
@@ -483,10 +483,10 @@
 
 #include <pthread.h>
 
-/** @internal Pthread port object */ 
+/** @internal Pthread port object */
 typedef struct su_pthread_port_s {
   su_base_port_t   sup_base[1];
-  struct su_pthread_port_waiting_parent 
+  struct su_pthread_port_waiting_parent
                   *sup_waiting_parent;
   pthread_t        sup_tid;
   pthread_mutex_t  sup_obtained[1];
@@ -564,7 +564,7 @@
   su_socket_t       sup_mbox[SU_MBOX_SIZE];
 } su_socket_port_t;
 
-SOFIAPUBFUN int su_socket_port_init(su_socket_port_t *, 
+SOFIAPUBFUN int su_socket_port_init(su_socket_port_t *,
 				    su_port_vtable_t const *);
 SOFIAPUBFUN void su_socket_port_deinit(su_socket_port_t *self);
 SOFIAPUBFUN int su_socket_port_send(su_port_t *self, su_msg_r rmsg);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_proxy.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_proxy.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_proxy.c	Tue Dec 16 13:05:22 2008
@@ -24,12 +24,12 @@
 
 /**@internal @ingroup su_root_ex
  *
- * @file su_proxy.c 
+ * @file su_proxy.c
  *
  * @brief Transport level proxy demonstrating various @b su features.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed May 23 17:42:40 2001 ppessi
  */
 
@@ -63,7 +63,7 @@
 #define __func__ "su_proxy"
 #endif
 
-struct proxy_s 
+struct proxy_s
 {
   su_home_t      pr_home[1];
   su_root_t     *pr_root;
@@ -71,7 +71,7 @@
   forwarder_t   *pr_forwarders;
 };
 
-struct forwarder_s 
+struct forwarder_s
 {
   forwarder_t  *f_next;
   forwarder_t **f_prev;
@@ -138,7 +138,7 @@
     error = pr_run(pr);
 
   pr_deinit(pr);
-   
+
   su_deinit();
 
   exit(error);
@@ -189,14 +189,14 @@
     return 2;
 
   if ((error = su_getaddrinfo(argv[1], argv[2], hints, &res))) {
-    fprintf(stderr, "getaddrinfo: %s:%s: %s\n", 
+    fprintf(stderr, "getaddrinfo: %s:%s: %s\n",
 	    argv[1], argv[2], su_gai_strerror(error));
     return 1;
   }
 
     pr->pr_addrinfo = res;
 
-  if (argv[3]) 
+  if (argv[3])
     service = argv[3];
   else
     service = argv[2];
@@ -208,14 +208,14 @@
     return 1;
   }
 
-  for (ai = res; 
+  for (ai = res;
        ai;
        ai = ai->ai_next) {
     forwarder_create_listener(pr, ai);
   }
 
   su_freeaddrinfo(res);
-  
+
   if (!pr->pr_forwarders) {
     fprintf(stderr, "%s:%s: %s\n", argv[1], argv[2], "unable to forward");
     return 1;
@@ -233,7 +233,7 @@
     su_root_destroy(pr->pr_root), pr->pr_root = NULL;
 
   su_home_deinit(pr->pr_home);
-  
+
   su_deinit();
 }
 
@@ -315,8 +315,8 @@
       su_setblocking(s, 0);
       su_setreuseaddr(s, 1);
       if (bind(s, ai->ai_addr, ai->ai_addrlen) >= 0) {
-	if (ai->ai_socktype == SOCK_STREAM ? 
-	    forwarder_init_stream(f) >= 0 : 
+	if (ai->ai_socktype == SOCK_STREAM ?
+	    forwarder_init_stream(f) >= 0 :
 	    forwarder_init_dgram(f) >= 0)
 	  return f;
       }
@@ -327,7 +327,7 @@
   }
 
   forwarder_destroy(f);
-  
+
   return NULL;
 }
 
@@ -335,11 +335,11 @@
 {
   if (listen(f->f_socket, SOMAXCONN) < 0)
     return SOCKET_ERROR;
-  
+
   if (su_wait_create(f->f_wait, f->f_socket, SU_WAIT_ACCEPT) < 0)
     return SOCKET_ERROR;
 
-  if (su_root_register(f->f_pr->pr_root, f->f_wait, 
+  if (su_root_register(f->f_pr->pr_root, f->f_wait,
 		       forwarder_accept, f, 0) < 0)
     return SOCKET_ERROR;
 
@@ -359,7 +359,7 @@
   su_sockaddr_t *su;
   socklen_t  sulen;
   int events;
-  
+
   events = su_wait_events(w, f0->f_socket);
 
   f = forwarder_create(pr);
@@ -371,7 +371,7 @@
     f->f_upstream = 1;
     if (f->f_socket != INVALID_SOCKET) {
       char buf[SU_ADDRSIZE];
-      
+
       SU_DEBUG_3(("accept: connection from %s:%u\n",
 		  su_inet_ntop(su->su_family, SU_ADDR(su), buf, sizeof(buf)),
 		  ntohs(su->su_port)));
@@ -400,7 +400,7 @@
   su_addrinfo_t *ai;
 
   assert(f_peer);
-  
+
   f = forwarder_create(pr);
   if (!f) {
     SU_DEBUG_1(("%s: cannot allocate peer\n", __func__));
@@ -440,7 +440,7 @@
     goto error;
   }
 
-  if (su_root_register(pr->pr_root, f->f_wait + 1, 
+  if (su_root_register(pr->pr_root, f->f_wait + 1,
 		       forwarder_connected, f, 0) == -1) {
     SU_DEBUG_1(("%s: cannot register\n", __func__));
     goto error;
@@ -495,13 +495,13 @@
   if (n > 0) {
     b->b_sent = 0; b->b_used = n;
     if (f->f_peer->f_buf) {
-      forwarder_append(f, b); 
+      forwarder_append(f, b);
       return 0;
     }
     if (forwarder_send(pr, f->f_peer, b) >= 0) {
       if (b->b_sent < b->b_used) {
 	su_root_unregister(pr->pr_root, w, forwarder_recv, f);
-	su_root_register(pr->pr_root, f->f_peer->f_wait + 1, 
+	su_root_register(pr->pr_root, f->f_peer->f_wait + 1,
 			 forwarder_empty, f->f_peer, 0);
 	forwarder_append(f, b);
       }
@@ -514,7 +514,7 @@
   if (n < 0) {
     int error = su_errno();
     SU_DEBUG_1(("recv: %s\n", su_strerror(error)));
-  
+
     if (error == EINTR || error == EAGAIN || error == EWOULDBLOCK) {
       return 0;
     }
@@ -523,7 +523,7 @@
   }
 
   /* shutdown */
-  forwarder_shutdown(f);	
+  forwarder_shutdown(f);
 
   return 0;
 }
@@ -531,7 +531,7 @@
 int forwarder_send(proxy_t *pr, forwarder_t *f, buffer_t *b)
 {
   int n, error;
-  
+
   do {
     n = send(f->f_socket, b->b_data + b->b_sent, b->b_used - b->b_sent, 0);
 
@@ -626,11 +626,11 @@
   forwarder_t *f_peer = f->f_peer;
   su_sockaddr_t *su = f->f_dest;
   char buf[SU_ADDRSIZE];
-  
+
   SU_DEBUG_3(("forwarder_shutdown: shutdown from %s:%u\n",
 	      su_inet_ntop(su->su_family, SU_ADDR(su), buf, sizeof(buf)),
 	      ntohs(su->su_port)));
-  
+
   if (su_root_unregister(f->f_pr->pr_root, f->f_wait, forwarder_recv, f) < 0) {
     SU_DEBUG_1(("%s: su_root_unregister failed\n", __func__));
   }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c	Tue Dec 16 13:05:22 2008
@@ -99,7 +99,7 @@
 
   su_home_lock(self->sup_base->sup_home);
 
-  PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...", 
+  PORT_LOCK_DEBUG((" ...%p at %s locked(%p)...",
 		   (void *)pthread_self(), who, self));
 }
 
@@ -107,7 +107,7 @@
 {
   su_home_unlock(self->sup_base->sup_home);
 
-  PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n", 
+  PORT_LOCK_DEBUG((" ...%p at %s unlocked(%p)\n",
 		   (void *)pthread_self(), who, self));
 }
 
@@ -116,7 +116,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)
@@ -224,7 +224,7 @@
  *
  * @sa su_root_threading(), su_clone_task(), su_clone_stop(), su_clone_wait(),
  * su_clone_forget().
- * 
+ *
  */
 int su_pthreaded_port_start(su_port_create_f *create,
 			    su_root_t *parent,
@@ -302,7 +302,7 @@
 
       task->sut_root->sur_threading = 1;	/* By default */
 
-      SU_TASK_COPY(task->sut_root->sur_parent, su_root_task(arg->parent), 
+      SU_TASK_COPY(task->sut_root->sur_parent, su_root_task(arg->parent),
 		   su_pthread_port_clone_main);
       SU_TASK_COPY(task->sut_root->sur_task, task,
 		   su_pthread_port_clone_main);
@@ -329,7 +329,7 @@
 	    mom->waiting = 0;
 	    pthread_cond_signal(mom->cv);
 	    pthread_mutex_unlock(mom->mutex);
-    
+
 	    pthread_mutex_lock(mom->deinit);
 	    su_port_getmsgs(task->sut_port);
 	    pthread_mutex_unlock(mom->deinit);
@@ -345,7 +345,7 @@
     }
 
     task->sut_port->sup_base->sup_vtable->
-      su_port_decref(task->sut_port, zap, 
+      su_port_decref(task->sut_port, zap,
 		     "su_pthread_port_clone_main");
   }
 
@@ -373,7 +373,7 @@
 /** "Stop" message function for pthread clone.
  *
  * @sa su_clone_wait()
- * @internal 
+ * @internal
  */
 static void su_pthread_port_clone_break(su_root_magic_t *m,
 					su_msg_r msg,
@@ -406,8 +406,8 @@
     su_base_port_wait(rclone);
     return;
   }
-  
-  assert(parent); assert(clone); 
+
+  assert(parent); assert(clone);
   assert(rclone[0]->sum_func == su_pthread_port_clone_break);
 #if 0
   assert(!clone->sup_paused);
@@ -418,7 +418,7 @@
   if (!clone->sup_thread) {	/* Already died */
     su_msg_destroy(rclone);
     pthread_join(tid, NULL);
-    return;  
+    return;
   }
 
   pthread_mutex_init(mom->deinit, NULL);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_root.c	Tue Dec 16 13:05:22 2008
@@ -23,12 +23,12 @@
  */
 
 /**@ingroup su_wait
- * @CFILE su_root.c 
- * OS-independent synchronization interface. 
+ * @CFILE su_root.c
+ * OS-independent synchronization interface.
  * @internal
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Sep 14 15:51:04 1999 ppessi
  */
 
@@ -56,7 +56,7 @@
 #include "sofia-sip/su_alloc.h"
 
 /**@ingroup su_wait
- * 
+ *
  * @page su_root_t Tasks and root objects
  *
  * A task is the basic execution unit for the Sofia event-driven programming
@@ -91,8 +91,8 @@
  * New tasks can be created via su_clone_start() function.
  */
 
-/**@ingroup su_wait 
- * 
+/**@ingroup su_wait
+ *
  * @page su_root_register Registering Wait Objects
  *
  * When application expects I/O events, it can create a wait object and
@@ -111,8 +111,8 @@
  */
 
 /**@ingroup su_wait
- * 
- * Contains hint of number of sockets supported by su_root_t */ 
+ *
+ * Contains hint of number of sockets supported by su_root_t */
 int su_root_size_hint = 64;
 
 /* =========================================================================
@@ -187,7 +187,7 @@
 void su_task_copy(su_task_r dst, su_task_r const src)
 {
   su_port_t *port;
-  
+
   assert(src); assert(dst);
 
   SU_TASK_ZAP(dst, su_task_copy);
@@ -219,10 +219,10 @@
 
 /**
  * Compare two tasks with each other.
- * 
+ *
  * @param a  First task
  * @param b  Second task
- * 
+ *
  * @retval negative number, if a < b
  * @retval positive number, if a > b
  * @retval 0, if a == b.
@@ -249,14 +249,14 @@
  *
  * @param task  task handle
  *
- * @retval true (nonzero) if task is not stopped, 
+ * @retval true (nonzero) if task is not stopped,
  * @retval zero if it is null or stopped.
  */
 int su_task_is_running(su_task_r const task)
 {
-  return 
-    task && 
-    task->sut_port && 
+  return
+    task &&
+    task->sut_port &&
     task->sut_root;
 }
 
@@ -265,7 +265,7 @@
  *
  * @param self task handle
  * @param root pointer to the root object
- * 
+ *
  * @retval 0 if successful,
  * @retval -1 otherwise.
  */
@@ -275,16 +275,16 @@
     self->sut_root = root;
     return 0;
   }
-  else 
+  else
     return -1;
 }
 
-/** 
+/**
  * Get root pointer attached to a task handle.
  *
  * @param self task handle
  *
- * @return 
+ * @return
  * A pointer to root object attached to the task handle, or NULL if no root
  * object has been attached.
  */
@@ -307,7 +307,7 @@
 
 /**
  * Return the timer list associated with given task.
- * 
+ *
  * @param task task handle
  *
  * @return A timer list of the task. If there are no timers, it returns
@@ -408,7 +408,7 @@
     /* This one creates a new reference to port */
     su_task_new(self->sur_task, self, port);
     /* ... so we zap the old one below */
-  } 
+  }
 
   su_port_decref(port, "su_root_create_with_port");
 
@@ -416,7 +416,7 @@
 }
 
 /** Destroy a root object.
- * 
+ *
  *  Stop and free an instance of su_root_t
  *
  * @param self     pointer to a root object.
@@ -541,7 +541,7 @@
   return su_port_gsource(self->sur_port);
 }
 
-/** Register a su_wait_t object. 
+/** Register a su_wait_t object.
  *
  *  The function su_root_register() registers a su_wait_t object. The wait
  *  object, a callback function and a argument are stored to the root
@@ -655,7 +655,7 @@
  *
  * @param self      pointer to root object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -808,8 +808,8 @@
 }
 
 /** Add a pre-poll callback. */
-int su_root_add_prepoll(su_root_t *root, 
-			su_prepoll_f *callback, 
+int su_root_add_prepoll(su_root_t *root,
+			su_prepoll_f *callback,
 			su_prepoll_magic_t *magic)
 {
   if (root == NULL)
@@ -840,7 +840,7 @@
   return su_port_release(root->sur_port);
 }
 
-/** Obtain the root port from other thread. 
+/** Obtain the root port from other thread.
  *
  * @param root pointer to root object
  *
@@ -848,7 +848,7 @@
  * @retval -1 upon an error
  *
  * @ERRORS
- * @ERROR EFAULT 
+ * @ERROR EFAULT
  * @NEW_1_12_7
  */
 int su_root_obtain(su_root_t *root)
@@ -858,7 +858,7 @@
   return su_port_obtain(root->sur_port);
 }
 
-/**Check if a thread has obtained the root. 
+/**Check if a thread has obtained the root.
  *
  * @param root a pointer to root object
  *
@@ -883,13 +883,13 @@
 /**
  * Allocate a su message of given size.
  *
- * Allocate a su message with given data size. 
+ * Allocate a su message with given data size.
  *
  * @param  rmsg   handle to the new message (may be uninitialized prior calling)
  * @param  size   size of the message data
  *
  * @retval  0 if successful,
- * @retval -1 if message allocation fails.  
+ * @retval -1 if message allocation fails.
  *
  * @NEW_1_12_8
  */
@@ -919,7 +919,7 @@
  * @param  size   size of the message data
  *
  * @retval  0 if successful,
- * @retval -1 if message allocation fails.  
+ * @retval -1 if message allocation fails.
  */
 int su_msg_create(su_msg_r        rmsg,
 		  su_task_r const to,
@@ -932,17 +932,17 @@
     SU_TASK_COPY(rmsg[0]->sum_from, from, su_msg_create);
     rmsg[0]->sum_func = wakeup;
     return 0;
-  } 
+  }
 
   return -1;
 }
 
 /** Add a delivery report function to a message.
- * 
+ *
  * The delivery report funcgtion gets called by the sending task after the
  * message was delivered and the message function was executed. (The
- * su_root_t message delivery loop calls su_msg_delivery_report() 
- * 
+ * su_root_t message delivery loop calls su_msg_delivery_report()
+ *
  */
 int su_msg_report(su_msg_r msg,
 		  su_msg_f report)
@@ -1068,7 +1068,7 @@
   }
 }
 
-/** Gets a pointer to the message data area. 
+/** Gets a pointer to the message data area.
  *
  * The function @c su_msg_data() returns a pointer to the message data
  * area. If @c rmsg contains a @c NULL handle, or message size is 0, @c NULL
@@ -1076,7 +1076,7 @@
  *
  * @param rmsg       message handle
  *
- * @return A pointer to the message data area is returned.  
+ * @return A pointer to the message data area is returned.
  */
 su_msg_arg_t *su_msg_data(su_msg_cr rmsg)
 {
@@ -1101,7 +1101,7 @@
  *
  * @param rmsg       message handle
  *
- * @return The task handle of the sender is returned.  
+ * @return The task handle of the sender is returned.
  */
 _su_task_r su_msg_from(su_msg_cr rmsg)
 {
@@ -1118,14 +1118,14 @@
  *
  * @param rmsg       message handle
  *
- * @return The task handle of the recipient is returned.  
+ * @return The task handle of the recipient is returned.
  */
 _su_task_r su_msg_to(su_msg_cr rmsg)
 {
   return rmsg[0] ? rmsg[0]->sum_to : NULL;
 }
 
-/** Remove references to 'from' and 'to' tasks from a message. 
+/** Remove references to 'from' and 'to' tasks from a message.
  *
  * @param rmsg       message handle
  */
@@ -1137,7 +1137,7 @@
   }
 }
 
-/**Send a message. 
+/**Send a message.
  *
  * The function @c su_msg_send() sends the message. The message is added to
  * the recipients message queue, and recipient is waken up. The caller may
@@ -1156,7 +1156,7 @@
   if (rmsg[0]) {
     su_msg_t *msg = rmsg[0];
 
-    if (msg->sum_to->sut_port) 
+    if (msg->sum_to->sut_port)
       return su_port_send(msg->sum_to->sut_port, rmsg);
 
     su_msg_destroy(rmsg);
@@ -1164,7 +1164,7 @@
     return -1;
   }
 
-  return 0;		
+  return 0;
 }
 
 /** Send message to the @a to_task and mark @a from_task as sender.
@@ -1183,9 +1183,9 @@
     if (wakeup)
       msg->sum_func = wakeup;
 
-    if (msg->sum_to->sut_port && 
+    if (msg->sum_to->sut_port &&
 	msg->sum_to->sut_port != to_task->sut_port) {
-      SU_TASK_ZAP(msg->sum_to, "su_msg_send_to"); 
+      SU_TASK_ZAP(msg->sum_to, "su_msg_send_to");
     }
 
     if (to_task->sut_port != NULL) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_select_port.c	Tue Dec 16 13:05:22 2008
@@ -83,8 +83,8 @@
   int              sup_epoll;
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
   int              sup_n_registrations;
@@ -94,15 +94,15 @@
   /** Structure containing registration data */
   struct su_select_register {
     struct su_select_register *ser_next; /* Next in free list */
-    su_wakeup_f     ser_cb; 
-    su_wakeup_arg_t*ser_arg; 
-    su_root_t      *ser_root; 
+    su_wakeup_f     ser_cb;
+    su_wakeup_arg_t*ser_arg;
+    su_root_t      *ser_root;
     int             ser_id; /** registration identifier */
     su_wait_t       ser_wait[1];
   } **sup_indices;
 
   int               sup_maxfd, sup_allocfd;
-  
+
   fd_set           *sup_readfds, *sup_readfds2;
   fd_set           *sup_writefds, *sup_writefds2;
 };
@@ -111,19 +111,19 @@
 				 int blocking,
 				 char const *who);
 static int su_select_port_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_select_port_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_select_port_deregister(su_port_t *self, int i);
 static int su_select_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_select_port_eventmask(su_port_t *self, 
+static int su_select_port_eventmask(su_port_t *self,
 				   int index,
 				   int socket,
 				   int events);
@@ -189,22 +189,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_select_port_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)
@@ -225,7 +225,7 @@
 
   self->sup_registers++;
 
-  if (wait->fd >= allocfd) 
+  if (wait->fd >= allocfd)
     allocfd += __NFDBITS;		/* long at a time */
 
   if (allocfd >= self->sup_allocfd) {
@@ -259,7 +259,7 @@
     su_home_t *h = su_port_home(self);
 
     i = self->sup_max_index, j = i == 0 ? 15 : i + 16;
-    
+
     if (j >= self->sup_size_indices) {
       /* Reallocate index table */
       n = n < 1024 ? 2 * n : n + 1024;
@@ -291,7 +291,7 @@
   i = ser->ser_id;
 
   indices[0] = ser->ser_next;
-  
+
   ser->ser_next = NULL;
   *ser->ser_wait = *wait;
   ser->ser_cb = callback;
@@ -358,25 +358,25 @@
 
 
 /** Unregister a su_wait_t object.
- *  
- * The function su_select_port_unregister() unregisters a su_wait_t object. 
+ *
+ * The function su_select_port_unregister() unregisters a su_wait_t object.
  * The registration defined by the wait object, the callback function and
  * the argument pointer 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)
  *
- * @deprecated Use su_select_port_deregister() instead. 
+ * @deprecated Use su_select_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_select_port_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)
 {
@@ -404,14 +404,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_select_port_deregister(su_port_t *self, int i)
@@ -434,10 +434,10 @@
  *
  * The function su_select_port_unregister_all() unregisters all su_wait_t
  * objects associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
 int su_select_port_unregister_all(su_port_t *self, su_root_t *root)
@@ -498,7 +498,7 @@
     return -1;
 
   assert(socket < self->sup_maxfd);
-  
+
   if (events & SU_WAIT_IN)
     FD_SET(socket, self->sup_readfds);
   else
@@ -521,7 +521,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -533,7 +533,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -563,7 +563,7 @@
   if (bytes) {
     rset = memcpy(self->sup_readfds2, self->sup_readfds, bytes);
     wset = memcpy(self->sup_writefds2, self->sup_writefds, bytes);
-  }  
+  }
 
   tv.tv_sec = tout / 1000;
   tv.tv_usec = (tout % 1000) * 1000;
@@ -609,7 +609,7 @@
 
     if (n == 0)
       break;
-  }    
+  }
 
   assert(n == 0);
 
@@ -627,9 +627,9 @@
     return NULL;
 
   if (su_home_destructor(su_port_home(self), su_select_port_deinit) < 0 ||
-      !(self->sup_indices = 
+      !(self->sup_indices =
 	su_zalloc(su_port_home(self),
-		  (sizeof self->sup_indices[0]) * 
+		  (sizeof self->sup_indices[0]) *
 		  (self->sup_size_indices = __NFDBITS)))) {
     su_home_unref(su_port_home(self));
     return NULL;
@@ -649,7 +649,7 @@
 			 su_root_init_f init,
 			 su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_select_port_create, 
+  return su_pthreaded_port_start(su_select_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_socket_port.c	Tue Dec 16 13:05:22 2008
@@ -84,7 +84,7 @@
   su_wait_t wait[1] = { SU_WAIT_INIT };
   char const *why;
 
-  SU_DEBUG_9(("su_socket_port_init(%p, %p) called\n", 
+  SU_DEBUG_9(("su_socket_port_init(%p, %p) called\n",
 	      (void *)self, (void *)vtable));
 
   if (su_pthread_port_init(self, vtable) != 0)
@@ -109,17 +109,17 @@
     struct sockaddr_in sin = { sizeof(struct sockaddr_in), 0 };
     socklen_t sinsize = sizeof sin;
     struct sockaddr *sa = (struct sockaddr *)&sin;
-    
+
     af = PF_INET;
-      
+
     self->sup_mbox[0] = mb = su_socket(af, SOCK_DGRAM, IPPROTO_UDP);
     if (mb == INVALID_SOCKET) {
       why = "socket"; goto error;
     }
-    
+
     sin.sin_family = AF_INET;
     sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* 127.1 */
-      
+
     /* Get a port for us */
     if (bind(mb, sa, sizeof sin) == -1) {
       why = "bind"; goto error;
@@ -128,20 +128,20 @@
     if (getsockname(mb, sa, &sinsize) == -1) {
       why = "getsockname"; goto error;
     }
-    
+
     if (connect(mb, sa, sinsize) == -1) {
       why = "connect"; goto error;
     }
   }
-#endif    
+#endif
 
   if (su_wait_create(wait, mb, SU_WAIT_IN) == -1) {
     why = "su_wait_create";
     goto error;
   }
 
-  self->sup_mbox_index = su_port_register(self, NULL, wait, 
-					  su_mbox_port_wakeup, 
+  self->sup_mbox_index = su_port_register(self, NULL, wait,
+					  su_mbox_port_wakeup,
 					  (void *)self->sup_mbox, 0);
 
   if (self->sup_mbox_index <= 0) {
@@ -151,9 +151,9 @@
   }
 
   return 0;
-  
+
   error:
-    su_log("%s: %s: %s\n", "su_socket_port_init", 
+    su_log("%s: %s: %s\n", "su_socket_port_init",
 	   why, su_strerror(su_errno()));
 
   return retval;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_sprintf.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_sprintf.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_sprintf.c	Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
  * @CFILE su_sprintf.c  su_*sprintf() functions
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Apr 17 20:05:21 2001 ppessi
  */
 
@@ -50,7 +50,7 @@
 
 #include "sofia-sip/su_alloc.h"
 
-/**Copy a formatted string. 
+/**Copy a formatted string.
  *
  * The function su_vsprintf() print a string according to a @a fmt like
  * vprintf() or vsnprintf(). The resulting string is copied to a memory area
@@ -61,7 +61,7 @@
  * @param home pointer to memory home (may be NULL)
  * @param fmt format string
  * @param ap @e stdarg argument list (must match with the @a fmt format string)
- * 
+ *
  * @return A pointer to a fresh copy of formatting result, or NULL upon an
  * error.
  */
@@ -76,9 +76,9 @@
   n = vsnprintf(s, sizeof(s), fmt, aq);
   va_end(aq);
 
-  if (n >= 0 && (size_t)n + 1 < sizeof(s)) 
+  if (n >= 0 && (size_t)n + 1 < sizeof(s))
     return su_strdup(home, s);
-  
+
   len = n > 0 ? (size_t)n + 1 : 2 * sizeof(s);
 
   for (rv = su_alloc(home, len);
@@ -90,7 +90,7 @@
     if (n > -1 && (size_t)n < len)
       break;
     if (n > -1)			/* glibc >2.1 */
-      len = (size_t)n + 1;		
+      len = (size_t)n + 1;
     else			/* glibc 2.0 */
       len *= 2;
 
@@ -101,7 +101,7 @@
   return rv;
 }
 
-/**Copy a formatted string. 
+/**Copy a formatted string.
  *
  * The function su_sprintf() print a string according to a @a fmt like
  * printf() or snprintf(). The resulting string is copied to a memory area
@@ -112,7 +112,7 @@
  * @param home pointer to memory home (may be NULL)
  * @param fmt format string
  * @param ... argument list (must match with the @a fmt format string)
- * 
+ *
  * @return A pointer to a fresh copy of formatting result, or NULL upon an
  * error.
  */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strdup.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strdup.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strdup.c	Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
  * @CFILE su_strdup.c  Home-based string duplication functions
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Jul 19 10:06:14 2000 ppessi
  */
 
@@ -44,7 +44,7 @@
  *
  * @param home  pointer to memory home
  * @param s     string to be duplicated
- * 
+ *
  * @return The function su_strdup() returns pointer to the newly created
  *         string, or @c NULL upon an error.
  */
@@ -70,7 +70,7 @@
  * @param home  pointer to memory home
  * @param s1    string to be first string
  * @param s2    string to be first string
- * 
+ *
  * @return Pointer to the newly created string is returned, or @c NULL upon
  * an error.
  */
@@ -104,7 +104,7 @@
  *
  * @param home  pointer to memory home
  * @param ...  NULL-terminated list of strings to be concatenated
- * 
+ *
  * @return Pointer to the newly created string is returned, or @c NULL upon
  * an error.
  */
@@ -152,7 +152,7 @@
  * @param home  pointer to memory home
  * @param s     string to be duplicated
  * @param n     size of the resulting string
- * 
+ *
  * @return The function su_strndup() returns pointer to the newly created
  *         string, or @c NULL upon an error.
  */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strlst.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strlst.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_strlst.c	Tue Dec 16 13:05:22 2008
@@ -55,22 +55,22 @@
  * @code
  * usize_t i, n;
  * su_strlst_t *l;
- * 
+ *
  * l = su_strlst_split(NULL, buf, "\n");
- * 
+ *
  * nonempty = 0;
- * 
+ *
  * for (i = 0; i < su_strlst_len(l); i++) {
  *   n = strcspn(su_strlst_item(l, i), " \t");
  *   if (su_strlst_item(l, i)[n])
  *     nonempty++;
  * }
- * 
+ *
  * su_strlst_destroy(l);
  * @endcode
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Fri May  3 09:22:59 2002 ppessi
  */
 
@@ -250,8 +250,8 @@
 
 /** Copy a string list */
 static
-su_strlst_t *su_strlst_copy_by(su_home_t *home, 
-			       su_strlst_t const *orig, 
+su_strlst_t *su_strlst_copy_by(su_home_t *home,
+			       su_strlst_t const *orig,
 			       int deeply)
 {
   su_strlst_t *self;
@@ -330,7 +330,7 @@
       if (list)
 	memcpy(list, self->sl_list, self->sl_len * sizeof(*self->sl_list));
     }
-    
+
     if (!list)
       return 0;
 
@@ -341,7 +341,7 @@
   return 1;
 }
 
-/**Duplicate and append a string to list. 
+/**Duplicate and append a string to list.
  *
  * @param self  pointer to a string list object
  * @param str   string to be duplicated and appended
@@ -448,7 +448,7 @@
 
 /**Returns a numbered item from the list of strings. The numbering starts from
  * 0.
- * 
+ *
  * @param self  pointer to a string list object
  * @param i     string index
  *
@@ -464,10 +464,10 @@
     return NULL;
 }
 
-/**Sets a item to the list of strings. 
+/**Sets a item to the list of strings.
  *
  * Note that the item numbering starts from 0.
- * 
+ *
  * @param self  pointer to a string list object
  * @param i     string index
  * @param s     string to be set as item @a i
@@ -499,7 +499,7 @@
 
 /**Removes a numbered item from the list of strings. The numbering starts from
  * 0. The caller is responsible of reclaiming memory used by the removed string.
- * 
+ *
  * @param self  pointer to a string list object
  * @param i     string index
  *
@@ -512,7 +512,7 @@
   if (self && i < self->sl_len) {
     char const *s = self->sl_list[i];
 
-    memmove(&self->sl_list[i], &self->sl_list[i + 1], 
+    memmove(&self->sl_list[i], &self->sl_list[i + 1],
 	    &self->sl_list[self->sl_len] - &self->sl_list[i]);
 
     self->sl_len--;
@@ -539,7 +539,7 @@
  * @param home  home pointer
  * @param sep   separator (may be NULL)
  *
- * @return 
+ * @return
  *
  * The function su_strlst_join() returns a concatenation of the strings in
  * list, or NULL upon an error.
@@ -599,7 +599,7 @@
   return l;
 }
 
-/**Split a string. 
+/**Split a string.
  *
  * Splits a string to substrings. It returns a string list object. The
  * string to be split is not copied but instead modified in place. Use
@@ -626,7 +626,7 @@
   return NULL;
 }
 
-/**Duplicate and split a string. 
+/**Duplicate and split a string.
  *
  * Duplicates a string and splits the result to substrings. It returns a
  * string list object. The string to be splitted is not modified.
@@ -638,8 +638,8 @@
  * @return
  * Pointer to list of strings, if successful, or NULL upon an error.
  */
-su_strlst_t *su_strlst_dup_split(su_home_t *home, 
-				 char const *cstr, 
+su_strlst_t *su_strlst_dup_split(su_home_t *home,
+				 char const *cstr,
 				 char const *sep)
 {
   if (cstr) {
@@ -657,23 +657,23 @@
   return NULL;
 }
 
-/** Get number of items in list. 
+/** Get number of items in list.
  *
- * The function su_strlst_len() returns the number of items in the 
+ * The function su_strlst_len() returns the number of items in the
  * string list.
- * 
+ *
  */
 usize_t su_strlst_len(su_strlst_t const *l)
 {
   return l ? l->sl_len : 0;
 }
 
-/**Get a string array from list. 
+/**Get a string array from list.
  *
  * The function su_strlst_get_array() returns an array of strings. The
  * length of the array is always one longer than the length of the string
  * list, and the last string in the returned array is always NULL.
- * 
+ *
  * @param self pointer to a string list object
  *
  * @return
@@ -686,7 +686,7 @@
     size_t size = sizeof(retval[0]) * (self->sl_len + 1);
 
     retval = su_alloc(self->sl_home, size);
-    
+
     if (retval) {
       memcpy(retval, self->sl_list, sizeof(retval[0]) * self->sl_len);
       retval[self->sl_len] = NULL;
@@ -697,11 +697,11 @@
   return NULL;
 }
 
-/**Free a string array. 
+/**Free a string array.
  *
  * The function su_strlst_free_array() discards a string array allocated
  * with su_strlst_get_array().
- * 
+ *
  * @param self  pointer to a string list object
  * @param array  string array to be freed
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag.c	Tue Dec 16 13:05:22 2008
@@ -23,11 +23,11 @@
  */
 
 /**@SU_TAG
- * 
- * @CFILE su_tag.c  
+ *
+ * @CFILE su_tag.c
  *
  * Special tags.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
  * @date Created: Tue Feb 20 20:03:38 2001 ppessi

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag_io.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag_io.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_tag_io.c	Tue Dec 16 13:05:22 2008
@@ -23,12 +23,12 @@
  */
 
 /**@SU_TAG
- * 
+ *
  * @CFILE su_tag_io.c
  * @brief Printing tag lists.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Wed Feb 21 12:12:27 2001 ppessi
  */
 
@@ -62,7 +62,7 @@
       if (n > 0 && buffer[n - 1] == '\n')
 	fmt = "   %s";
     }
-    else 
+    else
       buffer[sizeof(buffer) - 1] = '\0';
     fprintf(f, fmt, buffer);
   }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c	Tue Dec 16 13:05:22 2008
@@ -23,8 +23,8 @@
  */
 
 /**@SU_TAG
- * 
- * @CFILE su_taglist.c  
+ *
+ * @CFILE su_taglist.c
  *
  * Implementation of tag items and lists.
  *
@@ -66,7 +66,7 @@
  *
  * Object-oriented tag routines for Sofia utility library.
  *
- * The <sofia-sip/su_tag.h> defines a interface to object-oriented tag list routines. 
+ * The <sofia-sip/su_tag.h> defines a interface to object-oriented tag list routines.
  * A tag list is a linear list (array) of tag items, tagi_t structures,
  * terminated by a TAG_END() item. Each tag item has a label, tag, (@c
  * t_tag) and a value (@c t_value). The tag is a pointer (tag_type_t) to a
@@ -86,7 +86,7 @@
  * be used to a list of named arguments to a @ref tagarg "@em tagarg"
  * function, to store variable amount of data in a memory area, and pass
  * data between processes and threads.
- * 
+ *
  * The tagged argument lists can be used like named arguments in
  * higher-level languages. The argument list consists of tag-value pairs;
  * tags specify the name and type of the value. All the tag items are not
@@ -94,21 +94,21 @@
  * to other functions. This feature is used also by the Sofia APIs, the
  * lower-layer settings and options are frequently passed through the
  * upper-layer API in the tag lists.
- * 
+ *
  * The tagged argument lists are constructed using special macros that
  * expand to two function arguments, tag and value. Each tag item macro
  * checks its arguments type so the tagged argument lists are typesafe if
  * the list is correctly constructed.
- * 
+ *
  * Each function documents the tags it accepts and also the tags it may pass
  * to the lower layers (at least in theory).
- * 
+ *
  * @par Special Tags
  *
  * There are a new special tags that are used to control and modify the tag
  * list processing itself. These special tags are as follows:
  * - TAG_NULL() or TAG_END() - indicates the end of tag list
- * - TAG_SKIP() - indicates an empty (overwritten) tag item 
+ * - TAG_SKIP() - indicates an empty (overwritten) tag item
  * - TAG_NEXT() - contains a pointer to the next tag list.
  *
  * The tag type structures are declared as tag_typedef_t. They can be
@@ -137,8 +137,8 @@
 {
   tag_type_t tt = TAG_TYPE_OF(t);
   int n, m;
-  
-  n = snprintf(b, size, "%s::%s: ", 
+
+  n = snprintf(b, size, "%s::%s: ",
                tt->tt_ns ? tt->tt_ns : "",
 	       tt->tt_name ? tt->tt_name : "null");
   if (n < 0)
@@ -177,10 +177,10 @@
 }
 
 /**Move a tag list.
- * 
+ *
  * The function tl_tmove() moves the tag list arguments to @a dst.  The @a
  * dst must have big enough for all arguments.
- * 
+ *
  * @param dst   pointer to the destination buffer
  * @param size  sizeof @a dst
  * @param t_tag,t_value,... tag list
@@ -188,14 +188,14 @@
  * @return
  * The function tl_tmove() returns number of tag list items initialized.
  */
-size_t tl_tmove(tagi_t *dst, size_t size, 
+size_t tl_tmove(tagi_t *dst, size_t size,
 		tag_type_t t_tag, tag_value_t t_value, ...)
 {
   size_t n = 0, N = size / sizeof(tagi_t);
   tagi_t tagi[1];
   va_list ap;
-  
-  va_start(ap, t_value); 
+
+  va_start(ap, t_value);
 
   tagi->t_tag = t_tag, tagi->t_value = t_value;
 
@@ -204,7 +204,7 @@
     if (n < N)
       dst[n] = *tagi;
     n++;
-    if (t_end(tagi)) 
+    if (t_end(tagi))
       break;
 
     tagi->t_tag = va_arg(ap, tag_type_t);
@@ -217,16 +217,16 @@
 }
 
 /**Move a tag list.
- * 
+ *
  * The function tl_move() copies the tag list @a src to the buffer @a
  * dst. The size of the @a dst list must be at least @c tl_len(src) bytes.
- * 
+ *
  * @param dst pointer to the destination buffer
  * @param src tag list to be moved
  *
  * @return
  * The function tl_move() returns a pointer to the @a dst list after last
- * moved element.  
+ * moved element.
  */
 tagi_t *tl_move(tagi_t *dst, tagi_t const src[])
 {
@@ -242,10 +242,10 @@
 size_t tl_len(tagi_t const lst[])
 {
   size_t len = 0;
-  
+
   do {
     len += t_len(lst);
-  } 
+  }
   while ((lst = t_next(lst)));
 
   return len;
@@ -271,15 +271,15 @@
  * functionality.
  *
  * The size of the @a dst buffer must be at least @c tl_len(src) bytes.  The
- * size of buffer @a **bb must be at least @c tl_dup_xtra(src) bytes. 
- * 
+ * size of buffer @a **bb must be at least @c tl_dup_xtra(src) bytes.
+ *
  * @param[out] dst pointer to the destination buffer
  * @param[in] src tag list to be duplicated
  * @param[in,out] bb  pointer to pointer to buffer
  *
  * @return
  * A pointer to the @a dst list after last
- * duplicated taglist element.  
+ * duplicated taglist element.
  *
  * The pointer at @a *bb is updated to the byte after last duplicated memory
  * area.
@@ -292,12 +292,12 @@
 
   return dst;
 }
-	       
+
 
 /** Free a tag list.
  *
  * The function tl_free() frees resources associated with a tag list.
- * In other words, it calls t_free on each tag item on the list. 
+ * In other words, it calls t_free on each tag item on the list.
  *
  */
 void tl_free(tagi_t list[])
@@ -349,7 +349,7 @@
 tagi_t *tl_find_last(tagi_t const lst[], tag_type_t tt)
 {
   tagi_t const *last, *next;
-  
+
   for (next = last = t_find(tt, lst); next; next = t_find(tt, t_next(last)))
     last = next;
 
@@ -373,9 +373,9 @@
 static int tl_get(tag_type_t tt, void *p, tagi_t const lst[])
 {
   tagi_t const *t, *latest = NULL;
-  
+
   assert(tt);
-  
+
   if (tt == NULL || p == NULL)
     return 0;
 
@@ -414,14 +414,14 @@
       assert(tt->tt_class == ref_tag_class);
     }
 #endif
-  } 
+  }
 
   ta_end(ta);
 
   return n;
 }
 
-/** Find tags from given list. 
+/** Find tags from given list.
  *
  * Copies values of argument tag list into the reference tags in the tag
  * list @a lst.
@@ -453,7 +453,7 @@
       assert(tt->tt_class == ref_tag_class);
     }
 #endif
-  } 
+  }
 
   ta_end(ta);
 
@@ -462,9 +462,9 @@
 
 
 /** Filter an element in tag list */
-tagi_t *t_filter(tagi_t *dst, 
-		 tagi_t const filter[], 
-		 tagi_t const *src, 
+tagi_t *t_filter(tagi_t *dst,
+		 tagi_t const filter[],
+		 tagi_t const *src,
 		 void **bb)
 {
   tag_type_t tt = TAG_TYPE_OF(src);
@@ -475,7 +475,7 @@
       if (TAG_TYPE_OF(f)->tt_filter)
 	dst = TAG_TYPE_OF(f)->tt_filter(dst, f, src, bb);
       else if (f->t_tag == tt)
-	dst = t_dup(dst, src, bb); 
+	dst = t_dup(dst, src, bb);
     }
   }
   else {
@@ -500,7 +500,7 @@
  *
  * Each tag in @a src is checked against tags in list @a filter. If the tag
  * is in the @a filter list, or there is a special filter tag in the list
- * which matches with the tag in @a src, the tag is duplicated to @a dst using 
+ * which matches with the tag in @a src, the tag is duplicated to @a dst using
  * memory buffer in @a b.
  *
  * When @a dst is NULL, this function calculates the size of the filtered list.
@@ -508,9 +508,9 @@
  * @sa tl_afilter(), tl_tfilter(), tl_filtered_tlist(),
  * TAG_FILTER(), TAG_ANY(), #ns_tag_class
  */
-tagi_t *tl_filter(tagi_t dst[], 
-		  tagi_t const filter[], 
-		  tagi_t const src[], 
+tagi_t *tl_filter(tagi_t dst[],
+		  tagi_t const filter[],
+		  tagi_t const src[],
 		  void **b)
 {
   tagi_t const *s;
@@ -536,13 +536,13 @@
 
 
 
-/**Filter a tag list. 
- * 
+/**Filter a tag list.
+ *
  * The function tl_afilter() will build a tag list containing tags specified
  * in @a filter and extracted from @a src.  It will allocate the memory used by
  * tag list via the specified memory @a home, which may be also @c NULL.
  *
- * @sa tl_afilter(), tl_tfilter(), tl_filtered_tlist(), 
+ * @sa tl_afilter(), tl_tfilter(), tl_filtered_tlist(),
  * TAG_FILTER(), TAG_ANY(), #ns_tag_class
  */
 tagi_t *tl_afilter(su_home_t *home, tagi_t const filter[], tagi_t const src[])
@@ -574,10 +574,10 @@
 }
 
 /** Filter tag list @a src with given tags.
- * 
+ *
  * @sa tl_afilter(), tl_filtered_tlist(), TAG_FILTER(), TAG_ANY(), #ns_tag_class
  */
-tagi_t *tl_tfilter(su_home_t *home, tagi_t const src[], 
+tagi_t *tl_tfilter(su_home_t *home, tagi_t const src[],
 		   tag_type_t tag, tag_value_t value, ...)
 {
   tagi_t *tl;
@@ -592,7 +592,7 @@
  *
  * @sa tl_afilter(), tl_tfilter(), TAG_FILTER(), TAG_ANY(), #ns_tag_class
  */
-tagi_t *tl_filtered_tlist(su_home_t *home, tagi_t const filter[], 
+tagi_t *tl_filtered_tlist(su_home_t *home, tagi_t const filter[],
 			  tag_type_t tag, tag_value_t value, ...)
 {
   tagi_t *tl;
@@ -687,13 +687,13 @@
   for (;t;) {
     *t++ = *tagi;
 
-    if (t_end(tagi)) 
+    if (t_end(tagi))
       break;
 
     tagi->t_tag = va_arg(ap, tag_type_t);
     tagi->t_value = va_arg(ap, tag_value_t);
   }
-  
+
   assert((char *)rv + size == (char *)t);
 
   return rv;
@@ -702,7 +702,7 @@
 /** Make a tag list until TAG_NEXT() or TAG_END() */
 tagi_t *tl_list(tag_type_t tag, tag_value_t value, ...)
 {
-  va_list ap;  
+  va_list ap;
   tagi_t *t;
 
   va_start(ap, value);
@@ -728,7 +728,7 @@
     next = tl_next(tagi);
     if (next != tagi + 1)
       break;
-    
+
     if (tagi->t_tag != tag_skip)
       len += sizeof(tagi_t);
     tagi->t_tag = va_arg(ap, tag_type_t);
@@ -791,7 +791,7 @@
  */
 tagi_t *tl_llist(tag_type_t tag, tag_value_t value, ...)
 {
-  va_list ap;  
+  va_list ap;
   tagi_t *t;
 
   va_start(ap, value);
@@ -809,7 +809,7 @@
 }
 
 /** Convert a string to the a value of a tag. */
-int t_scan(tag_type_t tt, su_home_t *home, char const *s, 
+int t_scan(tag_type_t tt, su_home_t *home, char const *s,
 	   tag_value_t *return_value)
 {
   if (tt == NULL || s == NULL || return_value == NULL)
@@ -856,9 +856,9 @@
   return NULL;
 }
 
-tagi_t *t_null_filter(tagi_t *dst, 
-		      tagi_t const filter[], 
-		      tagi_t const *src, 
+tagi_t *t_null_filter(tagi_t *dst,
+		      tagi_t const filter[],
+		      tagi_t const *src,
 		      void **bb)
 {
   if (TAG_TYPE_OF(src) == tag_null) {
@@ -871,9 +871,9 @@
   return dst;
 }
 
-tag_class_t null_tag_class[1] = 
-  {{ 
-    sizeof(null_tag_class), 
+tag_class_t null_tag_class[1] =
+  {{
+    sizeof(null_tag_class),
     /* tc_next */     t_null_next,
     /* tc_len */      NULL,
     /* tc_move */     t_null_move,
@@ -939,15 +939,15 @@
   return dst;
 }
 
-tagi_t *t_skip_filter(tagi_t *dst, 
-		    tagi_t const filter[], 
-		    tagi_t const *src, 
+tagi_t *t_skip_filter(tagi_t *dst,
+		    tagi_t const filter[],
+		    tagi_t const *src,
 		    void **bb)
 {
   return dst;
 }
 
-tag_class_t skip_tag_class[1] = 
+tag_class_t skip_tag_class[1] =
   {{
     sizeof(skip_tag_class),
     /* tc_next */     t_skip_next,
@@ -994,15 +994,15 @@
   return dst;
 }
 
-tagi_t *t_next_filter(tagi_t *dst, 
-		    tagi_t const filter[], 
-		    tagi_t const *src, 
+tagi_t *t_next_filter(tagi_t *dst,
+		    tagi_t const filter[],
+		    tagi_t const *src,
 		    void **bb)
 {
   return dst;
 }
 
-tag_class_t next_tag_class[1] = 
+tag_class_t next_tag_class[1] =
   {{
     sizeof(next_tag_class),
     /* tc_next */     t_next_next,
@@ -1024,8 +1024,8 @@
 /* filter tag  - use function to filter tag */
 
 tagi_t *t_filter_with(tagi_t *dst,
-		      tagi_t const *t, 
-		      tagi_t const *src, 
+		      tagi_t const *t,
+		      tagi_t const *src,
 		      void **bb)
 {
   tag_filter_f *function;
@@ -1039,7 +1039,7 @@
     return dst;
 
   if (dst) {
-    return t_dup(dst, src, bb); 
+    return t_dup(dst, src, bb);
   }
   else {
     dst = (tagi_t *)((char *)dst + t_len(src));
@@ -1047,8 +1047,8 @@
     return dst;
   }
 }
-		   
-tag_class_t filter_tag_class[1] = 
+
+tag_class_t filter_tag_class[1] =
   {{
     sizeof(filter_tag_class),
     /* tc_next */     NULL,
@@ -1071,14 +1071,14 @@
 /* any tag - match to any tag when filtering */
 
 tagi_t *t_any_filter(tagi_t *dst,
-		     tagi_t const filter[], 
-		     tagi_t const *src, 
+		     tagi_t const filter[],
+		     tagi_t const *src,
 		     void **bb)
 {
   if (!src)
     return dst;
   else if (dst) {
-    return t_dup(dst, src, bb); 
+    return t_dup(dst, src, bb);
   }
   else {
     dst = (tagi_t *)((char *)dst + t_len(src));
@@ -1086,8 +1086,8 @@
     return dst;
   }
 }
-		   
-tag_class_t any_tag_class[1] = 
+
+tag_class_t any_tag_class[1] =
   {{
     sizeof(any_tag_class),
     /* tc_next */     NULL,
@@ -1111,8 +1111,8 @@
 
 static
 tagi_t *t_ns_filter(tagi_t *dst,
-		    tagi_t const filter[], 
-		    tagi_t const *src, 
+		    tagi_t const filter[],
+		    tagi_t const *src,
 		    void **bb)
 {
   char const *match, *ns;
@@ -1137,7 +1137,7 @@
     return dst;
 
   if (dst) {
-    return t_dup(dst, src, bb); 
+    return t_dup(dst, src, bb);
   }
   else {
     dst = (tagi_t *)((char *)dst + t_len(src));
@@ -1146,8 +1146,8 @@
   }
 }
 
-/** Namespace filtering class */		   
-tag_class_t ns_tag_class[1] = 
+/** Namespace filtering class */
+tag_class_t ns_tag_class[1] =
   {{
     sizeof(ns_tag_class),
     /* tc_next */     NULL,
@@ -1178,15 +1178,15 @@
   return 1;
 }
 
-int t_int_scan(tag_type_t tt, su_home_t *home, 
-	       char const *s, 
+int t_int_scan(tag_type_t tt, su_home_t *home,
+	       char const *s,
 	       tag_value_t *return_value)
 {
   int value;
   char *rest;
 
   value = strtol(s, &rest, 0);
-  
+
   if (s != rest) {
     *return_value = (tag_value_t)value;
     return 1;
@@ -1197,7 +1197,7 @@
   }
 }
 
-tag_class_t int_tag_class[1] = 
+tag_class_t int_tag_class[1] =
   {{
     sizeof(int_tag_class),
     /* tc_next */     NULL,
@@ -1228,15 +1228,15 @@
   return 1;
 }
 
-int t_uint_scan(tag_type_t tt, su_home_t *home, 
-	       char const *s, 
+int t_uint_scan(tag_type_t tt, su_home_t *home,
+	       char const *s,
 	       tag_value_t *return_value)
 {
   unsigned value;
   char *rest;
 
   value = strtoul(s, &rest, 0);
-  
+
   if (s != rest) {
     *return_value = (tag_value_t)value;
     return 1;
@@ -1247,7 +1247,7 @@
   }
 }
 
-tag_class_t uint_tag_class[1] = 
+tag_class_t uint_tag_class[1] =
   {{
     sizeof(int_tag_class),
     /* tc_next */     NULL,
@@ -1282,15 +1282,15 @@
 }
 
 static
-int t_size_scan(tag_type_t tt, su_home_t *home, 
-		 char const *s, 
+int t_size_scan(tag_type_t tt, su_home_t *home,
+		 char const *s,
 		 tag_value_t *return_value)
 {
   unsigned longlong value;
   char *rest;
 
   value = strtoull(s, &rest, 0);
-  
+
   if (s != rest && value <= SIZE_MAX) {
     *return_value = (tag_value_t)value;
     return 1;
@@ -1302,7 +1302,7 @@
 }
 
 /** Tag class for tags with size_t value. @NEW_1_12_5. */
-tag_class_t size_tag_class[1] = 
+tag_class_t size_tag_class[1] =
   {{
     sizeof(int_tag_class),
     /* tc_next */     NULL,
@@ -1330,15 +1330,15 @@
 }
 
 static
-int t_usize_scan(tag_type_t tt, su_home_t *home, 
-		 char const *s, 
+int t_usize_scan(tag_type_t tt, su_home_t *home,
+		 char const *s,
 		 tag_value_t *return_value)
 {
   unsigned longlong value;
   char *rest;
 
   value = strtoull(s, &rest, 0);
-  
+
   if (s != rest && value <= USIZE_MAX) {
     *return_value = (tag_value_t)value;
     return 1;
@@ -1350,7 +1350,7 @@
 }
 
 /** Tag class for tags with usize_t value. @NEW_1_12_5. */
-tag_class_t usize_tag_class[1] = 
+tag_class_t usize_tag_class[1] =
   {{
     sizeof(int_tag_class),
     /* tc_next */     NULL,
@@ -1382,17 +1382,17 @@
   return 1;
 }
 
-int t_bool_scan(tag_type_t tt, su_home_t *home, 
-	       char const *s, 
+int t_bool_scan(tag_type_t tt, su_home_t *home,
+	       char const *s,
 	       tag_value_t *return_value)
 {
   int retval;
   int value = 0;
 
-  if (strncasecmp(s, "true", 4) == 0 
+  if (strncasecmp(s, "true", 4) == 0
       && strlen(s + 4) == strspn(s + 4, " \t\r\n")) {
     value = 1, retval = 1;
-  } else if (strncasecmp(s, "false", 5) == 0 
+  } else if (strncasecmp(s, "false", 5) == 0
 	     && strlen(s + 5) == strspn(s + 5, " \t\r\n")) {
     value = 0, retval = 1;
   } else {
@@ -1404,11 +1404,11 @@
     *return_value = (tag_value_t)value;
   else
     *return_value = (tag_value_t)0;
-  
+
   return retval;
 }
 
-tag_class_t bool_tag_class[1] = 
+tag_class_t bool_tag_class[1] =
   {{
     sizeof(bool_tag_class),
     /* tc_next */     NULL,
@@ -1440,8 +1440,8 @@
 }
 
 /* This is not usually very safe, so it is not used */
-int t_ptr_scan(tag_type_t tt, su_home_t *home, 
-	       char const *s, 
+int t_ptr_scan(tag_type_t tt, su_home_t *home,
+	       char const *s,
 	       tag_value_t *return_value)
 {
   int retval;
@@ -1453,11 +1453,11 @@
     *return_value = (tag_value_t)ptr;
   else
     *return_value = (tag_value_t)NULL;
-  
+
   return retval;
 }
 
-tag_class_t ptr_tag_class[1] = 
+tag_class_t ptr_tag_class[1] =
   {{
     sizeof(ptr_tag_class),
     /* tc_next */     NULL,
@@ -1491,7 +1491,7 @@
   return 1;
 }
 
-tag_class_t socket_tag_class[1] = 
+tag_class_t socket_tag_class[1] =
   {{
     sizeof(socket_tag_class),
     /* tc_next */     NULL,
@@ -1512,25 +1512,25 @@
 
 int t_str_snprintf(tagi_t const *t, char b[], size_t size)
 {
-  if (t->t_value) 
+  if (t->t_value)
     return snprintf(b, size, "\"%s\"", (char const *)t->t_value);
   else
     return snprintf(b, size, "<null>");
 }
 
-int t_str_scan(tag_type_t tt, su_home_t *home, 
-	       char const *s, 
+int t_str_scan(tag_type_t tt, su_home_t *home,
+	       char const *s,
 	       tag_value_t *return_value)
 {
   int retval;
 
   s = su_strdup(home, s);
-    
+
   if (s)
     *return_value = (tag_value_t)s, retval = 1;
   else
     *return_value = (tag_value_t)NULL, retval = -1;
-  
+
   return retval;
 }
 
@@ -1540,10 +1540,10 @@
   if (src->t_value) {
     char const *s = (char const *)src->t_value;
     size_t len = strlen(s) + 1;
-    dst->t_value = (tag_value_t)strcpy(*bb, s); 
+    dst->t_value = (tag_value_t)strcpy(*bb, s);
     *bb = (char *)*bb + len;
   }
-  else 
+  else
     dst->t_value = (tag_value_t)0;
 
   return dst + 1;
@@ -1554,7 +1554,7 @@
   return t->t_value ? strlen((char *)t->t_value) + 1 : 0;
 }
 
-tag_class_t str_tag_class[1] = 
+tag_class_t str_tag_class[1] =
   {{
     sizeof(str_tag_class),
     /* tc_next */     NULL,
@@ -1574,7 +1574,7 @@
 /* cstr tag - pass constant string value (no need to dup) */
 
 /** Tag class for constant strings */
-tag_class_t cstr_tag_class[1] = 
+tag_class_t cstr_tag_class[1] =
   {{
     sizeof(cstr_tag_class),
     /* tc_next */     NULL,
@@ -1593,7 +1593,7 @@
 /* ====================================================================== */
 /* ref tag - pass reference */
 
-tag_class_t ref_tag_class[1] = 
+tag_class_t ref_tag_class[1] =
   {{
     sizeof(ref_tag_class),
     /* tc_next */     NULL,

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time.c	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Jari Selin <Jari.Selin at nokia.com>
  * @author Kai Vehmanen <first.surname at nokia.com>
- * 
+ *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
 
@@ -59,49 +59,49 @@
 /**@defgroup su_time Time Handling
  *
  * OS-independent timing functions and types for the @b su library.
- *  
+ *
  * The @b su library provides three different time formats with different
  * ranges and epochs in <sofia-sip/su_time.h>:
  *
  *   - #su_time_t, second and microsecond as 32-bit values since 1900,
  *   - #su_duration_t, milliseconds between two times, and
- *   - #su_ntp_t, standard NTP timestamp (seconds since 1900 as 
- *     a fixed-point 64-bit value with 32 bits representing subsecond 
+ *   - #su_ntp_t, standard NTP timestamp (seconds since 1900 as
+ *     a fixed-point 64-bit value with 32 bits representing subsecond
  *     value).
  */
 
 /**
  * Compare two timestamps.
- * 
+ *
  * The function su_time_cmp() compares two su_time_t timestamps.
- * 
+ *
  * @param t1 first NTP timestamp in su_time_t structure
  * @param t2 second NTP timestamp in su_time_t structure
- * 
+ *
  * @retval  Negative, if @a t1 is before @a t2,
  * @retval  Zero, if @a t1 is same as @a t2, or
  * @retval  Positive, if @a t1 is after @a t2.
- * 
+ *
  */
 long su_time_cmp(su_time_t const t1, su_time_t const t2)
 {
   long retval = 0;
 
-  if (t1.tv_sec > t2.tv_sec) 
+  if (t1.tv_sec > t2.tv_sec)
     retval = 1;
-  else if (t1.tv_sec < t2.tv_sec) 
+  else if (t1.tv_sec < t2.tv_sec)
     retval = -1;
   else {
-    if (t1.tv_usec > t2.tv_usec) 
+    if (t1.tv_usec > t2.tv_usec)
       retval = 1;
-    else if (t1.tv_usec < t2.tv_usec) 
+    else if (t1.tv_usec < t2.tv_usec)
       retval = -1;
   }
 
   return retval;
 }
 
-/**@def SU_TIME_CMP(t1, t2) 
+/**@def SU_TIME_CMP(t1, t2)
  *
  * Compare two timestamps.
  *
@@ -109,7 +109,7 @@
  *
  * @param t1   first NTP timestamp in su_time_t structure
  * @param t2   second NTP timestamp in su_time_t  structure
- * 
+ *
  * @retval negative, if t1 is before t2,
  * @retval zero,     if t1 is same as t2, or
  * @retval positive, if t1 is after t2.
@@ -119,19 +119,19 @@
 
 /** Difference between two timestamps.
  *
- * The function returns difference between two timestamps 
+ * The function returns difference between two timestamps
  * in seconds (t1 - t2).
  *
  * @param t1   first timeval
  * @param t2   second timeval
- * 
+ *
  * @return
  *    The difference between two timestamps in seconds as a double.
  */
 double su_time_diff(su_time_t const t1, su_time_t const t2)
 {
   return
-    ((double)t1.tv_sec - (double)t2.tv_sec) 
+    ((double)t1.tv_sec - (double)t2.tv_sec)
     + (double)((long)t1.tv_usec - (long)t2.tv_usec) / 1000000.0;
 }
 
@@ -151,14 +151,14 @@
 
 /** Print su_time_t timestamp.
  *
- *   This function prints a su_time_t timestamp as a decimal number to the 
+ *   This function prints a su_time_t timestamp as a decimal number to the
  *   given buffer.
  *
  * @param s    pointer to buffer
  * @param n    buffer size
  * @param tv   pointer to the timeval object
- * 
- * @return 
+ *
+ * @return
  *   The number of characters printed, excluding the final @c NUL.
  */
 int su_time_print(char *s, int n, su_time_t const *tv)
@@ -172,11 +172,11 @@
 
 /** Time difference in milliseconds.
  *
- * Calculates the duration from t2 to t1 in milliseconds.  
+ * Calculates the duration from t2 to t1 in milliseconds.
  *
  * @param t1   after time
  * @param t2   before time
- * 
+ *
  * @return The duration in milliseconds between the two times.
  * If the difference is bigger than #SU_DURATION_MAX, return #SU_DURATION_MAX
  * instead.
@@ -215,7 +215,7 @@
  *
  * The function su_ntp_now() returns the current NTP timestamp.  NTP
  * timestamp is seconds elapsed since January 1st, 1900.
- * 
+ *
  * @return
  * The current time as NTP timestamp is returned.
  */
@@ -235,20 +235,20 @@
 
     usec = now / 1000;
     nsec = now % 1000;
-    
+
     /*
      * Multiply usec by 4294.967296 (ie. 2**32 / 1E6)
-     * 
-     * Utilize fact that 4294.967296 == 4295 - 511 / 15625 
+     *
+     * Utilize fact that 4294.967296 == 4295 - 511 / 15625
      */
     now = 4295 * usec - 511 * usec / 15625;
     rem = (511U * usec) % 15625U;
-  
+
     /* Multiply nsec by 4.294967296 */
     nsec = 4295 * 125 * nsec - (511 * nsec) / 125;
     nsec -= 8 * rem; /* usec rounding */
     nsec = (nsec + (nsec < 0 ? -62499 : +62499)) / 125000;
-    
+
     return now + nsec;
   }
 }
@@ -317,7 +317,7 @@
   return tv;
 }
 
-/** 
+/**
  * Add milliseconds to the time.
  *
  * @param t0  time in seconds and microseconds as @c su_time_t
@@ -328,7 +328,7 @@
   return su_t64_to_time(SU_TIME_TO_T64(t0) + SU_DUR_TO_T64(dur));
 }
 
-/** 
+/**
  * Add seconds to the time.
  *
  * @param t0  time in seconds and microseconds as @c su_time_t
@@ -354,7 +354,7 @@
 
   if(!counterfreq) {
     LARGE_INTEGER Freq = { 0, 0 };
-    if (!QueryPerformanceFrequency(&Freq)) { 
+    if (!QueryPerformanceFrequency(&Freq)) {
       SU_DEBUG_1(("su_counter: QueryPerformanceFrequency failed\n"));
       return 0;
     }
@@ -366,9 +366,9 @@
      return 0;
   }
   count = (ULONGLONG) LargeIntCount.QuadPart;
- 
+
   /* return value is in ns */
-  return  ((count * 1000 * 1000 * 1000) / counterfreq) ; 
+  return  ((count * 1000 * 1000 * 1000) / counterfreq) ;
 }
 
 uint64_t su_counter(void)
@@ -384,7 +384,7 @@
  * for timing purposes.
  *
  * Parameters:
- * 
+ *
  * @return
  *   The current CPU counter value in nanoseconds
  */
@@ -396,7 +396,7 @@
   static clockid_t cpu = CLOCK_REALTIME;
 
 # define CLOCK_GETTIMEOFDAY 0xdedbeefUL
-  
+
   if (init == 0) {
     init = 1;
 
@@ -425,8 +425,8 @@
     perror("clock_gettime");
 
   /* return value is in nanoseconds */
-  return 
-    (uint64_t)((unsigned long)tp.tv_nsec) + 
+  return
+    (uint64_t)((unsigned long)tp.tv_nsec) +
     (uint64_t)((unsigned long)tp.tv_sec) * 1000000000ULL;
 }
 
@@ -436,7 +436,7 @@
  * for timing purposes.
  *
  * Parameters:
- * 
+ *
  * @return
  *   The current CPU counter value in microseconds.
  */
@@ -451,8 +451,8 @@
   struct timeval tv;
   gettimeofday(&tv, NULL);
   /* return value is in microseconds */
-  return 
-    (uint64_t)((unsigned long)tv.tv_usec) + 
+  return
+    (uint64_t)((unsigned long)tv.tv_usec) +
     (uint64_t)((unsigned long)tv.tv_sec) * 1000000ULL;
 }
 
@@ -461,8 +461,8 @@
   struct timeval tv;
   gettimeofday(&tv, NULL);
   /* return value is in nanoseconds */
-  return 
-    (uint64_t)((unsigned long)tv.tv_usec) * 1000ULL + 
+  return
+    (uint64_t)((unsigned long)tv.tv_usec) * 1000ULL +
     (uint64_t)((unsigned long)tv.tv_sec) * 1000000000ULL;
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time0.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time0.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_time0.c	Tue Dec 16 13:05:22 2008
@@ -31,7 +31,7 @@
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Jari Selin <Jari.Selin at nokia.com>
- * 
+ *
  * @date Created: Fri May 10 18:13:19 2002 ppessi
  */
 
@@ -61,7 +61,7 @@
 #endif
 
 /** Seconds from 1.1.1900 to 1.1.1970 */
-#define NTP_EPOCH 2208988800UL 
+#define NTP_EPOCH 2208988800UL
 #define E9 (1000000000U)
 #define E7 (10000000U)
 
@@ -92,7 +92,7 @@
   GetSystemTimeAsFileTime(date.ft);
 
   tv->tv_usec = (unsigned long) ((date.ull->QuadPart % E7) / 10);
-  tv->tv_sec = (unsigned long) ((date.ull->QuadPart / E7) - 
+  tv->tv_sec = (unsigned long) ((date.ull->QuadPart / E7) -
     /* 1900-Jan-01 - 1601-Jan-01: 299 years, 72 leap years */
     (299 * 365 + 72) * 24 * 60 * (uint64_t)60);
 #else
@@ -122,7 +122,7 @@
 #if HAVE_CLOCK_GETTIME
   {
     struct timespec tv;
-  
+
     if (clock_gettime(CLOCK_REALTIME, &tv) == 0) {
       now = ((su_nanotime_t)tv.tv_sec + NTP_EPOCH) * E9 + tv.tv_nsec;
       *return_time = now;
@@ -139,11 +139,11 @@
       FILETIME       ft[1];
       ULARGE_INTEGER ull[1];
     } date;
-    
+
     GetSystemTimeAsFileTime(date.ft);
 
-    now = 100 * 
-      (date.ull->QuadPart - 
+    now = 100 *
+      (date.ull->QuadPart -
        /* 1900-Jan-01 - 1601-Jan-01: 299 years, 72 leap years */
        ((su_nanotime_t)(299 * 365 + 72) * 24 * 60 * 60) * E7);
   }
@@ -173,16 +173,16 @@
  * monotonic and never goes back - if the underlying system supports such a
  * clock.
  *
- * @param return_time optional pointer to return the current time 
+ * @param return_time optional pointer to return the current time
  *
- * @return Current time as nanoseconds 
+ * @return Current time as nanoseconds
  */
 su_nanotime_t su_monotime(su_nanotime_t *return_time)
 {
 #if HAVE_CLOCK_GETTIME && CLOCK_MONOTONIC
   {
     struct timespec tv;
-  
+
     if (clock_gettime(CLOCK_MONOTONIC, &tv) == 0) {
       su_nanotime_t now = (su_nanotime_t)tv.tv_sec * E9 + tv.tv_nsec;
       if (return_time)
@@ -195,7 +195,7 @@
 #if HAVE_NANOUPTIME
   {
     struct timespec tv;
-  
+
     nanouptime(&tv);
     now = (su_nanotime_t)tv.tv_sec * E9 + tv.tv_nsec;
     if (return_time)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c	Tue Dec 16 13:05:22 2008
@@ -63,7 +63,7 @@
  *   - su_timer_set_interval(),
  *   - su_timer_set_at(),
  *   - su_timer_set(),
- *   - su_timer_set_for_ever(), 
+ *   - su_timer_set_for_ever(),
  *   - su_timer_run(),
  *   - su_timer_reset(), and
  *   - su_timer_root().
@@ -90,7 +90,7 @@
  * The default duration is given in milliseconds.
  *
  * Usually, timer wakeup function should be called at regular intervals. In
- * such case, the timer is activated using function su_timer_set_for_ever(). 
+ * such case, the timer is activated using function su_timer_set_for_ever().
  * When the timer is activated it is given the wakeup function and pointer to
  * context data:
  * @code
@@ -158,7 +158,7 @@
   unsigned char   sut_set;	/**< Timer is set (inserted in tree) */
 };
 
-/** Timer running status */ 
+/** Timer running status */
 enum sut_running {
   reset = 0,		/**< Timer is not running */
   run_at_intervals = 1, /**< Compensate missed wakeup calls */
@@ -195,7 +195,7 @@
 	      IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
 	      CMP, INSERT, REMOVE);
 
-/**@internal Set the timer. 
+/**@internal Set the timer.
  *
  * @retval 0 when successful (always)
  */
@@ -217,7 +217,7 @@
   return timers_append(timers, t);
 }
 
-/**@internal Reset the timer. 
+/**@internal Reset the timer.
  *
  * @retval 0 when successful (always)
  */
@@ -238,7 +238,7 @@
 }
 
 /**@internal Validate timer @a t and return pointer to per-port timer tree.
- * 
+ *
  * @retval pointer to pointer to timer tree when successful
  * @retval NULL upon an error
  */
@@ -263,7 +263,7 @@
 
   if (use_sut_duration && t->sut_duration == 0) {
     assert(t->sut_duration > 0);
-    SU_DEBUG_1(("%s(%p): %s\n", caller, (void *)t, 
+    SU_DEBUG_1(("%s(%p): %s\n", caller, (void *)t,
 		"timer without default duration"));
     return NULL;
   }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c	Tue Dec 16 13:05:22 2008
@@ -32,7 +32,7 @@
  * not unique if multiple processes are run on the same node.
  *
  * Use su_guid_sprintf() to convert #su_guid_t to printable format.
- * 
+ *
  * The random integers can be generated with functions
  * - su_randint(),
  * - su_randmem(), or
@@ -44,7 +44,7 @@
  * @CFILE su_uniqueid.c Construct a GloballyUniqueID as per H.225.0 v2.
  *
  * @author Pekka Pessi <pessi at research.nokia.com>
- * 
+ *
  * @date Created: Tue Apr 15 06:31:41 1997 pessi
  */
 
@@ -87,7 +87,7 @@
 #define MAGIC (16384)
 
 /* 100-nanosecond intervals between 15 October 1582 and 1 January 1900 */
-static const uint64_t ntp_epoch = 
+static const uint64_t ntp_epoch =
 (uint64_t)(141427) * (24 * 60 * 60L) * granularity;
 
 /* State */
@@ -104,7 +104,7 @@
 {
   uint64_t tl = su_ntp_now();
   uint64_t hi = su_ntp_hi(tl), lo = su_ntp_lo(tl);
-  
+
   lo *= granularity;
   hi *= granularity;
 
@@ -143,7 +143,7 @@
 
   /* Initialize our random number generator */
 #if HAVE_DEV_URANDOM
-  if (!urandom) 
+  if (!urandom)
     urandom = fopen("/dev/urandom", "rb");
 #endif	/* HAVE_DEV_URANDOM */
 
@@ -161,7 +161,7 @@
       seed[2*i] ^= now.tv_sec; seed[2*i+1] ^= now.tv_sec;
     }
 
-    seed[30] ^= getuid(); 
+    seed[30] ^= getuid();
     seed[31] ^= getpid();
   }
 
@@ -252,12 +252,12 @@
   uint64_t time;
   unsigned clock;
 
-  if (!initialized) init(); 
+  if (!initialized) init();
 
   time = timestamp();
   clock = clock_sequence;
 
-  v->s.time_high_and_version = 
+  v->s.time_high_and_version =
     htons((unsigned short)(((time >> 48) & 0x0fff) | (version << 12)));
   v->s.time_mid = htons((unsigned short)((time >> 32) & 0xffff));
   v->s.time_low = htonl((unsigned long)(time & 0xffffffffUL));
@@ -278,20 +278,20 @@
 	  ntohs(v->s.time_high_and_version),
 	  v->s.clock_seq_low,
 	  v->s.clock_seq_hi_and_reserved,
-	  v->s.node[0], v->s.node[1], v->s.node[2], 
+	  v->s.node[0], v->s.node[1], v->s.node[2],
 	  v->s.node[3], v->s.node[4], v->s.node[5]);
   memcpy(buf, mybuf, len > sizeof(mybuf) ? sizeof(mybuf) : len);
   return su_guid_strlen;
 }
 
-/* 
- * Generate random integer in range [lb, ub] (inclusive) 
+/*
+ * Generate random integer in range [lb, ub] (inclusive)
  */
 int su_randint(int lb, int ub)
 {
   unsigned rnd = 0;
-  
-  if (!initialized) init(); 
+
+  if (!initialized) init();
 
   if (urandom) {
     size_t len = fread(&rnd, 1, sizeof rnd, urandom); (void)len;
@@ -309,7 +309,7 @@
 {
   size_t i;
 
-  if (!initialized) init(); 
+  if (!initialized) init();
 
   if (urandom) {
     size_t len = fread(mem, 1, siz, urandom); (void)len;
@@ -322,14 +322,14 @@
   return mem;
 }
 
-/** Get random number for RTP timestamps. 
+/** Get random number for RTP timestamps.
  *
  * This function returns a 32-bit random integer. It also initializes the
  * random number generator, if needed.
  */
 uint32_t su_random(void)
 {
-  if (!initialized) init(); 
+  if (!initialized) init();
 
   if (urandom) {
     uint32_t rnd;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_vector.c	Tue Dec 16 13:05:22 2008
@@ -37,7 +37,7 @@
  * The vectors are resizeable unidimensional arrays.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *  
+ *
  * @date Created: Fri Sep 27 14:43:29 2002 ppessi
  */
 
@@ -66,7 +66,7 @@
   void              **v_list;
 };
 
-/** Create a vector. 
+/** Create a vector.
  *
  * The function su_vector_create() creates a pointer vector object. The
  * vector is initially empty. The function clones a memory home for the
@@ -126,19 +126,19 @@
 	return 0;
 
       memcpy(list, vector->v_list, index * sizeof(vector->v_list[0]));
-      memcpy(list + index + 1, vector->v_list + index, 
+      memcpy(list + index + 1, vector->v_list + index,
 	     (vector->v_len - index) * sizeof(vector->v_list[0]));
 
       if (vector->v_list != (void **)(vector + 1)) {
 	su_free(vector->v_home, vector->v_list);
       }
     }
-    
+
     vector->v_list = list;
     vector->v_size *= 2;
   }
   else {
-    memmove(vector->v_list + index + 1, vector->v_list + index, 
+    memmove(vector->v_list + index + 1, vector->v_list + index,
 	    (vector->v_len - index) * sizeof(vector->v_list[0]));
   }
 
@@ -147,7 +147,7 @@
   return 1;
 }
 
-/**Insert an item to vector. 
+/**Insert an item to vector.
  *
  * The function su_vector_insert() inserts an @a item to the @a vector.
  * The items after the @a index will be moved further within the vector.
@@ -161,7 +161,7 @@
  */
 int su_vector_insert(su_vector_t *vector, usize_t index, void *item)
 {
-  if (vector && 
+  if (vector &&
       index <= vector->v_len &&
       su_vector_make_place(vector, index) > 0) {
     vector->v_list[index] = item;
@@ -170,7 +170,7 @@
   return -1;
 }
 
-/**Remove an item from vector. 
+/**Remove an item from vector.
  *
  * The function su_vector_remove() removes an item from the @a vector.
  * The items after the @a index will be moved backwards within the vector.
@@ -186,8 +186,8 @@
   if (vector && index < vector->v_len) {
     if (vector->v_free_func)
         (vector->v_free_func)(vector->v_list[index]);
-    
-    memmove(vector->v_list + index, 
+
+    memmove(vector->v_list + index,
             vector->v_list + index + 1,
             (vector->v_len - index - 1) * sizeof(vector->v_list[0]));
     vector->v_len--;
@@ -197,7 +197,7 @@
   return -1;
 }
 
-/**Remove all items from vector. 
+/**Remove all items from vector.
  *
  * The function su_vector_empty() removes all items from the @a vector.
  *
@@ -224,7 +224,7 @@
   return -1;
 }
 
-/**Append an item to vector. 
+/**Append an item to vector.
  *
  * The function su_vector_append() appends an @a item to the @a vector.
  *
@@ -250,11 +250,11 @@
   return 0;
 }
 
-/**Get a numbered item from list. 
+/**Get a numbered item from list.
  *
  * The function su_vector_item() returns a numbered item from vector. The
  * numbering starts from 0.
- * 
+ *
  * @param vector  pointer to a vector object
  * @param i     index
  *
@@ -269,9 +269,9 @@
     return NULL;
 }
 
-/** Get number of items in list. 
+/** Get number of items in list.
  *
- * The function su_vector_len() returns the number of items in the 
+ * The function su_vector_len() returns the number of items in the
  * vector.
  */
 usize_t su_vector_len(su_vector_t const *l)
@@ -284,12 +284,12 @@
   return su_vector_len(vector) == 0;
 }
 
-/**Get a pointer array from list. 
+/**Get a pointer array from list.
  *
  * The function su_vector_get_array() returns an array of pointer. The
  * length of the array is always one longer than the length of the vector,
  * and the last item in the returned array is always NULL.
- * 
+ *
  * @param vector  pointer to a vector object
  *
  * @return
@@ -302,7 +302,7 @@
     size_t newsize = sizeof(retval[0]) * (vector->v_len + 1);
 
     retval = su_alloc(vector->v_home, newsize);
-    
+
     if (retval) {
       retval[vector->v_len] = NULL;
       return memcpy(retval, vector->v_list, sizeof(retval[0]) * vector->v_len);
@@ -312,11 +312,11 @@
   return NULL;
 }
 
-/**Free a string array. 
+/**Free a string array.
  *
  * The function su_vector_free_array() discards a string array allocated
  * with su_vector_get_array().
- * 
+ *
  * @param vector  pointer to a vector object
  * @param array  string array to be freed
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@ingroup su_wait
  *
- * @CFILE su_wait.c  
+ * @CFILE su_wait.c
  * Implementation of OS-independent socket synchronization interface.
  *
  * This looks like nth reincarnation of "reactor".  It implements the
@@ -121,13 +121,13 @@
  *
  * As a side-effect the socket is put into non-blocking mode when wait
  * object is created.
- * 
+ *
  * @param newwait  the newly created wait object (output)
  * @param socket   socket
  * @param events   mask for events that can signal this wait object
- * 
+ *
  * @retval 0 if the call was successful,
- * @retval -1 upon an error.  
+ * @retval -1 upon an error.
 */
 int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events)
 {
@@ -164,7 +164,7 @@
   mode |= O_NDELAY | O_NONBLOCK;
   if (fcntl(socket, F_SETFL, mode) < 0)
     return -1;
-  
+
   newwait->fd = socket;
   newwait->events = events;
   newwait->revents = 0;
@@ -177,7 +177,7 @@
  *
  * The function su_wait_destroy() destroys a su_wait_t object.
  *
- * @param waitobj  pointer to wait object   
+ * @param waitobj  pointer to wait object
  *
  * @retval 0 when successful,
  * @retval -1 upon an error.
@@ -206,11 +206,11 @@
  * The function su_wait() blocks until an event specified by wait objects in
  * @a wait array.  If @a timeout is not SU_WAIT_FOREVER, a timeout occurs
  * after @a timeout milliseconds.
- * 
+ *
  * In Unix, this is @c poll() or @c select().
- * 
+ *
  * In Windows, this is @c WSAWaitForMultipleEvents().
- * 
+ *
  * @param waits    array of wait objects
  * @param n        number of wait objects in array waits
  * @param timeout  timeout in milliseconds
@@ -250,20 +250,20 @@
 	  return j;
       }
     }
-  
+
     if (errno == EINTR)
       continue;
 
     return -1;
-  }  
+  }
 #endif
 }
 
 /** Get events.
- * 
+ *
  *   The function su_wait_events() returns an mask describing events occurred.
  *
- * @param waitobj  pointer to wait object   
+ * @param waitobj  pointer to wait object
  * @param s        socket
  *
  * @return Binary mask describing the events.
@@ -285,15 +285,15 @@
 }
 
 /** Set event mask.
- * 
+ *
  *   The function su_wait_mask() sets the mask describing events that can
  *   signal the wait object.
  *
- * @param waitobj  pointer to wait object   
+ * @param waitobj  pointer to wait object
  * @param s        socket
  * @param events   new event mask
  *
- * @retval  0 when successful, 
+ * @retval  0 when successful,
  * @retval -1 upon an error.
  */
 int su_wait_mask(su_wait_t *waitobj, su_socket_t s, int events)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_win32_port.c	Tue Dec 16 13:05:22 2008
@@ -61,8 +61,8 @@
 
   unsigned         sup_multishot; /**< Multishot operation? */
 
-  unsigned         sup_registers; /** Counter incremented by 
-				      su_port_register() or 
+  unsigned         sup_registers; /** Counter incremented by
+				      su_port_register() or
 				      su_port_unregister()
 				   */
 
@@ -70,39 +70,39 @@
   int              sup_size_waits; /**< Size of allocated su_waits */
   int              sup_pri_offset; /**< Offset to prioritized waits */
 
-  /** Indices from index returned by su_root_register() to tables below. 
+  /** Indices from index returned by su_root_register() to tables below.
    *
    * Free elements are negative. Free elements form a list, value of free
    * element is (0 - index of next free element).
    *
-   * First element sup_indices[0] points to first free element. 
+   * First element sup_indices[0] points to first free element.
    */
   int             *sup_indices;
 
   int             *sup_reverses; /** Reverse index */
-  su_wakeup_f     *sup_wait_cbs; 
-  su_wakeup_arg_t**sup_wait_args; 
-  su_root_t      **sup_wait_roots; 
-  su_wait_t       *sup_waits; 
+  su_wakeup_f     *sup_wait_cbs;
+  su_wakeup_arg_t**sup_wait_args;
+  su_root_t      **sup_wait_roots;
+  su_wait_t       *sup_waits;
 
 };
 
 static void su_wsevent_port_decref(su_port_t *, int blocking, char const *who);
 
 static int su_wsevent_port_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_wsevent_port_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_wsevent_port_deregister(su_port_t *self, int i);
 static int su_wsevent_port_unregister_all(su_port_t *self, su_root_t *root);
-static int su_wsevent_port_eventmask(su_port_t *self, 
+static int su_wsevent_port_eventmask(su_port_t *self,
 				  int index,
 				  int socket,
 				  int events);
@@ -168,22 +168,22 @@
  *
  *  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
- *   Positive index of the wait object, 
+ *   Positive index of the wait object,
  *   or -1 upon an error.
  */
 int su_wsevent_port_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)
@@ -210,7 +210,7 @@
 
     if (self->sup_size_waits == 0)
       size = su_root_size_hint;
-    else 
+    else
       size = 2 * self->sup_size_waits;
 
     if (size < SU_WAIT_MIN)
@@ -237,7 +237,7 @@
 	reverses[i] = -1;
       self->sup_reverses = reverses;
     }
-      
+
     waits = su_realloc(h, self->sup_waits, size * sizeof(*waits));
     if (waits)
       self->sup_waits = waits;
@@ -252,10 +252,10 @@
 
     /* Add sup_wait_roots array, if needed */
     wait_tasks = su_realloc(h, self->sup_wait_roots, size * sizeof(*wait_tasks));
-    if (wait_tasks) 
+    if (wait_tasks)
       self->sup_wait_roots = wait_tasks;
 
-    if (!(indices && 
+    if (!(indices &&
 	  reverses && waits && wait_cbs && wait_args && wait_tasks)) {
       return -1;
     }
@@ -274,7 +274,7 @@
       self->sup_waits[n] = self->sup_waits[n-1];
       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];
     }
 
     self->sup_pri_offset++;
@@ -314,9 +314,9 @@
 
   if (destroy_wait)
     su_wait_destroy(&self->sup_waits[n]);
-  
+
   N = --self->sup_n_waits;
-  
+
   if (n < self->sup_pri_offset) {
     int j = --self->sup_pri_offset;
     if (n != j) {
@@ -352,7 +352,7 @@
   self->sup_wait_cbs[n] = NULL;
   self->sup_wait_args[n] = NULL;
   self->sup_wait_roots[n] = NULL;
-  
+
   indices[i] = indices[0];
   indices[0] = -i;
 
@@ -363,24 +363,24 @@
 
 
 /** Unregister a su_wait_t object.
- *  
+ *
  * 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)
  *
- * @deprecated Use su_wsevent_port_deregister() instead. 
+ * @deprecated Use su_wsevent_port_deregister() instead.
  *
  * @return Nonzero index of the wait object, or -1 upon an error.
  */
 int su_wsevent_port_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)
 {
@@ -403,14 +403,14 @@
 }
 
 /** Deregister a su_wait_t object.
- *  
+ *
  *  Deregisters a registration by index. The wait object, a callback
  *  function and a argument are removed from the port object. The wait
  *  object is destroyed.
- * 
+ *
  * @param self     - pointer to port object
  * @param i        - registration index
- * 
+ *
  * @return Index of the wait object, or -1 upon an error.
  */
 int su_wsevent_port_deregister(su_port_t *self, int i)
@@ -426,7 +426,7 @@
 
   if (self->sup_indices[i] < 0)
     return su_seterrno(EBADF);
-    
+
   retval = su_wsevent_port_deregister0(self, i, 1);
 
   su_wait_destroy(wait);
@@ -440,13 +440,13 @@
  *
  * Unregisters all su_wait_t objects and destroys all queued timers
  * associated with given root object.
- * 
+ *
  * @param  self     - pointer to port object
  * @param  root     - pointer to root object
- * 
+ *
  * @return Number of wait objects removed.
  */
-int su_wsevent_port_unregister_all(su_port_t *self, 
+int su_wsevent_port_unregister_all(su_port_t *self,
 				su_root_t *root)
 {
   int i, j, index, N;
@@ -461,11 +461,11 @@
   N          = self->sup_n_waits;
   indices    = self->sup_indices;
   reverses   = self->sup_reverses;
-  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; i < N; i++) {
     index = reverses[i]; assert(index > 0 && indices[index] == i);
 
@@ -487,10 +487,10 @@
       wait_args[j]  = wait_args[i];
       wait_roots[j] = wait_roots[i];
     }
-    
+
     j++;
   }
-  
+
   for (i = j; i < N; i++) {
     reverses[i] = -1;
     wait_cbs[i] = NULL;
@@ -541,7 +541,7 @@
  *
  * @param self      pointer to port object
  * @param multishot multishot mode (0 => disables, 1 => enables, -1 => query)
- * 
+ *
  * @retval 0 multishot mode is disabled
  * @retval 1 multishot mode is enabled
  * @retval -1 an error occurred
@@ -553,7 +553,7 @@
     return self->sup_multishot;
   else if (multishot == 0 || multishot == 1)
     return self->sup_multishot = multishot;
-  else 
+  else
     return (errno = EINVAL), -1;
 }
 
@@ -635,7 +635,7 @@
 			    su_root_init_f init,
 			    su_root_deinit_f deinit)
 {
-  return su_pthreaded_port_start(su_wsaevent_port_create, 
+  return su_pthreaded_port_start(su_wsaevent_port_create,
 				 parent, return_clone, magic, init, deinit);
 }
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/tag_dll.awk
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/tag_dll.awk	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/tag_dll.awk	Tue Dec 16 13:05:22 2008
@@ -105,18 +105,18 @@
   print "" > REF;
 }
 
-/^#define TAG_NAMESPACE/ { 
-  print "#undef TAG_NAMESPACE" > REF; 
-  print $0 > REF; 
+/^#define TAG_NAMESPACE/ {
+  print "#undef TAG_NAMESPACE" > REF;
+  print $0 > REF;
   print "" > REF;
-  print "#undef TAG_NAMESPACE" > DLL; 
-  print $0 > DLL; 
+  print "#undef TAG_NAMESPACE" > DLL;
+  print $0 > DLL;
   print "" > DLL;
 }
 
-/SU_HAVE_EXPERIMENTAL/ { 
-  print $0 > REF; 
-  print $0 > DLL; 
+/SU_HAVE_EXPERIMENTAL/ {
+  print $0 > REF;
+  print $0 > DLL;
 }
 
 !DEFS && /^tag_typedef_t/ { DEFS = 1; }
@@ -139,7 +139,7 @@
 END {
   if (LIST) {
     print "\nEXPORT tag_type_t " LIST "[] =\n{" > REF;
-    print "\nEXPORT tag_type_t " LIST "[] =\n{" > DLL; 
+    print "\nEXPORT tag_type_t " LIST "[] =\n{" > DLL;
     for (tag in typedefs) {
       if (typedefs[tag] !~ /NSTAG_TYPEDEF/) {
         print "  " tag "," > REF;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable.c	Tue Dec 16 13:05:22 2008
@@ -85,7 +85,7 @@
 HTABLE_DECLARE(htable, ht, entry_t);
 HTABLE_PROTOS(htable, ht, entry_t);
 
-struct hentry_s 
+struct hentry_s
 {
   unsigned long e_value;
   unsigned long e_n;
@@ -101,7 +101,7 @@
   htable_t c_hash[1];
 } context_t;
 
-context_t *context_create(void) 
+context_t *context_create(void)
 {
   context_t *c = su_home_clone(NULL, sizeof(*c));
 
@@ -131,7 +131,7 @@
     /* Resize hash table */
     if (htable_is_full(ht)) {
       htable_resize(c->c_home, ht, 0);
-      fprintf(stderr, "htable: resized to %u with %u entries\n", 
+      fprintf(stderr, "htable: resized to %u with %u entries\n",
 	      ht->ht_size, ht->ht_used);
     }
 
@@ -157,9 +157,9 @@
   su_free(c->c_home, e);
 }
 
-/* 
- * Check that all n entries with hash h are in hash table 
- * and they are stored in same order 
+/*
+ * Check that all n entries with hash h are in hash table
+ * and they are stored in same order
  * in which they were added to the hash
  */
 static unsigned long count(context_t *c, hash_value_t h)
@@ -168,7 +168,7 @@
   unsigned long n, expect = 1;
 
   for (ee = htable_hash(c->c_hash, h), n = 0;
-       (e = *ee); 
+       (e = *ee);
        ee = htable_next(c->c_hash, ee)) {
     if (e->e_value != h)
       continue;
@@ -225,10 +225,10 @@
 
     TEST_1(add(c, h, 1)); TEST_1(add(c, h, 2)); TEST_1(add(c, h, 3));
     TEST_1(add(c, h, 4)); TEST_1(add(c, h, 5)); TEST_1(add(c, h, 6));
-    TEST_1(add(c, h, 7)); TEST_1(add(c, h, 8)); TEST_1(add(c, h, 9)); 
+    TEST_1(add(c, h, 7)); TEST_1(add(c, h, 8)); TEST_1(add(c, h, 9));
 
     TEST(count(c, h), 9);
-    
+
     TEST(htable_resize(c->c_home, c->c_hash, ++size), 0);
     TEST(count(c, h), 9);
     TEST(htable_resize(c->c_home, c->c_hash, ++size), 0);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable2.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable2.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_htable2.c	Tue Dec 16 13:05:22 2008
@@ -83,7 +83,7 @@
 
 typedef struct hentry_s entry_t;
 
-struct hentry_s 
+struct hentry_s
 {
   hash_value_t e_hash;
   unsigned long e_n;
@@ -108,7 +108,7 @@
   htable2_t c_hash[1];
 } context_t;
 
-context_t *context_create(void) 
+context_t *context_create(void)
 {
   context_t *c = su_home_clone(NULL, sizeof(*c));
 
@@ -139,7 +139,7 @@
     /* Resize hash table */
     if (htable2_is_full(ht)) {
       htable2_resize(c->c_home, ht, 0);
-      fprintf(stderr, "htable: resized to "MOD_ZU" with "MOD_ZU" entries\n", 
+      fprintf(stderr, "htable: resized to "MOD_ZU" with "MOD_ZU" entries\n",
 	      ht->ht2_size, ht->ht2_used);
     }
 
@@ -163,9 +163,9 @@
   htable2_remove(c->c_hash, e);
 }
 
-/* 
- * Check that all n entries with hash h are in hash table 
- * and they are stored in same order 
+/*
+ * Check that all n entries with hash h are in hash table
+ * and they are stored in same order
  * in which they were added to the hash
  */
 static unsigned long count(context_t *c, hash_value_t h)
@@ -236,10 +236,10 @@
 
     TEST_1(add(c, h, 1)); TEST_1(add(c, h, 2)); TEST_1(add(c, h, 3));
     TEST_1(add(c, h, 4)); TEST_1(add(c, h, 5)); TEST_1(add(c, h, 6));
-    TEST_1(add(c, h, 7)); TEST_1(add(c, h, 8)); TEST_1(add(c, h, 9)); 
+    TEST_1(add(c, h, 7)); TEST_1(add(c, h, 8)); TEST_1(add(c, h, 9));
 
     TEST(count(c, h), 9);
-    
+
     TEST(htable2_resize(c->c_home, c->c_hash, ++size), 0);
     TEST(count(c, h), 9);
     TEST(htable2_resize(c->c_home, c->c_hash, ++size), 0);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_memmem.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_memmem.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_memmem.c	Tue Dec 16 13:05:22 2008
@@ -78,13 +78,13 @@
 
   TEST_P(memmem(haystack, 12, needle, 3), haystack + 2);
   TEST_P(memmem(needle, 3, haystack, 12), NULL);
-  
+
 #if HAVE_MEMMEM
   if (memmem(haystack, 12, "", 0) == NULL) {
     fprintf(stderr, "test_memmem.c: "
 	    "*** WARNING: system memmem() fails with empty needle ***\n");
   }
-  else 
+  else
 #endif
   {
     TEST_P(memmem(haystack, 12, "", 0), haystack);
@@ -151,7 +151,7 @@
   }
 
   {
-    char const hs[] = 
+    char const hs[] =
 "A case-folding string searching test consisting of a Very Long String\n"
 
 "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer felis. "
@@ -194,14 +194,14 @@
 "non, mi. Suspendisse vestibulum nunc eu neque. Sed rutrum felis aliquam "
 "urna. Ut tincidunt orci vitae ipsum. Nullam eros. Quisque augue. Quisque "
 "lacinia. Nunc ligula diam, nonummy a, porta in, tristique quis, leo. "
-"Phasellus nunc nulla, fringilla vel, lacinia et, suscipit a, turpis. " 
+"Phasellus nunc nulla, fringilla vel, lacinia et, suscipit a, turpis. "
 "Integer a est. Curabitur mauris lacus, vehicula sit amet, sodales vel, "
 "iaculis vitae, massa. Nam diam est, ultrices vitae, varius et, tempor a, "
 "leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, "
 "per inceptos hymenaeos. Fusce felis nibh, ullamcorper non, malesuada eget, "
       "facilisis vel, purus.\n";
 
-char const needle[] = 
+char const needle[] =
 "Proin congue. Curabitur placerat diam id eros. "
 "Pellentesque vitae nulla. Quisque at lorem et dolor auctor consequat. Sed "
 "sed tellus non nibh imperdiet venenatis. Integer ultrices dapibus nisi. "
@@ -209,7 +209,7 @@
 "ullamcorper pretium lorem. Vestibulum ante ipsum primis in faucibus orci "
 "luctus et ultrices posuere cubilia Curae;\n";
 
-char const Needle[] = 
+char const Needle[] =
 "PROIN CONGUE. CURABITUR PLACERAT DIAM ID EROS. "
 "PELLENTESQUE VITAE NULLA. QUISQUE AT LOREM ET DOLOR AUCTOR CONSEQUAT. SED "
 "SED TELLUS NON NIBH IMPERDIET VENENATIS. INTEGER ULTRICES DAPIBUS NISI. "

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_poll.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_poll.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_poll.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@internal 
+/**@internal
  * @file test_poll.c
  * Example code for <sofia-sip/su_wait.h>.
  *
@@ -57,15 +57,15 @@
   char *port = host ? argv[2] : NULL;
   su_addrinfo_t *ai = NULL, hints[1] = {{ 0 }};
   int error;
-  
-  if (argv[1] && (strcmp(argv[1], "--help") == 0 || 
-		  strcmp(argv[1], "-?") == 0)) 
+
+  if (argv[1] && (strcmp(argv[1], "--help") == 0 ||
+		  strcmp(argv[1], "-?") == 0))
     usage(argv[0]);
 
   if (!port) port = "echo";
 
   if ((error = su_getaddrinfo(host, port, hints, &ai))) {
-    fprintf(stderr, "poll_test: su_getaddrinfo(): %s\n", 
+    fprintf(stderr, "poll_test: su_getaddrinfo(): %s\n",
 	    su_gai_strerror(error));
     exit(1);
   }
@@ -96,7 +96,7 @@
     su_wait_create(&w, s, SU_WAIT_OUT);
 
     n = su_wait(&w, 1, SU_WAIT_FOREVER);
-    
+
     printf("su_wait returned %d\n", n);
 
     err = su_soerror(s);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su.c	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
  * @internal
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Thu Mar 18 19:40:51 1999 pessi
  */
 
@@ -87,7 +87,7 @@
 short opt_verbatim = 0;
 short opt_singlethread = 0;
 
-static su_socket_t udpsocket(void) 
+static su_socket_t udpsocket(void)
 {
   su_socket_t s;
   su_sockaddr_t su = { 0 };
@@ -111,7 +111,7 @@
 
   if (getsockname(s, &su.su_sa, &sulen) == SOCKET_ERROR) {
     su_perror("udpsocket: getsockname");
-    exit(1); 
+    exit(1);
   }
 
   if (opt_verbatim)
@@ -131,7 +131,7 @@
   return buf;
 }
 
-void 
+void
 do_ping(struct pinger *p, su_timer_t *t, void *p0)
 {
   char buf[1024];
@@ -142,7 +142,7 @@
   p->when = su_now();
 
   snprintf(buf, sizeof(buf), "Ping %d at %s", p->id++, snow(p->when));
-  if (su_sendto(p->s, buf, strlen(buf), 0, 
+  if (su_sendto(p->s, buf, strlen(buf), 0,
 		&p->addr, su_sockaddr_size(&p->addr)) == -1) {
     su_perror("do_ping: send");
   }
@@ -202,7 +202,7 @@
   p->id = 0;
 
   snprintf(buf, sizeof(buf), "Pong at %s", snow(su_now()));
-  if (su_sendto(p->s, buf, strlen(buf), 0, 
+  if (su_sendto(p->s, buf, strlen(buf), 0,
 		&p->addr, su_sockaddr_size(&p->addr)) == -1) {
     su_perror("do_pong: send");
   }
@@ -472,7 +472,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(),
@@ -490,8 +490,8 @@
   int opt_alarm = 1;
 #endif
 
-  struct pinger 
-    pinger = { PINGER, "ping", 1 }, 
+  struct pinger
+    pinger = { PINGER, "ping", 1 },
     ponger = { PONGER, "pong", 1 };
 
   char *argv0 = argv[0];
@@ -545,13 +545,13 @@
 
   fprintf(stdout, "test_su: testing %s port implementation\n",
 	  su_root_name(root));
-  
+
   su_root_threading(root, !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);
@@ -559,7 +559,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);
 
@@ -571,13 +571,13 @@
   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);
 
   if (opt_verbatim)
-    printf("%s exiting\n", argv0); 
+    printf("%s exiting\n", argv0);
 
   return 0;
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su_osx.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su_osx.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/test_su_osx.c	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
  *
  * @author Martti Mela <Martti.Mela at nokia.com>
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Sep 26 17:16:02 EEST 2006 mela
  */
 
@@ -96,13 +96,13 @@
 /* For run loop */
 int running = 0;
 
-static su_socket_t udpsocket(void) 
+static su_socket_t udpsocket(void)
 {
   su_socket_t s;
   su_sockaddr_t su = { 0 };
   socklen_t sulen = sizeof(su);
   char nbuf[64];
-  
+
   enter;
 
   su.su_family = opt_family;
@@ -122,7 +122,7 @@
 
   if (getsockname(s, &su.su_sa, &sulen) == SOCKET_ERROR) {
     su_perror("udpsocket: getsockname");
-    exit(1); 
+    exit(1);
   }
 
   if (opt_verbatim)
@@ -144,7 +144,7 @@
   return buf;
 }
 
-void 
+void
 do_ping(struct pinger *p, su_timer_t *t, void *p0)
 {
   char buf[1024];
@@ -159,7 +159,7 @@
   p->when = su_now();
 
   snprintf(buf, sizeof(buf), "Ping %d at %s", p->id++, snow(p->when));
-  if (su_sendto(p->s, buf, strlen(buf), 0, 
+  if (su_sendto(p->s, buf, strlen(buf), 0,
 		&p->addr, su_sockaddr_size(&p->addr)) == -1) {
     su_perror("do_ping: send");
   }
@@ -223,7 +223,7 @@
   p->id = 0;
 
   snprintf(buf, sizeof(buf), "Pong at %s", snow(su_now()));
-  if (su_sendto(p->s, buf, strlen(buf), 0, 
+  if (su_sendto(p->s, buf, strlen(buf), 0,
 		&p->addr, su_sockaddr_size(&p->addr)) == -1) {
     su_perror("do_pong: send");
   }
@@ -467,7 +467,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(),
@@ -483,8 +483,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];
@@ -528,16 +528,16 @@
 
   time_test();
 
-  root = su_root_osx_runloop_create(NULL); 
+  root = su_root_osx_runloop_create(NULL);
 
   if (!root) perror("su_root_osx_runloop_create"), 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), 2000L);
@@ -545,7 +545,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);
 
@@ -557,20 +557,20 @@
     while (running == 1) {
       su_root_step(root, 20);
     }
-  
+
   su_clone_wait(root, ping);
   su_clone_wait(root, pong);
 
   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);
 
   if (opt_verbatim)
-    printf("%s exiting\n", argv0); 
+    printf("%s exiting\n", argv0);
 
 #ifndef HAVE_WIN32
    if (sleeppid)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_heap.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_heap.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_heap.c	Tue Dec 16 13:05:22 2008
@@ -175,7 +175,7 @@
       TEST(array[i], i - n / 2);
     }
   }
-  
+
   END();
 }
 
@@ -472,7 +472,7 @@
   BEGIN();
 
   Heap2 heap = { NULL };
-  
+
   unsigned i, N;
   type1 *items;
 
@@ -498,7 +498,7 @@
     TEST(e->key, i);
     TEST(e->value, i);
   }
-  
+
   for (i = 1; i <= N; i++) {
     type2 e = heap2_remove(heap, 1);
     TEST(e->key, i);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_rbtree.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_rbtree.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_rbtree.c	Tue Dec 16 13:05:22 2008
@@ -85,7 +85,7 @@
 Node *node_new(su_home_t *home, int value)
 {
   Node *n = su_zalloc(home, sizeof (*n));
-  
+
   n->value = value;
 
   return n;
@@ -100,9 +100,9 @@
   if (k > (1 << 32))
     result += 32, k = (k >> 32) + ((k & ((1 << 32) - 1)) != 0);
 #endif
-  if (k > (1 << 16)) 
+  if (k > (1 << 16))
     result += 16, k = (k >> 16) + ((k & ((1 << 16) - 1)) != 0);
-  if (k > (1 << 8)) 
+  if (k > (1 << 8))
     result += 8, k = (k >> 8) + ((k & ((1 << 8) - 1)) != 0);
   if (k > (1 << 4))
     result += 4, k = (k >> 4) + ((k & 15) != 0);
@@ -112,7 +112,7 @@
     result += 1, k = (k >> 1) + (k & 1);
   if (k > 1)
     result += 1;
-  
+
   return result;
 }
 
@@ -127,7 +127,7 @@
     else
       tree = tree->left;
   }
-   
+
   return tree;
 }
 
@@ -163,7 +163,7 @@
   six = node_new(home, 6);
   seven = node_new(home, 7);
 
-  TEST_1(one); 
+  TEST_1(one);
   TEST_1(three);
   TEST_1(five);
   TEST_1(six);
@@ -175,16 +175,16 @@
   TEST_P(five->left, NULL); TEST_P(five->right, NULL);
   TEST_P(five->parent, NULL); TEST(five->black, 1);
 
-  /* Check after another node: 
+  /* Check after another node:
    *
    *         5b
-   *        / 
+   *        /
    *       3r
    */
   TEST(redblack_insert(&tree, three, &o), 0); TEST_P(o, NULL);
   TEST_P(tree->left, three); TEST(tree->black, 1);
   TEST_P(three->left, NULL); TEST_P(three->right, NULL);
-  TEST_P(three->parent, tree); TEST(three->black, 0); 
+  TEST_P(three->parent, tree); TEST(three->black, 0);
 
   /* Check third node
    *         5b
@@ -194,21 +194,21 @@
   TEST(redblack_insert(&tree, seven, &o), 0); TEST_P(o, NULL);
   TEST_P(tree->right, seven); TEST(tree->black, 1);
   TEST_P(seven->left, NULL); TEST_P(seven->right, NULL);
-  TEST_P(seven->parent, tree); TEST(seven->black, 0); 
+  TEST_P(seven->parent, tree); TEST(seven->black, 0);
 
   /* Check after fourth node:
    *         5b
    *        / \
    *       3b  7b
    *      /
-   *     1r  
+   *     1r
    */
   TEST(redblack_insert(&tree, one, &o), 0); TEST_P(o, NULL);
-  TEST_P(tree->left->left, one); 
-  TEST(tree->black, 1); 
+  TEST_P(tree->left->left, one);
+  TEST(tree->black, 1);
   TEST(tree->left->black, 1); TEST(tree->right->black, 1);
   TEST_P(one->left, NULL); TEST_P(one->right, NULL);
-  TEST_P(one->parent, tree->left); TEST(one->black, 0); 
+  TEST_P(one->parent, tree->left); TEST(one->black, 0);
 
   /* Checks that we got after fifth node:
    *         5b
@@ -256,7 +256,7 @@
   y = node_new(home, 2);
 
   TEST_1(x);
-  TEST_1(y); 
+  TEST_1(y);
 
   /*
    *              x                   y               x
@@ -298,8 +298,8 @@
   um497 = node_new(home, 497); TEST_1(um497);
   um995 = node_new(home, 995); TEST_1(um995);
 
-  o = (void *)-1; TEST(redblack_insert(&tree, um995, &o), 0); TEST_P(o, NULL); 
-  o = (void *)-1; TEST(redblack_insert(&tree, um497, &o), 0); TEST_P(o, NULL); 
+  o = (void *)-1; TEST(redblack_insert(&tree, um995, &o), 0); TEST_P(o, NULL);
+  o = (void *)-1; TEST(redblack_insert(&tree, um497, &o), 0); TEST_P(o, NULL);
   o = (void *)-1; TEST(redblack_insert(&tree, um103, &o), 0); TEST_P(o, NULL);
 
   um = node_find(tree, 103); TEST_P(um, um103);
@@ -338,9 +338,9 @@
 
   for (i = 0; i < N; i++) {
     node = node_find(tree, i);
-    TEST_1(node); 
+    TEST_1(node);
     TEST(node->value, i);
-    TEST_P(nodes[i], node); 
+    TEST_P(nodes[i], node);
   }
 
   node = node_find(tree, 0);
@@ -360,9 +360,9 @@
     node = node_find(tree, i);
     TEST_1(node); TEST(node->value, i);
     redblack_remove(&tree, node);
-    TEST_1(node->parent == NULL && 
-	   node->left == NULL && 
-	   node->right == NULL); 
+    TEST_1(node->parent == NULL &&
+	   node->left == NULL &&
+	   node->right == NULL);
     TEST_1(redblack_height(tree) <= 2 * (int)log2ceil(N - i + 1));
     TEST_1(redblack_check(tree));
   }
@@ -371,7 +371,7 @@
 
   for (i = N - 1; i >= 0; i--) {
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[i], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[i], &o), 0);
     TEST_P(o, NULL);
     TEST_1(redblack_height(tree) <= 2 * (int)log2ceil(N - i + 1));
     TEST_1(redblack_check(tree));
@@ -394,7 +394,7 @@
     int sn = (i * 57) % N;
     o = (void *)-1;
     TEST(nodes[sn]->inserted, 0);
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     nodes[sn]->inserted = 1;
     TEST_P(o, NULL);
     TEST_1(redblack_height(tree) <= 2 * (int)log2ceil(i + 1 + 1));
@@ -422,7 +422,7 @@
     int sn = (i * 517) % N;	/* relative prime to N */
     o = (void *)-1;
     TEST(nodes[sn]->inserted, 0);
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     nodes[sn]->inserted = 1;
     TEST_P(o, NULL);
     TEST_1(redblack_height(tree) <= 2 * (int)log2ceil(i + 1 + 1));
@@ -450,7 +450,7 @@
     int sn = (i * 1957) % N;	/* relative prime to N */
     o = (void *)-1;
     TEST(nodes[sn]->inserted, 0);
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     nodes[sn]->inserted = 1;
     TEST_P(o, NULL);
     TEST_1(redblack_height(tree) <= 2 * (int)log2ceil(i + 1 + 1));
@@ -480,13 +480,13 @@
     int sn = N - i - 1;
     TEST(nodes[i]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[i], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[i], &o), 0);
     TEST_P(o, NULL);
     nodes[i]->inserted = 1;
 
     TEST(nodes[sn]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->inserted = 1;
   }
@@ -516,13 +516,13 @@
     int sn = N - i - 1;
     TEST(nodes[i]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[i], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[i], &o), 0);
     TEST_P(o, NULL);
     nodes[i]->inserted = 1;
 
     TEST(nodes[sn]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->inserted = 1;
   }
@@ -552,13 +552,13 @@
     int sn = N / 2 + i;
     TEST(nodes[i]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[i], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[i], &o), 0);
     TEST_P(o, NULL);
     nodes[i]->inserted = 1;
 
     TEST(nodes[sn]->inserted, 0);
     o = (void *)-1;
-    TEST(redblack_insert(&tree, nodes[sn], &o), 0); 
+    TEST(redblack_insert(&tree, nodes[sn], &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->inserted = 1;
   }
@@ -583,13 +583,13 @@
   TEST_P(tree, NULL);
 
   /* Insert in perfect order ... */
-  
+
   for (j = N / 2; j > 0; j /= 2) {
     for (i = N - j; i >= 0; i -= j) {
       if (nodes[i]->inserted)
 	continue;
       o = (void *)-1;
-      TEST(redblack_insert(&tree, nodes[i], &o), 0); 
+      TEST(redblack_insert(&tree, nodes[i], &o), 0);
       TEST_P(o, NULL);
       nodes[i]->inserted = 1;
     }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su.c	Tue Dec 16 13:05:22 2008
@@ -57,7 +57,7 @@
   su_sockaddr_t  su[1], a[1], b[1];
 
   BEGIN();
-  
+
   hints->li_family = AF_INET;
 
   TEST(su_getlocalinfo(hints, &res), 0);
@@ -66,7 +66,7 @@
     if (li->li_addrlen != res->li_addrlen ||
 	memcmp(li->li_addr, res->li_addr, li->li_addrlen) != 0)
       TEST_1(su_cmp_sockaddr(li->li_addr, res->li_addr) != 0);
-    else 
+    else
       TEST_1(su_cmp_sockaddr(li->li_addr, res->li_addr) == 0);
   }
 
@@ -115,8 +115,8 @@
   su_getlocalinfo(hints, &res);
   su_freelocalinfo(res), res = NULL;
 
-  memset(a, 0, sizeof *a); 
-  memset(b, 0, sizeof *b); 
+  memset(a, 0, sizeof *a);
+  memset(b, 0, sizeof *b);
 
   TEST_1(su_match_sockaddr(a, b));
   b->su_family = AF_INET;
@@ -206,7 +206,7 @@
   TEST(listen(l, 5), 0);
 
   TEST(su_setblocking(s, 1), 0);
-  
+
   TEST(connect(s, &su.su_sa, sulen), 0);
   a = accept(l, &csu.su_sa, &csulen); TEST_1(a != -1);
 
@@ -253,12 +253,12 @@
   su_close(a);
 
   su_close(l);
-  su_close(s); 
+  su_close(s);
 
   END();
 }
 
-#if HAVE_SELECT 
+#if HAVE_SELECT
 
 #if HAVE_WIN32
 int test_select(void)
@@ -307,7 +307,7 @@
   TEST(su_inet_pton(AF_INET, "127.0.0.1", &su.su_sin.sin_addr), 1);
   TEST(bind(s, &su.su_sa, sulen), 0);
   TEST(getsockname(s, &su.su_sa, &sulen), 0);
-  
+
   tv.tv_sec = 0; tv.tv_usec = 1000;
   TEST(select(0, NULL, NULL, NULL, &tv), 0);
 
@@ -320,20 +320,20 @@
   TEST(select(s + 1, NULL, wset, NULL, &tv), 1);
   TEST_1(FD_ISSET(s, wset));
 
-  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); 
+  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
   FD_SET(s, rset); FD_SET(s, wset);
   tv.tv_sec = 0, tv.tv_usec = 1000;
   TEST(select(s + 1, rset, wset, NULL, &tv), 1);
   TEST_1(!FD_ISSET(s, rset));
   TEST_1(FD_ISSET(s, wset));
 
-  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); 
+  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
   FD_SET(s, rset); FD_SET(s, wset);
   tv.tv_sec = 0, tv.tv_usec = 1000;
   TEST(select(s + 1, rset, NULL, NULL, &tv), 0);
   TEST_1(!FD_ISSET(s, rset));
 
-  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); 
+  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
   FD_SET(s, rset); FD_CLR(s, wset);
   tv.tv_sec = 0, tv.tv_usec = 1000;
   TEST(select(s + 1, rset, wset, NULL, &tv), 0);
@@ -342,14 +342,14 @@
 
   TEST(su_sendto(s, "foo", 3, 0, &su, sulen), 3);
 
-  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); 
+  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
   FD_SET(s, rset); FD_CLR(s, wset);
   tv.tv_sec = 0, tv.tv_usec = 1000;
   TEST(select(s + 1, rset, wset, NULL, &tv), 1);
   TEST_1(FD_ISSET(s, rset));
   TEST_1(!FD_ISSET(s, wset));
 
-  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset); 
+  FD_ZERO_TO(s, rset); FD_ZERO_TO(s, wset);
   FD_SET(s, rset); FD_SET(s, wset);
   tv.tv_sec = 0, tv.tv_usec = 1000;
   TEST(select(s + 1, rset, wset, NULL, &tv), 2);
@@ -383,14 +383,14 @@
   char hexdigest[2 * SU_MD5_DIGEST_SIZE + 1];
 
   struct { char *input; uint8_t digest[SU_MD5_DIGEST_SIZE]; } suite[] = {
-    { (""), 
+    { (""),
 	{ 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
 	  0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
     { ("a"), { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8,
 	       0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
     { ("abc"), { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
 		 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } },
-    { ("message digest"), 
+    { ("message digest"),
       { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d,
 	0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
     { ("abcdefghijklmnopqrstuvwxyz"),
@@ -456,13 +456,13 @@
   TEST_S(hexdigest, "93b885adfe0da089cdf634904fd59f71");
   su_md5_deinit(md5);
 
-  su_md5_init(md5);   
+  su_md5_init(md5);
   su_md5_stri0update(md5, NULL);
   su_md5_stri0update(md5, "ABBADABBADOO");
   su_md5_hexdigest(md5, hexdigest);
   TEST_S(hexdigest, "101e6dd7cfabdb5c74f44b4c545c05cc");
 
-  su_md5_init(md5); 
+  su_md5_init(md5);
   su_md5_update(md5, "\0abbadabbadoo\0", 14);
   su_md5_hexdigest(md5, hexdigest);
   TEST_S(hexdigest, "101e6dd7cfabdb5c74f44b4c545c05cc");
@@ -512,7 +512,7 @@
     else
       usage(1);
   }
-  
+
   retval |= test_sockaddr();
   retval |= test_sendrecv();
   retval |= test_select();

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_alloc.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_alloc.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_alloc.c	Tue Dec 16 13:05:22 2008
@@ -22,7 +22,7 @@
  *
  */
 
-/**@internal 
+/**@internal
  * @file su_alloc_test.c
  *
  * Testing functions for su_alloc functions.
@@ -489,7 +489,7 @@
 
     TEST_1(su_strlst_append(l, ""));
 
-    TEST_S(su_strlst_join(l, home, "\n"), 
+    TEST_S(su_strlst_join(l, home, "\n"),
 	   "a\n" "b\n" "1: 1\n" "1.0: 1\n");
 
     TEST_VOID(su_strlst_destroy(l));
@@ -698,7 +698,7 @@
 
   su_home_get_stats(tmphome, 0, hs, sizeof *hs);
 
-  TEST64(hs->hs_allocs.hsa_preload + hs->hs_allocs.hsa_number, 
+  TEST64(hs->hs_allocs.hsa_preload + hs->hs_allocs.hsa_number,
 	  8191 + 8191 + 8191 / 32);
   TEST64(hs->hs_frees.hsf_preload + hs->hs_frees.hsf_number,
 	 8191 + 8191 + 8191 / 32 - 1);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_bm.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_bm.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_bm.c	Tue Dec 16 13:05:22 2008
@@ -24,8 +24,8 @@
 
 /**@internal
  * @file torture_su_bm.c
- * @brief Test string search with Boyer-Moore algorithm 
- *  
+ * @brief Test string search with Boyer-Moore algorithm
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @date Created: Sun Apr 17 21:02:10 2005 ppessi
  */
@@ -50,9 +50,9 @@
 int test_bm(void)
 {
   BEGIN();
-  
+
   {
-    char const hs[] = 
+    char const hs[] =
       "A Boyer-Moore string searching test consisting of a Long String";
     char const *s;
 
@@ -106,9 +106,9 @@
 int test_bm_long(void)
 {
   BEGIN();
-  
+
   {
-    char const hs[] = 
+    char const hs[] =
 "A Boyer-Moore string searching test consisting of a Very Long String\n"
 
 "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer felis. "
@@ -151,14 +151,14 @@
 "non, mi. Suspendisse vestibulum nunc eu neque. Sed rutrum felis aliquam "
 "urna. Ut tincidunt orci vitae ipsum. Nullam eros. Quisque augue. Quisque "
 "lacinia. Nunc ligula diam, nonummy a, porta in, tristique quis, leo. "
-"Phasellus nunc nulla, fringilla vel, lacinia et, suscipit a, turpis. " 
+"Phasellus nunc nulla, fringilla vel, lacinia et, suscipit a, turpis. "
 "Integer a est. Curabitur mauris lacus, vehicula sit amet, sodales vel, "
 "iaculis vitae, massa. Nam diam est, ultrices vitae, varius et, tempor a, "
 "leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, "
 "per inceptos hymenaeos. Fusce felis nibh, ullamcorper non, malesuada eget, "
       "facilisis vel, purus.\n";
 
-char const needle[] = 
+char const needle[] =
 "Proin congue. Curabitur placerat diam id eros. "
 "Pellentesque vitae nulla. Quisque at lorem et dolor auctor consequat. Sed "
 "sed tellus non nibh imperdiet venenatis. Integer ultrices dapibus nisi. "
@@ -166,7 +166,7 @@
 "ullamcorper pretium lorem. Vestibulum ante ipsum primis in faucibus orci "
 "luctus et ultrices posuere cubilia Curae;\n";
 
-char const Needle[] = 
+char const Needle[] =
 "PROIN CONGUE. CURABITUR PLACERAT DIAM ID EROS. "
 "PELLENTESQUE VITAE NULLA. QUISQUE AT LOREM ET DOLOR AUCTOR CONSEQUAT. SED "
 "SED TELLUS NON NIBH IMPERDIET VENENATIS. INTEGER ULTRICES DAPIBUS NISI. "
@@ -211,8 +211,8 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }
@@ -223,7 +223,7 @@
   int i;
 
   /* Set our name */
-  if (strchr(argv[0], '/')) 
+  if (strchr(argv[0], '/'))
     name = strrchr(argv[0], '/') + 1;
   else
     name = argv[0];

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_port.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_port.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_port.c	Tue Dec 16 13:05:22 2008
@@ -85,7 +85,7 @@
 
   if (n != port->sup_n_waits)
     return 0;
-  
+
   n = 0;
 
   for (i = 1; i <= N; i++) {
@@ -108,19 +108,19 @@
   return n == port->sup_size_waits;
 }
 
-struct su_root_magic_s 
+struct su_root_magic_s
 {
   int error, *sockets, *regs, *wakeups;
 };
 
-static int callback(su_root_magic_t *magic, 
+static int callback(su_root_magic_t *magic,
 		    su_wait_t *w,
 		    su_wakeup_arg_t *arg)
 {
   intptr_t i = (intptr_t)arg;
 
   assert(magic);
- 
+
   if (i <= 0 || i > I)
     return ++magic->error;
 
@@ -208,7 +208,7 @@
 
     if (bind(sockets[i], &su->su_sa, sizeof su->su_sin) != 0)
       perror("bind"), assert(0);
-    
+
     TEST(su_wait_create(wait + i, sockets[i], SU_WAIT_IN), 0);
 
     reg[i] = su_port_register(port, root, wait + i, callback, (void*)i, 0);
@@ -285,7 +285,7 @@
 
 #if HAVE_EPOLL
   /* With epoll we do not bother to prioritize the wait list */
-  if (port->sup_epoll == -1) 
+  if (port->sup_epoll == -1)
 #endif
     TEST(port->sup_pri_offset, prioritized);
 

Modified: 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.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root.c	Tue Dec 16 13:05:22 2008
@@ -121,33 +121,33 @@
 {
   BEGIN();
   TEST_1(rt->rt_root = su_root_create(NULL));
-  
+
   TEST_VOID(su_root_destroy(NULL));
-  TEST_P(su_root_name(NULL), NULL);  
-  TEST_1(su_root_name(rt->rt_root) != NULL);  
+  TEST_P(su_root_name(NULL), NULL);
+  TEST_1(su_root_name(rt->rt_root) != NULL);
   TEST(su_root_set_magic(NULL, rt), -1);
   TEST_P(su_root_magic(rt->rt_root), NULL);
   TEST(su_root_set_magic(rt->rt_root, rt), 0);
   TEST_P(su_root_magic(rt->rt_root), rt);
   TEST_P(su_root_magic(NULL), NULL);
-  TEST(su_root_register(NULL, NULL, NULL, NULL, 0), -1);  
-  TEST(su_root_unregister(NULL, NULL, NULL, NULL), -1);  
-  TEST(su_root_deregister(NULL, 0), -1);  
-  TEST(su_root_deregister(rt->rt_root, 0), -1);  
-  TEST(su_root_deregister(rt->rt_root, -1), -1);  
-  TEST(su_root_eventmask(NULL, 0, -1, -1), -1);  
-  TEST((long int)su_root_step(NULL, 0), -1L);  
-  TEST((long int)su_root_sleep(NULL, 0), -1L);  
-  TEST(su_root_multishot(NULL, 0), -1);  
-  TEST_VOID((void)su_root_run(NULL));  
-  TEST_VOID((void)su_root_break(NULL));  
+  TEST(su_root_register(NULL, NULL, NULL, NULL, 0), -1);
+  TEST(su_root_unregister(NULL, NULL, NULL, NULL), -1);
+  TEST(su_root_deregister(NULL, 0), -1);
+  TEST(su_root_deregister(rt->rt_root, 0), -1);
+  TEST(su_root_deregister(rt->rt_root, -1), -1);
+  TEST(su_root_eventmask(NULL, 0, -1, -1), -1);
+  TEST((long int)su_root_step(NULL, 0), -1L);
+  TEST((long int)su_root_sleep(NULL, 0), -1L);
+  TEST(su_root_multishot(NULL, 0), -1);
+  TEST_VOID((void)su_root_run(NULL));
+  TEST_VOID((void)su_root_break(NULL));
   TEST_M(su_root_task(NULL), su_task_null, sizeof su_task_null);
   TEST_M(su_root_parent(NULL), su_task_null, sizeof su_task_null);
-  TEST(su_root_add_prepoll(NULL, NULL, NULL), -1);  
-  TEST(su_root_remove_prepoll(NULL), -1);  
-  TEST_P(su_root_gsource(NULL), NULL);  
-  TEST_VOID((void)su_root_gsource(rt->rt_root));  
-  TEST(su_root_yield(NULL), -1);  
+  TEST(su_root_add_prepoll(NULL, NULL, NULL), -1);
+  TEST(su_root_remove_prepoll(NULL), -1);
+  TEST_P(su_root_gsource(NULL), NULL);
+  TEST_VOID((void)su_root_gsource(rt->rt_root));
+  TEST(su_root_yield(NULL), -1);
   TEST(su_root_release(NULL), -1);
   TEST(su_root_obtain(NULL), -1);
   TEST(su_root_has_thread(NULL), -1);
@@ -166,7 +166,7 @@
 
 #include <pthread.h>
 
-void *suspend_resume_test_thread(void *_rt) 
+void *suspend_resume_test_thread(void *_rt)
 {
   root_test_t *rt = _rt;
 
@@ -221,7 +221,7 @@
   TEST_1(rt->rt_root);
   TEST(su_root_obtain(rt->rt_root), 0);
   TEST(su_root_has_thread(rt->rt_root), 2);
-#else  
+#else
   TEST_1(rt->rt_root = su_root_create(rt));
 #endif
 
@@ -263,7 +263,7 @@
   pthread_mutex_destroy(rt->rt_sr.deinit);
 #else
   TEST_VOID(su_root_destroy(rt->rt_root)); rt->rt_root = NULL;
-#endif  
+#endif
 
   END();
 }
@@ -274,19 +274,19 @@
 {
   char buffer[64];
   int n, error;
- 
+
   su_wait_events(w, ep->s);
 
   n = recv(ep->s, buffer, sizeof(buffer), 0);
   error = su_errno();
- 
+
   if (n < 0)
     fprintf(stderr, "%s: %s\n", "recv", su_strerror(error));
 
   TEST_1(n > 0);
 
   rt->rt_received = ep->i;
-	   
+
   return 0;
 }
 
@@ -340,15 +340,15 @@
   TEST_1((s = su_socket(rt->rt_family, SOCK_DGRAM, 0)) != -1);
 
   for (i = 0; i < 5; i++) {
-    rt->rt_ep[i]->registered = 
-      su_root_register(rt->rt_root, rt->rt_ep[i]->wait, 
+    rt->rt_ep[i]->registered =
+      su_root_register(rt->rt_root, rt->rt_ep[i]->wait,
 		       wakeups[i], rt->rt_ep[i], 0);
     TEST(rt->rt_ep[i]->registered, i + 1 + SU_HAVE_PTHREADS);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	      sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -356,22 +356,22 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait, 
-			    wakeups[i], rt->rt_ep[i]), 
+    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait,
+			    wakeups[i], rt->rt_ep[i]),
 	 rt->rt_ep[i]->registered);
   }
 
 
   for (i = 0; i < 5; i++) {
-    rt->rt_ep[i]->registered = 
-      su_root_register(rt->rt_root, rt->rt_ep[i]->wait, 
+    rt->rt_ep[i]->registered =
+      su_root_register(rt->rt_root, rt->rt_ep[i]->wait,
 		       wakeups[i], rt->rt_ep[i], 1);
     TEST_1(rt->rt_ep[i]->registered > 0);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	      sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -379,22 +379,22 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_deregister(rt->rt_root, rt->rt_ep[i]->registered), 
+    TEST(su_root_deregister(rt->rt_root, rt->rt_ep[i]->registered),
 	 rt->rt_ep[i]->registered);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
     TEST_1(su_wait_create(ep->wait, ep->s, SU_WAIT_IN|SU_WAIT_ERR) != -1);
-    ep->registered = 
-      su_root_register(rt->rt_root, ep->wait, 
+    ep->registered =
+      su_root_register(rt->rt_root, ep->wait,
 		       wakeups[i], ep, 1);
     TEST_1(ep->registered > 0);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST_SIZE(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	      sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -402,8 +402,8 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait, 
-			    wakeups[i], rt->rt_ep[i]), 
+    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait,
+			    wakeups[i], rt->rt_ep[i]),
 	 rt->rt_ep[i]->registered);
   }
 
@@ -415,7 +415,7 @@
 {
   char buffer[64];
   ssize_t x;
-  test_ep_t *n = node->next; 
+  test_ep_t *n = node->next;
 
   su_wait_events(w, node->s);
 
@@ -428,14 +428,14 @@
     *node->prev = n;
 
     if (n) {
-      *node->prev = node->next;    
+      *node->prev = node->next;
       node->next->prev = node->prev;
       sendto(n->s, "foo", 3, 0, (void *)n->addr, n->addrlen);
     }
 
     node->next = NULL;
     node->prev = NULL;
-    
+
     if (!*node->list) {
       su_root_break(rt->rt_root);
     }
@@ -456,9 +456,9 @@
   test_ep_t *n, *nodes, *list = NULL;
   su_sockaddr_t su[1];
   socklen_t sulen;
-  
+
   TEST_1(nodes = calloc(N, sizeof *nodes));
-  
+
   memset(su, 0, sulen = sizeof su->su_sin);
   su->su_len = sizeof su->su_sin;
   su->su_family = AF_INET;
@@ -480,7 +480,7 @@
       su_close(n->s);
       break;
     }
-      
+
     if (getsockname(n->s, (void *)n->addr, &n->addrlen)) {
       su_perror("getsockname()");
       su_close(n->s);
@@ -499,7 +499,7 @@
       su_close(n->s);
       break;
     }
-    
+
     n->list = &list, n->prev = &list;
     if ((n->next = list))
       n->next->prev = &n->next;
@@ -559,21 +559,21 @@
   rt->rt_success_deinit = 1;
 }
 
-void receive_a_reporter(root_test_t *rt, 
+void receive_a_reporter(root_test_t *rt,
 			su_msg_r msg,
 			su_msg_arg_t *arg)
 {
   rt->rt_recv_reporter = 1;
 }
 
-void receive_recv_report(root_test_t *rt, 
+void receive_recv_report(root_test_t *rt,
 			 su_msg_r msg,
 			 su_msg_arg_t *arg)
 {
   rt->rt_reported_reporter = 1;
 }
 
-void send_a_reporter_msg(root_test_t *rt, 
+void send_a_reporter_msg(root_test_t *rt,
 			 su_msg_r msg,
 			 su_msg_arg_t *arg)
 {
@@ -602,12 +602,12 @@
   rt->rt_msg_destroyed++;
 }
 
-static void receive_simple_msg(root_test_t *rt, 
+static void receive_simple_msg(root_test_t *rt,
 			       su_msg_r msg,
 			       su_msg_arg_t *arg)
 {
   assert(rt == *arg);
-  rt->rt_msg_received = 
+  rt->rt_msg_received =
     su_task_cmp(su_msg_from(msg), su_task_null) == 0 &&
     su_task_cmp(su_msg_to(msg), su_task_null) == 0;
 }
@@ -657,10 +657,10 @@
 
   rt->rt_msg_received = 0;
   rt->rt_msg_destroyed = 0;
-  
+
   TEST(su_msg_deinitializer(m, deinit_simple_msg), 0);
   TEST(su_msg_send_to(m, su_clone_task(rt->rt_clone), receive_simple_msg), 0);
-  
+
   while (rt->rt_msg_destroyed == 0)
     su_root_step(rt->rt_root, 1);
 
@@ -680,7 +680,7 @@
   TEST_1(rt->rt_sent_reporter);
   TEST_1(rt->rt_recv_reporter);
   TEST_1(rt->rt_reported_reporter);
-  
+
   rt->rt_recv_reporter = 0;
 
   /* Make sure we can handle messages done as expected */
@@ -701,8 +701,8 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }

Modified: 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_root_osx.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_root_osx.c	Tue Dec 16 13:05:22 2008
@@ -135,19 +135,19 @@
 {
   char buffer[64];
   int n, error;
- 
+
   su_wait_events(w, ep->s);
 
   n = recv(ep->s, buffer, sizeof(buffer), 0);
   error = su_errno();
- 
+
   if (n < 0)
     fprintf(stderr, "%s: %s\n", "recv", su_strerror(error));
 
   TEST_1(n > 0);
 
   rt->rt_received = ep->i;
-	   
+
   return 0;
 }
 
@@ -202,15 +202,15 @@
   TEST_1((s = su_socket(rt->rt_family, SOCK_DGRAM, 0)) != -1);
 
   for (i = 0; i < 5; i++) {
-    rt->rt_ep[i]->registered = 
-      su_root_register(rt->rt_root, rt->rt_ep[i]->wait, 
+    rt->rt_ep[i]->registered =
+      su_root_register(rt->rt_root, rt->rt_ep[i]->wait,
 		       wakeups[i], rt->rt_ep[i], 0);
     TEST(rt->rt_ep[i]->registered, i + 1 + SU_HAVE_PTHREADS);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	 sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -218,22 +218,22 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait, 
-			    wakeups[i], rt->rt_ep[i]), 
+    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait,
+			    wakeups[i], rt->rt_ep[i]),
 	 rt->rt_ep[i]->registered);
   }
 
 
   for (i = 0; i < 5; i++) {
-    rt->rt_ep[i]->registered = 
-      su_root_register(rt->rt_root, rt->rt_ep[i]->wait, 
+    rt->rt_ep[i]->registered =
+      su_root_register(rt->rt_root, rt->rt_ep[i]->wait,
 		       wakeups[i], rt->rt_ep[i], 1);
     TEST_1(rt->rt_ep[i]->registered > 0);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	 sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -241,22 +241,22 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_deregister(rt->rt_root, rt->rt_ep[i]->registered), 
+    TEST(su_root_deregister(rt->rt_root, rt->rt_ep[i]->registered),
 	 rt->rt_ep[i]->registered);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
     TEST_1(su_wait_create(ep->wait, ep->s, SU_WAIT_IN|SU_WAIT_ERR) != -1);
-    ep->registered = 
-      su_root_register(rt->rt_root, ep->wait, 
+    ep->registered =
+      su_root_register(rt->rt_root, ep->wait,
 		       wakeups[i], ep, 1);
     TEST_1(ep->registered > 0);
   }
 
   for (i = 0; i < 5; i++) {
     test_ep_t *ep = rt->rt_ep[i];
-    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen), 
+    TEST(su_sendto(s, msg, sizeof(msg), 0, ep->addr, ep->addrlen),
 	 sizeof(msg));
     test_run(rt);
     TEST(rt->rt_received, i);
@@ -264,8 +264,8 @@
   }
 
   for (i = 0; i < 5; i++) {
-    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait, 
-			    wakeups[i], rt->rt_ep[i]), 
+    TEST(su_root_unregister(rt->rt_root, rt->rt_ep[i]->wait,
+			    wakeups[i], rt->rt_ep[i]),
 	 rt->rt_ep[i]->registered);
   }
 
@@ -322,14 +322,14 @@
   TEST_VOID(su_clone_wait(rt->rt_root, rt->rt_clone));
 
   TEST_1(rt->rt_success_deinit);
-  
+
   END();
 }
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_tag.c	Tue Dec 16 13:05:22 2008
@@ -28,7 +28,7 @@
  * Testing functions for su_tag module.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- * 
+ *
  * @date Created: Tue Mar  6 18:33:42 2001 ppessi
  */
 
@@ -47,7 +47,7 @@
 #define DEVNULL "/dev/null"
 #else
 #define DEVNULL "nul"
-#endif 
+#endif
 
 int tstflags = 0;
 
@@ -127,27 +127,27 @@
 
   tag_typedef_t _tag_b = STRTAG_TYPEDEF(b);
   tag_typedef_t _tag_b_ref = REFTAG_TYPEDEF(tag_b);
- 
+
   tag_typedef_t _tag_i = INTTAG_TYPEDEF(i);
   tag_typedef_t _tag_i_ref = REFTAG_TYPEDEF(tag_i);
- 
+
   tag_typedef_t _tag_j = INTTAG_TYPEDEF(j);
   tag_typedef_t _tag_j_ref = REFTAG_TYPEDEF(tag_j);
- 
+
   tag_typedef_t _tag_k = INTTAG_TYPEDEF(k);
   tag_typedef_t _tag_k_ref = REFTAG_TYPEDEF(tag_k);
-  
+
   tag_typedef_t _tag_n = INTTAG_TYPEDEF(n);
   tag_typedef_t _tag_n_ref = REFTAG_TYPEDEF(tag_n);
 
 #undef TAG_NAMESPACE
 #define TAG_NAMESPACE "pq"
-  
+
   tag_typedef_t _tag_any_pq = NSTAG_TYPEDEF(*);
 
   tag_typedef_t _tag_p = BOOLTAG_TYPEDEF(p);
   tag_typedef_t _tag_p_ref = REFTAG_TYPEDEF(tag_p);
-  
+
   tag_typedef_t _tag_q = BOOLTAG_TYPEDEF(q);
   tag_typedef_t _tag_q_ref = REFTAG_TYPEDEF(tag_q);
 
@@ -237,22 +237,22 @@
 	       (tv)1, (tv)2, (tv)3, (tv)4, (tv)5,
 	       (tv)6, (tv)7, (tv)8, (tv)9, (tv)10);
 }
-], 
+],
 SAC_SU_DEFINE(SU_HAVE_TAGSTACK, 1, [
-Define this as 1 if your compiler puts the variable argument list nicely in memory]), 
+Define this as 1 if your compiler puts the variable argument list nicely in memory]),
 )
 
 */
 
 static int test_stackargs(int l, ...)
 {
-  va_list ap;  
+  va_list ap;
   int i, *p;
 
   BEGIN();
 
   va_start(ap, l);
-  
+
   p = &l;
 
   for (i = l; i <= 10; i++) {
@@ -287,10 +287,10 @@
 
   BEGIN();
 
-  lst = tl_list(TAG_A("Moro"), 
-		TAG_A("Vaan"), 
-		TAG_I(1), 
-		TAG_SKIP(2), 
+  lst = tl_list(TAG_A("Moro"),
+		TAG_A("Vaan"),
+		TAG_I(1),
+		TAG_SKIP(2),
 		TAG_NEXT(rest));
 
   TEST_P(lst[0].t_tag, tag_a);
@@ -379,12 +379,12 @@
 
   home = su_home_new(sizeof *home); TEST_1(home);
 
-  lst = tl_list(TAG_A("Moro"), 
+  lst = tl_list(TAG_A("Moro"),
 		TAG_I(2),
 		TAG_Q(3),
-		TAG_SKIP(2), 
-		TAG_A("vaan"), 
-		TAG_I(1), 
+		TAG_SKIP(2),
+		TAG_A("vaan"),
+		TAG_I(1),
 		TAG_P(2),
 		TAG_NULL());
 
@@ -420,7 +420,7 @@
   su_free(NULL, b1); su_free(NULL, b2); su_free(NULL, b3); su_free(NULL, b4);
 
   nsfilter = tl_list(TAG_ANY_PQ(), TAG_END());
-  
+
   b5 = tl_afilter(NULL, nsfilter, lst);
   TEST_SIZE(tl_len(b5), 3 * sizeof(tagi_t));
   TEST_SIZE(tl_xtra(b5, 0), 0);
@@ -437,7 +437,7 @@
   b = tl_afilter(home, filter6, lst); TEST_1(b);
   TEST_P(b[0].t_tag, 0);
 
-  tl_vfree(filter1); tl_vfree(filter2); tl_vfree(filter3); 
+  tl_vfree(filter1); tl_vfree(filter2); tl_vfree(filter3);
   tl_vfree(filter4); tl_vfree(filter5); tl_vfree(filter6);
 
   tl_vfree(lst);
@@ -455,14 +455,14 @@
   tagi_t *lst;
   FILE *out;
 
-  lst = tl_list(TAG_A("Moro"), 
-		TAG_I(2), 
+  lst = tl_list(TAG_A("Moro"),
+		TAG_I(2),
 		TAG_J(3),
 		TAG_K(5),
-		TAG_SKIP(2), 
-		TAG_A("Vaan"), 
+		TAG_SKIP(2),
+		TAG_A("Vaan"),
 		TAG_B("b"),
-		TAG_I(1), 
+		TAG_I(1),
 		TAG_NULL());
 
   if (tstflags & tst_verbatim)
@@ -524,15 +524,15 @@
 
   BEGIN();
 
-  lst = tl_list(TAG_A("Moro"), 
-		TAG_I(2), 
+  lst = tl_list(TAG_A("Moro"),
+		TAG_I(2),
 		TAG_J(3),
 		TAG_K(5),
 		TAG_P(3),
-		TAG_SKIP(2), 
-		TAG_A("Vaan"), 
+		TAG_SKIP(2),
+		TAG_A("Vaan"),
 		TAG_B("b"),
-		TAG_I(1), 
+		TAG_I(1),
 		TAG_NULL());
 
   TEST_1(lst);
@@ -540,7 +540,7 @@
   TEST_1(t = tl_find(lst, tag_i)); TEST(t->t_value, 2);
   TEST_1(t = tl_find_last(lst, tag_i)); TEST(t->t_value, 1);
 
-  TEST(tl_gets(lst, 
+  TEST(tl_gets(lst,
 	       TAG_A_REF(a),
 	       TAG_B_REF(b),
 	       TAG_I_REF(i),
@@ -566,7 +566,7 @@
   lst = tl_list(TAG_A_REF(a),
 		TAG_I_REF(i),
 		TAG_NULL());
-  
+
   TEST(tl_tgets(lst, TAG_A("Foo"), TAG_I(-1), TAG_END()), 2);
 
   TEST_S(a, "Foo");
@@ -629,8 +629,8 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_time.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_time.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_time.c	Tue Dec 16 13:05:22 2008
@@ -23,14 +23,14 @@
  */
 
 /**@ingroup su_time
- * 
- * @IFILE torture_su_time.c  
+ *
+ * @IFILE torture_su_time.c
  *
  * Tests for su_time functions.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Kai Vehmanen <first.surname at nokia.com>
- * 
+ *
  * @date Created: Fri May 10 16:08:18 2002 ppessi
  */
 
@@ -81,7 +81,7 @@
   su_time_t now;
   su_ntp_t ntp, ntp0, ntp1;
   uint64_t increment = 3019;
-  
+
   BEGIN();
 
   ntp_hi = 2208988800UL;
@@ -138,7 +138,7 @@
   uint64_t tl;
   uint16_t seq1, seq2;
   const uint64_t granularity = 10000000U;
-  const uint64_t ntp_epoch = 
+  const uint64_t ntp_epoch =
     (uint64_t)(141427) * (24 * 60 * 60L) * granularity;
   isize_t i;
 
@@ -175,7 +175,7 @@
 
   for (i = 0; i < 32000; i++) {
     su_guid_generate(g2);
-    seq2 = ((g2->s.clock_seq_hi_and_reserved & 0x3f) << 8) 
+    seq2 = ((g2->s.clock_seq_hi_and_reserved & 0x3f) << 8)
       + g2->s.clock_seq_low;
     TEST((seq1 + i + 2) % 16384, seq2);
   }
@@ -216,15 +216,15 @@
 
 void usage(int exitcode)
 {
-  fprintf(stderr, 
-	  "usage: %s [-v] [-a]\n", 
+  fprintf(stderr,
+	  "usage: %s [-v] [-a]\n",
 	  name);
   exit(exitcode);
 }
 
 char *lastpart(char *path)
 {
-  if (strchr(path, '/')) 
+  if (strchr(path, '/'))
     return strrchr(path, '/') + 1;
   else
     return path;

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_timer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_su_timer.c	Tue Dec 16 13:05:22 2008
@@ -261,7 +261,7 @@
 
   now = su_now();
 
-  printf("Inserting %u timers took %f millisec\n", 
+  printf("Inserting %u timers took %f millisec\n",
 	 i, su_time_diff(inserted, started) * 1000);
 
   printf("Processing %u/%u timers took %f millisec (%f expected)\n",

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -1,6 +1,6 @@
 2006-10-19  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* tport.c (tport_is_shutdown, tport_is_closed): Added to 
+	* tport.c (tport_is_shutdown, tport_is_closed): Added to
 	public API.
 
 2006-01-15  Martti Mela  <martti.mela at nokia.com>
@@ -22,11 +22,11 @@
 
 	* tport.c (tport_bind_server): Avoid segfault
 	if init for a NAT traversal mechanism has failed.
-	
+
 2005-10-18  Pekka Pessi  <Pekka.Pessi at nokia.com>
 
 	* Feature #1326002.
-	
+
   * Added stun_test(), but not running it.
 
     M ./libsofia-sip-ua/tport/tport_test.c +32

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/Makefile.am	Tue Dec 16 13:05:22 2008
@@ -21,7 +21,7 @@
 
 noinst_LTLIBRARIES = 	libtport.la
 
-bin_PROGRAMS = 		
+bin_PROGRAMS =
 
 check_PROGRAMS =	test_tport
 

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport.h	Tue Dec 16 13:05:22 2008
@@ -213,7 +213,7 @@
 TPORT_DLL isize_t tport_queuelen(tport_t const *self);
 
 /** Send a queued message (and queue another, if required). */
-TPORT_DLL int tport_tqsend(tport_t *, msg_t *, msg_t *, 
+TPORT_DLL int tport_tqsend(tport_t *, msg_t *, msg_t *,
 			   tag_type_t, tag_value_t, ...);
 
 /** Stop reading from socket until tport_continue() is called. */

Modified: 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_plugins.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_plugins.h	Tue Dec 16 13:05:22 2008
@@ -91,7 +91,7 @@
   int (*vsc_can_send_comp)(tport_compressor_t const *);
   int (*vsc_can_recv_comp)(tport_compressor_t const *);
 
-  int (*vsc_set_comp_name)(tport_t const *self, 
+  int (*vsc_set_comp_name)(tport_t const *self,
 			   tport_compressor_t const *return_sc,
 			   char const *comp);
 
@@ -104,7 +104,7 @@
 			     char const *name, int namelen,
 			     int create_if_needed);
 
-  struct sigcomp_compartment * 
+  struct sigcomp_compartment *
   (*vsc_compartment_incref)(struct sigcomp_compartment *cc);
 
   void (*vsc_compartment_decref)(struct sigcomp_compartment **pointer_to_cc);
@@ -146,19 +146,19 @@
   (*vsc_sigcomp_assign_if_needed)(tport_t *self,
 				  struct sigcomp_compartment *cc);
 
-  void (*vsc_accept_incomplete)(tport_t const *self, 
+  void (*vsc_accept_incomplete)(tport_t const *self,
 				tport_compressor_t *sc,
 				msg_t *msg);
 
-  int (*vsc_recv_comp)(tport_t const *self, 
+  int (*vsc_recv_comp)(tport_t const *self,
 		       tport_compressor_t *sc,
 		       msg_t **in_out_msg,
 		       su_sockaddr_t *from,
 		       socklen_t fromlen);
 
   ssize_t (*vsc_send_comp)(tport_t const *self,
-		       msg_t *msg, 
-		       msg_iovec_t iov[], 
+		       msg_t *msg,
+		       msg_iovec_t iov[],
 		       size_t iovused,
 		       struct sigcomp_compartment *cc,
 		       tport_compressor_t *sc);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_tag.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_tag.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/sofia-sip/tport_tag.h	Tue Dec 16 13:05:22 2008
@@ -28,9 +28,9 @@
 
 /**@file sofia-sip/tport_tag.h
  * @brief Tags for tport module.
- * 
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *  
+ *
  * @date Created: Sat Oct 12 18:39:48 2002 ppessi
  */
 
@@ -74,7 +74,7 @@
 TPORT_DLL extern tag_typedef_t tptag_server_ref;
 #define TPTAG_SERVER_REF(x) tptag_server_ref, tag_bool_vr(&(x))
 
-/** Define how the public transport connects to Internet. 
+/** Define how the public transport connects to Internet.
  *
  * @sa TPTAG_PUBLIC(), tport_is_public().
  */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c	Tue Dec 16 13:05:22 2008
@@ -49,7 +49,7 @@
 
 #define TP_STACK_T tp_test_t
 #define TP_CLIENT_T struct called
- 
+
 #include <sofia-sip/su_wait.h>
 #include <sofia-sip/su_md5.h>
 
@@ -158,7 +158,7 @@
 
   for (tp = tport_primaries(tp); tp; tp = tport_next(tp))
     n++;
-  
+
   return n;
 }
 
@@ -169,7 +169,7 @@
   usize_t i, len;
 
   BEGIN();
-  
+
   TEST_1(tst = msg_test_public(msg));
   TEST_1(pl = tst->msg_payload);
 
@@ -197,7 +197,7 @@
   msg_test_t *tst;
   msg_payload_t *pl;
   su_md5_t md5[1];
-  
+
   BEGIN();
 
   TEST_1(tst = msg_test_public(msg));
@@ -255,7 +255,7 @@
     if (strcmp(b64, tst->msg_content_md5->g_string)) {
       ;
     }
-    
+
     TEST_S(b64, tst->msg_content_md5->g_string);
   } else {
     TEST_1(tst->msg_content_md5);
@@ -266,7 +266,7 @@
 
 #define TPORT_TEST_VERSION MSG_TEST_VERSION_CURRENT
 
-static int new_test_msg(tp_test_t *tt, msg_t **retval, 
+static int new_test_msg(tp_test_t *tt, msg_t **retval,
 			char const *ident,
 			int N, int len)
 {
@@ -336,7 +336,7 @@
 
   TEST_1(md5 = msg_content_md5_make(home, b64));
   TEST(msg_header_insert(msg, (void *)tst, (msg_header_t *)md5), 0);
-  
+
   TEST_1(sep = msg_separator_create(home));
   TEST(msg_header_insert(msg, (void *)tst, (msg_header_t *)sep), 0);
 
@@ -361,7 +361,7 @@
 
   if (tport_delivered_from(tp, msg, frm) != -1 && frm->tpn_comp) {
     struct sigcomp_compartment *cc = test_sigcomp_compartment(tt, tp, frm);
-   
+
     tport_sigcomp_accept(tp, cc, msg);
   }
 
@@ -374,7 +374,7 @@
   }
   else if (test_msg_md5(tt, msg))
     msg_destroy(msg);
-  else if (tt->tt_rmsg) 
+  else if (tt->tt_rmsg)
     msg_destroy(msg);
   else {
     tt->tt_rmsg = msg;
@@ -388,14 +388,14 @@
 			  char const *remote)
 {
   tt->tt_status = -1;
-  fprintf(stderr, "tp_test_error(%p): error %d (%s) from %s\n", 
-	  (void *)tp, errcode, su_strerror(errcode), 
+  fprintf(stderr, "tp_test_error(%p): error %d (%s) from %s\n",
+	  (void *)tp, errcode, su_strerror(errcode),
 	  remote ? remote : "<unknown destination>");
 }
 
 msg_t *tp_test_msg(tp_test_t *tt, int flags,
 		   char const data[], usize_t size,
-		   tport_t const *tp, 
+		   tport_t const *tp,
 		   tp_client_t *tpc)
 {
   msg_t *msg = msg_create(tt->tt_mclass, flags);
@@ -408,15 +408,15 @@
 
 static
 struct sigcomp_compartment *
-test_sigcomp_compartment(tp_test_t *tt, 
-			 tport_t *tp, 
+test_sigcomp_compartment(tp_test_t *tt,
+			 tport_t *tp,
 			 tp_name_t const *tpn)
 {
   struct sigcomp_compartment *cc = NULL;
 #if HAVE_SIGCOMP
   char name[256];
   int namesize;
-  
+
   namesize = snprintf(name, sizeof name, "TEST_%s/%s:%s",
 		     tpn->tpn_proto,
 		     tpn->tpn_host,
@@ -425,11 +425,11 @@
   if (namesize <= 0 || namesize >= sizeof name)
     return NULL;
 
-  cc = sigcomp_compartment_access(tt->state_handler, 
+  cc = sigcomp_compartment_access(tt->state_handler,
 				  0, name, namesize, NULL, 0);
 
   if (cc == NULL) {
-    cc = sigcomp_compartment_create(tt->algorithm, tt->state_handler, 
+    cc = sigcomp_compartment_create(tt->algorithm, tt->state_handler,
 				    0, name, namesize, NULL, 0);
 
     sigcomp_compartment_option(cc, "dms=32768");
@@ -506,23 +506,23 @@
 
 #if HAVE_SIGCOMP
   TEST_1(tt->state_handler = sigcomp_state_handler_create());
-  TEST_1(tt->algorithm = 
+  TEST_1(tt->algorithm =
 	 sigcomp_algorithm_by_name(getenv("SIGCOMP_ALGORITHM")));
-  TEST_1(tt->master_cc = 
-	 sigcomp_compartment_create(tt->algorithm, tt->state_handler, 
+  TEST_1(tt->master_cc =
+	 sigcomp_compartment_create(tt->algorithm, tt->state_handler,
 				    0, "", 0, NULL, 0));
   TEST(sigcomp_compartment_option(tt->master_cc, "stateless"), 1);
 #endif
 
   /* Create client transport */
-  TEST_1(tt->tt_tports = 
+  TEST_1(tt->tt_tports =
 	 tport_tcreate(tt, tp_test_class, tt->tt_root,
 		       IF_SIGCOMP_TPTAG_COMPARTMENT(tt->master_cc)
 		       TAG_END()));
 
   /* Bind client transports */
   TEST(tport_tbind(tt->tt_tports, myname, transports,
-		   TPTAG_SERVER(0), TAG_END()), 
+		   TPTAG_SERVER(0), TAG_END()),
        0);
 
   if (getenv("TPORT_TEST_HOST"))
@@ -536,15 +536,15 @@
   myname->tpn_ident = "server";
 
   /* Create server transport */
-  TEST_1(tt->tt_srv_tports = 
+  TEST_1(tt->tt_srv_tports =
 	 tport_tcreate(tt, tp_test_class, tt->tt_root,
 		       IF_SIGCOMP_TPTAG_COMPARTMENT(tt->master_cc)
 		       TAG_END()));
 
   /* Bind server transports */
-  TEST(tport_tbind(tt->tt_srv_tports, myname, transports, 
+  TEST(tport_tbind(tt->tt_srv_tports, myname, transports,
 		   TPTAG_SERVER(1),
-		   TAG_END()), 
+		   TAG_END()),
        0);
 
   /* Check that the master transport has idle parameter */
@@ -578,13 +578,13 @@
 
     rname->tpn_port = port;
     rname->tpn_ident = "failure";
-    
+
     before = count_tports(tt->tt_srv_tports);
 
     /* Bind server transports to an reserved port - this should fail */
-    TEST(tport_tbind(tt->tt_srv_tports, rname, transports, 
+    TEST(tport_tbind(tt->tt_srv_tports, rname, transports,
 		     TPTAG_SERVER(1),
-		     TAG_END()), 
+		     TAG_END()),
 	 -1);
 
     after = count_tports(tt->tt_srv_tports);
@@ -601,9 +601,9 @@
     rname->tpn_ident = "server2";
 
     /* Bind server transports to another port */
-    TEST(tport_tbind(tt->tt_srv_tports, rname, transports, 
+    TEST(tport_tbind(tt->tt_srv_tports, rname, transports,
 		     TPTAG_SERVER(1),
-		     TAG_END()), 
+		     TAG_END()),
 	 0);
 
     /* Check that new transports are after old ones. */
@@ -631,16 +631,16 @@
 
     /* Bind client transports */
     TEST(tport_tbind(tt->tt_tports, tlsname, transports,
-		     TPTAG_SERVER(0), 
+		     TPTAG_SERVER(0),
 		     TPTAG_CERTIFICATE(srcdir),
-		     TAG_END()), 
+		     TAG_END()),
 	 0);
 
     /* Bind tls server transport */
-    TEST(tport_tbind(tt->tt_srv_tports, tlsname, transports, 
+    TEST(tport_tbind(tt->tt_srv_tports, tlsname, transports,
 		     TPTAG_SERVER(1),
 		     TPTAG_CERTIFICATE(srcdir),
-		     TAG_END()), 
+		     TAG_END()),
 	 0);
   }
 #endif
@@ -651,9 +651,9 @@
     if (tt->tt_flags & tst_verbatim) {
       char const *host = tpn->tpn_host != tpn->tpn_canon ? tpn->tpn_host : "";
       printf("bound transport to %s/%s:%s%s%s%s%s\n",
-	     tpn->tpn_proto, tpn->tpn_canon, tpn->tpn_port, 
+	     tpn->tpn_proto, tpn->tpn_canon, tpn->tpn_port,
 	     host[0] ? ";maddr=" : "", host,
-	     tpn->tpn_comp ? ";comp=" : "", 
+	     tpn->tpn_comp ? ";comp=" : "",
 	     tpn->tpn_comp ? tpn->tpn_comp : "");
     }
 
@@ -676,10 +676,10 @@
       tt->tt_tcp_comp->tpn_ident = NULL;
 
       if (tt->tt_tcp_addr == NULL) {
-	tt->tt_tcp_addr = tport_get_address(tp); 
+	tt->tt_tcp_addr = tport_get_address(tp);
 	tt->tt_tcp = tp;
       }
-    } 
+    }
     else if (strcmp(tpn->tpn_proto, "sctp") == 0) {
       *tt->tt_sctp_name = *tpn;
       tt->tt_sctp_name->tpn_ident = NULL;
@@ -693,13 +693,13 @@
   END();
 }
 
-char const payload[] = 
+char const payload[] =
 "Some data\n"
 "More data\n";
 
 #include <time.h>
 
-int 
+int
 tport_test_run(tp_test_t *tt, unsigned timeout)
 {
   time_t now = time(NULL);
@@ -715,7 +715,7 @@
     }
     su_root_step(tt->tt_root, 500L);
 
-    if (!getenv("TPORT_TEST_DEBUG") && 
+    if (!getenv("TPORT_TEST_DEBUG") &&
 	time(NULL) > (time_t)(now + timeout))
       return 0;
   }
@@ -838,7 +838,7 @@
   msg_destroy(msg);
 
   tport_set_params(tp,
-       	    TPTAG_KEEPALIVE(100), 
+       	    TPTAG_KEEPALIVE(100),
        	    TPTAG_PINGPONG(500),
        	    TPTAG_IDLE(500),
        	    TAG_END());
@@ -901,7 +901,7 @@
 
   /* This uses a new connection */
   TEST_1(!new_test_msg(tt, &msg, "tcp-no-reuse", 1, 1024));
-  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name, 
+  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name,
        		   TPTAG_REUSE(0), TAG_END()));
   N++;
   TEST_S(tport_name(tp)->tpn_ident, "client");
@@ -910,7 +910,7 @@
 
   /* This uses the old connection */
   TEST_1(!new_test_msg(tt, &msg, "tcp-reuse", 1, 1024));
-  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name, 
+  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name,
        		   TPTAG_REUSE(1), TAG_END()));
   N++;
   TEST_S(tport_name(tp)->tpn_ident, "client");
@@ -940,8 +940,8 @@
   TEST_1(pending_server_close && pending_client_close);
   SU_DEBUG_3(("tport_test(%p): waiting for PONG timeout\n", (void *)tp0));
 
-  /* Wait until notifications - 
-     client closes when no pong is received and notifys pending, 
+  /* Wait until notifications -
+     client closes when no pong is received and notifys pending,
      then server closes and notifys pending */
   while (pending_server_close || pending_client_close)
     su_root_step(tt->tt_root, 50);
@@ -956,7 +956,7 @@
   msg_destroy(msg);
 
   tport_set_params(tp0,
-       	    TPTAG_KEEPALIVE(250), 
+       	    TPTAG_KEEPALIVE(250),
        	    TPTAG_PINGPONG(200),
        	    TAG_END());
 
@@ -999,7 +999,7 @@
 static int test_incomplete(tp_test_t *tt)
 {
   BEGIN();
-  
+
   su_addrinfo_t const *ai = tt->tt_tcp_addr;
   su_socket_t s;
   int connected;
@@ -1010,12 +1010,12 @@
 
   s = su_socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
   TEST_1(s != SOCKET_ERROR);
-  
+
   su_setblocking(s, 1);
   connected = connect(s, ai->ai_addr, (socklen_t)ai->ai_addrlen);
 
   su_root_step(tt->tt_root, 50);
-  
+
   TEST(su_send(s, "F", 1, 0), 1);
   su_root_step(tt->tt_root, 50);
   TEST(su_send(s, "O", 1, 0), 1);
@@ -1024,12 +1024,12 @@
   su_root_step(tt->tt_root, 50);
   TEST(su_send(s, " ", 1, 0), 1);
   su_root_step(tt->tt_root, 50);
-  
+
   tt->tt_received = 0;
   TEST(tport_test_run(tt, 5), -1);
   TEST(tt->tt_received, 1);
   TEST_P(tt->tt_rmsg, NULL);
-  
+
   su_close(s);
 
   END();
@@ -1050,7 +1050,7 @@
   TEST_1(tp = tport_by_name(tt->tt_tports, tpn));
   TEST_1(tport_is_primary(tp));
   TEST(tport_flush(tp), 0);
-  
+
   for (i = 0; i < 10; i++)
     su_root_step(tt->tt_root, 10L);
 
@@ -1083,7 +1083,7 @@
   /* Enable reuse on single connection */
   TEST(tport_set_params(tp1, TPTAG_REUSE(1), TAG_END()), 1);
   TEST(new_test_msg(tt, &msg, "reuse-3", 1, 1024), 0);
-  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name, 
+  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name,
 			  TPTAG_REUSE(1),
 			  TAG_END()));
   TEST_S(tport_name(tp)->tpn_ident, "client");
@@ -1101,7 +1101,7 @@
 
   /* Send a single message with different connection */
   TEST_1(!new_test_msg(tt, &msg, "fresh-1", 1, 1024));
-  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name, 
+  TEST_1(tp = tport_tsend(tt->tt_tports, msg, tt->tt_tcp_name,
 			  TPTAG_FRESH(1),
 			  TPTAG_REUSE(1),
 			  TAG_END()));
@@ -1135,7 +1135,7 @@
   tport_t *tp, *tp0;
   char buffer[32];
 
-  if (!tt->tt_sctp_name->tpn_proto) 
+  if (!tt->tt_sctp_name->tpn_proto)
     return 0;
 
   /* Just a small and nice message first */
@@ -1148,7 +1148,7 @@
   tport_set_params(tp, TPTAG_KEEPALIVE(100), TPTAG_IDLE(500), TAG_END());
 
   TEST(tport_test_run(tt, 5), 1);
-    
+
   TEST_1(!check_msg(tt, tt->tt_rmsg, NULL));
   test_check_md5(tt, tt->tt_rmsg);
   msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
@@ -1177,7 +1177,7 @@
     TEST_S(tport_name(tp)->tpn_ident, "client");
     msg_destroy(msg);
   }
-  
+
   /* Fill up the queue */
   for (i = 1; i < TPORT_QUEUESIZE; i++) {
     snprintf(buffer, sizeof buffer, "cid:sctp-%u", n + i);
@@ -1191,16 +1191,16 @@
   TEST_1(!new_test_msg(tt, &msg, buffer, 1, 1024));
   TEST_1(!tport_tsend(tt->tt_tports, msg, tt->tt_sctp_name, TAG_END()));
   msg_destroy(msg);
-  
+
   TEST(tport_test_run(tt, 5), 1);
-    
+
   TEST_1(!check_msg(tt, tt->tt_rmsg, NULL));
   test_check_md5(tt, tt->tt_rmsg);
   msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
 
   /* This uses a new connection */
   TEST_1(!new_test_msg(tt, &msg, "cid:sctp-new", 1, 1024));
-  TEST_1(tport_tsend(tt->tt_tports, msg, tt->tt_sctp_name, 
+  TEST_1(tport_tsend(tt->tt_tports, msg, tt->tt_sctp_name,
 		     TPTAG_REUSE(0), TAG_END()));
   msg_destroy(msg);
 
@@ -1211,22 +1211,22 @@
     TEST_1(!check_msg(tt, tt->tt_rmsg, NULL));
     msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
   }
-  
+
   /* Try to send a single message */
   TEST_1(!new_test_msg(tt, &msg, "cid:sctp-final", 1, 512));
   TEST_1(tport_tsend(tt->tt_tports, msg, tt->tt_sctp_name, TAG_END()));
   msg_destroy(msg);
-  
+
   TEST(tport_test_run(tt, 10), 1);
-  
+
   TEST_1(!check_msg(tt, tt->tt_rmsg, NULL));
   msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
   }
 
   tport_unref(tp0);
 
-  /* Wait until notifications - 
-     client closes when idle and notifys pending, 
+  /* Wait until notifications -
+     client closes when idle and notifys pending,
      then server closes and notifys pending */
   while (pending_server_close || pending_client_close)
     su_root_step(tt->tt_root, 50);
@@ -1256,7 +1256,7 @@
 
 static int tls_test(tp_test_t *tt)
 {
-  BEGIN(); 
+  BEGIN();
 
 #if HAVE_TLS
   tp_name_t const *dst = tt->tt_tls_name;
@@ -1319,7 +1319,7 @@
 
   /* This uses a new connection */
   TEST_1(!new_test_msg(tt, &msg, "tls-no-reuse", 1, 1024));
-  TEST_1(tp = tport_tsend(tt->tt_tports, msg, dst, 
+  TEST_1(tp = tport_tsend(tt->tt_tports, msg, dst,
 		     TPTAG_REUSE(0), TAG_END()));
   TEST_1(tp != tp0);
   msg_destroy(msg);
@@ -1345,12 +1345,12 @@
 
   tport_decref(&tp0);
 
-  /* Wait until notifications - 
-     client closes when idle and notifys pending, 
+  /* Wait until notifications -
+     client closes when idle and notifys pending,
      then server closes and notifys pending */
   while (pending_server_close || pending_client_close)
     su_root_step(tt->tt_root, 50);
-  
+
 #endif
 
   END();
@@ -1364,7 +1364,7 @@
   su_home_t *home;
   tp_name_t tpn[1] = {{ NULL }};
   struct sigcomp_compartment *cc;
-  
+
   if (tt->tt_udp_comp->tpn_comp) {
     msg_t *msg = NULL;
 
@@ -1372,8 +1372,8 @@
 
     TEST_1(!new_test_msg(tt, &msg, "udp-sigcomp", 1, 1200));
     test_create_md5(tt, msg);
-    TEST_1(tport_tsend(tt->tt_tports, 
-		       msg, 
+    TEST_1(tport_tsend(tt->tt_tports,
+		       msg,
 		       tt->tt_udp_comp,
 		       TPTAG_COMPARTMENT(cc),
 		       TAG_END()));
@@ -1386,25 +1386,25 @@
     test_check_md5(tt, tt->tt_rmsg);
 
     TEST_1(msg = tt->tt_rmsg); tt->tt_rmsg = NULL;
-    
+
     TEST_1(home = msg_home(msg));
-    
+
     TEST_1(tport_convert_addr(home, tpn, "udp", NULL, msg_addr(msg)) == 0);
-    
+
     tpn->tpn_comp = tport_name(tt->tt_rtport)->tpn_comp;
-    
+
     /* reply */
     TEST_1(cc = test_sigcomp_compartment(tt, tt->tt_tports, tpn));
-    TEST_1(tport_tsend(tt->tt_rtport, msg, tpn, 
+    TEST_1(tport_tsend(tt->tt_rtport, msg, tpn,
 		       TPTAG_COMPARTMENT(cc),
 		       TAG_END()) != NULL);
-    
+
     msg_destroy(msg);
-    
+
     TEST(tport_test_run(tt, 5), 1);
 
-    TEST_1(!check_msg(tt, tt->tt_rmsg, NULL)); 
-    test_check_md5(tt, tt->tt_rmsg); 
+    TEST_1(!check_msg(tt, tt->tt_rmsg, NULL));
+    test_check_md5(tt, tt->tt_rmsg);
     msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
   }
 
@@ -1420,9 +1420,9 @@
     tport_log->log_level = 9;
 
     TEST_1(cc = test_sigcomp_compartment(tt, tt->tt_tports, tpn));
-    TEST_1(tp = tport_tsend(tt->tt_tports, 
-			    msg, 
-			    tpn, 
+    TEST_1(tp = tport_tsend(tt->tt_tports,
+			    msg,
+			    tpn,
 			    TPTAG_COMPARTMENT(cc),
 			    TAG_END()));
     TEST_1(tport_incref(tp)); tport_decref(&tp);
@@ -1436,9 +1436,9 @@
 
     TEST_1(!new_test_msg(tt, &msg, "tcp-sigcomp-2", 1, 3000));
     test_create_md5(tt, msg);
-    TEST_1(tp = tport_tsend(tt->tt_tports, 
-			    msg, 
-			    tt->tt_tcp_comp, 
+    TEST_1(tp = tport_tsend(tt->tt_tports,
+			    msg,
+			    tt->tt_tcp_comp,
 			    TPTAG_COMPARTMENT(cc),
 			    TAG_END()));
     TEST_1(tport_incref(tp)); tport_decref(&tp);
@@ -1447,15 +1447,15 @@
     TEST(tport_test_run(tt, 5), 1);
 
     TEST_1(!check_msg(tt, tt->tt_rmsg, "tcp-sigcomp-2"));
-    test_check_md5(tt, tt->tt_rmsg); 
+    test_check_md5(tt, tt->tt_rmsg);
 
     msg_destroy(tt->tt_rmsg), tt->tt_rmsg = NULL;
 
     TEST_1(!new_test_msg(tt, &msg, "tcp-sigcomp-3", 1, 45500));
     test_create_md5(tt, msg);
-    TEST_1(tp = tport_tsend(tt->tt_tports, 
-			    msg, 
-			    tt->tt_tcp_comp, 
+    TEST_1(tp = tport_tsend(tt->tt_tports,
+			    msg,
+			    tt->tt_tcp_comp,
 			    TPTAG_COMPARTMENT(cc),
 			    TAG_END()));
     TEST_1(tport_incref(tp));
@@ -1476,9 +1476,9 @@
 
       TEST_1(!new_test_msg(tt, &msg, "tcp-sigcomp-4", 1, 1000));
       test_create_md5(tt, msg);
-      TEST_1(tp = tport_tsend(tt->tt_tports, 
-			      msg, 
-			      tpn, 
+      TEST_1(tp = tport_tsend(tt->tt_tports,
+			      msg,
+			      tpn,
 			      TPTAG_COMPARTMENT(cc),
 			      TPTAG_FRESH(1),
 			      TAG_END()));
@@ -1486,7 +1486,7 @@
       msg_destroy(msg);
 
       TEST(tport_test_run(tt, 5), 1);
-      
+
       TEST_1(!check_msg(tt, tt->tt_rmsg, "tcp-sigcomp-4"));
       test_check_md5(tt, tt->tt_rmsg);
       TEST_1((msg_addrinfo(tt->tt_rmsg)->ai_flags & TP_AI_COMPRESSED) == 0);
@@ -1496,14 +1496,14 @@
       TEST_1(!new_test_msg(tt, &msg, "tcp-sigcomp-5", 1, 1000));
       test_create_md5(tt, msg);
       {
-	/* Mess with internal data structures in order to 
+	/* Mess with internal data structures in order to
 	   force tport to use SigComp on this connection */
 	tp_name_t *tpn = (tp_name_t *)tport_name(rtp);
 	tpn->tpn_comp = "sigcomp";
       }
-      TEST_1(tp = tport_tsend(rtp, 
-			      msg, 
-			      tt->tt_tcp_comp, 
+      TEST_1(tp = tport_tsend(rtp,
+			      msg,
+			      tt->tt_tcp_comp,
 			      TPTAG_COMPARTMENT(cc),
 			      TAG_END()));
       TEST_1(tport_incref(tp));
@@ -1544,8 +1544,8 @@
 #endif
 
   TEST_1(mr = tport_tcreate(tt, tp_test_class, tt->tt_root, TAG_END()));
-  
-  TEST(tport_tbind(tt->tt_tports, tpn, transports, TPTAG_SERVER(1), 
+
+  TEST(tport_tbind(tt->tt_tports, tpn, transports, TPTAG_SERVER(1),
 		   STUNTAG_SERVER("999.999.999.999"),
 		   TAG_END()), -1);
 
@@ -1587,7 +1587,7 @@
   BEGIN();
 
   lst = tl_list(TSTTAG_HEADER_STR("X: Y"),
-		TAG_SKIP(2), 
+		TAG_SKIP(2),
 		TPTAG_IDENT("foo"),
 		TSTTAG_HEADER_STR("X: Y"),
 		TPTAG_IDENT("bar"),

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_client.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_client.c	Tue Dec 16 13:05:22 2008
@@ -40,7 +40,7 @@
   if (mode < 0)
      return -1;
 
-  if (blocking) 
+  if (blocking)
     mode &= ~(O_NDELAY | O_NONBLOCK);
   else
     mode |= O_NDELAY | O_NONBLOCK;
@@ -66,7 +66,7 @@
       pos += ret;
       printf("%d bytes written\n", ret);
       break;
-    
+
     case SSL_ERROR_WANT_WRITE:
       printf("want write\n");
       break;
@@ -103,7 +103,7 @@
     perror("fopen");
     exit(1);
   }
-  
+
   if (fstat(fileno(fp), &stats) < 0) {
     perror("fstat");
     exit(1);
@@ -140,7 +140,7 @@
 
     while (posBuffer < sizeof(buf)) {
       int bytes;
-      
+
       bytes = read(fileno(fp), buf + posBuffer, sizeof(buf));
 
       if (bytes == 0)
@@ -149,7 +149,7 @@
       if (bytes < 0) {
         perror("read");
       }
-      
+
       else {
         printf("writing %d buffer\n", bytes);
         tls_write_buffer(ctx, buf, bytes);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_server.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_server.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tls_test_server.c	Tue Dec 16 13:05:22 2008
@@ -60,7 +60,7 @@
   if (mode < 0)
      return -1;
 
-  if (blocking) 
+  if (blocking)
     mode &= ~(O_NDELAY | O_NONBLOCK);
   else
     mode |= O_NDELAY | O_NONBLOCK;
@@ -82,7 +82,7 @@
 
   tls_setblocking(sock, 0);
 
-  printf("socket %d registered, ctx = %p, mngr_size = %d, width = %d\n", 
+  printf("socket %d registered, ctx = %p, mngr_size = %d, width = %d\n",
          sock, ctx, mngr_size, width);
 }
 
@@ -119,7 +119,7 @@
       printf("ssl error want read\n");
       return bytes;
       break;
-      
+
     case SSL_ERROR_WANT_WRITE:
       break;
 
@@ -127,7 +127,7 @@
       printf("shutdown\n");
       tls_shutdown(ctx);
       return bytes;
-      
+
     case SSL_ERROR_SYSCALL:
       perror("tls_syscall");
       tls_shutdown(ctx);
@@ -138,7 +138,7 @@
       printf("TLS error code %d\n", err);
       return bytes;
     }
-    
+
     if (tls_pending(ctx)) {
       printf("read pending\n");
     }
@@ -162,7 +162,7 @@
   if (bytes > 0) {
     sprintf(fname, "%s%02d.txt", file_prefix, i);
     fp = fopen(fname, "a");
-  
+
     if (fp == NULL)
       perror("tls_slave_handler fopen");
 
@@ -175,7 +175,7 @@
       fclose(fp);
     }
   }
-  
+
   return 0;
 }
 
@@ -190,7 +190,7 @@
   tls_issues.master_socket = master_socket;
 
   sock = init_tls_slave(tls_issues, tls_mngr[i].ctx, &ctx_slave);
-  
+
   if (sock < 0) {
     perror("init_tls_slave");
     return -1;
@@ -245,13 +245,13 @@
 
   init_event_mngr();
 
-  if (init_tls_master(&master_socket, 
+  if (init_tls_master(&master_socket,
                       tls_issues,
                       &ctx) < 0) {
     printf("init_tls_master failed\n");
     exit (1);
   }
-  
+
   regi_sock(master_socket, ctx, tls_master_handler);
 
   for (;;) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	Tue Dec 16 13:05:22 2008
@@ -108,7 +108,7 @@
 {
   if (a == b)
     return 0;
-  
+
   if (a->tp_addrlen != b->tp_addrlen)
     return (int)(a->tp_addrlen - b->tp_addrlen);
 
@@ -122,7 +122,7 @@
 
 RBTREE_PROTOS(su_inline, tprb, tport_t);
 
-RBTREE_BODIES(su_inline, tprb, tport_t, 
+RBTREE_BODIES(su_inline, tprb, tport_t,
 	      TP_LEFT, TP_RIGHT, TP_PARENT,
 	      TP_IS_RED, TP_SET_RED, TP_IS_BLACK, TP_SET_BLACK, TP_COPY_COLOR,
 	      tp_cmp, TP_INSERT, TP_REMOVE);
@@ -171,25 +171,25 @@
 /** Return true if transport is master. */
 int tport_is_master(tport_t const *self)
 {
-  return 
-    self && 
+  return
+    self &&
     self->tp_master->mr_master == self;
 }
 
 /** Return true if transport is primary. */
 int tport_is_primary(tport_t const *self)
 {
-  return 
-    self && 
+  return
+    self &&
     self->tp_pri->pri_primary == self;
 }
 
 /** Return true if transport is secondary. */
 int tport_is_secondary(tport_t const *self)
 {
-  return 
-    self && 
-    self->tp_master->mr_master != self && 
+  return
+    self &&
+    self->tp_master->mr_master != self &&
     self->tp_pri->pri_primary != self;
 }
 
@@ -204,33 +204,33 @@
 {
   return self && self->tp_addrinfo->ai_socktype == SOCK_STREAM;
 }
- 
+
 /** Test if transport is dgram. */
 int tport_is_dgram(tport_t const *self)
 {
   return self && self->tp_addrinfo->ai_socktype == SOCK_DGRAM;
 }
- 
+
 /** Test if transport is udp. */
 int tport_is_udp(tport_t const *self)
 {
   return self && self->tp_addrinfo->ai_protocol == IPPROTO_UDP;
 }
- 
+
 /** Test if transport is tcp. */
 int tport_is_tcp(tport_t const *self)
 {
   return self && self->tp_addrinfo->ai_protocol == IPPROTO_TCP;
 }
- 
+
 /** Return 1 if transport is reliable, 0 otherwise.
  *
  * (Note that this is part of external API).
  */
 int tport_is_reliable(tport_t const *self)
 {
-  return self != NULL && 
-    (self->tp_addrinfo->ai_socktype == SOCK_STREAM || 
+  return self != NULL &&
+    (self->tp_addrinfo->ai_socktype == SOCK_STREAM ||
      self->tp_addrinfo->ai_socktype == SOCK_SEQPACKET);
 }
 
@@ -248,8 +248,8 @@
 /** Return true if transport supports IPv4 */
 int tport_has_ip4(tport_t const *self)
 {
-  return self && 
-    (self->tp_addrinfo->ai_family == 0 || 
+  return self &&
+    (self->tp_addrinfo->ai_family == 0 ||
      self->tp_addrinfo->ai_family == AF_INET);
 }
 
@@ -258,8 +258,8 @@
 /** Return true if transport supports IPv6 */
 int tport_has_ip6(tport_t const *self)
 {
-  return self && 
-    (self->tp_addrinfo->ai_family == 0 || 
+  return self &&
+    (self->tp_addrinfo->ai_family == 0 ||
      self->tp_addrinfo->ai_family == AF_INET6);
 }
 #endif
@@ -277,7 +277,7 @@
   tport_primary_t *pri;
 
   if (tport_is_master(self)) {
-    for (pri = self->tp_master->mr_primaries; pri; pri = pri->pri_next) 
+    for (pri = self->tp_master->mr_primaries; pri; pri = pri->pri_next)
       if (pri->pri_updating)
 	return 1;
   }
@@ -322,8 +322,8 @@
 int tport_is_clear_to_send(tport_t const *self)
 {
   return
-    tport_is_master(self) || 
-    tport_is_primary(self) || 
+    tport_is_master(self) ||
+    tport_is_primary(self) ||
     (tport_is_secondary(self) &&
      tport_is_registered(self) &&
      self->tp_reusable &&
@@ -352,16 +352,16 @@
 /** Set IP TOS for socket */
 void tport_set_tos(su_socket_t socket, su_addrinfo_t *ai, int tos)
 {
-  if (tos >= 0 && 
-      ai->ai_family == AF_INET && 
+  if (tos >= 0 &&
+      ai->ai_family == AF_INET &&
       setsockopt(socket, IPPROTO_IP, IP_TOS, (const void*)&tos, sizeof(tos)) < 0) {
     SU_DEBUG_3(("tport: setsockopt(IP_TOS): %s\n",
 		su_strerror(su_errno())));
   }
 }
 
-static 
-tport_t *tport_connect(tport_primary_t *pri, su_addrinfo_t *ai, 
+static
+tport_t *tport_connect(tport_primary_t *pri, su_addrinfo_t *ai,
 		       tp_name_t const *tpn);
 
 static int bind6only_check(tport_master_t *mr);
@@ -370,13 +370,13 @@
 int tport_server_addrinfo(tport_master_t *mr,
 			  char const *canon,
 			  int family,
-			  char const *host, 
+			  char const *host,
 			  char const *service,
 			  char const *protocol,
 			  char const * const transports[],
 			  su_addrinfo_t **res);
 
-static int tport_get_local_addrinfo(tport_master_t *mr, 
+static int tport_get_local_addrinfo(tport_master_t *mr,
 				    char const *port,
 				    su_addrinfo_t const *hints,
 				    su_addrinfo_t **return_ai);
@@ -427,7 +427,7 @@
 static tport_primary_t *tport_alloc_primary(tport_master_t *mr,
 					    tport_vtable_t const *vtable,
 					    tp_name_t tpn[1],
-					    su_addrinfo_t *ai, 
+					    su_addrinfo_t *ai,
 					    tagi_t const *tags,
 					    char const **return_culprit);
 
@@ -445,21 +445,21 @@
 
 /* Stack class used when transports are being destroyed */
 static
-void tport_destroy_recv(tp_stack_t *stack, tport_t *tp, 
-			msg_t *msg, tp_magic_t *magic, 
+void tport_destroy_recv(tp_stack_t *stack, tport_t *tp,
+			msg_t *msg, tp_magic_t *magic,
 			su_time_t received)
 {
   msg_destroy(msg);
 }
 
 static
-void tport_destroy_error(tp_stack_t *stack, tport_t *tp, 
+void tport_destroy_error(tp_stack_t *stack, tport_t *tp,
 			 int errcode, char const *remote)
 {
 }
 
 static
-msg_t *tport_destroy_alloc(tp_stack_t *stack, int flags, 
+msg_t *tport_destroy_alloc(tp_stack_t *stack, int flags,
 			   char const data[], usize_t len,
 			   tport_t const *tp,
 			   tp_client_t *tpc)
@@ -473,7 +473,7 @@
 /** Create the master transport.
  *
  * Master transport object is used to bind the protocol using transport with
- * actual transport objects corresponding to TCP, UDP, etc. 
+ * actual transport objects corresponding to TCP, UDP, etc.
  *
  * @sa tport_tbind()
  *
@@ -483,7 +483,7 @@
  */
 tport_t *tport_tcreate(tp_stack_t *stack,
 		       tp_stack_class_t const *tpac,
-		       su_root_t *root, 
+		       su_root_t *root,
 		       tag_type_t tag, tag_value_t value, ...)
 {
   tport_master_t *mr;
@@ -547,7 +547,7 @@
 {
   tport_master_t *mr;
 
-  static tp_stack_class_t tport_destroy_tpac[1] = 
+  static tp_stack_class_t tport_destroy_tpac[1] =
     {{
 	sizeof tport_destroy_tpac,
 	/* tpac_recv */ tport_destroy_recv,
@@ -560,7 +560,7 @@
 
   if (self == NULL)
     return;
-  
+
   assert(tport_is_master(self));
   if (!tport_is_master(self))
     return;
@@ -586,7 +586,7 @@
 
 
 /** Allocate a primary transport */
-static 
+static
 tport_primary_t *tport_alloc_primary(tport_master_t *mr,
 				     tport_vtable_t const *vtable,
 				     tp_name_t tpn[1],
@@ -600,7 +600,7 @@
 
   for (next = &mr->mr_primaries; *next; next = &(*next)->pri_next)
     ;
-  
+
   assert(vtable->vtp_pri_size >= sizeof *pri);
 
   if ((pri = su_home_clone(mr->mr_home, vtable->vtp_pri_size))) {
@@ -625,9 +625,9 @@
 		(void *)pri));
   }
 
-  *next = pri; 
+  *next = pri;
   tp = pri->pri_primary;
-  
+
   if (!tp)
     *return_culprit = "alloc";
   else if (tport_set_params(tp, TAG_NEXT(tags)) < 0)
@@ -635,9 +635,9 @@
   else if (vtable->vtp_init_primary &&
 	   vtable->vtp_init_primary(pri, tpn, ai, tags, return_culprit) < 0)
     ;
-  else if (tport_setname(tp, vtable->vtp_name, ai, tpn->tpn_canon) == -1) 
+  else if (tport_setname(tp, vtable->vtp_name, ai, tpn->tpn_canon) == -1)
     *return_culprit = "tport_setname";
-  else if (tpn->tpn_ident && 
+  else if (tpn->tpn_ident &&
 	   !(tp->tp_name->tpn_ident = su_strdup(tp->tp_home, tpn->tpn_ident)))
     *return_culprit = "alloc ident";
   else
@@ -652,7 +652,7 @@
 
 
 /** Destroy a primary transport and its secondary transports. @internal */
-static 
+static
 void tport_zap_primary(tport_primary_t *pri)
 {
   tport_primary_t **prip;
@@ -695,7 +695,7 @@
 tport_primary_t *tport_listen(tport_master_t *mr,
 			      tport_vtable_t const *vtable,
 			      tp_name_t tpn[1],
-			      su_addrinfo_t *ai, 
+			      su_addrinfo_t *ai,
 			      tagi_t *tags)
 {
   tport_primary_t *pri = NULL;
@@ -739,7 +739,7 @@
       return TPORT_LISTEN_ERROR(su_errno(), "su_wait_create");
 
     /* Register receiving or accepting function with events specified above */
-    index = su_root_register(mr->mr_root, wait, tport_wakeup_pri, tp, 0); 
+    index = su_root_register(mr->mr_root, wait, tport_wakeup_pri, tp, 0);
     if (index == -1) {
       su_wait_destroy(wait);
       return TPORT_LISTEN_ERROR(su_errno(), "su_root_register");
@@ -750,7 +750,7 @@
 
   pri->pri_primary->tp_has_connection = 0;
 
-  SU_DEBUG_5(("%s(%p): %s " TPN_FORMAT "\n", 
+  SU_DEBUG_5(("%s(%p): %s " TPN_FORMAT "\n",
 	      __func__, (void *)pri, "listening at",
 	      TPN_ARGS(pri->pri_primary->tp_name)));
 
@@ -780,13 +780,13 @@
 	(IN6_IS_ADDR_V4MAPPED(&su->su_sin6.sin6_addr) ||
 	 IN6_IS_ADDR_V4COMPAT(&su->su_sin6.sin6_addr))) {
       su_sockaddr_t su0[1];
-      
+
       memcpy(su0, su, sizeof su0);
-      
+
       memset(su, 0, ai->ai_addrlen = sizeof su->su_sin);
       su->su_family = ai->ai_family = AF_INET;
       su->su_port = su0->su_port;
-      
+
 #ifndef IN6_V4MAPPED_TO_INADDR
 #define IN6_V4MAPPED_TO_INADDR(in6, in4) \
       memcpy((in4), 12 + (uint8_t *)(in6), sizeof(struct in_addr))
@@ -823,17 +823,17 @@
 
   if (self->tp_pri->pri_vtable->vtp_set_events)
     return self->tp_pri->pri_vtable->vtp_set_events(self);
-  
+
   SU_DEBUG_7(("tport_set_events(%p): events%s%s%s\n", (void *)self,
 	      (events & SU_WAIT_IN) ? " IN" : "",
 	      (events & SU_WAIT_OUT) ? " OUT" : "",
 	      SU_WAIT_CONNECT != SU_WAIT_OUT &&
 	      (events & SU_WAIT_CONNECT) ? " CONNECT" : ""));
-  
-  return 
-    su_root_eventmask(self->tp_master->mr_root, 
-		      self->tp_index, 
-		      self->tp_socket, 
+
+  return
+    su_root_eventmask(self->tp_master->mr_root,
+		      self->tp_index,
+		      self->tp_socket,
 		      self->tp_events = events);
 }
 
@@ -851,7 +851,7 @@
  *
  * @note The socket is always closed upon error.
  */
-tport_t *tport_alloc_secondary(tport_primary_t *pri, 
+tport_t *tport_alloc_secondary(tport_primary_t *pri,
 			       int socket,
 			       int accepted,
 			       char const **return_reason)
@@ -862,7 +862,7 @@
   self = su_home_clone(mr->mr_home, pri->pri_vtable->vtp_secondary_size);
 
   if (self) {
-    SU_DEBUG_7(("%s(%p): new secondary tport %p\n", 
+    SU_DEBUG_7(("%s(%p): new secondary tport %p\n",
 		__func__, (void *)pri, (void *)self));
 
     self->tp_refs = -1;			/* Freshly allocated  */
@@ -915,7 +915,7 @@
  * @param tpn   canonical name of node
  */
 static
-tport_t *tport_connect(tport_primary_t *pri, 
+tport_t *tport_connect(tport_primary_t *pri,
 		       su_addrinfo_t *ai,
 		       tp_name_t const *tpn)
 {
@@ -996,20 +996,20 @@
 
     /* Bind this socket to same IP address as the primary server socket */
     if (getsockname(server_socket, &susa.su_sa, &susalen) < 0) {
-      SU_DEBUG_3(("%s(%p): getsockname(): %s\n", 
+      SU_DEBUG_3(("%s(%p): getsockname(): %s\n",
 		  __func__, (void *)self, su_strerror(su_errno())));
     }
     else {
       susa.su_port = 0;
       if (bind(s, &susa.su_sa, susalen) < 0) {
-	SU_DEBUG_3(("%s(%p): bind(local-ip): %s\n", 
+	SU_DEBUG_3(("%s(%p): bind(local-ip): %s\n",
 		    __func__, (void *)self, su_strerror(su_errno())));
       }
     }
   }
 
   /* Set sockname for the tport */
-  if (tport_setname(self, tpn->tpn_proto, real_ai, tpn->tpn_canon) == -1) 
+  if (tport_setname(self, tpn->tpn_proto, real_ai, tpn->tpn_canon) == -1)
     TPORT_CONNECT_ERROR(su_errno(), tport_setname);
 
   /* Try to have a non-blocking connect().
@@ -1039,7 +1039,7 @@
   self->tp_index = index;
 
   if (ai == real_ai) {
-    SU_DEBUG_5(("%s(%p): %s to " TPN_FORMAT "\n", 
+    SU_DEBUG_5(("%s(%p): %s to " TPN_FORMAT "\n",
 		__func__, (void *)self, what, TPN_ARGS(self->tp_name)));
   }
   else {
@@ -1078,7 +1078,7 @@
 
   if (self->tp_msg) {
     msg_destroy(self->tp_msg), self->tp_msg = NULL;
-    SU_DEBUG_3(("%s(%p): zapped partially received message\n", 
+    SU_DEBUG_3(("%s(%p): zapped partially received message\n",
 		__func__, (void *)self));
   }
 
@@ -1088,7 +1088,7 @@
       msg_destroy(self->tp_queue[i]), self->tp_queue[i] = NULL;
       n++;
     }
-    SU_DEBUG_3(("%s(%p): zapped %lu queued messages\n", 
+    SU_DEBUG_3(("%s(%p): zapped %lu queued messages\n",
 		__func__, (void *)self, (LU)n));
   }
 
@@ -1132,7 +1132,7 @@
     return;
   if (--tp->tp_refs > 0)
     return;
-  
+
   if (!tport_is_secondary(tp))
     return;
 
@@ -1186,7 +1186,7 @@
   tpp = self->tp_params;
   ta_start(ta, tag, value);
 
-  connect = tpp->tpp_conn_orient 
+  connect = tpp->tpp_conn_orient
     /* Only dgram primary is *not* connection-oriented */
     || !tport_is_primary(self) || !tport_is_dgram(self);
 
@@ -1235,7 +1235,7 @@
   ta_list ta;
   int n, m = 0;
   tport_params_t tpp[1], *tpp0;
-  
+
   usize_t mtu;
   int connect, sdwn_error, reusable, stun_server, pong2ping;
 
@@ -1296,8 +1296,8 @@
   if (mtu > UINT_MAX)
     mtu = UINT_MAX;
   tpp->tpp_mtu = (unsigned)mtu;
-  /* Currently only primary UDP transport can *not* be connection oriented */ 
-  tpp->tpp_conn_orient = connect; 
+  /* Currently only primary UDP transport can *not* be connection oriented */
+  tpp->tpp_conn_orient = connect;
   tpp->tpp_sdwn_error = sdwn_error;
   self->tp_reusable = reusable;
   tpp->tpp_stun_server = stun_server;
@@ -1306,7 +1306,7 @@
   if (memcmp(tpp0, tpp, sizeof tpp) == 0)
     return n;
 
-  if (tport_is_secondary(self) && 
+  if (tport_is_secondary(self) &&
       self->tp_params == self->tp_pri->pri_primary->tp_params) {
     tpp0 = su_zalloc(self->tp_home, sizeof *tpp0); if (!tpp0) return -1;
     self->tp_params = tpp0;
@@ -1376,7 +1376,7 @@
 
 /**Get a vtable for given protocol */
 tport_vtable_t const *tport_vtable_by_name(char const *protoname,
-					   enum tport_via public) 
+					   enum tport_via public)
 {
   int i;
 
@@ -1392,7 +1392,7 @@
 
     assert(vtable->vtp_pri_size >= sizeof (tport_primary_t));
     assert(vtable->vtp_secondary_size >= sizeof (tport_t));
-    
+
     return vtable;
   }
 
@@ -1400,7 +1400,7 @@
 }
 
 #if 0
-tport_set_f const *tport_set_methods[TPORT_NUMBER_OF_TYPES + 1] = 
+tport_set_f const *tport_set_methods[TPORT_NUMBER_OF_TYPES + 1] =
   {
     tport_server_bind_set,
     tport_client_bind_set,
@@ -1414,7 +1414,7 @@
     NULL
   };
 
-int tport_bind_set(tport_master_t *mr, 
+int tport_bind_set(tport_master_t *mr,
 		   tp_name_t const *tpn,
 		   char const * const transports[],
 		   tagi_t const *taglist,
@@ -1461,7 +1461,7 @@
   tp_name_t mytpn[1];
   tport_master_t *mr;
   char const *http_connect = NULL;
-  
+
   if (self == NULL || tport_is_secondary(self) ||
       tpn == NULL || transports == NULL) {
     su_seterrno(EINVAL);
@@ -1486,7 +1486,7 @@
 
   if (http_connect && public == 0)
     public = tport_type_connect;
-    
+
   if (public && public != tport_type_stun)
     server = 0;
 
@@ -1519,7 +1519,7 @@
 
   if (public == tport_type_local)
     public = tport_type_client;
-  
+
   SU_DEBUG_5(("%s(%p) to " TPN_FORMAT "\n",
 	      __func__, (void *)mr, TPN_ARGS(tpn)));
 
@@ -1531,8 +1531,8 @@
   for (i = 0; transports[i]; i++) {
     su_addrinfo_t hints[1];
     char const *proto = transports[i];
-    
-    if (strcmp(proto, tpn->tpn_proto) != 0 && 
+
+    if (strcmp(proto, tpn->tpn_proto) != 0 &&
         strcmp(tpn->tpn_proto, tpn_any) != 0)
       continue;
 
@@ -1582,7 +1582,7 @@
   bind6only_check(mr);
 
   (void)hostname;
-  
+
   SU_DEBUG_5(("%s(%p) to " TPN_FORMAT "\n",
 	      __func__, (void *)mr, TPN_ARGS(tpn)));
 
@@ -1603,7 +1603,7 @@
   if (tpn->tpn_port != NULL && strlen(tpn->tpn_port) > 0 &&
       strcmp(tpn->tpn_port, tpn_any) != 0)
     service = tpn->tpn_port;
-  else 
+  else
     service = "";
 
   if (host && (strcmp(host, "0.0.0.0") == 0 || strcmp(host, "0") == 0))
@@ -1617,7 +1617,7 @@
       (host || tpn->tpn_canon != tpn->tpn_host))
     canon = tpn->tpn_canon;
 
-  if (tport_server_addrinfo(mr, canon, family, 
+  if (tport_server_addrinfo(mr, canon, family,
 			    host, service, tpn->tpn_proto,
 			    transports, &res) < 0)
     return -1;
@@ -1628,9 +1628,9 @@
   port = port0 = port1 = ntohs(((su_sockaddr_t *)res->ai_addr)->su_port);
   error = EPROTONOSUPPORT;
 
-  /* 
-   * Loop until we can bind all the transports requested 
-   * by the transport user to the same port. 
+  /*
+   * Loop until we can bind all the transports requested
+   * by the transport user to the same port.
    */
   for (;;) {
     for (ai = res; ai; ai = ai->ai_next) {
@@ -1651,7 +1651,7 @@
       tpname->tpn_canon = canon;
       tpname->tpn_host = host;
 
-      SU_DEBUG_9(("%s(%p): calling tport_listen for %s\n", 
+      SU_DEBUG_9(("%s(%p): calling tport_listen for %s\n",
 		  __func__, (void *)mr, ai->ai_canonname));
 
       pri = tport_listen(mr, vtable, tpname, ainfo, tags);
@@ -1698,7 +1698,7 @@
     if (port == port1)		/* All ports in use! */
       break;
 
-    SU_DEBUG_3(("%s(%p): cannot bind all transports to port %u, trying %u\n", 
+    SU_DEBUG_3(("%s(%p): cannot bind all transports to port %u, trying %u\n",
 		__func__, (void *)mr, old, port));
   }
 
@@ -1728,20 +1728,20 @@
 
   s4 = su_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
   s6 = su_socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP);
-  
+
   memset(su, 0, sizeof *su);
   su->su_len = sulen = (sizeof su->su_sin6);
   su->su_family = AF_INET6;
-  
+
   memset(su4, 0, sizeof *su4);
   su4->su_len = su4len = (sizeof su->su_sin);
   su4->su_family = AF_INET;
-  
+
   if (bind(s6, &su->su_sa, sulen) < 0)
     ;
   else if (getsockname(s6, &su->su_sa, &sulen) < 0)
     ;
-  else if ((su4->su_port = su->su_port) != 0 && 
+  else if ((su4->su_port = su->su_port) != 0 &&
 	   bind(s4, &su4->su_sa, su4len) == 0)
     retval = 1;
 
@@ -1757,14 +1757,14 @@
 /* Number of supported transports */
 #define TPORT_N (8)
 
-/** Return list of addrinfo structures matching to 
+/** Return list of addrinfo structures matching to
  * canon/host/service/protocol
  */
 static
 int tport_server_addrinfo(tport_master_t *mr,
 			  char const *canon,
 			  int family,
-			  char const *host, 
+			  char const *host,
 			  char const *service,
 			  char const *protocol,
 			  char const * const transports[],
@@ -1775,13 +1775,13 @@
 
   *return_addrinfo = NULL;
 
-  /* 
+  /*
    * Resolve all the transports requested by the protocol
    */
   for (i = 0, N = 0; transports[i] && N < TPORT_N; i++) {
     su_addrinfo_t *ai = &hints[N];
 
-    if (strcasecmp(transports[i], protocol) != 0 && 
+    if (strcasecmp(transports[i], protocol) != 0 &&
 	strcmp(protocol, tpn_any) != 0)
       continue;
 
@@ -1795,7 +1795,7 @@
 
   if (N == 0)
     return su_seterrno(EPROTONOSUPPORT);
-  if (transports[i] /* Too many protocols */) 
+  if (transports[i] /* Too many protocols */)
     return su_seterrno(ENOMEM);
 
   hints[N - 1].ai_next = NULL;
@@ -1803,7 +1803,7 @@
   if (host) {
     int error = tport_getaddrinfo(host, service, hints, return_addrinfo);
     if (error || !*return_addrinfo) {
-      SU_DEBUG_3(("%s(%p): su_getaddrinfo(%s, %s) for %s: %s\n", 
+      SU_DEBUG_3(("%s(%p): su_getaddrinfo(%s, %s) for %s: %s\n",
 		  __func__, (void *)mr,
 		  host ? host : "\"\"", service, protocol,
 		  su_gai_strerror(error)));
@@ -1818,7 +1818,7 @@
 /** Convert localinfo into addrinfo */
 static
 int
-tport_get_local_addrinfo(tport_master_t *mr, 
+tport_get_local_addrinfo(tport_master_t *mr,
 			 char const *port,
 			 su_addrinfo_t const *hints,
 			 su_addrinfo_t **return_ai)
@@ -1855,14 +1855,14 @@
   error = su_getlocalinfo(lihints, &li_result);
   if (error) {
 #if SU_HAVE_IN6
-    SU_DEBUG_3(("%s(%p): su_getlocalinfo() for %s address: %s\n", 
-		__func__, (void *)mr, 
-		family == AF_INET6 ? "ip6" 
+    SU_DEBUG_3(("%s(%p): su_getlocalinfo() for %s address: %s\n",
+		__func__, (void *)mr,
+		family == AF_INET6 ? "ip6"
 		: family == AF_INET ? "ip4" : "ip",
 		su_gli_strerror(error)));
 #else
-    SU_DEBUG_3(("%s(%p): su_getlocalinfo() for %s address: %s\n", 
-		__func__, (void *)mr, 
+    SU_DEBUG_3(("%s(%p): su_getlocalinfo() for %s address: %s\n",
+		__func__, (void *)mr,
 		family == AF_INET ? "ip4" : "ip",
 		su_gli_strerror(error)));
 #endif
@@ -1878,7 +1878,7 @@
       ai = calloc(1, sizeof *ai + li->li_addrlen);
       if (ai == NULL)
 	break;
-    
+
       *prev = ai, prev = &ai->ai_next;
 
       ai->ai_flags = AI_PASSIVE | TP_AI_ANY;
@@ -1886,7 +1886,7 @@
       ai->ai_socktype = h->ai_socktype;
       ai->ai_protocol = h->ai_protocol;
       ai->ai_canonname = h->ai_canonname;
-      ai->ai_addr = memcpy(ai + 1, li->li_addr, 
+      ai->ai_addr = memcpy(ai + 1, li->li_addr,
 			   ai->ai_addrlen = li->li_addrlen);
       su = (void *)ai->ai_addr;
       su->su_port = htons(lport);
@@ -1924,7 +1924,7 @@
   int error = EAI_SOCKTYPE;
   int i, N;
   su_addrinfo_t *all[TPORT_N + 1]; /* Lists for all supported transports */
-  su_addrinfo_t *results[TPORT_N + 1]; 
+  su_addrinfo_t *results[TPORT_N + 1];
   void *addr;
   int addrlen;
 
@@ -1938,7 +1938,7 @@
     error = su_getaddrinfo(node, service, h, &all[N]);
     results[N] = all[N];
     if (error == EAI_SOCKTYPE) {
-      SU_DEBUG_7(("%s(): su_getaddrinfo(%s, %s) for %s: %s\n", 
+      SU_DEBUG_7(("%s(): su_getaddrinfo(%s, %s) for %s: %s\n",
 		  __func__, node ? node : "\"\"", service,
 		  h0->ai_canonname, su_gai_strerror(error)));
       continue;
@@ -1979,22 +1979,22 @@
 
 	if (memcmp(addr, a, addrlen)) /* Different address */
 	  break;
-	
+
 	results[i] = ai0->ai_next;
 
 	ai = calloc(1, sizeof *ai + ai0->ai_addrlen);
-	if (ai == NULL) 
+	if (ai == NULL)
 	  goto error;
 	*prev = memcpy(ai, ai0, sizeof *ai); prev = &ai->ai_next; *prev = NULL;
 	ai->ai_addr = memcpy(ai + 1, ai0->ai_addr, ai0->ai_addrlen);
 	ai->ai_canonname = h0->ai_canonname;
       }
     }
-  }    
+  }
 
   for (i = 0; i < N; i++)
     su_freeaddrinfo(all[i]);
-  
+
   *res = tbf;
   return 0;
 
@@ -2052,8 +2052,8 @@
   return 0;
 }
 
-/** Close a transport. 
- * 
+/** Close a transport.
+ *
  * Close the socket associated with a transport object. Report an error to
  * all pending clients, if required. Set/reset timer, too.
  */
@@ -2097,7 +2097,7 @@
 	msg_ref_destroy(self->tp_queue[i]), self->tp_queue[i] = NULL;
     }
   }
-  
+
   self->tp_index = 0;
   self->tp_events = 0;
 }
@@ -2181,7 +2181,7 @@
     tport_base_timer(self, now);
 }
 
-/** Base timer for secondary transports.  
+/** Base timer for secondary transports.
  *
  * Closes and zaps unused transports.  Sets the timer again.
  */
@@ -2190,8 +2190,8 @@
   unsigned timeout = self->tp_params->tpp_idle;
 
   if (timeout != UINT_MAX) {
-    if (self->tp_refs == 0 && 
-	self->tp_msg == NULL && 
+    if (self->tp_refs == 0 &&
+	self->tp_msg == NULL &&
 	!tport_has_queued(self) &&
 	su_time_cmp(su_time_add(self->tp_rtime, timeout), now) < 0 &&
 	su_time_cmp(su_time_add(self->tp_stime, timeout), now) < 0) {
@@ -2208,7 +2208,7 @@
   tport_set_secondary_timer(self);
 }
 
-/** Set timer for a secondary transport. 
+/** Set timer for a secondary transport.
  *
  * This function should be called after any network activity:
  * tport_base_connect(), tport_send_msg(), tport_send_queue(),
@@ -2239,7 +2239,7 @@
   }
 
   if (self->tp_params->tpp_idle != UINT_MAX) {
-    if (self->tp_refs == 0 && 
+    if (self->tp_refs == 0 &&
 	self->tp_msg == NULL && !tport_has_queued(self)) {
       if (su_time_cmp(self->tp_stime, self->tp_rtime) < 0) {
 	target = su_time_add(self->tp_rtime, self->tp_params->tpp_idle);
@@ -2322,11 +2322,11 @@
     host = "*";
   else if (!SU_SOCKADDR_INADDR_ANY(su))
     host = tport_hostport(buf, sizeof(buf), su, 0);
-  else if (canonlen && su->su_family == AF_INET && 
+  else if (canonlen && su->su_family == AF_INET &&
 	   strspn(canon, "0123456789.") == canonlen)
     host = canon;
 #if SU_HAVE_IN6
-  else if (canonlen && su->su_family == AF_INET6 && 
+  else if (canonlen && su->su_family == AF_INET6 &&
 	   strspn(canon, "0123456789abcdefABCDEF:.") == canonlen)
     host = canon;
 #endif
@@ -2340,7 +2340,7 @@
     strcpy(port, "*");
   else
     snprintf(port, sizeof(port), "%u", ntohs(su->su_port));
-  
+
   name->tpn_proto = protoname;
   name->tpn_host = host;
   name->tpn_canon = canon ? canon : host;
@@ -2359,8 +2359,8 @@
 {
   su_addrinfo_t *selfai = self->tp_addrinfo;
 
-  if (tport_convert_addr(self->tp_home, self->tp_name, 
-			 protoname, canon, 
+  if (tport_convert_addr(self->tp_home, self->tp_name,
+			 protoname, canon,
 			 (su_sockaddr_t *)ai->ai_addr) < 0)
     return -1;
 
@@ -2369,9 +2369,9 @@
 
   selfai->ai_flags = ai->ai_flags & TP_AI_MASK;
 
-  selfai->ai_family = ai->ai_family;     
-  selfai->ai_socktype = ai->ai_socktype; 
-  selfai->ai_protocol = ai->ai_protocol; 
+  selfai->ai_family = ai->ai_family;
+  selfai->ai_socktype = ai->ai_socktype;
+  selfai->ai_protocol = ai->ai_protocol;
   selfai->ai_canonname = (char *)self->tp_name->tpn_canon;
 
   if (ai->ai_addr) {
@@ -2389,10 +2389,10 @@
  *
  * @param hints hints with the protocol number and socktype [OUT]
  * @param proto protocol name [IN]
- * @param flags hint flags      
+ * @param flags hint flags
  */
 static
-int getprotohints(su_addrinfo_t *hints, 
+int getprotohints(su_addrinfo_t *hints,
 		  char const *proto,
 		  int flags)
 {
@@ -2406,7 +2406,7 @@
     proto = "tcp";
 #endif
 
-#if HAVE_SCTP  
+#if HAVE_SCTP
   if (strcasecmp(proto, "sctp") == 0) {
     hints->ai_protocol = IPPROTO_SCTP;
     hints->ai_socktype = SOCK_STREAM;
@@ -2419,7 +2419,7 @@
     hints->ai_socktype = SOCK_DGRAM;
     return 0;
   }
-  
+
   if (strcasecmp(proto, "tcp") == 0) {
     hints->ai_protocol = IPPROTO_TCP;
     hints->ai_socktype = SOCK_STREAM;
@@ -2478,7 +2478,7 @@
   if (li->li_family == AF_INET) {
     if (n >= bufsiz)
       return NULL;
-    
+
     memcpy(buf, li->li_canonname, n + 1);
   }
   else {
@@ -2488,14 +2488,14 @@
     memcpy(buf + 1, li->li_canonname, n);
     buf[0] = '['; buf[++n] = ']'; buf[++n] = '\0';
   }
-      
+
   su_freelocalinfo(li);
-  
+
   return buf;
 }
 
 /** Process errors from transport. */
-void tport_error_report(tport_t *self, int errcode, 
+void tport_error_report(tport_t *self, int errcode,
 			su_sockaddr_t const *addr)
 {
   char const *errmsg;
@@ -2532,10 +2532,10 @@
   }
   else {
     if (tport_is_primary(self))
-      SU_DEBUG_3(("%s(%p): %s (with %s)\n", __func__, (void *)self, 
+      SU_DEBUG_3(("%s(%p): %s (with %s)\n", __func__, (void *)self,
 		  errmsg, self->tp_protoname));
     else
-      SU_DEBUG_3(("%s(%p): %s (with %s/%s:%s)\n", __func__, (void *)self, 
+      SU_DEBUG_3(("%s(%p): %s (with %s/%s:%s)\n", __func__, (void *)self,
 		  errmsg, self->tp_protoname, self->tp_host, self->tp_port));
   }
 
@@ -2545,7 +2545,7 @@
 }
 
 /** Accept a new connection.
- * 
+ *
  * The function tport_accept() accepts a new connection and creates a
  * secondary transport object for the new socket.
  */
@@ -2553,7 +2553,7 @@
 {
   tport_t *self;
   su_addrinfo_t ai[1];
-  su_sockaddr_t su[1]; 
+  su_sockaddr_t su[1];
   socklen_t sulen = sizeof su;
   su_socket_t s = INVALID_SOCKET, l = pri->pri_primary->tp_socket;
   char const *reason = "accept";
@@ -2576,7 +2576,7 @@
 
   ai->ai_addr = &su->su_sa, ai->ai_addrlen = sulen;
 
-  /* Alloc a new transport object, then register socket events with it */ 
+  /* Alloc a new transport object, then register socket events with it */
   self = tport_alloc_secondary(pri, s, 1, &reason);
 
   if (self) {
@@ -2589,7 +2589,7 @@
     SU_CANONIZE_SOCKADDR(su);
 
     if (/* Create wait object with appropriate events. */
-	su_wait_create(wait, s, events) != -1 
+	su_wait_create(wait, s, events) != -1
 	/* Register socket to root */
 	&&
 	(i = su_root_register(root, wait, wakeup, self, 0)) != -1) {
@@ -2600,7 +2600,7 @@
       self->tp_events = events;
 
       if (tport_setname(self, pri->pri_protoname, ai, NULL) != -1) {
-	SU_DEBUG_5(("%s(%p): new connection from " TPN_FORMAT "\n", 
+	SU_DEBUG_5(("%s(%p): new connection from " TPN_FORMAT "\n",
 		    __func__,  (void *)self, TPN_ARGS(self->tp_name)));
 
 	tprb_append(&pri->pri_open, self);
@@ -2654,7 +2654,7 @@
   su_wait_t wait[1] =  { SU_WAIT_INIT };
 
   int error;
-  
+
   SU_DEBUG_7(("tport_connected(%p): events%s%s\n", (void *)self,
 	      events & SU_WAIT_CONNECT ? " CONNECTED" : "",
 	      events & SU_WAIT_ERR ? " ERR" : ""));
@@ -2683,7 +2683,7 @@
   self->tp_events = SU_WAIT_IN | SU_WAIT_ERR | SU_WAIT_HUP;
 
   if (su_wait_create(wait, self->tp_socket, self->tp_events) == -1 ||
-      (self->tp_index = su_root_register(mr->mr_root, 
+      (self->tp_index = su_root_register(mr->mr_root,
 					 wait, tport_wakeup, self, 0))
       == -1) {
     tport_close(self);
@@ -2709,10 +2709,10 @@
   assert(w->fd == self->tp_socket);
 #endif
 
-  SU_DEBUG_7(("%s(%p): events%s%s%s%s%s%s\n", 
+  SU_DEBUG_7(("%s(%p): events%s%s%s%s%s%s\n",
 	      "tport_wakeup_pri", (void *)self,
 	      events & SU_WAIT_IN ? " IN" : "",
-	      SU_WAIT_ACCEPT != SU_WAIT_IN && 
+	      SU_WAIT_ACCEPT != SU_WAIT_IN &&
 	      (events & SU_WAIT_ACCEPT) ? " ACCEPT" : "",
 	      events & SU_WAIT_OUT ? " OUT" : "",
 	      events & SU_WAIT_HUP ? " HUP" : "",
@@ -2735,7 +2735,7 @@
   assert(w->fd == self->tp_socket);
 #endif
 
-  SU_DEBUG_7(("%s(%p): events%s%s%s%s%s\n", 
+  SU_DEBUG_7(("%s(%p): events%s%s%s%s%s\n",
 	      "tport_wakeup", (void *)self,
 	      events & SU_WAIT_IN ? " IN" : "",
 	      events & SU_WAIT_OUT ? " OUT" : "",
@@ -2761,7 +2761,7 @@
 
   if ((events & SU_WAIT_IN) && !self->tp_closed)
     tport_recv_event(self);
-  
+
   if ((events & SU_WAIT_HUP) && !self->tp_closed)
     tport_hup_event(self);
 
@@ -2813,7 +2813,7 @@
 /** Receive data available on the socket.
  *
  * @retval -1 error
- * @retval 0  end-of-stream  
+ * @retval 0  end-of-stream
  * @retval 1  normal receive
  * @retval 2  incomplete recv, recv again
  * @retval 3  STUN keepalive, ignore
@@ -2830,7 +2830,7 @@
 void tport_recv_event(tport_t *self)
 {
   int again;
-  
+
   SU_DEBUG_7(("%s(%p)\n", "tport_recv_event", (void *)self));
 
   do {
@@ -2850,16 +2850,16 @@
       if (!su_is_blocking(error)) {
 	tport_error_report(self, error, NULL);
 	return;
-      } 
+      }
       else {
-	SU_DEBUG_3(("%s: recvfrom(): %s (%d)\n", __func__, 
+	SU_DEBUG_3(("%s: recvfrom(): %s (%d)\n", __func__,
 		    su_strerror(EAGAIN), EAGAIN));
       }
     }
 
     if (again >= 0)
       tport_parse(self, !again, self->tp_rtime);
-  } 
+  }
   while (again > 1);
 
   if (!tport_is_secondary(self))
@@ -2876,8 +2876,8 @@
   tport_set_secondary_timer(self);
 }
 
-/* 
- * Parse the data and feed complete messages to the stack 
+/*
+ * Parse the data and feed complete messages to the stack
  */
 static void tport_parse(tport_t *self, int complete, su_time_t now)
 {
@@ -2896,17 +2896,17 @@
 	tport_sigcomp_accept_incomplete(self, msg);
 	break;
       }
-    } 
+    }
 
     if (msg_get_flags(msg, MSG_FLG_TOOLARGE))
       SU_DEBUG_3(("%s(%p): too large message from " TPN_FORMAT "\n",
 		  __func__, (void *)self, TPN_ARGS(self->tp_name)));
 
     /* Do not try to read anymore from this connection? */
-    if (tport_is_stream(self) && 
+    if (tport_is_stream(self) &&
 	msg_get_flags(msg, MSG_FLG_TOOLARGE | MSG_FLG_ERROR))
       self->tp_recv_close = stall = 1;
-    
+
     if (n == -1)
       next = NULL;
     else if (streaming)
@@ -2927,7 +2927,7 @@
 
   if (self->tp_rlogged != msg)
     self->tp_rlogged = NULL;
-  
+
   self->tp_msg = msg;
 }
 
@@ -2968,7 +2968,7 @@
 #endif
 
     d->d_from->tpn_canon = ipaddr;
-    d->d_from->tpn_host = ipaddr;    
+    d->d_from->tpn_host = ipaddr;
   }
 
   d->d_comp = sc;
@@ -2987,7 +2987,7 @@
   }
 
   SU_DEBUG_7(("%s(%p): %smsg %p ("MOD_ZU" bytes)"
-	      " from " TPN_FORMAT " next=%p\n", 
+	      " from " TPN_FORMAT " next=%p\n",
 	      __func__, (void *)self, error ? "bad " : "",
 	      (void *)msg, (size_t)msg_size(msg),
 	      TPN_ARGS(d->d_from), (void *)next));
@@ -3028,7 +3028,7 @@
 {
   if (name == NULL)
     return -1;
-  
+
   if (tp == NULL || msg == NULL || msg != tp->tp_master->mr_delivery->d_msg) {
     memset(name, 0, sizeof *name);
     return -1;
@@ -3054,12 +3054,12 @@
 }
 
 /** Allocate message for N bytes,
- *  return message buffer as a iovec 
+ *  return message buffer as a iovec
  */
-ssize_t tport_recv_iovec(tport_t const *self, 
+ssize_t tport_recv_iovec(tport_t const *self,
 			 msg_t **in_out_msg,
 			 msg_iovec_t iovec[msg_n_fragments],
-			 size_t N, 
+			 size_t N,
 			 int exact)
 {
   msg_t *msg = *in_out_msg;
@@ -3072,13 +3072,13 @@
   fresh = !msg;
 
   /*
-   * Allocate a new message if needed 
+   * Allocate a new message if needed
    */
   if (!msg) {
     if (!(*in_out_msg = msg = tport_msg_alloc(self, N))) {
       SU_DEBUG_7(("%s(%p): cannot allocate msg for "MOD_ZU" bytes "
-		  "from (%s/%s:%s)\n", 
-		  __func__, (void *)self, N, 
+		  "from (%s/%s:%s)\n",
+		  __func__, (void *)self, N,
 		  self->tp_protoname, self->tp_host, self->tp_port));
       return -1;
     }
@@ -3096,8 +3096,8 @@
   if (veclen < 0) {
     int err = su_errno();
     SU_DEBUG_7(("%s(%p): cannot get msg %p buffer for "MOD_ZU" bytes "
-		"from (%s/%s:%s): %s\n", 
-		__func__, (void *)self, (void *)msg, N, 
+		"from (%s/%s:%s): %s\n",
+		__func__, (void *)self, (void *)msg, N,
 		self->tp_protoname, self->tp_host, self->tp_port,
 		su_strerror(err)));
     su_seterrno(err);
@@ -3108,8 +3108,8 @@
 
   SU_DEBUG_7(("%s(%p) msg %p from (%s/%s:%s) has "MOD_ZU" bytes, "
 	      "veclen = "MOD_ZD"\n",
-              __func__, (void *)self, 
-	      (void *)msg, self->tp_protoname, self->tp_host, self->tp_port, 
+              __func__, (void *)self,
+	      (void *)msg, self->tp_protoname, self->tp_host, self->tp_port,
 	      N, veclen));
 
   for (i = 0; veclen > 1 && i < veclen; i++) {
@@ -3130,20 +3130,20 @@
   return -1;
 }
 
-/** Send a message. 
+/** Send a message.
  *
  * The function tport_tsend() sends a message using the transport @a self.
  *
  * @TAGS
- * TPTAG_MTU(), TPTAG_REUSE(), TPTAG_CLOSE_AFTER(), TPTAG_SDWN_AFTER(), 
+ * TPTAG_MTU(), TPTAG_REUSE(), TPTAG_CLOSE_AFTER(), TPTAG_SDWN_AFTER(),
  * TPTAG_FRESH(), TPTAG_COMPARTMENT().
  */
-tport_t *tport_tsend(tport_t *self, 
-		     msg_t *msg, 
-		     tp_name_t const *_tpn, 
+tport_t *tport_tsend(tport_t *self,
+		     msg_t *msg,
+		     tp_name_t const *_tpn,
 		     tag_type_t tag, tag_value_t value, ...)
 {
-  ta_list ta; 
+  ta_list ta;
   tagi_t const *t;
   int reuse, sdwn_after, close_after, resolved = 0, fresh;
   unsigned mtu;
@@ -3160,7 +3160,7 @@
   }
 
   *tpn = *_tpn;
-  
+
   SU_DEBUG_7(("tport_tsend(%p) tpn = " TPN_FORMAT "\n",
 	      (void *)self, TPN_ARGS(tpn)));
 
@@ -3186,8 +3186,8 @@
 
   /* 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 (tptag_reuse == tt)
       reuse = t->t_value != 0;
     else if (tptag_mtu == tt)
@@ -3200,7 +3200,7 @@
       fresh = t->t_value != 0;
     else if (tptag_compartment == tt)
       cc = (struct sigcomp_compartment *)t->t_value;
-  }    
+  }
 
   ta_end(ta);
 
@@ -3213,9 +3213,9 @@
   tpn->tpn_comp = tport_canonize_comp(tpn->tpn_comp);
   if (tpn->tpn_comp) {
     ai->ai_flags |= TP_AI_COMPRESSED;
-    SU_DEBUG_9(("%s: compressed msg(%p) with %s\n", 
+    SU_DEBUG_9(("%s: compressed msg(%p) with %s\n",
 		__func__, (void *)msg, tpn->tpn_comp));
-  } 
+  }
 
   if (!tpn->tpn_comp || cc == NONE)
     cc = NULL;
@@ -3233,8 +3233,8 @@
     self = self;
   }
   /*
-   * Try to find an already open connection to the destination, 
-   * or get a primary protocol 
+   * Try to find an already open connection to the destination,
+   * or get a primary protocol
    */
   else {
     /* If primary, resolve the destination address, store it in the msg */
@@ -3242,7 +3242,7 @@
       return NULL;
     }
     resolved = 1;
-    
+
     self = tport_by_addrinfo(primary, msg_addrinfo(msg), tpn);
 
     if (!self)
@@ -3258,7 +3258,7 @@
     if (tport_is_connection_oriented(self)
 	|| self->tp_params->tpp_conn_orient) {
 #if 0 && HAVE_UPNP /* We do not want to use UPnP with secondary transports! */
-      if (upnp_register_upnp_client(1) != 0) { 
+      if (upnp_register_upnp_client(1) != 0) {
 	upnp_check_for_nat();
       }
 #endif
@@ -3300,15 +3300,15 @@
   }
 
   if (self->tp_pri->pri_vtable->vtp_prepare
-      ? self->tp_pri->pri_vtable->vtp_prepare(self, msg, tpn, cc, mtu) < 0 
+      ? self->tp_pri->pri_vtable->vtp_prepare(self, msg, tpn, cc, mtu) < 0
       : tport_prepare_and_send(self, msg, tpn, cc, mtu) < 0)
     return NULL;
   else
     return self;
 }
 
-int tport_prepare_and_send(tport_t *self, msg_t *msg, 
-			   tp_name_t const *tpn, 
+int tport_prepare_and_send(tport_t *self, msg_t *msg,
+			   tp_name_t const *tpn,
 			   struct sigcomp_compartment *cc,
 			   unsigned mtu)
 {
@@ -3326,7 +3326,7 @@
   }
 
   /*
-   * If there is already an queued message, 
+   * If there is already an queued message,
    * put this message straight in the queue
    */
   if ((self->tp_queue && self->tp_queue[self->tp_qhead]) ||
@@ -3338,7 +3338,7 @@
     }
     return 0;
   }
-  
+
   retval = tport_send_msg(self, msg, tpn, cc);
 
   tport_set_secondary_timer(self);
@@ -3352,8 +3352,8 @@
  * @retval 0 when succesful
  * @retval -1 upon an error
  */
-int tport_send_msg(tport_t *self, msg_t *msg, 
-		   tp_name_t const *tpn, 
+int tport_send_msg(tport_t *self, msg_t *msg,
+		   tp_name_t const *tpn,
 		   struct sigcomp_compartment *cc)
 {
   msg_iovec_t *iov, auto_iov[40];
@@ -3364,7 +3364,7 @@
   su_time_t now;
   su_addrinfo_t *ai;
 
-  assert(self->tp_queue == NULL || 
+  assert(self->tp_queue == NULL ||
 	 self->tp_queue[self->tp_qhead] == NULL ||
 	 self->tp_queue[self->tp_qhead] == msg);
 
@@ -3378,7 +3378,7 @@
   /* Get a iovec for message contents */
   for (;;) {
     iovused = msg_iovec(msg, iov, iovlen);
-    if (iovused <= iovlen) 
+    if (iovused <= iovlen)
       break;
 
     iov = su_realloc(self->tp_home, self->tp_iov, sizeof(*iov) * iovused);
@@ -3387,7 +3387,7 @@
       msg_set_errno(msg, errno);
       return -1;
     }
-    
+
     self->tp_iov = iov, self->tp_iovlen = iovlen = iovused;
   }
 
@@ -3404,7 +3404,7 @@
   n = (size_t)nerror;
 
   self->tp_unsent = NULL, self->tp_unsentlen = 0;
-  
+
   if (n > 0 && self->tp_master->mr_log && self->tp_slogged != msg) {
     tport_log_msg(self, msg, "send", "to", now);
     self->tp_slogged = msg;
@@ -3422,8 +3422,8 @@
       }
       else {
 	char const *comp = tpn->tpn_comp;
-	
-	SU_DEBUG_1(("%s(%p): send truncated for %s/%s:%s%s%s\n", 
+
+	SU_DEBUG_1(("%s(%p): send truncated for %s/%s:%s%s%s\n",
 		    "tport_vsend", (void *)self, tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port,
 		    comp ? ";comp=" : "", comp ? comp : ""));
 
@@ -3448,18 +3448,18 @@
 
   if (close_after || sdwn_after)
     tport_shutdown0(self, close_after ? 2 : 1);
-  
+
   return 0;
 }
 
-static 
-ssize_t tport_vsend(tport_t *self, 
-		    msg_t *msg, 
+static
+ssize_t tport_vsend(tport_t *self,
+		    msg_t *msg,
 		    tp_name_t const *tpn,
-		    msg_iovec_t iov[], 
+		    msg_iovec_t iov[],
 		    size_t iovused,
 		    struct sigcomp_compartment *cc)
-{ 
+{
   ssize_t n;
   su_addrinfo_t *ai = msg_addrinfo(msg);
 
@@ -3474,14 +3474,14 @@
   if (n == 0)
     return 0;
 
-  if (n == -1) 
+  if (n == -1)
     return tport_send_error(self, msg, tpn, "tport_vsend");
 
   tport_sent_bytes(self, n, n);	/* Sigcomp will decrease on_line accodingly */
 
   if (n > 0 && self->tp_master->mr_dump_file)
     tport_dump_iovec(self, msg, n, iov, iovused, "sent", "to");
-    
+
   if (tport_log->log_level >= 7) {
     size_t i, m = 0;
 
@@ -3513,8 +3513,8 @@
   if (su_is_blocking(error)) {
     su_addrinfo_t *ai = msg_addrinfo(msg);
     char const *comp = (ai->ai_flags & TP_AI_COMPRESSED) ? ";comp=sigcomp" : "";
-    SU_DEBUG_5(("%s(%p): %s with (s=%d %s/%s:%s%s)\n", 
-		who, (void *)self, "EAGAIN", (int)self->tp_socket, 
+    SU_DEBUG_5(("%s(%p): %s with (s=%d %s/%s:%s%s)\n",
+		who, (void *)self, "EAGAIN", (int)self->tp_socket,
 		tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port, comp));
     return 0;
   }
@@ -3532,10 +3532,10 @@
   char const *comp = (ai->ai_flags & TP_AI_COMPRESSED) ? ";comp=sigcomp" : "";
 
   int error = msg_errno(msg);
-  
+
   if (self->tp_addrinfo->ai_family == AF_INET) {
-    SU_DEBUG_3(("%s(%p): %s with (s=%d %s/%s:%s%s)\n", 
-		who, (void *)self, su_strerror(error), (int)self->tp_socket, 
+    SU_DEBUG_3(("%s(%p): %s with (s=%d %s/%s:%s%s)\n",
+		who, (void *)self, su_strerror(error), (int)self->tp_socket,
 		tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port, comp));
   }
 #if SU_HAVE_IN6
@@ -3543,21 +3543,21 @@
     su_sockaddr_t const *su = (su_sockaddr_t const *)ai->ai_addr;
     SU_DEBUG_3(("%s(%p): %s with (s=%d, IP6=%s/%s:%s%s"
 		" (scope=%i) addrlen=%u)\n",
-		who, (void *)self, su_strerror(error), (int)self->tp_socket, 
+		who, (void *)self, su_strerror(error), (int)self->tp_socket,
 		tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port, comp,
 		su->su_scope_id, (unsigned)ai->ai_addrlen));
   }
 #endif
   else {
-    SU_DEBUG_3(("%s(%p): %s with (s=%d, AF=%u addrlen=%u)%s\n", 
-		who, (void *)self, su_strerror(error), 
+    SU_DEBUG_3(("%s(%p): %s with (s=%d, AF=%u addrlen=%u)%s\n",
+		who, (void *)self, su_strerror(error),
 		(int)self->tp_socket, ai->ai_family, (unsigned)ai->ai_addrlen, comp));
   }
 
 #if 0
   int i;
   for (i = 0; i < iovused; i++)
-    SU_DEBUG_7(("\t\tiov[%d] = { %d bytes @ %p }\n", 
+    SU_DEBUG_7(("\t\tiov[%d] = { %d bytes @ %p }\n",
 		i, iov[i].siv_len, (void *)iov[i].siv_base));
 #endif
 
@@ -3572,16 +3572,16 @@
 
 
 static
-int tport_queue_rest(tport_t *self, 
-		     msg_t *msg, 
-		     msg_iovec_t iov[], 
+int tport_queue_rest(tport_t *self,
+		     msg_t *msg,
+		     msg_iovec_t iov[],
 		     size_t iovused)
 {
   size_t iovlen = self->tp_iovlen;
 
   assert(tport_is_connection_oriented(self));
-  assert(self->tp_queue == NULL || 
-	 self->tp_queue[self->tp_qhead] == NULL || 
+  assert(self->tp_queue == NULL ||
+	 self->tp_queue[self->tp_qhead] == NULL ||
 	 self->tp_queue[self->tp_qhead] == msg);
 
   if (tport_queue(self, msg) < 0)
@@ -3618,19 +3618,19 @@
   return 0;
 }
 
-/** Queue a message to transport. 
+/** Queue a message to transport.
  *
  * The tport_tqueue() function queues a message in the send queue. It is
  * used by an (server) application that is required to send (response)
  * messages in certain order. For example, a HTTP server or proxy may
  * receive multiple requests from a single TCP connection. The server is
- * required to answer to the requests in same order as they are received. 
+ * required to answer to the requests in same order as they are received.
  * The responses are, however, sometimes generated asynchronously, that is,
  * a response to a later request may be ready earlier. For that purpose, the
  * HTTP protocol stack queues an empty response message immediately upon
  * receiving a request. Other messages cannot be sent before the queued one.
  *
- * The function tport_tqsend() is used to send the completed response message. 
+ * The function tport_tqsend() is used to send the completed response message.
  *
  * @param self pointer to transport object
  * @param msg  message to be inserted into queue
@@ -3651,7 +3651,7 @@
  *
  * @sa tport_tqsend()
  */
-int tport_tqueue(tport_t *self, msg_t *msg, 
+int tport_tqueue(tport_t *self, msg_t *msg,
 		 tag_type_t tag, tag_value_t value, ...)
 {
   msg_unprepare(msg);
@@ -3679,8 +3679,8 @@
 {
   unsigned short qhead = self->tp_qhead;
   unsigned short N = self->tp_params->tpp_qsize;
-  
-  SU_DEBUG_7(("tport_queue(%p): queueing %p for %s/%s:%s\n", 
+
+  SU_DEBUG_7(("tport_queue(%p): queueing %p for %s/%s:%s\n",
 	      (void *)self, (void *)msg,
 	      self->tp_protoname, self->tp_host, self->tp_port));
 
@@ -3711,8 +3711,8 @@
 }
 
 /** Send a queued message (and queue another, if required).
- * 
- * The function tport_tqsend() sends a message to the transport. 
+ *
+ * The function tport_tqsend() sends a message to the transport.
  *
  * @deprecated Alternative interface will be provided in near future.
  */
@@ -3787,7 +3787,7 @@
       msg_destroy(self->tp_queue[qhead]);
       if ((self->tp_queue[qhead] = msg_ref_create(next)))
 	msg_unprepare(next);
-      return 0; 
+      return 0;
     }
   }
 
@@ -3808,7 +3808,7 @@
     qhead = (qhead + 1) % N;
     next = self->tp_queue[qhead]; self->tp_queue[qhead] = msg; msg = next;
     /* Above we made sure that there is an empty slot */
-    assert(!next || qhead != self->tp_qhead); 
+    assert(!next || qhead != self->tp_qhead);
   } while (next);
 
   return 0;
@@ -3817,12 +3817,12 @@
 /** Send event.
  *
  * Process SU_WAIT_OUT event.
- */ 
+ */
 void tport_send_event(tport_t *self)
 {
   assert(tport_is_connection_oriented(self));
-  
-  SU_DEBUG_7(("tport_send_event(%p) - ready to send to (%s/%s:%s)\n", 
+
+  SU_DEBUG_7(("tport_send_event(%p) - ready to send to (%s/%s:%s)\n",
 	      (void *)self, self->tp_protoname, self->tp_host, self->tp_port));
   tport_send_queue(self);
   tport_set_secondary_timer(self);
@@ -3859,7 +3859,7 @@
       tport_log_msg(self, msg, "send", "to", self->tp_stime);
       self->tp_slogged = msg;
     }
-    
+
     for (i = 0, total = 0; i < iovused; i++) {
       if (total + (size_t)iov[i].mv_len > n) {
 	iov[i].mv_len -= (su_ioveclen_t)(n - total);
@@ -3875,7 +3875,7 @@
     assert(total == n);
 
     /* We have sent a complete message */
-    
+
     self->tp_queue[qhead] = NULL;
     tport_sent_message(self, msg, 0);
     msg_destroy(msg);
@@ -3885,7 +3885,7 @@
 
   while (msg_is_prepared(msg = self->tp_queue[self->tp_qhead = qhead])) {
     /* XXX - what about errors? */
-    tport_send_msg(self, msg, self->tp_name, NULL); 
+    tport_send_msg(self, msg, self->tp_name, NULL);
     if (self->tp_unsent)
       return;
 
@@ -3917,7 +3917,7 @@
   if (host_is_ip_address(tpn->tpn_host))
     hints->ai_flags |= AI_NUMERICHOST;
 #endif
-  
+
   if (tpn->tpn_host[0] == '[') {
     /* Remove [] around IPv6 address */
     char *end;
@@ -3934,7 +3934,7 @@
       return -1;
     }
   }
-  else 
+  else
     host = tpn->tpn_host;
 
   if ((error = su_getaddrinfo(host, tpn->tpn_port, hints, &res))) {
@@ -3950,13 +3950,13 @@
   su = (su_sockaddr_t *) msg_addrinfo(msg)->ai_addr;
 
 #if SU_HAVE_IN6
-  SU_DEBUG_9(("tport_resolve addrinfo = %s%s%s:%d\n", 
+  SU_DEBUG_9(("tport_resolve addrinfo = %s%s%s:%d\n",
 	      su->su_family == AF_INET6 ? "[" : "",
               su_inet_ntop(su->su_family, SU_ADDR(su), ipaddr, sizeof(ipaddr)),
 	      su->su_family == AF_INET6 ? "]" : "",
               htons(su->su_port)));
 #else
-  SU_DEBUG_9(("tport_resolve addrinfo = %s%s%s:%d\n", 
+  SU_DEBUG_9(("tport_resolve addrinfo = %s%s%s:%d\n",
 	      "",
               su_inet_ntop(su->su_family, SU_ADDR(su), ipaddr, sizeof(ipaddr)),
 	      "",
@@ -4003,7 +4003,7 @@
   }
 
   msg_set_errno(msg, EAFNOSUPPORT);
-   
+
   return -1;
 }
 
@@ -4021,7 +4021,7 @@
   mai->ai_flags = flags;
 }
 
-/** Process error event. 
+/** Process error event.
  *
  * Return events that can be processed afterwards.
  */
@@ -4052,9 +4052,9 @@
  *
  * @return Positive integer, or -1 upon an error.
  */
-int tport_pend(tport_t *self, 
-	       msg_t *msg, 
-	       tport_pending_error_f *callback, 
+int tport_pend(tport_t *self,
+	       msg_t *msg,
+	       tport_pending_error_f *callback,
 	       tp_client_t *client)
 {
   tport_pending_t *pending;
@@ -4065,8 +4065,8 @@
   if (msg == NULL && tport_is_primary(self))
     return -1;
 
-  SU_DEBUG_7(("tport_pend(%p): pending %p for %s/%s:%s (already %u)\n", 
-	      (void *)self, (void *)msg, 
+  SU_DEBUG_7(("tport_pend(%p): pending %p for %s/%s:%s (already %u)\n",
+	      (void *)self, (void *)msg,
 	      self->tp_protoname, self->tp_host, self->tp_port,
 	      self->tp_pused));
 
@@ -4074,7 +4074,7 @@
     unsigned i, len = 8;
     if (self->tp_plen)
       len = 2 * self->tp_plen;
-    pending = su_realloc(self->tp_home, 
+    pending = su_realloc(self->tp_home,
 			 self->tp_pending, len * sizeof(*pending));
     if (!pending) {
       msg_set_errno(msg, errno);
@@ -4085,7 +4085,7 @@
 
     for (i = self->tp_plen; i + 1 < len; i++)
       pending[i].p_client = pending + i + 1;
-      
+
     self->tp_released = pending + self->tp_plen;
     self->tp_pending = pending;
     self->tp_plen = len;
@@ -4105,11 +4105,11 @@
 }
 
 /** Mark message as no more pending */
-int tport_release(tport_t *self, 
+int tport_release(tport_t *self,
 		  int pendd,
-		  msg_t *msg, 
-		  msg_t *reply, 
-		  tp_client_t *client, 
+		  msg_t *msg,
+		  msg_t *reply,
+		  tp_client_t *client,
 		  int still_pending)
 {
   tport_pending_t *pending;
@@ -4119,14 +4119,14 @@
 
   pending = self->tp_pending + (pendd - 1);
 
-  if (pending->p_client != client || 
+  if (pending->p_client != client ||
       pending->p_msg != msg) {
 	  SU_DEBUG_1(("%s(%p): %u %p by %p not pending\n",
-		      __func__, (void *)self, 
+		      __func__, (void *)self,
 		      pendd, (void *)msg, (void *)client));
     return su_seterrno(EINVAL), -1;
   }
-  
+
   SU_DEBUG_7(("%s(%p): %p by %p with %p%s\n",
 	      __func__, (void *)self,
 	      (void *)msg, (void *)client, (void *)reply,
@@ -4136,7 +4136,7 @@
 
   if (still_pending)
     return 0;
-	    
+
   /* Just to make sure nobody uses stale data */
   memset(pending, 0, sizeof(*pending));
   pending->p_client = self->tp_released;
@@ -4213,11 +4213,11 @@
   for (i = 0; i < self->tp_plen; i++) {
     pending = self->tp_pending + i;
 
-    if (!pending->p_client || 
+    if (!pending->p_client ||
 	pending->p_msg != msg ||
 	pending->p_reported == reported)
       continue;
-    
+
     pending->p_reported = reported;
 
     pending->p_callback(self->TP_STACK, pending->p_client, self, msg, error);
@@ -4299,14 +4299,14 @@
   return self->tp_name;
 }
 
-/** Get transport identifier. */ 
+/** Get transport identifier. */
 char const *tport_ident(tport_t const *self)
 {
   return self ? self->tp_ident : NULL;
 }
 
 /** Get transport by protocol name. */
-tport_t *tport_by_protocol(tport_t const *self, char const *proto) 
+tport_t *tport_by_protocol(tport_t const *self, char const *proto)
 {
   if (proto && strcmp(proto, tpn_any) != 0) {
     for (; self; self = tport_next(self))
@@ -4340,7 +4340,7 @@
 #endif
   else if (host_is_ip4_address(tpn->tpn_host))
     family = AF_INET;
-  else 
+  else
     family = 0;
 
   if (proto && strcmp(proto, tpn_any) == 0)
@@ -4366,7 +4366,7 @@
     }
     if (proto && strcasecmp(proto, tp->tp_protoname))
       continue;
-    
+
     if (comp && comp != tp->tp_name->tpn_comp) {
       if (tp->tp_name->tpn_comp == NULL && nocomp == NULL)
 	nocomp = self;
@@ -4436,7 +4436,7 @@
     }
 
     su->su_port = htons(strtoul(port, NULL, 10));
-    
+
     if (su_inet_pton(su->su_family, host, SU_ADDR(su)) > 0) {
       resolved = 1;
       next = NULL;
@@ -4511,7 +4511,7 @@
 }
 
 /** Get transport from primary by addrinfo. */
-tport_t *tport_by_addrinfo(tport_primary_t const *pri, 
+tport_t *tport_by_addrinfo(tport_primary_t const *pri,
 			   su_addrinfo_t const *ai,
 			   tp_name_t const *tpn)
 {
@@ -4530,7 +4530,7 @@
 
   /* Find leftmost (prevmost) matching tport */
   while (sub) {
-    cmp = (int)(sub->tp_addrlen - ai->ai_addrlen); 
+    cmp = (int)(sub->tp_addrlen - ai->ai_addrlen);
     if (cmp == 0)
       cmp = memcmp(sub->tp_addr, sa, ai->ai_addrlen);
 
@@ -4566,8 +4566,8 @@
 
     if (comp != sub->tp_name->tpn_comp)
       continue;
-    
-    if (sub->tp_addrlen != ai->ai_addrlen 
+
+    if (sub->tp_addrlen != ai->ai_addrlen
 	|| memcmp(sub->tp_addr, sa, ai->ai_addrlen)) {
       sub = NULL;
       break;
@@ -4587,7 +4587,7 @@
 
 
 /** Get transport name from URL. */
-int tport_name_by_url(su_home_t *home, 
+int tport_name_by_url(su_home_t *home,
 		      tp_name_t *tpn,
 		      url_string_t const *us)
 {
@@ -4652,7 +4652,7 @@
  * @retval 0 when successful
  * @retval -1 upon an error
  */
-int tport_name_dup(su_home_t *home, 
+int tport_name_dup(su_home_t *home,
 		   tp_name_t *dst,
 		   tp_name_t const *src)
 {
@@ -4662,7 +4662,7 @@
   if (!src->tpn_proto || !src->tpn_host || !src->tpn_port || !src->tpn_canon)
     return -1;
 
-  if (strcmp(src->tpn_proto, tpn_any)) 
+  if (strcmp(src->tpn_proto, tpn_any))
     n_proto = strlen(src->tpn_proto) + 1;
   else
     n_proto = 0;
@@ -4701,12 +4701,12 @@
     dst->tpn_comp = memcpy(s, src->tpn_comp, n_comp), s += n_comp;
   else
     dst->tpn_comp = NULL;
-  
+
   return 0;
 }
 
 /** Convert a sockaddr structure into printable form. */
-char *tport_hostport(char buf[], isize_t bufsize, 
+char *tport_hostport(char buf[], isize_t bufsize,
 		     su_sockaddr_t const *su,
 		     int with_port_and_brackets)
 {
@@ -4715,13 +4715,13 @@
 
 #if SU_HAVE_IN6
   if (with_port_and_brackets > 1 || su->su_family == AF_INET6) {
-    *b++ = '['; bufsize--; 
+    *b++ = '['; bufsize--;
   }
 #endif
 
   if (su_inet_ntop(su->su_family, SU_ADDR(su), b, bufsize) == NULL)
     return NULL;
-  n = strlen(b); 
+  n = strlen(b);
   if (bufsize < n + 2)
     return NULL;
 
@@ -4729,7 +4729,7 @@
 
 #if SU_HAVE_IN6
   if (with_port_and_brackets > 1 || su->su_family == AF_INET6) {
-    *b++ = ']'; bufsize--; 
+    *b++ = ']'; bufsize--;
   }
   if (with_port_and_brackets) {
     unsigned short port = ntohs(su->su_port);
@@ -4737,7 +4737,7 @@
       n = snprintf(b, bufsize, ":%u", port);
       if (n <= 0)
         return NULL;
-      b += n; 
+      b += n;
       if (bufsize > n)
         bufsize -= n;
       else

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.docs	Tue Dec 16 13:05:22 2008
@@ -100,7 +100,7 @@
 retransmitted, application can receive it later than a data chunk that
 was sent after lost one but did not need any retransmissions.
 
- at subsection tp_magic Transport Magic 
+ at subsection tp_magic Transport Magic
 
 Transport magic is a cookie, a piece of data specified by stack that can
 be associated with a transport (e.g., a Via header). The protocol stack
@@ -142,7 +142,7 @@
 
 @note While the reference counting has been implemented in the tport
 module, the transport objects are not destroyed by timers by default as
-all the protocol stacks do @b not properly handle the reference counting. 
+all the protocol stacks do @b not properly handle the reference counting.
 Timers are activated when the tag TPTAG_IDLE() is used.
 
 @subsection tp_pend Pending Requests
@@ -183,11 +183,11 @@
 activate message logging within @b tport module.
 <dl compact>
 <dt>@b #TPORT_LOG
-   <dd>if set, tport module prints out the message contents 
+   <dd>if set, tport module prints out the message contents
        after parsing
 <dt>@b #TPORT_DUMP
    <dd>contains dump file name - incoming data is written
-       dump file @e before parsing 
+       dump file @e before parsing
 <dt>@b #TPORT_DEBUG
    <dd>integer in range -1..9 controlling amount of
        debugging printout from @b tport module. See also #tport_log.

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h	Tue Dec 16 13:05:22 2008
@@ -136,21 +136,21 @@
   ssize_t             tp_refs;		/**< Number of references to tport */
 
   unsigned            tp_black:1;       /**< Used by red-black-tree */
-  
+
   unsigned            tp_accepted:1;    /**< Originally server? */
   unsigned            tp_conn_orient:1;	/**< Is connection-oriented */
   unsigned            tp_has_connection:1; /**< Has real connection */
   unsigned            tp_reusable:1;    /**< Can this connection be reused */
   unsigned            tp_closed : 1;
   /**< This transport is closed.
-   * 
+   *
    * A closed transport is inserted into pri_closed list.
    */
 
   /** Remote end has sent FIN (2) or we should not just read */
   unsigned            tp_recv_close:2;
   /** We will send FIN (1) or have sent FIN (2) */
-  unsigned            tp_send_close:2; 
+  unsigned            tp_send_close:2;
   unsigned            tp_has_keepalive:1;
   unsigned            tp_has_stun_server:1;
   unsigned            tp_trunc:1;
@@ -172,7 +172,7 @@
   su_time_t           tp_ptime;	        /**< Ping sent */
 
   tp_name_t           tp_name[1];	/**< Transport name.
-					 * 
+					 *
 					 * This is either our name (if primary)
 					 * or peer name (if secondary).
 					 */
@@ -205,7 +205,7 @@
   unsigned            tp_pused;         /**< Used pends */
   tport_pending_t    *tp_pending;       /**< Pending requests */
   tport_pending_t    *tp_released;      /**< Released pends */
-  
+
   /* ==== Send queue ===================================================== */
 
   msg_t             **tp_queue;		/**< Messages being sent */
@@ -225,7 +225,7 @@
   tport_compressor_t *tp_comp;
 
   /* ==== Statistics  ===================================================== */
-  
+
   struct {
     uint64_t sent_msgs, sent_errors, sent_bytes, sent_on_line;
     uint64_t recv_msgs, recv_errors, recv_bytes, recv_on_line;
@@ -244,9 +244,9 @@
 #endif
   tport_vtable_t const
                      *pri_vtable;
-  int                 pri_public;       /**< Type of primary transport; 
+  int                 pri_public;       /**< Type of primary transport;
 					 * tport_type_local,
-					 * tport_type_stun, etc. 
+					 * tport_type_stun, etc.
 					 */
 
   tport_primary_t    *pri_next;	        /**< Next primary tport */
@@ -276,20 +276,20 @@
   int                 mr_stun_step_ready; /**< for stun's callback */
 
   tp_stack_t  	     *mr_stack;         /**< Transport consumer */
-  tp_stack_class_t 
+  tp_stack_class_t
                const *mr_tpac;		/**< Methods provided by stack */
   int                 mr_log;	        /**< Do logging of parsed messages */
   su_root_t    	     *mr_root;		/**< SU root pointer */
 
   /**< Timer reclaiming unused connections and compartment */
-  su_timer_t         *mr_timer;		
+  su_timer_t         *mr_timer;
   /** FILE to dump received and sent data */
-  FILE               *mr_dump_file;	
+  FILE               *mr_dump_file;
   char               *mr_dump;	/**< Filename for dumping received/sent data */
   tport_primary_t    *mr_primaries;        /**< List of primary contacts */
 
   tport_params_t      mr_params[1];
-  
+
   unsigned            mr_boundserver:1; /**< Server has been bound */
   unsigned            mr_bindv6only:1; /**< We can bind separately to IPv6/4 */
   unsigned :0;
@@ -340,7 +340,7 @@
 			  char const **return_culprit);
   void (*vtp_deinit_primary)(tport_primary_t *pri);
   int (*vtp_wakeup_pri)(tport_primary_t *pri, int events);
-  tport_t *(*vtp_connect)(tport_primary_t *pri, su_addrinfo_t *ai, 
+  tport_t *(*vtp_connect)(tport_primary_t *pri, su_addrinfo_t *ai,
 			  tp_name_t const *tpn);
 
   size_t vtp_secondary_size;	/* Size of secondary tport */
@@ -355,8 +355,8 @@
   ssize_t (*vtp_send)(tport_t const *self, msg_t *msg,
 		      msg_iovec_t iov[], size_t iovused);
   void (*vtp_deliver)(tport_t *self,  msg_t *msg, su_time_t now);
-  int (*vtp_prepare)(tport_t *self, msg_t *msg, 
-		     tp_name_t const *tpn, 
+  int (*vtp_prepare)(tport_t *self, msg_t *msg,
+		     tp_name_t const *tpn,
 		     struct sigcomp_compartment *cc,
 		     unsigned mtu);
   int (*vtp_keepalive)(tport_t *self, su_addrinfo_t const *ai,
@@ -364,7 +364,7 @@
   int (*vtp_stun_response)(tport_t const *self,
 			   void *msg, size_t msglen,
 			   void *addr, socklen_t addrlen);
-  int (*vtp_next_secondary_timer)(tport_t *self, su_time_t *, 
+  int (*vtp_next_secondary_timer)(tport_t *self, su_time_t *,
 				  char const **return_why);
   void (*vtp_secondary_timer)(tport_t *self, su_time_t);
 };
@@ -391,12 +391,12 @@
 
 void tport_set_tos(su_socket_t socket, su_addrinfo_t *ai, int tos);
 
-tport_t *tport_base_connect(tport_primary_t *pri, 
+tport_t *tport_base_connect(tport_primary_t *pri,
 			    su_addrinfo_t *ai,
 			    su_addrinfo_t *name,
 			    tp_name_t const *tpn);
 
-int tport_stream_init_primary(tport_primary_t *pri, 
+int tport_stream_init_primary(tport_primary_t *pri,
 			      su_socket_t socket,
 			      tp_name_t tpn[1],
 			      su_addrinfo_t *ai,
@@ -427,36 +427,36 @@
 void tport_send_event(tport_t *self);
 void tport_hup_event(tport_t *self);
 
-ssize_t tport_recv_iovec(tport_t const *self, 
+ssize_t tport_recv_iovec(tport_t const *self,
 			 msg_t **mmsg,
-			 msg_iovec_t iovec[msg_n_fragments], size_t N, 
+			 msg_iovec_t iovec[msg_n_fragments], size_t N,
 			 int exact);
 
 msg_t *tport_msg_alloc(tport_t const *self, usize_t size);
 
-int tport_prepare_and_send(tport_t *self, msg_t *msg, 
-			   tp_name_t const *tpn, 
+int tport_prepare_and_send(tport_t *self, msg_t *msg,
+			   tp_name_t const *tpn,
 			   struct sigcomp_compartment *cc,
 			   unsigned mtu);
-int tport_send_msg(tport_t *self, msg_t *msg, 
-		   tp_name_t const *tpn, 
+int tport_send_msg(tport_t *self, msg_t *msg,
+		   tp_name_t const *tpn,
 		   struct sigcomp_compartment *cc);
 
 void tport_send_queue(tport_t *self);
 
-void tport_deliver(tport_t *self, msg_t *msg, msg_t *next, 
+void tport_deliver(tport_t *self, msg_t *msg, msg_t *next,
 		   tport_compressor_t *comp,
 		   su_time_t now);
 void tport_base_deliver(tport_t *self, msg_t *msg, su_time_t now);
 
 int tport_recv_error_report(tport_t *self);
-void tport_error_report(tport_t *self, int errcode, 
+void tport_error_report(tport_t *self, int errcode,
 			su_sockaddr_t const *addr);
 
 int tport_open_log(tport_master_t *mr, tagi_t *tags);
-void tport_log_msg(tport_t *tp, msg_t *msg, char const *what, 
+void tport_log_msg(tport_t *tp, msg_t *msg, char const *what,
 		   char const *via, su_time_t now);
-void tport_dump_iovec(tport_t const *self, msg_t *msg, 
+void tport_dump_iovec(tport_t const *self, msg_t *msg,
 		      size_t n, su_iovec_t const iov[], size_t iovused,
 		      char const *what, char const *how);
 
@@ -466,9 +466,9 @@
 extern tport_vtable_t const tport_udp_vtable;
 extern tport_vtable_t const tport_udp_client_vtable;
 
-int tport_udp_init_primary(tport_primary_t *, 
-			   tp_name_t tpn[1], 
-			   su_addrinfo_t *, 
+int tport_udp_init_primary(tport_primary_t *,
+			   tp_name_t tpn[1],
+			   su_addrinfo_t *,
 			   tagi_t const *,
 			   char const **return_culprit);
 void tport_udp_deinit_primary(tport_primary_t *);
@@ -480,12 +480,12 @@
 extern tport_vtable_t const tport_tcp_vtable;
 extern tport_vtable_t const tport_tcp_client_vtable;
 
-int tport_tcp_init_primary(tport_primary_t *, 
- 			  tp_name_t  tpn[1], 
+int tport_tcp_init_primary(tport_primary_t *,
+ 			  tp_name_t  tpn[1],
  			  su_addrinfo_t *, tagi_t const *,
  			  char const **return_culprit);
-int tport_tcp_init_client(tport_primary_t *, 
- 			 tp_name_t tpn[1], 
+int tport_tcp_init_client(tport_primary_t *,
+ 			 tp_name_t tpn[1],
  			 su_addrinfo_t *, tagi_t const *,
  			 char const **return_culprit);
 int tport_tcp_init_secondary(tport_t *self, int socket, int accepted,
@@ -518,7 +518,7 @@
   int tpd_is_client_only;
 } tport_descriptor_t;
 
-typedef int const *(tport_set_f)(tport_master_t *mr, 
+typedef int const *(tport_set_f)(tport_master_t *mr,
 				 tp_name_t const *tpn,
 				 tagi_t const *taglist,
 				 tport_descriptor_t **return_set,
@@ -566,8 +566,8 @@
 			  socklen_t fromlen);
 
 ssize_t tport_send_comp(tport_t const *self,
-		    msg_t *msg, 
-		    msg_iovec_t iov[], 
+		    msg_t *msg,
+		    msg_iovec_t iov[],
 		    size_t iovused,
 		    struct sigcomp_compartment *cc,
 		    tport_compressor_t *sc);

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c	Tue Dec 16 13:05:22 2008
@@ -49,7 +49,7 @@
  *
  * If the TPORT_LOG environment variable is set, the tport module logs the
  * contents of parsed messages. This eases debugging the signaling greatly.
- * 
+ *
  * @sa TPORT_DUMP, TPORT_DEBUG, tport_log
  */
 #ifdef DOXYGEN
@@ -63,7 +63,7 @@
  * The received and sent data is dumped to the file specified by TPORT_DUMP
  * environment variable. This can be used to save message traces and help
  * hairy debugging tasks.
- * 
+ *
  * @sa TPORT_LOG, TPORT_DEBUG, tport_log
  */
 #ifdef DOXYGEN
@@ -76,19 +76,19 @@
  *
  * The TPORT_DEBUG environment variable is used to determine the debug logging
  * level for @b tport module. The default level is 3.
- * 
+ *
  * @sa <sofia-sip/su_debug.h>, tport_log, SOFIA_DEBUG
  */
 #ifdef DOXYGEN
 extern char const TPORT_DEBUG[]; /* dummy declaration for Doxygen */
 #endif
 
-/**Debug log for @b tport module. 
- * 
+/**Debug log for @b tport module.
+ *
  * The tport_log is the log object used by @b tport module. The level of
  * #tport_log is set using #TPORT_DEBUG environment variable.
  */
-su_log_t tport_log[] = { 
+su_log_t tport_log[] = {
   SU_LOG_INIT("tport", "TPORT_DEBUG", SU_DEBUG)
 };
 
@@ -99,9 +99,9 @@
   int log_msg = mr->mr_log != 0;
   char const *dump = NULL;
   int n;
-  
+
   n = tl_gets(tags,
-	      TPTAG_LOG_REF(log_msg), 
+	      TPTAG_LOG_REF(log_msg),
 	      TPTAG_DUMP_REF(dump),
 	      TAG_END());
 
@@ -129,7 +129,7 @@
     if (mr->mr_dump_file && mr->mr_dump_file != stdout)
       fclose(mr->mr_dump_file), mr->mr_dump_file = NULL;
 
-    if (strcmp(dumpname, "-")) 
+    if (strcmp(dumpname, "-"))
       mr->mr_dump_file = fopen(dumpname, "ab"); /* XXX */
     else
       mr->mr_dump_file = stdout;
@@ -144,8 +144,8 @@
 }
 
 /** Create log stamp */
-void tport_stamp(tport_t const *self, msg_t *msg, 
-		 char stamp[128], char const *what, 
+void tport_stamp(tport_t const *self, msg_t *msg,
+		 char stamp[128], char const *what,
 		 size_t n, char const *via,
 		 su_time_t now)
 {
@@ -183,7 +183,7 @@
 }
 
 /** Dump the data from the iovec */
-void tport_dump_iovec(tport_t const *self, msg_t *msg, 
+void tport_dump_iovec(tport_t const *self, msg_t *msg,
 		      size_t n, su_iovec_t const iov[], size_t iovused,
 		      char const *what, char const *how)
 {
@@ -214,7 +214,7 @@
 }
 
 /** Log the message. */
-void tport_log_msg(tport_t *self, msg_t *msg, 
+void tport_log_msg(tport_t *self, msg_t *msg,
 		   char const *what, char const *via,
 		   su_time_t now)
 {
@@ -234,7 +234,7 @@
   tport_stamp(self, msg, stamp, what, n, via, now);
   su_log(stamp);
   su_log("   " MSG_SEPARATOR);
- 
+
   for (i = 0; truncated == 0 && i < iovlen && i < 80; i++) {
     char *s = iov[i].mv_base, *end = s + iov[i].mv_len;
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_sigcomp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_sigcomp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_sigcomp.c	Tue Dec 16 13:05:22 2008
@@ -64,11 +64,11 @@
   struct sigcomp_compartment   *sc_cc;
   struct sigcomp_compressor    *sc_compressor;
   struct sigcomp_buffer        *sc_output;
-  unsigned                      sc_compressed; 
+  unsigned                      sc_compressed;
 
   struct sigcomp_buffer        *sc_input;
   unsigned                      sc_copied;
-  
+
   enum {
     format_is_unknown,
     format_is_sigcomp,
@@ -95,7 +95,7 @@
   sh = sigcomp_state_handler_create();
 
   if (sh == NULL) {
-    SU_DEBUG_1(("tport: initializing SigComp state handler: %s\n", 
+    SU_DEBUG_1(("tport: initializing SigComp state handler: %s\n",
 		strerror(errno)));
     vsc_master_deinit_sigcomp(mr, retval), retval = NULL;
     return retval;
@@ -106,7 +106,7 @@
   cc = sigcomp_compartment_create(a, sh, 0, "", 0, NULL, 0);
 
   if (cc == NULL) {
-    SU_DEBUG_1(("tport: initializing SigComp master compartment: %s\n", 
+    SU_DEBUG_1(("tport: initializing SigComp master compartment: %s\n",
 		strerror(errno)));
     vsc_master_deinit_sigcomp(mr, retval), retval = NULL;
     return retval;
@@ -146,7 +146,7 @@
 {
   if (master_sc == NULL ||
       master_sc->sc_cc == NULL ||
-      compression == NULL || 
+      compression == NULL ||
       strcasecmp(compression, tport_sigcomp_name))
     return NULL;
 
@@ -166,7 +166,7 @@
 }
 
 /** Set/reset compression */
-int vsc_set_compression(tport_t *self, 
+int vsc_set_compression(tport_t *self,
 			tport_sigcomp_t *sc,
 			char const *comp)
 {
@@ -186,7 +186,7 @@
       return 0;
     }
   }
-  
+
   return -1;
 }
 
@@ -194,7 +194,7 @@
 /** Assign a SigComp compartment (to a possibly connected tport). */
 int tport_sigcomp_assign(tport_t *self, struct sigcomp_compartment *cc)
 {
-  if (tport_is_connection_oriented(self) && 
+  if (tport_is_connection_oriented(self) &&
       tport_is_secondary(self) &&
       self->tp_socket != INVALID_SOCKET) {
 
@@ -205,7 +205,7 @@
       /* Remove old assignment */
       sigcomp_compartment_unref(self->tp_sigcomp->sc_cc);
     }
-    
+
     self->tp_sigcomp->sc_cc = sigcomp_compartment_ref(cc);
 
     return 0;
@@ -223,7 +223,7 @@
   if (how >= 2 && self->tp_sigcomp->sc_cc) {
     sigcomp_compartment_unref(self->tp_sigcomp->sc_cc);
     self->tp_sigcomp->sc_cc = NULL;
-  }  
+  }
 }
 
 static int vsc_recv_sigcomp_r(tport_t*, msg_t**, struct sigcomp_udvm*, int);
@@ -369,50 +369,50 @@
 
     data = input->b_data + input->b_avail;
     dlen = input->b_size - input->b_avail;
-    
+
     if (tport_is_stream(self)) {
       n = recv(self->tp_socket, data, dlen, 0);
-    } 
+    }
     else if (dlen >= N) {
       n = recvfrom(self->tp_socket, data, dlen, 0, &su->su_sa, &su_size);
       SU_CANONIZE_SOCKADDR(su);
-    } 
+    }
     else {
       recvfrom(self->tp_socket, data, dlen, 0, &su->su_sa, &su_size);
       SU_CANONIZE_SOCKADDR(su);
       su_seterrno(EMSGSIZE);		/* Protocol error */
       return -1;
     }
-  
+
     if (n == (unsigned)-1) {
       char const *pn = self->tp_protoname;
       int err = su_errno();
-    
+
       if (su_is_blocking(err)) {
 	SU_DEBUG_7(("%s(%p): recv from %s: EAGAIN\n", __func__, self, pn));
 	return 1;
       }
-    
+
       SU_DEBUG_1(("%s(%p): recv from %s: %s (%d)\n", __func__, self, pn,
 		  su_strerror(err), err));
       return -1;
     }
-  
+
     /* XXX - in case of stream, use message buffers for output? */
-    
+
     input->b_avail += n;
     input->b_complete = (n == 0) || !tport_is_stream(self);
   }
 
   for (complete = eos = 0; !complete;) {
     output = sigcomp_udvm_output_buffer(udvm, 16384);
-    
+
     if (sigcomp_udvm_decompress(udvm, output, input) < 0) {
       int error = sigcomp_udvm_errno(udvm);
-      
+
       SU_DEBUG_3(("%s: UDVM error %d: %s\n", __func__,
 		  error, sigcomp_udvm_strerror(udvm)));
-      
+
       su_seterrno(EREMOTEIO);
 
       return -1;
@@ -424,7 +424,7 @@
     eos = complete && input->b_complete;
 
     veclen = tport_recv_iovec(self, mmsg, iovec, dlen, eos);
-    
+
     if (dlen ? veclen <= 0 : veclen < 0) {
       return -1;
     }
@@ -437,27 +437,27 @@
     assert(dlen == n);
 
     msg = *mmsg;
-    
+
     if (msg) {
       /* Message address */
       if (self->tp_addrinfo->ai_socktype == SOCK_STREAM)
 	msg_set_address(msg, self->tp_addr, self->tp_addrlen);
       else
 	msg_set_address(msg, su, su_size);
-      
-      SU_DEBUG_5(("%s(%p): sigcomp recv = %u => %u %s\n", __func__, self, 
+
+      SU_DEBUG_5(("%s(%p): sigcomp recv = %u => %u %s\n", __func__, self,
 		  N, dlen, eos ? " (complete)" : ""));
 
       msg_mark_as_compressed(msg);
-      
+
       /* Write the received data to the message dump file */
       if (self->tp_master->mr_dump_file && !self->tp_pri->pri_threadpool)
 	tport_dump_iovec(self, msg, n, iovec, veclen, "recv", "from");
-      
+
       msg_recv_commit(msg, dlen, eos);    /* Mark buffer as used */
     }
     else {
-      SU_DEBUG_5(("%s(%p): sigcomp recv = %u => %u %s\n", __func__, self, 
+      SU_DEBUG_5(("%s(%p): sigcomp recv = %u => %u %s\n", __func__, self,
 		  N, dlen, eos ? " (complete)" : ""));
       if (complete || !tport_is_stream(self)) {
 	sigcomp_udvm_reject(udvm); /* Reject empty message */
@@ -467,7 +467,7 @@
     if (self->tp_addrinfo->ai_socktype == SOCK_STREAM) {
       if (eos)
 	return 0;
-    
+
       if (output->b_complete)
 	return n < N || sigcomp_udvm_has_pending_data(udvm) ? 2 : 1;
 
@@ -481,8 +481,8 @@
 
 static
 int vsc_send_sigcomp(tport_t const *self,
-		     msg_t *msg, 
-		     msg_iovec_t iov[], 
+		     msg_t *msg,
+		     msg_iovec_t iov[],
 		     int iovused,
 		     struct sigcomp_compartment *cc,
 		     tport_sigcomp_t *sc)
@@ -511,7 +511,7 @@
     sc->sc_outfmt = format_is_sigcomp;
 
   assert(cc);
-  
+
   if (c == NULL) {
     assert(input == NULL);
     if (stream)
@@ -519,7 +519,7 @@
     else
       c = sigcomp_compressor_create(cc);
     sc->sc_compressor = c;
-  } 
+  }
 
   ccname = sigcomp_compartment_name(cc, &ccnamelen);
 
@@ -539,7 +539,7 @@
     sc->sc_input = input = sigcomp_compressor_input_buffer(c, input_size);
 
     assert(input->b_avail == 0 && input->b_used == 0);
-  } 
+  }
   else if (!input->b_complete) {
     int input_size = 0;
 
@@ -552,15 +552,15 @@
 
   if (output == NULL)
     sc->sc_output = output = sigcomp_compressor_output_buffer(c, NULL);
-    
+
   if (!c || !input || !output) {
-    SU_DEBUG_3(("%s(%p): %s (%u)%s%s%s\n", 
+    SU_DEBUG_3(("%s(%p): %s (%u)%s%s%s\n",
 		__func__, self, strerror(errno), errno,
 		c ? "" : " (comp)",
 		input ? "" : " (input)",
 		output ? "" : " (output)"));
     sigcomp_compressor_free(c);
-    sc->sc_compressor = NULL; 
+    sc->sc_compressor = NULL;
     sc->sc_output = NULL; sc->sc_input = NULL;
     sc->sc_compressed = 0; sc->sc_copied = 0;
     return -1;
@@ -598,17 +598,17 @@
       input->b_complete = i == iovused;
       assert(stream || input->b_complete); (void)stream;
     }
-    
+
     m = output->b_avail - output->b_used;
 
     n = sigcomp_compressor_compress(c, output, input);
-    
+
     if (n < 0) {
       SU_DEBUG_3(("%s(%p): %s (%u)\n", __func__, self,
-		  sigcomp_compressor_strerror(c), 
+		  sigcomp_compressor_strerror(c),
 		  sigcomp_compressor_errno(c)));
       sigcomp_compressor_free(c);
-      sc->sc_compressor = NULL; 
+      sc->sc_compressor = NULL;
       sc->sc_output = NULL; sc->sc_input = NULL;
       sc->sc_compressed = 0;
       return -1;
@@ -616,15 +616,15 @@
 
     assert(input->b_complete || sc->sc_copied - k > 0);
 
-    SU_DEBUG_5(("%s: input %u (%u new) compressed %u to %u with '%.*s'\n", 
-		__func__, sc->sc_copied, k, n, 
-		(output->b_avail - output->b_used) - m, 
+    SU_DEBUG_5(("%s: input %u (%u new) compressed %u to %u with '%.*s'\n",
+		__func__, sc->sc_copied, k, n,
+		(output->b_avail - output->b_used) - m,
 		ccnamelen, ccname));
 
     sc->sc_compressed = n;
 
     assert(stream || output->b_complete);
-  } 
+  }
   else {
     assert(tport_is_connection_oriented(self));
     n = sc->sc_compressed;
@@ -636,7 +636,7 @@
   ciov->siv_len = output->b_avail - output->b_used;
 
   m = self->tp_pri->pri_vtable->vtp_send(self, msg, ciov, 1);
-  
+
   if (m == -1) {
     int error = su_errno();
 
@@ -650,9 +650,9 @@
 
     return -1;
   }
-  
+
   output->b_used += m;
-  
+
   if (output->b_used < output->b_avail)
     return 0;
 
@@ -668,7 +668,7 @@
     sc->sc_compressor = NULL;
   }
 
-  assert(sc->sc_compressed >= n); assert(sc->sc_copied >= n); 
+  assert(sc->sc_compressed >= n); assert(sc->sc_copied >= n);
 
   sc->sc_compressed -= n;
   sc->sc_copied -= n;
@@ -677,7 +677,7 @@
 }
 
 /** Initialize UDVM */
-static 
+static
 struct sigcomp_udvm *tport_init_udvm(tport_t *self)
 {
   struct sigcomp_compartment *cc;
@@ -701,7 +701,7 @@
 
 
 /** Get primary compartment */
-static 
+static
 struct sigcomp_compartment *
 tport_primary_compartment(tport_master_t *mr)
 {
@@ -721,14 +721,14 @@
 
   udvm = self->tp_sigcomp->sc_udvm;
   if (udvm && sigcomp_udvm_is_complete(udvm)) {
-    if (self->tp_master->mr_tpac->tpac_sigcomp_accept && 
+    if (self->tp_master->mr_tpac->tpac_sigcomp_accept &&
 	self->tp_sigcomp->sc_cc == NULL) {
       tport_t *ref;
       struct tport_delivery *d;
 
       d = self->tp_master->mr_delivery;
 
-      d->d_tport = self; 
+      d->d_tport = self;
       d->d_msg = msg;
       d->d_udvm = &self->tp_sigcomp->sc_udvm;
       *d->d_from = *self->tp_name;
@@ -744,11 +744,11 @@
     }
     else {
       if (tport_log->log_level >= 5) {
-	char const *name; 
+	char const *name;
 	int namelen;
-      
+
 	name = sigcomp_compartment_name(self->tp_sigcomp->sc_cc, &namelen);
-	SU_DEBUG_5(("tport(%p): msg %p SigComp implicit accept '%.*s'\n", 
+	SU_DEBUG_5(("tport(%p): msg %p SigComp implicit accept '%.*s'\n",
 		    self, msg, namelen, name));
       }
       sigcomp_udvm_accept(udvm, self->tp_sigcomp->sc_cc);
@@ -758,9 +758,9 @@
 
 
 /** Accept a SigComp message */
-int 
-tport_sigcomp_accept(tport_t *self, 
-		     struct sigcomp_compartment *cc, 
+int
+tport_sigcomp_accept(tport_t *self,
+		     struct sigcomp_compartment *cc,
 		     msg_t *msg)
 {
   struct sigcomp_udvm *udvm;
@@ -775,12 +775,12 @@
 
   if (udvm) {
     if (tport_log->log_level >= 5) {
-      char const *name; 
+      char const *name;
       int namelen;
-   
+
       if (cc) {
 	name = sigcomp_compartment_name(cc, &namelen);
-	SU_DEBUG_5(("tport(%p): msg %p SigComp accept '%.*s'\n", 
+	SU_DEBUG_5(("tport(%p): msg %p SigComp accept '%.*s'\n",
 		    self, msg, namelen, name));
       }
       else {
@@ -814,7 +814,7 @@
 su_inline
 int msg_is_compressed(msg_t *msg)
 {
-  return msg && 
+  return msg &&
     (msg_addrinfo(msg)->ai_flags & TP_AI_COMPRESSED) == TP_AI_COMPRESSED;
 }
 
@@ -852,11 +852,11 @@
       /* Use default compartment */
       cc = self->tp_master->mr_compartment;
   }
-  else 
+  else
     cc = NULL;
-  
+
   return cc;
-}			   
+}
 
 /** Receive data from datagram using SigComp. */
 int tport_recv_sigcomp_dgram(tport_t *self, int N)
@@ -881,5 +881,5 @@
 #endif
   recv(self->tp_socket, dummy, 1, 0); /* remove msg from socket */
   /* XXX - send NACK ? */
-  return su_seterrno(error);     
+  return su_seterrno(error);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_sigcomp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_sigcomp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_sigcomp.c	Tue Dec 16 13:05:22 2008
@@ -140,7 +140,7 @@
 int tport_has_compression(tport_t const *self, char const *comp)
 {
   return
-    self && comp && 
+    self && comp &&
     self->tp_name->tpn_comp == tport_canonize_comp(comp);
 }
 
@@ -169,7 +169,7 @@
 }
 
 
-/** Assign a SigComp compartment (to a possibly connected tport). 
+/** Assign a SigComp compartment (to a possibly connected tport).
  *
  * @related tport_s
  */
@@ -180,7 +180,7 @@
   if (!vsc)
     return 0;
 
-  if (tport_is_connection_oriented(self) && 
+  if (tport_is_connection_oriented(self) &&
       tport_is_secondary(self) &&
       self->tp_socket != INVALID_SOCKET) {
     return vsc->vsc_set_compartment(self, self->tp_comp, cc);
@@ -207,7 +207,7 @@
   }
 
   return vsc->vsc_get_compartment(self, self->tp_comp);
-}			   
+}
 
 
 /** Test if tport has a SigComp compartment assigned to it. */
@@ -217,13 +217,13 @@
 
   if (vsc && self)
     return vsc->vsc_has_sigcomp_assigned(self->tp_comp);
-    
+
   return 0;
 }
 
-int 
-tport_sigcomp_accept(tport_t *self, 
-		     struct sigcomp_compartment *cc, 
+int
+tport_sigcomp_accept(tport_t *self,
+		     struct sigcomp_compartment *cc,
 		     msg_t *msg)
 {
   tport_comp_vtable_t const *vsc = tport_comp_vtable;
@@ -260,7 +260,7 @@
 }
 
 /** Receive data from datagram using SigComp. */
-int tport_recv_comp_dgram(tport_t const *self, 
+int tport_recv_comp_dgram(tport_t const *self,
 			  tport_compressor_t *sc,
 			  msg_t **in_out_msg,
 			  su_sockaddr_t *from,
@@ -273,13 +273,13 @@
 
   msg_destroy(*in_out_msg), *in_out_msg = NULL;
 
-  return su_seterrno(EBADMSG);     
+  return su_seterrno(EBADMSG);
 }
 
 
 ssize_t tport_send_comp(tport_t const *self,
-			msg_t *msg, 
-			msg_iovec_t iov[], 
+			msg_t *msg,
+			msg_iovec_t iov[],
 			size_t iovused,
 			struct sigcomp_compartment *cc,
 			tport_compressor_t *comp)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_stun.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_stun.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_stub_stun.c	Tue Dec 16 13:05:22 2008
@@ -55,13 +55,13 @@
 }
 
 static
-tport_stun_server_vtable_t const stun_mini_vtable = 
+tport_stun_server_vtable_t const stun_mini_vtable =
   {
     sizeof stun_mini_vtable,
-    vst_create, 
+    vst_create,
     stun_mini_destroy,
-    stun_mini_add_socket, 
-    stun_mini_remove_socket, 
+    stun_mini_add_socket,
+    stun_mini_remove_socket,
     stun_mini_request
   };
 
@@ -98,10 +98,10 @@
 {
   tport_stun_server_t *stun_server = tp->tp_master->mr_stun_server;
 
-  if (tport_stun_server_vtable && 
+  if (tport_stun_server_vtable &&
       stun_server &&
       tp->tp_params->tpp_stun_server) {
-    if (tport_stun_server_vtable->vst_add_socket(stun_server, 
+    if (tport_stun_server_vtable->vst_add_socket(stun_server,
 						 tp->tp_socket) == 0)
       tp->tp_has_stun_server = 1;
   }
@@ -124,7 +124,7 @@
 /**Process stun messagee.
  *
  * @retval -1 error
- * @retval 3  stun message received, ignore  
+ * @retval 3  stun message received, ignore
  */
 int tport_recv_stun_dgram(tport_t const *self,
 			  msg_t **in_out_msg,
@@ -150,7 +150,7 @@
   else if (request[0] == 1) {
     /* This is a response. */
     if (self->tp_pri->pri_vtable->vtp_stun_response) {
-      if (self->tp_pri->pri_vtable->vtp_stun_response(self, request, n, 
+      if (self->tp_pri->pri_vtable->vtp_stun_response(self, request, n,
 						      from, fromlen) < 0)
 	retval = -1;
     }
@@ -161,7 +161,7 @@
   else if (request[0] == 0 && self->tp_master->mr_stun_server) {
     tport_stun_server_vtable_t const *vst = tport_stun_server_vtable;
     vst->vst_request(self->tp_master->mr_stun_server,
-		     self->tp_socket, request, n, 
+		     self->tp_socket, request, n,
 		     (void *)from, fromlen);
   }
   else if (request[0] == 0) {
@@ -279,7 +279,7 @@
   if (vtable->vst_size <= (int)sizeof *vtable)
     return su_seterrno(EINVAL);
 
-  if (!vtable->vst_create || 
+  if (!vtable->vst_create ||
       !vtable->vst_destroy ||
       !vtable->vst_add_socket ||
       !vtable->vst_remove_socket ||

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 /**@CFILE tport_tag.c
  * @brief Tags for transport module
  *
- * @note This file is used to automatically generate 
+ * @note This file is used to automatically generate
  * tport_tag_ref.c and tport_tag_dll.c
  *
  * Copyright (c) 2002 Nokia Research Center.  All rights reserved.
@@ -54,7 +54,7 @@
 
 /**@def TPTAG_IDENT(cstr)
  *
- * Identify a transport interface. 
+ * Identify a transport interface.
  *
  * Use with tport_tbind(), tport_tsend(), nua_create(), nta_agent_create(),
  * nta_agent_add_tport(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
@@ -75,7 +75,7 @@
 
 /**@def TPTAG_FRESH(boolean)
  *
- * Create new connection (but allow other messages to reuse the new one). 
+ * Create new connection (but allow other messages to reuse the new one).
  *
  * Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
  * or nth_client_tcreate().
@@ -92,7 +92,7 @@
 
 /**@def TPTAG_PUBLIC(tport_via)
  *
- * Define how the public transport connects to Internet. 
+ * Define how the public transport connects to Internet.
  *
  * Use with tport_tbind(), nua_create(), nta_agent_create(),
  * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
@@ -146,7 +146,7 @@
 /**@def TPTAG_CLOSE_AFTER(x)
  *
  * Close of a connection after sending the message.
- * 
+ *
  * Use with tport_tsend(), nta_outgoing_tcreate(), nta_outgoing_mcreate(),
  * or nth_client_tcreate().
  */
@@ -156,7 +156,7 @@
  *
  * How long transports may be idle (value in milliseconds).
  *
- * If 0, zap immediately, 
+ * If 0, zap immediately,
  * if UINT_MAX, leave them there (default value for now).
  *
  * @par Use With
@@ -201,7 +201,7 @@
  *
  * Ping-pong interval in milliseconds.
  *
- * If 0 or UINT_MAX, do not check for PONGs. Default value is 0. 
+ * If 0 or UINT_MAX, do not check for PONGs. Default value is 0.
  *
  * If set, the ping-pong protocol is used on TCP connections. If pinger
  * sends a ping and receives no data in the specified ping-pong interval, it
@@ -257,7 +257,7 @@
  *
  * Path to the public key certificate directory.
  *
- * Use with tport_tbind(), nua_create(), nta_agent_create(), 
+ * Use with tport_tbind(), nua_create(), nta_agent_create(),
  * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
  */
 tag_typedef_t tptag_certificate = STRTAG_TYPEDEF(certificate);
@@ -275,7 +275,7 @@
  *
  * Sets the TLS version (version 0 implies SSL2/SSL3).
  *
- * Use with tport_tbind(), nua_create(), nta_agent_create(), 
+ * Use with tport_tbind(), nua_create(), nta_agent_create(),
  * nta_agent_add_tport(), nth_engine_create(), or initial nth_site_create().
  */
 tag_typedef_t tptag_tls_version = UINTTAG_TYPEDEF(tls_version);
@@ -399,7 +399,7 @@
  *
  * If set, print out parsed or sent messages at transport layer.
  *
- * Use with tport_tcreate(), nua_create(), nta_agent_create(), 
+ * Use with tport_tcreate(), nua_create(), nta_agent_create(),
  * nth_engine_create(), or initial nth_site_create().
  *
  * @sa #TPORT_LOG environment variable, TPTAG_DUMP()
@@ -410,7 +410,7 @@
 
 /**@def TPTAG_DUMP(x)
  *
- * Filename for dumping unparsed messages from transport. 
+ * Filename for dumping unparsed messages from transport.
  *
  * Use with tport_tcreate(), nta_agent_create(), nua_create(),
  * nth_engine_create(), or initial nth_site_create().
@@ -421,7 +421,7 @@
  */
 tag_typedef_t tptag_dump = STRTAG_TYPEDEF(dump);
 
-/** Mark transport as trusted. 
+/** Mark transport as trusted.
  *
  * @note Not implemented by tport module.
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_threadpool.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_threadpool.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_threadpool.c	Tue Dec 16 13:05:22 2008
@@ -34,7 +34,7 @@
 
 #include "config.h"
 
-#undef HAVE_SIGCOMP 
+#undef HAVE_SIGCOMP
 
 #define SU_ROOT_MAGIC_T         struct tport_threadpool
 #define SU_WAKEUP_ARG_T         struct tport_s
@@ -93,7 +93,7 @@
   int        thrp_yield;
 };
 
-typedef struct 
+typedef struct
 {
   threadpool_t *tpd_thrp;
   int  tpd_errorcode;
@@ -114,16 +114,16 @@
   thrp_udp_deliver_t thrp_udp_deliver[1];
 };
 
-int tport_threadpool_init_primary(tport_primary_t *, 
-				  tp_name_t tpn[1], 
-				  su_addrinfo_t *, 
+int tport_threadpool_init_primary(tport_primary_t *,
+				  tp_name_t tpn[1],
+				  su_addrinfo_t *,
 				  tagi_t const *,
 				  char const **return_culprit);
 static void tport_threadpool_deinit_primary(tport_primary_t *pri);
 
 static int tport_thread_send(tport_t *tp,
 			     msg_t *msg,
-			     tp_name_t const *tpn, 
+			     tp_name_t const *tpn,
 			     struct sigcomp_compartment *cc,
 			     unsigned mtu);
 
@@ -149,16 +149,16 @@
 
 static int thrp_udp_init(su_root_t *, threadpool_t *);
 static void thrp_udp_deinit(su_root_t *, threadpool_t *);
-static int thrp_udp_event(threadpool_t *thrp, 
-			    su_wait_t *w, 
+static int thrp_udp_event(threadpool_t *thrp,
+			    su_wait_t *w,
 			    tport_t *_tp);
-static int thrp_udp_recv_deliver(threadpool_t *thrp, 
-				 tport_t const *tp, 
+static int thrp_udp_recv_deliver(threadpool_t *thrp,
+				 tport_t const *tp,
 				 thrp_udp_deliver_t *tpd,
 				 int events);
 static int thrp_udp_recv(threadpool_t *thrp, thrp_udp_deliver_t *tpd);
 #if HAVE_SIGCOMP
-static int thrp_udvm_decompress(threadpool_t *thrp, 
+static int thrp_udvm_decompress(threadpool_t *thrp,
 				thrp_udp_deliver_t *tpd);
 #endif
 static void thrp_udp_deliver(threadpool_t *thrp,
@@ -176,8 +176,8 @@
 
 
 /** Launch threads in the tport pool. */
-int tport_threadpool_init_primary(tport_primary_t *pri, 
-				  tp_name_t tpn[1], 
+int tport_threadpool_init_primary(tport_primary_t *pri,
+				  tp_name_t tpn[1],
 				  su_addrinfo_t *ai,
 				  tagi_t const *tags,
 				  char const **return_culprit)
@@ -210,7 +210,7 @@
       thrp[i].thrp_compartment = tport_primary_compartment(tp->tp_master);
 #endif
     thrp[i].thrp_tport = tptp;
-    if (su_clone_start(pri->pri_master->mr_root, 
+    if (su_clone_start(pri->pri_master->mr_root,
 		       thrp[i].thrp_clone,
 		       thrp + i,
 		       thrp_udp_init,
@@ -219,7 +219,7 @@
   }
 
   tp->tp_events = 0;
-  
+
   return 0;
 
  error:
@@ -231,7 +231,7 @@
  *
  * @note Executed by stack thread only.
  */
-static 
+static
 void tport_threadpool_deinit_primary(tport_primary_t *pri)
 {
   tport_threadpool_t *tptp = (tport_threadpool_t *)pri;
@@ -246,7 +246,7 @@
     thrp[i].thrp_killing = 1;
 
   /* Stop every task in the threadpool. */
-  for (i = 0; i < N; i++) 
+  for (i = 0; i < N; i++)
     su_clone_wait(pri->pri_master->mr_root, thrp[i].thrp_clone);
 
   su_free(pri->pri_home, tptp), tptp->tptp_pool = NULL;
@@ -299,8 +299,8 @@
   thrp->thrp_yield = 0;
 }
 
-static int thrp_udp_event(threadpool_t *thrp, 
-			  su_wait_t *w, 
+static int thrp_udp_event(threadpool_t *thrp,
+			  su_wait_t *w,
 			  tport_t *tp)
 {
 #if HAVE_POLL
@@ -317,7 +317,7 @@
 			su_root_task(thrp->thrp_root),
 			thrp_udp_deliver,
 			sizeof (*tpd)) == -1) {
-	SU_DEBUG_1(("thrp_udp_event(%p): su_msg_create(): %s\n", thrp, 
+	SU_DEBUG_1(("thrp_udp_event(%p): su_msg_create(): %s\n", thrp,
 		    strerror(errno)));
 	return 0;
       }
@@ -337,7 +337,7 @@
       tpd = su_msg_data(thrp->thrp_rmsg)->thrp_udp_deliver;
       memset(tpd, 0, sizeof *tpd);
       return 0;
-    } 
+    }
 
     if (thrp->thrp_yield || (thrp->thrp_s_sent - thrp->thrp_s_recv) > 0)
       return 0;
@@ -346,8 +346,8 @@
   }
 }
 
-static int thrp_udp_recv_deliver(threadpool_t *thrp, 
-				 tport_t const *tp, 
+static int thrp_udp_recv_deliver(threadpool_t *thrp,
+				 tport_t const *tp,
 				 thrp_udp_deliver_t *tpd,
 				 int events)
 {
@@ -378,10 +378,10 @@
       assert(tpd->tpd_errorcode);
       if (su_is_blocking(tpd->tpd_errorcode))
 	return 0;
-    } 
+    }
     else if (tpd->tpd_msg) {
       int n = msg_extract(tpd->tpd_msg); (void)n;
-      
+
       thrp->thrp_rcvd_msgs++;
       thrp->thrp_rcvd_bytes += msg_size(tpd->tpd_msg);
     }
@@ -395,7 +395,7 @@
 
     if (tpd->tpd_msg || tpd->tpd_errorcode) {
       if (qlen >= tp->tp_params->tpp_thrprqsize) {
-	SU_DEBUG_7(("tport recv queue %i: %u\n", 
+	SU_DEBUG_7(("tport recv queue %i: %u\n",
 		    (int)(thrp - tp->tp_pri->tptp_pool), qlen));
 	thrp_yield(thrp);
       }
@@ -429,7 +429,7 @@
   pthread_mutex_lock(mutex);
 
   /* Simulate packet loss */
-  if (tp->tp_params->tpp_drop && 
+  if (tp->tp_params->tpp_drop &&
       su_randint(0, 1000) < tp->tp_params->tpp_drop) {
     recv(s, sample, 1, 0);
     pthread_mutex_unlock(mutex);
@@ -462,7 +462,7 @@
       void *data;
       int dlen;
 
-      tpd->tpd_udvm = 
+      tpd->tpd_udvm =
 	sigcomp_udvm_create_for_compartment(thrp->thrp_compartment);
       input = sigcomp_udvm_input_buffer(tpd->tpd_udvm, N); assert(input);
 
@@ -473,23 +473,23 @@
 	dlen = 0;
 
       tpd->tpd_namelen = sizeof(tpd->tpd_name);
-    
-      dlen = recvfrom(tp->tp_socket, data, dlen, 0, 
+
+      dlen = recvfrom(tp->tp_socket, data, dlen, 0,
 		      &tpd->tpd_name->su_sa, &tpd->tpd_namelen);
 
       SU_CANONIZE_SOCKADDR(tpd->tpd_name);
-      
+
       if (dlen < N) {
 	su_seterrno(EMSGSIZE);		/* Protocol error */
 	N = -1;
-      } else if (dlen == -1) 
+      } else if (dlen == -1)
 	N = -1;
       else {
-	input->b_avail += dlen; 
+	input->b_avail += dlen;
 	input->b_complete = 1;
-	
+
 	pthread_mutex_unlock(mutex);
-      
+
 	N = thrp_udvm_decompress(thrp, tpd);
 
 	if (N == -1)
@@ -511,8 +511,8 @@
   else {
     /* receive as usual */
     N = tport_recv_dgram_r(tp, &tpd->tpd_msg, N);
-  } 
-  
+  }
+
   pthread_mutex_unlock(mutex);
 
   return N;
@@ -533,22 +533,22 @@
   ssize_t veclen;
 
   output = sigcomp_udvm_output_buffer(udvm, -1);
-  
+
   if (sigcomp_udvm_decompress(udvm, output, NULL) < 0) {
     int error = sigcomp_udvm_errno(udvm);
     SU_DEBUG_3(("%s: UDVM error %d: %s\n", __func__,
 		error, sigcomp_udvm_strerror(udvm)));
     su_seterrno(EREMOTEIO);
     return -1;
-  } 
+  }
 
   data = output->b_data + output->b_used;
   dlen = output->b_avail - output->b_used;
   /* XXX - if a message is larger than default output size... */
   eos = output->b_complete; assert(output->b_complete);
-    
+
   veclen = tport_recv_iovec(tp, &tpd->tpd_msg, iovec, dlen, eos);
-    
+
   if (veclen <= 0) {
     n = -1;
   } else {
@@ -560,7 +560,7 @@
     assert(dlen == n);
 
     msg_recv_commit(tpd->tpd_msg, dlen, eos);    /* Mark buffer as used */
-    
+
     /* Message address */
     ai = msg_addrinfo(tpd->tpd_msg);
     ai->ai_flags |= TP_AI_COMPRESSED;
@@ -580,7 +580,7 @@
  *
  * @note Executed by stack thread only.
  */
-static 
+static
 void thrp_udp_deliver(su_root_magic_t *magic,
 		      su_msg_r m,
 		      union tport_su_msg_arg *arg)
@@ -602,7 +602,7 @@
     return;
   }
 
-  SU_DEBUG_7(("thrp_udp_deliver(%p): got %p delay %f\n", 
+  SU_DEBUG_7(("thrp_udp_deliver(%p): got %p delay %f\n",
 	      thrp, tpd, 1000 * su_time_diff(now, tpd->tpd_when)));
 
   if (tpd->tpd_errorcode)
@@ -612,14 +612,14 @@
     tp->tp_rlogged = NULL;
   }
 
-#if HAVE_SIGCOMP 
+#if HAVE_SIGCOMP
   if (tpd->tpd_udvm) {
     sigcomp_udvm_free(tpd->tpd_udvm), tpd->tpd_udvm = NULL;
   }
 #endif
 }
 
-static 
+static
 void thrp_udp_deliver_report(threadpool_t *thrp,
 			     su_msg_r m,
 			     union tport_su_msg_arg *arg)
@@ -639,11 +639,11 @@
 static
 int tport_thread_send(tport_t *tp,
 		      msg_t *msg,
-		      tp_name_t const *tpn, 
+		      tp_name_t const *tpn,
 		      struct sigcomp_compartment *cc,
 		      unsigned mtu)
 {
-  
+
   threadpool_t *thrp = tp->tp_pri->tptp_pool;
   thrp_udp_deliver_t *tpd;
   int i, N = tp->tp_pri->tptp_poolsize;
@@ -661,12 +661,12 @@
 
   qlen = totalqlen = thrp->thrp_s_sent - thrp->thrp_s_recv;
 
-  /* Select thread with shortest queue */ 
+  /* Select thread with shortest queue */
   for (i = 1; i < N; i++) {
     threadpool_t *other = tp->tp_pri->tptp_pool + i;
     unsigned len = other->thrp_s_sent - other->thrp_s_recv;
 
-    if (len < qlen || 
+    if (len < qlen ||
 	(len == qlen && (other->thrp_s_sent - thrp->thrp_s_sent) < 0))
       thrp = other, qlen = len;
 
@@ -681,7 +681,7 @@
 		    su_root_task(tp->tp_master->mr_root),
 		    thrp_udp_send,
 		    sizeof (*tpd)) != su_success) {
-    SU_DEBUG_1(("thrp_udp_event(%p): su_msg_create(): %s\n", thrp, 
+    SU_DEBUG_1(("thrp_udp_event(%p): su_msg_create(): %s\n", thrp,
 		strerror(errno)));
     return -1;
   }
@@ -708,7 +708,7 @@
 }
 
 /** thrp_udp_send() is run by threadpool to send the message. */
-static 
+static
 void thrp_udp_send(threadpool_t *thrp,
 		   su_msg_r m,
 		   union tport_su_msg_arg *arg)
@@ -723,7 +723,7 @@
 
   thrp->thrp_s_recv++;
 
-  { 
+  {
     double delay = 1000 * su_time_diff(su_now(), tpd->tpd_when);
     if (delay > 100)
       SU_DEBUG_3(("thrp_udp_deliver(%p): got %p delay %f\n", thrp, tpd, delay));
@@ -753,7 +753,7 @@
   /* Get a iovec for message contents */
   for (;;) {
     iovused = msg_iovec(msg, iov, iovlen);
-    if (iovused <= iovlen) 
+    if (iovused <= iovlen)
       break;
 
     iov = iov0 = realloc(iov0, sizeof(*iov) * iovused);
@@ -776,9 +776,9 @@
     tport_sigcomp_t sc[1] = {{ NULL }};
 
     n = tport_sigcomp_vsend(tp, msg, iov, iovused, tpd->tpd_cc, sc);
-  } 
+  }
 #endif
-  else 
+  else
     n = tport_send_dgram(tp, msg, iov, iovused);
 
   if (n == -1)
@@ -788,7 +788,7 @@
     free(iov0);
 }
 
-static 
+static
 void thrp_udp_send_report(su_root_magic_t *magic,
 			  su_msg_r msg,
 			  union tport_su_msg_arg *arg)
@@ -799,7 +799,7 @@
 
   assert(magic != thrp);
 
-  SU_DEBUG_7(("thrp_udp_send_report(%p): got %p delay %f\n", 
+  SU_DEBUG_7(("thrp_udp_send_report(%p): got %p delay %f\n",
 	      thrp, tpd, 1000 * su_time_diff(su_now(), tpd->tpd_when)));
 
   if (tp->tp_master->mr_log)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 /**@CFILE tport_tls.c
  * @brief TLS interface
- * 
+ *
  * @author Mikko Haataja <ext-Mikko.A.Haataja at nokia.com>
  * @author Pekka Pessi <ext-Pekka.Pessi at nokia.com>
  *
@@ -112,7 +112,7 @@
       const char *func = ERR_func_error_string(e);
       const char *reason = ERR_reason_error_string(e);
 
-      su_llog(tport_log, level, "%s: %08lx:%s:%s:%s\n", 
+      su_llog(tport_log, level, "%s: %08lx:%s:%s:%s\n",
 	      s, e, error, func, reason);
     }
   }
@@ -165,7 +165,7 @@
     SU_DEBUG_1(("  subject  = %s\n", data));
     SU_DEBUG_1(("  err %i:%s\n", err, X509_verify_cert_error_string(err)));
   }
- 
+
   return 1;			/* Always return "ok" */
 }
 
@@ -182,7 +182,7 @@
     if (ti->randFile &&
 	!RAND_load_file(ti->randFile, 1024 * 1024)) {
       if (ti->configured > 1) {
-	SU_DEBUG_3(("%s: cannot open randFile %s\n", 
+	SU_DEBUG_3(("%s: cannot open randFile %s\n",
 		   "tls_init_context", ti->randFile));
 	tls_log_errors(3, "tls_init_context", 0);
       }
@@ -216,7 +216,7 @@
     return -1;
   }
 
-  if (!SSL_CTX_use_certificate_file(tls->ctx, 
+  if (!SSL_CTX_use_certificate_file(tls->ctx,
 				    ti->cert,
 				    SSL_FILETYPE_PEM)) {
     if (ti->configured > 0) {
@@ -230,8 +230,8 @@
     }
   }
 
-  if (!SSL_CTX_use_PrivateKey_file(tls->ctx, 
-                                   ti->key, 
+  if (!SSL_CTX_use_PrivateKey_file(tls->ctx,
+                                   ti->key,
                                    SSL_FILETYPE_PEM)) {
     if (ti->configured > 0) {
       tls_log_errors(1, "tls_init_context", 0);
@@ -253,8 +253,8 @@
 #endif
   }
 
-  if (!SSL_CTX_load_verify_locations(tls->ctx, 
-                                     ti->CAfile, 
+  if (!SSL_CTX_load_verify_locations(tls->ctx,
+                                     ti->CAfile,
                                      ti->CApath)) {
     if (ti->configured > 0)
       tls_log_errors(1, "tls_init_context", 0);
@@ -264,7 +264,7 @@
 
   SSL_CTX_set_verify_depth(tls->ctx, ti->verify_depth);
 
-  SSL_CTX_set_verify(tls->ctx, 
+  SSL_CTX_set_verify(tls->ctx,
 		     getenv("SSL_VERIFY_PEER") ? SSL_VERIFY_PEER : SSL_VERIFY_NONE
 		     /* SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT */,
                      tls_verify_cb);
@@ -318,8 +318,8 @@
 
 tls_t *tls_init_master(tls_issues_t *ti)
 {
-  /* Default id in case RAND fails */ 
-  unsigned char sessionId[32] = "sofia/tls"; 
+  /* Default id in case RAND fails */
+  unsigned char sessionId[32] = "sofia/tls";
   tls_t *tls;
 
 #if HAVE_SIGPIPE
@@ -342,8 +342,8 @@
 
   SSL_CTX_set_session_id_context(tls->ctx,
                                  (void*) sessionId,
-				 sizeof(sessionId)); 
-  
+				 sizeof(sessionId));
+
   if (ti->CAfile != NULL)
     SSL_CTX_set_client_CA_list(tls->ctx,
                                SSL_load_client_CA_file(ti->CAfile));
@@ -379,7 +379,7 @@
 
   assert(sock != -1);
 
-  tls->bio_con = BIO_new_socket(sock, BIO_NOCLOSE); 
+  tls->bio_con = BIO_new_socket(sock, BIO_NOCLOSE);
   tls->con = SSL_new(tls->ctx);
 
   if (tls->con == NULL) {
@@ -435,10 +435,10 @@
 
   if (!tls) return -1;
 
-  cert = SSL_get_peer_certificate(tls->con); 
+  cert = SSL_get_peer_certificate(tls->con);
   if (!cert)
     return X509_V_OK;
-  
+
   extcount = X509_get_ext_count(cert);
 
   for (k = 0; k < TLS_MAX_HOSTS && tls->hosts[k]; k++)
@@ -455,14 +455,14 @@
 
     ext = X509_get_ext(cert, i);
     name = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
-    
+
     if (strcmp(name, "subjectAltName") != 0)
       continue;
-      
+
     vp = X509V3_EXT_get(ext); if (!vp) continue;
     d2i = X509V3_EXT_d2i(ext);
     values = vp->i2v(vp, d2i, NULL);
-    
+
     for (j = 0; j < sk_CONF_VALUE_num(values); j++) {
       value = sk_CONF_VALUE_value(values, j);
       if (strcmp(value->name, "DNS") == 0) {
@@ -480,18 +480,18 @@
       }
     }
   }
-   
+
   if (k < TLS_MAX_HOSTS) {
     X509_NAME *subject;
     char name[256];
 
     subject = X509_get_subject_name(cert);
     if (subject) {
-      if (X509_NAME_get_text_by_NID(subject, NID_commonName, 
+      if (X509_NAME_get_text_by_NID(subject, NID_commonName,
 				    name, sizeof name) > 0) {
 	name[(sizeof name) - 1] = '\0';
 
-	for (i = 0; tls->hosts[i]; i++) 
+	for (i = 0; tls->hosts[i]; i++)
 	  if (strcasecmp(tls->hosts[i], name) == 0)
 	    break;
 
@@ -507,7 +507,7 @@
 
   if (error == X509_V_OK)
     tls->verified = 1;
-  
+
   return error;
 }
 
@@ -518,7 +518,7 @@
   if (tls == NULL) { errno = EINVAL; return -1; }
   if (!tls->verified) { errno = EAGAIN; return -1; }
 
-  if (!hosts) 
+  if (!hosts)
     return 0;
 
   for (i = 0; hosts[i]; i++) {
@@ -531,7 +531,7 @@
       return -1;
     }
   }
-  
+
   return 0;
 }
 
@@ -605,12 +605,12 @@
   if (!tls->verified) {
     int err = tls_post_connection_check(tls);
 
-    if (err != X509_V_OK && 
+    if (err != X509_V_OK &&
 	err != SSL_ERROR_SYSCALL &&
 	err != SSL_ERROR_WANT_WRITE &&
 	err != SSL_ERROR_WANT_READ) {
       SU_DEBUG_1((
-		 "%s: server certificate doesn't verify\n", 
+		 "%s: server certificate doesn't verify\n",
 		 "tls_read"));
     }
   }
@@ -632,11 +632,11 @@
 
 /** Check if data is available in TCP connection.
  *
- * 
+ *
  *
  * @retval -1 upon an error
  * @retval 0 end-of-stream
- * @retval 1 nothing to read 
+ * @retval 1 nothing to read
  * @retval 2 there is data to read
  */
 int tls_want_read(tls_t *tls, int events)
@@ -660,8 +660,8 @@
 {
   ssize_t ret;
 
-  if (0) 
-    SU_DEBUG_1(("tls_write(%p, %p, "MOD_ZU") called on %s\n", 
+  if (0)
+    SU_DEBUG_1(("tls_write(%p, %p, "MOD_ZU") called on %s\n",
 	    (void *)tls, buf, size,
 	    tls && tls->type == tls_slave ? "server" : "client"));
 
@@ -676,9 +676,9 @@
     assert(tls->write_events == 0);
 
     if (tls->write_events ||
-	buf != tls->write_buffer || 
+	buf != tls->write_buffer ||
 	size < tls->write_buffer_len) {
-      errno = EIO;		
+      errno = EIO;
       return -1;
     }
 
@@ -743,9 +743,9 @@
 
   if (tls->type == tls_master)
     return mask;
-  
+
   return
     (mask & ~(SU_WAIT_IN|SU_WAIT_OUT)) |
-    ((mask & SU_WAIT_IN) ? tls->read_events : 0) | 
+    ((mask & SU_WAIT_IN) ? tls->read_events : 0) |
     ((mask & SU_WAIT_OUT) ? tls->write_events : 0);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.h	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 #ifndef TPORT_TLS_H
 /** Defined when <tport_tls.h> has been included. */
 #define TPORT_TLS_H
-/**@internal 
+/**@internal
  * @file tport_tls.h
  * @brief Internal TLS interface
  *
@@ -58,7 +58,7 @@
   char *cipher;         /* Should be one of the above defined ciphers *
 			 * or NULL (default: "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH
                          */
-  int   version;	/* For tls1, version is 1. When ssl3/ssl2 is 
+  int   version;	/* For tls1, version is 1. When ssl3/ssl2 is
 			 * used, it is 0. */
 } tls_issues_t;
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_connect.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_connect.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_connect.c	Tue Dec 16 13:05:22 2008
@@ -49,14 +49,14 @@
 #include <sofia-sip/http_header.h>
 
 static int tport_http_connect_init_primary(tport_primary_t *,
-					   tp_name_t tpn[1], 
-					   su_addrinfo_t *, 
+					   tp_name_t tpn[1],
+					   su_addrinfo_t *,
 					   tagi_t const *,
 					   char const **return_culprit);
 
 static void tport_http_connect_deinit_primary(tport_primary_t *);
 
-static tport_t *tport_http_connect(tport_primary_t *pri, su_addrinfo_t *ai, 
+static tport_t *tport_http_connect(tport_primary_t *pri, su_addrinfo_t *ai,
 				   tp_name_t const *tpn);
 
 static void tport_http_deliver(tport_t *self, msg_t *msg, su_time_t now);
@@ -94,8 +94,8 @@
 };
 
 static int tport_http_connect_init_primary(tport_primary_t *pri,
-					   tp_name_t tpn[1], 
-					   su_addrinfo_t *ai, 
+					   tp_name_t tpn[1],
+					   su_addrinfo_t *ai,
 					   tagi_t const *tags,
 					   char const **return_culprit)
 {
@@ -122,13 +122,13 @@
     port = "8080";
 
   memcpy(hints, ai, sizeof hints);
-  
+
   hints->ai_flags = 0;
   hints->ai_addr = NULL;
   hints->ai_addrlen = 0;
   hints->ai_next = NULL;
   hints->ai_canonname = NULL;
-  
+
   error = su_getaddrinfo(host, port, hints, &thc->thc_proxy);
   if (error)
     return *return_culprit = "su_getaddrinfo", -1;
@@ -139,24 +139,24 @@
 static void tport_http_connect_deinit_primary(tport_primary_t *pri)
 {
   tport_http_connect_t *thc = (tport_http_connect_t *)pri;
-  
+
   su_freeaddrinfo(thc->thc_proxy), thc->thc_proxy = NULL;
 }
 
-static tport_t *tport_http_connect(tport_primary_t *pri, su_addrinfo_t *ai, 
+static tport_t *tport_http_connect(tport_primary_t *pri, su_addrinfo_t *ai,
 				   tp_name_t const *tpn)
 {
   tport_http_connect_t *thc = (tport_http_connect_t *)pri;
   tport_http_connect_instance_t *thci;
   tport_master_t *mr = pri->pri_master;
-  
+
   msg_t *msg, *response;
 
   char hostport[TPORT_HOSTPORTSIZE];
 
   tport_t *tport;
   http_request_t *rq;
-  
+
   msg = msg_create(http_default_mclass(), 0);
 
   if (!msg)
@@ -167,21 +167,21 @@
   rq = http_request_format(msg_home(msg), "CONNECT %s HTTP/1.1", hostport);
 
   if (msg_header_insert(msg, NULL, (void *)rq) < 0
-      || msg_header_add_str(msg, NULL, 
+      || msg_header_add_str(msg, NULL,
 			    "User-Agent: Sofia-SIP/" VERSION "\n") < 0
       || msg_header_add_str(msg, NULL, "Proxy-Connection: keepalive\n") < 0
       || msg_header_add_make(msg, NULL, http_host_class, hostport) < 0
-      || msg_header_add_make(msg, NULL, http_separator_class, "\r\n") < 0 
+      || msg_header_add_make(msg, NULL, http_separator_class, "\r\n") < 0
       || msg_serialize(msg, NULL) < 0
       || msg_prepare(msg) < 0)
     return (void)msg_destroy(msg), NULL;
 
-  /* 
-   * Create a response message that ignores the body 
-   * if there is no Content-Length 
+  /*
+   * Create a response message that ignores the body
+   * if there is no Content-Length
    */
   response = msg_create(http_default_mclass(), mr->mr_log | MSG_FLG_MAILBOX);
-  
+
   tport = tport_base_connect(pri, thc->thc_proxy, ai, tpn);
   if (!tport) {
     msg_destroy(msg); msg_destroy(response);
@@ -189,17 +189,17 @@
   }
 
   thci = (tport_http_connect_instance_t*)tport;
-  
+
   thci->thci_response = response;
   tport->tp_msg = response;
   msg_set_next(response, thci->thci_stackmsg = tport_msg_alloc(tport, 512));
 
   if (tport_send_msg(tport, msg, tpn, NULL) < 0) {
     SU_DEBUG_9(("tport_send_msg failed in tpot_http_connect\n"));
-    msg_destroy(msg); 
+    msg_destroy(msg);
     tport_zap_secondary(tport);
     return NULL;
-  }  
+  }
 
   tport_set_secondary_timer(tport);
 
@@ -217,7 +217,7 @@
     http_t *http = http_object(msg);
 
     if (http && http->http_status) {
-      SU_DEBUG_0(("tport_http_connect: %u %s\n", 
+      SU_DEBUG_0(("tport_http_connect: %u %s\n",
 		  http->http_status->st_status,
 		  http->http_status->st_phrase));
       if (http->http_status->st_status < 300) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c	Tue Dec 16 13:05:22 2008
@@ -67,7 +67,7 @@
 typedef struct tport_sctp_t
 {
   tport_t sctp_base[1];
-  
+
   msg_t *sctp_recv[MAX_STREAMS];
   struct sctp_send {
     msg_t *ss_msg;
@@ -80,17 +80,17 @@
 
 #define TP_SCTP_MSG_MAX (65536)
 
-static int tport_sctp_init_primary(tport_primary_t *, 
-				   tp_name_t tpn[1], 
+static int tport_sctp_init_primary(tport_primary_t *,
+				   tp_name_t tpn[1],
 				   su_addrinfo_t *, tagi_t const *,
 				   char const **return_culprit);
-static int tport_sctp_init_client(tport_primary_t *, 
-				  tp_name_t tpn[1], 
+static int tport_sctp_init_client(tport_primary_t *,
+				  tp_name_t tpn[1],
 				  su_addrinfo_t *, tagi_t const *,
 				  char const **return_culprit);
 static int tport_sctp_init_secondary(tport_t *self, int socket, int accepted,
 				     char const **return_reason);
-static int tport_sctp_init_socket(tport_primary_t *pri, 
+static int tport_sctp_init_socket(tport_primary_t *pri,
 				  int socket,
 				  char const **return_reason);
 static int tport_recv_sctp(tport_t *self);
@@ -148,7 +148,7 @@
   tport_sctp_timer,
 };
 
-static int tport_sctp_init_primary(tport_primary_t *pri, 
+static int tport_sctp_init_primary(tport_primary_t *pri,
 				   tp_name_t tpn[1],
 				   su_addrinfo_t *ai,
 				   tagi_t const *tags,
@@ -166,11 +166,11 @@
 
   if (tport_sctp_init_socket(pri, socket, return_culprit) < 0)
     return -1;
-  
+
   return tport_stream_init_primary(pri, socket, tpn, ai, tags, return_culprit);
 }
 
-static int tport_sctp_init_client(tport_primary_t *pri, 
+static int tport_sctp_init_client(tport_primary_t *pri,
 				  tp_name_t tpn[1],
 				  su_addrinfo_t *ai,
 				  tagi_t const *tags,
@@ -197,7 +197,7 @@
 }
 
 /** Initialize a SCTP socket */
-static int tport_sctp_init_socket(tport_primary_t *pri, 
+static int tport_sctp_init_socket(tport_primary_t *pri,
 				  int socket,
 				  char const **return_reason)
 {
@@ -215,11 +215,11 @@
 /** Receive data available on the socket.
  *
  * @retval -1 error
- * @retval 0  end-of-stream  
+ * @retval 0  end-of-stream
  * @retval 1  normal receive
  * @retval 2  incomplete recv, recv again
  */
-static 
+static
 int tport_recv_sctp(tport_t *self)
 {
   msg_t *msg;
@@ -266,14 +266,14 @@
 static ssize_t tport_send_sctp(tport_t const *self, msg_t *msg,
 			       msg_iovec_t iov[], size_t iovused)
 {
-  
+
 
   return su_vsend(self->tp_socket, iov, iovused, MSG_NOSIGNAL, NULL, 0);
 }
 
 /** Calculate tick timer if send is pending. */
 int tport_next_sctp_send_tick(tport_t *self,
-			    su_time_t *return_target, 
+			    su_time_t *return_target,
 			    char const **return_why)
 {
   unsigned timeout = 100;  /* Retry 10 times a second... */
@@ -293,7 +293,7 @@
   unsigned timeout = 100;
 
   /* Send timeout */
-  if (tport_has_queued(self) && 
+  if (tport_has_queued(self) &&
       su_time_cmp(su_time_add(self->tp_ktime, timeout), now) < 0) {
     uint64_t bytes = self->tp_stats.sent_bytes;
     su_time_t stime = self->tp_stime;
@@ -307,10 +307,10 @@
 
 /** Calculate next timer for SCTP. */
 int tport_sctp_next_timer(tport_t *self,
-			 su_time_t *return_target, 
+			 su_time_t *return_target,
 			 char const **return_why)
 {
-  return 
+  return
     tport_next_recv_timeout(self, return_target, return_why) |
     tport_next_sctp_send_tick(self, return_target, return_why);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_stun.c	Tue Dec 16 13:05:22 2008
@@ -50,8 +50,8 @@
 #include <sofia-sip/stun.h>
 
 static int tport_udp_init_stun(tport_primary_t *,
-			       tp_name_t tpn[1], 
-			       su_addrinfo_t *, 
+			       tp_name_t tpn[1],
+			       su_addrinfo_t *,
 			       tagi_t const *,
 			       char const **return_culprit);
 
@@ -98,8 +98,8 @@
 };
 
 static int tport_udp_init_stun(tport_primary_t *pri,
-			       tp_name_t tpn[1], 
-			       su_addrinfo_t *ai, 
+			       tp_name_t tpn[1],
+			       su_addrinfo_t *ai,
 			       tagi_t const *tags,
 			       char const **return_culprit)
 {
@@ -121,7 +121,7 @@
     return -1;
 
 #if 0
-  if (stun_obtain_shared_secret(sh, tport_stun_tls_cb, pri, 
+  if (stun_obtain_shared_secret(sh, tport_stun_tls_cb, pri,
 				TAG_NEXT(tags)) < 0) {
     return *return_culprit = "stun_request_shared_secret()", -1;
   }
@@ -142,8 +142,8 @@
 
 static void tport_udp_deinit_stun(tport_primary_t *pri)
 {
-  if (pri->pri_stun_handle) 
-    stun_handle_destroy(pri->pri_stun_handle); 
+  if (pri->pri_stun_handle)
+    stun_handle_destroy(pri->pri_stun_handle);
   pri->pri_stun_handle = NULL;
 }
 
@@ -195,18 +195,18 @@
     char ipname[SU_ADDRSIZE + 2] = { 0 };
     ai->ai_addr = (void *)su;
 
-    SU_DEBUG_5(("%s: stun_bind() ok: local address NATed as %s:%u\n", 
+    SU_DEBUG_5(("%s: stun_bind() ok: local address NATed as %s:%u\n",
 		__func__,
 		su_inet_ntop(su->su_family, SU_ADDR(su),
 			     ipname, sizeof(ipname)),
 		(unsigned) ntohs(su->su_port)));
   }
 
-  /* Send message to calling application indicating 
-   * there's a new public address available 
+  /* Send message to calling application indicating
+   * there's a new public address available
    */
   tport_has_been_updated(self);
-  
+
   return;
 }
 
@@ -221,12 +221,12 @@
   tport_primary_t *pri = tp->tp_pri;
   int err;
 
-  err = stun_keepalive(pri->pri_stun_handle, 
+  err = stun_keepalive(pri->pri_stun_handle,
 		       (su_sockaddr_t *)ai->ai_addr,
 		       STUNTAG_SOCKET(tp->tp_socket),
 		       STUNTAG_TIMEOUT(10000),
 		       TAG_NEXT(taglist));
-  
+
   if (err < 0)
     return -1;
 

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c	Tue Dec 16 13:05:22 2008
@@ -111,7 +111,7 @@
 
 static int tport_tcp_setsndbuf(int socket, int atleast);
 
-int tport_tcp_init_primary(tport_primary_t *pri, 
+int tport_tcp_init_primary(tport_primary_t *pri,
 			   tp_name_t tpn[1],
 			   su_addrinfo_t *ai,
 			   tagi_t const *tags,
@@ -129,7 +129,7 @@
   return tport_stream_init_primary(pri, socket, tpn, ai, tags, return_culprit);
 }
 
-int tport_stream_init_primary(tport_primary_t *pri, 
+int tport_stream_init_primary(tport_primary_t *pri,
 			      su_socket_t socket,
 			      tp_name_t tpn[1],
 			      su_addrinfo_t *ai,
@@ -168,7 +168,7 @@
   return 0;
 }
 
-int tport_tcp_init_client(tport_primary_t *pri, 
+int tport_tcp_init_client(tport_primary_t *pri,
 			  tp_name_t tpn[1],
 			  su_addrinfo_t *ai,
 			  tagi_t const *tags,
@@ -223,7 +223,7 @@
 {
   size_t i;
   char const *b = buffer;
-  
+
   for (i = 0; i < len; i++) {
     if (b[i] != '\r' && b[i] != '\n' && b[i] != ' ' && b[i] != '\t')
       break;
@@ -235,10 +235,10 @@
 /** Receive from stream.
  *
  * @retval -1 error
- * @retval 0  end-of-stream  
+ * @retval 0  end-of-stream
  * @retval 1  normal receive
  * @retval 2  incomplete recv, recv again
- * 
+ *
  */
 int tport_recv_stream(tport_t *self)
 {
@@ -343,8 +343,8 @@
 }
 
 /** Send to stream */
-ssize_t tport_send_stream(tport_t const *self, msg_t *msg, 
-			  msg_iovec_t iov[], 
+ssize_t tport_send_stream(tport_t const *self, msg_t *msg,
+			  msg_iovec_t iov[],
 			  size_t iovused)
 {
 #if __sun__			/* XXX - there must be a better way... */
@@ -356,7 +356,7 @@
 
 /** Calculate timeout if receive is incomplete. */
 int tport_next_recv_timeout(tport_t *self,
-			    su_time_t *return_target, 
+			    su_time_t *return_target,
 			    char const **return_why)
 {
   unsigned timeout = self->tp_params->tpp_timeout;
@@ -388,7 +388,7 @@
   unsigned timeout = self->tp_params->tpp_timeout;
 
   if (timeout < INT_MAX) {
-    if (self->tp_msg && 
+    if (self->tp_msg &&
 	su_time_cmp(su_time_add(self->tp_rtime, timeout), now) < 0) {
       msg_t *msg = self->tp_msg;
       msg_set_streaming(msg, 0);
@@ -399,7 +399,7 @@
 
 #if 0
     /* Send timeout */
-    if (tport_has_queued(self) && 
+    if (tport_has_queued(self) &&
 	su_time_cmp(su_time_add(self->tp_stime, timeout), now) < 0) {
       stime = su_time_add(self->tp_stime, self->tp_params->tpp_timeout);
       if (su_time_cmp(stime, target) < 0)
@@ -411,7 +411,7 @@
 
 /** Calculate next timeout for keepalive */
 int tport_next_keepalive(tport_t *self,
-			 su_time_t *return_target, 
+			 su_time_t *return_target,
 			 char const **return_why)
 {
   /* Keepalive timer */
@@ -446,9 +446,9 @@
   if (timeout != 0) {
     if (self->tp_ptime.tv_sec && !self->tp_recv_close &&
 	su_time_cmp(su_time_add(self->tp_ptime, timeout), now) < 0) {
-      SU_DEBUG_3(("%s(%p): %s to " TPN_FORMAT "%s\n", 
+      SU_DEBUG_3(("%s(%p): %s to " TPN_FORMAT "%s\n",
 		  __func__, (void *)self,
-		  "closing connection", TPN_ARGS(self->tp_name), 
+		  "closing connection", TPN_ARGS(self->tp_name),
 		  " because of PONG timeout"));
       tport_error_report(self, EPIPE, NULL);
       if (!self->tp_closed)
@@ -488,8 +488,8 @@
     int error = su_errno();
 
     why = " failed";
-    
-    if (!su_is_blocking(error)) 
+
+    if (!su_is_blocking(error))
       tport_error_report(self, error, NULL);
     else
       why = " blocking";
@@ -497,7 +497,7 @@
     return -1;
   }
 
-  SU_DEBUG_7(("%s(%p): %s to " TPN_FORMAT "%s\n", 
+  SU_DEBUG_7(("%s(%p): %s to " TPN_FORMAT "%s\n",
 	      __func__, (void *)self,
 	      "sending PING", TPN_ARGS(self->tp_name), why));
 
@@ -512,7 +512,7 @@
   if (tport_has_queued(self) || !self->tp_params->tpp_pong2ping)
     return 0;
 
-  SU_DEBUG_7(("%s(%p): %s to " TPN_FORMAT "%s\n", 
+  SU_DEBUG_7(("%s(%p): %s to " TPN_FORMAT "%s\n",
 	      __func__, (void *)self,
 	      "sending PONG", TPN_ARGS(self->tp_name), ""));
 
@@ -521,10 +521,10 @@
 
 /** Calculate next timer for TCP. */
 int tport_tcp_next_timer(tport_t *self,
-			 su_time_t *return_target, 
+			 su_time_t *return_target,
 			 char const **return_why)
 {
-  return 
+  return
     tport_next_recv_timeout(self, return_target, return_why) |
     tport_next_keepalive(self, return_target, return_why);
 }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c	Tue Dec 16 13:05:22 2008
@@ -54,11 +54,11 @@
 #include "tport_tls.h"
 
 static int tport_tls_init_primary(tport_primary_t *,
-				  tp_name_t tpn[1], 
+				  tp_name_t tpn[1],
 				  su_addrinfo_t *, tagi_t const *,
 				  char const **return_culprit);
 static int tport_tls_init_client(tport_primary_t *,
-				 tp_name_t tpn[1], 
+				 tp_name_t tpn[1],
 				 su_addrinfo_t *, tagi_t const *,
 				 char const **return_culprit);
 static int tport_tls_init_master(tport_primary_t *pri,
@@ -180,7 +180,7 @@
       homedir = "";
     path = tbf = su_sprintf(autohome, "%s/.sip/auth", homedir);
   }
-  
+
   if (path) {
     ti.verify_depth = 2;
     ti.configured = path != tbf;
@@ -248,7 +248,7 @@
   tport_tls_t *tlstp = (tport_tls_t *)self;
 
   /* XXX - PPe: does the tls_shutdown zap everything but socket? */
-  if (tlstp->tlstp_context != NULL) 
+  if (tlstp->tlstp_context != NULL)
     tls_free(tlstp->tlstp_context);
   tlstp->tlstp_context = NULL;
 
@@ -277,16 +277,16 @@
   int mask = tls_events(tlstp->tlstp_context, self->tp_events);
 
   SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n",
-	      "tport_tls_set_events", (void *)self, 
+	      "tport_tls_set_events", (void *)self,
 	      (self->tp_events & SU_WAIT_IN) ? " IN" : "",
 	      (self->tp_events & SU_WAIT_OUT) ? " OUT" : "",
 	      (mask & SU_WAIT_IN) ? " IN" : "",
 	      (mask & SU_WAIT_OUT) ? " OUT" : ""));
 
   return
-    su_root_eventmask(self->tp_master->mr_root, 
-		      self->tp_index, 
-		      self->tp_socket, 
+    su_root_eventmask(self->tp_master->mr_root,
+		      self->tp_index,
+		      self->tp_socket,
 		      mask);
 }
 
@@ -307,7 +307,7 @@
     else if (ret < 0)
       tport_error_report(self, errno, NULL);
   }
-  
+
   if ((self->tp_events & SU_WAIT_IN) && !self->tp_closed) {
     for (;;) {
       ret = tls_want_read(tlstp->tlstp_context, events);
@@ -344,15 +344,15 @@
     return 0;
 
   SU_DEBUG_7(("%s(%p): logical events%s%s real%s%s\n",
-	      "tport_tls_events", (void *)self, 
+	      "tport_tls_events", (void *)self,
 	      (events & SU_WAIT_IN) ? " IN" : "",
 	      (events & SU_WAIT_OUT) ? " OUT" : "",
 	      (mask & SU_WAIT_IN) ? " IN" : "",
 	      (mask & SU_WAIT_OUT) ? " OUT" : ""));
 
-  su_root_eventmask(self->tp_master->mr_root, 
-		    self->tp_index, 
-		    self->tp_socket, 
+  su_root_eventmask(self->tp_master->mr_root,
+		    self->tp_index,
+		    self->tp_socket,
 		    mask);
 
   return 0;
@@ -361,12 +361,12 @@
 /** Receive data from TLS.
  *
  * @retval -1 error
- * @retval 0  end-of-stream  
+ * @retval 0  end-of-stream
  * @retval 1  normal receive
  * @retval 2  incomplete recv, recv again
- * 
+ *
  */
-static 
+static
 int tport_tls_recv(tport_t *self)
 {
   tport_tls_t *tlstp = (tport_tls_t *)self;
@@ -407,7 +407,7 @@
     memcpy(iovec[i].mv_base, tls_buf + n, m);
     n += m;
   }
-    
+
   assert(N == n);
 
   /* Write the received data to the message dump file */
@@ -449,7 +449,7 @@
 
   for (i = 0; i < iovlen; i = j) {
 #if 0
-    nerror = tls_write(tlstp->tlstp_context, 
+    nerror = tls_write(tlstp->tlstp_context,
 		  iov[i].siv_base,
 		  m = iov[i].siv_len);
     j = i + 1;
@@ -460,7 +460,7 @@
     if (i + 1 == iovlen)
       buf = NULL;		/* Don't bother copying single chunk */
 
-    if (buf && 
+    if (buf &&
 	(char *)iov[i].siv_base - buf < TLSBUFSIZE &&
 	(char *)iov[i].siv_base - buf >= 0) {
       tlsbufsize = buf + TLSBUFSIZE - (char *)iov[i].siv_base;
@@ -483,8 +483,8 @@
     nerror = tls_write(tlstp->tlstp_context, buf, m);
 #endif
 
-    SU_DEBUG_9(("tport_tls_writevec: vec %p %p %lu ("MOD_ZD")\n",  
-		(void *)tlstp->tlstp_context, (void *)iov[i].siv_base, (LU)iov[i].siv_len, 
+    SU_DEBUG_9(("tport_tls_writevec: vec %p %p %lu ("MOD_ZD")\n",
+		(void *)tlstp->tlstp_context, (void *)iov[i].siv_base, (LU)iov[i].siv_len,
 		nerror));
 
     if (nerror == -1) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_udp.c	Tue Dec 16 13:05:22 2008
@@ -131,16 +131,16 @@
   tport_set_tos(s, ai, pri->pri_params->tpp_tos);
 
 #if HAVE_IP_ADD_MEMBERSHIP
-  if (ai->ai_family == AF_INET && 
+  if (ai->ai_family == AF_INET &&
       IN_MULTICAST(ntohl(su->su_sin.sin_addr.s_addr))) {
     /* Try to join to the multicast group */
-    /* Bind to the SIP address like 
+    /* Bind to the SIP address like
        <sip:88.77.66.55:5060;maddr=224.0.1.75;transport=udp> */
     struct ip_mreq imr[1];
     struct in_addr iface;
 
     memset(imr, 0, sizeof imr);
-      
+
     imr->imr_multiaddr = su->su_sin.sin_addr;
 
     if (host_is_ip4_address(tpn->tpn_canon) &&
@@ -153,7 +153,7 @@
 		  "IP_ADD_MEMBERSHIP", su_strerror(su_errno())));
     }
 #if HAVE_IP_MULTICAST_LOOP
-    else 
+    else
       if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &one, sizeof one) < 0) {
 	SU_DEBUG_3(("setsockopt(%s): %s\n",
 		    "IP_MULTICAST_LOOP", su_strerror(su_errno())));
@@ -191,26 +191,26 @@
   }
 #endif
 
-  tl_gets(tags, 
+  tl_gets(tags,
 	  TPTAG_UDP_RMEM_REF(rmem),
 	  TPTAG_UDP_WMEM_REF(wmem),
 	  TAG_END());
 
-  if (rmem != 0 && 
+  if (rmem != 0 &&
 #if HAVE_SO_RCVBUFFORCE
       setsockopt(s, SOL_SOCKET, SO_RCVBUFFORCE, (void *)&rmem, sizeof rmem) < 0 &&
 #endif
       setsockopt(s, SOL_SOCKET, SO_RCVBUF, (void *)&rmem, sizeof rmem) < 0) {
-    SU_DEBUG_3(("setsockopt(SO_RCVBUF): %s\n", 
+    SU_DEBUG_3(("setsockopt(SO_RCVBUF): %s\n",
 		su_strerror(su_errno())));
   }
 
-  if (wmem != 0 && 
+  if (wmem != 0 &&
 #if HAVE_SO_SNDBUFFORCE
       setsockopt(s, SOL_SOCKET, SO_SNDBUFFORCE, (void *)&wmem, sizeof wmem) < 0 &&
 #endif
       setsockopt(s, SOL_SOCKET, SO_SNDBUF, (void *)&wmem, sizeof wmem) < 0) {
-    SU_DEBUG_3(("setsockopt(SO_SNDBUF): %s\n", 
+    SU_DEBUG_3(("setsockopt(SO_SNDBUF): %s\n",
 		su_strerror(su_errno())));
   }
 
@@ -255,7 +255,7 @@
     return;
 
   for (;;) {
-    n = su_recvfrom(tp->tp_socket, buffer, sizeof buffer, MSG_TRUNC, 
+    n = su_recvfrom(tp->tp_socket, buffer, sizeof buffer, MSG_TRUNC,
 		    (void *)&su, &sulen);
 
     if (n > (ssize_t)sizeof buffer) {
@@ -273,7 +273,7 @@
 /** Receive datagram.
  *
  * @retval -1 error
- * @retval 0  end-of-stream  
+ * @retval 0  end-of-stream
  * @retval 1  normal receive (should never happen)
  * @retval 2  incomplete recv, call me again (should never happen)
  * @retval 3  STUN keepalive, ignore
@@ -289,7 +289,7 @@
   uint8_t sample[1];
 
   /* Simulate packet loss */
-  if (self->tp_params->tpp_drop && 
+  if (self->tp_params->tpp_drop &&
       (unsigned)su_randint(0, 1000) < self->tp_params->tpp_drop) {
     su_recv(self->tp_socket, sample, 1, 0);
     SU_DEBUG_3(("tport(%p): simulated packet loss!\n", (void *)self));
@@ -326,9 +326,9 @@
   from = (su_sockaddr_t *)ai->ai_addr, fromlen = (socklen_t)(ai->ai_addrlen);
 
   n = su_vrecv(self->tp_socket, iovec, veclen, 0, from, &fromlen);
-  
+
   ai->ai_addrlen = fromlen;
-  
+
   if (n == SOCKET_ERROR) {
     int error = su_errno();
     msg_destroy(msg); self->tp_msg = NULL;
@@ -360,7 +360,7 @@
 
   if ((sample[0] & 0xf8) == 0xf8)
     /* SigComp */
-    return tport_recv_comp_dgram(self, self->tp_comp, &self->tp_msg, 
+    return tport_recv_comp_dgram(self, self->tp_comp, &self->tp_msg,
 				 from, fromlen);
 #if HAVE_SOFIA_STUN
   else if (sample[0] == 0 || sample[0] == 1)
@@ -372,8 +372,8 @@
 }
 
 /** Send using su_vsend(). Map IPv4 addresses as IPv6 addresses, if needed. */
-ssize_t tport_send_dgram(tport_t const *self, msg_t *msg, 
-			 msg_iovec_t iov[], 
+ssize_t tport_send_dgram(tport_t const *self, msg_t *msg,
+			 msg_iovec_t iov[],
 			 size_t iovused)
 {
   su_sockaddr_t su[1];
@@ -481,12 +481,12 @@
 	break;
       case SO_EE_ORIGIN_ICMP:
 	origin = "icmp";
-	snprintf(info, sizeof(info), " type=%u code=%u", 
+	snprintf(info, sizeof(info), " type=%u code=%u",
 		 ee->ee_type, ee->ee_code);
 	break;
       case SO_EE_ORIGIN_ICMP6:
 	origin = "icmp6";
-	snprintf(info, sizeof(info), " type=%u code=%u", 
+	snprintf(info, sizeof(info), " type=%u code=%u",
 		ee->ee_type, ee->ee_code);
 	break;
       case SO_EE_ORIGIN_NONE:
@@ -498,11 +498,11 @@
       }
 
       if (ee->ee_info)
-	snprintf(info + strlen(info), sizeof(info) - strlen(info), 
+	snprintf(info + strlen(info), sizeof(info) - strlen(info),
 		 " info=%08x", ee->ee_info);
 
       SU_DEBUG_3(("%s: %s (%d) [%s%s]\n",
-		  __func__, su_strerror(ee->ee_errno), ee->ee_errno, 
+		  __func__, su_strerror(ee->ee_errno), ee->ee_errno,
 		  origin, info));
       if (from->su_family != AF_UNSPEC)
 	SU_DEBUG_3(("\treported by [%s]:%u\n",

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url.h	Tue Dec 16 13:05:22 2008
@@ -34,7 +34,7 @@
 #ifndef URL_H_TYPES
 #define URL_H_TYPES
 
-/** Recognized URL schemes (value of url_t.url_type). 
+/** Recognized URL schemes (value of url_t.url_type).
  *
  * @sa &lt;<a href="http://www.iana.org/assignments/uri-schemes.html">http://www.iana.org/assignments/uri-schemes.html</a>&gt;
  */
@@ -63,12 +63,12 @@
   _url_none
 };
 
-/** URL structure. 
- * 
+/** URL structure.
+ *
  * This structure is used to present a parsed URL.
  */
 typedef struct {
-  char                url_pad[sizeof(void *) - 2];   
+  char                url_pad[sizeof(void *) - 2];
 				    /**< Zero pad for URL_STRING_P(). */
   signed char         url_type;	    /**< URL type (url_type_e). */
   char                url_root;	    /**< Nonzero if root "//" */
@@ -83,13 +83,13 @@
   char const         *url_fragment; /**< Fragment (separated by #) */
 } url_t;
 
-enum { 
+enum {
   /** Maximum size of a URL. */
   URL_MAXLEN = 65536
 };
 
 /** Type to present either a parsed URL or string.
- * 
+ *
  * The union type url_string_t is used to pass a parsed URL or string as a
  * parameter. The URL_STRING_P() checks if a passed pointer points to a
  * string or a parsed URL. Testing requires that the first character of the
@@ -113,7 +113,7 @@
 
 SOFIA_BEGIN_DECLS
 
-/** Convert a string to a url struct. */ 
+/** Convert a string to a url struct. */
 SOFIAPUBFUN url_t *url_make(su_home_t *h, char const *str);
 
 /** Convert a string formatting result to a url struct. */
@@ -122,7 +122,7 @@
 /** Convert #url_t to a string allocated from @a home */
 SOFIAPUBFUN char *url_as_string(su_home_t *home, url_t const *url);
 
-/** Duplicate the url to memory allocated via home */ 
+/** Duplicate the url to memory allocated via home */
 SOFIAPUBFUN url_t *url_hdup(su_home_t *h, url_t const *src);
 
 /** Sanitize a URL. */
@@ -169,7 +169,7 @@
 /* Query handling */
 
 /** Convert a URL query to a header string. */
-SOFIAPUBFUN char *url_query_as_header_string(su_home_t *home, 
+SOFIAPUBFUN char *url_query_as_header_string(su_home_t *home,
 					     char const *query);
 
 /* ---------------------------------------------------------------------- */
@@ -195,8 +195,8 @@
 /* ---------------------------------------------------------------------- */
 /* Initializing */
 
-/** Initializer for an #url_t structure. @HI 
- * 
+/** Initializer for an #url_t structure. @HI
+ *
  * The macro URL_INIT_AS() is used to initialize a #url_t structure with a
  * known url type:
  * @code
@@ -229,11 +229,11 @@
 /* ---------------------------------------------------------------------- */
 /* url_string_t handling */
 
-/** Test if a pointer to #url_string_t is a string 
+/** Test if a pointer to #url_string_t is a string
  * (not a pointer to a #url_t structure). */
 #define URL_STRING_P(u) ((u) && *((url_string_t*)(u))->us_str != 0)
 
-/** Test if a pointer to #url_string_t is a string 
+/** Test if a pointer to #url_string_t is a string
  * (not a pointer to a #url_t structure). */
 #define URL_IS_STRING(u) ((u) && *((url_string_t*)(u))->us_str != 0)
 
@@ -306,10 +306,10 @@
 /** Calculate the size of srings attached to the url. */
 SOFIAPUBFUN isize_t url_xtra(url_t const * url);
 
-/** Duplicate the url in the provided memory area. */ 
+/** Duplicate the url in the provided memory area. */
 SOFIAPUBFUN issize_t url_dup(char *, isize_t , url_t *dst, url_t const *src);
 
-/** Duplicate the url: use @a buf up to @a end. @HI */ 
+/** Duplicate the url: use @a buf up to @a end. @HI */
 #define URL_DUP(buf, end, dst, src) \
   (buf) += url_dup((buf), (isize_t)((buf) < (end) ? (end) - (buf) : 0), (dst), (src))
 

Modified: 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.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag.h	Tue Dec 16 13:05:22 2008
@@ -59,9 +59,9 @@
 #define URLTAG_URL_REF(u)  urltag_url_ref, urltag_url_vr(&(u))
 
 #if SU_HAVE_INLINE
-su_inline 
+su_inline
 tag_value_t urltag_url_v(void const *v) { return (tag_value_t)v; }
-su_inline 
+su_inline
 tag_value_t urltag_url_vr(url_string_t const **vp) { return(tag_value_t)vp; }
 #else
 #define urltag_url_v(v)   (tag_value_t)(v)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag_class.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag_class.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/sofia-sip/url_tag_class.h	Tue Dec 16 13:05:22 2008
@@ -24,7 +24,7 @@
 
 #ifndef URL_TAG_CLASS_H
 /**Defined when <sofia-sip/url_tag_class.h> has been included. */
-#define URL_TAG_CLASS_H 
+#define URL_TAG_CLASS_H
 /**@file  url_tag_class.h
  * @brief Tag classes for URLs
  *

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/torture_url.c	Tue Dec 16 13:05:22 2008
@@ -71,9 +71,9 @@
                       "abcdefghijklmnopqrstuvwxyz" \
                       "0123456789" \
                       "-_.!~*'()"
-  
+
   char unreserved[26 + 26 + 10 + 9 + 1];
-  
+
   BEGIN();
 
   d = url_as_string(home, (url_t *)"sip:joe at example.com");
@@ -86,9 +86,9 @@
   TEST_1(!url_reserved_p(""));
   TEST_1(url_reserved_p("foobar:bar"));
 
-  TEST_SIZE(url_esclen("a" EXCLUDED, ""), 
+  TEST_SIZE(url_esclen("a" EXCLUDED, ""),
 	    1 + strlen(RESERVED) + 3 * strlen(DELIMS UNWISE));
-  TEST_SIZE(url_esclen("a" EXCLUDED, DELIMS UNWISE), 
+  TEST_SIZE(url_esclen("a" EXCLUDED, DELIMS UNWISE),
 	    1 + strlen(RESERVED) + 3 * strlen(DELIMS UNWISE));
   TEST_SIZE(url_esclen("a" EXCLUDED, EXCLUDED), 1 + 3 * strlen(EXCLUDED));
   TEST_SIZE(url_esclen("a" EXCLUDED, NULL), 1 + 3 * strlen(EXCLUDED));
@@ -184,14 +184,14 @@
   TEST_1(u = url_hdup(home, url));
   TEST(u->url_type, url_any);
   TEST(url_cmp(any, u), 0);
-  
+
   url_digest(hash1, sizeof(hash1), url, NULL);
   url_digest(hash2, sizeof(hash2), (url_t *)"*", NULL);
   TEST(memcmp(hash1, hash2, sizeof(hash1)), 0);
 
   {
     char buf[6];
-    
+
     TEST_1(u = url_hdup(home, (void *)"error"));
     TEST_SIZE(url_xtra(u), 6);
     TEST_SIZE(url_dup(buf, 6, url, u), 6);
@@ -227,7 +227,7 @@
   }
 
   su_home_deinit(home);
-  
+
   END();
 }
 
@@ -238,17 +238,17 @@
   url_t sip[1] = { URL_INIT_AS(sip) };
   url_t *u, url[1];
   char *tst, *s;
-  char sipurl0[] = 
+  char sipurl0[] =
     "sip:pekka%2Epessi at nokia%2Ecom;method=%4D%45%53%53%41%47%45"
     "?body=CANNED%20MSG";
-  char sipurl[] = 
+  char sipurl[] =
     "sip:user:pass at host:32;param=1"
     "?From=foo at bar&To=bar at baz#unf";
-  char sip2url[] = 
+  char sip2url[] =
     "sip:user/path;tel-param:pass at host:32;param=1%3d%3d1"
     "?From=foo at bar&To=bar at baz#unf";
   char sip2[sizeof(sipurl) + 32];
-  char sipsurl[] = 
+  char sipsurl[] =
     "sips:user:pass at host:32;param=1"
     "?From=foo at bar&To=bar at baz#unf";
   size_t i, j;
@@ -277,7 +277,7 @@
 
   TEST_S(url_query_as_header_string(home, url->url_headers),
 	 "\n\nCANNED MSG");
-  
+
   sip->url_user = "user";
   sip->url_password = "pass";
   sip->url_host = "host";
@@ -297,7 +297,7 @@
   TEST_1(url_cmp(sip, u) == 0);
   TEST(url_e(sip2, sizeof(sip2), u), strlen(sipurl));
   TEST_1(strcmp(sip2, sipurl) == 0);
-  TEST_SIZE(snprintf(sip2, sizeof(sip2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(sip2, sizeof(sip2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(sip)), strlen(sipurl));
   TEST_1(strcmp(sip2, sipurl) == 0);
 
@@ -395,11 +395,11 @@
 
   u = url_hdup(home, (void*)"sip:u:p at host:5060;user=phone;transport=tcp");
   TEST_1(u);
-  TEST_1(url_have_transport(u));  
+  TEST_1(url_have_transport(u));
   TEST_1(url_strip_transport(u));
   TEST_S(u->url_params, "user=phone");
   TEST_1(!url_have_transport(u));
-  
+
   u = url_hdup(home, (void*)"sip:u:p at host;user=phone;;");
   TEST_1(u);
   /* We don't have transport params */
@@ -470,14 +470,14 @@
   char *tst;
   char wvurl[] = "wv:+12345678 at imps.com";
   char wv2[sizeof(wvurl) + 32];
-  
+
   BEGIN();
 
   TEST_S(url_scheme(url_wv), "wv");
 
   wv->url_user = "+12345678";
   wv->url_host = "imps.com";
-  
+
   TEST_1(tst = su_strdup(home, wvurl));
   TEST_1(url_d(url, tst) == 0);
   TEST_1(url_cmp(wv, url) == 0);
@@ -488,7 +488,7 @@
   TEST_1(url_cmp(wv, u) == 0);
   TEST_SIZE(url_e(wv2, sizeof(wv2), u), strlen(wvurl));
   TEST_1(strcmp(wv2, wvurl) == 0);
-  TEST_SIZE(snprintf(wv2, sizeof(wv2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(wv2, sizeof(wv2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(wv)), strlen(wvurl));
   TEST_1(strcmp(wv2, wvurl) == 0);
 
@@ -512,13 +512,13 @@
   url_t tel[1] = { URL_INIT_AS(tel) };
   url_t *u, url[1];
   char *tst;
-  char telurl[] = 
+  char telurl[] =
     "tel:+12345678"
     ";param=1;param=2"
     "?From=foo at bar&To=bar at baz#unf";
   char tel2[sizeof(telurl) + 32];
   url_t *a, *b;
-  
+
   BEGIN();
 
   TEST_S(url_scheme(url_tel), "tel");
@@ -527,7 +527,7 @@
   tel->url_params = "param=1;param=2";
   tel->url_headers = "From=foo at bar&To=bar at baz";
   tel->url_fragment = "unf";
-  
+
   TEST_1(tst = su_strdup(home, telurl));
   TEST_1(url_d(url, tst) == 0);
   TEST_1(url_cmp(tel, url) == 0);
@@ -540,7 +540,7 @@
   TEST_1(url_cmp(tel, u) == 0);
   TEST_SIZE(url_e(tel2, sizeof(tel2), u), strlen(telurl));
   TEST_1(strcmp(tel2, telurl) == 0);
-  TEST_SIZE(snprintf(tel2, sizeof(tel2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(tel2, sizeof(tel2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(tel)), strlen(telurl));
   TEST_1(strcmp(tel2, telurl) == 0);
 
@@ -566,7 +566,7 @@
   url_t fax[1] = { URL_INIT_AS(fax) };
   url_t *u, url[1];
   char *tst;
-  char faxurl[] = 
+  char faxurl[] =
     "fax:+12345678"
     ";param=1;param=2"
     "?From=foo at bar&To=bar at baz#unf";
@@ -590,7 +590,7 @@
   TEST_1(url_cmp(fax, u) == 0);
   TEST_SIZE(url_e(fax2, sizeof(fax2), u), strlen(faxurl));
   TEST_1(strcmp(fax2, faxurl) == 0);
-  TEST_SIZE(snprintf(fax2, sizeof(fax2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(fax2, sizeof(fax2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(fax)), strlen(faxurl));
   TEST_1(strcmp(fax2, faxurl) == 0);
 
@@ -611,7 +611,7 @@
   url_t modem[1] = { URL_INIT_AS(modem) };
   url_t *u, url[1];
   char *tst;
-  char modemurl[] = 
+  char modemurl[] =
     "modem:+12345678"
     ";param=1;param=2"
     "?From=foo at bar&To=bar at baz#unf";
@@ -635,7 +635,7 @@
   TEST_1(url_cmp(modem, u) == 0);
   TEST_SIZE(url_e(modem2, sizeof(modem2), u), strlen(modemurl));
   TEST_1(strcmp(modem2, modemurl) == 0);
-  TEST_SIZE(snprintf(modem2, sizeof(modem2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(modem2, sizeof(modem2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(modem)), strlen(modemurl));
   TEST_1(strcmp(modem2, modemurl) == 0);
 
@@ -676,7 +676,7 @@
   TEST(url_cmp(file, u), 0);
   TEST_SIZE(url_e(buf1, sizeof(buf1), u), strlen(fileurl));
   TEST_S(buf1, fileurl);
-  TEST_SIZE(snprintf(buf2, sizeof(buf2), URL_PRINT_FORMAT, URL_PRINT_ARGS(u)), 
+  TEST_SIZE(snprintf(buf2, sizeof(buf2), URL_PRINT_FORMAT, URL_PRINT_ARGS(u)),
 	    strlen(fileurl));
   TEST_S(buf2, fileurl);
 
@@ -702,8 +702,8 @@
 
   BEGIN();
 
-  ldap->url_type = url_unknown; 
-  ldap->url_scheme = "ldap"; 
+  ldap->url_type = url_unknown;
+  ldap->url_scheme = "ldap";
 
   /* TEST_S(url_scheme(url_ldap), "ldap"); */
 
@@ -732,7 +732,7 @@
   TEST(url_cmp(ldap, u), 0);
   TEST_SIZE(url_e(buf1, sizeof(buf1), u), strlen(ldapurl));
   TEST_S(buf1, ldapurl);
-  TEST_SIZE(snprintf(buf2, sizeof(buf2), URL_PRINT_FORMAT, URL_PRINT_ARGS(u)), 
+  TEST_SIZE(snprintf(buf2, sizeof(buf2), URL_PRINT_FORMAT, URL_PRINT_ARGS(u)),
 	    strlen(ldapurl));
   TEST_S(buf2, ldapurl);
 
@@ -775,7 +775,7 @@
   TEST_1(url_cmp(rtsp, u) == 0);
   TEST(url_e(rtsp2, sizeof(rtsp2), u), strlen(rtspurl));
   TEST_1(strcmp(rtsp2, rtspurl) == 0);
-  TEST_SIZE(snprintf(rtsp2, sizeof(rtsp2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(rtsp2, sizeof(rtsp2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(rtsp)), strlen(rtspurl));
   TEST_1(strcmp(rtsp2, rtspurl) == 0);
 
@@ -807,12 +807,12 @@
   url_t http[1] = { URL_INIT_AS(http) };
   url_t *u, url[1];
   char *tst;
-  char httpurl[] = 
+  char httpurl[] =
     "http://user:pass@host:32/foo;param=1/bar;param=3"
     "?From=foo at bar&To=bar at baz#unf";
   char http2[sizeof(httpurl) + 32];
 
-  char queryonly[] = 
+  char queryonly[] =
     "http://some.host?query";
 
   BEGIN();
@@ -838,7 +838,7 @@
   TEST_1(url_cmp(http, u) == 0);
   TEST_SIZE(url_e(http2, sizeof(http2), u), strlen(httpurl));
   TEST_1(strcmp(http2, httpurl) == 0);
-  TEST_SIZE(snprintf(http2, sizeof(http2), URL_PRINT_FORMAT, 
+  TEST_SIZE(snprintf(http2, sizeof(http2), URL_PRINT_FORMAT,
 		     URL_PRINT_ARGS(http)), strlen(httpurl));
   TEST_1(strcmp(http2, httpurl) == 0);
 
@@ -859,10 +859,10 @@
   TEST_S(u->url_headers, "here");
 
   url_digest(hash1, sizeof(hash1), u, NULL);
-  url_digest(hash2, sizeof(hash2), (url_t *)"http://[::1]/test;ing?here", 
+  url_digest(hash2, sizeof(hash2), (url_t *)"http://[::1]/test;ing?here",
 	     NULL);
   TEST(memcmp(hash1, hash2, sizeof(hash1)), 0);
-    
+
   su_home_deinit(home);
 
   END();
@@ -920,7 +920,7 @@
   url_string_t *us0 = NULL;
 
   tagi_t *lst, *dup;
-  
+
   tag_value_t value;
   char *s;
   su_home_t home[1] = { SU_HOME_INIT(home) };
@@ -977,7 +977,7 @@
   tagi_t *lst, *result;
 
   lst = tl_list(TAG_A("X"),
-		TAG_SKIP(2), 
+		TAG_SKIP(2),
 		URLTAG_URL((void *)"urn:foo"),
 		TAG_B("Y"),
 		URLTAG_URL((void *)"urn:bar"),
@@ -997,8 +997,8 @@
   END();
 }
 
-#if 0 
-/* This is just a spike. How we can get 
+#if 0
+/* This is just a spike. How we can get
  *   register_printf_function('U', printf_url, printf_url_info)
  * run while initializing?
  */
@@ -1014,7 +1014,7 @@
 }
 
 /* This is the appropriate argument information function for `printf_url'.  */
-int printf_url_info(const struct printf_info *info, 
+int printf_url_info(const struct printf_info *info,
 		    size_t n, int *argtypes)
 {
   if (n > 0) {
@@ -1027,7 +1027,7 @@
 
 int test_print(void)
 {
-#if 0 
+#if 0
   url_t u0[1];
   url_t *u1 = NULL;
   url_t const *u2 = (void *)-1;
@@ -1080,7 +1080,7 @@
     else
       usage(1);
   }
-  
+
 #if HAVE_OPEN_C
   tstflags |= tst_verbatim;
 #endif

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.c	Tue Dec 16 13:05:22 2008
@@ -53,7 +53,7 @@
  * The macro URL_PRINT_FORMAT is used in format string of printf() or
  * similar printing functions.  A URL can be printed like this:
  * @code
- *   printf("%s received URL " URL_PRINT_FORMAT "\n", 
+ *   printf("%s received URL " URL_PRINT_FORMAT "\n",
  *          my_name, URL_PRINT_ARGS(url));
  * @endcode
  */
@@ -65,7 +65,7 @@
  * or similar printing functions.  Using it, a URL can be printed like this:
  *
  * @code
- *   printf("%s received URL " URL_PRINT_FORMAT "\n", 
+ *   printf("%s received URL " URL_PRINT_FORMAT "\n",
  *          my_name, URL_PRINT_ARGS(url));
  * @endcode
  */
@@ -146,14 +146,14 @@
 static char *url_canonize(char *d, char const *s, size_t n,
 			  unsigned syn33,
 			  char const allowed[]);
-static char *url_canonize2(char *d, char const *s, size_t n, 
+static char *url_canonize2(char *d, char const *s, size_t n,
 			   unsigned syn33,
 			   unsigned m32, unsigned m64, unsigned m96);
 static int url_tel_cmp_numbers(char const *A, char const *B);
 
-/**Test if string contains excluded or url-reserved characters. 
+/**Test if string contains excluded or url-reserved characters.
+ *
  *
- * 
  *
  * @param s  string to be searched
  *
@@ -162,7 +162,7 @@
  */
 int url_reserved_p(char const *s)
 {
-  if (s) 
+  if (s)
     while (*s) {
       unsigned char u = *s++;
 
@@ -177,11 +177,11 @@
  *
  * Calculate the length of string @a s when the excluded or reserved
  * characters in it have been escaped.
- * 
+ *
  * @param s         String with reserved URL characters. [IN
  * @param reserved  Optional array of reserved characters [IN]
  *
- * @return 
+ * @return
  * The number of characters in corresponding but escaped string.
  *
  * You can handle a part of URL with reserved characters like this:
@@ -230,7 +230,7 @@
 {
   char *retval = d;
   unsigned mask32, mask64, mask96;
- 
+
   MASKS_WITH_RESERVED(reserved, mask32, mask64, mask96);
 
   while (s && *s) {
@@ -251,7 +251,7 @@
   }
 
   *d = '\0';
-  
+
   return retval;
 }
 
@@ -350,7 +350,7 @@
   size_t i = 0;
 
   if (d == s)
-    for (;s[i] && i < n; d++, i++) 
+    for (;s[i] && i < n; d++, i++)
       if (s[i] == '%')
 	break;
 
@@ -365,12 +365,12 @@
     }
 
     h1 = s[i + 1], h2 = s[i + 2];
-    
+
     if (!IS_HEX(h1) || !IS_HEX(h2)) {
       *d = '\0';
       return NULL;
     }
-    
+
 #define UNHEX(a) (a - (a >= 'a' ? 'a' - 10 : (a >= 'A' ? 'A' - 10 : '0')))
     c = (UNHEX(h1) << 4) | UNHEX(h2);
 
@@ -391,7 +391,7 @@
     d +=2, i += 2;
 #undef    UNHEX
   }
-  
+
   *d = '\0';
 
   return d;
@@ -400,7 +400,7 @@
 
 /** Canonize a URL component (with precomputed mask).
  *
- * This version does not flag error if *s contains character that should 
+ * This version does not flag error if *s contains character that should
  * be escaped.
  */
 static
@@ -410,7 +410,7 @@
   size_t i = 0;
 
   if (d == s)
-    for (;s[i] && i < n; d++, i++) 
+    for (;s[i] && i < n; d++, i++)
       if (s[i] == '%')
 	break;
 
@@ -423,12 +423,12 @@
     }
 
     h1 = s[i + 1], h2 = s[i + 2];
-    
+
     if (!IS_HEX(h1) || !IS_HEX(h2)) {
       *d = '\0';
       return NULL;
     }
-    
+
 #define UNHEX(a) (a - (a >= 'a' ? 'a' - 10 : (a >= 'A' ? 'A' - 10 : '0')))
     c = (UNHEX(h1) << 4) | UNHEX(h2);
 
@@ -448,7 +448,7 @@
     d +=2, i += 2;
 #undef    UNHEX
   }
-  
+
   *d = '\0';
 
   return d;
@@ -478,7 +478,7 @@
   case url_msrp:   return "msrp";
   case url_msrps:  return "msrps";
   case url_wv:     return "wv";
-  default:       
+  default:
     assert(url_type == url_unknown);
     return NULL;
   }
@@ -487,10 +487,10 @@
 su_inline
 int url_type_is_opaque(enum url_type_e url_type)
 {
-  return 
+  return
     url_type == url_invalid ||
-    url_type == url_tel || 
-    url_type == url_modem || 
+    url_type == url_tel ||
+    url_type == url_modem ||
     url_type == url_fax ||
     url_type == url_cid;
 }
@@ -513,29 +513,29 @@
 {
 #define test_scheme(s) \
    if (len == strlen(#s) && !strncasecmp(scheme, #s, len)) return url_##s
-  
+
   switch (scheme[0]) {
   case '*': if (strcmp(scheme, "*") == 0) return url_any;
-  case 'c': case 'C': 
+  case 'c': case 'C':
     test_scheme(cid); break;
-  case 'f': case 'F': 
+  case 'f': case 'F':
     test_scheme(ftp); test_scheme(file); test_scheme(fax); break;
-  case 'h': case 'H': 
+  case 'h': case 'H':
     test_scheme(http); test_scheme(https); break;
-  case 'i': case 'I': 
+  case 'i': case 'I':
     test_scheme(im); break;
-  case 'm': case 'M': 
-    test_scheme(mailto); test_scheme(modem); 
+  case 'm': case 'M':
+    test_scheme(mailto); test_scheme(modem);
     test_scheme(msrp); test_scheme(msrps); break;
-  case 'p': case 'P': 
+  case 'p': case 'P':
     test_scheme(pres); break;
-  case 'r': case 'R': 
+  case 'r': case 'R':
     test_scheme(rtsp); test_scheme(rtspu); break;
-  case 's': case 'S': 
+  case 's': case 'S':
     test_scheme(sip); test_scheme(sips); break;
-  case 't': case 'T': 
+  case 't': case 'T':
     test_scheme(tel); break;
-  case 'w': case 'W': 
+  case 'w': case 'W':
     test_scheme(wv); break;
 
 
@@ -560,7 +560,7 @@
  *
  * @note The parsed string @a s will be modified when parsing it.
  *
- * @retval 0 if successful, 
+ * @retval 0 if successful,
  * @retval -1 otherwise.
  */
 static
@@ -571,7 +571,7 @@
   int have_authority = 1;
 
   memset(url, 0, sizeof(*url));
-  
+
   if (strcmp(s, "*") == 0) {
     url->url_type = url_any;
     url->url_scheme = "*";
@@ -636,7 +636,7 @@
 	host += 2; s += 2, url->url_root = '/';
 	n = strcspn(s, "/?#@[]");
       }
-      else 
+      else
 	n = strcspn(s, "@;/?#");
 
       if (s[n] == '@')
@@ -691,7 +691,7 @@
     default:
       break;
     }
-    
+
     if (host[n] == ':') {
       char *port = host + n + 1;
       url->url_port = port;
@@ -712,8 +712,8 @@
 	/* Port can be *digit, empty string or "*" */
 	while (*port >= '0' && *port <= '9')
 	  port++;
-	
-	if (port != url->url_port ? port[0] != '\0' 
+
+	if (port != url->url_port ? port[0] != '\0'
 	    : (port[0] != '*' || port[1] != '\0'))
 	  return -1;
       }
@@ -755,7 +755,7 @@
  *
  * @note The parsed string @a s will be modified when parsing it.
  *
- * @retval 0 if successful, 
+ * @retval 0 if successful,
  * @retval -1 otherwise.
  */
 int url_d(url_t *url, char *s)
@@ -799,7 +799,7 @@
 
   /* port is canonized by _url_d() */
   s = (char *)url->url_path;
-  if (s && !url_canonize(s, s, SIZE_MAX, 
+  if (s && !url_canonize(s, s, SIZE_MAX,
 			 /* Allow all URI characters but ? */
 			 /* Allow unescaped /;?@, - but do not convert */
 			 SYN33('/') | SYN33(';') | SYN33('=') | SYN33('@') |
@@ -816,7 +816,7 @@
 			 /* Convert escaped /:&+$ to unescaped */
 			 "/:&+$"))
     return -1;
-  
+
   /* Unhex alphanumeric and unreserved URI characters */
   s = (char *)url->url_headers;
   if (s && !url_canonize3(s, s, SIZE_MAX, RESERVED_MASK))
@@ -830,8 +830,8 @@
   return 0;
 }
 
-/** Encode an URL. 
- * 
+/** Encode an URL.
+ *
  * The function url_e() combines a URL from substrings in url_t structure
  * according the @ref url_syntax "URL syntax" presented above.  The encoded
  * @a url is stored in a @a buffer of @a n bytes.
@@ -840,8 +840,8 @@
  * @param n      size of @a buffer.
  * @param url    URL to be encoded.
  *
- * @return 
- * Return the number of bytes in the encoding.  
+ * @return
+ * Return the number of bytes in the encoding.
  *
  * @note The function follows the convention set by C99 snprintf().  Even if
  * the result does not fit into the @a buffer and it is truncated, the
@@ -904,7 +904,7 @@
 
     if (url->url_password) {
       if (do_copy && (do_copy = 1 <= n))
-	*b = ':'; 
+	*b = ':';
       b++; n--;
       i = strlen(url->url_password);
       if (do_copy && (do_copy = i <= n))
@@ -914,7 +914,7 @@
 
     if (url->url_host) {
       if (do_copy && (do_copy = 1 <= n))
-	*b = '@'; 
+	*b = '@';
       b++; n--;
     }
   }
@@ -930,7 +930,7 @@
       if (do_copy && (do_copy = i <= n)) {
 	b[0] = ':';
 	memcpy(b + 1, url->url_port, i - 1);
-      } 
+      }
       b += i; n -= i;
     }
   }
@@ -946,7 +946,7 @@
       memcpy(b, url->url_path, i);
     b += i; n -= i;
   }
-  
+
   {
     static char const sep[] = ";?#";
     char const *pp[3];
@@ -974,15 +974,15 @@
     buffer[m - 1] = '\0';
 
   assert((size_t)(b - buffer) == (size_t)(m - n));
-  
-  /* This follows the snprintf(C99) return value, 
+
+  /* This follows the snprintf(C99) return value,
    * Number of characters written (excluding NUL)
    */
   return b - buffer;
 }
 
 
-/** Calculate the length of URL when encoded. 
+/** Calculate the length of URL when encoded.
  *
  */
 isize_t url_len(url_t const * url)
@@ -992,7 +992,7 @@
   if (url->url_scheme) rv += strlen(url->url_scheme) + 1; /* plus ':' */
   if (url->url_user) {
     rv += strlen(url->url_user);
-    if (url->url_password) 
+    if (url->url_password)
       rv += strlen(url->url_password) + 1;   /* plus ':' */
     rv += url->url_host != NULL;  /* plus '@' */
   }
@@ -1007,11 +1007,11 @@
 }
 
 /**@def URL_E(buf, end, url)
- * Encode an URL: use @a buf up to @a end. 
+ * Encode an URL: use @a buf up to @a end.
  * @hideinitializer
  */
 
-/** 
+/**
  * Calculate the size of strings associated with a #url_t sructure.
  *
  * @param url pointer to a #url_t structure or string
@@ -1026,7 +1026,7 @@
   }
   else {
     size_t len_scheme, len_user, len_password,
-      len_host, len_port, len_path, len_params, 
+      len_host, len_port, len_path, len_params,
       len_headers, len_fragment;
 
     len_scheme = (url->url_type <= url_unknown && url->url_scheme) ?
@@ -1061,7 +1061,7 @@
   for (; buf < end && (*buf = *src); buf++, src++)
     ;
 
-  if (buf >= end) 
+  if (buf >= end)
     while (*src++)
       buf++;
 
@@ -1069,12 +1069,12 @@
 #endif
 }
 
-/** 
+/**
  * Duplicate the url.
- * 
+ *
  * The function url_dup() copies the url structure @a src and the strings
  * attached to it to @a url.  The non-constant strings in @a src are copied
- * to @a buf.  If the size of duplicated strings exceed @a bufsize, the 
+ * to @a buf.  If the size of duplicated strings exceed @a bufsize, the
  * corresponding string fields in @a url are set to NULL.
  *
  * The calling function can calculate the size of buffer required by calling
@@ -1108,7 +1108,7 @@
   else {
     char *b = buf;
     char *end = b + bufsize;
-    char const **dstp; 
+    char const **dstp;
     char const * const *srcp;
     url_t dst0[1];
 
@@ -1154,7 +1154,7 @@
 }
 
 /**@def URL_DUP(buf, end, dst, src)
- *  Duplicate the url: use @a buf up to @a end. @HI 
+ *  Duplicate the url: use @a buf up to @a end. @HI
  *
  * The macro URL_DUP() duplicates the url.  The non-constant strings in @a
  * src are copied to @a buf.  However, no strings are copied past @a end.
@@ -1169,14 +1169,14 @@
  * @param dst     Destination URL structure.
  * @param src     Source URL structure.
  *
- * @return 
- * The macro URL_DUP() returns pointer to first unused byte in the 
+ * @return
+ * The macro URL_DUP() returns pointer to first unused byte in the
  * buffer @a buf.
  */
 
 /** Duplicate the url to memory allocated via home.
  *
- * The function url_hdup() duplicates (deep copies) an #url_t structure. 
+ * The function url_hdup() duplicates (deep copies) an #url_t structure.
  * Alternatively, it can be passed a string; string is then copied and
  * parsed to the #url_t structure.
  *
@@ -1190,7 +1190,7 @@
  * @return
  * The function url_hdup() returns a pointer to the newly allocated #url_t
  * structure, or NULL upon an error.
- */ 
+ */
 url_t *url_hdup(su_home_t *home, url_t const *src)
 {
   if (src) {
@@ -1211,13 +1211,13 @@
 }
 
 
-/** Convert an string to an url */ 
+/** Convert an string to an url */
 url_t *url_make(su_home_t *h, char const *str)
 {
   return url_hdup(h, URL_STRING_MAKE(str)->us_url);
 }
 
-/** Print an URL */ 
+/** Print an URL */
 url_t *url_format(su_home_t *h, char const *fmt, ...)
 {
   url_t *url;
@@ -1263,7 +1263,7 @@
 }
 
 
-/** Test if param @a tag matches to parameter string @a p. 
+/** Test if param @a tag matches to parameter string @a p.
  */
 #define URL_PARAM_MATCH(p, tag) \
  (strncasecmp(p, tag, strlen(tag)) == 0 && \
@@ -1274,8 +1274,8 @@
  *
  * This function searches for a parameter from a parameter list.
  *
- * If you want to test if there is parameter @b user=phone, 
- * call this function like 
+ * If you want to test if there is parameter @b user=phone,
+ * call this function like
  * @code if (url_param(url->url_param, "user=phone", NULL, 0))
  * @endcode
  *
@@ -1287,8 +1287,8 @@
  * @retval positive length of parameter value (including final NUL) if found
  * @retval zero     if not found.
  */
-isize_t url_param(char const *params, 
-		  char const *tag, 
+isize_t url_param(char const *params,
+		  char const *tag,
 		  char value[], isize_t vlen)
 {
   size_t n, tlen, flen;
@@ -1309,7 +1309,7 @@
     if (strncasecmp(p, tag, tlen) == 0) {
       if (n == tlen) {
 	if (vlen > 0)
-	  value[0] = '\0';	
+	  value[0] = '\0';
 	return 1;
       }
       if (p[tlen] != '=')
@@ -1328,9 +1328,9 @@
   return 0;
 }
 
-/** Check for a parameter. 
+/** Check for a parameter.
  *
- * @deprecated 
+ * @deprecated
  * Bad grammar. Use url_has_param().
  */
 isize_t url_have_param(char const *params, char const *tag)
@@ -1354,7 +1354,7 @@
 
   if (!s)
     return -1;
-  
+
   if (url->url_params)
     strcpy(s, url->url_params)[n - 1] = ';';
   strcpy(s + n, param);
@@ -1374,7 +1374,7 @@
 {
   if (params && name) {
     size_t i, n = strlen(name), remove, rest;
-    
+
     for (i = 0; params[i];) {
       if (strncasecmp(params + i, name, n) ||
 	  (params[i + n] != '=' && params[i + n] != ';' && params[i + n])) {
@@ -1429,7 +1429,7 @@
 
   if (url->url_type != url_sip && url->url_type != url_sips)
     return 0;
-  
+
   if (url->url_port != NULL) {
     if (!modify)
       return 1;
@@ -1475,13 +1475,13 @@
 
   if (d != url->url_params)
     *d = '\0';
-  else 
+  else
     url->url_params = NULL;
 
   return 1;
 }
 
-/** Strip transport-specific stuff. 
+/** Strip transport-specific stuff.
  *
  * The function url_strip_transport() removes transport-specific parameters
  * from a SIP or SIPS URI.  These parameters include:
@@ -1497,7 +1497,7 @@
  * @note
  * If the parameter string contains empty parameters, they are stripped, too.
  *
- * @return 
+ * @return
  * The function url_strip_transport() returns @e true, if the URL was
  * modified, @e false otherwise.
  */
@@ -1506,14 +1506,14 @@
   return url_strip_transport2(url, 1);
 }
 
-/** Check for transport-specific stuff. 
+/** Check for transport-specific stuff.
  *
  * The function url_have_transport() tests if there are transport-specific
  * parameters in a SIP or SIPS URI. These parameters include:
  * - the port number
  * - "maddr=" parameters
  * - "transport=" parameters
- * 
+ *
  * @note
  * The @a url must be a pointer to a URL structure.
  *
@@ -1538,7 +1538,7 @@
  *
  * @note Currently, the url parameters are not compared. This is because the
  * url_cmp() is used to sort URLs: taking parameters into account makes that
- * impossible. 
+ * impossible.
  */
 int url_cmp(url_t const *a, url_t const *b)
 {
@@ -1556,7 +1556,7 @@
     /* presence and instant messaging URLs match magically with SIP */
     enum url_type_e a_type = a->url_type;
     enum url_type_e b_type = b->url_type;
-    
+
     if (a_type == url_im || a_type == url_pres)
       a_type = url_sip;
 
@@ -1570,7 +1570,7 @@
 
   url_type = a->url_type;	/* Or b->url_type, they are equal! */
 
-  if (url_type <= url_unknown && 
+  if (url_type <= url_unknown &&
       ((rv = !a->url_scheme - !b->url_scheme) ||
        (a->url_scheme && b->url_scheme &&
 	(rv = strcasecmp(a->url_scheme, b->url_scheme)))))
@@ -1589,7 +1589,7 @@
       a_port = b_port = url_port_default(url_type);
     else
       a_port = b_port = "";
-    
+
     if (a->url_port) a_port = a->url_port;
     if (b->url_port) b_port = b->url_port;
 
@@ -1635,7 +1635,7 @@
     /* Skip visual-separators */
     do {
       a = *A++;
-      if (a == '%' && IS_HEX(A[0]) && IS_HEX(A[1])) 
+      if (a == '%' && IS_HEX(A[0]) && IS_HEX(A[1]))
 	a = (UNHEX(A[0]) << 4) | UNHEX(A[1]), A +=2;
     } while (a == ' ' || a == '-' || a == '.' || a == '(' || a == ')');
 
@@ -1644,7 +1644,7 @@
 
     do {
       b = *B++;
-      if (b == '%' && IS_HEX(B[0]) && IS_HEX(B[1])) 
+      if (b == '%' && IS_HEX(B[0]) && IS_HEX(B[1]))
 	b = (UNHEX(B[0]) << 4) | UNHEX(B[1]), B +=2;
     } while (b == ' ' || b == '-' || b == '.' || b == '(' || b == ')');
 
@@ -1678,7 +1678,7 @@
 
   url_type = a->url_type;	/* Or b->url_type, they are equal! */
 
-  if (url_type <= url_unknown && 
+  if (url_type <= url_unknown &&
       ((rv = !a->url_scheme - !b->url_scheme) ||
        (a->url_scheme && b->url_scheme &&
 	(rv = strcasecmp(a->url_scheme, b->url_scheme)))))
@@ -1700,7 +1700,7 @@
       a_port = b_port = url_port_default(url_type);
     else
       a_port = b_port = "";
-    
+
     if (a->url_port) a_port = a->url_port;
     if (b->url_port) b_port = b->url_port;
 
@@ -1790,10 +1790,10 @@
   case url_msrps:
     return "9999";		/* XXXX */
 
-  case url_tel:	
-  case url_fax:	
+  case url_tel:
+  case url_fax:
   case url_modem:
-  case url_im:	
+  case url_im:
   case url_pres:
   case url_cid:
   case url_wv:
@@ -1909,7 +1909,7 @@
 #define   UNHEX(a) (a - (a >= 'a' ? 'a' - 10 : (a >= 'A' ? 'A' - 10 : '0')))
       c = (UNHEX(s[i+1]) << 4) | UNHEX(s[i+2]);
 #undef    UNHEX
-      if (c != '%' && c > ' ' && c < '\177' && 
+      if (c != '%' && c > ' ' && c < '\177' &&
 	  (!strchr(EXCLUDED, c) || strchr(allow, c))) {
 	if (i != j)
 	  su_md5_iupdate(md5, s + j, i - j);
@@ -1955,7 +1955,7 @@
   else {
     su_md5_update(md5, "", 1);
   }
-  
+
   if (type == url_sip || type == url_sips) {
     /* SIP URL may have /;? in user part but no path */
     /* user-unreserved  =  "&" / "=" / "+" / "$" / "," / ";" / "?" / "/" */
@@ -1989,7 +1989,7 @@
       s += 2;
       n = strcspn(s, "/?#@[]");
     }
-    else 
+    else
       n = strcspn(s, "@;/?#");
 
     if (s[n] == '@') {
@@ -2007,7 +2007,7 @@
   }
   else /* if (!have_authority) */ {
     n = strcspn(s, ":/;?#");	/* Until pass, path, query or fragment */
-    
+
     canon_update(md5, s, n, ""); /* user */
     su_md5_update(md5, "\0", 1); /* host, no port */
     su_md5_striupdate(md5, url_port_default(type));
@@ -2019,7 +2019,7 @@
     if (colon == NULL || ++colon == s + n || *colon != ':')
       colon = NULL;
   }
-  else 
+  else
     colon = memchr(s, ':', n);
 
   if (colon) {
@@ -2081,26 +2081,26 @@
  * the resulting string will be truncated.
  *
  * @param home memory home used to alloate string (if NULL, malloc() it)
- * @param query query part from SIP URL 
- * 
+ * @param query query part from SIP URL
+ *
  * The result string is allocated from @a home, and it can be used as
  * argument to msg_header_parse_str(), msg_header_add_str() or
  * SIPTAG_HEADER_STR().
  *
  * @sa msg_header_add_str(), SIPTAG_HEADER_STR(),
- * sip_headers_as_url_query(), sip_url_query_as_taglist(), 
+ * sip_headers_as_url_query(), sip_url_query_as_taglist(),
  * @RFC3261 section 19.1.1 "Headers", #url_t, url_s#url_headers,
  * url_unescape(), url_unescape_to()
  *
  * @since New in @VERSION_1_12_4.
  */
-char *url_query_as_header_string(su_home_t *home, 
+char *url_query_as_header_string(su_home_t *home,
 				 char const *query)
 {
   size_t i, j, n, b_start = 0, b_len = 0;
   char *s = su_strdup(home, query);
 
-  if (!s) 
+  if (!s)
     return NULL;
 
   for (i = 0, j = 0; s[i];) {

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url.docs	Tue Dec 16 13:05:22 2008
@@ -3,7 +3,7 @@
 @section url_meta Module Meta Information
 
 The Sofia @b url module contains macros and functions for using URL
-datatype #url_t, parsing and printing URLs. 
+datatype #url_t, parsing and printing URLs.
 
 @CONTACT Pekka Pessi <Pekka.Pessi at nokia.com>
 
@@ -13,11 +13,11 @@
 
 @section url_syntax Using URL Library
 
-The URL library provides URL datatype and helper functions related to it. 
+The URL library provides URL datatype and helper functions related to it.
 There is URL parser, which separates the URL components to the #url_t
 structure.
 
- at note 
+ at note
 Please note that we use terms URL and URI interchangeable.
 
 The formal URI syntax is defined in the @RFC3986.
@@ -39,14 +39,14 @@
 The URL library understands two alternative URL syntaxes. First, the
 basic syntax used by, e.g., @b ftp:, @b http: and @b rtsp: URLs:
 
-<i>scheme</i> ":" ["//" [ <i>user</i> [":" <i>password</i> ] "@"] 
-<i>host</i> [":" <i>port</i> ] ] 
+<i>scheme</i> ":" ["//" [ <i>user</i> [":" <i>password</i> ] "@"]
+<i>host</i> [":" <i>port</i> ] ]
       ["/" <i>path</i> ] ["?" <i>query</i> ] ["#" <i>fragment</i> ]
 
 Alternatively, the syntax used by @b mailto:, @b sip:, @b im:, @b tel,
 and @b pres: URLs:
 
-<i>scheme</i> ":" [ [ <i>user</i> [":" <i>password</i> ] "@"] 
+<i>scheme</i> ":" [ [ <i>user</i> [":" <i>password</i> ] "@"]
 <i>host</i> [":" <i>port</i> ] ] [";" <i>params</i> ] ["?" <i>query</i> ]
 ["#" <i>fragment</i> ]
 
@@ -80,7 +80,7 @@
 as follows:
 @code
  url_type = url_sip
- url_root = 0 
+ url_root = 0
  url_scheme = "sip"
  url_user = "joe.user"
  url_password = NULL
@@ -113,7 +113,7 @@
 int url_sanitize(url_t *u);
 char const *url_scheme(enum url_type_e type);
 
-#define URL_INIT_AS(type) 
+#define URL_INIT_AS(type)
 void url_init(url_t *url, enum url_type_e type);
 
 int url_cmp(url_t const *a, url_t const *b);
@@ -138,7 +138,7 @@
 char const *url_port_default(enum url_type_e url_type);
 char const *url_tport_default(enum url_type_e url_type);
 char const *url_port(url_t const *u);
-#define URL_PORT(u) 
+#define URL_PORT(u)
 @endcode
 
 In addition to the basic URL structure, #url_t, the library interface
@@ -149,13 +149,13 @@
 #define URL_IS_STRING(u) ((u) && *((url_string_t*)(u))->us_str != 0)
 int url_string_p(url_string_t const * url);
 int url_is_string(url_string_t const * url);
-#define URL_STRING_MAKE(s) 
+#define URL_STRING_MAKE(s)
 @endcode
 
 There are a macros for printf()-like formatting of URLs:
 @code
 #define URL_PRINT_FORMAT
-#define URL_PRINT_ARGS(u) 
+#define URL_PRINT_ARGS(u)
 @endcode
 
 These functions calculate MD5 digest of URL or contribute contents of the
@@ -165,7 +165,7 @@
 void url_digest(void *hash, int hsize, url_t const *, char const *key);
 @endcode
 
-SIP or SIPS URIs have some parameters that control transport of the request. 
+SIP or SIPS URIs have some parameters that control transport of the request.
 In some cases, they should be detected and removed:
 @code
 int url_have_transport(url_t const *u);
@@ -181,7 +181,7 @@
 #define URL_E(buf, end, url)
 isize_t url_xtra(url_t const * url);
 issize_t url_dup(char *, isize_t , url_t *dst, url_t const *src);
-#define URL_DUP(buf, end, dst, src) 
+#define URL_DUP(buf, end, dst, src)
 @endcode
 
 */

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/url_tag.c	Tue Dec 16 13:05:22 2008
@@ -56,7 +56,7 @@
   if (URL_STRING_P(us))
     return snprintf(b, size, "<%s>", us->us_str);
   else
-    return snprintf(b, size, "<" URL_PRINT_FORMAT ">", 
+    return snprintf(b, size, "<" URL_PRINT_FORMAT ">",
 		    URL_PRINT_ARGS(us->us_url));
 }
 
@@ -95,7 +95,7 @@
     dst->t_value = (tag_value_t)d;
     *bb = b + sizeof(*d) + xtra;
   }
-  
+
   return dst + 1;
 }
 
@@ -110,7 +110,7 @@
  *
  * @param tt tag type
  * @param home memory home used to allocate new #url_t structure
- * @param str string to convert 
+ * @param str string to convert
  * @param return_value return-value parameter for converted url
  *
  * @retval 0 when successful
@@ -130,7 +130,7 @@
 
   for (len = 0; !IS_EXCLUDED(str[len]); len++)
     ;
-  
+
   url = su_alloc(home, (sizeof *url) + len + 1);
   if (!url)
     return -1;
@@ -145,7 +145,7 @@
   return 0;
 }
 
-tag_class_t url_tag_class[1] = 
+tag_class_t url_tag_class[1] =
   {{
     sizeof(url_tag_class),
     /* tc_next */     NULL,

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.c	Tue Dec 16 13:05:22 2008
@@ -172,7 +172,7 @@
   (*top)->um_black = 1;
 }
 
-static 
+static
 void red_black_balance_delete(UrlMap **top, UrlMap *um)
 {
   UrlMap *dad, *brother;
@@ -192,7 +192,7 @@
 	brother->um_black = 0;
 	um = dad;
 	continue;
-      } 
+      }
 
       if (!brother->um_right || brother->um_right->um_black) {
 	brother->um_left->um_black = 1;
@@ -208,7 +208,7 @@
       left_rotate(top, dad);
       um = *top;
       break;
-    } else { 
+    } else {
       assert(um == dad->um_right);
       brother = dad->um_left;
 
@@ -224,7 +224,7 @@
 	brother->um_black = 0;
 	um = dad;
 	continue;
-      } 
+      }
 
       if (!brother->um_left || brother->um_left->um_black) {
 	brother->um_right->um_black = 1;
@@ -424,12 +424,12 @@
       dad->um_dad->um_right = dad;
 
     dad->um_black = um->um_black;
-    
+
     if ((dad->um_left = um->um_left))
-      dad->um_left->um_dad = dad;      
+      dad->um_left->um_dad = dad;
 
     if ((dad->um_right = um->um_right))
-      dad->um_right->um_dad = dad;      
+      dad->um_right->um_dad = dad;
   }
 
   um->um_left = NULL;
@@ -438,7 +438,7 @@
   um->um_black = 0;
   um->um_inserted = 0;
 
-  if (need_to_balance) 
+  if (need_to_balance)
     red_black_balance_delete(top, kid);
 }
 
@@ -600,7 +600,7 @@
   six = url_map_new(home, (void*)"/6", sizeof (UrlMap));
   seven = url_map_new(home, (void*)"/7", sizeof (UrlMap));
 
-  TEST_1(one); 
+  TEST_1(one);
   TEST_1(three);
   TEST_1(five);
   TEST_1(six);
@@ -612,16 +612,16 @@
   TEST_P(five->um_left, NULL); TEST_P(five->um_right, NULL);
   TEST_P(five->um_dad, NULL); TEST(five->um_black, 1);
 
-  /* Check after another node: 
+  /* Check after another node:
    *
    *         5b
-   *        / 
+   *        /
    *       3r
    */
   TEST(url_map_insert(&tree, three, &o), 0); TEST_P(o, NULL);
   TEST_P(tree->um_left, three); TEST(tree->um_black, 1);
   TEST_P(three->um_left, NULL); TEST_P(three->um_right, NULL);
-  TEST_P(three->um_dad, tree); TEST(three->um_black, 0); 
+  TEST_P(three->um_dad, tree); TEST(three->um_black, 0);
 
   /* Check third node
    *         5b
@@ -631,21 +631,21 @@
   TEST(url_map_insert(&tree, seven, &o), 0); TEST_P(o, NULL);
   TEST_P(tree->um_right, seven); TEST(tree->um_black, 1);
   TEST_P(seven->um_left, NULL); TEST_P(seven->um_right, NULL);
-  TEST_P(seven->um_dad, tree); TEST(seven->um_black, 0); 
+  TEST_P(seven->um_dad, tree); TEST(seven->um_black, 0);
 
   /* Check after fourth node:
    *         5b
    *        / \
    *       3b  7b
    *      /
-   *     1r  
+   *     1r
    */
   TEST(url_map_insert(&tree, one, &o), 0); TEST_P(o, NULL);
-  TEST_P(tree->um_left->um_left, one); 
-  TEST(tree->um_black, 1); 
+  TEST_P(tree->um_left->um_left, one);
+  TEST(tree->um_black, 1);
   TEST(tree->um_left->um_black, 1); TEST(tree->um_right->um_black, 1);
   TEST_P(one->um_left, NULL); TEST_P(one->um_right, NULL);
-  TEST_P(one->um_dad, tree->um_left); TEST(one->um_black, 0); 
+  TEST_P(one->um_dad, tree->um_left); TEST(one->um_black, 0);
 
   /* Checks that we got after fifth node:
    *         5b
@@ -693,7 +693,7 @@
   y = url_map_new(home, (void*)"/y", sizeof *y);
 
   TEST_1(x);
-  TEST_1(y); 
+  TEST_1(y);
 
   /*
    *              x                   y               x
@@ -725,9 +725,9 @@
   if (k > (1 << 32))
     result += 32, k = (k >> 32) + ((k & ((1 << 32) - 1)) != 0);
 #endif
-  if (k > (1 << 16)) 
+  if (k > (1 << 16))
     result += 16, k = (k >> 16) + ((k & ((1 << 16) - 1)) != 0);
-  if (k > (1 << 8)) 
+  if (k > (1 << 8))
     result += 8, k = (k >> 8) + ((k & ((1 << 8) - 1)) != 0);
   if (k > (1 << 4))
     result += 4, k = (k >> 4) + ((k & 15) != 0);
@@ -737,7 +737,7 @@
     result += 1, k = (k >> 1) + (k & 1);
   if (k > 1)
     result += 1;
-  
+
   return result;
 }
 
@@ -803,9 +803,9 @@
     te = (TEntry *)url_map_find(tree, (void*)u, 1);
     TEST_1(te); TEST(te->te_value, i);
     url_map_remove(&tree, te->te_urlmap);
-    TEST_1(te->te_urlmap->um_dad == NULL && 
-	   te->te_urlmap->um_left == NULL && 
-	   te->te_urlmap->um_right == NULL); 
+    TEST_1(te->te_urlmap->um_dad == NULL &&
+	   te->te_urlmap->um_left == NULL &&
+	   te->te_urlmap->um_right == NULL);
     TEST_1(url_map_height(tree) <= 2 * log2ceil(N - i + 1));
     TEST_1(redblack_check(tree));
   }
@@ -814,7 +814,7 @@
 
   for (i = N - 1; i >= 0; i--) {
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     TEST_1(url_map_height(tree) <= 2 * log2ceil(N - i + 1));
     TEST_1(redblack_check(tree));
@@ -837,7 +837,7 @@
     int sn = (i * 57) % N;
     o = (void *)-1;
     TEST(nodes[sn]->te_inserted, 0);
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     nodes[sn]->te_inserted = 1;
     TEST_P(o, NULL);
     TEST_1(url_map_height(tree) <= 2 * log2ceil(i + 1 + 1));
@@ -865,7 +865,7 @@
     int sn = (i * 517) % N;	/* relative prime to N */
     o = (void *)-1;
     TEST(nodes[sn]->te_inserted, 0);
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     nodes[sn]->te_inserted = 1;
     TEST_P(o, NULL);
     TEST_1(url_map_height(tree) <= 2 * log2ceil(i + 1 + 1));
@@ -893,7 +893,7 @@
     int sn = (i * 1957) % N;	/* relative prime to N */
     o = (void *)-1;
     TEST(nodes[sn]->te_inserted, 0);
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     nodes[sn]->te_inserted = 1;
     TEST_P(o, NULL);
     TEST_1(url_map_height(tree) <= 2 * log2ceil(i + 1 + 1));
@@ -923,13 +923,13 @@
     int sn = N - i - 1;
     TEST(nodes[i]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[i]->te_inserted = 1;
 
     TEST(nodes[sn]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->te_inserted = 1;
   }
@@ -959,13 +959,13 @@
     int sn = N - i - 1;
     TEST(nodes[i]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[i]->te_inserted = 1;
 
     TEST(nodes[sn]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->te_inserted = 1;
   }
@@ -995,13 +995,13 @@
     int sn = N / 2 + i;
     TEST(nodes[i]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[i]->te_inserted = 1;
 
     TEST(nodes[sn]->te_inserted, 0);
     o = (void *)-1;
-    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0); 
+    TEST(url_map_insert(&tree, nodes[sn]->te_urlmap, &o), 0);
     TEST_P(o, NULL);
     nodes[sn]->te_inserted = 1;
   }
@@ -1026,13 +1026,13 @@
   TEST_P(tree, NULL);
 
   /* Insert in perfect order ... */
-  
+
   for (j = N / 2; j > 0; j /= 2) {
     for (i = N - j; i >= 0; i -= j) {
       if (nodes[i]->te_inserted)
 	continue;
       o = (void *)-1;
-      TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0); 
+      TEST(url_map_insert(&tree, nodes[i]->te_urlmap, &o), 0);
       TEST_P(o, NULL);
       nodes[i]->te_inserted = 1;
     }

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/url/urlmap.h	Tue Dec 16 13:05:22 2008
@@ -28,10 +28,10 @@
 
 /**
  * @file urlmap.h
- * @brief 
- * 
+ * @brief
+ *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
- *  
+ *
  * @date Created: Wed Mar 10 17:06:20 2004 ppessi
  */
 

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4	Tue Dec 16 13:05:22 2008
@@ -1,8 +1,8 @@
 dnl =====================================================================
 dnl This file contains autoconf macros shared by Sofia modules.
-dnl 
+dnl
 dnl Author: Pekka Pessi <Pekka.Pessi at nokia.com>
-dnl 
+dnl
 dnl License:
 dnl
 dnl Copyright (c) 2001,2004 Nokia and others. All Rights Reserved.
@@ -12,19 +12,19 @@
 dnl otherwise. Permission has been granted, though, to use and distribute
 dnl all macros under the following license, which is a modified version of
 dnl the GNU General Public License version 2:
-dnl 
+dnl
 dnl Each Autoconf macro in this file is free software; you can redistribute it
 dnl and/or modify it under the terms of the GNU General Public License as
 dnl published by the Free Software Foundation; either version 2, or (at your
 dnl option) any later version.
-dnl 
+dnl
 dnl They are distributed in the hope that they will be useful, but WITHOUT ANY
 dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 dnl FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 dnl details. (You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software Foundation,
 dnl Inc., 59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA.)
-dnl 
+dnl
 dnl As a special exception, the Free Software Foundation gives unlimited
 dnl permission to copy, distribute and modify the configure scripts that are
 dnl the output of Autoconf. You need not follow the terms of the GNU General
@@ -32,21 +32,21 @@
 dnl portions of the text of Autoconf appear in them. The GNU General Public
 dnl License (GPL) does govern all other use of the material that constitutes
 dnl the Autoconf program.
-dnl 
+dnl
 dnl Certain portions of the Autoconf source text are designed to be copied
-dnl (in certain cases, depending on the input) into the output of Autoconf. 
+dnl (in certain cases, depending on the input) into the output of Autoconf.
 dnl We call these the "data" portions. The rest of the Autoconf source text
 dnl consists of comments plus executable code that decides which of the data
 dnl portions to output in any given case. We call these comments and
 dnl executable code the "non-data" portions. Autoconf never copies any of
 dnl the non-data portions into its output.
-dnl 
+dnl
 dnl This special exception to the GPL applies to versions of Autoconf
 dnl released by the Free Software Foundation. When you make and distribute a
 dnl modified version of Autoconf, you may extend this special exception to
 dnl the GPL to apply to your modified version as well, *unless* your
 dnl modified version has the potential to copy into its output some of the
-dnl text that was the non-data portion of the version that you started with. 
+dnl text that was the non-data portion of the version that you started with.
 dnl (In other words, unless your change moves or copies text from the
 dnl non-data portions to the data portions.) If your modification has such
 dnl potential, you must delete any notice of this special exception to the

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-general.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-general.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-general.m4	Tue Dec 16 13:05:22 2008
@@ -1,8 +1,8 @@
 dnl =====================================================================
 dnl This file contains autoconf macros shared by Sofia modules.
-dnl 
+dnl
 dnl Author: Pekka Pessi <Pekka.Pessi at nokia.com>
-dnl 
+dnl
 dnl License:
 dnl
 dnl Copyright (c) 2001,2004 Nokia and others. All Rights Reserved.
@@ -12,19 +12,19 @@
 dnl otherwise. Permission has been granted, though, to use and distribute
 dnl all macros under the following license, which is a modified version of
 dnl the GNU General Public License version 2:
-dnl 
+dnl
 dnl Each Autoconf macro in this file is free software; you can redistribute it
 dnl and/or modify it under the terms of the GNU General Public License as
 dnl published by the Free Software Foundation; either version 2, or (at your
 dnl option) any later version.
-dnl 
+dnl
 dnl They are distributed in the hope that they will be useful, but WITHOUT ANY
 dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 dnl FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 dnl details. (You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software Foundation,
 dnl Inc., 59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA.)
-dnl 
+dnl
 dnl As a special exception, the Free Software Foundation gives unlimited
 dnl permission to copy, distribute and modify the configure scripts that are
 dnl the output of Autoconf. You need not follow the terms of the GNU General
@@ -32,21 +32,21 @@
 dnl portions of the text of Autoconf appear in them. The GNU General Public
 dnl License (GPL) does govern all other use of the material that constitutes
 dnl the Autoconf program.
-dnl 
+dnl
 dnl Certain portions of the Autoconf source text are designed to be copied
-dnl (in certain cases, depending on the input) into the output of Autoconf. 
+dnl (in certain cases, depending on the input) into the output of Autoconf.
 dnl We call these the "data" portions. The rest of the Autoconf source text
 dnl consists of comments plus executable code that decides which of the data
 dnl portions to output in any given case. We call these comments and
 dnl executable code the "non-data" portions. Autoconf never copies any of
 dnl the non-data portions into its output.
-dnl 
+dnl
 dnl This special exception to the GPL applies to versions of Autoconf
 dnl released by the Free Software Foundation. When you make and distribute a
 dnl modified version of Autoconf, you may extend this special exception to
 dnl the GPL to apply to your modified version as well, *unless* your
 dnl modified version has the potential to copy into its output some of the
-dnl text that was the non-data portion of the version that you started with. 
+dnl text that was the non-data portion of the version that you started with.
 dnl (In other words, unless your change moves or copies text from the
 dnl non-data portions to the data portions.) If your modification has such
 dnl potential, you must delete any notice of this special exception to the
@@ -56,7 +56,7 @@
 
 dnl ===================================================================
 dnl Get host, target and build variables filled with appropriate info,
-dnl and check the validity of the cache 
+dnl and check the validity of the cache
 dnl ===================================================================
 
 AC_DEFUN([SAC_CANONICAL_SYSTEM_CACHE_CHECK], [
@@ -73,7 +73,7 @@
 if test "$ac_cv_hostcheck" != "$hostcheck"; then
   AC_MSG_RESULT(changed)
   AC_MSG_WARN(config.cache exists!)
-  AC_MSG_ERROR([you must do 'make distclean' first to compile 
+  AC_MSG_ERROR([you must do 'make distclean' first to compile
  for different host or different parameters.])
 else
   AC_MSG_RESULT(ok)
@@ -116,7 +116,7 @@
     *solaris*)  ac_cv_cwflag="-erroff=%none,E_END_OF_LOOP_CODE_NOT_REACHED,E_BAD_PTR_INT_COMBINATION -errtags"
 	        ;;
     *)		ac_cv_cwflag=;;
-		esac 
+		esac
   ;;
 esac])
 AC_SUBST([CWFLAG], [$ac_cv_cwflag])
@@ -132,10 +132,10 @@
 AC_DEFUN([AC_STRUCT_SIN6], [
 AC_CACHE_CHECK([for sockaddr_in6],
   ac_cv_sin6,
-[AC_EGREP_HEADER(struct sockaddr_in6, netinet/in.h, 
+[AC_EGREP_HEADER(struct sockaddr_in6, netinet/in.h,
   ac_cv_sin6=yes, ac_cv_sin6=no)])
 if test $ac_cv_sin6 = yes ;then
-	AC_DEFINE([HAVE_SIN6], 1, 
+	AC_DEFINE([HAVE_SIN6], 1,
 		[Define to 1 if you have IPv6 structures and constants])
 fi
 ])
@@ -150,7 +150,7 @@
 #include <sys/socket.h>]], [[
  struct sockaddr t;t.sa_len = 0;]])],[ac_cv_sa_len=yes],[ac_cv_sa_len=no])])
 if test "$ac_cv_sa_len" = yes ;then
-	AC_DEFINE([HAVE_SA_LEN], 1, 
+	AC_DEFINE([HAVE_SA_LEN], 1,
 		[Define to 1 if you have sa_len in struct sockaddr])
 fi
 ])
@@ -160,7 +160,7 @@
 dnl ======================================================================
 AC_DEFUN([AC_FLAG_MSG_NOSIGNAL], [
 AC_REQUIRE([AC_PROG_CC])
-AC_CACHE_CHECK([for MSG_NOSIGNAL], 
+AC_CACHE_CHECK([for MSG_NOSIGNAL],
   ac_cv_flag_msg_nosignal, [
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
@@ -169,7 +169,7 @@
 ]])],[ac_cv_flag_msg_nosignal=yes],[ac_cv_flag_msg_nosignal=no])])
 if test "$ac_cv_flag_msg_nosignal" = yes ; then
 	AC_DEFINE([HAVE_MSG_NOSIGNAL], 1,
-		[Define to 1 if you have MSG_NOSIGNAL flag for send()]) 
+		[Define to 1 if you have MSG_NOSIGNAL flag for send()])
 fi
 ])dnl
 
@@ -178,7 +178,7 @@
 dnl ======================================================================
 AC_DEFUN([AC_SYS_MSG_ERRQUEUE], [
 AC_REQUIRE([AC_PROG_CC])
-AC_CACHE_CHECK([for MSG_ERRQUEUE], 
+AC_CACHE_CHECK([for MSG_ERRQUEUE],
   ac_cv_flag_msg_errqueue, [
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
@@ -187,7 +187,7 @@
 ]])],[ac_cv_flag_msg_errqueue=yes],[ac_cv_flag_msg_errqueue=no])])
 if test "$ac_cv_flag_msg_errqueue" = yes; then
 	AC_DEFINE([HAVE_MSG_ERRQUEUE], 1,
-		[Define to 1 if you have MSG_ERRQUEUE flag for send()]) 
+		[Define to 1 if you have MSG_ERRQUEUE flag for send()])
 fi
 ])dnl
 
@@ -196,7 +196,7 @@
 dnl ======================================================================
 AC_DEFUN([AC_SYS_IP_RECVERR], [
 AC_REQUIRE([AC_PROG_CC])
-AC_CACHE_CHECK([for IP_RECVERR], 
+AC_CACHE_CHECK([for IP_RECVERR],
   ac_cv_sys_ip_recverr, [
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
@@ -208,7 +208,7 @@
   setsockopt(s, SOL_IP, IP_RECVERR, &one, sizeof(one));
 ]])],[ac_cv_sys_ip_recverr=yes],[ac_cv_sys_ip_recverr=no])])
 if test "$ac_cv_sys_ip_recverr" = yes ; then
-	AC_DEFINE([HAVE_IP_RECVERR], 1, 
+	AC_DEFINE([HAVE_IP_RECVERR], 1,
 		[Define to 1 if you have IP_RECVERR in <netinet/in.h>])
 fi
 ])dnl
@@ -218,7 +218,7 @@
 dnl ======================================================================
 AC_DEFUN([AC_SYS_IPV6_RECVERR], [
 AC_REQUIRE([AC_PROG_CC])
-AC_CACHE_CHECK([for IPV6_RECVERR], 
+AC_CACHE_CHECK([for IPV6_RECVERR],
   ac_cv_sys_ipv6_recverr, [
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
@@ -261,7 +261,7 @@
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[char *s = __func__;
 ]])],[ac_cv_c_var_func=yes],[ac_cv_c_var_func=no]))
 if test $ac_cv_c_var_func = "yes"; then
-AC_DEFINE([HAVE_FUNC], 1, [Define to 1 if the C compiler supports __func__]) 
+AC_DEFINE([HAVE_FUNC], 1, [Define to 1 if the C compiler supports __func__])
 fi
 ])dnl
 
@@ -272,7 +272,7 @@
 char *s = __FUNCTION__;
 ]])],[ac_cv_c_macro_function=yes],[ac_cv_c_macro_function=no]))
 if test $ac_cv_c_macro_function = "yes"; then
-AC_DEFINE([HAVE_FUNCTION], 1, [Define to 1 if the C compiler supports __FUNCTION__]) 
+AC_DEFINE([HAVE_FUNCTION], 1, [Define to 1 if the C compiler supports __FUNCTION__])
 fi
 ])dnl
 
@@ -281,8 +281,8 @@
 dnl ======================================================================
 AC_DEFUN([AC_C_INLINE_DEFINE], [
 AC_C_INLINE
-case "$ac_cv_c_inline" in *inline* | yes) 
-	AC_DEFINE([HAVE_INLINE], 1, [Define to 1 if you have inlining compiler]) ;; 
+case "$ac_cv_c_inline" in *inline* | yes)
+	AC_DEFINE([HAVE_INLINE], 1, [Define to 1 if you have inlining compiler]) ;;
 esac
 ])
 
@@ -298,7 +298,7 @@
 ]])],[ac_cv_c_keyword_struct=yes],[ac_cv_c_keyword_struct=no]))
 if test $ac_cv_c_keyword_struct = "yes"; then
 AC_DEFINE([HAVE_STRUCT_KEYWORDS], 1, [
-Define to 1 if your CC supports C99 struct initialization]) 
+Define to 1 if your CC supports C99 struct initialization])
 fi
 ])
 
@@ -307,7 +307,7 @@
 dnl should be removed after automake conversion is finished
 dnl ======================================================================
 
-AC_DEFUN([AC_AUTOCONF_PARAM], 
+AC_DEFUN([AC_AUTOCONF_PARAM],
 [
 if autoconf --version | fgrep '2.13' > /dev/null ; then
     AUTOCONF_PARAM="-l"
@@ -349,7 +349,7 @@
 
 AC_DEFUN([AC_CHECK_COMPILATION_ENVIRONMENT], [
 AC_REQUIRE([AC_PROG_CC])
-AC_CACHE_CHECK([for compilation environment], 
+AC_CACHE_CHECK([for compilation environment],
   ac_cc_environment, [
 machine=`$CC -dumpmachine`
 if test "$machine" = mingw32 ; then
@@ -392,7 +392,7 @@
   [ac_cv_dev_urandom=no
    if test -r /dev/urandom; then ac_cv_dev_urandom=yes; fi])
 if test $ac_cv_dev_urandom = yes; then
-  AC_DEFINE([HAVE_DEV_URANDOM], 1, 
+  AC_DEFINE([HAVE_DEV_URANDOM], 1,
     [Define to 1 if you have /dev/urandom.])
   AC_DEFINE([DEV_URANDOM], 1,
     [Define to the random number source name.])

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-openssl.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-openssl.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-openssl.m4	Tue Dec 16 13:05:22 2008
@@ -13,7 +13,7 @@
   : # No openssl
 else
 
-  if test "$with_openssl" = "pkg-config" ; then 
+  if test "$with_openssl" = "pkg-config" ; then
     PKG_CHECK_MODULES(openssl, openssl,
 	[HAVE_TLS=1 HAVE_OPENSSL=1 LIBS="$openssl_LIBS $LIBS"],
 	[HAVE_OPENSSL=0])
@@ -26,16 +26,16 @@
     AC_CHECK_HEADERS([openssl/tls1.h], [
       HAVE_OPENSSL=1 HAVE_TLS=1
 
-      AC_CHECK_LIB(crypto, BIO_new,, 
+      AC_CHECK_LIB(crypto, BIO_new,,
       	HAVE_OPENSSL=0
       	AC_MSG_WARN(OpenSSL crypto library was not found))
 
-      AC_CHECK_LIB(ssl, TLSv1_method,, 
+      AC_CHECK_LIB(ssl, TLSv1_method,,
       	HAVE_TLS=0
       	AC_MSG_WARN(OpenSSL protocol library was not found))
      ],[AC_MSG_WARN(OpenSSL include files were not found)])
   fi
-  
+
   if test x$HAVE_OPENSSL = x1; then
      AC_DEFINE([HAVE_OPENSSL], 1, [Define to 1 if you have OpenSSL])
   fi

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-su2.m4	Tue Dec 16 13:05:22 2008
@@ -12,33 +12,33 @@
 
 dnl Define compilation options for su_configure.h
 
-case "$target" in 
+case "$target" in
 *-*-solaris?.* )
   SAC_SU_DEFINE(__EXTENSIONS__, 1, [Define to 1 in Solaris in order to get POSIX extensions.])
 ;;
 esac
 
 # Check includes used by su includes
-AC_CHECK_HEADER(sys/types.h, 
-	SAC_SU_DEFINE([SU_HAVE_SYS_TYPES], 1, 
+AC_CHECK_HEADER(sys/types.h,
+	SAC_SU_DEFINE([SU_HAVE_SYS_TYPES], 1,
 		     [Define to 1 if Sofia uses sys/types.h]))
 
 ax_inttypes=false
 AC_CHECK_HEADER(stdint.h, [
 	ax_inttypes=true
-	SAC_SU_DEFINE([SU_HAVE_STDINT], 1, 
+	SAC_SU_DEFINE([SU_HAVE_STDINT], 1,
 		     [Define to 1 if Sofia uses stdint.h])])
 AC_CHECK_HEADER(inttypes.h,[
 	ax_inttypes=true
-	SAC_SU_DEFINE([SU_HAVE_INTTYPES], 1, 
+	SAC_SU_DEFINE([SU_HAVE_INTTYPES], 1,
 		     [Define to 1 if Sofia uses inttypes.h])])
 
-if $ax_inttypes; then : ; else 
+if $ax_inttypes; then : ; else
 	AC_MSG_ERROR("No <stdint.h> or <inttypes.h> found.")
 fi
 
 if test "x$MINGW_ENVIRONMENT" != x1 ; then
-  AC_CHECK_HEADER(pthread.h, 
+  AC_CHECK_HEADER(pthread.h,
         HAVE_PTHREADS=1;
 	SAC_SU_DEFINE([SU_HAVE_PTHREADS], 1, [Sofia SU uses pthreads]))
 else
@@ -128,7 +128,7 @@
 dnl SAC_ENABLE_COREFOUNDATION
 dnl ======================================================================
 AC_ARG_ENABLE(corefoundation,
-[  --enable-corefoundation 
+[  --enable-corefoundation
                           compile with OSX COREFOUNDATION [[disabled]]],
  , enable_corefoundation=no)
 AM_CONDITIONAL(COREFOUNDATION, test $enable_corefoundation = yes)
@@ -191,7 +191,7 @@
 	       (tv)6, (tv)7, (tv)8, (tv)9, (tv)10);
 }
 ]])],[ac_cv_tagstack=yes],[ac_cv_tagstack=no],[
-case "$target" in 
+case "$target" in
 i?86-*-* ) ac_cv_tagstack=yes ;;
 * ) ac_cv_tagstack=no ;;
 esac
@@ -229,7 +229,7 @@
 
 AC_REQUIRE([AC_SYS_SA_LEN])
 if test "$ac_cv_sa_len" = yes ;then
-  SAC_SU_DEFINE([SU_HAVE_SOCKADDR_SA_LEN], 1, 
+  SAC_SU_DEFINE([SU_HAVE_SOCKADDR_SA_LEN], 1,
 	        [Define to 1 if you have sa_len in struct sockaddr])
 fi
 
@@ -238,7 +238,7 @@
 
 if ! test no$enable_ip6 = nono ; then
 AC_STRUCT_SIN6
-case $ac_cv_sin6 in 
+case $ac_cv_sin6 in
 yes) SAC_SU_DEFINE(SU_HAVE_IN6, 1, [
 	Define to 1 if you have struct sockaddr_in6]) ;;
  no) ;;
@@ -254,7 +254,7 @@
   AC_DEFINE([HAVE_WIN32], 1, [Define to 1 you have WIN32])
   SAC_SU_DEFINE([SU_HAVE_WINSOCK], 1, [Define to 1 you have WinSock])
   SAC_SU_DEFINE([SU_HAVE_WINSOCK2], 1, [Define to 1 you have WinSock2])
-  SAC_SU_DEFINE([SU_HAVE_SOCKADDR_STORAGE], 1, 
+  SAC_SU_DEFINE([SU_HAVE_SOCKADDR_STORAGE], 1,
       [Define to 1 if you have struct sockaddr_storage])
   AC_DEFINE([HAVE_ADDRINFO], 1,
       [Define to 1 if you have addrinfo structure.])
@@ -276,7 +276,7 @@
 #endif
   ])
   AC_DEFINE([HAVE_FILETIME], 1, [
-     Define to 1 if you have WIN32 FILETIME type and 
+     Define to 1 if you have WIN32 FILETIME type and
      GetSystemTimeAsFileTime().])
 ],[
 dnl no winsock2
@@ -335,7 +335,7 @@
 fi])
 
 if test "$ac_cv_struct_addrinfo" = yes; then
-  SAC_SU_DEFINE([SU_HAVE_ADDRINFO], 1, 
+  SAC_SU_DEFINE([SU_HAVE_ADDRINFO], 1,
     [Define to 1 if you have struct addrinfo.])
 fi
 
@@ -349,7 +349,7 @@
   ac_cv_struct_sockaddr_storage='sys/socket.h missing'
 fi])
 if test "$ac_cv_struct_sockaddr_storage" = yes; then
-  SAC_SU_DEFINE(SU_HAVE_SOCKADDR_STORAGE, 1, 
+  SAC_SU_DEFINE(SU_HAVE_SOCKADDR_STORAGE, 1,
     [Define to 1 if you have struct sockaddr_storage])
 fi
 
@@ -437,7 +437,7 @@
 AC_CHECK_LIB(pthread, pthread_create)
 AC_CHECK_LIB(socket, socketpair,,,-lnsl)
 
-AC_ARG_WITH(rt,  
+AC_ARG_WITH(rt,
 [  --with-rt               use POSIX realtime library [[used by default]]])
 if test "${with_rt}" != no; then
 	AC_SEARCH_LIBS(clock_gettime, rt)
@@ -451,30 +451,30 @@
 # No GLib path explicitly defined, use pkg-config
 AC_ARG_WITH(glib,
 [  --with-glib=version     use GLib (default=2.0)], [
-case "$with_glib" in 
+case "$with_glib" in
 yes | "" ) with_glib=2.0 ;;
 esac
 ], [with_glib=2.0])
 
 AC_ARG_WITH(glib-dir,
-[  --with-glib-dir=PREFIX  explicitly define GLib path],, 
+[  --with-glib-dir=PREFIX  explicitly define GLib path],,
  with_glib_dir="pkg-config")
 
 if test "$with_glib" = no || test "$with_glib_dir" = "no" ; then
 
   : # No glib
 
-elif test "$with_glib_dir" = "pkg-config" ; then 
+elif test "$with_glib_dir" = "pkg-config" ; then
 
   PKG_CHECK_MODULES(GLIB, glib-$with_glib, [HAVE_GLIB=yes], [HAVE_GLIB=no])
 
-else # GLib path is explicitly defined 
+else # GLib path is explicitly defined
 
   gprefix=$with_glib_dir
   GLIB_VERSION="$with_glib"
   GLIBXXX=glib-$with_glib
 
-  if test "$gprefix" = "yes" ; then 
+  if test "$gprefix" = "yes" ; then
     for gprefix in /usr /usr/local /opt/$GLIBXXX
     do
   	test -d $gprefix/include/$GLIBXXX && break
@@ -492,7 +492,7 @@
     # glib_mkenums=glib-mkenums
 
     HAVE_GLIB=yes
-    
+
     if test "x$MINGW_ENVIRONMENT" = x1 ; then
       GLIB_LIBS="${glibdir}/lib$GLIBXXX.dll.a ${glibdir}/libintl.a ${glibdir}/libiconv.a"
     else
@@ -501,7 +501,7 @@
     GLIB_CFLAGS="-I${gincludedir}/$GLIBXXX -I${glibdir}/$GLIBXXX/include"
   fi
 
-fi # GLib path is explicitly defined 
+fi # GLib path is explicitly defined
 
 if test "x$HAVE_GLIB" = xyes ; then
   SAC_COMMA_APPEND([SOFIA_GLIB_PKG_REQUIRES],[glib-2.0])
@@ -544,7 +544,7 @@
 fi
 
 if test $ac_cv_func_if_nameindex = yes ; then
-  SAC_SU_DEFINE([SU_HAVE_IF_NAMEINDEX], 1, 
+  SAC_SU_DEFINE([SU_HAVE_IF_NAMEINDEX], 1,
     [Define to 1 if you have if_nameindex().])
 fi
 
@@ -619,7 +619,7 @@
 # Check IPv6 addresss configuration
 # ===========================================================================
 case "$target" in
- *-*-linux*) AC_DEFINE([HAVE_PROC_NET_IF_INET6], 1, 
+ *-*-linux*) AC_DEFINE([HAVE_PROC_NET_IF_INET6], 1,
 	[Define to 1 if you have /proc/net/if_inet6 control file]) ;;
 esac
 

Modified: freeswitch/trunk/libs/sofia-sip/m4/sac-tport.m4
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/m4/sac-tport.m4	(original)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-tport.m4	Tue Dec 16 13:05:22 2008
@@ -19,7 +19,7 @@
 
 	AC_CHECK_FUNC(sigcomp_library_2_5,
             [AC_DEFINE([HAVE_SIGCOMP], 1, [Define to 1 if you have Sofia sigcomp >= 2.5])
-             AC_DEFINE([HAVE_SOFIA_SIGCOMP], 1, [Define to 1 if you have Sofia sigcomp >= 2.5])], 
+             AC_DEFINE([HAVE_SOFIA_SIGCOMP], 1, [Define to 1 if you have Sofia sigcomp >= 2.5])],
              AC_MSG_ERROR(Sofia SigComp API >= 2.5 was not found))
 fi
 

Modified: freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd	(original)
+++ freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd	Tue Dec 16 13:05:22 2008
@@ -67,7 +67,7 @@
    TEMPLATE1=%PR2%.in ^
    TEMPLATE2=%PR3%.in ^
    TEMPLATE3=%PR4%.in ^
-   TEMPLATE=%PR5%.in %SIPEXTRA% < NUL 
+   TEMPLATE=%PR5%.in %SIPEXTRA% < NUL
 %CHECK%
 
 %AWK_SIP_AWK% PT=%PT% TEMPLATE=%PT%.in ^

Modified: freeswitch/trunk/libs/sofia-sip/open_c/version.awk
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/open_c/version.awk	(original)
+++ freeswitch/trunk/libs/sofia-sip/open_c/version.awk	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 #! /bin/gawk
 #
 # This script extracts the version information from configure.ac
-# and re-generates win32/config.h and 
+# and re-generates win32/config.h and
 # libsofia-sip-ua/features/sofia_sip_features.h
 #
 # --------------------------------------------------------------------
@@ -38,7 +38,7 @@
 
 IN && /^AC_INIT/ { version=$2; gsub(/[\]\[)]/, "", version); }
 
-OUT && /@[A-Z_]+@/ { 
+OUT && /@[A-Z_]+@/ {
   gsub(/@PACKAGE_VERSION@/, version);
   gsub(/@PACKAGE_BUGREPORT@/, "sofia-sip-devel at lists.sourceforge.net");
   gsub(/@PACKAGE_NAME@/, "sofia-sip");

Modified: freeswitch/trunk/libs/sofia-sip/packages/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/packages/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/packages/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 2005-11-15  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* sofia-sip.spec.in: Removed the --includedir parameter. 
-	The public headers are now installed under 
+	* sofia-sip.spec.in: Removed the --includedir parameter.
+	The public headers are now installed under
 	includedir/sofia-sip-MAJOR.MINOR/
 
 2005-10-06  Pekka Pessi  <Pekka.Pessi at nokia.com>

Modified: freeswitch/trunk/libs/sofia-sip/packages/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/packages/Makefile.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/packages/Makefile.am	Tue Dec 16 13:05:22 2008
@@ -10,7 +10,7 @@
 pkgconfig_DATA = sofia-sip-ua.pc
 
 if HAVE_GLIB
-# We should probably have something here telling 
+# We should probably have something here telling
 # if we have gobject support or not
 pkgconfig_DATA += sofia-sip-ua-glib.pc
 endif

Modified: freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/packages/sofia-sip.spec.in	Tue Dec 16 13:05:22 2008
@@ -1,6 +1,6 @@
 # Sofia SIP UA Library
 
-Summary: Sofia SIP User-Agent library 
+Summary: Sofia SIP User-Agent library
 Name: sofia-sip
 Version: @VERSION@
 Release: 1%{?dist}
@@ -15,7 +15,7 @@
 %define opt_with() %{expand:%%global with_%{1} %%{?_with_%{1}:1}%%{?!_with_%{1}:0}}
 %define opt_without() %{expand:%%global with_%{1} %%{!?_without_%{1}:1}%%{?_without_%{1}:0}}
 
-# Options: 
+# Options:
 %opt_with doxygen	- Generate documents using doxygen and dot
 %opt_with check		- Run tests
 %opt_with openssl	- Always use OpenSSL (TLS)
@@ -94,7 +94,7 @@
 # note: soname in pkgname allows install of multiple library versions
 # The glib interface is still a bit unstable
 %package	glib at LIBVER_SOFIA_SIP_UA_GLIB_SOVER@
-Summary:	GLIB bindings for Sofia-SIP 
+Summary:	GLIB bindings for Sofia-SIP
 Group:		System Environment/Libraries
 Requires:	sofia-sip
 Obsoletes:	sofia-sip-glib < %{version}-%{release}
@@ -123,11 +123,11 @@
 Requires:	pkgconfig
 
 %description	devel
-Development package for Sofia SIP UA library. This package includes 
+Development package for Sofia SIP UA library. This package includes
 static libraries and include files.
 
 %if !%{with_doxygen}
-The reference documentation for Sofia SIP UA library is available at 
+The reference documentation for Sofia SIP UA library is available at
 <http://sofia-sip.sourceforge.net/development.html>
 %endif
 
@@ -209,7 +209,7 @@
 - Bumped version. rpmlinted.
 
 * Tue Dec  5 2006 Kai Vehmanen <first.lastname at nokia.com>
-- The 'nua-glib' module, and the related dependency to gobject, has been 
+- The 'nua-glib' module, and the related dependency to gobject, has been
   removed from the sofia-sip package
 
 * Fri Oct  6 2006 Pekka Pessi <ppessi at gmail.com> - 1.12.3

Modified: freeswitch/trunk/libs/sofia-sip/rules/lcov.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/rules/lcov.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/rules/lcov.am	Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-# 
+#
 # Generate lcov output
 #
 
@@ -37,7 +37,7 @@
 	rm -rf $$odir ; mkdir -p $$odir && \
 	${LCOV_REPORT} ${GENHTML_OPTIONS} \
           --title "${PACKAGE_NAME}-${PACKAGE_VERSION}$$sub" \
-	  --srcdir=${srcdir} -o $$odir 
+	  --srcdir=${srcdir} -o $$odir
 
 # Rerun checks before generating report
 lcov-rerun: clean-lcov

Modified: freeswitch/trunk/libs/sofia-sip/rules/recursive.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/rules/recursive.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/rules/recursive.am	Tue Dec 16 13:05:22 2008
@@ -2,7 +2,7 @@
 # --------------------------
 
 all-recursive: built-sources-recursive
-built-sources: built-sources-recursive 
+built-sources: built-sources-recursive
 clean-built-sources: clean-built-sources-recursive
 valcheck: valcheck-recursive
 

Modified: freeswitch/trunk/libs/sofia-sip/rules/valcheck.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/rules/valcheck.am	(original)
+++ freeswitch/trunk/libs/sofia-sip/rules/valcheck.am	Tue Dec 16 13:05:22 2008
@@ -1,4 +1,4 @@
-# 
+#
 # run tests with valgrind
 #
 
@@ -23,7 +23,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-VALGRIND = valgrind 
+VALGRIND = valgrind
 
 VALGRINDFLAGS = --tool=memcheck
 
@@ -34,7 +34,7 @@
 	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
 	$(MAKE) $(AM_MAKEFLAGS) valcheck-TESTS
 
-# Run tests with valgrind in 
+# Run tests with valgrind in
 valcheck-TESTS:	$(TESTS)
 	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
 	srcdir=$(srcdir); export srcdir; \

Modified: freeswitch/trunk/libs/sofia-sip/scripts/coverage
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/coverage	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/coverage	Tue Dec 16 13:05:22 2008
@@ -28,14 +28,14 @@
 
 {
 for f in *.bb
-do 
+do
     test "$f" = "*.bb" && { echo "run 'make check' first"; exit 1; }
     gcov $gcovflags "$f" 2>/dev/null
-done 
+done
 for f in $@
-do 
+do
     gcov $gcovflags "$f" 2>/dev/null
-done 
+done
 } |
 awk '
 BEGIN {
@@ -51,10 +51,10 @@
     else
 	file = "";
 }
-file ~ /\.[hc]$/ && /Lines executed/ { 
-	sub(/Lines executed:/, ""); 
+file ~ /\.[hc]$/ && /Lines executed/ {
+	sub(/Lines executed:/, "");
 	covered = int($3*$1/100 + 0.5);
-	
+
 #	printf "%-5u %-5u %-5u %-7s %s\n", $3, covered, $3 - covered, $1, file;
 	if ($3 == 0) {
 		/* skip */
@@ -69,11 +69,11 @@
         }
 }
 
-/torture/ { next; } 
+/torture/ { next; }
 /test/ { next; }
 /\/usr\/include/ { next; }
 
-/(source )?lines executed in file (.*\/)?[-A-Za-z_0-9]+\.[ch]/ { 
+/(source )?lines executed in file (.*\/)?[-A-Za-z_0-9]+\.[ch]/ {
         file = $0;
 	sub(/.* in file /, "", file);
 	sub(/.*\//, "", file);
@@ -98,7 +98,7 @@
 	l = lines[file]; c = coverage[file];
 	covered = int(c + 0.5);
         total += l; total_coverage += c;
-	printf "%-5u %-5u %-5u %6.2f%%  %s\n", 
+	printf "%-5u %-5u %-5u %6.2f%%  %s\n",
 		l, covered, l - covered, 100.0 * c / l, file;
     }
     if (total) {

Modified: freeswitch/trunk/libs/sofia-sip/scripts/fix-include-sofia-sip
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/fix-include-sofia-sip	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/fix-include-sofia-sip	Tue Dec 16 13:05:22 2008
@@ -1,12 +1,12 @@
 #! /bin/sed -f
-# 
+#
 # Run this script like
 #
 # fix-include-sofia-sip -i.bak source.h source.c
 #
 # or
 #
-# find . -name '*.[hc]' -print0 | xargs -0 fix-include-sofia-sip -i.bak 
+# find . -name '*.[hc]' -print0 | xargs -0 fix-include-sofia-sip -i.bak
 #
 /^ *# *include/ {
 # Not using features.h...

Modified: freeswitch/trunk/libs/sofia-sip/scripts/hide_emails.sh
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/hide_emails.sh	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/hide_emails.sh	Tue Dec 16 13:05:22 2008
@@ -31,7 +31,7 @@
 
 echo "Postprocessing HTML in ${1:-.}: hiding email addresses, fixing links"
 
-find ${1:-.} -name '*.html' -print0 | 
+find ${1:-.} -name '*.html' -print0 |
 xargs -0 \
 sed -r -i '
 # Hide e-mail addresses

Modified: freeswitch/trunk/libs/sofia-sip/scripts/lcov-report
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/lcov-report	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/lcov-report	Tue Dec 16 13:05:22 2008
@@ -30,7 +30,7 @@
 
 while test $# -gt 0;
 do
-  case $1 in 
+  case $1 in
   --srcdir | -s )
     test -z "$2" && usage 1; shift; srcdir=$1; shift; ;;
   --srcdir=* )
@@ -41,7 +41,7 @@
     o=${1#--output?directory=}; shift ;;
   --prefix=* | --title=* | --show-details | --legend | --frames )
     GENHTML_OPTIONS="${GENHTML_OPTIONS} $1" ; shift ;;
-  --prefix | --title ) 
+  --prefix | --title )
     test -z "$2" && usage 1; GENHTML_OPTIONS="${GENHTML_OPTIONS} $1 $2" ; shift ; shift ;;
   --help | '-?' | -h ) usage 0 ;;
   - ) shift; break ;;
@@ -53,7 +53,7 @@
 info=${o:=.}/lcov.info geninfo=${o}/genhtml.info
 rm -f ${info} ${info}
 
-case ${GENHTML_OPTIONS} in *--prefix* ) ;; *) 
+case ${GENHTML_OPTIONS} in *--prefix* ) ;; *)
   GENHTML_OPTIONS="${GENHTML_OPTIONS} --prefix=`cd ${srcdir:=.} && pwd`"
 esac
 
@@ -64,7 +64,7 @@
     # remove source files in builddir
     test ${srcdir:-.} = . || lcov -l ${info} | grep "`pwd`"
     # remove test programs
-    lcov -l ${info} | grep "/test\|/torture\|_test[.][ch][+xp]*$" 
+    lcov -l ${info} | grep "/test\|/torture\|_test[.][ch][+xp]*$"
 } |
 cut -d: -f1 |
 xargs lcov -r ${info} > ${geninfo}

Modified: freeswitch/trunk/libs/sofia-sip/scripts/rpmbuild-snaphot
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/rpmbuild-snaphot	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/rpmbuild-snaphot	Tue Dec 16 13:05:22 2008
@@ -27,7 +27,7 @@
 
 function usage
 {
-  echo "usage: snapshot.sh [-bc|-bb] [-c|--configure] [rpmbuild options]" 
+  echo "usage: snapshot.sh [-bc|-bb] [-c|--configure] [rpmbuild options]"
   exit $@
 }
 
@@ -36,10 +36,10 @@
 
 case "$1" in -b? ) bb=$1 ; shift ;; esac
 
-while true ; do 
-  case "$1" in 
+while true ; do
+  case "$1" in
   -c | --configure | --co ) configure=1; shift; ;;
-  '-?' | --help | -h ) usage 0 ;; 
+  '-?' | --help | -h ) usage 0 ;;
   *) break ;;
   esac
 done
@@ -89,24 +89,24 @@
 /@VERSION@/ { sub(/@VERSION@/, version); }
 /@PACKAGE@/ { sub(/@PACKAGE@/, package); }
 /@PACKAGE_NAME@/ { sub(/@PACKAGE_NAME@/, package_name); }
-/@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@/ { 
+/@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@/ {
   sub(/@LIBVER_SOFIA_SIP_UA_GLIB_SOVER@/, glib_sover);
 }
-/^Release:/ { 
+/^Release:/ {
   print "Release: " release "%{?dist}\n";
   print "Prefix: " prefix "\n";
   next;
 }
 /^Source0:/ { print "Source0:" dummy "\n"; next; }
-/disable-dependency-tracking/ { 
+/disable-dependency-tracking/ {
   sub(/--disable-dependency-tracking/, "");
 }
-/^%configure/ { 
+/^%configure/ {
  print "cd " "\"" pwd "\"";
  if (!configure) { $1="echo skipping configure"; }
  $1=$1 "-C --enable-maintainer-mode";
- print $0; 
- next; 
+ print $0;
+ next;
 }
 # Do not make documentation
 /^make doc/ { print "echo skipping " $0; next; }

Modified: freeswitch/trunk/libs/sofia-sip/scripts/uncovered
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/scripts/uncovered	(original)
+++ freeswitch/trunk/libs/sofia-sip/scripts/uncovered	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 
 while test $# -gt 0;
 do
-  case $1 in 
+  case $1 in
   --lcov-dir | -l ) test -z "$2" && usage 1; shift; ldir=$1; shift; ;;
   --lcov-dir=* ) ldir=${1#--ldir=}; shift ;;
   --srcdir | -s )
@@ -41,21 +41,21 @@
 
 cwd=`pwd`
 
-tdir=${TMPDIR:-/tmp}/$USER.uncovered.$$ 
+tdir=${TMPDIR:-/tmp}/$USER.uncovered.$$
 info=${tdir}/lcov.info geninfo=${tdir}/genhtml.info
 
 test -d ${tdir} && { echo ${tdir}: already exists ; exit 2 ; }
 
 mkdir -p ${tdir} &&
 {
-    # Find all lcov.info0 under -t DIR 
+    # Find all lcov.info0 under -t DIR
     test -d ${ldir} &&
     find ${ldir} -name lcov.info |
     while read s
     do
-      find $cwd -type f -not -newer $s | xargs lcov -q -e $s 
+      find $cwd -type f -not -newer $s | xargs lcov -q -e $s
     done
-    
+
     lcov -q -c -d . --compat-libtool
 } > ${info}
 
@@ -65,8 +65,8 @@
   # remove system includes with with inlined functions
   lcov -q -l ${info} | grep -v "`cd ${srcdir:-.} && pwd`"
   # remove test programs
-  lcov -q -l ${info} | grep "/test\|/torture\|_test[.]c$" 
-} | 
+  lcov -q -l ${info} | grep "/test\|/torture\|_test[.]c$"
+} |
 cut -d: -f1 |
 xargs lcov -q -r ${info} > ${geninfo} &&
 cd ${tdir} &&
@@ -107,7 +107,7 @@
         for ($f = $ARGV) {
           s:^[.]'$cwd/'::o;
           s:[.]gcov[.]html$::;
-        } 
+        }
         s/^ +(\d+)[^:]+:/$1:/;
         $uncovered = $f . ":" . $_;
       }

Modified: freeswitch/trunk/libs/sofia-sip/tests/check_sofia.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/check_sofia.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/check_sofia.c	Tue Dec 16 13:05:22 2008
@@ -38,7 +38,7 @@
 #include <stdlib.h>
 
 /* Globals used by <sofia-sip/tstdef.h> */
-int tstflags;			
+int tstflags;
 char const name[] = "check_sofia";
 
 int main(int argc, char *argv[])

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_100rel.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_100rel.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_100rel.c	Tue Dec 16 13:05:22 2008
@@ -106,7 +106,7 @@
     RESPOND(ep, call, nh, SIP_180_RINGING,
 	    TAG_IF(call->sdp, SOATAG_USER_SDP_STR(call->sdp)),
 	    TAG_END());
-    RESPOND(ep, call, nh, SIP_200_OK, 
+    RESPOND(ep, call, nh, SIP_200_OK,
 	    NUTAG_INCLUDE_EXTRA_SDP(1),
 	    TAG_END());
     return 0;
@@ -283,7 +283,7 @@
 
   if (print_headings)
     printf("TEST NUA-10.1.2: PASSED\n");
-  
+
   END();
 }
 
@@ -395,7 +395,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 407);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(au = sip->sip_proxy_authenticate); 
+  TEST_1(au = sip->sip_proxy_authenticate);
 
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_calling); /* CALLING */
@@ -499,7 +499,7 @@
 
   if (print_headings)
     printf("TEST NUA-10.1.4: PASSED\n");
-  
+
   END();
 }
 
@@ -607,12 +607,12 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
   TEST_1(!is_offer_answer_done(e->data->e_tags));
-  
+
   if (!ep) {
     TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_prack);
     TEST(e->data->e_status, 200);
   }
-    
+
   ei = event_by_type(e->next, nua_r_invite);
   ep = event_by_type(e->next, nua_r_prack);
   if (!ep) {
@@ -696,7 +696,7 @@
 
   /* Client transitions:
      INIT -(C1)-> CALLING: nua_invite(), nua_i_state
-     CALLING -(C2)-> TERMINATING: nua_r_invite, nua_i_state, 
+     CALLING -(C2)-> TERMINATING: nua_r_invite, nua_i_state,
                                   nua_r_prack, nua_i_state
      TERMINATING -(T1)-> TERMINATED: nua_r_invite, nua_i_state
   */
@@ -722,7 +722,7 @@
     int bye = 1, cancel = 1, invite = 1, state = 1;
 
     while (bye || cancel || invite || state) {
-      TEST_1(e = e->next); 
+      TEST_1(e = e->next);
       if (e->data->e_event == nua_r_bye) {
 	TEST_E(e->data->e_event, nua_r_bye);
 	TEST(e->data->e_status, 200);
@@ -778,9 +778,9 @@
   /* 183 is PRACKed, PRACK is responded with 483 */
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_prack);
 
-  /* Client terminates the call 
-     - we may (it is received before BYE) or may not (received after BYE) 
-       get CANCEL request 
+  /* Client terminates the call
+     - we may (it is received before BYE) or may not (received after BYE)
+       get CANCEL request
   */
   TEST_1(e = e->next);
   if (e->data->e_event == nua_i_cancel) {
@@ -1116,7 +1116,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_update);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_early); /* EARLY */
-  TEST_1(!is_offer_sent(e->data->e_tags)); 
+  TEST_1(!is_offer_sent(e->data->e_tags));
   TEST_1(is_offer_recv(e->data->e_tags));
   TEST_1(is_answer_sent(e->data->e_tags));
   TEST_1(!is_answer_recv(e->data->e_tags));
@@ -1281,9 +1281,9 @@
    |-------200 OK-------|
    |			|
 
-   Note that the boxed responses above can be re-ordered 
+   Note that the boxed responses above can be re-ordered
    (180 or 200 OK to INVITE is received before 200 OK to UPDATE).
-   ACK, however, is sent only after 200 OK to both UPDATE and INVITE. 
+   ACK, however, is sent only after 200 OK to both UPDATE and INVITE.
 */
 
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
@@ -1513,7 +1513,7 @@
     return 0;
   case nua_r_update:
     if (200 <= status && status < 300) {
-      RESPOND(ep, call, nh, SIP_180_RINGING, 
+      RESPOND(ep, call, nh, SIP_180_RINGING,
 	      SIPTAG_REQUIRE_STR("100rel"),
 	      TAG_END());
       ep->next_condition = accept_pracked;
@@ -1741,7 +1741,7 @@
   do {
     TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
     TEST(callstate(e->data->e_tags), nua_callstate_early); /* EARLY */
-    TEST_1(is_offer_sent(e->data->e_tags)); 
+    TEST_1(is_offer_sent(e->data->e_tags));
     TEST_1(!is_offer_recv(e->data->e_tags));
     TEST_1(!is_answer_sent(e->data->e_tags));
     TEST_1(!is_answer_recv(e->data->e_tags));
@@ -2035,7 +2035,7 @@
 #endif
   END();
 }
- 
+
 int cancel_when_pracked(CONDITION_PARAMS);
 int alert_call(CONDITION_PARAMS);
 
@@ -2129,7 +2129,7 @@
    Option B:
    EARLY -(S3b)-> COMPLETED: nua_respond(), nua_i_state
    COMPLETED -(S4)-> READY: nua_i_ack, nua_i_state
-   READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state   
+   READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state
   */
   TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_invite);
   TEST(e->data->e_status, 100);
@@ -2157,7 +2157,7 @@
 
   if (print_headings)
     printf("TEST NUA-10.6: PASSED\n");
-  
+
   END();
 }
 
@@ -2298,7 +2298,7 @@
    Option B:
    EARLY -(S3b)-> COMPLETED: nua_respond(), nua_i_state
    COMPLETED -(S4)-> READY: nua_i_ack, nua_i_state
-   READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state   
+   READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state
   */
   TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_invite);
   TEST(e->data->e_status, 100);
@@ -2343,7 +2343,7 @@
 
   if (print_headings)
     printf("TEST NUA-10.7: PASSED\n");
-  
+
   END();
 }
 
@@ -2561,7 +2561,7 @@
 
   if (print_headings)
     printf("TEST NUA-10.8.2: PASSED\n");
-  
+
   END();
 }
 
@@ -2575,7 +2575,7 @@
   if (event == nua_i_prack) {
     if (!ep->flags.bit0) {
       sip_contact_t m[1];
-      
+
       ep->flags.bit0 = 1;
 
       *m = *ep->contact;

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_basic_call.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_basic_call.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_basic_call.c	Tue Dec 16 13:05:22 2008
@@ -75,7 +75,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    TAG_END());
     return 0;
   case nua_callstate_early:
@@ -115,7 +115,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    TAG_IF(call->sdp, SOATAG_USER_SDP_STR(call->sdp)),
 	    NUTAG_M_DISPLAY("Bob"),
 	    NUTAG_M_USERNAME("b+b"),
@@ -212,8 +212,8 @@
     printf("TEST NUA-3.1: Basic call\n");
 
   /* Disable session timer from proxy */
-  test_proxy_get_session_timer(ctx->p, &se, &min_se); 
-  test_proxy_set_session_timer(ctx->p, 0, 0); 
+  test_proxy_get_session_timer(ctx->p, &se, &min_se);
+  test_proxy_set_session_timer(ctx->p, 0, 0);
 
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   b_call->sdp = "m=audio 5010 RTP/AVP 0 8";
@@ -357,7 +357,7 @@
   nua_handle_destroy(a_call->nh), a_call->nh = NULL;
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
 
-  test_proxy_set_session_timer(ctx->p, se, min_se); 
+  test_proxy_set_session_timer(ctx->p, se, min_se);
 
   if (print_headings)
     printf("TEST NUA-3.1: PASSED\n");
@@ -422,7 +422,7 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   b_call->sdp = "m=audio 5010 RTP/AVP 0 8";
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sip:b at x.org>"),
 				 TAG_END()));
 
@@ -453,7 +453,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip->sip_content_type); 
+  TEST_1(sip->sip_content_type);
   TEST_S(sip->sip_content_type->c_type, "application/sdp");
   TEST_1(sip->sip_payload);	/* there is sdp in 200 OK */
   TEST_1(sip->sip_contact);
@@ -533,7 +533,7 @@
   TEST_1(sip->sip_subscription_state);
   TEST_S(sip->sip_subscription_state->ss_substate, "terminated");
   TEST_1(tl_find(e->data->e_tags, nutag_substate));
-  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, 
+  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
        nua_substate_terminated);
   TEST_1(!e->next);
 
@@ -615,7 +615,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    NUTAG_MEDIA_ENABLE(0),
 	    TAG_END());
     return 0;
@@ -655,7 +655,7 @@
     "t=0 0\r\n"
     "m=audio 5008 RTP/AVP 8\r\n";
 
-  b_call->sdp = 
+  b_call->sdp =
     "v=0\r\n"
     "o=- 2 1 IN IP4 127.0.0.1\r\n"
     "s=-\r\n"
@@ -663,7 +663,7 @@
     "t=0 0\r\n"
     "m=audio 5010 RTP/AVP 0 8\r\n";
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sip:b at x.org>"),
 				 TAG_END()));
 
@@ -695,7 +695,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip->sip_content_type); 
+  TEST_1(sip->sip_content_type);
   TEST_S(sip->sip_content_type->c_type, "application/sdp");
   TEST_1(sip->sip_payload);	/* there is sdp in 200 OK */
   TEST_1(sip->sip_contact);
@@ -780,7 +780,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_completing:
-    ACK(ep, call, nh, 
+    ACK(ep, call, nh,
 	TAG_IF(call->sdp, SIPTAG_CONTENT_TYPE_STR("application/sdp")),
 	TAG_IF(call->sdp, SIPTAG_PAYLOAD_STR(call->sdp)),
 	TAG_END());
@@ -805,7 +805,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    NUTAG_MEDIA_ENABLE(0),
 	    TAG_IF(call->sdp, SIPTAG_CONTENT_TYPE_STR("application/sdp")),
 	    TAG_IF(call->sdp, SIPTAG_PAYLOAD_STR(call->sdp)),
@@ -848,7 +848,7 @@
     "t=0 0\r\n"
     "m=audio 5008 RTP/AVP 8\r\n";
 
-  b_call->sdp = 
+  b_call->sdp =
     "v=0\r\n"
     "o=- 2 1 IN IP4 127.0.0.1\r\n"
     "s=-\r\n"
@@ -856,7 +856,7 @@
     "t=0 0\r\n"
     "m=audio 5010 RTP/AVP 0 8\r\n";
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sip:b at x.org>"),
 				 TAG_END()));
 
@@ -889,7 +889,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip->sip_content_type); 
+  TEST_1(sip->sip_content_type);
   TEST_S(sip->sip_content_type->c_type, "application/sdp");
   TEST_1(sip->sip_payload);	/* there is sdp in 200 OK */
   TEST_1(sip->sip_contact);
@@ -996,8 +996,8 @@
 }
 
 /* Test changing from/to within dialog */
-/* Test that a proper Contact gets selected in response 
- * regardless of the To URI. 
+/* Test that a proper Contact gets selected in response
+ * regardless of the To URI.
  */
 int test_basic_call_5(struct context *ctx)
 {
@@ -1014,7 +1014,7 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   b_call->sdp = "m=audio 5010 RTP/AVP 0 8";
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sips:b at x.org>"),
 				 TAG_END()));
 
@@ -1073,8 +1073,8 @@
   TEST(callstate(e->data->e_tags), nua_callstate_completed); /* COMPLETED */
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_ack);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_S(sip->sip_to->a_url->url_user, "anonymous"); 
-  TEST_S(sip->sip_from->a_url->url_user, "anonymous"); 
+  TEST_S(sip->sip_to->a_url->url_user, "anonymous");
+  TEST_S(sip->sip_from->a_url->url_user, "anonymous");
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
   TEST_1(!e->next);
@@ -1177,8 +1177,8 @@
     printf("TEST NUA-3.6: Basic call\n");
 
   /* Disable session timer from proxy */
-  test_proxy_get_session_timer(ctx->p, &se, &min_se); 
-  test_proxy_set_session_timer(ctx->p, 0, 0); 
+  test_proxy_get_session_timer(ctx->p, &se, &min_se);
+  test_proxy_set_session_timer(ctx->p, 0, 0);
 
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   b_call->sdp = "m=audio 5010 RTP/AVP 0 8";
@@ -1256,8 +1256,8 @@
   a_call->sdp =
     "m=audio 5008 RTP/AVP 8\n"
     "m=video 5014 RTP/AVP 34 31\n";
-  
-  m = memset(b_video, 0, sizeof b_video);    
+
+  m = memset(b_video, 0, sizeof b_video);
   m->m_size = sizeof *m;
   m->m_session = b_sdp;
   m->m_type = sdp_media_video, m->m_type_name = "video";
@@ -1265,7 +1265,7 @@
   m->m_proto = sdp_proto_rtp; m->m_proto_name = "RTP/AVP";
   m->m_rtpmaps = memset(rm = b_h261, 0, sizeof b_h261);
   rm->rm_size = sizeof *rm;
-  rm->rm_pt = 31; rm->rm_encoding = "h261"; rm->rm_rate = 90000; 
+  rm->rm_pt = 31; rm->rm_encoding = "h261"; rm->rm_rate = 90000;
 
   b_sdp->sdp_media->m_next = m;
 
@@ -1336,7 +1336,7 @@
   nua_handle_destroy(a_call->nh), a_call->nh = NULL;
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
 
-  test_proxy_set_session_timer(ctx->p, se, min_se); 
+  test_proxy_set_session_timer(ctx->p, se, min_se);
 
   if (print_headings)
     printf("TEST NUA-3.6: PASSED\n");
@@ -1421,7 +1421,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    TAG_IF(call->sdp, SOATAG_USER_SDP_STR(call->sdp)),
 	    SIPTAG_CONTACT(contact_for_b),
 	    TAG_END());
@@ -1475,11 +1475,11 @@
   mb->m_url->url_user = "b++b";
 
   contact_for_b = mb;
-  
+
   sip_route_init(rb)->r_url[0] = b->contact->m_url[0];
   rb->r_url->url_user = "bob+0";
   url_param_add(nua_handle_home(a_call->nh), rb->r_url, "lr");
-  
+
   INVITE(a, a_call, a_call->nh,
 	 NUTAG_URL("sip:bob at example.org"), /* Expanded by proxy */
 	 SIPTAG_ROUTE_STR("B2 <sip:bob+2 at example.org>;bar=foo"), /* Last in list */
@@ -1582,7 +1582,7 @@
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
   TEST_1(!e->next);
   free_events_in_list(ctx, a->events);
-  
+
   TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_invite);
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
@@ -1773,7 +1773,7 @@
   free_events_in_list(ctx, b->events);
 
   /* Make B to process HUMPPA at application level */
-  nua_set_hparams(b_call->nh, NUTAG_APPL_METHOD("HUMPPA"), 
+  nua_set_hparams(b_call->nh, NUTAG_APPL_METHOD("HUMPPA"),
 		  NUTAG_ALLOW("HUMPPA"),
 		  TAG_END());
   run_b_until(ctx, nua_r_set_params, until_final_response);
@@ -1898,7 +1898,7 @@
   /* Let A allow INFO  */
   nua_set_params(a->nua, NUTAG_ALLOW("INFO"), TAG_END());
   /* Make B to process INFO at application level */
-  nua_set_hparams(b_call->nh, NUTAG_APPL_METHOD("INFO"), 
+  nua_set_hparams(b_call->nh, NUTAG_APPL_METHOD("INFO"),
 		  NUTAG_ALLOW("INFO"),
 		  TAG_END());
   run_ab_until(ctx, nua_r_set_params, NULL, nua_r_set_params, NULL);
@@ -1955,7 +1955,7 @@
   save_event_in_list(ctx, event, ep, call);
 
   if (event == nua_i_method) {
-    RESPOND(ep, call, nh, 
+    RESPOND(ep, call, nh,
 	    SIP_604_DOES_NOT_EXIST_ANYWHERE,
 	    NUTAG_WITH(current),
 	    TAG_END());
@@ -1974,7 +1974,7 @@
   save_event_in_list(ctx, event, ep, call);
 
   if (event == nua_i_info) {
-    RESPOND(ep, call, nh, 
+    RESPOND(ep, call, nh,
 	    SIP_480_TEMPORARILY_UNAVAILABLE,
 	    NUTAG_WITH(current),
 	    TAG_END());

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_call_hold.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_call_hold.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_call_hold.c	Tue Dec 16 13:05:22 2008
@@ -524,7 +524,7 @@
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
   TEST_1(!e->next);
   free_events_in_list(ctx, b->events);
-  
+
   TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_ack);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
@@ -618,7 +618,7 @@
   TEST_1(!e->next);
 #endif
   free_events_in_list(ctx, b->events);
-  
+
   TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_ack);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
@@ -632,7 +632,7 @@
   if (print_headings)
     printf("TEST NUA-7.6.2: PASSED\n");
   }
-  
+
 
   /* ---------------------------------------------------------------------- */
   /*
@@ -742,7 +742,7 @@
 static size_t remove_first_ack(void *_once, void *message, size_t len)
 {
   int *once = _once;
-  
+
   if (*once)
     return len;
 
@@ -792,8 +792,8 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 0 8\n";
   b_call->sdp = "m=audio 5010 RTP/AVP 8\n";
 
-  TEST_1(a_call->nh = 
-	 nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh =
+	 nua_handle(a->nua, a_call,
 		    SIPTAG_FROM_STR("Alice <sip:alice at example.com>"),
 		    SIPTAG_TO(b->to),
 		    NUTAG_AUTOANSWER(0),
@@ -823,12 +823,12 @@
 */
 
   /* re-INVITE A, send BYE after receiving 180 */
-  INVITE(b, b_call, b_call->nh, 
+  INVITE(b, b_call, b_call->nh,
 	 SIPTAG_SUBJECT_STR("re-INVITE"),
 	 TAG_END());
   /* Run until both a and b has terminated their call */
   run_ab_until(ctx, -1, ringing_until_terminated, -1, bye_when_ringing);
-  
+
 #if notyet
   struct event *e;
 
@@ -849,8 +849,8 @@
   TEST(callstate(e->data->e_tags), nua_callstate_terminating); /* READY */
   /* Now we can receive events, in any possible order */
   /* XXX */
-  TEST_1(e = e->next); 
-  
+  TEST_1(e = e->next);
+
   TEST_1(!nua_handle_has_active_call(a_call->nh));
 
   /*
@@ -890,7 +890,7 @@
 }
 
 /*
- Accept INVITE 
+ Accept INVITE
  X
  |                    |
  |-------INVITE------>|
@@ -998,8 +998,8 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 0 8\n";
   b_call->sdp = "m=audio 5010 RTP/AVP 8\n";
 
-  TEST_1(a_call->nh = 
-	 nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh =
+	 nua_handle(a->nua, a_call,
 		    SIPTAG_FROM_STR("Alice <sip:alice at example.com>"),
 		    SIPTAG_TO(b->to),
 		    TAG_END()));
@@ -1098,7 +1098,7 @@
   }
   else switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    SIPTAG_REQUIRE_STR("100rel"),
 	    TAG_END());
     return 0;
@@ -1166,7 +1166,7 @@
     printf("TEST NUA-7: Test call hold and re-INVITEs\n");
 
   retval = test_call_hold(ctx);
-  
+
   if (retval == 0)
     retval = test_reinvite(ctx);
 

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_call_reject.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_call_reject.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_call_reject.c	Tue Dec 16 13:05:22 2008
@@ -128,7 +128,7 @@
   TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_invite);
   TEST(e->data->e_status, 100);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip->sip_contact); TEST_1(!sip->sip_contact->m_next); 
+  TEST_1(sip->sip_contact); TEST_1(!sip->sip_contact->m_next);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_received); /* RECEIVED */
   TEST_1(is_offer_recv(e->data->e_tags));
@@ -1042,7 +1042,7 @@
   TEST(e->data->e_status, 904);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_terminated); /* TERMINATED */
-  TEST_1(!e->next); 
+  TEST_1(!e->next);
 
   free_events_in_list(ctx, a->events);
 
@@ -1263,7 +1263,7 @@
 {
   (void)arg;
 
-  if (len >= 7 && strncasecmp(message, "ACK sip", 7) == 0) 
+  if (len >= 7 && strncasecmp(message, "ACK sip", 7) == 0)
     return 0;
   return len;
 }
@@ -1297,7 +1297,7 @@
   TEST_1(f = test_nat_add_filter(ctx->nat, filter_200_OK, NULL, nat_inbound));
   TEST_1(f2 = test_nat_add_filter(ctx->nat, filter_200_OK,
 				  NULL, nat_outbound));
-  
+
   INVITE(a, a_call, a_call->nh,
 	 TAG_IF(!ctx->proxy_tests, NUTAG_URL(b->contact->m_url)),
 	 SIPTAG_SUBJECT_STR("NUA-4.7.1"),
@@ -1383,7 +1383,7 @@
   TEST_1(a_call->nh = nua_handle(a->nua, a_call, SIPTAG_TO(b->to), TAG_END()));
 
   TEST_1(f = test_nat_add_filter(ctx->nat, filter_ACK, NULL, nat_outbound));
-  
+
   INVITE(a, a_call, a_call->nh,
 	 TAG_IF(!ctx->proxy_tests, NUTAG_URL(b->contact->m_url)),
 	 SIPTAG_SUBJECT_STR("NUA-4.7.2"),
@@ -1421,14 +1421,14 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 180);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_proceeding); 
+  TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_bye);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_terminated); 
+  TEST(callstate(e->data->e_tags), nua_callstate_terminated);
   TEST_1(!e->next);
 
   /*
@@ -1503,7 +1503,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 180);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_proceeding); 
+  TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
@@ -1513,7 +1513,7 @@
   TEST(callstate(e->data->e_tags), nua_callstate_terminating);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_bye);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_terminated); 
+  TEST(callstate(e->data->e_tags), nua_callstate_terminated);
   TEST_1(!e->next);
 
   /*
@@ -1559,7 +1559,7 @@
   TEST_1(a_call->nh = nua_handle(a->nua, a_call, SIPTAG_TO(b->to), TAG_END()));
 
   TEST_1(f = test_nat_add_filter(ctx->nat, filter_ACK, NULL, nat_outbound));
-  
+
   INVITE(a, a_call, a_call->nh,
 	 TAG_IF(!ctx->proxy_tests, NUTAG_URL(b->contact->m_url)),
 	 SIPTAG_SUBJECT_STR("NUA-4.7.4"),
@@ -1599,14 +1599,14 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 180);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_proceeding); 
+  TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_ready); /* READY */
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_bye);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_terminated); 
+  TEST(callstate(e->data->e_tags), nua_callstate_terminated);
   TEST_1(!e->next);
 
   /*
@@ -1626,7 +1626,7 @@
   TEST_1(is_answer_sent(e->data->e_tags));
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_error);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_terminating); 
+  TEST(callstate(e->data->e_tags), nua_callstate_terminating);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_bye);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_terminated); /* TERMINATED */

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_cancel_bye.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_cancel_bye.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_cancel_bye.c	Tue Dec 16 13:05:22 2008
@@ -288,7 +288,7 @@
     printf("TEST NUA-5.1.2: PASSED\n");
 
  /* ----------------------------------------------------------------------- */
- 
+
   if (print_headings)
     printf("TEST NUA-5.2.1: cancel call when ringing\n");
 
@@ -687,7 +687,7 @@
   TEST_1(is_offer_recv(e->data->e_tags));
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_early); /* EARLY */
-  TEST_1(!e->next);  
+  TEST_1(!e->next);
 
   free_events_in_list(ctx, b->events);
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
@@ -757,7 +757,7 @@
     TEST(e->data->e_status, 180);
     TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
     TEST(callstate(e->data->e_tags), nua_callstate_proceeding); /* PROCEEDING */
-    TEST_1(e = e->next); 
+    TEST_1(e = e->next);
   }
   if (e->data->e_event == nua_r_invite) {
     TEST_E(e->data->e_event, nua_r_invite);
@@ -765,7 +765,7 @@
     TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
     TEST(callstate(e->data->e_tags), nua_callstate_completing); /* COMPLETING */
     TEST_1(is_answer_recv(e->data->e_tags));
-    TEST_1(e = e->next); 
+    TEST_1(e = e->next);
   }
   TEST_E(e->data->e_event, nua_i_bye);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
@@ -790,7 +790,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_completed); /* COMPLETED */
   TEST_1(is_answer_sent(e->data->e_tags));
-  TEST_1(!e->next);  
+  TEST_1(!e->next);
 
   free_events_in_list(ctx, b->events);
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
@@ -866,7 +866,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
   TEST(callstate(e->data->e_tags), nua_callstate_completed); /* COMPLETED */
   TEST_1(is_answer_sent(e->data->e_tags));
-  TEST_1(!e->next);  
+  TEST_1(!e->next);
 
   free_events_in_list(ctx, b->events);
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
@@ -885,7 +885,7 @@
   a_call->sdp = "m=audio 5008 RTP/AVP 8";
   b_call->sdp = "m=audio 5010 RTP/AVP 0 8";
 
-  return 
+  return
     test_call_destroy_1(ctx) ||
     test_call_destroy_2(ctx) ||
     test_call_destroy_3(ctx) ||
@@ -1108,12 +1108,12 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 180);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_proceeding); 
+  TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
 
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_completing); 
+  TEST(callstate(e->data->e_tags), nua_callstate_completing);
   TEST_1(e = e->next);
 
   TEST_E(e->data->e_event, nua_r_bye); TEST(e->data->e_status, 200);
@@ -1212,7 +1212,7 @@
   free_events_in_list(ctx, b->events);
 
   /* re-INVITE A. */
-  INVITE(b, b_call, b_call->nh, 
+  INVITE(b, b_call, b_call->nh,
 	 SIPTAG_SUBJECT_STR("NUA-6.3 re-INVITE"),
 	 TAG_END());
   run_ab_until(ctx, -1, reject_reinvite_401, -1, save_until_final_response);
@@ -1224,7 +1224,7 @@
   free_events_in_list(ctx, b->events);
 
   BYE(b, b_call, b_call->nh, TAG_END());
-  
+
   run_ab_until(ctx, -1, until_terminated, -1, until_terminated);
 
   free_events_in_list(ctx, a->events);
@@ -1287,7 +1287,7 @@
   free_events_in_list(ctx, b->events);
 
   /* re-INVITE A. */
-  INVITE(b, b_call, b_call->nh, 
+  INVITE(b, b_call, b_call->nh,
 	 SIPTAG_SUBJECT_STR("NUA-6.4.1 re-INVITE"),
 	 TAG_END());
   run_ab_until(ctx, -1, reject_reinvite_401, -1, save_until_final_response);
@@ -1299,7 +1299,7 @@
   free_events_in_list(ctx, b->events);
 
   BYE(a, a_call, a_call->nh, TAG_END());
-  
+
   run_ab_until(ctx, -1, until_terminated, -1, until_terminated);
 
   free_events_in_list(ctx, a->events);
@@ -1362,7 +1362,7 @@
   free_events_in_list(ctx, b->events);
 
   /* UPDATE A. */
-  UPDATE(b, b_call, b_call->nh, 
+  UPDATE(b, b_call, b_call->nh,
 	 SIPTAG_SUBJECT_STR("NUA-6.4.2 UPDATE"),
 	 TAG_END());
   BYE(b, b_call, b_call->nh, TAG_END()); /* Queued until nua_authenticate */
@@ -1375,7 +1375,7 @@
   free_events_in_list(ctx, b->events);
 
   AUTHENTICATE(b, b_call, b_call->nh, TAG_END());
-  
+
   run_ab_until(ctx, -1, until_terminated, -1, until_terminated);
 
   free_events_in_list(ctx, a->events);
@@ -1472,7 +1472,7 @@
   TEST_1(e = c->events->head); TEST_E(e->data->e_event, nua_i_invite);
   free_events_in_list(ctx, c->events);
 
-  BYE(c, c_call, c_call->nh, 
+  BYE(c, c_call, c_call->nh,
       TAG_END());
   run_c_until(ctx, -1, save_until_final_response);
 
@@ -1482,9 +1482,9 @@
   free_events_in_list(ctx, a->events);
   free_events_in_list(ctx, c->events);
 
-  AUTHENTICATE(c, c_call, c_call->nh, 
+  AUTHENTICATE(c, c_call, c_call->nh,
 	       NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"), TAG_END());
-  
+
   run_abc_until(ctx, -1, until_terminated, -1, NULL, -1, until_terminated);
 
   free_events_in_list(ctx, a->events);
@@ -1556,12 +1556,12 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 180);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_proceeding); 
+  TEST(callstate(e->data->e_tags), nua_callstate_proceeding);
 
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_i_state);
-  TEST(callstate(e->data->e_tags), nua_callstate_ready); 
+  TEST(callstate(e->data->e_tags), nua_callstate_ready);
   TEST_1(!e->next);
 
   /*
@@ -1588,7 +1588,7 @@
   free_events_in_list(ctx, b->events);
 
   BYE(b, b_call, b_call->nh, TAG_END());
-  
+
   run_b_until(ctx, -1, until_terminated);
 
   /* B transitions:
@@ -1651,7 +1651,7 @@
 
 int test_early_bye(struct context *ctx)
 {
-  return 
+  return
     test_bye_with_407(ctx) ||
     test_bye_before_200(ctx) ||
     test_bye_before_ack(ctx) ||

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_extension.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_extension.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_extension.c	Tue Dec 16 13:05:22 2008
@@ -75,7 +75,7 @@
   sip_t const *sip;
 
 
-/* Test for EXTENSION 
+/* Test for EXTENSION
 
    A			B
    |------EXTENSION---->|

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_init.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_init.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_init.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@CFILE test_init.c
- * @brief Init nua test context 
+ * @brief Init nua test context
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  * @author Martti Mela <Martti Mela at nokia.com>
@@ -114,7 +114,7 @@
 			       TAG_END());
 
     if (ctx->p) {
-      ctx->a.domain = 
+      ctx->a.domain =
 	test_proxy_add_domain(ctx->p,
 			      URL_STRING_MAKE("sip:example.com")->us_url,
 			      AUTHTAG_METHOD("Digest"),
@@ -126,7 +126,7 @@
 			      AUTHTAG_NEXT_EXPIRES(60),
 			      TAG_END());
 
-      ctx->b.domain = 
+      ctx->b.domain =
 	test_proxy_add_domain(ctx->p,
 			      URL_STRING_MAKE("sip:example.org")->us_url,
 			      AUTHTAG_METHOD("Digest"),
@@ -140,7 +140,7 @@
 
       test_proxy_domain_set_outbound(ctx->b.domain, 1);
 
-      ctx->c.domain = 
+      ctx->c.domain =
 	test_proxy_add_domain(ctx->p,
 			      URL_STRING_MAKE("sip:example.net")->us_url,
 			      AUTHTAG_METHOD("Digest"),
@@ -379,7 +379,7 @@
 	            NUTAG_APPL_METHOD_REF(appl_method),
 	            SIPTAG_SUPPORTED_REF(supported),
 	            TAG_END());
-  
+
   TEST(err, 4); TEST_1(m);
   TEST_1(ctx->c.contact = sip_contact_dup(ctx->home, m));
   TEST_1(ctx->c.allow = sip_allow_dup(ctx->home, allow));

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nat.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nat.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nat.c	Tue Dec 16 13:05:22 2008
@@ -128,7 +128,7 @@
 
 static struct binding *nat_binding_new(struct nat *nat,
 				       char const *protoname,
-				       int socktype, int protocol, 
+				       int socktype, int protocol,
 				       int connected,
 				       su_socket_t in_socket,
 				       su_sockaddr_t *from,
@@ -178,7 +178,7 @@
   nat->root = root;
   nat->udp_socket = INVALID_SOCKET, nat->tcp_socket = INVALID_SOCKET;
 
-  tl_gets(nat->tags, 
+  tl_gets(nat->tags,
 	  TESTNATTAG_SYMMETRIC_REF(nat->symmetric),
 	  TESTNATTAG_LOGGING_REF(nat->logging),
 	  TAG_END());
@@ -427,7 +427,7 @@
   if (nat == NULL)
     return su_seterrno(EFAULT);
 
-  return su_task_execute(su_clone_task(nat->clone), 
+  return su_task_execute(su_clone_task(nat->clone),
 			 invalidate_bindings, nat, NULL);
 }
 
@@ -485,10 +485,10 @@
   su_wakeup_f in_to_out, out_to_in;
 
   if (b->socktype == SOCK_STREAM)
-    in_to_out = tcp_in_to_out, out_to_in = tcp_out_to_in;    
+    in_to_out = tcp_in_to_out, out_to_in = tcp_out_to_in;
   else
-    in_to_out = udp_in_to_out, out_to_in = udp_out_to_in;    
-  
+    in_to_out = udp_in_to_out, out_to_in = udp_out_to_in;
+
   if (b->in_socket == INVALID_SOCKET) {
     int in_socket;
 
@@ -549,7 +549,7 @@
   b->in_register = su_root_register(nat->root, wait, in_to_out, b, 0);
   if (b->in_register < 0) {
     su_perror("nat_binding_new: su_root_register");
-    su_wait_destroy(wait); 
+    su_wait_destroy(wait);
     return -1;
   }
 
@@ -610,13 +610,13 @@
 
 #if 0
 static struct binding *nat_binding_find(struct nat *nat,
-					su_sockaddr_t *from, 
+					su_sockaddr_t *from,
 					int fromlen)
 {
   char name[64], ipname[64];
   size_t namelen;
   struct binding *b;
-				       
+
   su_inet_ntop(from->su_family, SU_ADDR(from), ipname, sizeof ipname);
   snprintf(name, sizeof name,
 	   from->su_family == AF_INET6 ? "[%s]:%u" : "%s:%u",
@@ -629,7 +629,7 @@
   }
 
   if (b == NULL)
-    b = nat_binding_new(nat, "UDP", SOCK_DGRAM, IPPROTO_UDP, nat->symmetric, 
+    b = nat_binding_new(nat, "UDP", SOCK_DGRAM, IPPROTO_UDP, nat->symmetric,
 			INVALID_SOCKET, from, fromlen);
 
   return b;
@@ -659,7 +659,7 @@
     return 0;
   }
 
-  b = nat_binding_new(nat, "UDP", SOCK_DGRAM, IPPROTO_UDP, nat->symmetric, 
+  b = nat_binding_new(nat, "UDP", SOCK_DGRAM, IPPROTO_UDP, nat->symmetric,
 		      INVALID_SOCKET, from, fromlen);
   if (b == NULL)
     return 0;
@@ -667,7 +667,7 @@
   if (nat->symmetric)
     m = su_send(b->out_socket, nat->buffer, n, 0);
   else
-    m = su_sendto(b->out_socket, nat->buffer, n, 0, 
+    m = su_sendto(b->out_socket, nat->buffer, n, 0,
 		  nat->out_address, nat->out_addrlen);
 
   if (nat->logging)
@@ -989,7 +989,7 @@
 
   a->nat = nat;
   a->f = filter;
-  
+
   if (su_task_execute(su_clone_task(nat->clone),
 		      execute_nat_filter_remove, a, NULL) < 0)
     return -1;

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nat.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nat.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nat.h	Tue Dec 16 13:05:22 2008
@@ -33,7 +33,7 @@
 struct nat;
 struct nat_filter;
 
-struct nat *test_nat_create(su_root_t *, int family, 
+struct nat *test_nat_create(su_root_t *, int family,
 			    tag_type_t, tag_value_t, ...);
 
 void test_nat_destroy(struct nat *);

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nua.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nua.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nua.c	Tue Dec 16 13:05:22 2008
@@ -74,7 +74,7 @@
 static char const options_usage[] =
   "   -v | --verbose    be verbose\n"
   "   -q | --quiet      be quiet\n"
-  "   -a | --abort      abort on error\n" 
+  "   -a | --abort      abort on error\n"
   "   -s                use only single thread\n"
   "   -l level          set logging level (0 by default)\n"
   "   -e | --events     print nua events\n"
@@ -122,7 +122,7 @@
 #if HAVE_OPEN_C
   dup2(1, 2);
 #endif
-  
+
   if (getenv("EXPENSIVE_CHECKS"))
     o_expensive = 1;
 
@@ -331,7 +331,7 @@
   ctx->a.printer = o_events_init ? print_event : NULL;
 
   retval |= test_nua_api_errors(ctx); SINGLE_FAILURE_CHECK();
-  
+
   retval |= test_tag_filter(); SINGLE_FAILURE_CHECK();
 
   retval |= test_nua_params(ctx); SINGLE_FAILURE_CHECK();

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nua.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nua.h	Tue Dec 16 13:05:22 2008
@@ -111,7 +111,7 @@
   struct event *head, **tail;
 };
 
-struct event 
+struct event
 {
   struct event *next, **prev;
   struct call *call;
@@ -267,7 +267,7 @@
 int run_b_until(struct context *, nua_event_t, condition_function *);
 int run_c_until(struct context *, nua_event_t, condition_function *);
 
-typedef int operation_f(struct endpoint *ep, struct call *call, 
+typedef int operation_f(struct endpoint *ep, struct call *call,
 			nua_handle_t *nh, tag_type_t tag, tag_value_t value,
 			...);
 

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nua_api.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nua_api.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nua_api.c	Tue Dec 16 13:05:22 2008
@@ -160,7 +160,7 @@
 int test_nua_destroy(struct context *ctx)
 {
   BEGIN();
-  
+
   struct endpoint *a = &ctx->a;
 
   TEST_1(ctx->root = su_root_create(NULL));
@@ -307,7 +307,7 @@
 
   if (print_headings)
     printf("TEST NUA-1.2.4: PASSED\n");
-  
+
   END();
 }
 
@@ -384,7 +384,7 @@
    A
    |------REGISTER--\
    |<-------503-----/
-   |			
+   |
 
 */
 
@@ -393,7 +393,7 @@
 
   TEST_1(a_reg->nh = nua_handle(a->nua, a_reg, TAG_END()));
 
-  REGISTER(a, a_reg, a_reg->nh, 
+  REGISTER(a, a_reg, a_reg->nh,
 	   NUTAG_REGISTRAR(URL_STRING_MAKE("sip:bad.domain")),
 	   SIPTAG_TO_STR("sip:lissu at bad.domain"),
 	   TAG_END());
@@ -407,7 +407,7 @@
 
   TEST_1(a_reg->nh = nua_handle(a->nua, a_reg, TAG_END()));
 
-  REGISTER(a, a_reg, a_reg->nh, 
+  REGISTER(a, a_reg, a_reg->nh,
 	   NUTAG_REGISTRAR(URL_STRING_MAKE("sip:bad.domain")),
 	   SIPTAG_TO_STR("sip:lissu at bad.domain"),
 	   TAG_END());
@@ -447,13 +447,13 @@
   nua_shutdown(a->nua);
 
   run_a_until(ctx, -1, until_final_response);
-  
+
   TEST_VOID(nua_destroy(a->nua));
 
   a->nua = NULL;
 
   su_root_destroy(ctx->root), ctx->root = NULL;
-	 
+
   if (print_headings)
     printf("TEST NUA-1.2: PASSED\n");
 

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_nua_params.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_nua_params.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_nua_params.c	Tue Dec 16 13:05:22 2008
@@ -155,7 +155,7 @@
 		 SIPTAG_USER_AGENT_STR("test_nua/1.0"),
 
 		 SIPTAG_ORGANIZATION_STR("Open Laboratory"),
-		 
+
 		 NUTAG_M_DISPLAY("XXX"),
 		 NUTAG_M_USERNAME("xxx"),
 		 NUTAG_M_PARAMS("user=ip"),
@@ -310,7 +310,7 @@
     char const *m_params = "NONE";
     char const *m_features = "NONE";
     char const *instance = "NONE";
-    
+
     url_string_t const *registrar = NONE;
     unsigned keepalive = (unsigned)-1, keepalive_stream = (unsigned)-1;
 
@@ -424,10 +424,10 @@
     TEST_S(sip_header_as_string(tmphome, (void *)allow), "OPTIONS, INFO, ACK");
     TEST_S(allow_str, "OPTIONS, INFO, ACK");
     TEST_S(appl_method, "INVITE, REGISTER, PUBLISH, SUBSCRIBE, NOTIFY");
-    TEST_S(sip_header_as_string(tmphome, (void *)allow_events), 
+    TEST_S(sip_header_as_string(tmphome, (void *)allow_events),
 	   "reg, presence, presence.winfo");
     TEST_S(allow_events_str, "reg, presence, presence.winfo");
-    TEST_S(sip_header_as_string(tmphome, (void *)supported), 
+    TEST_S(sip_header_as_string(tmphome, (void *)supported),
 	   "foo, bar, baz");
     TEST_S(supported_str, "foo, bar, baz");
     TEST_S(sip_header_as_string(tmphome, (void *)user_agent), "test_nua");

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_offer_answer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_offer_answer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_offer_answer.c	Tue Dec 16 13:05:22 2008
@@ -66,7 +66,7 @@
           <--nua_i_state---|                    |
 
    Client transitions:
-   INIT -(C1)-> CALLING -(C2a)-> PROCEEDING -(C3+C4)-> 
+   INIT -(C1)-> CALLING -(C2a)-> PROCEEDING -(C3+C4)->
    TERMINATING -> TERMINATED
    Server transitions:
    INIT -(S1)-> RECEIVED -(S2a)-> EARLY -(S3b)-> COMPLETED -(S4)-> READY
@@ -113,8 +113,8 @@
 
   /* Client transitions:
      INIT -(C1)-> CALLING: nua_invite(), nua_i_state
-     CALLING -(C3)-> PROCEEDING: nua_r_invite, nua_i_state 
-     PROCEEDING -(C3a+C5)-> TERMINATING: nua_r_invite, nua_i_state 
+     CALLING -(C3)-> PROCEEDING: nua_r_invite, nua_i_state
+     PROCEEDING -(C3a+C5)-> TERMINATING: nua_r_invite, nua_i_state
      TERMINATING -(C12)-> TERMINATED: nua_r_bye, nua_i_state
   */
   TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_state);
@@ -198,7 +198,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    NUTAG_MEDIA_ENABLE(0),
 	    TAG_END());
     return 0;
@@ -238,7 +238,7 @@
     "t=0 0\r\n"
     "m=audio 5008 RTP/AVP 8\r\n";
 
-  b_call->sdp = 
+  b_call->sdp =
     "v=0\r\n"
     "o=- 2 1 IN IP4 127.0.0.1\r\n"
     "s=-\r\n"
@@ -246,7 +246,7 @@
     "t=0 0\r\n"
     "m=audio 5010 RTP/AVP 0 8\r\n";
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sip:b at x.org>"),
 				 TAG_END()));
 
@@ -279,7 +279,7 @@
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_invite);
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip->sip_content_type); 
+  TEST_1(sip->sip_content_type);
   TEST_S(sip->sip_content_type->c_type, "application/sdp");
   TEST_1(sip->sip_payload);	/* there is sdp in 200 OK */
   TEST_1(sip->sip_contact);
@@ -344,7 +344,7 @@
 
   switch (callstate(tags)) {
   case nua_callstate_received:
-    RESPOND(ep, call, nh, SIP_180_RINGING, 
+    RESPOND(ep, call, nh, SIP_180_RINGING,
 	    TAG_END());
     return 0;
   case nua_callstate_early:
@@ -387,7 +387,7 @@
   nua_set_params(b->nua, NUTAG_MEDIA_ENABLE(0), TAG_END());
   run_b_until(ctx, nua_r_set_params, until_final_response);
 
-  TEST_1(a_call->nh = nua_handle(a->nua, a_call, 
+  TEST_1(a_call->nh = nua_handle(a->nua, a_call,
 				 SIPTAG_TO_STR("<sip:b at x.org>"),
 				 TAG_END()));
 
@@ -456,7 +456,7 @@
   nua_handle_destroy(b_call->nh), b_call->nh = NULL;
 
   nua_set_params(b->nua,
-		 NUTAG_MEDIA_ENABLE(1), 
+		 NUTAG_MEDIA_ENABLE(1),
 		 SOATAG_USER_SDP_STR("m=audio 5006 RTP/AVP 8 0"),
 		 TAG_END());
   run_b_until(ctx, nua_r_set_params, until_final_response);

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_ops.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_ops.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_ops.c	Tue Dec 16 13:05:22 2008
@@ -48,7 +48,7 @@
 }
 
 int until_final_response(CONDITION_PARAMS)
-{ 
+{
   return status >= 200;
 }
 
@@ -115,7 +115,7 @@
 {
   tagi_t const *ti;
 
-  return 
+  return
     ((ti = tl_find(tags, nutag_answer_recv)) && ti->t_value) ||
     ((ti = tl_find(tags, nutag_offer_sent)) && ti->t_value) ||
     ((ti = tl_find(tags, nutag_offer_recv)) && ti->t_value) ||
@@ -182,7 +182,7 @@
 	    ep->name, (void *)nh, nua_event_name(event), phrase,
 	    nua_substate_name(t ? t->t_value : 0));
   }
-  else if ((int)event >= nua_i_bye || 
+  else if ((int)event >= nua_i_bye ||
 	   event == nua_i_invite || event == nua_i_cancel ||
 	   event == nua_i_ack) {
     fprintf(stderr, "%s %s.nua(%p): event %s %03d %s\n", timestamp,
@@ -208,7 +208,7 @@
 	      ep->name, (void *)nh, operation);
   }
 
-  if (tags && 
+  if (tags &&
       ((tstflags & tst_verbatim) || ctx->print_tags || ep->print_tags))
     tl_print(stderr, "", tags);
 }
@@ -516,7 +516,7 @@
     if (list->head == NULL)
       list->tail = &list->head;
   }
-}			      
+}
 
 struct event *event_by_type(struct event *e, nua_event_t etype)
 {

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_proxy.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_proxy.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_proxy.c	Tue Dec 16 13:05:22 2008
@@ -98,7 +98,7 @@
   tagi_t      *tags;
 
   su_root_t   *root;
- 
+
   nta_agent_t *agent;
   url_t const *uri;
   sip_route_t *lr;
@@ -119,7 +119,7 @@
     unsigned t1x64;
     sip_time_t session_expires, min_se;
   } prefs;
-}; 
+};
 
 struct domain {
   su_home_t home[1];
@@ -139,7 +139,7 @@
     int outbound_tcp;		/**< Use inbound TCP connection as outbound */
     char const *authorize;	/**< Authorization realm to use */
     int record_route;
-  } prefs;  
+  } prefs;
 
   tagi_t *tags;
 };
@@ -175,18 +175,18 @@
   tport_t *tport;		/**< Reference to tport */
 };
 
-static struct binding *binding_new(su_home_t *home, 
+static struct binding *binding_new(su_home_t *home,
 				   sip_contact_t *contact,
 				   tport_t *tport,
 				   sip_call_id_t const *call_id,
 				   uint32_t cseq,
-				   sip_time_t registered, 
+				   sip_time_t registered,
 				   sip_time_t expires);
 static void binding_destroy(su_home_t *home, struct binding *b);
 static int binding_is_active(struct binding const *b)
 {
   return
-    b->expires > sip_now() && 
+    b->expires > sip_now() &&
     (b->tport == NULL || tport_is_clear_to_send(b->tport));
 }
 
@@ -270,21 +270,21 @@
 static auth_challenger_t proxy_challenger[1];
 
 /* Proxy entry point */
-static int 
+static int
 test_proxy_init(su_root_t *root, struct proxy *proxy)
 {
   struct proxy_tr *t;
   struct client_tr *c;
 
-  auth_challenger_t _proxy_challenger[1] = 
-  {{ 
+  auth_challenger_t _proxy_challenger[1] =
+  {{
       SIP_407_PROXY_AUTH_REQUIRED,
       sip_proxy_authenticate_class,
       sip_proxy_authentication_info_class
     }};
 
-  auth_challenger_t _registrar_challenger[1] = 
-  {{ 
+  auth_challenger_t _registrar_challenger[1] =
+  {{
       SIP_401_UNAUTHORIZED,
       sip_www_authenticate_class,
       sip_authentication_info_class
@@ -323,14 +323,14 @@
 		       NTATAG_SIP_T1X64_REF(proxy->prefs.t1x64),
 		       TAG_END());
 
-  if (!proxy->defleg) 
+  if (!proxy->defleg)
     return -1;
   /* if (!proxy->example_net || !proxy->example_org || !proxy->example_com)
      return -1; */
 
   /* Create stateless client */
   t = su_zalloc(proxy->home, sizeof *t);
-  c = su_zalloc(proxy->home, sizeof *c); 
+  c = su_zalloc(proxy->home, sizeof *c);
 
   if (!t || !c)
     return -1;
@@ -350,7 +350,7 @@
 
   if (!proxy->lr)
     return -1;
-  				  
+
   return 0;
 }
 
@@ -391,7 +391,7 @@
     ta_start(ta, tag, value);
     p->tags = tl_llist(ta_tags(ta));
     ta_end(ta);
-    
+
     if (su_clone_start(root,
 		       p->clone,
 		       p,
@@ -435,7 +435,7 @@
   struct proxy *p;
   int logging;
 };
- 
+
 static int _set_logging(void *_a)
 {
   struct _set_logging *a = _a;
@@ -451,8 +451,8 @@
 }
 
 void test_proxy_domain_set_expiration(struct domain *d,
-				      sip_time_t min_expires, 
-				      sip_time_t expires, 
+				      sip_time_t min_expires,
+				      sip_time_t expires,
 				      sip_time_t max_expires)
 {
   if (d) {
@@ -475,7 +475,7 @@
 }
 
 void test_proxy_set_session_timer(struct proxy *p,
-				  sip_time_t session_expires, 
+				  sip_time_t session_expires,
 				  sip_time_t min_se)
 {
   if (p) {
@@ -529,7 +529,7 @@
   }
 }
 
-int test_proxy_domain_set_authorize(struct domain *d, 
+int test_proxy_domain_set_authorize(struct domain *d,
 				     char const *realm)
 {
   if (d) {
@@ -604,14 +604,14 @@
     d->prefs.outbound_tcp = 0;
     d->prefs.authorize = NULL;
 
-    if (d->uri && d->tags && 
+    if (d->uri && d->tags &&
 	!su_task_execute(su_clone_task(p->clone), _domain_init, d, &init)) {
       if (init == 0)
 	/* OK */;
       else
 	d = NULL;
     }
-    else 
+    else
       su_home_unref(d->home);
   }
 
@@ -687,7 +687,7 @@
   for (v = nta_agent_via(p->agent); v; v = v->v_next) {
     char const *proto = v->v_protocol;
 
-    if (v->v_next && 
+    if (v->v_next &&
 	strcasecmp(v->v_host, v->v_next->v_host) == 0 &&
 	str0cmp(v->v_port, v->v_next->v_port) == 0 &&
 	((proto == sip_transport_udp &&
@@ -753,14 +753,14 @@
 {
   int (*process)(struct proxy_tr *) = NULL;
   sip_method_t method = sip->sip_request->rq_method;
-  
+
   assert(pod->domain->magic = domain_init);
 
   if (leg == pod->domain->uleg)
     process = proxy_transaction;
   else if (method == sip_method_register)
     process = process_register;
-  else if (method == sip_method_options) 
+  else if (method == sip_method_options)
     process = process_options;
 
   if (process == NULL)
@@ -839,15 +839,15 @@
 
   if (t->as)
     info = t->as->as_info, response = t->as->as_response;
-  
-  if (nta_incoming_treply(t->server, t->status = status, phrase, 
+
+  if (nta_incoming_treply(t->server, t->status = status, phrase,
 			  SIPTAG_HEADER(info),
 			  SIPTAG_HEADER(response),
 			  ta_tags(ta)) < 0)
     t->status = status = 500;
 
   ta_end(ta);
-  
+
   return status;
 }
 
@@ -892,8 +892,8 @@
   }
 
   /* Remove our routes */
-  while (t->sip->sip_route && 
-	 url_has_param(t->sip->sip_route->r_url, "lr") && 
+  while (t->sip->sip_route &&
+	 url_has_param(t->sip->sip_route->r_url, "lr") &&
 	 (url_cmp(t->proxy->lr->r_url, t->sip->sip_route->r_url) == 0 ||
 	  url_cmp(t->proxy->rr_uri, t->sip->sip_route->r_url) == 0)) {
     sip_route_remove(t->msg, t->sip);
@@ -902,7 +902,7 @@
 
   if (t->use_auth)
     return challenge_transaction(t);
-  
+
   return 0;
 }
 
@@ -915,7 +915,7 @@
 
   if (t->method == sip_method_invite) {
     if (t->proxy->prefs.min_se) {
-      if (!sip->sip_min_se || 
+      if (!sip->sip_min_se ||
 	  sip->sip_min_se->min_delta < t->proxy->prefs.min_se) {
 	min_se = sip_min_se_init(min_se0);
 	min_se->min_delta = t->proxy->prefs.min_se;
@@ -959,7 +959,7 @@
   struct binding *b;
 
 #if 0
-  if (sip->sip_request->rq_method == sip_method_register) 
+  if (sip->sip_request->rq_method == sip_method_register)
     return process_register(proxy, irq, sip);
 #endif
 
@@ -968,7 +968,7 @@
     return respond_transaction(t, SIP_404_NOT_FOUND, TAG_END());
 
   for (b = e->bindings; b; b = b->next) {
-    if (binding_is_active(b)) 
+    if (binding_is_active(b))
       target_transaction(t, b->contact->m_url, b->tport);
 
     if (t->clients)		/* XXX - enable forking */
@@ -1073,7 +1073,7 @@
     msg_header_remove(t->msg, (msg_pub_t *)sip, as->as_match);
 
   return 0;
-}		      
+}
 
 int proxy_ack_cancel(struct proxy_tr *t,
 		     nta_incoming_t *irq,
@@ -1083,7 +1083,7 @@
   int status;
 
   if (sip == NULL) {		/* timeout */
-    proxy_tr_destroy(t);	
+    proxy_tr_destroy(t);
     return 0;
   }
 
@@ -1096,7 +1096,7 @@
     if (c->client && c->status < 200)
       /*
        * We don't care about response to CANCEL (or ACK)
-       * so we give NULL as callback pointer (and nta immediately 
+       * so we give NULL as callback pointer (and nta immediately
        * destroys transaction object or marks it disposable)
        */
       if (nta_outgoing_tcancel(c->client, NULL, NULL, TAG_END()) == NULL)
@@ -1117,7 +1117,7 @@
   if (sip) {
     msg_t *response = nta_outgoing_getresponse(client);
     if (c->t->method == sip_method_invite)
-      final = sip->sip_status->st_status >= 300, 
+      final = sip->sip_status->st_status >= 300,
 	timeout = sip->sip_status->st_status >= 200;
     else
       final = sip->sip_status->st_status >= 200;
@@ -1150,7 +1150,7 @@
   assert(c->t);
 
   if (sip &&
-      sip->sip_status->st_status >= 200 && 
+      sip->sip_status->st_status >= 200 &&
       sip->sip_status->st_status < 300) {
     msg_t *response = nta_outgoing_getresponse(client);
     sip_via_remove(response, sip_object(response));
@@ -1168,7 +1168,7 @@
 }
 
 
-/** Proxy only late responses 
+/** Proxy only late responses
  *
  * Keeping the invite transactions live
  */
@@ -1219,7 +1219,7 @@
 
   if (t->as)
     su_home_unref(t->as->as_home), t->as = NULL;
-  
+
   while (t->clients) {
     client_tr_remove(c = t->clients);
     nta_outgoing_destroy(c->client), c->client = NULL;
@@ -1275,7 +1275,7 @@
 
   if (check_out_of_order(t))
     return t->status;
-  
+
   return update_bindings(t);
 }
 
@@ -1286,7 +1286,7 @@
   sip_via_t *v = sip->sip_via;
 
   if (m && v && v->v_received && m->m_url->url_host
-      && strcasecmp(v->v_received, m->m_url->url_host) 
+      && strcasecmp(v->v_received, m->m_url->url_host)
       && host_is_ip_address(m->m_url->url_host))
     return respond_transaction(t, 406, "Unacceptable Contact", TAG_END());
 
@@ -1309,7 +1309,7 @@
 
   for (; m; m = m->m_next) {
     expires = sip_contact_expires(m, ex, date, t->domain->prefs.expires, t->now);
-    
+
     if (expires > 0 && expires < t->domain->prefs.min_expires) {
       sip_min_expires_t me[1];
 
@@ -1375,8 +1375,8 @@
   if (d == NULL)
     return NULL;
 
-  e = su_zalloc(d->home, sizeof *e); 
-  if (!e) 
+  e = su_zalloc(d->home, sizeof *e);
+  if (!e)
     return NULL;
 
   e->domain = d;
@@ -1415,16 +1415,16 @@
 /* Bindings */
 
 static
-struct binding *binding_new(su_home_t *home, 
+struct binding *binding_new(su_home_t *home,
 			    sip_contact_t *contact,
 			    tport_t *tport,
 			    sip_call_id_t const *call_id,
 			    uint32_t cseq,
-			    sip_time_t registered, 
+			    sip_time_t registered,
 			    sip_time_t expires)
 {
   struct binding *b;
-  
+
   b = su_zalloc(home, sizeof *b);
 
   if (b) {
@@ -1444,7 +1444,7 @@
     if (b)
       msg_header_remove_param(b->contact->m_common, "expires");
   }
-  
+
   return b;
 }
 
@@ -1472,7 +1472,7 @@
   sip_date_t *date = t->sip->sip_date;
   sip_time_t expires;
   tport_t *tport = NULL;
-  sip_contact_t *contacts = NULL, **mm = &contacts; 
+  sip_contact_t *contacts = NULL, **mm = &contacts;
   void *tbf;
 
   if (t->sip->sip_contact == NULL) {
@@ -1486,7 +1486,7 @@
   if (t->entry == NULL)
     return respond_transaction(t, SIP_500_INTERNAL_SERVER_ERROR, TAG_END());
 
-  if (d->prefs.outbound_tcp && 
+  if (d->prefs.outbound_tcp &&
       str0casecmp(t->sip->sip_via->v_protocol, sip_transport_tcp) == 0)
     tport = nta_incoming_transport(t->proxy->agent, t->server, NULL);
 
@@ -1494,7 +1494,7 @@
   for (m = t->sip->sip_contact; m; m = m->m_next) {
     if (m->m_url->url_type == url_any)
       break;
-    
+
     expires = sip_contact_expires(m, ex, date, d->prefs.expires, t->now);
 
     if (expires > d->prefs.max_expires)
@@ -1519,7 +1519,7 @@
       next = old->next;
 
       for (b = bindings; b != last; b = b->next) {
-	if (url_cmp_all(old->contact->m_url, b->contact->m_url) != 0) 
+	if (url_cmp_all(old->contact->m_url, b->contact->m_url) != 0)
 	  continue;
 
 	if (strcmp(old->call_id->i_id, b->call_id->i_id) == 0) {
@@ -1561,7 +1561,7 @@
 
     *mm = sip_contact_copy(d->home, b->contact);
     if (*mm) {
-      expires = su_sprintf(d->home, "expires=%u", 
+      expires = su_sprintf(d->home, "expires=%u",
 			   (unsigned)(b->expires - t->now));
       msg_header_add_param(d->home, (*mm)->m_common, expires);
       mm = &(*mm)->m_next;
@@ -1586,7 +1586,7 @@
   struct domain *d;
   struct registration_entry *e;
   struct binding *b;
-  
+
   /* Close all outbound transports */
   for (d = p->domains; d; d = d->next) {
     for (e = d->entries; e; e = e->next) {
@@ -1599,6 +1599,6 @@
       }
     }
   }
-  
+
   return 0;
 }

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_proxy.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_proxy.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_proxy.h	Tue Dec 16 13:05:22 2008
@@ -49,17 +49,17 @@
 void test_proxy_set_logging(struct proxy *, int logging);
 
 void test_proxy_domain_set_expiration(struct domain *,
-				      sip_time_t min_expires, 
-				      sip_time_t expires, 
+				      sip_time_t min_expires,
+				      sip_time_t expires,
 				      sip_time_t max_expires);
 
 void test_proxy_domain_get_expiration(struct domain *,
-				      sip_time_t *return_min_expires, 
-				      sip_time_t *return_expires, 
+				      sip_time_t *return_min_expires,
+				      sip_time_t *return_expires,
 				      sip_time_t *return_max_expires);
 
 void test_proxy_set_session_timer(struct proxy *p,
-				  sip_time_t session_expires, 
+				  sip_time_t session_expires,
 				  sip_time_t min_se);
 
 void test_proxy_get_session_timer(struct proxy *p,

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_refer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_refer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_refer.c	Tue Dec 16 13:05:22 2008
@@ -239,7 +239,7 @@
     printf("TEST %s.2: B refers A to C\n", tests);
 
   if (b_refer != b_call)
-    TEST_1(b_refer->nh = 
+    TEST_1(b_refer->nh =
 	   nua_handle(b->nua, b_refer, SIPTAG_TO(a->to), TAG_END()));
 
   *sip_refer_to_init(r0)->r_url = *c->contact->m_url;
@@ -356,7 +356,7 @@
     Events in A:
     nua_i_subscribe, nua_r_notify
   */
-  TEST_1(e = a->events->head); 
+  TEST_1(e = a->events->head);
   if (e->data->e_event == nua_r_notify)
     TEST_1(e = e->next);
   TEST_E(e->data->e_event, nua_i_subscribe);
@@ -371,7 +371,7 @@
      Events in B after nua_subscribe():
      nua_r_subscribe, nua_i_notify
   */
-  TEST_1(e = b->events->head); 
+  TEST_1(e = b->events->head);
   if (e->data->e_event == nua_i_notify) {
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
@@ -575,7 +575,7 @@
   TEST(callstate(e->data->e_tags), nua_callstate_terminated); /* TERMINATED */
   TEST_1(!e->next);
   free_events_in_list(ctx, a->events);
-  
+
   /* Transitions of B:
      READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state
   */
@@ -685,7 +685,7 @@
 
     assert(nua_handle_has_events(r_call->nh));
 
-    pl = sip_payload_format(NULL, "SIP/2.0 %u %s\r\n", 
+    pl = sip_payload_format(NULL, "SIP/2.0 %u %s\r\n",
 			    st->st_status, st->st_phrase);
 
     NOTIFY(ep, r_call, r_call->nh,
@@ -761,7 +761,7 @@
   TEST_1(sip->sip_refer_to);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_notify);
   TEST(e->data->e_status, 200);
-  TEST_1(!e->next); 
+  TEST_1(!e->next);
   /*
      Events in C after nua_refer():
      nua_r_refer
@@ -780,7 +780,7 @@
   TEST(e->data->e_status, 480);
 
   TEST_1(!e->next);
-  
+
   free_events_in_list(ctx, a->events);
   free_events_in_list(ctx, c->events);
 

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_register.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_register.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_register.c	Tue Dec 16 13:05:22 2008
@@ -75,10 +75,10 @@
     printf("TEST NUA-2.3.0.1: un-REGISTER a\n");
 
   TEST_1(a_reg->nh = nua_handle(a->nua, a_reg, TAG_END()));
-  UNREGISTER(a, a_reg, a_reg->nh, SIPTAG_TO(a->to), 
+  UNREGISTER(a, a_reg, a_reg->nh, SIPTAG_TO(a->to),
 	     SIPTAG_CONTACT_STR("*"),
 	     TAG_END());
-  run_a_until(ctx, -1, until_final_response);  
+  run_a_until(ctx, -1, until_final_response);
   AUTHENTICATE(a, a_reg, a_reg->nh,
 	       NUTAG_AUTH("Digest:\"test-proxy\":alice:secret"), TAG_END());
   run_a_until(ctx, -1, until_final_response);
@@ -91,10 +91,10 @@
     printf("TEST NUA-2.3.0.2: un-REGISTER b\n");
 
   TEST_1(b_reg->nh = nua_handle(b->nua, b_reg, TAG_END()));
-  UNREGISTER(b, b_reg, b_reg->nh, SIPTAG_TO(b->to), 
+  UNREGISTER(b, b_reg, b_reg->nh, SIPTAG_TO(b->to),
 	     SIPTAG_CONTACT_STR("*"),
 	     TAG_END());
-  run_b_until(ctx, -1, until_final_response);  
+  run_b_until(ctx, -1, until_final_response);
   AUTHENTICATE(b, b_reg, b_reg->nh,
 	       NUTAG_AUTH("Digest:\"test-proxy\":bob:secret"), TAG_END());
   run_b_until(ctx, -1, until_final_response);
@@ -111,7 +111,7 @@
 	     SIPTAG_FROM(c->to), SIPTAG_TO(c->to),
 	     SIPTAG_CONTACT_STR("*"),
 	     TAG_END());
-  run_c_until(ctx, -1, until_final_response);  
+  run_c_until(ctx, -1, until_final_response);
   AUTHENTICATE(c, c_reg, c_reg->nh,
 	       NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"), TAG_END());
   run_c_until(ctx, -1, until_final_response);
@@ -227,7 +227,7 @@
   }
 
   run_a_until(ctx, -1, a->next_condition);
-  
+
   for (e = a->events->head; e; e = e->next) {
     TEST_E(e->data->e_event, nua_r_register);
     TEST(e->data->e_status, 200);
@@ -375,7 +375,7 @@
     if (ctx->p)
       m->m_url->url_params = "transport=tcp";
 
-    REGISTER(b, b_reg, b_reg->nh, SIPTAG_TO(b->to), 
+    REGISTER(b, b_reg, b_reg->nh, SIPTAG_TO(b->to),
 	     SIPTAG_CONTACT(m),
 	     /* Do not include credentials unless challenged */
 	     NUTAG_AUTH_CACHE(nua_auth_cache_challenged),
@@ -440,7 +440,7 @@
 	   NUTAG_CALLEE_CAPS(1),
 	   SIPTAG_EXPIRES_STR("5"), /* Test 423 negotiation */
 	   TAG_END());
-  run_abc_until(ctx, -1, save_events, -1, save_events, 
+  run_abc_until(ctx, -1, save_events, -1, save_events,
 		-1, save_until_final_response);
 
   TEST_1(e = c->events->head);
@@ -454,7 +454,7 @@
 
   AUTHENTICATE(c, c_reg, c_reg->nh,
 	       NUTAG_AUTH("Digest:\"test-proxy-0\":charlie:secret"), TAG_END());
-  run_abc_until(ctx, -1, save_events, -1, save_events, 
+  run_abc_until(ctx, -1, save_events, -1, save_events,
 		-1, save_until_final_response);
 
   TEST_1(e = c->events->head);
@@ -527,7 +527,7 @@
   }
 
   run_ab_until(ctx, -1, a->next_condition, -1, b->next_condition);
-  
+
   for (e = a->events->head; e; e = e->next) {
     TEST_E(e->data->e_event, nua_r_register);
     TEST(e->data->e_status, 200);
@@ -628,7 +628,7 @@
 
   TEST_1(b_call->nh = nua_handle(b->nua, b_call, TAG_END()));
 
-  REGISTER(b, b_call, b_call->nh, 
+  REGISTER(b, b_call, b_call->nh,
 	   NUTAG_REGISTRAR((url_string_t *)c->contact->m_url),
 	   SIPTAG_TO(b->to),
 	   NUTAG_OUTBOUND(NULL),
@@ -778,7 +778,7 @@
 
     free_events_in_list(ctx, c->events);
 
-    /* Sneakily change the realm */  
+    /* Sneakily change the realm */
 
     TEST(test_proxy_domain_set_authorize(ctx->c.domain, "test-proxy"), 0);
 
@@ -871,7 +871,7 @@
 
   if (print_headings)
     printf("TEST NUA-2.5.1: PASSED\n");
-  
+
   if (print_headings)
     printf("TEST NUA-2.5.2: OPTIONS from B to A\n");
 

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_session_timer.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_session_timer.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_session_timer.c	Tue Dec 16 13:05:22 2008
@@ -82,7 +82,7 @@
 
   /* We negotiate session timer of 6 second */
   /* Disable session timer from proxy */
-  test_proxy_set_session_timer(ctx->p, 0, 0); 
+  test_proxy_set_session_timer(ctx->p, 0, 0);
 
   nua_set_params(ctx->b.nua,
 		 NUTAG_SESSION_REFRESHER(nua_any_refresher),
@@ -199,7 +199,7 @@
       TEST_1(f);
 
       run_ab_until(ctx, -1, until_terminated, -1, until_terminated);
-      
+
       TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_r_bye);
 
       free_events_in_list(ctx, a->events);

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_simple.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_simple.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_simple.c	Tue Dec 16 13:05:22 2008
@@ -148,7 +148,7 @@
   TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_r_message);
   TEST(e->data->e_status, 202);
   TEST_1(sip = sip_object(e->data->e_msg));
-  TEST_1(sip_user_agent(sip)); 
+  TEST_1(sip_user_agent(sip));
   TEST_S(sip_user_agent(sip)->g_value, "007");
   TEST_1(!e->next);
 
@@ -229,7 +229,7 @@
 int accept_request(CONDITION_PARAMS)
 {
   msg_t *with = nua_current_request(nua);
-  
+
   if (!(check_handle(ep, call, nh, SIP_500_INTERNAL_SERVER_ERROR)))
     return 0;
 
@@ -265,7 +265,7 @@
       RESPOND(ep, call, nh, SIP_412_PRECONDITION_FAILED,
 	      NUTAG_WITH(with),
 	      TAG_END());
-    } 
+    }
     else {
       RESPOND(ep, call, nh, SIP_200_OK,
 	      NUTAG_WITH(with),
@@ -433,7 +433,7 @@
   if (!ctx->expensive && 0)
     goto skip_republish;
 
-  run_ab_until(ctx, -1, save_until_final_response, -1, respond_with_etag); 
+  run_ab_until(ctx, -1, save_until_final_response, -1, respond_with_etag);
 
   /* Client events: nua_r_publish
   */
@@ -445,7 +445,7 @@
   TEST_1(!e->next);
 
   free_events_in_list(ctx, a->events);
- 
+
   /*
    Server events:
    nua_i_publish
@@ -492,7 +492,7 @@
 
   TEST_1(a_call->nh = nua_handle(a->nua, a_call, SIPTAG_TO(b->to), TAG_END()));
 
-  /* Let server close handle without responding to PUBLISH */ 
+  /* Let server close handle without responding to PUBLISH */
   PUBLISH(a, a_call, a_call->nh,
 	  TAG_IF(!ctx->proxy_tests, NUTAG_URL(b->contact->m_url)),
 	  SIPTAG_EVENT_STR("presence"),
@@ -579,7 +579,7 @@
   switch (event) {
   case nua_i_subscribe:
     if (status < 200) {
-      NOTIFY(ep, call, nh, 
+      NOTIFY(ep, call, nh,
 	     SIPTAG_EVENT(sip->sip_event),
 	     SIPTAG_CONTENT_TYPE_STR("application/pidf+xml"),
 	     SIPTAG_PAYLOAD_STR(presence_closed),
@@ -647,7 +647,7 @@
 	      SIPTAG_EXPIRES(sip->sip_expires),
 	      TAG_END());
 
-      NOTIFY(ep, call, nh, 
+      NOTIFY(ep, call, nh,
 	     SIPTAG_EVENT(sip->sip_event),
 	     SIPTAG_CONTENT_TYPE_STR("application/pidf+xml"),
 	     SIPTAG_PAYLOAD_STR(presence_closed),
@@ -673,7 +673,7 @@
 
   switch (event) {
   case nua_i_subscribe:
-    NOTIFY(ep, call, nh, 
+    NOTIFY(ep, call, nh,
 	   SIPTAG_EVENT(sip->sip_event),
 	   SIPTAG_CONTENT_TYPE_STR("application/pidf+xml"),
 	   SIPTAG_PAYLOAD_STR(presence_closed),
@@ -970,7 +970,7 @@
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
   TEST_1(tl_find(e->data->e_tags, nutag_substate));
-  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, 
+  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
        nua_substate_terminated);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_notify);
   TEST_1(e->data->e_status >= 200);
@@ -1089,7 +1089,7 @@
 
   SUBSCRIBE(a, a_call, a_call->nh, TAG_END());
 
-  run_ab_until(ctx, -1, save_until_notified_and_responded_twice, 
+  run_ab_until(ctx, -1, save_until_notified_and_responded_twice,
 	       -1, accept_subscription_until_terminated);
 
 #if 0
@@ -1128,7 +1128,7 @@
   TEST(e->data->e_status, 200);
   TEST_1(sip = sip_object(e->data->e_msg));
   TEST_1(tl_find(e->data->e_tags, nutag_substate));
-  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value, 
+  TEST(tl_find(e->data->e_tags, nutag_substate)->t_value,
        nua_substate_terminated);
   TEST_1(e = e->next); TEST_E(e->data->e_event, nua_r_notify);
   TEST_1(e->data->e_status >= 200);
@@ -1500,7 +1500,7 @@
   TEST_1(!e->next);
 
   free_events_in_list(ctx, a->events);
-  
+
   /* 2nd NOTIFY using same dialog */
   /* Check that server really discards the dialog */
 
@@ -1633,7 +1633,7 @@
   a->state.n = 4;
   b->state.n = 4;
 
-  run_ab_until(ctx, -1, save_until_nth_final_response, 
+  run_ab_until(ctx, -1, save_until_nth_final_response,
 	       -1, accept_n_notifys);
 
   /* Notifier events: nua_r_notify nua_r_notify */
@@ -1743,7 +1743,7 @@
   a->state.n = 3;
   b->state.n = 3;
 
-  run_ab_until(ctx, -1, save_until_nth_final_response, 
+  run_ab_until(ctx, -1, save_until_nth_final_response,
 	       -1, accept_n_notifys);
 
   /* Notifier events: nua_r_notify nua_r_notify */
@@ -1876,14 +1876,14 @@
   END();
 }
 
-/**Terminate when received notify. 
+/**Terminate when received notify.
  * Respond to NOTIFY with 200 OK if it has not been responded.
  * Save events (except nua_i_active or terminated).
  */
 int accept_notify(CONDITION_PARAMS)
 {
   if (event == nua_i_notify && status < 200)
-    RESPOND(ep, call, nh, SIP_200_OK, 
+    RESPOND(ep, call, nh, SIP_200_OK,
 	    NUTAG_WITH_THIS(ep->nua),
 	    TAG_END());
 
@@ -1898,7 +1898,7 @@
 
   if (nua_r_set_params <= event && event < nua_i_network_changed
       && status >= 200) {
-    if (ep->state.n > 0) 
+    if (ep->state.n > 0)
       ep->state.n--;
     return ep->state.n == 0;
   }
@@ -1911,7 +1911,7 @@
   tagi_t const *substate = tl_find(tags, nutag_substate);
 
   if (event == nua_i_notify && status < 200)
-    RESPOND(ep, call, nh, SIP_200_OK, 
+    RESPOND(ep, call, nh, SIP_200_OK,
 	    NUTAG_WITH_THIS(ep->nua),
 	    TAG_END());
 
@@ -1920,10 +1920,10 @@
   if (event != nua_i_notify)
     return 0;
 
-  if (ep->state.n > 0) 
+  if (ep->state.n > 0)
     ep->state.n--;
 
-  if (ep->state.n == 0) 
+  if (ep->state.n == 0)
     return 1;
 
   if (substate && substate->t_value == nua_substate_terminated) {
@@ -2068,7 +2068,7 @@
 	    NUTAG_WITH(with),
 	    SIPTAG_EXPIRES_STR("360"),
 	    TAG_END());
-    NOTIFY(ep, call, nh, 
+    NOTIFY(ep, call, nh,
 	   SIPTAG_EVENT(sip->sip_event),
 	   SIPTAG_CONTENT_TYPE_STR("application/pidf+xml"),
 	   SIPTAG_PAYLOAD_STR(presence_closed),

Modified: freeswitch/trunk/libs/sofia-sip/tests/test_sip_events.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/tests/test_sip_events.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/tests/test_sip_events.c	Tue Dec 16 13:05:22 2008
@@ -72,7 +72,7 @@
 		   NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"),
 		   TAG_END());
     }
-    else if (status >= 300) 
+    else if (status >= 300)
       return 1;
     else if (status >= 200)
       ep->flags.bit1 = 1;

Modified: freeswitch/trunk/libs/sofia-sip/utils/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -1,6 +1,6 @@
 2006-02-08  Kai Vehmanen  <kai.vehmanen at nokia.com>
 
-	* Makefile.am, nua_cli.c: nua_cli example add removed from the 
+	* Makefile.am, nua_cli.c: nua_cli example add removed from the
 	distribution package.
 
 2005-09-29  Pekka Pessi  <Pekka.Pessi at nokia.com>
@@ -14,8 +14,8 @@
     M ./utils/nua_cli.c +2
 
 2005-09-28  Pekka Pessi  <Pekka.Pessi at nokia.com>
-	
-	* Not using soa directly anymore. 
+
+	* Not using soa directly anymore.
 
 	    M ./utils/nua_cli.c -5 +3
 

Modified: freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in	Tue Dec 16 13:05:22 2008
@@ -1,5 +1,5 @@
 #
-# Template for Doxyfile. 
+# Template for Doxyfile.
 # @configure_input@
 #
 # Copyright (C) 2006 Nokia Corporation
@@ -27,13 +27,13 @@
 @INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.aliases
 @INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.rfc
 
-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 \
 			*_tag_dll.c *_tag_ref.c
 
-TAGFILES             = 
+TAGFILES             =
 
 OUTPUT_LANGUAGE      = English
 

Modified: freeswitch/trunk/libs/sofia-sip/utils/apps_utils.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/apps_utils.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/apps_utils.h	Tue Dec 16 13:05:22 2008
@@ -3,8 +3,8 @@
 
 /**
  * @nofile apps_utils.h
- * @brief 
- * 
+ * @brief
+ *
  * Copyright (C) 2005 Nokia Corporation.
  *
  * Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
@@ -25,7 +25,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA
  * @ENDLGPL@
- * 
+ *
  * @date Created: Thu Apr  8 15:55:15 2004 ppessi
  *
  */
@@ -38,20 +38,20 @@
 		       sip_t const *sip,
 		       nta_response_f response_function)
 {
-  if (sip && sip->sip_status->st_status == 407 && 
+  if (sip && sip->sip_status->st_status == 407 &&
       sip->sip_proxy_authenticate &&
-      c->c_proxy_auth_retries++ < 3 && 
+      c->c_proxy_auth_retries++ < 3 &&
       c->c_proxy && c->c_proxy->url_user && c->c_proxy->url_password) {
     url_t *u = c->c_proxy;
     msg_t *rmsg = nta_outgoing_getrequest(oreq);
     sip_t *rsip = sip_object(rmsg);
 
     if (auc_challenge(&c->c_proxy_auth, c->c_home, sip->sip_proxy_authenticate,
-		      sip_proxy_authorization_class) >= 0 
+		      sip_proxy_authorization_class) >= 0
 	&&
-	auc_all_credentials(&c->c_proxy_auth, NULL, NULL, 
+	auc_all_credentials(&c->c_proxy_auth, NULL, NULL,
 			    u->url_user, u->url_password) > 0
-	&& 
+	&&
 	auc_authorization(&c->c_proxy_auth, rmsg, (msg_pub_t *)rsip,
 			  rsip->sip_request->rq_method_name,
 			  rsip->sip_request->rq_url,
@@ -59,14 +59,14 @@
       nta_outgoing_destroy(c->c_orq);
       sip_header_remove(rmsg, rsip, (sip_header_t *)rsip->sip_via);
       nta_msg_request_complete(rmsg, c->c_leg, 0, NULL, NULL);
-      c->c_orq = nta_outgoing_tmcreate(c->c_agent, response_function, c, NULL, 
+      c->c_orq = nta_outgoing_tmcreate(c->c_agent, response_function, c, NULL,
 				       rmsg, TAG_END());
       return 1;
     }
   }
 
   return 0;
-}				   
+}
 
 static inline
 int server_authenticate(context_t *c,
@@ -74,18 +74,18 @@
 			sip_t const *sip,
 			nta_response_f response_function)
 {
-  if (sip && sip->sip_status->st_status == 401 && 
+  if (sip && sip->sip_status->st_status == 401 &&
       sip->sip_www_authenticate &&
-      c->c_auth_retries++ < 3 && 
+      c->c_auth_retries++ < 3 &&
       c->c_password && c->c_username) {
     msg_t *rmsg = nta_outgoing_getrequest(oreq);
     sip_t *rsip = sip_object(rmsg);
 
     if (auc_challenge(&c->c_auth, c->c_home, sip->sip_www_authenticate,
-		      sip_authorization_class) >= 0 
+		      sip_authorization_class) >= 0
 	&&
 	auc_all_credentials(&c->c_auth, NULL, NULL, c->c_username, c->c_password) > 0
-	&& 
+	&&
 	auc_authorization(&c->c_auth, rmsg, (msg_pub_t *)rsip,
 			  rsip->sip_request->rq_method_name,
 			  rsip->sip_request->rq_url,
@@ -93,14 +93,14 @@
       nta_outgoing_destroy(c->c_orq);
       sip_header_remove(rmsg, rsip, (sip_header_t *)rsip->sip_via);
       nta_msg_request_complete(rmsg, c->c_leg, 0, NULL, NULL);
-      c->c_orq = nta_outgoing_tmcreate(c->c_agent, response_function, c, NULL, 
+      c->c_orq = nta_outgoing_tmcreate(c->c_agent, response_function, c, NULL,
 				       rmsg, TAG_END());
       return 1;
     }
   }
 
   return 0;
-}				   
+}
 
 static inline
 int tag_from_header(nta_agent_t *nta,

Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-date.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-date.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-date.c	Tue Dec 16 13:05:22 2008
@@ -23,18 +23,18 @@
  */
 
 /**@page sip-date Print or parse SIP date
- * 
+ *
  * @section synopsis Synopsis
  *
  * <tt>sip-date [-n] [SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]</tt>
  *
  * @section description Description
- * 
+ *
  * @em sip-date is an utility for printing a SIP date (in the format
  * specified by RFC 1123, but the timezone must always be GMT) or parsing a
  * given SIP date. The date can be given as a SIP date or by giving year,
  * day, hour, minutes and seconds separately.
- * 
+ *
  * @section options Options
  *
  * The @em sip-date utility takes options as follows:
@@ -84,14 +84,14 @@
 
 void usage(void)
 {
-  fprintf(stderr, 
+  fprintf(stderr,
 	  "usage: sip-date [-n] "
           "[SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]\n");
   exit(1);
 }
 
 /* Epoch year. */
-#define EPOCH 1900		
+#define EPOCH 1900
 /* Day number of New Year Day of given year */
 #define YEAR_DAYS(y) \
   (((y)-1) * 365 + ((y)-1) / 4 - ((y)-1) / 100 + ((y)-1) / 400)
@@ -123,7 +123,7 @@
     buf[n] = '\0';
 
     s = buf;
-      
+
     if (s[0] < '0' || s[0] > '9') {
       if (msg_date_d(&s, &t) < 0) {
 	fprintf(stderr, "sip-date: %s is not valid time\n", s);
@@ -136,17 +136,17 @@
 
 	if (msg_delta_d(&s, &t2) < 0)
 	  usage();
-      
+
 	switch (*s) {
-	case 'y': t2 = YEAR_DAYS(t2) - YEAR_DAYS(EPOCH); 
+	case 'y': t2 = YEAR_DAYS(t2) - YEAR_DAYS(EPOCH);
 	  /*FALLTHROUGH*/
 	case 'd': t += t2 * 24 * 60 * 60; s++; break;
 	case 'h': t += t2 * 60 * 60; s++; break;
 	case 'm': t += t2 * 60; s++; break;
-	case 's': 
+	case 's':
 	  s++;
 	default:
-	  t += t2; 
+	  t += t2;
 	  break;
 	}
 

Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-dig.c	Tue Dec 16 13:05:22 2008
@@ -31,7 +31,7 @@
  */
 
 /**@page sip-dig Resolve SIP URIs.
- * 
+ *
  * @section sip_dig_synopsis Synopsis
  * <tt>sip-dig [OPTIONS] uri...</tt>
  *
@@ -45,7 +45,7 @@
  * otherwise indicated by NAPTR or SRV records, the sip-dig uses UDP and TCP
  * as transports for SIP and TLS for SIPS URIs.
  *
- * The results are printed intended, with a preference followed by weight, 
+ * The results are printed intended, with a preference followed by weight,
  * then protocol name, port number and IP address in numeric format.
  *
  * @section sip_dig_options Command Line Options
@@ -73,7 +73,7 @@
  * <dd>Use TLS over SCTP transport protocol.
  * </dd>
  * <dt>--no-sctp</dt>
- * <dd>Ignore SCTP or TLS-SCTP records in the list of default transports. 
+ * <dd>Ignore SCTP or TLS-SCTP records in the list of default transports.
  * This option has no effect if transport protocols has been explicitly
  * listed.
  * </dd>
@@ -117,7 +117,7 @@
  *
  * @section sip_dig_environment Environment
  * #SRESOLV_DEBUG, SRESOLV_CONF
- * 
+ *
  * @section sip_dig_bugs Reporting Bugs
  * Report bugs to <sofia-sip-devel at lists.sourceforge.net>.
  *
@@ -171,11 +171,11 @@
 	    double weight);
 
 int dig_srv_at(struct dig *dig,
-	       char const *tport, sres_record_t **answers, 
+	       char const *tport, sres_record_t **answers,
 	       double weight, int pweight,
 	       int priority);
 
-int dig_addr(struct dig *dig, 
+int dig_addr(struct dig *dig,
 	     char const *tport, char const *host, char const *port,
 	     double weight);
 
@@ -192,7 +192,7 @@
 int prepare_transport(struct dig *dig, char const *tport);
 
 int count_transports(struct dig *dig,
-		     char const *tp1, 
+		     char const *tp1,
 		     char const *tp2);
 
 void usage(int exitcode)
@@ -216,7 +216,7 @@
 
   struct dig dig[1] = {{ NULL }};
 
-  if (su_init() != 0) 
+  if (su_init() != 0)
     return -1;
 
   while (argv[1] && argv[1][0] == '-') {
@@ -444,7 +444,7 @@
 		 char const *tport,
 		 char const *tport2)
 {
-  
+
   int i, tcount = 0;
   struct transport const *tports = dig->tports;
 
@@ -545,7 +545,7 @@
     else if (strcasecmp(na->na_flags, "a") == 0) {
       scount = dig_addr(dig, tp->name, na->na_replace, NULL, weight / nacount);
     }
-    else 
+    else
       scount = 0;
 
     count += scount;
@@ -604,7 +604,7 @@
 	continue;
       if (srv->srv_record->r_status != 0)
 	continue;
-      
+
       if (srv->srv_priority != priority && pweight != 0) {
 	scount = dig_srv_at(dig, tport, answers, weight / n, pweight,
 			    priority);

Modified: freeswitch/trunk/libs/sofia-sip/utils/sip-options.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/sip-options.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/sip-options.c	Tue Dec 16 13:05:22 2008
@@ -23,7 +23,7 @@
  */
 
 /**@page sip-options Query SIP OPTIONS
- * 
+ *
  * @section synopsis Synopsis
  * <tt>sip-options [OPTIONS] target-uri </tt>
  *
@@ -46,7 +46,7 @@
  *     preliminary responses are silently discarded.
  * </dd>
  * <dt>--all | -a</dt>
- * <dd>All SIP headers will be printed. If the --all option is given, 
+ * <dd>All SIP headers will be printed. If the --all option is given,
  *     the @em options utility also prints @b From, @b Via, @b Call-ID or
  *     @b CSeq headers.
  * </dd>
@@ -82,7 +82,7 @@
  *
  * @section environment Environment
  * #SIPADDRESS, #sip_proxy, #NTA_DEBUG, #TPORT_DEBUG, #TPORT_LOG.
- * 
+ *
  * @section bugs Reporting Bugs
  * Report bugs to <sofia-sip-devel at lists.sourceforge.net>.
  *
@@ -117,13 +117,13 @@
 #include <sofia-sip/tport_tag.h>
 
 struct context_s {
-  su_home_t   	  c_home[1];
-  su_root_t   	 *c_root;
-  nta_agent_t 	 *c_agent;
+  su_home_t	  c_home[1];
+  su_root_t	 *c_root;
+  nta_agent_t	 *c_agent;
   url_t          *c_proxy;
   char const     *c_username;
   char const     *c_password;
-  nta_leg_t   	 *c_leg;
+  nta_leg_t	 *c_leg;
   nta_outgoing_t *c_orq;
   auth_client_t  *c_proxy_auth;
   auth_client_t  *c_auth;
@@ -139,7 +139,7 @@
 static
 void usage(int rc)
 {
-  fprintf(rc ? stderr : stdout, 
+  fprintf(rc ? stderr : stdout,
 	  "usage: %s OPTIONS url [extra-file]\n"
 	  "where OPTIONS are\n"
 	  "    --mf=count | --max-forwards=count\n"
@@ -164,15 +164,15 @@
 {
   su_home_t *home;
   context_t context[1] = {{{SU_HOME_INIT(context)}}};
-  char 
+  char
     *extra = NULL,
-    *o_bind = "sip:*:*", 
+    *o_bind = "sip:*:*",
     *o_from = getenv("SIPADDRESS"),
     *o_http_proxy = NULL,
     *o_max_forwards = NULL,
     *o_method = NULL,
     *o_to = NULL;
-   
+
   char *s, *v;
 
   sip_method_t method = sip_method_options;
@@ -190,11 +190,11 @@
   while ((s = argv++[1])) {
     if (!MATCH(s, "-"))             { o_to = s;           break; }
     else if (strcmp(s, "") == 0)    { o_to = argv++[1];   break; }
-    else if (MATCH(s, "-a") || MATCH(s, "--all")) 
+    else if (MATCH(s, "-a") || MATCH(s, "--all"))
                                     { context->c_all = 1; }
-    else if (MATCH(s, "-x") || MATCH(s, "--extra")) 
+    else if (MATCH(s, "-x") || MATCH(s, "--extra"))
                                     { extra = "-"; }
-    else if (MATCH(s, "-1") || MATCH(s, "--1XX")) 
+    else if (MATCH(s, "-1") || MATCH(s, "--1XX"))
                                     { context->c_pre = 1; }
     else if (MATCH2(s, "--mf"))     { o_max_forwards = v; }
     else if (MATCH2(s, "--http-proxy"))     { o_http_proxy = v; }
@@ -205,7 +205,7 @@
     else if (MATCH2(s, "--from"))   { o_from = v; }
     else if (MATCH2(s, "--method")) { o_method = v; }
     else if (MATCH(s, "--help"))    { usage(0); }
-    else 
+    else
       usage(2);
   }
 
@@ -216,7 +216,7 @@
     extra = argv++[1];
 
   su_init();
-  
+
   su_home_init(home = context->c_home);
 
   context->c_root = su_root_create(context);
@@ -225,7 +225,7 @@
   if (context->c_root) {
     url_string_t *r_uri;
 
-    context->c_agent = 
+    context->c_agent =
       nta_agent_create(context->c_root,
 		       URL_STRING_MAKE(o_bind),
 		       NULL, NULL, /* Ignore incoming messages */
@@ -251,7 +251,7 @@
       tag_from_header(context->c_agent, context->c_home, from);
 
       if (o_method) {
-	method = sip_method_code(o_method); 
+	method = sip_method_code(o_method);
       } else {
 	isize_t len;
 	char const *params = to->a_url->url_params;
@@ -262,7 +262,7 @@
 	  o_method = su_alloc(home, len + 1);
 	  if (o_method == 0 ||
 	      url_param(params, "method", o_method, len + 1) != len) {
-	    fprintf(stderr, "%s: %s\n", name, 
+	    fprintf(stderr, "%s: %s\n", name,
 		    o_method ? "internal error" : strerror(errno));
 	    exit(2);
 	  }
@@ -281,7 +281,7 @@
 
       if (extra) {
 	FILE *hf;
-	
+
 	if (strcmp(extra, "-"))
 	  hf = fopen(extra, "rb");
 	else
@@ -290,7 +290,7 @@
 	extra = readfile(hf);
       }
 
-      context->c_proxy = url_hdup(context->c_home, 
+      context->c_proxy = url_hdup(context->c_home,
 				  (url_t *)getenv("sip_proxy"));
 
       nta_agent_set_params(context->c_agent,
@@ -298,17 +298,17 @@
 			   NTATAG_DEFAULT_PROXY(context->c_proxy),
 			   TAG_END());
 
-      context->c_leg = 
+      context->c_leg =
 	nta_leg_tcreate(context->c_agent,
 			NULL, NULL,      /* ignore incoming requests */
 			SIPTAG_FROM(from), /* who is sending OPTIONS? */
 			SIPTAG_TO(to), /* whom we are sending OPTIONS? */
 			TAG_END());
-				      
+
       if (context->c_leg) {
-	context->c_orq = 
+	context->c_orq =
 	  nta_outgoing_tcreate(context->c_leg,
-			       response_to_options, context, 
+			       response_to_options, context,
 			       NULL,
 			       method, o_method, r_uri,
 			       SIPTAG_USER_AGENT_STR("options"),
@@ -317,7 +317,7 @@
 			       TAG_END());
 
 	if (context->c_orq) {
-	  su_root_run(context->c_root); 
+	  su_root_run(context->c_root);
 	  nta_outgoing_destroy(context->c_orq), context->c_orq = NULL;
 	}
 
@@ -326,7 +326,7 @@
 
       nta_agent_destroy(context->c_agent), context->c_agent = NULL;
     }
-    
+
     su_root_destroy(context->c_root);
   }
 
@@ -345,7 +345,7 @@
     return 0;
   if (server_authenticate(context, oreq, sip, response_to_options))
     return 0;
-				   
+
   if (sip->sip_status->st_status >= 200 || context->c_pre) {
     sip_header_t *h = (sip_header_t *)sip->sip_status;
     char hname[64];
@@ -362,17 +362,17 @@
 
       if (h->sh_class->hc_name == NULL) {
 	sl_header_print(stdout, NULL, h);
-      } 
+      }
       else if (h->sh_class->hc_name[0] == '\0') {
-	sl_header_print(stdout, "%s\n", h); 
+	sl_header_print(stdout, "%s\n", h);
       }
       else {
 	snprintf(hname, sizeof hname, "%s: %%s\n", h->sh_class->hc_name);
-	sl_header_print(stdout, hname, h); 
+	sl_header_print(stdout, hname, h);
       }
     }
   }
-  
+
   if (sip->sip_status->st_status >= 200) {
     context->c_retval = sip->sip_status->st_status >= 300;
     su_root_break(context->c_root);

Modified: freeswitch/trunk/libs/sofia-sip/utils/utils.docs
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/utils/utils.docs	(original)
+++ freeswitch/trunk/libs/sofia-sip/utils/utils.docs	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 /* -*- c -*- */
 
 /**@MODULEPAGE "utils" - Sofia-SIP Command Line Utilities
- * 
+ *
  * @section utils_meta Module Meta Information
  *
  * Command line utilities for <a href="../index.html">Sofia-SIP</a>.
@@ -14,8 +14,8 @@
  *
  * @section utuils_overview Overview
  *
- * The Sofia-SIP provides a few command line utilities: 
- * - @ref sip-date "sip-date" - print or parse SIP date 
+ * The Sofia-SIP provides a few command line utilities:
+ * - @ref sip-date "sip-date" - print or parse SIP date
  * - @ref sip-dig "sip-dig" - resolve SIP URIs
  * - @ref sip-options "sip-options" - query SIP OPTIONS
  * - @ref localinfo "localinfo" - list local network addresses

Modified: freeswitch/trunk/libs/sofia-sip/win32/ChangeLog
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/ChangeLog	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/ChangeLog	Tue Dec 16 13:05:22 2008
@@ -1,20 +1,20 @@
 2006-05-11  Pekka Pessi  <Pekka.Pessi at nokia.com>
 
   	* 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.
 
 2006-05-03  Kai Vehmanen  <kai.vehmanen at nokia.com>
@@ -26,19 +26,19 @@
   * Added test_tport.dsp to SofiaSIP.dsw
 
   * Added source files:
-  
+
   sres.c sres_blocking.c sres_cache.c stun.c stun_common.c stun_dns.c
   stun_internal.h stun_mini.c nua_params.c nua_params.h tport_internal.h
   tport_logging.c tport_stub_sigcomp.c tport_stub_stun.c
   tport_threadpool.c tport_type_connect.c tport_type_tcp.c
   tport_type_udp.c
-  
+
   and
-  
+
   sofia-resolv/sres.h sofia-resolv/sres_async.h
   sofia-resolv/sres_cache.h sofia-resolv/sres_record.h
   sofia-sip/tport_plugins.h
-  
+
   to libsofia_sip_ua.dsp.
 
   * Added stat() as well as struct stat to compatibity win32/unistd.h.

Modified: freeswitch/trunk/libs/sofia-sip/win32/README.txt
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/README.txt	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/README.txt	Tue Dec 16 13:05:22 2008
@@ -2,11 +2,11 @@
 win32/README.txt / Sofia-SIP for win32
 ======================================
 
-The win32 subdirectory contains the build environment for Win32 
+The win32 subdirectory contains the build environment for Win32
 environment using MSVC.
 
 Currently, the provided workspace/solution files will create both
-shared and static libraries for libsofia-sip-ua, and a few test 
+shared and static libraries for libsofia-sip-ua, and a few test
 programs. The test programs can be run with the script check.cmd.
 
 
@@ -18,7 +18,7 @@
 is needed. You can for example use gawk (3.1.5 or newer) or mawk (tested
 with 1.3.3) implementations. Precompiled binaries are available
 for instance at:
- 
+
   - http://gnuwin32.sourceforge.net/packages/mawk.htm
   - http://ftp.uni-kl.de/pub/windows/cygwin/release/gawk/
   - plus many sites, a web search for "win32 awk" will

Modified: freeswitch/trunk/libs/sofia-sip/win32/build_sources.cmd
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/build_sources.cmd	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/build_sources.cmd	Tue Dec 16 13:05:22 2008
@@ -67,7 +67,7 @@
    TEMPLATE1=%PR2%.in ^
    TEMPLATE2=%PR3%.in ^
    TEMPLATE3=%PR4%.in ^
-   TEMPLATE=%PR5%.in %SIPEXTRA% < NUL 
+   TEMPLATE=%PR5%.in %SIPEXTRA% < NUL
 %CHECK%
 
 %AWK_SIP_AWK% PT=%PT% TEMPLATE=%PT%.in ^

Modified: freeswitch/trunk/libs/sofia-sip/win32/config.h.in
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/config.h.in	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/config.h.in	Tue Dec 16 13:05:22 2008
@@ -25,7 +25,7 @@
 /**@file win32/config.h.in
  * @brief <config.h> used by Windows.
  *
- * Use this on WIN32. 
+ * Use this on WIN32.
  *
  * @author Pekka Pessi <Pekka.Pessi at nokia.com>
  *
@@ -151,7 +151,7 @@
 #undef HAVE_INTTYPES_H
 
 /* Define to 1 if you have the <iphlpapi.h> header file. */
-#if _MSC_VER > 1200 
+#if _MSC_VER > 1200
 #define HAVE_IPHLPAPI_H 1
 #else
 // XXX: vehmanek-win32-fix for VC6
@@ -458,7 +458,7 @@
 
 #define snprintf _snprintf
 
-#ifndef _MSC_VER 
+#ifndef _MSC_VER
 #define vsnprintf _vsnprintf
 #endif
 #if _MSC_VER < 1500
@@ -485,14 +485,14 @@
 #define HAVE_SIO_ADDRESS_LIST_QUERY 1
 
 /* Define to 1 if you have INTERFACE_INFO ioctl */
-#define HAVE_INTERFACE_INFO 	   (1) 
+#define HAVE_INTERFACE_INFO 	   (1)
 
 /* Ignore certain warnings */
 #ifdef _MSC_VER
 #pragma warning( disable : 4090 4204 4244 4018 4514 4706 4761)
 /* VC does not grok const */
 #pragma warning( disable : 4022 4028 )
-/* Temporarily disable high frequency, low value warnings.  
+/* Temporarily disable high frequency, low value warnings.
    We may still want to re-enable and fix these */
 #pragma warning( disable : 4132 4100 4127 4152)
 #if (_MSC_VER >= 1400) // VC8+
@@ -505,7 +505,7 @@
 #endif // VC8+
 #endif
 
-/* size_t/ssize_t modifiers 
+/* size_t/ssize_t modifiers
  * ref: http://msdn2.microsoft.com/en-us/library/tcxf1dw6.aspx */
 #define MOD_ZD "%ld"
 #define MOD_ZU "%lu"

Modified: freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/sofia-sip-ua.def
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/sofia-sip-ua.def	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/libsofia-sip-ua/sofia-sip-ua.def	Tue Dec 16 13:05:22 2008
@@ -121,7 +121,7 @@
 msg_token_d
 msg_unquote_dup
 msghdrtag_dup
-msghdrtag_snprintf 
+msghdrtag_snprintf
 msghdrtag_xtra
 msgobjtag_dup
 msgobjtag_snprintf
@@ -311,7 +311,7 @@
 sip_serialize
 sip_status_create
 sip_status_phrase
-sip_to_add_param   
+sip_to_add_param
 sip_to_create
 sip_to_tag
 sip_version_d

Modified: freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/sofia-sip/su_configure.h	Tue Dec 16 13:05:22 2008
@@ -46,7 +46,7 @@
 #define SU_HAVE_STDINT          (0)
 #define SU_HAVE_NT              0
 
-/* note: on Windows 2000 and older (WINVER<=500), IPv6-tech-preview 
+/* note: on Windows 2000 and older (WINVER<=500), IPv6-tech-preview
  * is needed for IPv4 support as well, so SU_HAVE_IN6 must be set */
 #define SU_HAVE_IN6             1
 
@@ -104,7 +104,7 @@
 #define snprintf    _snprintf
 #endif
 #ifndef vsnprintf
-#ifndef _MSC_VER 
+#ifndef _MSC_VER
 #define vsnprintf _vsnprintf
 #endif
 #if _MSC_VER < 1500

Modified: freeswitch/trunk/libs/sofia-sip/win32/version.awk
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/win32/version.awk	(original)
+++ freeswitch/trunk/libs/sofia-sip/win32/version.awk	Tue Dec 16 13:05:22 2008
@@ -1,7 +1,7 @@
 #! /bin/gawk
 #
 # This script extracts the version information from configure.ac
-# and re-generates win32/config.h and 
+# and re-generates win32/config.h and
 # libsofia-sip-ua/features/sofia_sip_features.h
 #
 # --------------------------------------------------------------------
@@ -38,7 +38,7 @@
 
 IN && /^AC_INIT/ { version=$2; gsub(/[\]\[)]/, "", version); }
 
-OUT && /@[A-Z_]+@/ { 
+OUT && /@[A-Z_]+@/ {
   gsub(/@PACKAGE_VERSION@/, version);
   gsub(/@PACKAGE_BUGREPORT@/, "sofia-sip-devel at lists.sourceforge.net");
   gsub(/@PACKAGE_NAME@/, "sofia-sip");



More information about the Freeswitch-svn mailing list