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)
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 \
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)
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
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.
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])
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)
+2007-04-25 Kai Vehmanen <kai.vehmanen@nokia.com>
+
+ * libsofia-sip-ua interface v4 frozen (5:0:5) for the 1.12.6 release
+
2007-02-09 Kai Vehmanen <kai.vehmanen@nokia.com>
* libsofia-sip-ua interface v4 frozen (4:0:4) for the 1.12.5 release
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 =
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
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)
alpha, alpha, alpha, sep, 0, sep, mtok, 0, /* xyz{|}~ */
};
+#if 0 /* This escaped lab */
#define BM(c, m00, m32, m64, m96) \
((c < 64) \
{
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
issize_t n;
int canonize = 0;
+ if (src == NULL)
+ return -1;
+
n = span_canonic_ip4_address(src, &canonize);
if (n == 0)
return -1;
}
/** 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;
}
/** Return length of valid IP6 address */
-static inline
+su_inline
int span_canonic_ip6_address(char const *host,
int *return_canonize,
char *hexparts[9])
*
* @retval Length of canonized IP6 address.
*/
-static inline
+su_inline
int canonize_ip6_address(char *host, char *hexparts[9])
{
char *dst, *hex, *ip4 = NULL;
}
/** Return length of a valid domain label */
-static inline
+su_inline
size_t span_domain_label(char const *label)
{
/* domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum */
}
/** 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;
}
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;
}
if (s[len] == '\0' && inet_pton(AF_INET, s, addr) == 1)
return (void)(*return_addrlen = 4), len;
- else
- return 0;
}
return 0;
{
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;
}
/** 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;
}
/** 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))
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)
}
/** 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')
}
/** 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))
}
/** 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))
}
/** 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))
}
/** 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)))
}
/** 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))
}
/** 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;
* @endcode
*/
-static inline
+su_inline
void http_te_update(http_te_t *te)
{
te->te_q = msg_header_find_param(te->te_common, "q");
*
* @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;
*
* @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;
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)
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
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
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 \
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.
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;
/* ====================================================================== */
/* 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. */
}
/** 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;
#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.
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
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@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;
* @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');
}
/* 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)
{
#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);
}
/** 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[])
/* ---------------------------------------------------------------------- */
/* 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;
}
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);
/** 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;
}
return 0;
}
-static inline
+su_inline
void msg_buf_used(msg_t *msg, usize_t used)
{
msg->m_size += used;
/* ====================================================================== */
/* 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);
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);
}
/* 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)
{
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.
*/
/** Extract incomplete chunks.
*/
-static inline
+su_inline
int extract_incomplete_chunks(msg_t *msg, int eos)
{
msg_payload_t *chunk;
}
/* 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)
{
/* 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,
}
/** 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)
{
/* ====================================================================== */
/* 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);
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;
}
return 0;
}
-static inline
+su_inline
void serialize_first(msg_t *msg, msg_header_t *h)
{
if (msg_header_is_removed(h)) {
*
* @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) {
}
/** 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)
{
#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) {
#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;
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);
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);
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
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)
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)
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;
#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>
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 *,
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 */
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
}
/** 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) {
* @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)
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.
/* 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;
/** @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;
* 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)
{
/** @internal
* Remove an incoming transaction from a queue.
*/
-static inline
+su_inline
void incoming_remove(nta_incoming_t *irq)
{
assert(incoming_is_queued(irq));
irq->irq_timeout = 0;
}
-static inline
+su_inline
void incoming_set_timer(nta_incoming_t *irq, unsigned interval)
{
nta_incoming_t **rq;
irq->irq_agent->sa_in.re_t1 = rq;
}
-static inline
+su_inline
void incoming_reset_timer(nta_incoming_t *irq)
{
if (irq->irq_rprev) {
}
/** Remove references to the irq */
-static inline
+su_inline
void incoming_cut_off(nta_incoming_t *irq)
{
nta_agent_t *agent = irq->irq_agent;
}
/** Reclaim the memory used by irq */
-static inline
+su_inline
void incoming_reclaim(nta_incoming_t *irq)
{
su_home_t *home = irq->irq_home;
}
/** 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);
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
*
*
*/
-static inline
+su_inline
nta_incoming_t *incoming_find(nta_agent_t const *agent,
sip_t const *sip,
sip_via_t const *v,
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 &&
}
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) {
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;
}
/** Process retransmitted requests. */
-static inline
+su_inline
int
incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
{
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;
return 0;
}
-static inline
+su_inline
int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
tport_t *tport)
{
}
/** 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;
*/
/** 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)
{
return retval;
}
-static inline
+su_inline
int incoming_set_compartment(nta_incoming_t *irq, tport_t *tport, msg_t *msg,
int create_if_needed)
{
*
* 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);
};
/** @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;
}
/** 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;
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);
#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
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
}
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);
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) {
/*
/** @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;
* 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)
{
/** @internal
* Remove an outgoing transaction from a queue.
*/
-static inline
+su_inline
void outgoing_remove(nta_outgoing_t *orq)
{
assert(outgoing_is_queued(orq));
*
* 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;
orq->orq_agent->sa_out.re_t1 = rq;
}
-static inline
+su_inline
void outgoing_reset_timer(nta_outgoing_t *orq)
{
if (orq->orq_rprev) {
}
/** 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;
}
/** Reclaim outgoing request */
-static inline
+su_inline
void outgoing_reclaim(nta_outgoing_t *orq)
{
if (orq->orq_request)
}
/** 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);
/** @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;
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 */
}
/** 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;
}
/** 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;
* 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)
#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)
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);
#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;
#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
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);
}
/** Initialize server timer. */
-static inline
+su_inline
int server_timer_init(server_t *srv)
{
if (0) {
}
/** Get current timestamp in milliseconds */
-static inline
+su_inline
uint32_t server_now(server_t const *srv)
{
if (srv->srv_now)
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;
}
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;
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);
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;
}
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;
}
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;
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);
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,
}
}
-static inline int
+su_inline int
session_timer_has_been_set(struct session_timer const *t)
{
return t->timer_set;
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) {
#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)
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,
#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;
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@org.invalid"),
+ SIPTAG_TO_STR("sip:anonymous@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)
+ ;
}
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)
{
}
/* ---------------------------------------------------------------------- */
/* Compare two string pointers */
-static inline
+su_inline
int str0cmp(char const *a, char const *b)
{
if (a == NULL) a = "";
}
/* Compare two string pointers ignoring case. */
-static inline
+su_inline
int str0casecmp(char const *a, char const *b)
{
if (a == NULL) a = "";
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)
{
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;
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)
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
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
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
+
if (!test_mclass)
test_mclass = msg_mclass_clone(sip_default_mclass(), 0, 0);
retval |= test_utils(); fflush(stdout);
+#if HAVE_OPEN_C
+ sleep(5);
+#endif
+
return retval;
}
}
-static inline
+su_inline
void nul_terminate(char *b, off_t size)
{
char *end;
*end = '\0';
}
-static inline
+su_inline
int search_msg(char **bb, char const *protocol)
{
int linelen, plen = strlen(protocol);
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,
return -1;
}
-static inline
+su_inline
int soa_media_is_ready(soa_session_t const *ss)
{
XXX;
#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. */
#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;
#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)
}
/* 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)
{
return (ssize_t)retval;
}
-static inline
+su_inline
int sres_close(sres_socket_t s)
{
return closesocket(s);
/**
* 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
#include <sofia-sip/su_debug.h>
-#ifdef _WIN32
+#ifdef HAVE_WIN32
#include <winreg.h>
#endif
return query;
}
-static inline
+su_inline
void
sres_remove_query(sres_resolver_t *res, sres_query_t *q, int all)
{
return retval;
}
-#if _WIN32
+#if HAVE_WIN32
/** Number of octets to read from a registry key at a time */
#define QUERY_DATALEN 1024
return ret;
}
-#endif /* _WIN32 */
+#endif /* HAVE_WIN32 */
/** Parse /etc/resolv.conf file.
*
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)
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)
#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);
/* ---------------------------------------------------------------------- */
/* Private functions */
-static inline
+su_inline
void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers)
{
int i;
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) {
#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)
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)
{
}
/* 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)
{
return socket(af, socktype, protocol);
}
-static inline
+su_inline
int sres_close(sres_socket_t s)
{
return closesocket(s);
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;
* @author Kai Vehmanen <kai.vehmanen@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;
#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 */
#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>
#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
/* 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;
/* 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;
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
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 = \
#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"
#ifndef HTABLE_SCOPE
/** Default scope for hash table functions. */
-#define HTABLE_SCOPE static inline
+#define HTABLE_SCOPE su_inline
#endif
/** Prototypes for hash table
#ifndef HTABLE2_SCOPE
/** Default scope for hash table functions. */
-#define HTABLE2_SCOPE static inline
+#define HTABLE2_SCOPE su_inline
#endif
/** Prototypes for hash table
*/
#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); \
*/
#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); \
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; \
* 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; \
#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; \
/** 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) \
/** 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
* #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);
/* 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>
* 02110-1301 USA
*
*/
-
#ifndef SU_CONFIG_H
/** Defined when <sofia-sip/su_config.h> has been included. */
#define SU_CONFIG_H
* @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 */
#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
#endif
#endif
+ #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
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;
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;}
#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);
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);
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);
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);
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);
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;
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);
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);
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;
/** 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 */
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
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);
#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
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;
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;
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 &&
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;
* 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]));
#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;
if_name, if_index));
continue;
}
+#elif defined(SIOCGIFACTIVECONF)
+/* Handled above in SIOCGIFACTIVECONF vs. SIOCGIFCONF*/
#else
#error su_localinfo() cannot determine interface status
#endif
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;
}
-static inline
+su_inline
int su_port_register(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
return -1;
}
-static inline
+su_inline
int su_port_unregister(su_port_t *self,
su_root_t *root,
su_wait_t *wait,
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;
return -1;
}
-static inline
+su_inline
int su_port_unregister_all(su_port_t *self,
su_root_t *root)
{
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;
return -1;
}
-static inline
+su_inline
void su_port_run(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
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;
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;
}
-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,
return -1;
}
-static inline
+su_inline
int su_port_remove_prepoll(su_port_t *self,
su_root_t *root)
{
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;
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;
return -1;
}
-static inline
+su_inline
int su_port_threadsafe(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
return -1;
}
-static inline
+su_inline
int su_port_getmsgs(su_port_t *self)
{
su_virtual_port_t *base = (su_virtual_port_t *)self;
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;
/* 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,
};
{
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)
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);
*
* @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;
}
*
* @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;
}
*
* @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);
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);
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;
return su_strdup(home, "");
}
-static inline
+su_inline
su_strlst_t *
su_strlst_split0(su_strlst_t *l, char *str, char const *sep)
{
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)
#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);
*
* @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,
*
* @retval 0 when successful (always)
*/
-static inline int
+su_inline int
su_timer_reset0(su_timer_t **timers,
su_timer_t *t)
{
#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);
else
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
retval |= test_alloc();
retval |= test_strdupcat();
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)
{
usage(1);
}
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
+
su_init();
retval |= test_register(); fflush(stdout);
unsigned rt_recv_reporter:1;
unsigned rt_reported_reporter:1;
+ unsigned rt_executed:1;
+
unsigned :0;
test_ep_at rt_ep[5];
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;
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),
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 */
usage(1);
}
+#if HAVE_OPEN_C
+ rt->rt_flags |= tst_verbatim;
+#endif
+
i = 0;
do {
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();
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);
*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);
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()),
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");
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))
#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;
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);
}
/** 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;
}
}
/** 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;
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.
*
return EAI_MEMORY;
}
-static inline
+su_inline
su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all)
{
su_addrinfo_t *ai;
return 0;
}
-static inline
+su_inline
unsigned long tport_now(void)
{
return su_now().tv_sec;
* @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);
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;
}
#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)
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;
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;
else
usage(1);
}
+
+#if HAVE_OPEN_C
+ tstflags |= tst_verbatim;
+#endif
retval |= test_quote(); fflush(stdout);
retval |= test_any(); fflush(stdout);
}
}
-static inline
+su_inline
int url_type_is_opaque(enum url_type_e url_type)
{
return
}
/** Get url type */
-static inline
+su_inline
enum url_type_e url_get_type(char const *scheme, size_t len)
{
#define test_scheme(s) \
return xtra;
}
-static inline
+su_inline
char *copy(char *buf, char *end, char const *src)
{
#if HAVE_MEMCCPY
}
/** Compare paths. */
-static inline
+su_inline
int urlmap_pathcmp(url_t const *a, url_t const *b, int *return_hostmatch)
{
int retval;
--- /dev/null
+dnl =====================================================================
+dnl This file contains autoconf macros shared by Sofia modules.
+dnl
+dnl Author: Pekka Pessi <Pekka.Pessi@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
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 ======================================================================
AC_SYS_IPV6_RECVERR
AC_CHECK_HEADERS([netinet/tcp.h netinet/sctp.h],[],[],[
+#include <sys/types.h>
#include <sys/socket.h>
])
--- /dev/null
+::
+:: 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@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
+::
+
+@setlocal
+@if x%AWK%==x set AWK=mawk
+
+@call version_files.cmd
+
+@call build_sources.cmd
--- /dev/null
+::
+:: Build sources on win32 for Open C
+::
+
+@setlocal
+@if x%AWK%==x set AWK=mawk
+@set CHECK=@IF errorlevel 1 GOTO failed
+
+:: Check that we really have awk
+@%AWK% "{ exit(0); }" < NUL >NUL
+@if not errorlevel 9009 goto have_awk
+@echo *** install %AWK% (mawk or GNU awk) into your PATH ***
+@echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
+@goto failed
+:have_awk
+
+@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
+@set TAG_AWK=%AWK% -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw
+
+@set IN=../libsofia-sip-ua/msg/test_class.h
+@set PR=../libsofia-sip-ua/msg/test_protos.h
+@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%
+
+@set IN=../libsofia-sip-ua/msg/sofia-sip/msg_mime.h
+@set PR=../libsofia-sip-ua/msg/sofia-sip/msg_protos.h
+@set PR2=../libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h
+@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%
+
+@set IN=../libsofia-sip-ua/sip/sofia-sip/sip.h
+@set PR=../libsofia-sip-ua/sip/sip_tag.c
+@set PR2=../libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h
+@set PR3=../libsofia-sip-ua/sip/sofia-sip/sip_protos.h
+@set PR4=../libsofia-sip-ua/sip/sofia-sip/sip_tag.h
+@set PR5=../libsofia-sip-ua/sip/sofia-sip/sip_extra.h
+@set SIPEXTRA=../libsofia-sip-ua/sip/sip_extra_headers.txt
+@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%
+
+@set IN=../libsofia-sip-ua/http/sofia-sip/http.h
+@set PR=../libsofia-sip-ua/http/http_tag.c
+@set PR2=../libsofia-sip-ua/http/sofia-sip/http_protos.h
+@set PR3=../libsofia-sip-ua/http/sofia-sip/http_tag.h
+@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%
+
+@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%
+
+@GOTO end
+:failed
+@ECHO *** FAILED ***
+:end
+@endlocal
--- /dev/null
+/* config.h. Generated by configure. */\r
+/* config.h.in. Generated from configure.ac by autoheader. */\r
+\r
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP\r
+ systems. This function is required for `alloca.c' support on those systems.\r
+ */\r
+/* #undef CRAY_STACKSEG_END */\r
+\r
+/* Define to 1 if using `alloca.c'. */\r
+/* #undef C_ALLOCA */\r
+\r
+/* Define to the random number source name. */\r
+/* #undef DEV_URANDOM */\r
+\r
+/* Define to 1 if you have addrinfo structure. */\r
+#define HAVE_ADDRINFO 1\r
+\r
+/* Define to 1 if you have the `alarm' function. */\r
+/* #undef HAVE_ALARM */\r
+\r
+/* Define to 1 if you have `alloca', as a function or macro. */\r
+/* #undef HAVE_ALLOCA */\r
+\r
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).\r
+ */\r
+/* #undef HAVE_ALLOCA_H 1 */\r
+\r
+/* Define to 1 if you have the <arpa/inet.h> header file. */\r
+#define HAVE_ARPA_INET_H 1\r
+\r
+/* Define to 1 if you have the `clock_getcpuclockid' function. */\r
+/* #undef HAVE_CLOCK_GETCPUCLOCKID */\r
+\r
+/* Define to 1 if you have the `clock_gettime' function. */\r
+/* #undef HAVE_CLOCK_GETTIME */\r
+\r
+/* Define to 1 if you have /dev/urandom. */\r
+/* #undef HAVE_DEV_URANDOM */\r
+\r
+/* Define to 1 if you have the <dirent.h> header file. */\r
+#define HAVE_DIRENT_H 1\r
+\r
+/* Define to 1 if you have the <dlfcn.h> header file. */\r
+#define HAVE_DLFCN_H 1\r
+\r
+/* Define to 1 if you have epoll interface. */\r
+/* #undef HAVE_EPOLL */\r
+\r
+/* Define to 1 if you have the `epoll_create' function. */\r
+/* #undef HAVE_EPOLL_CREATE */\r
+\r
+/* Define to 1 if you have the <fcntl.h> header file. */\r
+#define HAVE_FCNTL_H 1\r
+\r
+/* Define to 1 if you have WIN32 FILETIME type and GetSystemTimeAsFileTime().\r
+ */\r
+/* #undef HAVE_FILETIME */\r
+\r
+/* Define to 1 if you have the `flock' function. */\r
+/* #undef HAVE_FLOCK */\r
+\r
+/* Define to 1 if you have the `freeaddrinfo' function. */\r
+#define HAVE_FREEADDRINFO 1\r
+\r
+/* Define to 1 if the C compiler supports __func__ */\r
+#define HAVE_FUNC 1\r
+\r
+/* Define to 1 if the C compiler supports __FUNCTION__ */\r
+#define HAVE_FUNCTION 1\r
+\r
+/* Define to 1 if you have the `gai_strerror' function. */\r
+#define HAVE_GAI_STRERROR 1\r
+\r
+/* Define to 1 if you have the `getaddrinfo' function. */\r
+#define HAVE_GETADDRINFO 1\r
+\r
+/* Define to 1 if you have the `getdelim' function. */\r
+/* #undef HAVE_GETDELIM */\r
+\r
+/* Define to 1 if you have the `gethostbyname' function. */\r
+#define HAVE_GETHOSTBYNAME 1\r
+\r
+/* Define to 1 if you have the `gethostname' function. */\r
+#define HAVE_GETHOSTNAME 1\r
+\r
+/* Define to 1 if you have the `getifaddrs' function. */\r
+/* #undef HAVE_GETIFADDRS 1 */\r
+\r
+/* Define to 1 if you have the `getipnodebyname' function. */\r
+#define HAVE_GETIPNODEBYNAME 1\r
+\r
+/* Define to 1 if you have the `getline' function. */\r
+/* #undef HAVE_GETLINE */\r
+\r
+/* Define to 1 if you have the `getnameinfo' function. */\r
+#define HAVE_GETNAMEINFO 1\r
+\r
+/* Define to 1 if you have the `getpass' function. */\r
+#define HAVE_GETPASS 1\r
+\r
+/* Define to 1 if you have the `gettimeofday' function. */\r
+#define HAVE_GETTIMEOFDAY 1\r
+\r
+/* Define to 1 if you have the <ifaddr.h> header file. */\r
+/* #undef HAVE_IFADDR_H */\r
+\r
+/* Define to 1 if you have SIOCGIFCONF */\r
+#define HAVE_IFCONF 1\r
+\r
+/* Define to 1 if you have SIOCGIFNUM ioctl */\r
+/* #undef HAVE_IFNUM */\r
+\r
+/* Define to 1 if you have ifr_ifindex in <net/if.h> */\r
+/* #undef HAVE_IFR_IFINDEX */\r
+\r
+/* Define to 1 if you have ifr_index in <net/if.h> */\r
+#define HAVE_IFR_INDEX 1\r
+\r
+/* Define to 1 if you have the `if_nameindex' function. */\r
+#define HAVE_IF_NAMEINDEX 1\r
+\r
+/* Define to 1 if you have the `inet_ntop' function. */\r
+#define HAVE_INET_NTOP 1\r
+\r
+/* Define to 1 if you have the `inet_pton' function. */\r
+#define HAVE_INET_PTON 1\r
+\r
+/* Define to 1 if you have the `initstate' function. */\r
+#define HAVE_INITSTATE 1\r
+\r
+/* Define to 1 if you have inlining compiler */\r
+#define HAVE_INLINE 1\r
+\r
+/* Define to 1 if you have WIN32 INTERFACE_INFO_EX type. */\r
+/* #undef HAVE_INTERFACE_INFO_EX */\r
+\r
+/* Define to 1 if you have the <inttypes.h> header file. */\r
+#define HAVE_INTTYPES_H 1\r
+\r
+/* Define to 1 if you have the <iphlpapi.h> header file. */\r
+/* #undef HAVE_IPHLPAPI_H */\r
+\r
+/* Define to 1 if you have IPV6_RECVERR in <netinet/in6.h> */\r
+/* #undef HAVE_IPV6_RECVERR */\r
+\r
+/* Define to 1 if you have IP_RECVERR in <netinet/in.h> */\r
+/* #undef HAVE_IP_RECVERR */\r
+\r
+/* Define to 1 if you have the `kqueue' function. */\r
+/* #undef HAVE_KQUEUE 1 */\r
+\r
+/* Define to 1 if you use kqueue in su_port. */\r
+/* #undef HAVE_KQUEUE_PORT 1 */\r
+\r
+/* Define to 1 if you have the `crypto' library (-lcrypto). */\r
+#define HAVE_LIBCRYPTO 1\r
+\r
+/* Define to 1 if you have the `pthread' library (-lpthread). */\r
+#define HAVE_LIBPTHREAD 1\r
+\r
+/* Define to 1 if you have the `socket' library (-lsocket). */\r
+/* #undef HAVE_LIBSOCKET */\r
+\r
+/* Define to 1 if you have the `ssl' library (-lssl). */\r
+#define HAVE_LIBSSL 1\r
+\r
+/* Define to 1 if you have the `memccpy' function. */\r
+#define HAVE_MEMCCPY 1\r
+\r
+/* Define to 1 if you have the `memcspn' function. */\r
+/* #undef HAVE_MEMCSPN */\r
+\r
+/* Define to 1 if you have the `memmem' function. */\r
+/* #undef HAVE_MEMMEM */\r
+\r
+/* Define to 1 if you have the <memory.h> header file. */\r
+#define HAVE_MEMORY_H 1\r
+\r
+/* Define to 1 if you have the `memspn' function. */\r
+/* #undef HAVE_MEMSPN */\r
+\r
+/* Define to 1 if you are compiling in MinGW environment */\r
+/* #undef HAVE_MINGW */\r
+\r
+/* Define to 1 if you have MSG_TRUNC flag */\r
+#define HAVE_MSG_TRUNC 1\r
+\r
+/* Define to 1 if you have the <netdb.h> header file. */\r
+#define HAVE_NETDB_H 1\r
+\r
+/* Define to 1 if you have the <netinet/in.h> header file. */\r
+#define HAVE_NETINET_IN_H 1\r
+\r
+/* Define to 1 if you have the <netinet/sctp.h> header file. */\r
+/* #undef HAVE_NETINET_SCTP_H */\r
+\r
+/* Define to 1 if you have the <netinet/tcp.h> header file. */\r
+/* #undef HAVE_NETINET_TCP_H */\r
+\r
+/* Define to 1 if you have the <netpacket/packet.h> header file. */\r
+/* #undef HAVE_NETPACKET_PACKET_H */\r
+\r
+/* Define to 1 if you have the <net/if.h> header file. */\r
+#define HAVE_NET_IF_H 1\r
+\r
+/* Define to 1 if you have the <net/if_types.h> header file. */\r
+/* #undef HAVE_NET_IF_TYPES_H 1 */\r
+\r
+/* Define to 1 if you have OpenSSL */\r
+#define HAVE_OPENSSL 1\r
+\r
+/* Define to 1 if you have the <openssl/tls1.h> header file. */\r
+#define HAVE_OPENSSL_TLS1_H 1\r
+\r
+/* Define to 1 if you have the `poll' function. */\r
+/* #undef HAVE_POLL 1 */\r
+\r
+/* Define to 1 if you use poll in su_port. */\r
+#define HAVE_POLL_PORT 1\r
+\r
+/* Define to 1 if you have /proc/net/if_inet6 control file */\r
+/* #undef HAVE_PROC_NET_IF_INET6 */\r
+\r
+/* Define to 1 if you have working pthread_rwlock_t implementation. A thread\r
+ may hold multiple concurrent read locks on rwlock - that is, successfully\r
+ call the pthread_rwlock_rdlock() function n times. If so, the application\r
+ shall ensure that the thread performs matching unlocks - that is, it calls\r
+ the pthread_rwlock_unlock() function n times. */\r
+#define HAVE_PTHREAD_RWLOCK 1\r
+\r
+/* Define to 1 if you have the `random' function. */\r
+#define HAVE_RANDOM 1\r
+\r
+/* Define to 1 if you have sa_len in struct sockaddr */\r
+/* #undef HAVE_SA_LEN */\r
+\r
+/* Define to 1 if you have SCTP */\r
+/* #undef HAVE_SCTP */\r
+\r
+/* Define to 1 if you have the `select' function. */\r
+#define HAVE_SELECT 1\r
+\r
+/* Define to 1 if you have Sofia sigcomp >= 2.5 */\r
+/* #undef HAVE_SIGCOMP */\r
+\r
+/* Define to 1 if you have the <sigcomp.h> header file. */\r
+/* #undef HAVE_SIGCOMP_H */\r
+\r
+/* Define to 1 if you have the `signal' function. */\r
+/* #undef HAVE_SIGNAL */\r
+\r
+/* Define to 1 if you have SIGPIPE */\r
+/* #undef HAVE_SIGPIPE */\r
+\r
+/* Define to 1 if you have IPv6 structures and constants */\r
+/* #undef HAVE_SIN6 */\r
+\r
+/* Define to 1 if you have WIN32 WSAIoctl SIO_ADDRESS_LIST_QUERY. */\r
+/* #undef HAVE_SIO_ADDRESS_LIST_QUERY */\r
+\r
+/* Define to 1 if you have the `socketpair' function. */\r
+/* #undef HAVE_SOCKETPAIR */\r
+\r
+/* Define to 1 if we use NTH library */\r
+/* #undef HAVE_SOFIA_NTH */\r
+\r
+/* Define to 1 if we use NTLM library */\r
+/* #undef HAVE_SOFIA_NTLM */\r
+\r
+/* Define to 1 if you have Sofia sigcomp >= 2.5 */\r
+/* #undef HAVE_SOFIA_SIGCOMP */\r
+\r
+/* Define to 1 always */\r
+#define HAVE_SOFIA_SIP 1\r
+\r
+/* Define to 1 if we use S/MIME library */\r
+#define HAVE_SOFIA_SMIME 0\r
+\r
+/* Define to 1 if we use DNS library */\r
+#define HAVE_SOFIA_SRESOLV 1\r
+\r
+/* Define to 1 if we use STUN library */\r
+#define HAVE_SOFIA_STUN 1\r
+\r
+/* Define to 1 if we use SRTP */\r
+#define HAVE_SRTP 0\r
+\r
+/* Define to 1 if you have the <stdint.h> header file. */\r
+#define HAVE_STDINT_H 1\r
+\r
+/* Define to 1 if you have the <stdlib.h> header file. */\r
+#define HAVE_STDLIB_H 1\r
+\r
+/* Define to 1 if you have the `strcasestr' function. */\r
+#define HAVE_STRCASESTR 1\r
+\r
+/* Define to 1 if you have the `strerror' function. */\r
+#define HAVE_STRERROR 1\r
+\r
+/* Define to 1 if you have the <strings.h> header file. */\r
+#define HAVE_STRINGS_H 1\r
+\r
+/* Define to 1 if you have the <string.h> header file. */\r
+#define HAVE_STRING_H 1\r
+\r
+/* Define to 1 if you have the `strtoull' function. */\r
+/* #undef HAVE_STRTOULL */\r
+\r
+/* Define to 1 if your CC supports C99 struct initialization */\r
+#define HAVE_STRUCT_KEYWORDS 1\r
+\r
+/* Define to 1 if you have the <sys/epoll.h> header file. */\r
+/* #undef HAVE_SYS_EPOLL_H */\r
+\r
+/* Define to 1 if you have the <sys/event.h> header file. */\r
+#define HAVE_SYS_EVENT_H 1\r
+\r
+/* Define to 1 if you have the <sys/filio.h> header file. */\r
+/* #undef HAVE_SYS_FILIO_H */\r
+\r
+/* Define to 1 if you have the <sys/ioctl.h> header file. */\r
+#define HAVE_SYS_IOCTL_H 1\r
+\r
+/* Define to 1 if you have the <sys/select.h> header file. */\r
+#define HAVE_SYS_SELECT_H 1\r
+\r
+/* Define to 1 if you have the <sys/socket.h> header file. */\r
+#define HAVE_SYS_SOCKET_H 1\r
+\r
+/* Define to 1 if you have the <sys/sockio.h> header file. */\r
+#define HAVE_SYS_SOCKIO_H 1\r
+\r
+/* Define to 1 if you have the <sys/stat.h> header file. */\r
+#define HAVE_SYS_STAT_H 1\r
+\r
+/* Define to 1 if you have the <sys/time.h> header file. */\r
+#define HAVE_SYS_TIME_H 1\r
+\r
+/* Define to 1 if you have the <sys/types.h> header file. */\r
+#define HAVE_SYS_TYPES_H 1\r
+\r
+/* Define to 1 if you have the `tcsetattr' function. */\r
+#define HAVE_TCSETATTR 1\r
+\r
+/* Define to 1 if you have TLS */\r
+/* #undef HAVE_TLS */\r
+\r
+/* Define to 1 if you have the <unistd.h> header file. */\r
+#define HAVE_UNISTD_H 1\r
+\r
+/* Define to 1 if we use UPnP */\r
+#define HAVE_UPNP 0\r
+\r
+/* Define to 1 you have WIN32 */\r
+/* #undef HAVE_WIN32 */\r
+\r
+/* Define to 1 if you have the <windef.h> header file. */\r
+/* #undef HAVE_WINDEF_H */\r
+\r
+/* Define to 1 if you have the <winsock2.h> header file. */\r
+/* #undef HAVE_WINSOCK2_H */\r
+\r
+/* Define to 1 if you have the <ws2tcpip.h> header file. */\r
+/* #undef HAVE_WS2TCPIP_H */\r
+\r
+/* Define to format (%lli) for long long */\r
+#define LLI "%lli"\r
+\r
+/* Define to format (%llu) for unsigned long long */\r
+#define LLU "%llu"\r
+\r
+/* Define to format (%llx) for long long hex */\r
+#define LLX "%llx"\r
+\r
+/* Define printf() modifier for ssize_t */\r
+#define MOD_ZD "%zd"\r
+\r
+/* Define printf() modifier for size_t */\r
+#define MOD_ZU "%zu"\r
+\r
+/* Name of package */\r
+#define PACKAGE "sofia-sip"\r
+\r
+/* Define to the address where bug reports for this package should be sent. */\r
+#define PACKAGE_BUGREPORT ""\r
+\r
+/* Define to the full name of this package. */\r
+#define PACKAGE_NAME "sofia-sip"\r
+\r
+/* Define to the full name and version of this package. */\r
+#define PACKAGE_STRING "sofia-sip 1.12.5work"\r
+\r
+/* Define to the one symbol short name of this package. */\r
+#define PACKAGE_TARNAME "sofia-sip"\r
+\r
+/* Define to the version of this package. */\r
+#define PACKAGE_VERSION "1.12.5work"\r
+\r
+/* Define as the return type of signal handlers (`int' or `void'). */\r
+#define RETSIGTYPE void\r
+\r
+/* If using the C implementation of alloca, define if you know the\r
+ direction of stack growth for your system; otherwise it will be\r
+ automatically deduced at run-time.\r
+ STACK_DIRECTION > 0 => grows toward higher addresses\r
+ STACK_DIRECTION < 0 => grows toward lower addresses\r
+ STACK_DIRECTION = 0 => direction of growth unknown */\r
+/* #undef STACK_DIRECTION */\r
+\r
+/* Define to 1 if you have the ANSI C header files. */\r
+#define STDC_HEADERS 1\r
+\r
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */\r
+#define TIME_WITH_SYS_TIME 1\r
+\r
+/* Version number of package */\r
+#define VERSION "1.12.5work"\r
+\r
+/* Define to 1 if your processor stores words with the most significant byte\r
+ first (like Motorola and SPARC, unlike Intel and VAX). */\r
+/* #undef WORDS_BIGENDIAN */\r
+\r
+/* Enable GNU extensions on systems that have them. */\r
+#ifndef _GNU_SOURCE\r
+# define _GNU_SOURCE 1\r
+#endif\r
+\r
+/* Define to empty if `const' does not conform to ANSI C. */\r
+/* #undef const */\r
+\r
+/* Define to `__inline__' or `__inline' if that's what the C compiler\r
+ calls it, or to nothing if 'inline' is not supported under any name. */\r
+#ifndef __cplusplus\r
+/* #undef inline */\r
+#endif\r
+\r
+/* Define to a at least 64-bit int type */\r
+#define longlong long long\r
+\r
+/* Define to `unsigned' if <sys/types.h> does not define. */\r
+/* #undef size_t */\r
+\r
+/* Define to 1 if compiling on Open C environment */\r
+/* #undef HAVE_OPEN_C */
\ No newline at end of file
--- /dev/null
+/*\r
+* ==============================================================================\r
+* Name : bld.inf\r
+* Part of : Camcorder\r
+* Description : Camcorder application build information\r
+* Version : \r
+*\r
+* Copyright (c) 2003-2006 Nokia Corporation.\r
+* This material, including documentation and any related \r
+* computer programs, is protected by copyright controlled by \r
+* Nokia Corporation. All rights are reserved. Copying, \r
+* including reproducing, storing, adapting or translating, any \r
+* or all of this material requires the prior written consent of \r
+* Nokia Corporation. This material also contains confidential \r
+* information which may not be disclosed to others without the \r
+* prior written consent of Nokia Corporation.\r
+* ==============================================================================\r
+*/\r
+\r
+PRJ_PLATFORMS\r
+DEFAULT\r
+\r
+PRJ_EXPORTS\r
+\r
+\r
+PRJ_MMPFILES\r
+\r
+libsofia-sip-ua.mmp\r
+\r
+torture_su_root.mmp\r
+torture_su_port.mmp\r
+torture_su_tag.mmp\r
+torture_su_alloc.mmp\r
+torture_url.mmp\r
+test_msg.mmp\r
+torture_sip.mmp\r
+\r
+PRJ_TESTMMPFILES\r
+\r
+// End of File
\ No newline at end of file
--- /dev/null
+// General properties\r
+TARGET libsofia-sip-ua.lib\r
+TARGETTYPE lib\r
+CAPABILITY ALL -TCB\r
+UID 0x1000008D 0xA000017E\r
+VENDORID 0\r
+OPTION CW -dialect c99 -inline on -warn nounusedarg,nounusedvar\r
+\r
+//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB\r
+\r
+// Allow global writeable static data\r
+EPOCALLOWDLLDATA\r
+\r
+MACRO SYMBIAN\r
+MACRO IN_LIBSOFIA_SIP_UA\r
+MACRO IN_LIBSOFIA_SRES\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\su\r
+\r
+SOURCE su.c\r
+SOURCE su_errno.c\r
+SOURCE su_addrinfo.c\r
+SOURCE su_alloc.c\r
+SOURCE su_alloc_lock.c\r
+SOURCE su_strdup.c\r
+SOURCE su_sprintf.c\r
+SOURCE su_strlst.c\r
+SOURCE su_vector.c\r
+SOURCE su_time.c\r
+SOURCE su_time0.c\r
+SOURCE su_wait.c\r
+SOURCE su_root.c\r
+SOURCE su_timer.c\r
+SOURCE su_port.c\r
+SOURCE su_base_port.c\r
+SOURCE su_pthread_port.c\r
+SOURCE su_poll_port.c\r
+SOURCE su_epoll_port.c\r
+SOURCE su_select_port.c\r
+SOURCE su_socket_port.c\r
+SOURCE su_localinfo.c\r
+SOURCE su_os_nw.c\r
+SOURCE su_taglist.c\r
+SOURCE su_tag.c\r
+SOURCE su_tag_ref.c\r
+SOURCE su_tag_io.c\r
+SOURCE su_log.c\r
+SOURCE su_global_log.c\r
+SOURCE su_default_log.c\r
+SOURCE su_md5.c\r
+SOURCE su_uniqueid.c\r
+SOURCE su_bm.c\r
+SOURCE memmem.c\r
+SOURCE memspn.c\r
+SOURCE memcspn.c\r
+SOURCE string0.c\r
+SOURCE strtoull.c\r
+SOURCE strcasestr.c\r
+SOURCE getopt.c\r
+SOURCE poll.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\bnf\r
+\r
+SOURCE bnf.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\features\r
+\r
+SOURCE features.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\http\r
+\r
+SOURCE http_parser.c\r
+SOURCE http_header.c\r
+SOURCE http_basic.c\r
+SOURCE http_extra.c\r
+SOURCE http_status.c\r
+SOURCE http_tag_class.c\r
+SOURCE http_tag.c\r
+SOURCE http_tag_ref.c\r
+SOURCE http_parser_table.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\ipt\r
+\r
+SOURCE base64.c\r
+SOURCE rc4.c\r
+//SOURCE string0.c\r
+SOURCE token64.c\r
+\r
+SOURCE ucs2.c\r
+SOURCE ucs4.c\r
+SOURCE utf8.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\iptsec\r
+\r
+SOURCE auth_client.c\r
+SOURCE auth_common.c\r
+SOURCE auth_digest.c\r
+SOURCE auth_module.c\r
+SOURCE auth_tag.c\r
+SOURCE auth_tag_ref.c\r
+SOURCE auth_plugin.c\r
+SOURCE auth_plugin_delayed.c\r
+SOURCE auth_module_sip.c\r
+SOURCE iptsec_debug.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\msg\r
+\r
+SOURCE msg.c\r
+SOURCE msg_tag.c\r
+SOURCE msg_mime.c\r
+SOURCE msg_mime_table.c\r
+SOURCE msg_header_copy.c\r
+SOURCE msg_header_make.c\r
+SOURCE msg_parser.c\r
+SOURCE msg_mclass.c\r
+SOURCE msg_parser_util.c\r
+SOURCE msg_basic.c\r
+SOURCE msg_generic.c\r
+SOURCE msg_date.c\r
+SOURCE msg_auth.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\nea\r
+\r
+SOURCE nea.c\r
+SOURCE nea_event.c\r
+SOURCE nea_server.c\r
+SOURCE nea_debug.c\r
+SOURCE nea_tag.c\r
+SOURCE nea_tag_ref.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\nta\r
+\r
+SOURCE nta.c\r
+SOURCE nta_check.c\r
+SOURCE nta_tag.c\r
+SOURCE nta_tag_ref.c\r
+SOURCE sl_utils_print.c\r
+SOURCE sl_utils_log.c\r
+SOURCE sl_read_payload.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\nth\r
+\r
+SOURCE nth_client.c\r
+SOURCE nth_server.c\r
+SOURCE nth_tag.c\r
+SOURCE nth_tag_ref.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\nua\r
+\r
+SOURCE nua.c\r
+SOURCE nua_common.c\r
+SOURCE nua_stack.c\r
+SOURCE nua_extension.c\r
+SOURCE nua_dialog.c\r
+SOURCE outbound.c\r
+SOURCE nua_params.c\r
+SOURCE nua_register.c\r
+SOURCE nua_registrar.c\r
+SOURCE nua_session.c\r
+SOURCE nua_options.c\r
+SOURCE nua_message.c\r
+SOURCE nua_publish.c\r
+SOURCE nua_subnotref.c\r
+SOURCE nua_notifier.c\r
+SOURCE nua_event_server.c\r
+SOURCE nua_tag.c\r
+SOURCE nua_tag_ref.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\sdp\r
+\r
+SOURCE sdp.c\r
+SOURCE sdp_parse.c\r
+SOURCE sdp_print.c\r
+SOURCE sdp_tag.c\r
+SOURCE sdp_tag_ref.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\sip\r
+\r
+SOURCE sip_parser.c\r
+SOURCE sip_header.c\r
+SOURCE sip_util.c\r
+SOURCE sip_pref_util.c\r
+SOURCE sip_basic.c\r
+SOURCE sip_extra.c\r
+SOURCE sip_feature.c\r
+SOURCE sip_mime.c\r
+SOURCE sip_security.c\r
+SOURCE sip_event.c\r
+SOURCE sip_prack.c\r
+SOURCE sip_refer.c\r
+SOURCE sip_session.c\r
+SOURCE sip_caller_prefs.c\r
+SOURCE sip_reason.c\r
+SOURCE sip_status.c\r
+SOURCE sip_time.c\r
+SOURCE sip_tag_class.c\r
+SOURCE sip_tag.c\r
+SOURCE sip_tag_ref.c\r
+SOURCE sip_parser_table.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\soa\r
+\r
+SOURCE soa.c\r
+SOURCE soa_static.c\r
+SOURCE soa_tag.c\r
+SOURCE soa_tag_ref.c \r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\sresolv\r
+\r
+SOURCE sres.c\r
+SOURCE sres_cache.c\r
+SOURCE sres_blocking.c\r
+SOURCE sresolv.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\stun\r
+\r
+SOURCE stun.c\r
+SOURCE stun_common.c\r
+SOURCE stun_dns.c\r
+SOURCE stun_mini.c\r
+SOURCE stun_tag.c\r
+SOURCE stun_tag_ref.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\msg\r
+\r
+SOURCE test_class.c\r
+SOURCE test_table.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\tport\r
+\r
+SOURCE tport.c\r
+SOURCE tport_logging.c\r
+SOURCE tport_stub_sigcomp.c\r
+SOURCE tport_type_udp.c\r
+SOURCE tport_type_tcp.c\r
+SOURCE tport_type_sctp.c\r
+SOURCE tport_tag.c\r
+SOURCE tport_tag_ref.c\r
+SOURCE tport_type_tls.c\r
+SOURCE tport_tls.c\r
+SOURCE tport_stub_stun.c\r
+SOURCE tport_type_stun.c\r
+SOURCE tport_type_connect.c\r
+\r
+SOURCEPATH ..\..\libsofia-sip-ua\url\r
+\r
+SOURCE url.c\r
+SOURCE url_tag.c\r
+SOURCE url_tag_ref.c\r
+\r
+USERINCLUDE ..\r
+USERINCLUDE ..\..\libsofia-sip-ua\su\r
+USERINCLUDE ..\..\libsofia-sip-ua\bnf\r
+USERINCLUDE ..\..\libsofia-sip-ua\ipt\r
+USERINCLUDE ..\..\libsofia-sip-ua\iptsec\r
+USERINCLUDE ..\..\libsofia-sip-ua\url\r
+USERINCLUDE ..\..\libsofia-sip-ua\msg\r
+USERINCLUDE ..\..\libsofia-sip-ua\stun\r
+USERINCLUDE ..\..\libsofia-sip-ua\soa\r
+USERINCLUDE ..\..\libsofia-sip-ua\sdp\r
+USERINCLUDE ..\..\libsofia-sip-ua\sresolv\r
+USERINCLUDE ..\..\libsofia-sip-ua\http\r
+USERINCLUDE ..\..\libsofia-sip-ua\tport\r
+USERINCLUDE ..\..\libsofia-sip-ua\features\r
+USERINCLUDE ..\..\libsofia-sip-ua\sip\r
+USERINCLUDE ..\..\libsofia-sip-ua\nta\r
+USERINCLUDE ..\..\libsofia-sip-ua\nth\r
+USERINCLUDE ..\..\libsofia-sip-ua\nea\r
+USERINCLUDE ..\..\libsofia-sip-ua\nua\r
+\r
+SYSTEMINCLUDE ..\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua/features\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\su\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\ipt\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\iptsec\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\url\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sresolv\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\stun\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\soa\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sdp\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\http\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\tport\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\sip\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nta\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nth\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nea\r
+SYSTEMINCLUDE ..\..\libsofia-sip-ua\nua\r
+\r
+SYSTEMINCLUDE \Epoc32\include\r
+SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis\r
+SYSTEMINCLUDE \epoc32\include\libc\r
+SYSTEMINCLUDE \epoc32\include\osextensions\stdapis\openssl\r
+\r
+// Library dependencies\r
+LIBRARY libc.lib\r
+LIBRARY libm.lib\r
+LIBRARY libpthread.lib\r
+LIBRARY libcrypto.lib\r
+LIBRARY libssl.lib\r
+LIBRARY euser.lib
\ No newline at end of file
--- /dev/null
+// 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
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001AE3\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="test_msg";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001BA1\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_sip";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001AE7\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_su_alloc";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
+
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001AF1\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_su_port";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
+
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0xA000017F\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_su_root";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001AE2\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_su_tag";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+// 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
+
--- /dev/null
+#include <appinfo.rh>\r
+\r
+UID2 KUidAppRegistrationResourceFile\r
+UID3 0x1F001AC2\r
+\r
+RESOURCE APP_REGISTRATION_INFO\r
+ {\r
+ app_file="torture_url";\r
+\r
+ embeddability=KAppNotEmbeddable;\r
+ newfile=KAppDoesNotSupportNewFile;\r
+ }\r
+\r
--- /dev/null
+/* 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@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@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 */
--- /dev/null
+#! /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@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@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@lists.sourceforge.net");
+ gsub(/@PACKAGE_NAME@/, "sofia-sip");
+ gsub(/@PACKAGE@/, "sofia-sip");
+ gsub(/@PACKAGE_STRING@/, "sofia-sip");
+ gsub(/@PACKAGE_TARNAME@/, "sofia-sip");
+}
+
+OUT { print; }
+
--- /dev/null
+::
+:: 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@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
+::
+
+@setlocal
+@if x%AWK%==x set AWK=mawk
+@set VERSION=%AWK% -v BINMODE="rw" -f version.awk
+@set AC=..\configure.ac
+
+:: Check that we really have awk
+@%AWK% "{ exit(0); }" < NUL >NUL
+@if not errorlevel 9009 goto have_awk
+@echo *** install %AWK% (mawk or GNU awk) into your PATH ***
+@echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
+@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
+@if errorlevel 1 goto echo *** version_files failed ***
+
+:end
+@endlocal
--- /dev/null
+#
+# Generate lcov output
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi@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
# 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 \
AM_CFLAGS = $(CWFLAG) $(SOFIA_COVERAGE) $(SOFIA_CFLAGS) $(openssl_CFLAGS)
+SOFIA_COVERAGE = $(COVERAGE_FLAGS)
+
# Use with --enable-ndebug
if NDEBUG
AM_CFLAGS += -DNDEBUG
_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 \
-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
+
--- /dev/null
+#! /bin/sh
+#
+# Generate coverage report
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi@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}
--- /dev/null
+#! /bin/sh
+#
+# show uncovered lines as errors
+#
+
+#
+# Copyright (C) 2007 Nokia Corporation
+# Contact: Pekka Pessi <pekka.pessi@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
@INCLUDE_PATH = . @srcdir@
@INCLUDE = ../libsofia-sip-ua/docs/Doxyfile.aliases
-@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