[Freeswitch-svn] [commit] r5104 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua libsofia-sip-ua-glib libsofia-sip-ua/bnf libsofia-sip-ua/bnf/sofia-sip 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/nta libsofia-sip-ua/nta/sofia-sip libsofia-sip-ua/nth libsofia-sip-ua/nua libsofia-sip-ua/sdp libsofia-sip-ua/sip libsofia-sip-ua/sip/sofia-sip libsofia-sip-ua/soa libsofia-sip-ua/sresolv libsofia-sip-ua/sresolv/sofia-resolv 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/url m4 open_c open_c/group open_c/sofia-sip rules scripts utils
Freeswitch SVN
mikej at freeswitch.org
Tue May 8 15:14:11 EDT 2007
Author: mikej
Date: Tue May 8 15:14:10 2007
New Revision: 5104
Added:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/string0.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/string0.c
freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4
freeswitch/trunk/libs/sofia-sip/open_c/
freeswitch/trunk/libs/sofia-sip/open_c/autogen.cmd
freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd
freeswitch/trunk/libs/sofia-sip/open_c/config.h.in
freeswitch/trunk/libs/sofia-sip/open_c/group/
freeswitch/trunk/libs/sofia-sip/open_c/group/bld.inf
freeswitch/trunk/libs/sofia-sip/open_c/group/libsofia-sip-ua.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url.mmp
freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url_reg.rss
freeswitch/trunk/libs/sofia-sip/open_c/sofia-sip/
freeswitch/trunk/libs/sofia-sip/open_c/sofia-sip/su_configure.h
freeswitch/trunk/libs/sofia-sip/open_c/version.awk
freeswitch/trunk/libs/sofia-sip/open_c/version_files.cmd
freeswitch/trunk/libs/sofia-sip/rules/lcov.am
freeswitch/trunk/libs/sofia-sip/scripts/lcov-report
freeswitch/trunk/libs/sofia-sip/scripts/uncovered
Removed:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/sofia-sip/string0.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/string0.c
Modified:
freeswitch/trunk/libs/sofia-sip/Makefile.am
freeswitch/trunk/libs/sofia-sip/RELEASE
freeswitch/trunk/libs/sofia-sip/configure.ac
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua-glib/Makefile.am
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/sofia-sip/bnf.h
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/sofia-sip/http_tag.h.in
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_common.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_ntlm.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/sofia-sip/auth_module.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/test_auth_digest.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_date.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_header_copy.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/msg/msg_parser.c
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_hash.h
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/nea/nea_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/nta.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nta/sofia-sip/nta.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nth/nth_server.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_dialog.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.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/test_basic_call.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sdp/sdp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sip_event.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag.h.in
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/soa.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sofia-resolv/sres_config.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_cache.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/test_sresolv.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/su/Makefile.am
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/poll.c
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_config.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_inline.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/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_localinfo.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_port.h
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_strlst.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_taglist.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_timer.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/torture_rbtree.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_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_tag.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/test_tport.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_internal.h
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_sigcomp.c
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_threadpool.c
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/urlmap.c
freeswitch/trunk/libs/sofia-sip/m4/sac-general.m4
freeswitch/trunk/libs/sofia-sip/m4/sac-tport.m4
freeswitch/trunk/libs/sofia-sip/rules/recursive.am
freeswitch/trunk/libs/sofia-sip/rules/sofia.am
freeswitch/trunk/libs/sofia-sip/utils/Doxyfile.in
Log:
sync to latest sofia-sip darcs tree
Modified: freeswitch/trunk/libs/sofia-sip/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/Makefile.am Tue May 8 15:14:10 2007
@@ -24,26 +24,28 @@
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST += m4/sac-general.m4 m4/sac-su.m4 \
- m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
+EXTRA_DIST += m4/sac-general.m4 m4/sac-su.m4 m4/sac-coverage.m4 \
+ m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
EXTRA_DIST += docs/build_system.txt \
docs/devel_platform_notes.txt \
docs/release_management.txt
+EXTRA_DIST += scripts/lcov-report scripts/uncovered
+
dist_man_MANS = man/man1/sip-date.1 man/man1/sip-options.1 \
man/man1/localinfo.1 man/man1/addrinfo.1 \
man/man1/stunc.1 man/man1/sip-dig.1
$(dist_man_MANS): manpages
-manpages: built-sources
+manpages:
-mkdir -p man man/man1 2> /dev/null
if HAVE_DOXYGEN
@echo 'cd utils && $(DOXYGEN)'
@cd utils && \
{ exec 3>&1 1>&2; { $(DOXYGEN) 2>&1; echo $$? >& 3 ;} | \
- fgrep -v 'Warning:' ;} | { read x; exit $$x ;}
+ fgrep -v 'Warning: explicit' ;} | { read x; exit $$x ;}
@rm -f man/man1/_*.1
else
-touch $(dist_man_MANS)
@@ -51,7 +53,7 @@
CLEANFILES = $(dist_man_MANS)
-coverage built-sources clean-built-sources valcheck doxygen:
+built-sources clean-built-sources valcheck doxygen:
@failcom='exit 1'; for f in x $$MAKEFLAGS; do \
case $$f in *=* | --[!k]*);; *k*) failcom='fail=yes';; esac; done; \
for i in libsofia-sip-ua $(GLIB_SUBDIRS) ; do \
@@ -59,4 +61,15 @@
done ; \
test -z "$$fail"
-.PHONY: coverage built-sources clean-built-sources valcheck doxygen manpages
+PHONY = built-sources clean-built-sources valcheck doxygen manpages
+
+if HAVE_LCOV
+
+include $(top_srcdir)/rules/lcov.am
+
+lcov-upload: lcov
+ rsync -rvz -e ssh --delete lcov/* sofia-sip.org:/var/www/coverage/lcov/
+
+endif
+
+.PHONY: $(PHONY)
Modified: freeswitch/trunk/libs/sofia-sip/RELEASE
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/RELEASE (original)
+++ freeswitch/trunk/libs/sofia-sip/RELEASE Tue May 8 15:14:10 2007
@@ -5,31 +5,27 @@
Changes since last release
--------------------------
-Numerous nua bugs introduced in the release 1.12.5 have been fixed. Support
-for nextnonce in Authentication-Info header has been added. The nua engine
-now fully supports application-driven SDP.
+<changes since last written in freshmeat.net "Changes:" style;
+ and in less than 10 lines, written in 3rd person English, with
+ complete sentences />
+
+Bugs in blaa and foo have been fixed. The stack now supports
+use of foobar...
API/ABI changes and versioning
------------------------------
+<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;
+ - and should be updated _continuously_! />
+
+New features in API are marked with Doxytag macro @VERSION_1_12_7.
+
libsofia-sip-ua:
-- Use calling/received callstate in nua_i_state event sent because of UPDATE
- while call is ready
-- Added tag define NUTAG_WITH_CURRENT() as an alias to NUTAG_WITH_THIS()
-- Added tag NUTAG_DIALOG() controlling whether nua_method() creates a dialog.
-- Added tag NUTAG_AUTH_CACHE() <sofia-sip/nua_tag.h> determining when to
- include credentials in the request
-- Added kqueue and /dev/poll interfaces (su_devpoll_port_create(),
- su_devpoll_clone_start(), su_kqueue_port_create(), su_kqueue_clone_start()
- in <sofia-sip/su_wait.h>)
-- Added SIP_IS_ALLOWED() macro to <sofia-sip/sip_util.h>
-- Fixed NUTAG_APPL_METHOD() implementation for UPDATE and PRACK as documented
- ("100rel" and "precondition" extensions now require explicit calls to
- nua_update() and nua_prack() if those methods are included in
- NUTAG_APPL_METHOD())
-- Added auc_clear field and member to authentication client plugin interface
- in <sofia-sip/auth_client_plugin.h>
-- Added nua_event_is_incoming_request() to <sofia-sip/nua.h>
+- Added accessor function nta_outgoing_branch()
+- **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
@@ -43,74 +39,38 @@
Contributors to this release
----------------------------
-- Pekka Pessi (/dev/poll interface to Solaris, kqueue)
-- Martti Mela (kqueue interface to Max OS X and FreeBSD)
-- Michael Jerris (Solaris patches)
-- Colin Whittaker (sresolv patch)
+<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
+ 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)
See the AUTHORS file in the distribution package.
Notes on new features
---------------------
-The Sofia-SIP has been compiled and tested on Solaris. The /dev/poll
-interface (in su_devpoll_port.c) has been added for Solaris. Likewise, the
-kqueue interface (in su_kqueue_port.c) has been added for FreeBSD and Mac OS
-X. There is also select-based reactor for systems without poll().
-
-The client authentication in nua has been updated. The nextnonce in
-Authentication-Info or Proxy-Authentication-Info headers is now used during
-the next . The NUTAG_AUTH_CACHE() policy determines how the cached
-credentials are used. By default, the credentials are included in each
-request within the dialog, however, with the
-NUTAG_AUTH_CACHE(nua_auth_cache_challenged) the client authenticates
-requests only after they have been challenged.
-
-The application can now fully control the SDP negotiation (when soa is
-disabled with NUTAG_MEDIA_ENABLE(0)). The application can send UPDATE and
-PRACK requests and respond to them. The callstate sent in nua_i_state after
-UPDATE while the call has already been completed has been also changed.
+<information about major new features
+ - new/changed/removed functionality
+ - links to further documentation
+ - section may be omitted for minor releases
+/>
Bugs fixed in this release
--------------------------
-- Fixed nua failing to refresh publication with re-PUBLISH.
- Problem reported by Jan van den Bosch.
-- Fixed encoding of c= lines without IN address.
- Problem reported by Saurav Sahu.
-- Fixed status code sent to network and returned to the client if there was
- an internal error while responding to a request.
- The problem was reported by Michael Jerris and Joshua Engelbrecht.
-- Fixed #1685249, unclear termination of call in absense of credentials by
- nua_authenticate(). Problem reported by Mikhail Zabaluev.
-- Fixed status code reported to application when REGISTER transaction was
- restarted by nua stack. Problem reported by Mikhail Zabaluev.
-- An invalid Contact was used if STUN was disabled but there was no STUN
- server. Problem reported by Miguel Freitas.
-- Fixed problem logging long lines from with TPORT_LOG.
- Problem reported by Mike Murdock and Michael Jerris.
-- Nua now includes the SDP capabilities in the response to the OPTIONS
-- Fixed assertion failure because BYE destroyed a session twice.
- Problem reported by Michael Jerris.
-- Fixed crash caused by a 0-length UDP datagram.
- Problem reported by Michael Jerris.
-- Fixed the 305 response handling by nua stack.
- Bug #1676445 reported by Fabio Margarido.
-- Fixed authentication-related bugs #1685245 and #1570746.
- #1685245 reported by Mikhail Zabaluev.
-- Fixed problems resuming DNS after server or link downtime.
- Bug #1631198 reported and initial patch submitted by Colin Whittaker.
-- Fixed NUTAG_APPL_METHOD() implementation for UPDATE and PRACK as documented
-- Fixed crashes in nua state engines:
- - when nua_invite() was called second time before receiving
- final response to first INVITE
- - when UAS expected PRACK but received CANCEL
- - when UAC received error response to PRACK, it tried to send BYE and crashed
- - when UAS rejected initial request, the subsequent request with same
- dialog id (Call-ID, From-tag) crashed (dialog cleanup code left dialog
- dangling)
- Problems reported by Michael Jerris
-- Fixed crash in nta state engine:
- - DNS resolver failure in non-invite transctions crashed
-- Fixed sdp handling when soa is disabled (NUTAG_MEDIA_ENABLE(0)).
- Problem reported by Marcin Michalak
+< notable bugs fixed in this release
+ - check the sf.net bug tracker; see closed bugs,
+ sorted by closing date
+ - other bugs as fixed in CVS/darcs
+/>
+
+- **template**: #9499652 sf.net bug item title
+- Fixed #1472682 sf.net bug: ACK does not find INVITE when
+ To URI has been changed.
Modified: freeswitch/trunk/libs/sofia-sip/configure.ac
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/configure.ac (original)
+++ freeswitch/trunk/libs/sofia-sip/configure.ac Tue May 8 15:14:10 2007
@@ -11,14 +11,14 @@
dnl ---------------------------
dnl update both the version for AC_INIT and the LIBSOFIA_SIP_UA_MAJOR_MINOR
-AC_INIT([sofia-sip], [1.12.5work6])
+AC_INIT([sofia-sip], [1.12.6work])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sofia-sip/sip.h])
AC_SUBST(VER_LIBSOFIA_SIP_UA_MAJOR_MINOR, [1.12])
dnl Includedir specific to this sofia version
AC_SUBST(include_sofiadir, '${includedir}/sofia-sip-1.12')
-AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [5])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_CUR, [6])
AC_SUBST(LIBVER_SOFIA_SIP_UA_REV, [0])
-AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [5])
+AC_SUBST(LIBVER_SOFIA_SIP_UA_AGE, [6])
AC_SUBST(LIBVER_SOFIA_SIP_UA_SOVER, [0]) # CUR-AGE
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_CUR, [3])
AC_SUBST(LIBVER_SOFIA_SIP_UA_GLIB_REV, [0])
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 May 8 15:14:10 2007
@@ -42,6 +42,12 @@
done
${top_srcdir}/libsofia-sip-ua/docs/hide_emails.sh docs/html
+PHONY = doxygen
+
include $(top_srcdir)/rules/recursive.am
-.PHONY: built-sources built-sources-am doxygen
+if HAVE_LCOV
+include $(top_srcdir)/rules/lcov.am
+endif
+
+.PHONY = $(PHONY)
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 May 8 15:14:10 2007
@@ -1,3 +1,7 @@
+2007-04-25 Kai Vehmanen <kai.vehmanen at nokia.com>
+
+ * libsofia-sip-ua interface v4 frozen (5:0:5) for the 1.12.6 release
+
2007-02-09 Kai Vehmanen <kai.vehmanen at nokia.com>
* libsofia-sip-ua interface v4 frozen (4:0:4) for the 1.12.5 release
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 May 8 15:14:10 2007
@@ -9,7 +9,7 @@
AUTOMAKE_OPTIONS = foreign
-# select whicn optional sofia-sip modules have been enabled
+# select which optional sofia-sip modules have been enabled
# in the build
OPT_LIBADD =
OPT_SUBDIRS_STUN =
@@ -55,6 +55,8 @@
libsofia_sip_ua_la_LDFLAGS = \
-version-info $(LIBVER_SOFIA_SIP_UA_CUR):$(LIBVER_SOFIA_SIP_UA_REV):$(LIBVER_SOFIA_SIP_UA_AGE)
+PHONY = doxygen built-sources
+
include $(top_srcdir)/rules/recursive.am
doxygen: built-sources
@@ -96,4 +98,8 @@
done
${srcdir}/docs/hide_emails.sh docs/html
-.PHONY: built-sources built-sources-am empty-doxytags doxygen
+if HAVE_LCOV
+include $(top_srcdir)/rules/lcov.am
+endif
+
+.PHONY: $(PHONY)
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 May 8 15:14:10 2007
@@ -69,6 +69,7 @@
alpha, alpha, alpha, sep, 0, sep, mtok, 0, /* xyz{|}~ */
};
+#if 0 /* This escaped lab */
#define BM(c, m00, m32, m64, m96) \
((c < 64) \
@@ -104,9 +105,10 @@
{
return (char *)s;
}
+#endif
/** Return length of decimal-octet */
-static inline int span_ip4_octet(char const *host)
+su_inline int span_ip4_octet(char const *host)
{
/*
decimal-octet = DIGIT
@@ -212,6 +214,9 @@
issize_t n;
int canonize = 0;
+ if (src == NULL)
+ return -1;
+
n = span_canonic_ip4_address(src, &canonize);
if (n == 0)
return -1;
@@ -242,7 +247,7 @@
}
/** Return length of hex4 */
-static inline int span_hex4(char const *host)
+su_inline int span_hex4(char const *host)
{
if (!IS_HEX(host[0]))
return 0;
@@ -256,7 +261,7 @@
}
/** Return length of valid IP6 address */
-static inline
+su_inline
int span_canonic_ip6_address(char const *host,
int *return_canonize,
char *hexparts[9])
@@ -337,7 +342,7 @@
*
* @retval Length of canonized IP6 address.
*/
-static inline
+su_inline
int canonize_ip6_address(char *host, char *hexparts[9])
{
char *dst, *hex, *ip4 = NULL;
@@ -565,7 +570,7 @@
}
/** Return length of a valid domain label */
-static inline
+su_inline
size_t span_domain_label(char const *label)
{
/* domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum */
@@ -581,7 +586,7 @@
}
/** Scan valid domain name and count number of labels in it. */
-static inline
+su_inline
size_t span_domain_labels(char const *host, size_t *return_labels)
{
size_t len, n, labels;
@@ -851,12 +856,11 @@
}
return (void)(*return_addrlen = 16), len;
}
- else
- return 0;
}
+ else
#endif
-
len = span_canonic_ip4_address(s, &canonize);
+
if (len) {
if (canonize) {
char *tmp = buf;
@@ -865,8 +869,6 @@
}
if (s[len] == '\0' && inet_pton(AF_INET, s, addr) == 1)
return (void)(*return_addrlen = 4), len;
- else
- return 0;
}
return 0;
@@ -892,22 +894,27 @@
{
uint8_t a6[16], b6[16];
size_t alen, blen, asize = 0, bsize = 0;
+ int retval;
- if (a == NULL || b == NULL)
- return (a != NULL) - (b != NULL);
-
- alen = convert_ip_address(a, a6, &asize);
- blen = convert_ip_address(b, b6, &bsize);
-
- if (alen > 0 && blen > 0) {
- if (asize < bsize)
- return -1;
- else if (asize > bsize)
- return 1;
- else
- return memcmp(a6, b6, asize);
+ if (a == NULL || b == NULL) {
+ retval = (a != NULL) - (b != NULL);
}
else {
- return strcasecmp(a, b);
+ alen = convert_ip_address(a, a6, &asize);
+ blen = convert_ip_address(b, b6, &bsize);
+
+ if (alen > 0 && blen > 0) {
+ if (asize < bsize)
+ retval = -1;
+ else if (asize > bsize)
+ retval = 1;
+ else
+ retval = memcmp(a6, b6, asize);
+ }
+ else {
+ retval = strcasecmp(a, b);
+ }
}
+
+ return retval;
}
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 May 8 15:14:10 2007
@@ -174,7 +174,7 @@
/** Calculate span of a linear whitespace.
* LWS = [*WSP CRLF] 1*WSP
*/
-static inline isize_t span_lws(char const *s)
+su_inline isize_t span_lws(char const *s)
{
char const *e = s;
int i = 0;
@@ -187,7 +187,7 @@
}
/** Calculate span of a token or linear whitespace characters. */
-static inline isize_t span_token_lws(char const *s)
+su_inline isize_t span_token_lws(char const *s)
{
char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & (bnf_token | bnf_lws))
@@ -195,23 +195,17 @@
return e - s;
}
-#if 1
/** Calculate span of a token characters. */
-static inline isize_t span_token(char const *s)
+su_inline isize_t span_token(char const *s)
{
char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & bnf_token)
e++;
return e - s;
}
-#else
-size_t bnf_span_token(char const *s);
-#define span_token(s) bnf_span_token((s))
-#endif
-
/** Calculate span of a alphabetic characters. */
-static inline isize_t span_alpha(char const *s)
+su_inline isize_t span_alpha(char const *s)
{
char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & bnf_alpha)
@@ -220,7 +214,7 @@
}
/** Calculate span of a digits. */
-static inline isize_t span_digit(char const *s)
+su_inline isize_t span_digit(char const *s)
{
char const *e = s;
while (*e >= '0' && *e <= '9')
@@ -229,7 +223,7 @@
}
/** Calculate span of a hex. */
-static inline isize_t span_hexdigit(char const *s)
+su_inline isize_t span_hexdigit(char const *s)
{
char const *e = s;
while (IS_HEX(*e))
@@ -238,7 +232,7 @@
}
/** Calculate span of characters belonging to an RTSP token */
-static inline isize_t span_alpha_digit_safe(char const *s)
+su_inline isize_t span_alpha_digit_safe(char const *s)
{
char const *e = s;
while (_bnf_table[(unsigned char)(*e)] & (bnf_alpha | bnf_safe))
@@ -247,7 +241,7 @@
}
/** Calculate span of a characters valid in parameters. */
-static inline isize_t span_param(char const *s)
+su_inline isize_t span_param(char const *s)
{
char const *e = s;
while (IS_PARAM(*e))
@@ -256,7 +250,7 @@
}
/** Calculate span of a SIP word. */
-static inline isize_t span_word(char const *s)
+su_inline isize_t span_word(char const *s)
{
char const *e = s;
while (*e && (IS_TOKEN(*e) || strchr(SIP_WORD, *e)))
@@ -265,7 +259,7 @@
}
/** Calculate span of a unreserved characters. */
-static inline isize_t span_unreserved(char const *s)
+su_inline isize_t span_unreserved(char const *s)
{
char const *e = s;
while (IS_UNRESERVED(*e))
@@ -274,7 +268,7 @@
}
/** Calculate span of a double quoted string (with escaped chars inside) */
-static inline isize_t span_quoted(char const *s)
+su_inline isize_t span_quoted(char const *s)
{
char const *b = s;
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 May 8 15:14:10 2007
@@ -1351,7 +1351,7 @@
* @endcode
*/
-static inline
+su_inline
void http_te_update(http_te_t *te)
{
te->te_q = msg_header_find_param(te->te_common, "q");
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 May 8 15:14:10 2007
@@ -97,7 +97,7 @@
*
* @param sc pointer to a @c http_cookie_t object
*/
-static inline
+su_inline
void http_cookie_update(http_cookie_t *c)
{
size_t i;
@@ -299,7 +299,7 @@
*
* @param sc pointer to a @c http_set_cookie_t object
*/
-static inline
+su_inline
void http_set_cookie_update(http_set_cookie_t *sc)
{
size_t i;
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 May 8 15:14:10 2007
@@ -103,9 +103,9 @@
SOFIAPUBVAR tag_typedef_t httptag_http_ref;
#if SU_HAVE_INLINE
-static inline
+su_inline
tag_value_t httptag_http_v(http_t const *v) { return (tag_value_t)v; }
-static 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)
@@ -151,10 +151,10 @@
SOFIAPUBVAR tag_typedef_t httptag_header_ref;
#if SU_HAVE_INLINE
-static inline tag_value_t
+su_inline tag_value_t
httptag_header_v(http_header_t const *v)
{ return (tag_value_t)v; }
-static inline tag_value_t
+su_inline tag_value_t
httptag_header_vr(http_header_t const **vp)
{ return (tag_value_t)vp; }
#else
@@ -221,10 +221,10 @@
SOFIAPUBVAR tag_typedef_t httptag_#xxxxxx#_str_ref;
#if SU_HAVE_INLINE
-static inline tag_value_t
+su_inline tag_value_t
httptag_#xxxxxx#_v(http_#xxxxxx#_t const *v)
{ return (tag_value_t)v; }
-static inline tag_value_t
+su_inline tag_value_t
httptag_#xxxxxx#_vr(http_#xxxxxx#_t const **vp)
{ return (tag_value_t)vp; }
#else
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/ipt/Makefile.am Tue May 8 15:14:10 2007
@@ -25,10 +25,10 @@
nobase_include_sofia_HEADERS = \
sofia-sip/rc4.h \
sofia-sip/base64.h \
- sofia-sip/string0.h sofia-sip/token64.h \
+ sofia-sip/token64.h \
sofia-sip/uniqueid.h
-libipt_la_SOURCES = base64.c string0.c token64.c
+libipt_la_SOURCES = base64.c token64.c
EXTRA_DIST = sofia-sip/utf8.h \
utf8internal.h \
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 May 8 15:14:10 2007
@@ -45,7 +45,7 @@
char *strcasestr(char const *haystack, char const *needle);
#endif
-static inline int has_token(char const *qstring, char const *token);
+su_inline int has_token(char const *qstring, char const *token);
/**
* Parse authentication parameters.
@@ -163,7 +163,7 @@
return 0;
}
-static inline int has_token(char const *qstring, char const *token)
+su_inline int has_token(char const *qstring, char const *token)
{
size_t n = strlen(token);
char const *q;
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 May 8 15:14:10 2007
@@ -831,7 +831,7 @@
/* ====================================================================== */
/* Password database */
-static inline void
+su_inline void
auth_htable_append_local(auth_htable_t *pr, auth_passwd_t *apw);
/** Get an passwd entry for user. */
@@ -1132,7 +1132,7 @@
}
/** Append to hash, remove existing user */
-static inline void
+su_inline void
auth_htable_append_local(auth_htable_t *aht, auth_passwd_t *apw)
{
auth_passwd_t **slot;
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 May 8 15:14:10 2007
@@ -43,7 +43,7 @@
#include "iptsec_debug.h"
-static inline int has_token(char const *qstring, char const *token);
+su_inline int has_token(char const *qstring, char const *token);
/**Get ntlm-challenge parameters.
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 May 8 15:14:10 2007
@@ -254,10 +254,10 @@
SOFIAPUBVAR tag_typedef_t authtag_module_ref;
#if SU_HAVE_INLINE
-static inline tag_value_t authtag_module_v(auth_mod_t *v) {
+su_inline tag_value_t authtag_module_v(auth_mod_t *v) {
return (tag_value_t)v;
}
-static inline tag_value_t authtag_module_vr(auth_mod_t **vp) {
+su_inline tag_value_t authtag_module_vr(auth_mod_t **vp) {
return (tag_value_t)vp;
}
#else
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 May 8 15:14:10 2007
@@ -765,6 +765,44 @@
reinit_as(as); auth_mod_destroy(am); aucs = NULL;
+ /* Test without realm */
+ {
+ msg_auth_t *au;
+
+ TEST_1(am = auth_mod_create(NULL,
+ AUTHTAG_METHOD("Digest"),
+ AUTHTAG_DB(testpasswd),
+ AUTHTAG_ALGORITHM("MD5-sess"),
+ AUTHTAG_QOP("auth"),
+ AUTHTAG_OPAQUE("opaque=="),
+ TAG_END()));
+ as->as_realm = NULL;
+ auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 500);
+
+ as->as_realm = "ims3.so.noklab.net";
+ auth_mod_check_client(am, as, NULL, ach); TEST(as->as_status, 401);
+
+ 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\"",
+ "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",
+ sip->sip_payload), 1);
+
+ TEST_1(sip->sip_authorization);
+ reinit_as(as);
+
+ as->as_realm = "ims3.so.noklab.net";
+ auth_mod_check_client(am, as, sip->sip_authorization, ach);
+ TEST(as->as_status, 0);
+ }
+
+ reinit_as(as); auth_mod_destroy(am); aucs = NULL;
+
/* Test nextnonce */
{
char const *nonce1, *nextnonce, *nonce2;
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 May 8 15:14:10 2007
@@ -92,7 +92,7 @@
* @return The function month_d() returns 0..11 if given first three letters
* of month name, or -1 if no month name matches.
*/
-static inline
+su_inline
int month_d(char const *s)
{
unsigned const uc = ('a' - 'A') << 16 | ('a' - 'A') << 8 | ('a' - 'A');
@@ -125,7 +125,7 @@
}
/* Parse SP 2DIGIT ":" 2DIGIT ":" 2DIGIT SP */
-static inline
+su_inline
int time_d(char const **ss,
unsigned long *hour, unsigned long *min, unsigned long *sec)
{
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 May 8 15:14:10 2007
@@ -51,7 +51,7 @@
#include "sofia-sip/msg_header.h"
/** Calculate size of a parameter vector */
-static inline
+su_inline
size_t msg_params_copy_xtra(msg_param_t const pp[], size_t offset)
{
size_t n = msg_params_count(pp);
@@ -63,7 +63,7 @@
}
/** Copy a vector of parameters */
-static inline
+su_inline
char *msg_params_copy(char *b, size_t size,
msg_param_t **dst,
msg_param_t const src[])
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 May 8 15:14:10 2007
@@ -119,29 +119,29 @@
/* ---------------------------------------------------------------------- */
/* Header-kind predicate functions. */
-static inline int msg_is_single(msg_header_t const *h)
+su_inline int msg_is_single(msg_header_t const *h)
{
return h->sh_class->hc_kind == msg_kind_single;
}
-static inline int msg_is_prepend(msg_header_t const *h)
+su_inline int msg_is_prepend(msg_header_t const *h)
{
return h->sh_class->hc_kind == msg_kind_prepend;
}
-static inline int msg_is_append(msg_header_t const *h)
+su_inline int msg_is_append(msg_header_t const *h)
{
return
h->sh_class->hc_kind == msg_kind_append ||
h->sh_class->hc_kind == msg_kind_apndlist;
}
-static inline int msg_is_list(msg_header_t const *h)
+su_inline int msg_is_list(msg_header_t const *h)
{
return h->sh_class->hc_kind == msg_kind_list;
}
-static inline int msg_is_special(msg_header_t const *h)
+su_inline int msg_is_special(msg_header_t const *h)
{
return h->sh_class->hc_hash < 0;
}
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 May 8 15:14:10 2007
@@ -76,7 +76,7 @@
static void msg_insert_here_in_chain(msg_t *msg,
msg_header_t **prev,
msg_header_t *h);
-static inline msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h);
+su_inline msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h);
#ifndef NDEBUG
static int msg_chain_loop(msg_header_t const *h);
@@ -122,12 +122,12 @@
/** Test if header is not in the chain */
#define msg_header_is_removed(h) ((h)->sh_prev == NULL)
-static inline int msg_is_request(msg_header_t const *h)
+su_inline int msg_is_request(msg_header_t const *h)
{
return h->sh_class->hc_hash == msg_request_hash;
}
-static inline int msg_is_status(msg_header_t const *h)
+su_inline int msg_is_status(msg_header_t const *h)
{
return h->sh_class->hc_hash == msg_status_hash;
}
@@ -253,7 +253,7 @@
return 0;
}
-static inline
+su_inline
void msg_buf_used(msg_t *msg, usize_t used)
{
msg->m_size += used;
@@ -812,10 +812,10 @@
/* ====================================================================== */
/* Parsing messages */
-static inline int extract_incomplete_chunks(msg_t *, int eos);
+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);
-static 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);
@@ -823,14 +823,14 @@
char s[], isize_t slen, int copy_buffer);
static msg_header_t *error_header_parse(msg_t *msg, msg_pub_t *mo,
msg_href_t const *hr);
-static inline issize_t
+su_inline issize_t
extract_trailers(msg_t *msg, msg_pub_t *mo,
char *b, isize_t bsiz, int eos, int copy);
/** Calculate length of line ending (0, 1 or 2). @internal */
#define CRLF_TEST(b) ((b)[0] == '\r' ? ((b)[1] == '\n') + 1 : (b)[0] =='\n')
-static inline void
+su_inline void
append_parsed(msg_t *msg, msg_pub_t *mo, msg_href_t const *hr, msg_header_t *h,
int always_into_chain);
@@ -991,7 +991,7 @@
}
/* Extract header or message body */
-static inline issize_t
+su_inline issize_t
extract_next(msg_t *msg, msg_pub_t *mo, char *b, isize_t bsiz,
int eos, int copy)
{
@@ -1302,7 +1302,7 @@
return l;
}
-static inline msg_header_t **msg_chain_tail(msg_t const *msg);
+su_inline msg_header_t **msg_chain_tail(msg_t const *msg);
/** Extract a message body of @a body_len bytes.
*/
@@ -1459,7 +1459,7 @@
/** Extract incomplete chunks.
*/
-static inline
+su_inline
int extract_incomplete_chunks(msg_t *msg, int eos)
{
msg_payload_t *chunk;
@@ -1495,7 +1495,7 @@
}
/* Extract trailers */
-static inline issize_t
+su_inline issize_t
extract_trailers(msg_t *msg, msg_pub_t *mo,
char *b, isize_t bsiz, int eos, int copy)
{
@@ -1511,7 +1511,7 @@
/* Preparing (printing/encoding) a message structure for sending */
/* Internal prototypes */
-static inline size_t
+su_inline size_t
msg_header_name_e(char b[], size_t bsiz, msg_header_t const *h, int flags);
static size_t msg_header_prepare(msg_mclass_t const *, int flags,
msg_header_t *h, msg_header_t **return_next,
@@ -1731,7 +1731,7 @@
}
/** Encode header name */
-static inline
+su_inline
size_t
msg_header_name_e(char b[], size_t bsiz, msg_header_t const *h, int flags)
{
@@ -1854,7 +1854,7 @@
/* ====================================================================== */
/* Handling header chain */
-static inline void serialize_first(msg_t *msg, msg_header_t *h);
+su_inline void serialize_first(msg_t *msg, msg_header_t *h);
static msg_header_t **serialize_one(msg_t *msg, msg_header_t *h,
msg_header_t **prev);
@@ -1864,13 +1864,13 @@
return msg ? (msg_header_t **)&msg->m_chain : NULL;
}
-static inline msg_header_t **_msg_chain_head(msg_t const *msg)
+su_inline msg_header_t **_msg_chain_head(msg_t const *msg)
{
return msg ? (msg_header_t **)&msg->m_chain : NULL;
}
/** Return tail of the fragment chain */
-static inline msg_header_t **msg_chain_tail(msg_t const *msg)
+su_inline msg_header_t **msg_chain_tail(msg_t const *msg)
{
return msg ? msg->m_tail : NULL;
}
@@ -1977,7 +1977,7 @@
return 0;
}
-static inline
+su_inline
void serialize_first(msg_t *msg, msg_header_t *h)
{
if (msg_header_is_removed(h)) {
@@ -2202,7 +2202,7 @@
*
* @return The pointer to the header just removed.
*/
-static inline
+su_inline
msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h)
{
if (h) {
@@ -2477,7 +2477,7 @@
}
/** Append a parsed header object into the message structure */
-static inline void
+su_inline void
append_parsed(msg_t *msg, msg_pub_t *mo, msg_href_t const *hr, msg_header_t *h,
int always_into_chain)
{
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 May 8 15:14:10 2007
@@ -197,13 +197,13 @@
#ifdef SU_HAVE_INLINE
/** Clear encoded data from header structure. */
-static 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. */
-static 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_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 May 8 15:14:10 2007
@@ -49,7 +49,7 @@
#define MC_HASH(s, n) (msg_header_name_hash(s, NULL) % (unsigned)(n))
/** Hash header name */
-static 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/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 May 8 15:14:10 2007
@@ -154,7 +154,7 @@
issize_t msg_test_extract_body(msg_t *, msg_pub_t *,
char b[], isize_t bsiz, int eos);
-static inline
+su_inline
msg_test_t *msg_test_public(msg_t *msg)
{
return (msg_test_t *)msg_public(msg, MSG_TEST_PROTOCOL_TAG);
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 May 8 15:14:10 2007
@@ -1702,6 +1702,10 @@
usage(1);
}
+#if HAVE_OPEN_C
+ test_flags |= tst_verbatim;
+#endif
+
retval |= msg_time_test(); fflush(stdout);
retval |= addr_test(); fflush(stdout);
retval |= hash_test(); fflush(stdout);
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 May 8 15:14:10 2007
@@ -103,10 +103,10 @@
extern tag_typedef_t tsttag_header_ref;
#if HAVE_INLINE
-static inline tag_value_t
+su_inline tag_value_t
tsttag_header_v(msg_header_t const *v)
{ return (tag_value_t)v; }
-static inline tag_value_t
+su_inline tag_value_t
tsttag_header_vr(msg_header_t const **vp)
{ return (tag_value_t)vp; }
#else
@@ -132,9 +132,9 @@
extern tag_typedef_t tsttag_header_str_ref;
#if HAVE_INLINE
-static inline
+su_inline
tag_value_t tsttag_tst_v(msg_test_t const *v) { return (tag_value_t)v; }
-static 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)
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 May 8 15:14:10 2007
@@ -271,7 +271,7 @@
nea_event_queue_t *evq);
/** Assign an event view to subscriber. */
-static inline
+su_inline
void nea_sub_assign_view(nea_sub_t *s, nea_event_view_t *evv)
{
if (s->s_view != evv)
@@ -281,7 +281,7 @@
s->s_throttle = evv->evv_throttle;
}
-static 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;
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 May 8 15:14:10 2007
@@ -75,14 +75,6 @@
#include "sofia-sip/nta_stateless.h"
#include "sofia-sip/url_tag.h"
-#if !defined(random) && defined(_WIN32)
-#define random rand
-#endif
-
-#if !defined(EMSGSIZE) && defined(_WIN32)
-#define EMSGSIZE WSAEMSGSIZE
-#endif
-
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
@@ -202,30 +194,30 @@
char const *tag);
static int incoming_callback(nta_leg_t *leg, nta_incoming_t *irq, sip_t *sip);
static void incoming_free(nta_incoming_t *irq);
-static inline void incoming_cut_off(nta_incoming_t *irq);
-static inline void incoming_reclaim(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 *,
unsigned timeout);
static void incoming_queue_adjust(nta_agent_t *sa,
incoming_queue_t *queue,
unsigned timeout);
-static inline
+su_inline
nta_incoming_t *incoming_find(nta_agent_t const *agent, sip_t const *sip,
sip_via_t const *v,
nta_incoming_t **merge,
nta_incoming_t **ack);
static int incoming_reply(nta_incoming_t *irq, msg_t *msg, sip_t *sip);
-static inline int incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
+su_inline int incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport);
-static inline int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
+su_inline int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport);
-static inline int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
+su_inline int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport);
-static inline int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
+su_inline int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport);
-static inline int incoming_timestamp(nta_incoming_t *, msg_t *, sip_t *);
-static inline su_duration_t incoming_timer(nta_agent_t *, su_duration_t);
+su_inline int incoming_timestamp(nta_incoming_t *, msg_t *, sip_t *);
+su_inline su_duration_t incoming_timer(nta_agent_t *, su_duration_t);
static nta_reliable_t *reliable_mreply(nta_incoming_t *,
nta_prack_f *, nta_reliable_magic_t *,
@@ -251,15 +243,15 @@
outgoing_queue_t *queue,
unsigned timeout);
static void outgoing_free(nta_outgoing_t *orq);
-static inline void outgoing_cut_off(nta_outgoing_t *orq);
-static inline void outgoing_reclaim(nta_outgoing_t *orq);
+su_inline void outgoing_cut_off(nta_outgoing_t *orq);
+su_inline void outgoing_reclaim(nta_outgoing_t *orq);
static nta_outgoing_t *outgoing_find(nta_agent_t const *sa,
msg_t const *msg,
sip_t const *sip,
sip_via_t const *v);
static int outgoing_recv(nta_outgoing_t *orq, int status, msg_t *, sip_t *);
static void outgoing_default_recv(nta_outgoing_t *, int, msg_t *, sip_t *);
-static inline su_duration_t outgoing_timer(nta_agent_t *, su_duration_t);
+su_inline su_duration_t outgoing_timer(nta_agent_t *, su_duration_t);
static int outgoing_recv_reliable(nta_outgoing_t *orq, msg_t *msg, sip_t *sip);
/* Internal message passing */
@@ -3250,7 +3242,7 @@
nta_incoming_t*, sip_t const *);
#define HTABLE_HASH_LEG(leg) ((leg)->leg_hash)
HTABLE_BODIES_WITH(leg_htable, lht, nta_leg_t, HTABLE_HASH_LEG, size_t, hash_value_t);
-static inline
+su_inline
hash_value_t hash_istring(char const *, char const *, hash_value_t);
/**@typedef nta_request_f
@@ -3814,7 +3806,7 @@
}
/** Calculate a simple case-insensitive hash over a string */
-static inline
+su_inline
hash_value_t hash_istring(char const *s, char const *term, hash_value_t hash)
{
if (s) {
@@ -3908,7 +3900,7 @@
* @retval nonzero if matching.
* @retval zero if not matching.
*/
-static inline
+su_inline
int addr_cmp(url_t const *a, url_t const *b)
{
if (b == NULL)
@@ -4260,21 +4252,21 @@
incoming_queue_t *queue,
nta_incoming_t *irq);
-static inline int incoming_is_queued(nta_incoming_t const *irq);
-static inline void incoming_queue(incoming_queue_t *queue, nta_incoming_t *);
-static inline void incoming_remove(nta_incoming_t *irq);
-static inline void incoming_set_timer(nta_incoming_t *, unsigned interval);
-static inline void incoming_reset_timer(nta_incoming_t *);
-static inline size_t incoming_mass_destroy(nta_agent_t *, incoming_queue_t *);
+su_inline int incoming_is_queued(nta_incoming_t const *irq);
+su_inline void incoming_queue(incoming_queue_t *queue, nta_incoming_t *);
+su_inline void incoming_remove(nta_incoming_t *irq);
+su_inline void incoming_set_timer(nta_incoming_t *, unsigned interval);
+su_inline void incoming_reset_timer(nta_incoming_t *);
+su_inline size_t incoming_mass_destroy(nta_agent_t *, incoming_queue_t *);
static int incoming_set_params(nta_incoming_t *irq, tagi_t const *tags);
-static inline
+su_inline
int incoming_set_compartment(nta_incoming_t *irq, tport_t *tport, msg_t *msg,
int create_if_needed);
-static inline nta_incoming_t
+su_inline nta_incoming_t
*incoming_call_callback(nta_incoming_t *, msg_t *, sip_t *);
-static inline int incoming_final_failed(nta_incoming_t *irq, msg_t *);
+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.
@@ -4438,6 +4430,7 @@
/* Tag transaction */
if (tag)
sip_to_tag(home, irq->irq_to, tag);
+ irq->irq_tag = irq->irq_to->a_tag;
if (method != sip_method_ack) {
int *use_rport = NULL;
@@ -4617,7 +4610,7 @@
/** @internal
* Test if an incoming transaction is in a queue.
*/
-static inline
+su_inline
int incoming_is_queued(nta_incoming_t const *irq)
{
return irq && irq->irq_queue;
@@ -4629,7 +4622,7 @@
* Insert a server transaction into a queue, and sets the corresponding
* timeout at the same time.
*/
-static inline
+su_inline
void incoming_queue(incoming_queue_t *queue,
nta_incoming_t *irq)
{
@@ -4655,7 +4648,7 @@
/** @internal
* Remove an incoming transaction from a queue.
*/
-static inline
+su_inline
void incoming_remove(nta_incoming_t *irq)
{
assert(incoming_is_queued(irq));
@@ -4673,7 +4666,7 @@
irq->irq_timeout = 0;
}
-static inline
+su_inline
void incoming_set_timer(nta_incoming_t *irq, unsigned interval)
{
nta_incoming_t **rq;
@@ -4714,7 +4707,7 @@
irq->irq_agent->sa_in.re_t1 = rq;
}
-static inline
+su_inline
void incoming_reset_timer(nta_incoming_t *irq)
{
if (irq->irq_rprev) {
@@ -4742,7 +4735,7 @@
}
/** Remove references to the irq */
-static inline
+su_inline
void incoming_cut_off(nta_incoming_t *irq)
{
nta_agent_t *agent = irq->irq_agent;
@@ -4771,7 +4764,7 @@
}
/** Reclaim the memory used by irq */
-static inline
+su_inline
void incoming_reclaim(nta_incoming_t *irq)
{
su_home_t *home = irq->irq_home;
@@ -4799,7 +4792,7 @@
}
/** Queue request to be freed */
-static inline
+su_inline
void incoming_free_queue(incoming_queue_t *q, nta_incoming_t *irq)
{
incoming_cut_off(irq);
@@ -5007,10 +5000,12 @@
return NULL;
}
-static inline
-int addr_match(sip_addr_t const *a, sip_addr_t const *b)
+su_inline
+int addr_match(sip_addr_t const *a, char const *a_tag, sip_addr_t const *b)
{
- if (a->a_tag && b->a_tag)
+ if (a_tag && b->a_tag)
+ return strcasecmp(a_tag, b->a_tag) == 0;
+ else if (a->a_tag && b->a_tag)
return strcasecmp(a->a_tag, b->a_tag) == 0;
else
return
@@ -5022,7 +5017,7 @@
*
*
*/
-static inline
+su_inline
nta_incoming_t *incoming_find(nta_agent_t const *agent,
sip_t const *sip,
sip_via_t const *v,
@@ -5061,7 +5056,7 @@
if (is_uas_ack &&
irq->irq_method == sip_method_invite &&
200 <= irq->irq_status && irq->irq_status < 300 &&
- addr_match(irq->irq_to, to))
+ addr_match(irq->irq_to, irq->irq_tag, to))
*return_ack = irq;
/* RFC3261 - section 8.2.2.2 Merged Requests */
else if (return_merge && agent->sa_merge_482 &&
@@ -5077,7 +5072,7 @@
}
if (is_uas_ack) {
- if (!addr_match(irq->irq_to, to))
+ if (!addr_match(irq->irq_to, irq->irq_tag, to))
continue;
}
else if (irq->irq_tag_set || !irq->irq_tag) {
@@ -5131,8 +5126,8 @@
continue;
if (irq->irq_cseq->cs_seq != rack->ra_cseq)
continue;
- if (!addr_match(irq->irq_to, to) ||
- !addr_match(irq->irq_from, from))
+ if (!addr_match(irq->irq_to, NULL, to) ||
+ !addr_match(irq->irq_from, NULL, from))
continue;
if (!irq->irq_from->a_tag != !from->a_tag)
continue;
@@ -5146,7 +5141,7 @@
}
/** Process retransmitted requests. */
-static inline
+su_inline
int
incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
{
@@ -5179,7 +5174,7 @@
return 0;
}
-static inline
+su_inline
int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
{
nta_agent_t *agent = irq->irq_agent;
@@ -5221,7 +5216,7 @@
return 0;
}
-static inline
+su_inline
int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport)
{
@@ -5261,7 +5256,7 @@
}
/** Process merged requests */
-static inline
+su_inline
int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
{
nta_agent_t *agent = irq->irq_agent;
@@ -5302,7 +5297,7 @@
*/
/** Call callback of incoming transaction */
-static inline
+su_inline
nta_incoming_t *
incoming_call_callback(nta_incoming_t *irq, msg_t *msg, sip_t *sip)
{
@@ -5391,7 +5386,7 @@
return retval;
}
-static inline
+su_inline
int incoming_set_compartment(nta_incoming_t *irq, tport_t *tport, msg_t *msg,
int create_if_needed)
{
@@ -5846,7 +5841,7 @@
*
* Put transaction into its own queue, try later to send the response.
*/
-static inline
+su_inline
int incoming_final_failed(nta_incoming_t *irq, msg_t *msg)
{
msg_destroy(msg);
@@ -5921,7 +5916,7 @@
};
/** @internal Timer routine for the incoming request. */
-static inline
+su_inline
su_duration_t incoming_timer(nta_agent_t *sa, su_duration_t next)
{
su_duration_t now = sa->sa_millisec;
@@ -6141,7 +6136,7 @@
}
/** Mass destroy server transactions */
-static inline
+su_inline
size_t incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
{
size_t destroyed = q->q_length;
@@ -6198,12 +6193,12 @@
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);
-static inline int outgoing_is_queued(nta_outgoing_t const *orq);
-static inline void outgoing_queue(outgoing_queue_t *queue,
+su_inline int outgoing_is_queued(nta_outgoing_t const *orq);
+su_inline void outgoing_queue(outgoing_queue_t *queue,
nta_outgoing_t *orq);
-static inline void outgoing_remove(nta_outgoing_t *orq);
-static inline void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval);
-static inline void outgoing_reset_timer(nta_outgoing_t *orq);
+su_inline void outgoing_remove(nta_outgoing_t *orq);
+su_inline void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval);
+su_inline void outgoing_reset_timer(nta_outgoing_t *orq);
static size_t outgoing_timer_dk(outgoing_queue_t *q,
char const *timer,
su_duration_t now);
@@ -6234,8 +6229,8 @@
#if HAVE_SOFIA_SRESOLV
static void outgoing_resolve(nta_outgoing_t *orq);
-static inline void outgoing_cancel_resolver(nta_outgoing_t *orq);
-static inline void outgoing_destroy_resolver(nta_outgoing_t *orq);
+su_inline void outgoing_cancel_resolver(nta_outgoing_t *orq);
+su_inline void outgoing_destroy_resolver(nta_outgoing_t *orq);
static int outgoing_other_destinations(nta_outgoing_t const *orq);
static int outgoing_try_another(nta_outgoing_t *orq);
#else
@@ -6622,6 +6617,14 @@
return orq != NULL && orq != NONE ? orq->orq_delay : UINT_MAX;
}
+/** Get the branch parameter. */
+char const *nta_outgoing_branch(nta_outgoing_t const *orq)
+{
+ return orq != NULL && orq != NONE && orq->orq_branch
+ ? orq->orq_branch + strlen("branch=")
+ : NULL;
+}
+
/**Get reference to response message.
*
* Retrieve the latest incoming response message to the outgoing
@@ -6849,7 +6852,7 @@
}
if (branch && branch != NONE) {
- if (strchr(branch, '='))
+ if (strncasecmp(branch, "branch=", 7) == 0)
branch = su_strdup(home, branch);
else
branch = su_sprintf(home, "branch=%s", branch);
@@ -6866,7 +6869,10 @@
if (orq->orq_method == sip_method_ack) {
if (ack_branch != NULL && ack_branch != NONE) {
- orq->orq_branch = su_strdup(home, ack_branch);
+ if (strncasecmp(ack_branch, "branch=", 7) == 0)
+ 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) {
/*
@@ -7406,7 +7412,7 @@
/** @internal
* Test if an outgoing transaction is in a queue.
*/
-static inline
+su_inline
int outgoing_is_queued(nta_outgoing_t const *orq)
{
return orq && orq->orq_queue;
@@ -7418,7 +7424,7 @@
* Insert a client transaction into a queue and set the corresponding
* timeout at the same time.
*/
-static inline
+su_inline
void outgoing_queue(outgoing_queue_t *queue,
nta_outgoing_t *orq)
{
@@ -7444,7 +7450,7 @@
/** @internal
* Remove an outgoing transaction from a queue.
*/
-static inline
+su_inline
void outgoing_remove(nta_outgoing_t *orq)
{
assert(outgoing_is_queued(orq));
@@ -7466,7 +7472,7 @@
*
* Set the retry timer (B/D) on the outgoing request (client transaction).
*/
-static inline
+su_inline
void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval)
{
nta_outgoing_t **rq;
@@ -7509,7 +7515,7 @@
orq->orq_agent->sa_out.re_t1 = rq;
}
-static inline
+su_inline
void outgoing_reset_timer(nta_outgoing_t *orq)
{
if (orq->orq_rprev) {
@@ -7536,7 +7542,7 @@
}
/** Remove outgoing request from hash tables */
-static inline
+su_inline
void outgoing_cut_off(nta_outgoing_t *orq)
{
nta_agent_t *agent = orq->orq_agent;
@@ -7566,7 +7572,7 @@
}
/** Reclaim outgoing request */
-static inline
+su_inline
void outgoing_reclaim(nta_outgoing_t *orq)
{
if (orq->orq_request)
@@ -7581,7 +7587,7 @@
}
/** Queue request to be freed */
-static inline
+su_inline
void outgoing_free_queue(outgoing_queue_t *q, nta_outgoing_t *orq)
{
outgoing_cut_off(orq);
@@ -7640,7 +7646,7 @@
/** @internal Outgoing transaction timer routine.
*
*/
-static inline
+su_inline
su_duration_t outgoing_timer(nta_agent_t *sa, su_duration_t next)
{
su_duration_t now = sa->sa_millisec;
@@ -7985,9 +7991,7 @@
continue;
if (str0casecmp(orq->orq_from->a_tag, sip->sip_from->a_tag))
continue;
- if (orq->orq_to->a_tag && sip->sip_to->a_tag
- ? strcasecmp(orq->orq_to->a_tag, sip->sip_to->a_tag)
- : !addr_match(orq->orq_to, sip->sip_to))
+ if (!addr_match(orq->orq_to, NULL, sip->sip_to))
continue;
if (orq->orq_method == method ?
/* Don't match if request To has a tag and response has no To tag */
@@ -8779,7 +8783,7 @@
}
/** Cancel resolver query */
-static inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
+su_inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
{
struct sipdns_resolver *sr = orq->orq_resolver;
@@ -8790,7 +8794,7 @@
}
/** Destroy resolver */
-static inline void outgoing_destroy_resolver(nta_outgoing_t *orq)
+su_inline void outgoing_destroy_resolver(nta_outgoing_t *orq)
{
struct sipdns_resolver *sr = orq->orq_resolver;
@@ -9436,7 +9440,7 @@
* Check that server transaction can be used to send reliable provisional
* responses.
*/
-static inline
+su_inline
int reliable_check(nta_incoming_t *irq)
{
if (irq == NULL || irq->irq_status >= 200 || !irq->irq_agent)
@@ -10198,7 +10202,7 @@
#include <sofia-sip/nta_tport.h>
-static inline tport_t *
+su_inline tport_t *
nta_transport_(nta_agent_t *agent,
nta_incoming_t *irq,
msg_t *msg)
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 May 8 15:14:10 2007
@@ -379,6 +379,7 @@
SOFIAPUBFUN sip_method_t nta_outgoing_method(nta_outgoing_t const *orq);
SOFIAPUBFUN char const *nta_outgoing_method_name(nta_outgoing_t const *orq);
SOFIAPUBFUN uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq);
+SOFIAPUBFUN char const *nta_outgoing_branch(nta_outgoing_t const *orq);
SOFIAPUBFUN unsigned nta_outgoing_delay(nta_outgoing_t const *orq);
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 May 8 15:14:10 2007
@@ -32,19 +32,8 @@
#include "config.h"
-#include <stddef.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <assert.h>
-
#include <sofia-sip/string0.h>
-#include <sofia-sip/hostdomain.h>
-
-#if !defined(EALREADY) && defined(_WIN32)
-#define EALREADY WSAEALREADY
-#endif
+#include <sofia-sip/su.h>
typedef struct server_s server_t;
@@ -72,6 +61,13 @@
#include <sofia-sip/auth_module.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <errno.h>
+#include <assert.h>
+
#ifndef UINT32_MAX
#define UINT32_MAX (0xffffffffU)
#endif
@@ -204,9 +200,9 @@
static server_t *server_create(url_t const *url,
tag_type_t tag, tag_value_t value, ...);
void server_destroy(server_t *srv);
-static inline int server_timer_init(server_t *srv);
+su_inline int server_timer_init(server_t *srv);
static void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv);
-static inline uint32_t server_now(server_t const *srv);
+su_inline uint32_t server_now(server_t const *srv);
static void server_request(server_t *srv, tport_t *tport, msg_t *msg,
void *arg, su_time_t now);
static nth_site_t **site_get_host(nth_site_t **, char const *host, char const *port);
@@ -776,7 +772,7 @@
}
/** Initialize server timer. */
-static inline
+su_inline
int server_timer_init(server_t *srv)
{
if (0) {
@@ -804,7 +800,7 @@
}
/** Get current timestamp in milliseconds */
-static inline
+su_inline
uint32_t server_now(server_t const *srv)
{
if (srv->srv_now)
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 May 8 15:14:10 2007
@@ -415,7 +415,7 @@
nua_dialog_state_t *ds,
nua_dialog_usage_t *usage);
-static inline int nua_dialog_is_reporting(nua_dialog_state_t const *ds)
+su_inline int nua_dialog_is_reporting(nua_dialog_state_t const *ds)
{
return ds && ds->ds_reporting;
}
@@ -459,20 +459,20 @@
nua_dialog_state_t *ds,
nua_dialog_usage_t *du);
-static inline
+su_inline
int nua_dialog_is_established(nua_dialog_state_t const *ds)
{
return ds->ds_remote_tag != NULL;
}
#if 0
-static inline
+su_inline
void *nua_dialog_usage_private(nua_dialog_usage_t const *du)
{
return du ? (void *)(du + 1) : NULL;
}
-static inline
+su_inline
nua_dialog_usage_t *nua_dialog_usage_public(void const *p)
{
return p ? (nua_dialog_usage_t *)p - 1 : NULL;
@@ -494,7 +494,7 @@
nua_client_methods_t const *methods,
tag_type_t tag, tag_value_t value, ...);
-static inline
+su_inline
void *nua_private_client_request(nua_client_request_t const *cr)
{
return (void *)(cr + 1);
@@ -504,7 +504,7 @@
int nua_client_request_queue(nua_client_request_t *cr);
-static inline int nua_client_is_queued(nua_client_request_t const *cr)
+su_inline int nua_client_is_queued(nua_client_request_t const *cr)
{
return cr && cr->cr_prev;
}
@@ -513,18 +513,18 @@
int nua_client_bind(nua_client_request_t *cr, nua_dialog_usage_t *du);
-static inline int nua_client_is_bound(nua_client_request_t const *cr)
+su_inline int nua_client_is_bound(nua_client_request_t const *cr)
{
return cr && cr->cr_usage && cr->cr_usage->du_cr == cr;
}
-static inline int nua_client_is_reporting(nua_client_request_t const *cr)
+su_inline int nua_client_is_reporting(nua_client_request_t const *cr)
{
return cr && cr->cr_reporting;
}
/** Mark client request as a terminating one */
-static inline void nua_client_terminating(nua_client_request_t *cr)
+su_inline void nua_client_terminating(nua_client_request_t *cr)
{
cr->cr_terminating = 1;
}
@@ -613,13 +613,13 @@
nua_publish_server_methods; /**< PUBLISH */
/** Return true if we have not sent final response to request */
-static inline
+su_inline
int nua_server_request_is_pending(nua_server_request_t const *sr)
{
return sr && sr->sr_response.msg;
}
-static inline
+su_inline
int nua_server_request_status(nua_server_request_t const *sr)
{
return sr ? nta_incoming_status(sr->sr_irq) : 500;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/nua_session.c Tue May 8 15:14:10 2007
@@ -1072,15 +1072,17 @@
nta_outgoing_t *ack;
int status = 200;
char const *phrase = "OK", *reason = NULL;
+ char const *invite_branch;
assert(ds->ds_leg);
assert(cr->cr_orq);
msg = nta_outgoing_getrequest(cr->cr_orq);
- sip = sip_object(msg);
+ sip = sip_object(msg);
if (!msg)
return -1;
-
+ invite_branch = nta_outgoing_branch(cr->cr_orq);
+
wa = sip_authorization(sip);
pa = sip_proxy_authorization(sip);
@@ -1157,9 +1159,11 @@
if ((ack = nta_outgoing_mcreate(nh->nh_nua->nua_nta, NULL, NULL, NULL,
msg,
+ NTATAG_ACK_BRANCH(invite_branch),
SIPTAG_END(),
TAG_NEXT(tags)))) {
- nta_outgoing_destroy(ack); /* TR engine keeps this around for T2 */
+ /* TR engine keeps this around for T2 so it catches all 2XX retransmissions */
+ nta_outgoing_destroy(ack);
if (nh->nh_soa && reason && ss && ss->ss_state <= nua_callstate_ready)
nua_stack_event(nh->nh_nua, nh, NULL,
@@ -4077,7 +4081,7 @@
}
}
-static inline int
+su_inline int
session_timer_has_been_set(struct session_timer const *t)
{
return t->timer_set;
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 May 8 15:14:10 2007
@@ -937,7 +937,7 @@
return retval;
}
-static inline
+su_inline
int can_redirect(sip_contact_t const *m, sip_method_t method)
{
if (m && m->m_url->url_host) {
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 May 8 15:14:10 2007
@@ -108,7 +108,7 @@
#define nua_handle_ref(nh) nua_handle_ref_by((nh), __func__)
#define nua_handle_unref(nh) nua_handle_unref_by((nh), __func__)
-static inline nua_handle_t *nua_handle_ref_by(nua_handle_t *nh,
+su_inline nua_handle_t *nua_handle_ref_by(nua_handle_t *nh,
char const *by)
{
if (nh)
@@ -118,7 +118,7 @@
return (nua_handle_t *)su_home_ref((su_home_t *)nh);
}
-static inline int nua_handle_unref_by(nua_handle_t *nh, char const *by)
+su_inline int nua_handle_unref_by(nua_handle_t *nh, char const *by)
{
if (nh)
SU_DEBUG_0(("nua_handle_unref(%p) => "MOD_ZU" by %s\n", nh,
@@ -191,7 +191,7 @@
#define NH_IS_DEFAULT(nh) ((nh) == (nh)->nh_nua->nua_handles)
-static inline
+su_inline
int nh_is_special(nua_handle_t *nh)
{
return nh == NULL || nh->nh_special;
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_basic_call.c Tue May 8 15:14:10 2007
@@ -963,8 +963,156 @@
END();
}
+int change_uri_in_ack(CONDITION_PARAMS)
+{
+ if (!(check_handle(ep, call, nh, SIP_500_INTERNAL_SERVER_ERROR)))
+ return 0;
+
+ save_event_in_list(ctx, event, ep, call);
+
+ switch (callstate(tags)) {
+ case nua_callstate_completing:
+ ACK(ep, call, nh,
+ SIPTAG_FROM_STR("sip:anonymous at org.invalid"),
+ SIPTAG_TO_STR("sip:anonymous at net.invalid"),
+ TAG_END());
+ return 0;
+ case nua_callstate_ready:
+ return 1;
+ case nua_callstate_terminated:
+ if (call)
+ nua_handle_destroy(call->nh), call->nh = NULL;
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+/* Test changing from/to within dialog */
+int test_basic_call_5(struct context *ctx)
+{
+ BEGIN();
+
+ struct endpoint *a = &ctx->a, *b = &ctx->b;
+ struct call *a_call = a->call, *b_call = b->call;
+ struct event *e;
+ sip_t const *sip;
+
+ if (print_headings)
+ printf("TEST NUA-3.5: test changing From/To URL in ACK\n");
+
+ 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, SIPTAG_TO(b->to), TAG_END()));
+
+ TEST_1(!nua_handle_has_active_call(a_call->nh));
+ TEST_1(!nua_handle_has_call_on_hold(a_call->nh));
+
+ INVITE(a, a_call, a_call->nh,
+ TAG_IF(!ctx->proxy_tests, NUTAG_URL(b->contact->m_url)),
+ SOATAG_USER_SDP_STR(a_call->sdp),
+ NUTAG_AUTOACK(0),
+ TAG_END());
+
+ run_ab_until(ctx, -1, change_uri_in_ack, -1, accept_call);
+
+ /* Client transitions:
+ INIT -(C1)-> CALLING: nua_invite(), nua_i_state
+ CALLING -(C2)-> PROCEEDING: nua_r_invite, nua_i_state
+ PROCEEDING -(C3+C4)-> READY: nua_r_invite, nua_i_state
+ */
+ TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_state);
+ TEST(callstate(e->data->e_tags), nua_callstate_calling); /* CALLING */
+ 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); /* PROCEEDING */
+ 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_contact);
+ 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(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);
+ free_events_in_list(ctx, a->events);
+
+ TEST_1(nua_handle_has_active_call(a_call->nh));
+ TEST_1(!nua_handle_has_call_on_hold(a_call->nh));
+
+ /*
+ Server transitions:
+ INIT -(S1)-> RECEIVED: nua_i_invite, nua_i_state
+ RECEIVED -(S2a)-> EARLY: nua_respond(), nua_i_state
+ EARLY -(S3b)-> COMPLETED: nua_respond(), nua_i_state
+ COMPLETED -(S4)-> READY: nua_i_ack, nua_i_state
+ */
+ TEST_1(e = b->events->head); TEST_E(e->data->e_event, nua_i_invite);
+ TEST(e->data->e_status, 100);
+ 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(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 = e->next); TEST_E(e->data->e_event, nua_i_state);
+ 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_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);
+ free_events_in_list(ctx, b->events);
+
+ TEST_1(nua_handle_has_active_call(b_call->nh));
+ TEST_1(!nua_handle_has_call_on_hold(b_call->nh));
+
+ BYE(b, b_call, b_call->nh, TAG_END());
+
+ run_ab_until(ctx, -1, until_terminated, -1, until_terminated);
+
+ /* B transitions:
+ READY --(T2)--> TERMINATING: nua_bye()
+ TERMINATING --(T3)--> TERMINATED: nua_r_bye, nua_i_state
+ */
+ TEST_1(e = b->events->head); 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 */
+ TEST_1(!e->next);
+ free_events_in_list(ctx, b->events);
+
+ TEST_1(!nua_handle_has_active_call(b_call->nh));
+
+ /* A transitions:
+ nua_i_info
+ READY -(T1)-> TERMINATED: nua_i_bye, nua_i_state
+ */
+ TEST_1(e = a->events->head); TEST_E(e->data->e_event, nua_i_bye);
+ 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_terminated); /* TERMINATED */
+ TEST_1(!e->next);
+ free_events_in_list(ctx, a->events);
+
+ nua_handle_destroy(a_call->nh), a_call->nh = NULL;
+ nua_handle_destroy(b_call->nh), b_call->nh = NULL;
+
+ if (print_headings)
+ printf("TEST NUA-3.4: PASSED\n");
+
+ END();
+}
+
+
int test_basic_call(struct context *ctx)
{
- return test_basic_call_1(ctx) || test_basic_call_2(ctx) ||
- test_basic_call_3(ctx) || test_basic_call_4(ctx);
+ return
+ test_basic_call_1(ctx)
+ || test_basic_call_2(ctx)
+ || test_basic_call_3(ctx)
+ || test_basic_call_4(ctx)
+ || test_basic_call_5(ctx)
+ ;
}
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_nua.h Tue May 8 15:14:10 2007
@@ -297,13 +297,13 @@
sip_t const *sip,
tagi_t tags[]);
-static inline
+su_inline
void eventlist_init(struct eventlist *list)
{
list->tail = &list->head;
}
-static inline
+su_inline
void call_init(struct call *call)
{
}
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 May 8 15:14:10 2007
@@ -1115,7 +1115,7 @@
/* ---------------------------------------------------------------------- */
/* Compare two string pointers */
-static inline
+su_inline
int str0cmp(char const *a, char const *b)
{
if (a == NULL) a = "";
@@ -1124,7 +1124,7 @@
}
/* Compare two string pointers ignoring case. */
-static inline
+su_inline
int str0casecmp(char const *a, char const *b)
{
if (a == NULL) a = "";
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 May 8 15:14:10 2007
@@ -434,7 +434,7 @@
SIP_HEADER_CLASS(publication, "Publication", "", pub_params, single,
publication);
-static inline void sip_publication_update(sip_publication_t *pub);
+su_inline void sip_publication_update(sip_publication_t *pub);
issize_t sip_publication_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
@@ -491,7 +491,7 @@
return b;
}
-static inline void sip_publication_update(sip_publication_t *pub)
+su_inline void sip_publication_update(sip_publication_t *pub)
{
size_t i;
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 May 8 15:14:10 2007
@@ -105,9 +105,9 @@
SOFIAPUBVAR tag_typedef_t siptag_sip_ref;
#if SU_HAVE_INLINE
-static inline
+su_inline
tag_value_t siptag_sip_v(sip_t const *v) { return (tag_value_t)v; }
-static 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)
@@ -137,10 +137,10 @@
SOFIAPUBVAR tag_typedef_t siptag_header_ref;
#if SU_HAVE_INLINE
-static inline tag_value_t
+su_inline tag_value_t
siptag_header_v(sip_header_t const *v)
{ return (tag_value_t)v; }
-static inline tag_value_t
+su_inline tag_value_t
siptag_header_vr(sip_header_t const **vp)
{ return (tag_value_t)vp; }
#else
@@ -241,10 +241,10 @@
SOFIAPUBVAR tag_typedef_t siptag_#xxxxxx#_str_ref;
#if SU_HAVE_INLINE
-static inline tag_value_t
+su_inline tag_value_t
siptag_#xxxxxx#_v(sip_#xxxxxx#_t const *v)
{ return (tag_value_t)v; }
-static inline tag_value_t
+su_inline tag_value_t
siptag_#xxxxxx#_vr(sip_#xxxxxx#_t const **vp)
{ return (tag_value_t)vp; }
#else
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 May 8 15:14:10 2007
@@ -3288,6 +3288,10 @@
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
+
if (!test_mclass)
test_mclass = msg_mclass_clone(sip_default_mclass(), 0, 0);
@@ -3324,6 +3328,10 @@
retval |= test_utils(); fflush(stdout);
+#if HAVE_OPEN_C
+ sleep(5);
+#endif
+
return retval;
}
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 May 8 15:14:10 2007
@@ -292,7 +292,7 @@
}
-static inline
+su_inline
void nul_terminate(char *b, off_t size)
{
char *end;
@@ -305,7 +305,7 @@
*end = '\0';
}
-static inline
+su_inline
int search_msg(char **bb, char const *protocol)
{
int linelen, plen = strlen(protocol);
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 May 8 15:14:10 2007
@@ -74,7 +74,7 @@
sdp_media_t const *,
int remote);
-static inline int soa_media_is_ready(soa_session_t const *ss);
+su_inline int soa_media_is_ready(soa_session_t const *ss);
enum soa_sdp_kind {
soa_capability_sdp_kind,
@@ -1879,7 +1879,7 @@
return -1;
}
-static inline
+su_inline
int soa_media_is_ready(soa_session_t const *ss)
{
XXX;
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 May 8 15:14:10 2007
@@ -50,13 +50,24 @@
#else
#define SRESPUBFUN __declspec(dllimport)
#endif
+#elif defined(SYMBIAN) && !defined(LIBSRES_STATIC)
+ /* Open C platform */
+ #undef SRESPUBFUN
+ #if defined(IN_LIBSOFIA_SRES)
+ #define SRESPUBFUN __declspec(dllexport)
+ #else
+ #define SRESPUBFUN __declspec(dllimport)
+ #endif
#endif
/* ---------------------------------------------------------------------- */
/* Types required by Win32/64 */
-#if defined(_WIN32)
+#if defined (SYMBIAN)
+/** Socket descriptor. @since New in @VERSION_1_12_2. */
+typedef int sres_socket_t;
+#elif defined(_WIN32)
typedef SOCKET sres_socket_t;
#else
/** Socket descriptor. @since New in @VERSION_1_12_2. */
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 May 8 15:14:10 2007
@@ -44,7 +44,7 @@
#elif HAVE_INTTYPES_H
#include <inttypes.h>
#else
-#if defined(_WIN32)
+#if defined(HAVE_WIN32)
typedef _int8 int8_t;
typedef unsigned _int8 uint8_t;
typedef unsigned _int16 uint16_t;
@@ -105,7 +105,7 @@
#if HAVE_WINSOCK2_H
/* Posix send() */
-static 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() */
-static inline
+su_inline
ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
struct sockaddr *from, socklen_t *fromlen)
{
@@ -135,7 +135,7 @@
return (ssize_t)retval;
}
-static inline
+su_inline
int sres_close(sres_socket_t s)
{
return closesocket(s);
@@ -182,7 +182,7 @@
/**
* How often to recheck nameserver information (seconds).
*/
-#ifndef _WIN32
+#ifndef HAVE_WIN32
#define SRES_UPDATE_INTERVAL_SECS 5
#else
#define SRES_UPDATE_INTERVAL_SECS 180
@@ -545,7 +545,7 @@
#include <sofia-sip/su_debug.h>
-#ifdef _WIN32
+#ifdef HAVE_WIN32
#include <winreg.h>
#endif
@@ -1648,7 +1648,7 @@
return query;
}
-static inline
+su_inline
void
sres_remove_query(sres_resolver_t *res, sres_query_t *q, int all)
{
@@ -1898,7 +1898,7 @@
return retval;
}
-#if _WIN32
+#if HAVE_WIN32
/** Number of octets to read from a registry key at a time */
#define QUERY_DATALEN 1024
@@ -2082,7 +2082,7 @@
return ret;
}
-#endif /* _WIN32 */
+#endif /* HAVE_WIN32 */
/** Parse /etc/resolv.conf file.
*
@@ -2109,7 +2109,7 @@
if (f)
fclose(f);
-#if _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)
@@ -2403,7 +2403,7 @@
static
time_t sres_config_timestamp(sres_config_t const *c)
{
-#ifndef _WIN32
+#ifndef HAVE_WIN32
struct stat st;
if (stat(c->c_filename, &st) == 0)
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 May 8 15:14:10 2007
@@ -117,9 +117,9 @@
#define LOCK(cache) (su_home_mutex_lock((cache)->cache_home) == 0)
#define UNLOCK(cache) (su_home_mutex_unlock((cache)->cache_home))
-static inline
+su_inline
void _sres_cache_free_one(sres_cache_t *cache, sres_record_t *answer);
-static inline
+su_inline
void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers);
static unsigned sres_hash_key(const char *string);
@@ -374,7 +374,7 @@
/* ---------------------------------------------------------------------- */
/* Private functions */
-static inline
+su_inline
void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers)
{
int i;
@@ -390,7 +390,7 @@
su_free(cache->cache_home, answers);
}
-static inline
+su_inline
void _sres_cache_free_one(sres_cache_t *cache, sres_record_t *answer)
{
if (answer) {
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 May 8 15:14:10 2007
@@ -122,7 +122,7 @@
#if HAVE_WINSOCK2_H
/* Posix send() */
-static 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);
}
-static 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() */
-static inline
+su_inline
ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
struct sockaddr *from, socklen_t *fromlen)
{
@@ -166,7 +166,7 @@
return socket(af, socktype, protocol);
}
-static inline
+su_inline
int sres_close(sres_socket_t s)
{
return closesocket(s);
@@ -1836,9 +1836,7 @@
TEST(errno, EFAULT); errno = 0;
TEST_P(sres_query_sockaddr(res, test_answer, ctx,
sres_qtype_any, sa), NULL);
-#if defined(EAFNOSUPPORT)
TEST(errno, EAFNOSUPPORT); errno = 0;
-#endif
TEST_P(sres_cached_answers(NULL, sres_qtype_any, "example.com"), NULL);
TEST(errno, EFAULT); errno = 0;
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 May 8 15:14:10 2007
@@ -34,16 +34,19 @@
* @author Kai Vehmanen <kai.vehmanen at nokia.com>
*/
+#include <sofia-sip/stun_common.h>
+
#ifndef SU_WAIT_H
#include <sofia-sip/su_wait.h>
#endif
+
#ifndef SU_TAG_H
#include <sofia-sip/su_tag.h>
#endif
-#include "sofia-sip/stun_common.h"
#include <sofia-sip/su_localinfo.h>
+
SOFIA_BEGIN_DECLS
typedef struct stun_handle_s stun_handle_t;
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 May 8 15:14:10 2007
@@ -45,14 +45,12 @@
#include <winsock.h>
#else
#include <sys/socket.h>
-#include <netinet/tcp.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
#endif
-#include <sofia-sip/su.h>
#include <sofia-sip/su_localinfo.h>
+
SOFIA_BEGIN_DECLS
/* Define Message Types */
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 May 8 15:14:10 2007
@@ -42,9 +42,9 @@
#define SU_ROOT_MAGIC_T struct stun_magic_t
-#include "sofia-sip/stun.h"
+#include <sofia-sip/stun.h>
#include "stun_internal.h"
-#include "sofia-sip/stun_tag.h"
+#include <sofia-sip/stun_tag.h>
#include <sofia-sip/su_alloc.h>
#include <sofia-sip/su_tagarg.h>
@@ -52,19 +52,14 @@
#include <sofia-sip/su.h>
#include <sofia-sip/su_localinfo.h>
-#if HAVE_WINSOCK2_H
-#include <winsock2.h>
-#include <ws2tcpip.h>
+#if HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
#endif
#if HAVE_OPENSSL
#include <openssl/opensslv.h>
#endif
-#if !defined(ETIMEDOUT) && defined(_WIN32)
-#define ETIMEDOUT WSAETIMEDOUT
-#endif
-
/* Missing socket symbols */
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP
@@ -1611,7 +1606,7 @@
/* Return action of the request. If no request, return default value */
-static inline
+su_inline
stun_action_t get_action(stun_request_t *req)
{
stun_discovery_t *sd = NULL;
@@ -1626,7 +1621,7 @@
/* Find request from the request queue, based on TID */
-static inline
+su_inline
stun_request_t *find_request(stun_handle_t *self, void *id)
{
void *match;
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 May 8 15:14:10 2007
@@ -68,6 +68,7 @@
sofia-sip/su_config.h sofia-sip/su_md5.h \
sofia-sip/su_uniqueid.h sofia-sip/su_bm.h \
sofia-sip/tstdef.h sofia-sip/su_os_nw.h \
+ sofia-sip/string0.h \
$(OSXHEADERS)
nobase_nodist_include_sofia_HEADERS = sofia-sip/su_configure.h
@@ -86,7 +87,7 @@
su_os_nw.c \
su_taglist.c su_tag.c su_tag_io.c \
su_log.c su_global_log.c su_default_log.c su_module_debug.h \
- su_md5.c su_uniqueid.c su_bm.c $(OSXSOURCES)
+ su_md5.c su_uniqueid.c su_bm.c string0.c $(OSXSOURCES)
EXTRA_libsu_la_SOURCES = \
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 May 8 15:14:10 2007
@@ -28,9 +28,20 @@
#if HAVE_SELECT
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
#include "sofia-sip/su.h"
+#if HAVE_ALLOCA_H
#include <alloca.h>
+#endif
+
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
#include <string.h>
#include "sofia-sip/su_wait.h"
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 May 8 15:14:10 2007
@@ -83,7 +83,7 @@
#ifndef HTABLE_SCOPE
/** Default scope for hash table functions. */
-#define HTABLE_SCOPE static inline
+#define HTABLE_SCOPE su_inline
#endif
/** Prototypes for hash table
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 May 8 15:14:10 2007
@@ -84,7 +84,7 @@
#ifndef HTABLE2_SCOPE
/** Default scope for hash table functions. */
-#define HTABLE2_SCOPE static inline
+#define HTABLE2_SCOPE su_inline
#endif
/** Prototypes for hash table
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 May 8 15:14:10 2007
@@ -62,7 +62,7 @@
*/
#define RBTREE_LEFT_ROTATE(prefix, Type, left, right, parent) \
-static inline \
+su_inline \
void prefix ## _left_rotate(Type **top, Type *x) \
{ \
Type *c = right(x), *dad = parent(x); assert(c); \
@@ -90,7 +90,7 @@
*/
#define RBTREE_RIGHT_ROTATE(prefix, Type, left, right, parent) \
-static inline \
+su_inline \
void prefix ## _right_rotate(Type **top, Type *x) \
{ \
Type *c = left(x), *dad = parent(x); assert(c); \
@@ -111,7 +111,7 @@
extern int const prefix##_dummy
#define RBTREE_BALANCE_INSERT1(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK) \
-static inline \
+su_inline \
void prefix ## _balance_insert(Type **top, Type *node) \
{ \
Type *dad, *uncle, *granddad; \
@@ -127,7 +127,7 @@
* RED(node) - set node as red
*/
#define RBTREE_BALANCE_INSERT(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK) \
-static inline \
+su_inline \
void prefix ## _balance_insert(Type **top, Type *node) \
{ \
Type *dad, *uncle, *granddad; \
@@ -179,7 +179,7 @@
#define RBTREE_BALANCE_DELETE(prefix, Type, left, right, parent, \
IS_RED, SET_RED, IS_BLACK, SET_BLACK, \
COPY_COLOR) \
-static inline \
+su_inline \
void prefix##_balance_delete(Type **top, Type *node) \
{ \
Type *dad, *brother; \
@@ -586,13 +586,13 @@
/** Define prototypes for red-black tree functions. @HIDE
*
- * @param SCOPE function scope (e.g., static inline)
+ * @param SCOPE function scope (e.g., su_inline)
* @param prefix function prefix (e.g., rbtree)
* @param Type node type
*
* @par Example
* @code
- * RBTREE_PROTOS(static inline, rbtree, struct node);
+ * RBTREE_PROTOS(su_inline, rbtree, struct node);
* @endcode
*/
#define RBTREE_PROTOS(SCOPE, prefix, Type) \
@@ -607,7 +607,7 @@
/** Define bodies for red-black tree functions. @HIDE
*
- * @param SCOPE function scope (e.g., static inline)
+ * @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
@@ -638,7 +638,7 @@
* #define REMOVE(node) ((node)->left = (node)->right = (node)->parent = NULL, \
* (node)->inserted = 0)
*
- * RBTREE_BODIES(static inline, rbtree, struct node,
+ * RBTREE_BODIES(su_inline, rbtree, struct node,
* LEFT, RIGHT, PARENT,
* IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
* CMP, INSERT, REMOVE);
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/string0.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/sofia-sip/string0.h Tue May 8 15:14:10 2007
@@ -0,0 +1,145 @@
+/*
+ * This file is part of the Sofia-SIP package
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Pekka Pessi <pekka.pessi at nokia.com>
+ *
+ * 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 version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef STRING0_H
+/** Defined when <sofia-sip/string0.h> is included. */
+#define STRING0_H
+
+/**@file sofia-sip/string0.h
+ *
+ * @brief Extra string function.
+ *
+ * String comparison functions accepting NULL pointers: str0cmp(),
+ * str0ncmp(), str0casecmp(), str0ncasecmp(). Also includes span functions
+ * testing at most @a n bytes: strncspn(), strnspn().
+ */
+
+#ifndef SU_CONFIG_H
+#include <sofia-sip/su_config.h>
+#endif
+
+#include <string.h>
+
+SOFIA_BEGIN_DECLS
+
+su_inline int str0cmp(char const *a, char const *b)
+{
+ if (a == NULL) a = "";
+ if (b == NULL) b = "";
+ return strcmp(a, b);
+}
+
+su_inline int str0ncmp(char const *a, char const *b, size_t n)
+{
+ if (a == NULL) a = "";
+ if (b == NULL) b = "";
+ return strncmp(a, b, n);
+}
+
+su_inline int str0casecmp(char const *a, char const *b)
+{
+ if (a == NULL) a = "";
+ if (b == NULL) b = "";
+ return strcasecmp(a, b);
+}
+
+su_inline int str0ncasecmp(char const *a, char const *b, size_t n)
+{
+ if (a == NULL) a = "";
+ if (b == NULL) b = "";
+ return strncasecmp(a, b, n);
+}
+
+#if !SU_HAVE_INLINE
+SOFIAPUBFUN size_t strnspn(char const *s, size_t size, char const *term);
+SOFIAPUBFUN size_t strncspn(char const *s, size_t ssize, char const *reject);
+#else
+su_inline size_t strnspn(char const *s, size_t ssize, char const *term)
+{
+ size_t n;
+ size_t tsize = strlen(term);
+
+ if (tsize == 0) {
+ return 0;
+ }
+ else if (tsize == 1) {
+ char c, t = term[0];
+ for (n = 0; n < ssize && (c = s[n]) && c == t; n++)
+ ;
+ }
+ else if (tsize == 2) {
+ char c, t1 = term[0], t2 = term[1];
+ for (n = 0; n < ssize && (c = s[n]) && (c == t1 || c == t2); n++)
+ ;
+ }
+ else {
+ size_t i;
+ char c, t1 = term[0], t2 = term[1];
+ for (n = 0; n < ssize && (c = s[n]) && (c == t1 || c == t2); n++) {
+ for (i = 2; i < tsize; i++)
+ if (c == term[i])
+ return n;
+ }
+ }
+
+ return n;
+}
+
+su_inline size_t strncspn(char const *s, size_t ssize, char const *reject)
+{
+ size_t n;
+ size_t rsize = strlen(reject);
+
+ if (rsize == 0) {
+ for (n = 0; n < ssize && s[n]; n++)
+ ;
+ }
+ else if (rsize == 1) {
+ char c, rej = reject[0];
+ for (n = 0; n < ssize && (c = s[n]) && c != rej; n++)
+ ;
+ }
+ else if (rsize == 2) {
+ char c, rej1 = reject[0], rej2 = reject[1];
+ for (n = 0; n < ssize && (c = s[n]) && c != rej1 && c != rej2; n++)
+ ;
+ }
+ else {
+ size_t i;
+ char c, rej1 = reject[0], rej2 = reject[1];
+ for (n = 0; n < ssize && (c = s[n]) && c != rej1 && c != rej2; n++) {
+ for (i = 2; i < rsize; i++)
+ if (c == reject[i])
+ return n;
+ }
+ }
+
+ return n;
+}
+
+#endif
+
+SOFIA_END_DECLS
+
+#endif /* !STRING0_H */
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 May 8 15:14:10 2007
@@ -37,10 +37,10 @@
/* Includes */
#ifndef SU_CONFIG_H
-#include "sofia-sip/su_config.h"
+#include <sofia-sip/su_config.h>
#endif
#ifndef SU_TYPES_H
-#include "sofia-sip/su_types.h"
+#include <sofia-sip/su_types.h>
#endif
#ifndef SU_ERRNO_H
#include <sofia-sip/su_errno.h>
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 May 8 15:14:10 2007
@@ -21,7 +21,6 @@
* 02110-1301 USA
*
*/
-
#ifndef SU_CONFIG_H
/** Defined when <sofia-sip/su_config.h> has been included. */
#define SU_CONFIG_H
@@ -36,7 +35,9 @@
* @date Created: Thu Mar 18 19:40:51 1999 pessi
*/
-#include <sofia-sip/su_configure.h>
+#ifndef SU_CONFIGURE_H
+#include "sofia-sip/su_configure.h"
+#endif
#if defined(__GNUC__)
/* Special attributes for GNU C */
@@ -83,7 +84,7 @@
#undef SOFIAPUBVAR
#if defined(IN_LIBSOFIA_SIP_UA)
#define SOFIAPUBFUN __declspec(dllexport)
- #define SOFIAPUBVAR __declspec(dllexport)
+ #define SOFIAPUBVAR __declspec(dllexport)
#else
#define SOFIAPUBFUN __declspec(dllimport)
#define SOFIAPUBVAR __declspec(dllimport) extern
@@ -93,8 +94,29 @@
#if !defined _REENTRANT
#define _REENTRANT
#endif
+#elif defined (SYMBIAN)
+ #undef SOFIACALL
+ #define SOFIACALL __cdecl
+
+ #if defined(LIBSOFIA_SIP_UA_STATIC)
+ #else
+ #undef SOFIAPUBFUN
+ #undef SOFIAPUBVAR
+ #if defined(IN_LIBSOFIA_SIP_UA)
+ #define SOFIAPUBFUN __declspec(dllexport)
+ #define SOFIAPUBVAR __declspec(dllexport) extern
+ #else
+ #define SOFIAPUBFUN __declspec(dllimport)
+ #define SOFIAPUBVAR __declspec(dllimport)
+ #endif
+ #endif
+
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
#endif
+
#define BNF_DLL SOFIAPUBFUN
#define HTTP_DLL SOFIAPUBFUN
#define IPT_DLL SOFIAPUBFUN
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 May 8 15:14:10 2007
@@ -108,7 +108,7 @@
SU_DLL usize_t su_strlst_len(su_strlst_t const *l);
#if SU_HAVE_INLINE
-static inline
+su_inline
su_home_t *su_strlst_home(su_strlst_t *s)
{
return (su_home_t *)s;
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 May 8 15:14:10 2007
@@ -194,12 +194,12 @@
su_inline tag_value_t tag_str_vr(char const **vp) {return(tag_value_t)vp;}
#if __cplusplus
extern "C++" {
- static inline tag_value_t tag_ptr_v(void const *v)
+ su_inline tag_value_t tag_ptr_v(void const *v)
{ return (tag_value_t)v; }
- static 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; }
- static inline tag_value_t tag_str_v(char *v) { return (tag_value_t)v; }
- static inline tag_value_t tag_str_vr(char **vp) {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;}
}
#endif
su_inline tag_value_t tag_filter_v(tag_filter_f *v) {return(tag_value_t)v;}
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 May 8 15:14:10 2007
@@ -56,7 +56,7 @@
#define TAG_TYPE_OF(t) ((t) && (t)->t_tag ? (t)->t_tag : tag_null)
/** Check if the tag item is last in current list */
-static inline int t_end(tagi_t const *t)
+su_inline int t_end(tagi_t const *t)
{
tag_type_t tt = TAG_TYPE_OF(t);
@@ -65,7 +65,7 @@
return tt == tag_null || tt == tag_next;
}
-static inline tagi_t const *t_next(tagi_t const *t)
+su_inline tagi_t const *t_next(tagi_t const *t)
{
tag_type_t tt = TAG_TYPE_OF(t);
@@ -75,7 +75,7 @@
return t + 1;
}
-static inline tagi_t *t_move(tagi_t *dst, tagi_t const *src)
+su_inline tagi_t *t_move(tagi_t *dst, tagi_t const *src)
{
tag_type_t tt = TAG_TYPE_OF(src);
@@ -86,7 +86,7 @@
return dst + 1;
}
-static inline size_t t_xtra(tagi_t const *t, size_t offset)
+su_inline size_t t_xtra(tagi_t const *t, size_t offset)
{
tag_type_t tt = TAG_TYPE_OF(t);
@@ -96,7 +96,7 @@
return 0;
}
-static inline tagi_t *t_dup(tagi_t *dst, tagi_t const *src, void **bb)
+su_inline tagi_t *t_dup(tagi_t *dst, tagi_t const *src, void **bb)
{
tag_type_t tt = TAG_TYPE_OF(src);
@@ -107,7 +107,7 @@
return dst + 1;
}
-static inline tagi_t const *t_find(tag_type_t tt, tagi_t const *lst)
+su_inline tagi_t const *t_find(tag_type_t tt, tagi_t const *lst)
{
if (!tt)
return NULL;
@@ -123,7 +123,7 @@
return NULL;
}
-static inline tagi_t *t_free(tagi_t *t)
+su_inline tagi_t *t_free(tagi_t *t)
{
tag_type_t tt = TAG_TYPE_OF(t);
@@ -135,7 +135,7 @@
return t + 1;
}
-static inline size_t t_len(tagi_t const *t)
+su_inline size_t t_len(tagi_t const *t)
{
tag_type_t tt = TAG_TYPE_OF(t);
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 May 8 15:14:10 2007
@@ -68,7 +68,7 @@
SU_DLL int su_vector_is_empty(su_vector_t const *vector);
#if SU_HAVE_INLINE
-static inline
+su_inline
su_home_t *su_vector_home(su_vector_t *s)
{
return (su_home_t *)s;
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 May 8 15:14:10 2007
@@ -378,7 +378,10 @@
/** Message reference type. */
typedef su_msg_t *su_msg_r[1];
-/** Contstant reference to su_msg */
+/** Constant reference to su_msg.
+ *
+ * @note The reference is constant, but the message can be modified.
+ */
typedef su_msg_t * const su_msg_cr[1];
/** Initializer for a message reference. @HI */
@@ -424,7 +427,7 @@
SOFIAPUBFUN int su_wait_mask(su_wait_t *dst, su_socket_t s, int events);
#if !HAVE_WIN32 && (SU_HAVE_POLL || HAVE_SELECT)
-static inline
+su_inline
su_socket_t su_wait_socket(su_wait_t *wait)
{
#if SU_HAVE_KQUEUE
@@ -513,7 +516,7 @@
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_reply(su_msg_r reply, su_msg_r const msg,
+SOFIAPUBFUN int su_msg_reply(su_msg_r reply, su_msg_cr msg,
su_msg_f wakeup, isize_t size);
SOFIAPUBFUN void su_msg_destroy(su_msg_r msg);
SOFIAPUBFUN void su_msg_save(su_msg_r msg, su_msg_r msg0);
Added: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/string0.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/string0.c Tue May 8 15:14:10 2007
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the Sofia-SIP package
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Pekka Pessi <pekka.pessi at nokia.com>
+ *
+ * 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 version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**@CFILE string0.c
+ *
+ * Expand string0 functions non-inline.
+ *
+ */
+
+#include "config.h"
+
+#include <string.h>
+#include <sofia-sip/su_config.h>
+
+#undef SU_HAVE_INLINE
+#undef su_inline
+
+#define SU_HAVE_INLINE 1
+#define su_inline
+
+#include "sofia-sip/string0.h"
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 May 8 15:14:10 2007
@@ -29,8 +29,8 @@
#include "config.h"
-#include <sofia-sip/su_addrinfo.h>
#include <sofia-sip/su.h>
+#include <sofia-sip/su_addrinfo.h>
#ifndef IN_LOOPBACKNET
#define IN_LOOPBACKNET 127
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 May 8 15:14:10 2007
@@ -275,7 +275,7 @@
su_block_find_collision_size;
#endif
-static inline su_alloc_t *su_block_find(su_block_t *b, void const *p)
+su_inline su_alloc_t *su_block_find(su_block_t *b, void const *p)
{
size_t h, h0, probe;
@@ -315,7 +315,7 @@
return NULL;
}
-static inline su_alloc_t *su_block_add(su_block_t *b, void *p)
+su_inline su_alloc_t *su_block_add(su_block_t *b, void *p)
{
size_t h, probe;
@@ -337,7 +337,7 @@
return &b->sub_nodes[h];
}
-static inline int su_is_preloaded(su_block_t const *sub, char *data)
+su_inline int su_is_preloaded(su_block_t const *sub, char *data)
{
return
sub->sub_preload &&
@@ -345,7 +345,7 @@
sub->sub_preload + sub->sub_prsize > data;
}
-static inline int su_alloc_check(su_block_t const *sub, su_alloc_t const *sua)
+su_inline int su_alloc_check(su_block_t const *sub, su_alloc_t const *sua)
{
#if MEMCHECK_EXTRA
size_t size, term;
@@ -375,7 +375,7 @@
* This function returns a pointer to the allocated hash table or
* NULL if an error occurred.
*/
-static inline su_block_t *su_hash_alloc(size_t n)
+su_inline su_block_t *su_hash_alloc(size_t n)
{
su_block_t *b = calloc(1, offsetof(su_block_t, sub_nodes[n]));
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 May 8 15:14:10 2007
@@ -363,7 +363,7 @@
#if HAVE_WINSOCK2_H
#define IN6_IS_ADDR_LOOPBACK SU_IN6_IS_ADDR_LOOPBACK
-static inline int
+su_inline int
IN6_IS_ADDR_LOOPBACK(void const *ip6)
{
uint8_t const *u = ip6;
@@ -608,6 +608,8 @@
if_name, if_index));
continue;
}
+#elif defined(SIOCGIFACTIVECONF)
+/* Handled above in SIOCGIFACTIVECONF vs. SIOCGIFCONF*/
#else
#error su_localinfo() cannot determine interface status
#endif
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 May 8 15:14:10 2007
@@ -182,55 +182,55 @@
su_port_vtable_t const *sup_vtable;
} su_virtual_port_t;
-static inline
+su_inline
su_home_t *su_port_home(su_port_t const *self)
{
return (su_home_t *)self;
}
-static inline
+su_inline
void su_port_lock(su_port_t *self, char const *who)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
if (base) base->sup_vtable->su_port_lock(self, who);
}
-static inline
+su_inline
void su_port_unlock(su_port_t *self, char const *who)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
if (base) base->sup_vtable->su_port_unlock(self, who);
}
-static inline
+su_inline
void su_port_incref(su_port_t *self, char const *who)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
if (base) base->sup_vtable->su_port_incref(self, who);
}
-static inline
+su_inline
void su_port_decref(su_port_t *self, char const *who)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
if (base) base->sup_vtable->su_port_decref(self, 0, who);
}
-static inline
+su_inline
void su_port_zapref(su_port_t *self, char const *who)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
if (base) base->sup_vtable->su_port_decref(self, 1, who);
}
-static inline
+su_inline
struct _GSource *su_port_gsource(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
return base ? base->sup_vtable->su_port_gsource(self) : NULL;
}
-static inline
+su_inline
int su_port_send(su_port_t *self, su_msg_r rmsg)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -241,7 +241,7 @@
}
-static inline
+su_inline
int su_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
@@ -257,7 +257,7 @@
return -1;
}
-static inline
+su_inline
int su_port_unregister(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
@@ -272,7 +272,7 @@
return -1;
}
-static inline
+su_inline
int su_port_deregister(su_port_t *self, int i)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -282,7 +282,7 @@
return -1;
}
-static inline
+su_inline
int su_port_unregister_all(su_port_t *self,
su_root_t *root)
{
@@ -294,7 +294,7 @@
return -1;
}
-static inline
+su_inline
int su_port_eventmask(su_port_t *self, int index, int socket, int events)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -306,7 +306,7 @@
return -1;
}
-static inline
+su_inline
void su_port_run(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -314,7 +314,7 @@
base->sup_vtable->su_port_run(self);
}
-static inline
+su_inline
void su_port_break(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -322,7 +322,7 @@
base->sup_vtable->su_port_break(self);
}
-static inline
+su_inline
su_duration_t su_port_step(su_port_t *self, su_duration_t tout)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -333,14 +333,14 @@
}
-static inline
+su_inline
int su_port_own_thread(su_port_t const *self)
{
su_virtual_port_t const *base = (su_virtual_port_t *)self;
return base == NULL || base->sup_vtable->su_port_own_thread(self);
}
-static inline
+su_inline
int su_port_add_prepoll(su_port_t *self,
su_root_t *root,
su_prepoll_f *prepoll,
@@ -354,7 +354,7 @@
return -1;
}
-static inline
+su_inline
int su_port_remove_prepoll(su_port_t *self,
su_root_t *root)
{
@@ -365,7 +365,7 @@
return -1;
}
-static inline
+su_inline
su_timer_t **su_port_timers(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -375,7 +375,7 @@
return NULL;
}
-static inline
+su_inline
int su_port_multishot(su_port_t *self, int multishot)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -387,7 +387,7 @@
return -1;
}
-static inline
+su_inline
int su_port_threadsafe(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -399,7 +399,7 @@
return -1;
}
-static inline
+su_inline
int su_port_getmsgs(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
@@ -407,7 +407,7 @@
return base->sup_vtable->su_port_getmsgs(self);
}
-static inline
+su_inline
int su_port_getmsgs_from(su_port_t *self, su_port_t *cloneport)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
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 May 8 15:14:10 2007
@@ -217,7 +217,11 @@
/* init: */ NULL,
/* deinit: */ NULL,
/* mutex: */ { PTHREAD_MUTEX_INITIALIZER },
+#if HAVE_OPEN_C
+/* cv: */ { _ENeedsNormalInit, NULL },
+#else
/* cv: */ { PTHREAD_COND_INITIALIZER },
+#endif
/* retval: */ -1,
/* clone: */ SU_MSG_R_INIT,
};
@@ -451,11 +455,19 @@
{
int success;
su_msg_r m = SU_MSG_R_INIT;
+#if HAVE_OPEN_C
+ struct su_pthread_port_execute frame = {
+ { PTHREAD_MUTEX_INITIALIZER },
+ { _ENeedsNormalInit, NULL },
+ function, arg, 0
+ };
+#else
struct su_pthread_port_execute frame = {
{ PTHREAD_MUTEX_INITIALIZER },
{ PTHREAD_COND_INITIALIZER },
function, arg, 0
};
+#endif
if (su_msg_create(m, task, su_task_null,
_su_pthread_port_execute, (sizeof &frame)) < 0)
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 May 8 15:14:10 2007
@@ -908,7 +908,7 @@
assert(msg != reply);
- *msg0 = *msg;
+ *msg0 = *(su_msg_t **) msg;
*reply = NULL;
return su_msg_create(reply, su_msg_from(msg0), su_msg_to(msg0), wakeup, size);
@@ -1016,7 +1016,7 @@
*
* @return The task handle of the sender is returned.
*/
-_su_task_r su_msg_from(su_msg_r const msg)
+_su_task_r su_msg_from(su_msg_cr msg)
{
return msg[0] ? msg[0]->sum_from : NULL;
}
@@ -1033,7 +1033,7 @@
*
* @return The task handle of the recipient is returned.
*/
-_su_task_r su_msg_to(su_msg_r const msg)
+_su_task_r su_msg_to(su_msg_cr msg)
{
return msg[0] ? msg[0]->sum_to : NULL;
}
@@ -1042,7 +1042,7 @@
*
* @param msg message handle
*/
-void su_msg_remove_refs(su_msg_r const msg)
+void su_msg_remove_refs(su_msg_cr msg)
{
if (msg[0]) {
su_task_deinit(msg[0]->sum_to);
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 May 8 15:14:10 2007
@@ -560,7 +560,7 @@
if (self->sup_maxfd == 0)
su_select_port_update_maxfd(self);
- bytes = self->sup_maxfd ? FDSETSIZE(self->sup_maxfd - 1) : 0;
+ bytes = FDSETSIZE(self->sup_maxfd);
if (bytes) {
rset = memcpy(self->sup_readfds2, self->sup_readfds, bytes);
@@ -572,13 +572,15 @@
n = select(self->sup_maxfd, rset, wset, NULL, &tv);
- if (n <= 0) {
+ if (n < 0) {
SU_DEBUG_0(("su_select_port_wait_events(%p): %s (%d)\n",
(void *)self, su_strerror(su_errno()), su_errno()));
return 0;
}
+ else if (n == 0)
+ return 0;
- for (j = 1; j < self->sup_max_index; j++) {
+ for (j = 1; j <= self->sup_max_index; j++) {
struct su_select_register *ser;
su_root_magic_t *magic;
int fd;
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 May 8 15:14:10 2007
@@ -576,7 +576,7 @@
return su_strdup(home, "");
}
-static inline
+su_inline
su_strlst_t *
su_strlst_split0(su_strlst_t *l, char *str, char const *sep)
{
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 May 8 15:14:10 2007
@@ -356,7 +356,7 @@
return (tagi_t *)last;
}
-static inline
+su_inline
int t_ref_set(tag_type_t tt, void *ref, tagi_t const value[])
{
if (value == NULL)
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 May 8 15:14:10 2007
@@ -180,16 +180,16 @@
#define REMOVE(sut) ((sut)->sut_set = 0, \
(sut)->sut_left = (sut)->sut_right = (sut)->sut_parent = NULL)
-RBTREE_PROTOS(static inline, timers, su_timer_t);
+RBTREE_PROTOS(su_inline, timers, su_timer_t);
-static inline int timers_append(su_timer_t **, su_timer_t *);
-static inline void timers_remove(su_timer_t **, su_timer_t *);
-static inline su_timer_t *timers_succ(su_timer_t const *);
-static inline su_timer_t *timers_prec(su_timer_t const *);
-static inline su_timer_t *timers_first(su_timer_t const *);
-static inline su_timer_t *timers_last(su_timer_t const *);
+su_inline int timers_append(su_timer_t **, su_timer_t *);
+su_inline void timers_remove(su_timer_t **, su_timer_t *);
+su_inline su_timer_t *timers_succ(su_timer_t const *);
+su_inline su_timer_t *timers_prec(su_timer_t const *);
+su_inline su_timer_t *timers_first(su_timer_t const *);
+su_inline su_timer_t *timers_last(su_timer_t const *);
-RBTREE_BODIES(static inline, timers, su_timer_t,
+RBTREE_BODIES(su_inline, timers, su_timer_t,
LEFT, RIGHT, PARENT,
IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
CMP, INSERT, REMOVE);
@@ -198,7 +198,7 @@
*
* @retval 0 when successful (always)
*/
-static inline int
+su_inline int
su_timer_set0(su_timer_t **timers,
su_timer_t *t,
su_timer_f wakeup,
@@ -220,7 +220,7 @@
*
* @retval 0 when successful (always)
*/
-static inline int
+su_inline int
su_timer_reset0(su_timer_t **timers,
su_timer_t *t)
{
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 May 8 15:14:10 2007
@@ -73,9 +73,9 @@
#define INSERT(node) ((void)0)
#define REMOVE(node) ((node)->left = (node)->right = (node)->parent = NULL)
-RBTREE_PROTOS(static inline, redblack, Node);
+RBTREE_PROTOS(su_inline, redblack, Node);
-RBTREE_BODIES(static inline, redblack, Node, LEFT, RIGHT, PARENT,
+RBTREE_BODIES(su_inline, redblack, Node, LEFT, RIGHT, PARENT,
IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
CMP, INSERT, REMOVE);
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 May 8 15:14:10 2007
@@ -698,6 +698,9 @@
else
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
retval |= test_alloc();
retval |= test_strdupcat();
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 May 8 15:14:10 2007
@@ -59,7 +59,11 @@
char const *name = "torture_su_port";
+#if HAVE_OPEN_C
+int const N0 = SU_MBOX_SIZE > 0, N = 63, I = 64;
+#else
int const N0 = SU_MBOX_SIZE > 0, N = 128, I = 129;
+#endif
int test_sup_indices(su_port_t const *port)
{
@@ -331,6 +335,10 @@
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
+
su_init();
retval |= test_register(); fflush(stdout);
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 May 8 15:14:10 2007
@@ -89,6 +89,8 @@
unsigned rt_recv_reporter:1;
unsigned rt_reported_reporter:1;
+ unsigned rt_executed:1;
+
unsigned :0;
test_ep_at rt_ep[5];
@@ -469,11 +471,19 @@
rt->rt_sent_reporter = 1;
}
+static int set_execute_bit_and_return_3(void *void_rt)
+{
+ root_test_t *rt = void_rt;
+ rt->rt_executed = 1;
+ return 3;
+}
+
static int clone_test(root_test_t rt[1])
{
BEGIN();
su_msg_r m = SU_MSG_R_INIT;
+ int retval;
rt->rt_fail_init = 0;
rt->rt_fail_deinit = 0;
@@ -499,6 +509,15 @@
TEST_1(rt->rt_success_init);
TEST_1(!rt->rt_success_deinit);
+ retval = -1;
+ rt->rt_executed = 0;
+ TEST(su_task_execute(su_clone_task(rt->rt_clone),
+ set_execute_bit_and_return_3, rt,
+ &retval), 0);
+ TEST(retval, 3);
+ TEST_1(rt->rt_executed);
+
+
/* Make sure 3-way handshake is done as expected */
TEST(su_msg_create(m,
su_clone_task(rt->rt_clone),
@@ -513,7 +532,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 */
@@ -587,6 +606,10 @@
usage(1);
}
+#if HAVE_OPEN_C
+ rt->rt_flags |= tst_verbatim;
+#endif
+
i = 0;
do {
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 May 8 15:14:10 2007
@@ -644,6 +644,10 @@
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
+
retval |= test_assumptions();
retval |= test_stackargs(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
retval |= test_dup();
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 May 8 15:14:10 2007
@@ -534,6 +534,7 @@
TAG_END()),
0);
+ /* Check that the master transport has idle parameter */
TEST(tport_get_params(tt->tt_srv_tports,
TPTAG_IDLE_REF(idle),
TAG_END()), 1);
@@ -552,6 +553,8 @@
*rname = *myname;
+ /* Check that we cannot bind to an already used socket */
+
memset(su, 0, sulen = sizeof(su->su_sin));
s = su_socket(su->su_family = AF_INET, SOCK_STREAM, 0); TEST_1(s != -1);
TEST_1(bind(s, &su->su_sa, sulen) != -1);
@@ -565,7 +568,7 @@
before = count_tports(tt->tt_srv_tports);
- /* Bind server transports to an reserved port */
+ /* Bind server transports to an reserved port - this should fail */
TEST(tport_tbind(tt->tt_srv_tports, rname, transports,
TPTAG_SERVER(1),
TAG_END()),
@@ -573,8 +576,11 @@
after = count_tports(tt->tt_srv_tports);
+ /* Check that no new primary transports has been added by failed call */
TEST(before, after);
+ /* Add new transports to an ephemeral port with new identity */
+
for (tp = tport_primaries(tt->tt_srv_tports); tp; tp = tport_next(tp))
TEST_S(tport_name(tp)->tpn_ident, "server");
@@ -587,9 +593,10 @@
TAG_END()),
0);
- tp = tport_primaries(tt->tt_srv_tports);
-
- for (i = 0; i++ < before; tp = tport_next(tp))
+ /* Check that new transports are after old ones. */
+ for (i = 0, tp = tport_primaries(tt->tt_srv_tports);
+ i < before;
+ i++, tp = tport_next(tp))
TEST_S(tport_name(tp)->tpn_ident, "server");
for (; tp; tp = tport_next(tp))
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 May 8 15:14:10 2007
@@ -104,7 +104,7 @@
#define TP_INSERT(tp) ((void)0)
#define TP_REMOVE(tp) ((tp)->tp_left = (tp)->tp_right = (tp)->tp_dad = NULL)
-static inline int tp_cmp(tport_t const *a, tport_t const *b)
+su_inline int tp_cmp(tport_t const *a, tport_t const *b)
{
if (a == b)
return 0;
@@ -115,14 +115,14 @@
return memcmp(a->tp_addr, b->tp_addr, a->tp_addrlen);
}
-static inline int tprb_is_inserted(tport_t const *a)
+su_inline int tprb_is_inserted(tport_t const *a)
{
return a->tp_dad != 0 || a->tp_left != 0 || a->tp_right != 0;
}
-RBTREE_PROTOS(static inline, tprb, tport_t);
+RBTREE_PROTOS(su_inline, tprb, tport_t);
-RBTREE_BODIES(static 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);
@@ -280,7 +280,7 @@
}
/** Test if transport is bound */
-static inline int tport_is_bound(tport_t const *self)
+su_inline int tport_is_bound(tport_t const *self)
{
return self->tp_protoname != NULL;
}
@@ -292,12 +292,12 @@
}
/** MTU for transport */
-static inline unsigned tport_mtu(tport_t const *self)
+su_inline unsigned tport_mtu(tport_t const *self)
{
return self->tp_params->tpp_mtu;
}
-static inline
+su_inline
int tport_has_sigcomp(tport_t const *self)
{
return self->tp_name->tpn_comp != NULL;
@@ -1809,7 +1809,7 @@
return 0;
}
-static inline su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all);
+su_inline su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all);
/** Translate address and service.
*
@@ -1905,7 +1905,7 @@
return EAI_MEMORY;
}
-static inline
+su_inline
su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all)
{
su_addrinfo_t *ai;
@@ -2049,7 +2049,7 @@
return 0;
}
-static inline
+su_inline
unsigned long tport_now(void)
{
return su_now().tv_sec;
@@ -2655,7 +2655,7 @@
* @retval 2 incomplete recv, recv again
* @retval 3 STUN keepalive, ignore
*/
-static inline
+su_inline
int tport_recv_data(tport_t *self)
{
return self->tp_pri->pri_vtable->vtp_recv(self);
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 May 8 15:14:10 2007
@@ -349,13 +349,13 @@
int tport_register_type(tport_vtable_t const *vtp);
/** Test if transport is needs connect() before sending. */
-static inline int tport_is_connection_oriented(tport_t const *self)
+su_inline int tport_is_connection_oriented(tport_t const *self)
{
return self->tp_conn_orient;
}
/** Test if transport involves connection. @NEW_1_12_5 */
-static inline int tport_has_connection(tport_t const *self)
+su_inline int tport_has_connection(tport_t const *self)
{
return self->tp_has_connection;
}
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 May 8 15:14:10 2007
@@ -811,14 +811,14 @@
#if HAVE_SIGCOMP && 0
-static inline
+su_inline
int msg_is_compressed(msg_t *msg)
{
return msg &&
(msg_addrinfo(msg)->ai_flags & TP_AI_COMPRESSED) == TP_AI_COMPRESSED;
}
-static inline
+su_inline
void msg_mark_as_compressed(msg_t *msg)
{
if (msg)
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 May 8 15:14:10 2007
@@ -282,7 +282,7 @@
su_msg_destroy(thrp->thrp_rmsg);
}
-static inline void
+su_inline void
thrp_yield(threadpool_t *thrp)
{
tport_t *tp = thrp->thrp_tport->tptp_primary->pri_primary;
@@ -290,7 +290,7 @@
thrp->thrp_yield = 1;
}
-static inline void
+su_inline void
thrp_gain(threadpool_t *thrp)
{
tport_t *tp = thrp->thrp_tport->tptp_primary->pri_primary;
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 May 8 15:14:10 2007
@@ -1067,6 +1067,10 @@
else
usage(1);
}
+
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
retval |= test_quote(); fflush(stdout);
retval |= test_any(); fflush(stdout);
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 May 8 15:14:10 2007
@@ -473,7 +473,7 @@
}
}
-static inline
+su_inline
int url_type_is_opaque(enum url_type_e url_type)
{
return
@@ -497,7 +497,7 @@
}
/** Get url type */
-static inline
+su_inline
enum url_type_e url_get_type(char const *scheme, size_t len)
{
#define test_scheme(s) \
@@ -1031,7 +1031,7 @@
return xtra;
}
-static inline
+su_inline
char *copy(char *buf, char *end, char const *src)
{
#if HAVE_MEMCCPY
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 May 8 15:14:10 2007
@@ -247,7 +247,7 @@
}
/** Compare paths. */
-static inline
+su_inline
int urlmap_pathcmp(url_t const *a, url_t const *b, int *return_hostmatch)
{
int retval;
Added: freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/m4/sac-coverage.m4 Tue May 8 15:14:10 2007
@@ -0,0 +1,129 @@
+dnl =====================================================================
+dnl This file contains autoconf macros shared by Sofia modules.
+dnl
+dnl Author: Pekka Pessi <Pekka.Pessi at nokia.com>
+dnl
+dnl License:
+dnl
+dnl Copyright (c) 2001,2004 Nokia and others. All Rights Reserved.
+dnl
+dnl Please note that every macro contained in this file is copyrighted by
+dnl its respective author, unless the macro source explicitely says
+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 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 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 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
+dnl Public License when using or distributing such scripts, even though
+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 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 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 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 (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
+dnl GPL from your modified version.
+dnl
+dnl =====================================================================
+
+dnl ===================================================================
+dnl Define --enable-coverage, enable coverage in Makefile.am
+dnl ===================================================================
+
+AC_DEFUN([SAC_COVERAGE], [
+
+AC_REQUIRE([AC_PROG_CC])
+
+#
+# GCoverage
+#
+AC_ARG_ENABLE(coverage,
+[ --enable-coverage compile test-coverage [[disabled]]],
+ , enable_coverage=no)
+
+if test X$enable_coverage = Xno ; then
+:
+elif test X$GCC != Xyes ; then
+ AC_MSG_ERROR([--enable-coverage requires gcc])
+else
+ COVERAGE_FLAGS="-fprofile-arcs -ftest-coverage"
+
+dnl old_CFLAGS=$CFLAGS
+dnl CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+dnl AC_SEARCH_LIBS(__gcov_init, gcov)
+dnl CFLAGS=$old_CFLAGS
+dnl
+dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags
+dnl passed to the linker, which is a bug; -fprofile-arcs implicitly
+dnl links in -lgcov, so we do it explicitly here for the same effect
+dnl
+ AC_CHECK_LIB(gcov, __gcov_init)
+ dnl GCOV is part of GCC suite
+ GCOV=`echo $CC | sed s/gcc/gcov/g`
+ AC_DEFINE([HAVE_COVERAGE], 1,
+ [Defined when gcov is enabled to force by changing config.h])
+
+ dnl Check for lcov utility
+ AC_CHECK_PROG([LCOV], [lcov], [lcov], [false])
+ if test X$LCOV != Xfalse ; then
+ AC_MSG_CHECKING([whether $LCOV accepts --compat-libtool])
+ if $LCOV --compat-libtool --help > /dev/null 2>&1 ; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_RESULT(not supported)
+ AC_MSG_WARN([lcov option --compat-libtool is not supported])
+ AC_MSG_WARN([Update lcov to version > 1.5])
+ LCOV=false
+ fi
+ fi
+ AC_CHECK_PROG([GENHTML], [genhtml], [genhtml], [false])
+ AC_CHECK_PROG([GENPNG], [genpng], [genpng], [false])
+ if test X$LCOV != Xfalse ; then
+ AC_MSG_CHECKING([whether $GENPNG has all required modules])
+ if $GENPNG --help > /dev/null 2>&1 ; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_RESULT(not supported)
+ AC_MSG_WARN([GD.pm perl module is not installed])
+ GENPNG=false
+ fi
+ fi
+fi
+
+AM_CONDITIONAL([ENABLE_COVERAGE], test X$enable_coverage != Xno)
+AM_CONDITIONAL([HAVE_LCOV], test X$LCOV != Xfalse)
+AM_CONDITIONAL([HAVE_GENPNG], test X$GENPNG != Xfalse)
+
+AC_SUBST([GCOV])
+AC_SUBST([COVERAGE_FLAGS])
+AC_SUBST([MOSTLYCLEANFILES], "*.bb *.bbg *.da *.gcov *.gcda *.gcno")
+
+])
\ No newline at end of file
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 May 8 15:14:10 2007
@@ -123,25 +123,7 @@
AC_ARG_VAR([SOFIA_CFLAGS], [CFLAGS not used during configure])
-#
-# GCoverage
-#
-AC_ARG_ENABLE(coverage,
-[ --enable-coverage compile test-coverage [[disabled]]],
- , enable_coverage=no)
-
-if test X$enable_coverage != Xno ; then
-case "${CC-cc}" in
- *gcc*)
- AC_SUBST([SOFIA_COVERAGE], ["-fprofile-arcs -ftest-coverage"])
- ;;
- *) AC_MSG_ERROR([--enable-coverage requires gcc])
-esac
-fi
-
-AM_CONDITIONAL([ENABLE_COVERAGE], test X$enable_coverage != Xno)
-
-AC_SUBST([MOSTLYCLEANFILES], "*.bb *.bbg *.da *.gcov *.gcda *.gcno")
+SAC_COVERAGE
])
dnl ======================================================================
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 May 8 15:14:10 2007
@@ -28,6 +28,7 @@
AC_SYS_IPV6_RECVERR
AC_CHECK_HEADERS([netinet/tcp.h netinet/sctp.h],[],[],[
+#include <sys/types.h>
#include <sys/socket.h>
])
Added: freeswitch/trunk/libs/sofia-sip/open_c/autogen.cmd
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/autogen.cmd Tue May 8 15:14:10 2007
@@ -0,0 +1,33 @@
+::
+:: Prepare pristine Sofia SIP source tree for Visual C
+::
+:: NOTE: this script requires gawk - see http://unxutils.sourceforge.net
+::
+:: This file is part of the Sofia-SIP package
+::
+:: Copyright (C) 2007 Nokia Corporation.
+::
+:: Contact: Martti Mela <martti.mela at nokia.com>
+::
+:: 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 version 2.1 of
+:: the License, or (at your option) any later version.
+::
+:: This library is distributed in the hope that it will be useful, but
+:: WITHOUT ANY WARRANTY; without even the implied warranty of
+:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+:: Lesser General Public License for more details.
+::
+:: You should have received a copy of the GNU Lesser General Public
+:: License along with this library; if not, write to the Free Software
+:: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+:: 02110-1301 USA
+::
+
+ at setlocal
+ at if x%AWK%==x set AWK=mawk
+
+ at call version_files.cmd
+
+ at call build_sources.cmd
Added: freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/build_sources.cmd Tue May 8 15:14:10 2007
@@ -0,0 +1,120 @@
+::
+:: Build sources on win32 for Open C
+::
+
+ at setlocal
+ at if x%AWK%==x set AWK=mawk
+ at set CHECK=@IF errorlevel 1 GOTO failed
+
+:: Check that we really have awk
+@%AWK% "{ exit(0); }" < NUL >NUL
+ at if not errorlevel 9009 goto have_awk
+ at echo *** install %AWK% (mawk or GNU awk) into your PATH ***
+ at echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
+ at goto failed
+:have_awk
+
+ at set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk
+:: in Win32 exit 0; from gawk 3.1.3 gets converted to errorlevel 1
+:: If you have gawk 3.1.3 uncomment the following line
+:: @set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk success=-1
+ at set TAG_AWK=%AWK% -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw
+
+ at set IN=../libsofia-sip-ua/msg/test_class.h
+ at set PR=../libsofia-sip-ua/msg/test_protos.h
+ at set PT=../libsofia-sip-ua/msg/test_table.c
+
+%MSG_AWK% module=msg_test NO_MIDDLE=1 NO_LAST=1 ^
+ PR=%PR% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=msg_test prefix=msg MC_HASH_SIZE=127 multipart=msg_multipart ^
+ PT=%PT% %IN% < NUL
+%CHECK%
+
+ at set IN=../libsofia-sip-ua/msg/sofia-sip/msg_mime.h
+ at set PR=../libsofia-sip-ua/msg/sofia-sip/msg_protos.h
+ at set PR2=../libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h
+ at set PT=../libsofia-sip-ua/msg/msg_mime_table.c
+
+%MSG_AWK% module=msg NO_FIRST=1 NO_MIDDLE=1 PR=%PR% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=msg NO_FIRST=1 NO_LAST=1 PR=%PR2% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=msg_multipart tprefix=msg prefix=mp MC_HASH_SIZE=127 ^
+ PT=%PT% %IN% < NUL
+%CHECK%
+
+ at set IN=../libsofia-sip-ua/sip/sofia-sip/sip.h
+ at set PR=../libsofia-sip-ua/sip/sip_tag.c
+ at set PR2=../libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h
+ at set PR3=../libsofia-sip-ua/sip/sofia-sip/sip_protos.h
+ at set PR4=../libsofia-sip-ua/sip/sofia-sip/sip_tag.h
+ at set PR5=../libsofia-sip-ua/sip/sofia-sip/sip_extra.h
+ at set SIPEXTRA=../libsofia-sip-ua/sip/sip_extra_headers.txt
+ at set PT=../libsofia-sip-ua/sip/sip_parser_table.c
+
+%MSG_AWK% module=sip PR=%PR% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=sip PR=%PR2% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=sip PR=%PR3% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=sip PR=%PR4% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=sip PR=%PR5% TEMPLATE1=%PR2%.in TEMPLATE2=%PR3%.in TEMPLATE=%PR5%.in NO_FIRST=1 NO_LAST=1 < NUL %SIPEXTRA%
+%CHECK%
+
+%MSG_AWK% module=sip MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ^
+ FLAGFILE=../libsofia-sip-ua/sip/sip_bad_mask ^
+ PT=%PT% %IN% < NUL
+%CHECK%
+
+ at set IN=../libsofia-sip-ua/http/sofia-sip/http.h
+ at set PR=../libsofia-sip-ua/http/http_tag.c
+ at set PR2=../libsofia-sip-ua/http/sofia-sip/http_protos.h
+ at set PR3=../libsofia-sip-ua/http/sofia-sip/http_tag.h
+ at set PT=../libsofia-sip-ua/http/http_parser_table.c
+
+%MSG_AWK% module=http PR=%PR% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=http PR=%PR2% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=http PR=%PR3% %IN% < NUL
+%CHECK%
+%MSG_AWK% module=http MC_HASH_SIZE=127 PT=%PT% %IN% < NUL
+%CHECK%
+
+ at set P=../libsofia-sip-ua
+
+%TAG_AWK% NO_DLL=1 %P%/http/http_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/iptsec/auth_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/msg/msg_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/nea/nea_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 LIST=nta_tag_list %P%/nta/nta_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/nth/nth_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 LIST=nua_tag_list %P%/nua/nua_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/sdp/sdp_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/sip/sip_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 LIST=soa_tag_list %P%/soa/soa_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 LIST=stun_tag_list %P%/stun/stun_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/tport/tport_tag.c < NUL
+%CHECK%
+%TAG_AWK% NO_DLL=1 %P%/url/url_tag.c < NUL
+%CHECK%
+
+ at GOTO end
+:failed
+ at ECHO *** FAILED ***
+:end
+ at endlocal
Added: freeswitch/trunk/libs/sofia-sip/open_c/config.h.in
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/config.h.in Tue May 8 15:14:10 2007
@@ -0,0 +1,444 @@
+/* config.h. Generated by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to the random number source name. */
+/* #undef DEV_URANDOM */
+
+/* Define to 1 if you have addrinfo structure. */
+#define HAVE_ADDRINFO 1
+
+/* Define to 1 if you have the `alarm' function. */
+/* #undef HAVE_ALARM */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+/* #undef HAVE_ALLOCA */
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H 1 */
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the `clock_getcpuclockid' function. */
+/* #undef HAVE_CLOCK_GETCPUCLOCKID */
+
+/* Define to 1 if you have the `clock_gettime' function. */
+/* #undef HAVE_CLOCK_GETTIME */
+
+/* Define to 1 if you have /dev/urandom. */
+/* #undef HAVE_DEV_URANDOM */
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have epoll interface. */
+/* #undef HAVE_EPOLL */
+
+/* Define to 1 if you have the `epoll_create' function. */
+/* #undef HAVE_EPOLL_CREATE */
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have WIN32 FILETIME type and GetSystemTimeAsFileTime().
+ */
+/* #undef HAVE_FILETIME */
+
+/* Define to 1 if you have the `flock' function. */
+/* #undef HAVE_FLOCK */
+
+/* Define to 1 if you have the `freeaddrinfo' function. */
+#define HAVE_FREEADDRINFO 1
+
+/* Define to 1 if the C compiler supports __func__ */
+#define HAVE_FUNC 1
+
+/* Define to 1 if the C compiler supports __FUNCTION__ */
+#define HAVE_FUNCTION 1
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#define HAVE_GAI_STRERROR 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `getdelim' function. */
+/* #undef HAVE_GETDELIM */
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getifaddrs' function. */
+/* #undef HAVE_GETIFADDRS 1 */
+
+/* Define to 1 if you have the `getipnodebyname' function. */
+#define HAVE_GETIPNODEBYNAME 1
+
+/* Define to 1 if you have the `getline' function. */
+/* #undef HAVE_GETLINE */
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#define HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the `getpass' function. */
+#define HAVE_GETPASS 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <ifaddr.h> header file. */
+/* #undef HAVE_IFADDR_H */
+
+/* Define to 1 if you have SIOCGIFCONF */
+#define HAVE_IFCONF 1
+
+/* Define to 1 if you have SIOCGIFNUM ioctl */
+/* #undef HAVE_IFNUM */
+
+/* Define to 1 if you have ifr_ifindex in <net/if.h> */
+/* #undef HAVE_IFR_IFINDEX */
+
+/* Define to 1 if you have ifr_index in <net/if.h> */
+#define HAVE_IFR_INDEX 1
+
+/* Define to 1 if you have the `if_nameindex' function. */
+#define HAVE_IF_NAMEINDEX 1
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#define HAVE_INET_NTOP 1
+
+/* Define to 1 if you have the `inet_pton' function. */
+#define HAVE_INET_PTON 1
+
+/* Define to 1 if you have the `initstate' function. */
+#define HAVE_INITSTATE 1
+
+/* Define to 1 if you have inlining compiler */
+#define HAVE_INLINE 1
+
+/* Define to 1 if you have WIN32 INTERFACE_INFO_EX type. */
+/* #undef HAVE_INTERFACE_INFO_EX */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <iphlpapi.h> header file. */
+/* #undef HAVE_IPHLPAPI_H */
+
+/* Define to 1 if you have IPV6_RECVERR in <netinet/in6.h> */
+/* #undef HAVE_IPV6_RECVERR */
+
+/* Define to 1 if you have IP_RECVERR in <netinet/in.h> */
+/* #undef HAVE_IP_RECVERR */
+
+/* Define to 1 if you have the `kqueue' function. */
+/* #undef HAVE_KQUEUE 1 */
+
+/* Define to 1 if you use kqueue in su_port. */
+/* #undef HAVE_KQUEUE_PORT 1 */
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#define HAVE_LIBCRYPTO 1
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `ssl' library (-lssl). */
+#define HAVE_LIBSSL 1
+
+/* Define to 1 if you have the `memccpy' function. */
+#define HAVE_MEMCCPY 1
+
+/* Define to 1 if you have the `memcspn' function. */
+/* #undef HAVE_MEMCSPN */
+
+/* Define to 1 if you have the `memmem' function. */
+/* #undef HAVE_MEMMEM */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memspn' function. */
+/* #undef HAVE_MEMSPN */
+
+/* Define to 1 if you are compiling in MinGW environment */
+/* #undef HAVE_MINGW */
+
+/* Define to 1 if you have MSG_TRUNC flag */
+#define HAVE_MSG_TRUNC 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/sctp.h> header file. */
+/* #undef HAVE_NETINET_SCTP_H */
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+/* #undef HAVE_NETINET_TCP_H */
+
+/* Define to 1 if you have the <netpacket/packet.h> header file. */
+/* #undef HAVE_NETPACKET_PACKET_H */
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if you have the <net/if_types.h> header file. */
+/* #undef HAVE_NET_IF_TYPES_H 1 */
+
+/* Define to 1 if you have OpenSSL */
+#define HAVE_OPENSSL 1
+
+/* Define to 1 if you have the <openssl/tls1.h> header file. */
+#define HAVE_OPENSSL_TLS1_H 1
+
+/* Define to 1 if you have the `poll' function. */
+/* #undef HAVE_POLL 1 */
+
+/* Define to 1 if you use poll in su_port. */
+#define HAVE_POLL_PORT 1
+
+/* Define to 1 if you have /proc/net/if_inet6 control file */
+/* #undef HAVE_PROC_NET_IF_INET6 */
+
+/* Define to 1 if you have working pthread_rwlock_t implementation. A thread
+ may hold multiple concurrent read locks on rwlock - that is, successfully
+ call the pthread_rwlock_rdlock() function n times. If so, the application
+ shall ensure that the thread performs matching unlocks - that is, it calls
+ the pthread_rwlock_unlock() function n times. */
+#define HAVE_PTHREAD_RWLOCK 1
+
+/* Define to 1 if you have the `random' function. */
+#define HAVE_RANDOM 1
+
+/* Define to 1 if you have sa_len in struct sockaddr */
+/* #undef HAVE_SA_LEN */
+
+/* Define to 1 if you have SCTP */
+/* #undef HAVE_SCTP */
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have Sofia sigcomp >= 2.5 */
+/* #undef HAVE_SIGCOMP */
+
+/* Define to 1 if you have the <sigcomp.h> header file. */
+/* #undef HAVE_SIGCOMP_H */
+
+/* Define to 1 if you have the `signal' function. */
+/* #undef HAVE_SIGNAL */
+
+/* Define to 1 if you have SIGPIPE */
+/* #undef HAVE_SIGPIPE */
+
+/* Define to 1 if you have IPv6 structures and constants */
+/* #undef HAVE_SIN6 */
+
+/* Define to 1 if you have WIN32 WSAIoctl SIO_ADDRESS_LIST_QUERY. */
+/* #undef HAVE_SIO_ADDRESS_LIST_QUERY */
+
+/* Define to 1 if you have the `socketpair' function. */
+/* #undef HAVE_SOCKETPAIR */
+
+/* Define to 1 if we use NTH library */
+/* #undef HAVE_SOFIA_NTH */
+
+/* Define to 1 if we use NTLM library */
+/* #undef HAVE_SOFIA_NTLM */
+
+/* Define to 1 if you have Sofia sigcomp >= 2.5 */
+/* #undef HAVE_SOFIA_SIGCOMP */
+
+/* Define to 1 always */
+#define HAVE_SOFIA_SIP 1
+
+/* Define to 1 if we use S/MIME library */
+#define HAVE_SOFIA_SMIME 0
+
+/* Define to 1 if we use DNS library */
+#define HAVE_SOFIA_SRESOLV 1
+
+/* Define to 1 if we use STUN library */
+#define HAVE_SOFIA_STUN 1
+
+/* Define to 1 if we use SRTP */
+#define HAVE_SRTP 0
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasestr' function. */
+#define HAVE_STRCASESTR 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtoull' function. */
+/* #undef HAVE_STRTOULL */
+
+/* Define to 1 if your CC supports C99 struct initialization */
+#define HAVE_STRUCT_KEYWORDS 1
+
+/* Define to 1 if you have the <sys/epoll.h> header file. */
+/* #undef HAVE_SYS_EPOLL_H */
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#define HAVE_SYS_EVENT_H 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#define HAVE_SYS_SOCKIO_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#define HAVE_TCSETATTR 1
+
+/* Define to 1 if you have TLS */
+/* #undef HAVE_TLS */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if we use UPnP */
+#define HAVE_UPNP 0
+
+/* Define to 1 you have WIN32 */
+/* #undef HAVE_WIN32 */
+
+/* Define to 1 if you have the <windef.h> header file. */
+/* #undef HAVE_WINDEF_H */
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+/* #undef HAVE_WINSOCK2_H */
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+/* #undef HAVE_WS2TCPIP_H */
+
+/* Define to format (%lli) for long long */
+#define LLI "%lli"
+
+/* Define to format (%llu) for unsigned long long */
+#define LLU "%llu"
+
+/* Define to format (%llx) for long long hex */
+#define LLX "%llx"
+
+/* Define printf() modifier for ssize_t */
+#define MOD_ZD "%zd"
+
+/* Define printf() modifier for size_t */
+#define MOD_ZU "%zu"
+
+/* Name of package */
+#define PACKAGE "sofia-sip"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "sofia-sip"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "sofia-sip 1.12.5work"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "sofia-sip"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.12.5work"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Version number of package */
+#define VERSION "1.12.5work"
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to a at least 64-bit int type */
+#define longlong long long
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to 1 if compiling on Open C environment */
+/* #undef HAVE_OPEN_C */
\ No newline at end of file
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/bld.inf
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/bld.inf Tue May 8 15:14:10 2007
@@ -0,0 +1,40 @@
+/*
+* ==============================================================================
+* Name : bld.inf
+* Part of : Camcorder
+* Description : Camcorder application build information
+* Version :
+*
+* Copyright (c) 2003-2006 Nokia Corporation.
+* This material, including documentation and any related
+* computer programs, is protected by copyright controlled by
+* Nokia Corporation. All rights are reserved. Copying,
+* including reproducing, storing, adapting or translating, any
+* or all of this material requires the prior written consent of
+* Nokia Corporation. This material also contains confidential
+* information which may not be disclosed to others without the
+* prior written consent of Nokia Corporation.
+* ==============================================================================
+*/
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+
+PRJ_MMPFILES
+
+libsofia-sip-ua.mmp
+
+torture_su_root.mmp
+torture_su_port.mmp
+torture_su_tag.mmp
+torture_su_alloc.mmp
+torture_url.mmp
+test_msg.mmp
+torture_sip.mmp
+
+PRJ_TESTMMPFILES
+
+// End of File
\ No newline at end of file
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/libsofia-sip-ua.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/libsofia-sip-ua.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,302 @@
+// General properties
+TARGET libsofia-sip-ua.lib
+TARGETTYPE lib
+CAPABILITY ALL -TCB
+UID 0x1000008D 0xA000017E
+VENDORID 0
+OPTION CW -dialect c99 -inline on -warn nounusedarg,nounusedvar
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+MACRO IN_LIBSOFIA_SRES
+
+SOURCEPATH ..\..\libsofia-sip-ua\su
+
+SOURCE su.c
+SOURCE su_errno.c
+SOURCE su_addrinfo.c
+SOURCE su_alloc.c
+SOURCE su_alloc_lock.c
+SOURCE su_strdup.c
+SOURCE su_sprintf.c
+SOURCE su_strlst.c
+SOURCE su_vector.c
+SOURCE su_time.c
+SOURCE su_time0.c
+SOURCE su_wait.c
+SOURCE su_root.c
+SOURCE su_timer.c
+SOURCE su_port.c
+SOURCE su_base_port.c
+SOURCE su_pthread_port.c
+SOURCE su_poll_port.c
+SOURCE su_epoll_port.c
+SOURCE su_select_port.c
+SOURCE su_socket_port.c
+SOURCE su_localinfo.c
+SOURCE su_os_nw.c
+SOURCE su_taglist.c
+SOURCE su_tag.c
+SOURCE su_tag_ref.c
+SOURCE su_tag_io.c
+SOURCE su_log.c
+SOURCE su_global_log.c
+SOURCE su_default_log.c
+SOURCE su_md5.c
+SOURCE su_uniqueid.c
+SOURCE su_bm.c
+SOURCE memmem.c
+SOURCE memspn.c
+SOURCE memcspn.c
+SOURCE string0.c
+SOURCE strtoull.c
+SOURCE strcasestr.c
+SOURCE getopt.c
+SOURCE poll.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\bnf
+
+SOURCE bnf.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\features
+
+SOURCE features.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\http
+
+SOURCE http_parser.c
+SOURCE http_header.c
+SOURCE http_basic.c
+SOURCE http_extra.c
+SOURCE http_status.c
+SOURCE http_tag_class.c
+SOURCE http_tag.c
+SOURCE http_tag_ref.c
+SOURCE http_parser_table.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\ipt
+
+SOURCE base64.c
+SOURCE rc4.c
+//SOURCE string0.c
+SOURCE token64.c
+
+SOURCE ucs2.c
+SOURCE ucs4.c
+SOURCE utf8.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\iptsec
+
+SOURCE auth_client.c
+SOURCE auth_common.c
+SOURCE auth_digest.c
+SOURCE auth_module.c
+SOURCE auth_tag.c
+SOURCE auth_tag_ref.c
+SOURCE auth_plugin.c
+SOURCE auth_plugin_delayed.c
+SOURCE auth_module_sip.c
+SOURCE iptsec_debug.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\msg
+
+SOURCE msg.c
+SOURCE msg_tag.c
+SOURCE msg_mime.c
+SOURCE msg_mime_table.c
+SOURCE msg_header_copy.c
+SOURCE msg_header_make.c
+SOURCE msg_parser.c
+SOURCE msg_mclass.c
+SOURCE msg_parser_util.c
+SOURCE msg_basic.c
+SOURCE msg_generic.c
+SOURCE msg_date.c
+SOURCE msg_auth.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\nea
+
+SOURCE nea.c
+SOURCE nea_event.c
+SOURCE nea_server.c
+SOURCE nea_debug.c
+SOURCE nea_tag.c
+SOURCE nea_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\nta
+
+SOURCE nta.c
+SOURCE nta_check.c
+SOURCE nta_tag.c
+SOURCE nta_tag_ref.c
+SOURCE sl_utils_print.c
+SOURCE sl_utils_log.c
+SOURCE sl_read_payload.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\nth
+
+SOURCE nth_client.c
+SOURCE nth_server.c
+SOURCE nth_tag.c
+SOURCE nth_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\nua
+
+SOURCE nua.c
+SOURCE nua_common.c
+SOURCE nua_stack.c
+SOURCE nua_extension.c
+SOURCE nua_dialog.c
+SOURCE outbound.c
+SOURCE nua_params.c
+SOURCE nua_register.c
+SOURCE nua_registrar.c
+SOURCE nua_session.c
+SOURCE nua_options.c
+SOURCE nua_message.c
+SOURCE nua_publish.c
+SOURCE nua_subnotref.c
+SOURCE nua_notifier.c
+SOURCE nua_event_server.c
+SOURCE nua_tag.c
+SOURCE nua_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\sdp
+
+SOURCE sdp.c
+SOURCE sdp_parse.c
+SOURCE sdp_print.c
+SOURCE sdp_tag.c
+SOURCE sdp_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\sip
+
+SOURCE sip_parser.c
+SOURCE sip_header.c
+SOURCE sip_util.c
+SOURCE sip_pref_util.c
+SOURCE sip_basic.c
+SOURCE sip_extra.c
+SOURCE sip_feature.c
+SOURCE sip_mime.c
+SOURCE sip_security.c
+SOURCE sip_event.c
+SOURCE sip_prack.c
+SOURCE sip_refer.c
+SOURCE sip_session.c
+SOURCE sip_caller_prefs.c
+SOURCE sip_reason.c
+SOURCE sip_status.c
+SOURCE sip_time.c
+SOURCE sip_tag_class.c
+SOURCE sip_tag.c
+SOURCE sip_tag_ref.c
+SOURCE sip_parser_table.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\soa
+
+SOURCE soa.c
+SOURCE soa_static.c
+SOURCE soa_tag.c
+SOURCE soa_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\sresolv
+
+SOURCE sres.c
+SOURCE sres_cache.c
+SOURCE sres_blocking.c
+SOURCE sresolv.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\stun
+
+SOURCE stun.c
+SOURCE stun_common.c
+SOURCE stun_dns.c
+SOURCE stun_mini.c
+SOURCE stun_tag.c
+SOURCE stun_tag_ref.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\msg
+
+SOURCE test_class.c
+SOURCE test_table.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\tport
+
+SOURCE tport.c
+SOURCE tport_logging.c
+SOURCE tport_stub_sigcomp.c
+SOURCE tport_type_udp.c
+SOURCE tport_type_tcp.c
+SOURCE tport_type_sctp.c
+SOURCE tport_tag.c
+SOURCE tport_tag_ref.c
+SOURCE tport_type_tls.c
+SOURCE tport_tls.c
+SOURCE tport_stub_stun.c
+SOURCE tport_type_stun.c
+SOURCE tport_type_connect.c
+
+SOURCEPATH ..\..\libsofia-sip-ua\url
+
+SOURCE url.c
+SOURCE url_tag.c
+SOURCE url_tag_ref.c
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+USERINCLUDE ..\..\libsofia-sip-ua\bnf
+USERINCLUDE ..\..\libsofia-sip-ua\ipt
+USERINCLUDE ..\..\libsofia-sip-ua\iptsec
+USERINCLUDE ..\..\libsofia-sip-ua\url
+USERINCLUDE ..\..\libsofia-sip-ua\msg
+USERINCLUDE ..\..\libsofia-sip-ua\stun
+USERINCLUDE ..\..\libsofia-sip-ua\soa
+USERINCLUDE ..\..\libsofia-sip-ua\sdp
+USERINCLUDE ..\..\libsofia-sip-ua\sresolv
+USERINCLUDE ..\..\libsofia-sip-ua\http
+USERINCLUDE ..\..\libsofia-sip-ua\tport
+USERINCLUDE ..\..\libsofia-sip-ua\features
+USERINCLUDE ..\..\libsofia-sip-ua\sip
+USERINCLUDE ..\..\libsofia-sip-ua\nta
+USERINCLUDE ..\..\libsofia-sip-ua\nth
+USERINCLUDE ..\..\libsofia-sip-ua\nea
+USERINCLUDE ..\..\libsofia-sip-ua\nua
+
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua/features
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\ipt
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\iptsec
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sresolv
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\stun
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\soa
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sdp
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\http
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\tport
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sip
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nta
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nth
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nea
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nua
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\osextensions\stdapis\openssl
+
+// Library dependencies
+LIBRARY libc.lib
+LIBRARY libm.lib
+LIBRARY libpthread.lib
+LIBRARY libcrypto.lib
+LIBRARY libssl.lib
+LIBRARY euser.lib
\ No newline at end of file
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,59 @@
+// sofiatest component properties
+
+// General properties
+TARGET test_msg.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001AE3
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE test_msg_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+//EPOCSTACKSIZE 0x2000000
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+MACRO IN_LIBSOFIA_SRES
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\msg
+SOURCE test_msg.c
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+USERINCLUDE ..\..\libsofia-sip-ua\bnf
+USERINCLUDE ..\..\libsofia-sip-ua\url
+USERINCLUDE ..\..\libsofia-sip-ua\msg
+
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+SYSTEMINCLUDE \epoc32\include\libc
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY libm.lib
+LIBRARY libpthread.lib
+LIBRARY euser.lib
+
+// Sofia-SIP libs
+LIBRARY libsofia-sip-ua.lib
\ No newline at end of file
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/test_msg_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001AE3
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="test_msg";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,54 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_sip.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001BA1
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE torture_sip_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\sip
+SOURCE torture_sip.c
+
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+USERINCLUDE ..\..\libsofia-sip-ua\bnf
+USERINCLUDE ..\..\libsofia-sip-ua\msg
+USERINCLUDE ..\..\libsofia-sip-ua\url
+USERINCLUDE ..\..\libsofia-sip-ua\sip
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sip
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+LIBRARY libsofia-sip-ua.lib
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_sip_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001BA1
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_sip";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,46 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_su_alloc.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001AE7
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE torture_su_alloc_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\su
+SOURCE torture_su_alloc.c
+
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+LIBRARY libsofia-sip-ua.lib
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_alloc_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001AE7
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_su_alloc";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,48 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_su_port.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001AF1
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE torture_su_port_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\su
+SOURCE torture_su_port.c
+
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..
+//USERINCLUDE ..\..\libsofia-sip-ua\su\sofia-sip
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY libsofia-sip-ua.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_port_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001AF1
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_su_port";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,47 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_su_root.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0xA000017F
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE torture_su_root_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\su
+SOURCE torture_su_root.c
+
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY libsofia-sip-ua.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_root_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0xA000017F
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_su_root";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,47 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_su_tag.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001AE2
+VENDORID 0
+OPTION CW -dialect c99 -inline on
+
+START RESOURCE torture_su_tag_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\su
+SOURCE torture_su_tag.c
+
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+//USERINCLUDE ..\..\libsofia-sip-ua\su\sofia-sip
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+LIBRARY libsofia-sip-ua.lib
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_su_tag_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001AE2
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_su_tag";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url.mmp
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url.mmp Tue May 8 15:14:10 2007
@@ -0,0 +1,53 @@
+// sofiatest component properties
+
+// General properties
+TARGET torture_url.exe
+TARGETTYPE exe
+CAPABILITY ALL -TCB
+UID 0x100039CE 0x1F001AC2
+VENDORID 0
+
+START RESOURCE torture_url_reg.rss
+#ifdef WINSCW
+TARGETPATH \private\10003a3f\apps
+#else
+TARGETPATH \private\10003a3f\import\apps
+#endif
+END //RESOURCE
+
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
+
+// Allow global writeable static data
+EPOCALLOWDLLDATA
+
+MACRO SYMBIAN
+MACRO IN_LIBSOFIA_SIP_UA
+
+// Source files
+SOURCEPATH ..\..\libsofia-sip-ua\url
+SOURCE torture_url.c
+
+USERINCLUDE ..
+USERINCLUDE ..\..\libsofia-sip-ua\su
+USERINCLUDE ..\..\libsofia-sip-ua\bnf
+USERINCLUDE ..\..\libsofia-sip-ua\ipt
+USERINCLUDE ..\..\libsofia-sip-ua\url
+
+SYSTEMINCLUDE ..
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\ipt
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
+
+
+SYSTEMINCLUDE \Epoc32\include
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
+
+
+// Library dependencies
+STATICLIBRARY libcrt0.lib
+LIBRARY libc.lib
+LIBRARY euser.lib
+LIBRARY libpthread.lib
+LIBRARY libsofia-sip-ua.lib
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url_reg.rss
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/group/torture_url_reg.rss Tue May 8 15:14:10 2007
@@ -0,0 +1,13 @@
+#include <appinfo.rh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1F001AC2
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="torture_url";
+
+ embeddability=KAppNotEmbeddable;
+ newfile=KAppDoesNotSupportNewFile;
+ }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/sofia-sip/su_configure.h
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/sofia-sip/su_configure.h Tue May 8 15:14:10 2007
@@ -0,0 +1,140 @@
+/* libsofia-sip-ua/su/sofia-sip/su_configure.h. Generated by configure. */
+/*
+ * This file is part of the Sofia-SIP package
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Pekka Pessi <pekka.pessi at nokia.com>
+ *
+ * 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 version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef SU_CONFIGURE_H
+/** Defined when <sofia-sip/su_configure.h> has been included. */
+#define SU_CONFIGURE_H
+
+/**@file sofia-sip/su_configure.h
+ *
+ * Autoconf configuration for SU library.
+ *
+ * The file <su_configure.h> is automatically generated by autoconf.
+ *
+ * The file <su_configure.h> contains configuration information for
+ * programs using @b su library. The configuration for su library itself is
+ * in "config.h".
+ *
+ * @author Pekka Pessi <Pekka.Pessi at nokia.com>
+ *
+ * @date Created: Mon Aug 21 20:32:25 2000 ppessi
+ */
+
+/** Define as 1 if you have <stdint.h> */
+#define SU_HAVE_STDINT 1
+/** Define as 1 if you have <inttypes.h> */
+#define SU_HAVE_INTTYPES 1
+/** Define as 1 if you have <sys/types.h> */
+#define SU_HAVE_SYS_TYPES 1
+
+/** Define as 1 if you have BSD socket interface */
+#define SU_HAVE_BSDSOCK 1
+/** Define as 1 if you have pthreads library */
+#define SU_HAVE_PTHREADS 1
+/** Define as 1 if you have poll() */
+//#define SU_HAVE_POLL
+/** Define as 1 if you have kqueue() */
+//#define SU_HAVE_KQUEUE 1
+/** Define as 1 if you have IPv6 structures, macros and constants */
+//#define SU_HAVE_IN6 1
+
+/** Define as 1 if you have sa_len field in struct sockaddr */
+#define SU_HAVE_SOCKADDR_SA_LEN 1
+
+/** Define as 1 if you have struct sockaddr_storage */
+#define SU_HAVE_SOCKADDR_STORAGE 1
+
+/** Define as 1 if you have struct addrinfo. */
+#define SU_HAVE_ADDRINFO 1
+
+/** Define as 1 if you have Winsock interface */
+/* #undef SU_HAVE_WINSOCK */
+
+/** Define as 1 if you have Winsock2 interface */
+/* #undef SU_HAVE_WINSOCK2 */
+
+/** Define as 1 if you have OSX CoreFoundation interface */
+/* #undef SU_HAVE_OSX_CF_API */
+
+/** Define as 1 if you want to enable experimental features.
+ *
+ * Use --enable-experimental with ./configure
+ */
+/* #undef SU_HAVE_EXPERIMENTAL */
+
+/** Define as 1 if you have inline functions */
+#define SU_HAVE_INLINE 1
+/** Define as suitable declarator inline functions */
+#define SU_INLINE __inline
+/** Define as suitable declarator static inline functions */
+#define su_inline static __inline
+
+/** Define this as 1 if we can use tags directly from stack. */
+#define SU_HAVE_TAGSTACK 1
+
+/* These are valid only for GCC */
+
+#define SU_S64_C(i) (SU_S64_T)(i ## LL)
+#define SU_U64_C(i) (SU_U64_T)(i ## ULL)
+#define SU_S32_C(i) (SU_S32_T)(i ## L)
+#define SU_U32_C(i) (SU_U32_T)(i ## UL)
+#define SU_S16_C(i) (SU_S16_T)(i)
+#define SU_U16_C(i) (SU_U16_T)(i ## U)
+#define SU_S8_C(i) (SU_S8_T)(i)
+#define SU_U8_C(i) (SU_U8_T)(i ## U)
+
+/** Define this as ssize_t. */
+/* #undef SOFIA_SSIZE_T */
+
+/** Define this as size_t
+ (int when compatible with sofia-sip-ua 1.12.0 binaries). */
+#define SOFIA_ISIZE_T size_t /* was int */
+
+/** Maximum value of isize_t */
+#define ISIZE_MAX SIZE_MAX
+
+/** Define this as ssize_t
+ (int when compatible with sofia-sip-ua 1.12.0 binaries). */
+#define SOFIA_ISSIZE_T ssize_t
+
+/** Maximum value of issize_t */
+#define ISSIZE_MAX SSIZE_MAX
+
+/** Define this as size_t
+ (unsigned int when compatible with sofia-sip-ua 1.12.0 binaries). */
+#define SOFIA_USIZE_T size_t
+
+/** Maximum value of usize_t */
+#define USIZE_MAX SIZE_MAX
+
+/**On Solaris define this in order to get POSIX extensions. */
+/* #undef __EXTENSIONS__ */
+
+/** Define this in order to get GNU extensions. */
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
+#endif /* SU_CONFIGURE_H */
Added: freeswitch/trunk/libs/sofia-sip/open_c/version.awk
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/version.awk Tue May 8 15:14:10 2007
@@ -0,0 +1,51 @@
+#! /bin/gawk
+#
+# This script extracts the version information from configure.ac
+# and re-generates win32/config.h and
+# libsofia-sip-ua/features/sofia_sip_features.h
+#
+# --------------------------------------------------------------------
+#
+# This file is part of the Sofia-SIP package
+#
+# Copyright (C) 2005 Nokia Corporation.
+#
+# Contact: Pekka Pessi <pekka.pessi at nokia.com>
+#
+# 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 version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+# --------------------------------------------------------------------
+#
+# Contributor(s): Pekka.Pessi at nokia.com.
+#
+# Created: Wed Jan 25 15:57:10 2006 ppessi
+#
+
+BEGIN { IN=1; OUT=0; }
+
+IN && /^AC_INIT/ { version=$2; gsub(/[\]\[)]/, "", version); }
+
+OUT && /@[A-Z_]+@/ {
+ gsub(/@PACKAGE_VERSION@/, version);
+ gsub(/@PACKAGE_BUGREPORT@/, "sofia-sip-devel at lists.sourceforge.net");
+ gsub(/@PACKAGE_NAME@/, "sofia-sip");
+ gsub(/@PACKAGE@/, "sofia-sip");
+ gsub(/@PACKAGE_STRING@/, "sofia-sip");
+ gsub(/@PACKAGE_TARNAME@/, "sofia-sip");
+}
+
+OUT { print; }
+
Added: freeswitch/trunk/libs/sofia-sip/open_c/version_files.cmd
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/open_c/version_files.cmd Tue May 8 15:14:10 2007
@@ -0,0 +1,46 @@
+::
+:: Generate files usually generated by autoconf
+::
+:: NOTE: this script requires gawk - see http://unxutils.sourceforge.net
+::
+:: This file is part of the Sofia-SIP package
+::
+:: Copyright (C) 2005 Nokia Corporation.
+::
+:: Contact: Pekka Pessi <pekka.pessi at nokia.com>
+::
+:: 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 version 2.1 of
+:: the License, or (at your option) any later version.
+::
+:: This library is distributed in the hope that it will be useful, but
+:: WITHOUT ANY WARRANTY; without even the implied warranty of
+:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+:: Lesser General Public License for more details.
+::
+:: You should have received a copy of the GNU Lesser General Public
+:: License along with this library; if not, write to the Free Software
+:: Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+:: 02110-1301 USA
+::
+
+ at setlocal
+ at if x%AWK%==x set AWK=mawk
+ at set VERSION=%AWK% -v BINMODE="rw" -f version.awk
+ at set AC=..\configure.ac
+
+:: Check that we really have awk
+@%AWK% "{ exit(0); }" < NUL >NUL
+ at if not errorlevel 9009 goto have_awk
+ at echo *** install %AWK% (mawk or GNU awk) into your PATH ***
+ at echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
+ at goto end
+:have_awk
+
+for %%f in (config.h ..\libsofia-sip-ua\features\sofia-sip\sofia_features.h) ^
+do %VERSION% %AC% OUT=1 %%f.in > %%f
+ at if errorlevel 1 goto echo *** version_files failed ***
+
+:end
+ at endlocal
Added: freeswitch/trunk/libs/sofia-sip/rules/lcov.am
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/rules/lcov.am Tue May 8 15:14:10 2007
@@ -0,0 +1,65 @@
+#
+# Generate lcov output
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi at nokia.com>
+# Licensed under LGPL. See file COPYING.
+#
+
+# Scripts
+LCOV_UNCOVERED=${top_srcdir}/scripts/uncovered
+LCOV_REPORT=${top_srcdir}/scripts/lcov-report
+
+# Report directory
+lcovdir=${top_builddir}/lcov
+
+# Options
+GENHTML_OPTIONS = --show-details --legend
+if HAVE_GENPNG
+GENHTML_OPTIONS += --frames
+endif
+
+# Fancy shell command that expands to directory relative to top_builddir
+expand_subdir=`pwd|sed "s'\`cd ${top_builddir};pwd\`''"`
+
+#
+# Generate pretty coverage report (unless it has been already done)
+#
+lcov:
+ @-test -r ${lcovdir}${expand_subdir}/lcov.info \
+ || make lcov-report
+
+# Generate pretty coverage report based on current coverage data
+lcov-report:
+ sub=${expand_subdir} odir=${lcovdir}$$sub ; \
+ rm -rf $$odir ; mkdir -p $$odir && \
+ ${LCOV_REPORT} ${GENHTML_OPTIONS} \
+ --title "${PACKAGE_NAME}-${PACKAGE_VERSION}$$sub" \
+ --srcdir=${srcdir} -o $$odir
+
+# Rerun checks before generating report
+lcov-rerun: clean-lcov
+ $(MAKE) $(AM_MAKEFLAGS) check
+ $(MAKE) $(AM_MAKEFLAGS) lcov-report
+
+# Show all uncovered lines as errors
+uncovered:
+ ${LCOV_UNCOVERED} --lcov-dir=${lcovdir} --srcdir=${srcdir}
+
+# Run check in current dir and show all uncovered lines as errors
+covcheck:
+ -find . -name "*.gcda" | xargs rm -rf
+ $(MAKE) $(AM_MAKEFLAGS) check
+ ${LCOV_UNCOVERED} --lcov-dir=${lcovdir} --srcdir=${srcdir}
+
+clean-local::
+ -rm -rf ${lcovdir}`pwd|sed "s'\`cd ${top_builddir};pwd\`''"`
+ find . -name "*.gcda" | xargs rm -f || true
+
+clean-lcov:
+ -rm -rf ${lcovdir}`pwd|sed "s'\`cd ${top_builddir};pwd\`''"`
+ find . -name "*.gcda" | xargs rm -f || true
+
+PHONY += lcov lcov-report lcov-rerun clean-lcov covcheck uncovered
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 May 8 15:14:10 2007
@@ -1,19 +1,13 @@
# Recursive Makefile targets
# --------------------------
-if ENABLE_COVERAGE
-COVERAGE_RECURSIVE = coverage-recursive
-coverage: $(COVERAGE_RECURSIVE)
-endif
-
all-recursive: built-sources-recursive
built-sources: built-sources-recursive
clean-built-sources: clean-built-sources-recursive
valcheck: valcheck-recursive
SOFIA_RECURSIVE = \
- valcheck-recursive \
- $(COVERAGE_RECURSIVE)
+ valcheck-recursive
SOFIA_DIST_RECURSIVE = \
built-sources-recursive \
Modified: freeswitch/trunk/libs/sofia-sip/rules/sofia.am
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/rules/sofia.am (original)
+++ freeswitch/trunk/libs/sofia-sip/rules/sofia.am Tue May 8 15:14:10 2007
@@ -3,6 +3,8 @@
AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) $(openssl_CFLAGS)
+SOFIA_COVERAGE = $(COVERAGE_FLAGS)
+
# Use with --enable-ndebug
if NDEBUG
AM_CFLAGS += -DNDEBUG
@@ -26,11 +28,6 @@
_tag.c_tag_ref.c:
$(AWK) -f $(TAG_AWK) NODLL=1 $(TAG_DLL_FLAGS) REF=$@ $<
-if ENABLE_COVERAGE
-coverage:
- @$(top_srcdir)/scripts/coverage $(COVERAGE_FLAGS) $(COVERAGE_INPUT)
-endif
-
../bnf/libbnf.la ../http/libhttp.la ../ipt/libipt.la ../iptsec/libiptsec.la \
../msg/libmsg.la ../nea/libnea.la ../nta/libnta.la ../nth/libnth.la \
../nua/libnua.la ../sdp/libsdp.la ../sip/libsip.la ../soa/libsoa.la \
@@ -59,4 +56,11 @@
-I$(srcdir)/../url -I../url \
-I$(srcdir)/../su -I../su
-include $(top_srcdir)/rules/valcheck.am
\ No newline at end of file
+PHONY = built-sources clean-built-sources
+
+include $(top_srcdir)/rules/valcheck.am
+
+if HAVE_LCOV
+include $(top_srcdir)/rules/lcov.am
+endif
+
Added: freeswitch/trunk/libs/sofia-sip/scripts/lcov-report
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/scripts/lcov-report Tue May 8 15:14:10 2007
@@ -0,0 +1,71 @@
+#! /bin/sh
+#
+# Generate coverage report
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi at nokia.com>
+# Licensed under LGPL. See file COPYING.
+#
+
+usage()
+{
+ test X$1 == X0 || exec >&2
+ cat << EOF
+usage: coverage-report OPTIONS
+where OPTIONS are
+ --srcdir=DIR
+ --output-directory=DIR | -o DIR
+ --title=TITLE
+ --prefix=PREFIX
+ --show-details
+ --legend
+ --frames
+EOF
+ exit $1;
+}
+
+GENHTML_OPTIONS= o=
+
+while test $# -gt 0;
+do
+ case $1 in
+ --srcdir | -s )
+ test -z "$2" && usage 1; shift; srcdir=$1; shift; ;;
+ --srcdir=* )
+ srcdir=${1#--srcdir=}; shift ;;
+ --output-directory | --output_directory | -o )
+ test -z "$2" && usage 1; shift; o=$1; shift; ;;
+ --output-directory=* | --output_directory=* )
+ o=${1#--output?directory=}; shift ;;
+ --prefix=* | --title=* | --show-details | --legend | --frames )
+ GENHTML_OPTIONS="${GENHTML_OPTIONS} $1" ; shift ;;
+ --prefix | --title )
+ test -z "$2" && usage 1; GENHTML_OPTIONS="${GENHTML_OPTIONS} $1 $2" ; shift ; shift ;;
+ --help | '-?' | -h ) usage 0 ;;
+ - ) shift; break ;;
+ -* ) usage 1; ;;
+ * ) break ;;
+ esac
+done
+
+info=${o:=.}/lcov.info geninfo=${o}/genhtml.info
+rm -f ${info} ${info}
+
+case ${GENHTML_OPTIONS} in *--prefix* ) ;; *)
+ GENHTML_OPTIONS="${GENHTML_OPTIONS} --prefix=`cd ${srcdir:=.} && pwd`"
+esac
+
+lcov --compat-libtool --directory . --capture --output-file ${info} &&
+{
+ # remove system includes with with inlined functions
+ lcov -l ${info} | grep -v "`cd ${srcdir:-.} && pwd`"
+ # remove source files in builddir
+ test ${srcdir:-.} = . || lcov -l ${info} | grep "`pwd`"
+ # remove test programs
+ lcov -l ${info} | grep "/test\|/torture\|_test[.][ch][+xp]*$"
+} |
+cut -d: -f1 |
+xargs lcov -r ${info} > ${geninfo}
+genhtml ${GENHTML_OPTIONS} --output-directory $o ${geninfo}
Added: freeswitch/trunk/libs/sofia-sip/scripts/uncovered
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/sofia-sip/scripts/uncovered Tue May 8 15:14:10 2007
@@ -0,0 +1,122 @@
+#! /bin/sh
+#
+# show uncovered lines as errors
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi at nokia.com>
+# Licensed under LGPL. See file COPYING.
+#
+
+usage()
+{
+ test X$1 == X0 || exec >&2
+ cat <<EOF
+usage: uncovered OPTIONS
+where OPTIONS are
+ --srcdir=DIR specify source directory
+ --lcov-dir=DIR | -l DIR specify directory for lcov.info files
+EOF
+ exit $1;
+}
+
+GENHTML_OPTIONS= o= ldir=
+
+while test $# -gt 0;
+do
+ case $1 in
+ --lcov-dir | -l ) test -z "$2" && usage 1; shift; ldir=$1; shift; ;;
+ --lcov-dir=* ) ldir=${1#--ldir=}; shift ;;
+ --srcdir | -s )
+ test -z "$2" && usage 1; shift; srcdir=$1; shift; ;;
+ --srcdir=* )
+ srcdir=${1#--srcdir=}; shift ;;
+ --help | '-?' | -h ) usage 0 ;;
+ - ) shift; break ;;
+ -* ) usage 1; ;;
+ * ) break ;;
+ esac
+done
+
+cwd=`pwd`
+
+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
+ test -d ${ldir} &&
+ find ${ldir} -name lcov.info |
+ while read s
+ do
+ find $cwd -type f -not -newer $s | xargs lcov -q -e $s
+ done
+
+ lcov -q -c -d . --compat-libtool
+} > ${info}
+
+test -e ${info} || exit 1
+
+{
+ # 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$"
+} |
+cut -d: -f1 |
+xargs lcov -q -r ${info} > ${geninfo} &&
+cd ${tdir} &&
+genhtml -q --prefix=$cwd/ --output-directory . ${geninfo} &&
+find . -name '*.gcov.html' |
+xargs perl -e '
+while (<>) {
+ if (m:<pre[^>]*>:) { $pre=1; }
+ if ($pre && m:</pre[^>]*>:) {
+ $pre=0;
+ if ($uncovered) {
+ print $uncovered;
+ $uncovered = "";
+ }
+ }
+ if ($pre) {
+ s/<[^>]+>//g;
+
+ s/</</g; s/>/>/g; s/"/\"/g; s/&/&/g;
+
+ if (m/^ *\d+ *[1-9]\d* :/) {
+ if ($uncovered) {
+ print $uncovered;
+ $uncovered = "";
+ }
+ }
+ else {
+ if ($uncovered) {
+ if (m/^[^:]+: [{]/) { # Hack: show line number if line starts with {
+ s/^ +(\d+)[^:]+:/$1:/;
+ }
+ else {
+ s/^ +(\d+)[^:]+:/sprintf("%*s", 1 + length($1), " ")/e;
+ }
+ $uncovered .= $f . ":" . $_;
+ }
+ elsif (m/^ *\d+ *0 :/) {
+ for ($f = $ARGV) {
+ s:^[.]'$cwd/'::o;
+ s:[.]gcov[.]html$::;
+ }
+ s/^ +(\d+)[^:]+:/$1:/;
+ $uncovered = $f . ":" . $_;
+ }
+ }
+ }
+}
+' /dev/null
+
+rc=$?
+cd /
+rm -rf $tdir
+exit $rc
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 May 8 15:14:10 2007
@@ -21,7 +21,9 @@
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.aliases
- at INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.rfc
+# @INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.rfc
+# Only @RFC3263 is used now
+ALIASES += RFC3263="<a href=\"http://www.faqs.org/rfcs/rfc3263.html\">RFC 3263</a>"
FILE_PATTERNS = *.h *.c
More information about the Freeswitch-svn
mailing list