mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-20 10:26:51 +00:00
sync to latest sofia-sip darcs tree
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5104 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
50b4a37771
commit
5d8a952b5e
@ -24,26 +24,28 @@ EXTRA_DIST = AUTHORS COPYING COPYRIGHTS ChangeLog.ext-trees \
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST += m4/sac-general.m4 m4/sac-su.m4 \
|
||||
m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
|
||||
EXTRA_DIST += m4/sac-general.m4 m4/sac-su.m4 m4/sac-coverage.m4 \
|
||||
m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
|
||||
|
||||
EXTRA_DIST += docs/build_system.txt \
|
||||
docs/devel_platform_notes.txt \
|
||||
docs/release_management.txt
|
||||
|
||||
EXTRA_DIST += scripts/lcov-report scripts/uncovered
|
||||
|
||||
dist_man_MANS = man/man1/sip-date.1 man/man1/sip-options.1 \
|
||||
man/man1/localinfo.1 man/man1/addrinfo.1 \
|
||||
man/man1/stunc.1 man/man1/sip-dig.1
|
||||
|
||||
$(dist_man_MANS): manpages
|
||||
|
||||
manpages: built-sources
|
||||
manpages:
|
||||
-mkdir -p man man/man1 2> /dev/null
|
||||
if HAVE_DOXYGEN
|
||||
@echo 'cd utils && $(DOXYGEN)'
|
||||
@cd utils && \
|
||||
{ exec 3>&1 1>&2; { $(DOXYGEN) 2>&1; echo $$? >& 3 ;} | \
|
||||
fgrep -v 'Warning:' ;} | { read x; exit $$x ;}
|
||||
fgrep -v 'Warning: explicit' ;} | { read x; exit $$x ;}
|
||||
@rm -f man/man1/_*.1
|
||||
else
|
||||
-touch $(dist_man_MANS)
|
||||
@ -51,7 +53,7 @@ endif
|
||||
|
||||
CLEANFILES = $(dist_man_MANS)
|
||||
|
||||
coverage built-sources clean-built-sources valcheck doxygen:
|
||||
built-sources clean-built-sources valcheck doxygen:
|
||||
@failcom='exit 1'; for f in x $$MAKEFLAGS; do \
|
||||
case $$f in *=* | --[!k]*);; *k*) failcom='fail=yes';; esac; done; \
|
||||
for i in libsofia-sip-ua $(GLIB_SUBDIRS) ; do \
|
||||
@ -59,4 +61,15 @@ coverage built-sources clean-built-sources valcheck doxygen:
|
||||
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)
|
||||
|
@ -5,31 +5,27 @@ Release notes for current version of Sofia-SIP
|
||||
Changes since last release
|
||||
--------------------------
|
||||
|
||||
Numerous nua bugs introduced in the release 1.12.5 have been fixed. Support
|
||||
for nextnonce in Authentication-Info header has been added. The nua engine
|
||||
now fully supports application-driven SDP.
|
||||
<changes since last written in freshmeat.net "Changes:" style;
|
||||
and in less than 10 lines, written in 3rd person English, with
|
||||
complete sentences />
|
||||
|
||||
Bugs in blaa and foo have been fixed. The stack now supports
|
||||
use of foobar...
|
||||
|
||||
API/ABI changes and versioning
|
||||
------------------------------
|
||||
|
||||
<see previous release notes at
|
||||
http://sofia-sip.sourceforge.net/relnotes/ for examples ;
|
||||
- should include all changes to public headers, and
|
||||
other important information to developers;
|
||||
- and should be updated _continuously_! />
|
||||
|
||||
New features in API are marked with Doxytag macro @VERSION_1_12_7.
|
||||
|
||||
libsofia-sip-ua:
|
||||
- Use calling/received callstate in nua_i_state event sent because of UPDATE
|
||||
while call is ready
|
||||
- Added tag define NUTAG_WITH_CURRENT() as an alias to NUTAG_WITH_THIS()
|
||||
- Added tag NUTAG_DIALOG() controlling whether nua_method() creates a dialog.
|
||||
- Added tag NUTAG_AUTH_CACHE() <sofia-sip/nua_tag.h> determining when to
|
||||
include credentials in the request
|
||||
- Added kqueue and /dev/poll interfaces (su_devpoll_port_create(),
|
||||
su_devpoll_clone_start(), su_kqueue_port_create(), su_kqueue_clone_start()
|
||||
in <sofia-sip/su_wait.h>)
|
||||
- Added SIP_IS_ALLOWED() macro to <sofia-sip/sip_util.h>
|
||||
- Fixed NUTAG_APPL_METHOD() implementation for UPDATE and PRACK as documented
|
||||
("100rel" and "precondition" extensions now require explicit calls to
|
||||
nua_update() and nua_prack() if those methods are included in
|
||||
NUTAG_APPL_METHOD())
|
||||
- Added auc_clear field and member to authentication client plugin interface
|
||||
in <sofia-sip/auth_client_plugin.h>
|
||||
- Added nua_event_is_incoming_request() to <sofia-sip/nua.h>
|
||||
- Added accessor function nta_outgoing_branch()
|
||||
- **template**: Added foobar() function (sofia-sip/foobar.h).
|
||||
- This release is ABI/API compatible with applications linked against
|
||||
any 1.12.x release. However, applications built against this release won't
|
||||
work against an older library. The ABI has been tested with the nua module
|
||||
@ -43,74 +39,38 @@ libsofia-sip-ua-glib:
|
||||
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.
|
||||
|
@ -11,14 +11,14 @@ dnl information on the package
|
||||
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])
|
||||
|
@ -42,6 +42,12 @@ doxygen: built-sources
|
||||
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)
|
||||
|
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
# select whicn optional sofia-sip modules have been enabled
|
||||
# select which optional sofia-sip modules have been enabled
|
||||
# in the build
|
||||
OPT_LIBADD =
|
||||
OPT_SUBDIRS_STUN =
|
||||
@ -55,6 +55,8 @@ libsofia_sip_ua_la_LIBADD = bnf/libbnf.la \
|
||||
libsofia_sip_ua_la_LDFLAGS = \
|
||||
-version-info $(LIBVER_SOFIA_SIP_UA_CUR):$(LIBVER_SOFIA_SIP_UA_REV):$(LIBVER_SOFIA_SIP_UA_AGE)
|
||||
|
||||
PHONY = doxygen built-sources
|
||||
|
||||
include $(top_srcdir)/rules/recursive.am
|
||||
|
||||
doxygen: built-sources
|
||||
@ -96,4 +98,8 @@ 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)
|
||||
|
@ -69,6 +69,7 @@ unsigned char const _bnf_table[256] = {
|
||||
alpha, alpha, alpha, sep, 0, sep, mtok, 0, /* xyz{|}~ */
|
||||
};
|
||||
|
||||
#if 0 /* This escaped lab */
|
||||
|
||||
#define BM(c, m00, m32, m64, m96) \
|
||||
((c < 64) \
|
||||
@ -104,9 +105,10 @@ char * bnf_span_token_end(char const *s)
|
||||
{
|
||||
return (char *)s;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Return length of decimal-octet */
|
||||
static inline int span_ip4_octet(char const *host)
|
||||
su_inline int span_ip4_octet(char const *host)
|
||||
{
|
||||
/*
|
||||
decimal-octet = DIGIT
|
||||
@ -212,6 +214,9 @@ int scan_ip4_address(char **inout_host)
|
||||
issize_t n;
|
||||
int canonize = 0;
|
||||
|
||||
if (src == NULL)
|
||||
return -1;
|
||||
|
||||
n = span_canonic_ip4_address(src, &canonize);
|
||||
if (n == 0)
|
||||
return -1;
|
||||
@ -242,7 +247,7 @@ int scan_ip4_address(char **inout_host)
|
||||
}
|
||||
|
||||
/** Return length of hex4 */
|
||||
static inline int span_hex4(char const *host)
|
||||
su_inline int span_hex4(char const *host)
|
||||
{
|
||||
if (!IS_HEX(host[0]))
|
||||
return 0;
|
||||
@ -256,7 +261,7 @@ static inline int span_hex4(char const *host)
|
||||
}
|
||||
|
||||
/** Return length of valid IP6 address */
|
||||
static inline
|
||||
su_inline
|
||||
int span_canonic_ip6_address(char const *host,
|
||||
int *return_canonize,
|
||||
char *hexparts[9])
|
||||
@ -337,7 +342,7 @@ int span_canonic_ip6_address(char const *host,
|
||||
*
|
||||
* @retval Length of canonized IP6 address.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int canonize_ip6_address(char *host, char *hexparts[9])
|
||||
{
|
||||
char *dst, *hex, *ip4 = NULL;
|
||||
@ -565,7 +570,7 @@ int scan_ip_address(char **inout_host)
|
||||
}
|
||||
|
||||
/** Return length of a valid domain label */
|
||||
static inline
|
||||
su_inline
|
||||
size_t span_domain_label(char const *label)
|
||||
{
|
||||
/* domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum */
|
||||
@ -581,7 +586,7 @@ size_t span_domain_label(char const *label)
|
||||
}
|
||||
|
||||
/** Scan valid domain name and count number of labels in it. */
|
||||
static inline
|
||||
su_inline
|
||||
size_t span_domain_labels(char const *host, size_t *return_labels)
|
||||
{
|
||||
size_t len, n, labels;
|
||||
@ -851,12 +856,11 @@ static size_t convert_ip_address(char const *s,
|
||||
}
|
||||
return (void)(*return_addrlen = 16), len;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
len = span_canonic_ip4_address(s, &canonize);
|
||||
|
||||
if (len) {
|
||||
if (canonize) {
|
||||
char *tmp = buf;
|
||||
@ -865,8 +869,6 @@ static size_t convert_ip_address(char const *s,
|
||||
}
|
||||
if (s[len] == '\0' && inet_pton(AF_INET, s, addr) == 1)
|
||||
return (void)(*return_addrlen = 4), len;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -892,22 +894,27 @@ int host_cmp(char const *a, char const *b)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ SOFIAPUBVAR unsigned char const _bnf_table[256];
|
||||
/** Calculate span of a linear whitespace.
|
||||
* LWS = [*WSP CRLF] 1*WSP
|
||||
*/
|
||||
static inline isize_t span_lws(char const *s)
|
||||
su_inline isize_t span_lws(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
int i = 0;
|
||||
@ -187,7 +187,7 @@ static inline isize_t span_lws(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a token or linear whitespace characters. */
|
||||
static inline isize_t span_token_lws(char const *s)
|
||||
su_inline isize_t span_token_lws(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (_bnf_table[(unsigned char)(*e)] & (bnf_token | bnf_lws))
|
||||
@ -195,23 +195,17 @@ static inline isize_t span_token_lws(char const *s)
|
||||
return e - s;
|
||||
}
|
||||
|
||||
#if 1
|
||||
/** Calculate span of a token characters. */
|
||||
static inline isize_t span_token(char const *s)
|
||||
su_inline isize_t span_token(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (_bnf_table[(unsigned char)(*e)] & bnf_token)
|
||||
e++;
|
||||
return e - s;
|
||||
}
|
||||
#else
|
||||
size_t bnf_span_token(char const *s);
|
||||
#define span_token(s) bnf_span_token((s))
|
||||
#endif
|
||||
|
||||
|
||||
/** Calculate span of a alphabetic characters. */
|
||||
static inline isize_t span_alpha(char const *s)
|
||||
su_inline isize_t span_alpha(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (_bnf_table[(unsigned char)(*e)] & bnf_alpha)
|
||||
@ -220,7 +214,7 @@ static inline isize_t span_alpha(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a digits. */
|
||||
static inline isize_t span_digit(char const *s)
|
||||
su_inline isize_t span_digit(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (*e >= '0' && *e <= '9')
|
||||
@ -229,7 +223,7 @@ static inline isize_t span_digit(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a hex. */
|
||||
static inline isize_t span_hexdigit(char const *s)
|
||||
su_inline isize_t span_hexdigit(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (IS_HEX(*e))
|
||||
@ -238,7 +232,7 @@ static inline isize_t span_hexdigit(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of characters belonging to an RTSP token */
|
||||
static inline isize_t span_alpha_digit_safe(char const *s)
|
||||
su_inline isize_t span_alpha_digit_safe(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (_bnf_table[(unsigned char)(*e)] & (bnf_alpha | bnf_safe))
|
||||
@ -247,7 +241,7 @@ static inline isize_t span_alpha_digit_safe(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a characters valid in parameters. */
|
||||
static inline isize_t span_param(char const *s)
|
||||
su_inline isize_t span_param(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (IS_PARAM(*e))
|
||||
@ -256,7 +250,7 @@ static inline isize_t span_param(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a SIP word. */
|
||||
static inline isize_t span_word(char const *s)
|
||||
su_inline isize_t span_word(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (*e && (IS_TOKEN(*e) || strchr(SIP_WORD, *e)))
|
||||
@ -265,7 +259,7 @@ static inline isize_t span_word(char const *s)
|
||||
}
|
||||
|
||||
/** Calculate span of a unreserved characters. */
|
||||
static inline isize_t span_unreserved(char const *s)
|
||||
su_inline isize_t span_unreserved(char const *s)
|
||||
{
|
||||
char const *e = s;
|
||||
while (IS_UNRESERVED(*e))
|
||||
@ -274,7 +268,7 @@ static inline isize_t span_unreserved(char const *s)
|
||||
}
|
||||
|
||||
/** 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;
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ HTTP_HEADER_CLASS_G(server, "Server", single);
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void http_te_update(http_te_t *te)
|
||||
{
|
||||
te->te_q = msg_header_find_param(te->te_common, "q");
|
||||
|
@ -97,7 +97,7 @@ HTTP_HEADER_CLASS_LIST(proxy_connection, "Proxy-Connection", list);
|
||||
*
|
||||
* @param sc pointer to a @c http_cookie_t object
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
void http_cookie_update(http_cookie_t *c)
|
||||
{
|
||||
size_t i;
|
||||
@ -299,7 +299,7 @@ HTTP_HEADER_CLASS(cookie, "Cookie", c_params, append, cookie);
|
||||
*
|
||||
* @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;
|
||||
|
@ -103,9 +103,9 @@ SOFIAPUBVAR tag_typedef_t httptag_http;
|
||||
SOFIAPUBVAR tag_typedef_t httptag_http_ref;
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
static inline
|
||||
su_inline
|
||||
tag_value_t httptag_http_v(http_t const *v) { return (tag_value_t)v; }
|
||||
static inline
|
||||
su_inline
|
||||
tag_value_t httptag_http_vr(http_t const **vp) { return (tag_value_t)vp; }
|
||||
#else
|
||||
#define httptag_http_v(v) (tag_value_t)(v)
|
||||
@ -151,10 +151,10 @@ SOFIAPUBVAR tag_typedef_t httptag_header;
|
||||
SOFIAPUBVAR tag_typedef_t httptag_header_ref;
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
httptag_header_v(http_header_t const *v)
|
||||
{ return (tag_value_t)v; }
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
httptag_header_vr(http_header_t const **vp)
|
||||
{ return (tag_value_t)vp; }
|
||||
#else
|
||||
@ -221,10 +221,10 @@ SOFIAPUBVAR tag_typedef_t httptag_#xxxxxx#_ref;
|
||||
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
|
||||
|
@ -25,10 +25,10 @@ TESTS = torture_base64
|
||||
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 \
|
||||
|
@ -45,7 +45,7 @@
|
||||
char *strcasestr(char const *haystack, char const *needle);
|
||||
#endif
|
||||
|
||||
static inline int has_token(char const *qstring, char const *token);
|
||||
su_inline int has_token(char const *qstring, char const *token);
|
||||
|
||||
/**
|
||||
* Parse authentication parameters.
|
||||
@ -163,7 +163,7 @@ int auth_struct_copy(void *dst, void const *src, isize_t s_size)
|
||||
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;
|
||||
|
@ -831,7 +831,7 @@ void auth_info_digest(auth_mod_t *am,
|
||||
/* ====================================================================== */
|
||||
/* Password database */
|
||||
|
||||
static inline void
|
||||
su_inline void
|
||||
auth_htable_append_local(auth_htable_t *pr, auth_passwd_t *apw);
|
||||
|
||||
/** Get an passwd entry for user. */
|
||||
@ -1132,7 +1132,7 @@ int auth_readdb_internal(auth_mod_t *am, int always)
|
||||
}
|
||||
|
||||
/** 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;
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include "iptsec_debug.h"
|
||||
|
||||
static inline int has_token(char const *qstring, char const *token);
|
||||
su_inline int has_token(char const *qstring, char const *token);
|
||||
|
||||
|
||||
/**Get ntlm-challenge parameters.
|
||||
|
@ -254,10 +254,10 @@ SOFIAPUBVAR tag_typedef_t authtag_module;
|
||||
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
|
||||
|
@ -765,6 +765,44 @@ int test_digest_client()
|
||||
|
||||
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;
|
||||
|
@ -92,7 +92,7 @@ static char const months[12 * 4] =
|
||||
* @return The function month_d() returns 0..11 if given first three letters
|
||||
* of month name, or -1 if no month name matches.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int month_d(char const *s)
|
||||
{
|
||||
unsigned const uc = ('a' - 'A') << 16 | ('a' - 'A') << 8 | ('a' - 'A');
|
||||
@ -125,7 +125,7 @@ int month_d(char const *s)
|
||||
}
|
||||
|
||||
/* 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)
|
||||
{
|
||||
|
@ -51,7 +51,7 @@
|
||||
#include "sofia-sip/msg_header.h"
|
||||
|
||||
/** Calculate size of a parameter vector */
|
||||
static inline
|
||||
su_inline
|
||||
size_t msg_params_copy_xtra(msg_param_t const pp[], size_t offset)
|
||||
{
|
||||
size_t n = msg_params_count(pp);
|
||||
@ -63,7 +63,7 @@ size_t msg_params_copy_xtra(msg_param_t const pp[], size_t offset)
|
||||
}
|
||||
|
||||
/** 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[])
|
||||
|
@ -119,29 +119,29 @@ struct msg_buffer_s {
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* 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;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ static void msg_insert_chain(msg_t *msg, msg_pub_t *pub, int prepend,
|
||||
static void msg_insert_here_in_chain(msg_t *msg,
|
||||
msg_header_t **prev,
|
||||
msg_header_t *h);
|
||||
static inline msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h);
|
||||
su_inline msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h);
|
||||
|
||||
#ifndef NDEBUG
|
||||
static int msg_chain_loop(msg_header_t const *h);
|
||||
@ -122,12 +122,12 @@ void msg_set_streaming(msg_t *msg, enum msg_streaming_status what)
|
||||
/** Test if header is not in the chain */
|
||||
#define msg_header_is_removed(h) ((h)->sh_prev == NULL)
|
||||
|
||||
static inline int msg_is_request(msg_header_t const *h)
|
||||
su_inline int msg_is_request(msg_header_t const *h)
|
||||
{
|
||||
return h->sh_class->hc_hash == msg_request_hash;
|
||||
}
|
||||
|
||||
static inline int msg_is_status(msg_header_t const *h)
|
||||
su_inline int msg_is_status(msg_header_t const *h)
|
||||
{
|
||||
return h->sh_class->hc_hash == msg_status_hash;
|
||||
}
|
||||
@ -253,7 +253,7 @@ usize_t msg_buf_size(msg_t const *msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void msg_buf_used(msg_t *msg, usize_t used)
|
||||
{
|
||||
msg->m_size += used;
|
||||
@ -812,10 +812,10 @@ int msg_unref_external(msg_t *msg, msg_buffer_t *b)
|
||||
/* ====================================================================== */
|
||||
/* Parsing messages */
|
||||
|
||||
static inline int extract_incomplete_chunks(msg_t *, int eos);
|
||||
su_inline int extract_incomplete_chunks(msg_t *, int eos);
|
||||
static issize_t extract_first(msg_t *, msg_pub_t *,
|
||||
char b[], isize_t bsiz, int eos);
|
||||
static inline issize_t extract_next(msg_t *, msg_pub_t *, char *, isize_t bsiz,
|
||||
su_inline issize_t extract_next(msg_t *, msg_pub_t *, char *, isize_t bsiz,
|
||||
int eos, int copy);
|
||||
static issize_t extract_header(msg_t *, msg_pub_t*,
|
||||
char b[], isize_t bsiz, int eos, int copy);
|
||||
@ -823,14 +823,14 @@ static msg_header_t *header_parse(msg_t *, msg_pub_t *, msg_href_t const *,
|
||||
char s[], isize_t slen, int copy_buffer);
|
||||
static msg_header_t *error_header_parse(msg_t *msg, msg_pub_t *mo,
|
||||
msg_href_t const *hr);
|
||||
static inline issize_t
|
||||
su_inline issize_t
|
||||
extract_trailers(msg_t *msg, msg_pub_t *mo,
|
||||
char *b, isize_t bsiz, int eos, int copy);
|
||||
|
||||
/** Calculate length of line ending (0, 1 or 2). @internal */
|
||||
#define CRLF_TEST(b) ((b)[0] == '\r' ? ((b)[1] == '\n') + 1 : (b)[0] =='\n')
|
||||
|
||||
static inline void
|
||||
su_inline void
|
||||
append_parsed(msg_t *msg, msg_pub_t *mo, msg_href_t const *hr, msg_header_t *h,
|
||||
int always_into_chain);
|
||||
|
||||
@ -991,7 +991,7 @@ issize_t extract_first(msg_t *msg, msg_pub_t *mo, char b[], isize_t bsiz, int eo
|
||||
}
|
||||
|
||||
/* Extract header or message body */
|
||||
static inline issize_t
|
||||
su_inline issize_t
|
||||
extract_next(msg_t *msg, msg_pub_t *mo, char *b, isize_t bsiz,
|
||||
int eos, int copy)
|
||||
{
|
||||
@ -1302,7 +1302,7 @@ issize_t msg_extract_separator(msg_t *msg, msg_pub_t *mo,
|
||||
return l;
|
||||
}
|
||||
|
||||
static inline msg_header_t **msg_chain_tail(msg_t const *msg);
|
||||
su_inline msg_header_t **msg_chain_tail(msg_t const *msg);
|
||||
|
||||
/** Extract a message body of @a body_len bytes.
|
||||
*/
|
||||
@ -1459,7 +1459,7 @@ issize_t msg_extract_payload(msg_t *msg, msg_pub_t *mo,
|
||||
|
||||
/** Extract incomplete chunks.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int extract_incomplete_chunks(msg_t *msg, int eos)
|
||||
{
|
||||
msg_payload_t *chunk;
|
||||
@ -1495,7 +1495,7 @@ int extract_incomplete_chunks(msg_t *msg, int eos)
|
||||
}
|
||||
|
||||
/* Extract trailers */
|
||||
static inline issize_t
|
||||
su_inline issize_t
|
||||
extract_trailers(msg_t *msg, msg_pub_t *mo,
|
||||
char *b, isize_t bsiz, int eos, int copy)
|
||||
{
|
||||
@ -1511,7 +1511,7 @@ extract_trailers(msg_t *msg, msg_pub_t *mo,
|
||||
/* Preparing (printing/encoding) a message structure for sending */
|
||||
|
||||
/* Internal prototypes */
|
||||
static inline size_t
|
||||
su_inline size_t
|
||||
msg_header_name_e(char b[], size_t bsiz, msg_header_t const *h, int flags);
|
||||
static size_t msg_header_prepare(msg_mclass_t const *, int flags,
|
||||
msg_header_t *h, msg_header_t **return_next,
|
||||
@ -1731,7 +1731,7 @@ issize_t msg_header_e(char b[], isize_t bsiz, msg_header_t const *h, int flags)
|
||||
}
|
||||
|
||||
/** Encode header name */
|
||||
static inline
|
||||
su_inline
|
||||
size_t
|
||||
msg_header_name_e(char b[], size_t bsiz, msg_header_t const *h, int flags)
|
||||
{
|
||||
@ -1854,7 +1854,7 @@ char *msg_as_string(su_home_t *home, msg_t *msg, msg_pub_t *pub, 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);
|
||||
|
||||
@ -1864,13 +1864,13 @@ msg_header_t **msg_chain_head(msg_t const *msg)
|
||||
return msg ? (msg_header_t **)&msg->m_chain : NULL;
|
||||
}
|
||||
|
||||
static inline msg_header_t **_msg_chain_head(msg_t const *msg)
|
||||
su_inline msg_header_t **_msg_chain_head(msg_t const *msg)
|
||||
{
|
||||
return msg ? (msg_header_t **)&msg->m_chain : NULL;
|
||||
}
|
||||
|
||||
/** Return tail of the fragment chain */
|
||||
static inline msg_header_t **msg_chain_tail(msg_t const *msg)
|
||||
su_inline msg_header_t **msg_chain_tail(msg_t const *msg)
|
||||
{
|
||||
return msg ? msg->m_tail : NULL;
|
||||
}
|
||||
@ -1977,7 +1977,7 @@ int msg_serialize(msg_t *msg, msg_pub_t *pub)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void serialize_first(msg_t *msg, msg_header_t *h)
|
||||
{
|
||||
if (msg_header_is_removed(h)) {
|
||||
@ -2202,7 +2202,7 @@ void msg_insert_here_in_chain(msg_t *msg,
|
||||
*
|
||||
* @return The pointer to the header just removed.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
msg_header_t *msg_chain_remove(msg_t *msg, msg_header_t *h)
|
||||
{
|
||||
if (h) {
|
||||
@ -2477,7 +2477,7 @@ msg_hclass_offset(msg_mclass_t const *mc, msg_pub_t const *mo, msg_hclass_t *hc)
|
||||
}
|
||||
|
||||
/** 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)
|
||||
{
|
||||
|
@ -197,13 +197,13 @@ SOFIAPUBFUN issize_t msg_headers_prepare(msg_t *,
|
||||
|
||||
#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) {
|
||||
|
@ -49,7 +49,7 @@ SOFIA_BEGIN_DECLS
|
||||
#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;
|
||||
|
@ -154,7 +154,7 @@ union msg_test_u
|
||||
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);
|
||||
|
@ -1702,6 +1702,10 @@ int main(int argc, char *argv[])
|
||||
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);
|
||||
|
@ -103,10 +103,10 @@ extern tag_typedef_t tsttag_header;
|
||||
extern tag_typedef_t tsttag_header_ref;
|
||||
|
||||
#if HAVE_INLINE
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
tsttag_header_v(msg_header_t const *v)
|
||||
{ return (tag_value_t)v; }
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
tsttag_header_vr(msg_header_t const **vp)
|
||||
{ return (tag_value_t)vp; }
|
||||
#else
|
||||
@ -132,9 +132,9 @@ extern tag_typedef_t tsttag_header_str;
|
||||
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)
|
||||
|
@ -271,7 +271,7 @@ static int nea_view_queue(nea_server_t *nes,
|
||||
nea_event_queue_t *evq);
|
||||
|
||||
/** Assign an event view to subscriber. */
|
||||
static inline
|
||||
su_inline
|
||||
void nea_sub_assign_view(nea_sub_t *s, nea_event_view_t *evv)
|
||||
{
|
||||
if (s->s_view != evv)
|
||||
@ -281,7 +281,7 @@ void nea_sub_assign_view(nea_sub_t *s, nea_event_view_t *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;
|
||||
|
@ -75,14 +75,6 @@
|
||||
#include "sofia-sip/nta_stateless.h"
|
||||
#include "sofia-sip/url_tag.h"
|
||||
|
||||
#if !defined(random) && defined(_WIN32)
|
||||
#define random rand
|
||||
#endif
|
||||
|
||||
#if !defined(EMSGSIZE) && defined(_WIN32)
|
||||
#define EMSGSIZE WSAEMSGSIZE
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -202,30 +194,30 @@ static nta_incoming_t *incoming_create(nta_agent_t *agent,
|
||||
char const *tag);
|
||||
static int incoming_callback(nta_leg_t *leg, nta_incoming_t *irq, sip_t *sip);
|
||||
static void incoming_free(nta_incoming_t *irq);
|
||||
static inline void incoming_cut_off(nta_incoming_t *irq);
|
||||
static inline void incoming_reclaim(nta_incoming_t *irq);
|
||||
su_inline void incoming_cut_off(nta_incoming_t *irq);
|
||||
su_inline void incoming_reclaim(nta_incoming_t *irq);
|
||||
static void incoming_queue_init(incoming_queue_t *,
|
||||
unsigned timeout);
|
||||
static void incoming_queue_adjust(nta_agent_t *sa,
|
||||
incoming_queue_t *queue,
|
||||
unsigned timeout);
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
nta_incoming_t *incoming_find(nta_agent_t const *agent, sip_t const *sip,
|
||||
sip_via_t const *v,
|
||||
nta_incoming_t **merge,
|
||||
nta_incoming_t **ack);
|
||||
static int incoming_reply(nta_incoming_t *irq, msg_t *msg, sip_t *sip);
|
||||
static inline int incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
su_inline int incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
tport_t *tport);
|
||||
static inline int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
su_inline int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
tport_t *tport);
|
||||
static inline int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
su_inline int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
tport_t *tport);
|
||||
static inline int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
su_inline int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
tport_t *tport);
|
||||
static inline int incoming_timestamp(nta_incoming_t *, msg_t *, sip_t *);
|
||||
static inline su_duration_t incoming_timer(nta_agent_t *, su_duration_t);
|
||||
su_inline int incoming_timestamp(nta_incoming_t *, msg_t *, sip_t *);
|
||||
su_inline su_duration_t incoming_timer(nta_agent_t *, su_duration_t);
|
||||
|
||||
static nta_reliable_t *reliable_mreply(nta_incoming_t *,
|
||||
nta_prack_f *, nta_reliable_magic_t *,
|
||||
@ -251,15 +243,15 @@ static void outgoing_queue_adjust(nta_agent_t *sa,
|
||||
outgoing_queue_t *queue,
|
||||
unsigned timeout);
|
||||
static void outgoing_free(nta_outgoing_t *orq);
|
||||
static inline void outgoing_cut_off(nta_outgoing_t *orq);
|
||||
static inline void outgoing_reclaim(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_cut_off(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_reclaim(nta_outgoing_t *orq);
|
||||
static nta_outgoing_t *outgoing_find(nta_agent_t const *sa,
|
||||
msg_t const *msg,
|
||||
sip_t const *sip,
|
||||
sip_via_t const *v);
|
||||
static int outgoing_recv(nta_outgoing_t *orq, int status, msg_t *, sip_t *);
|
||||
static void outgoing_default_recv(nta_outgoing_t *, int, msg_t *, sip_t *);
|
||||
static inline su_duration_t outgoing_timer(nta_agent_t *, su_duration_t);
|
||||
su_inline su_duration_t outgoing_timer(nta_agent_t *, su_duration_t);
|
||||
static int outgoing_recv_reliable(nta_outgoing_t *orq, msg_t *msg, sip_t *sip);
|
||||
|
||||
/* Internal message passing */
|
||||
@ -3250,7 +3242,7 @@ static int leg_callback_default(nta_leg_magic_t*, nta_leg_t*,
|
||||
nta_incoming_t*, sip_t const *);
|
||||
#define HTABLE_HASH_LEG(leg) ((leg)->leg_hash)
|
||||
HTABLE_BODIES_WITH(leg_htable, lht, nta_leg_t, HTABLE_HASH_LEG, size_t, hash_value_t);
|
||||
static inline
|
||||
su_inline
|
||||
hash_value_t hash_istring(char const *, char const *, hash_value_t);
|
||||
|
||||
/**@typedef nta_request_f
|
||||
@ -3814,7 +3806,7 @@ nta_leg_t *nta_leg_by_replaces(nta_agent_t *sa, sip_replaces_t const *rp)
|
||||
}
|
||||
|
||||
/** Calculate a simple case-insensitive hash over a string */
|
||||
static inline
|
||||
su_inline
|
||||
hash_value_t hash_istring(char const *s, char const *term, hash_value_t hash)
|
||||
{
|
||||
if (s) {
|
||||
@ -3908,7 +3900,7 @@ void leg_recv(nta_leg_t *leg, msg_t *msg, sip_t *sip, tport_t *tport)
|
||||
* @retval nonzero if matching.
|
||||
* @retval zero if not matching.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int addr_cmp(url_t const *a, url_t const *b)
|
||||
{
|
||||
if (b == NULL)
|
||||
@ -4260,21 +4252,21 @@ static void incoming_insert(nta_agent_t *agent,
|
||||
incoming_queue_t *queue,
|
||||
nta_incoming_t *irq);
|
||||
|
||||
static inline int incoming_is_queued(nta_incoming_t const *irq);
|
||||
static inline void incoming_queue(incoming_queue_t *queue, nta_incoming_t *);
|
||||
static inline void incoming_remove(nta_incoming_t *irq);
|
||||
static inline void incoming_set_timer(nta_incoming_t *, unsigned interval);
|
||||
static inline void incoming_reset_timer(nta_incoming_t *);
|
||||
static inline size_t incoming_mass_destroy(nta_agent_t *, incoming_queue_t *);
|
||||
su_inline int incoming_is_queued(nta_incoming_t const *irq);
|
||||
su_inline void incoming_queue(incoming_queue_t *queue, nta_incoming_t *);
|
||||
su_inline void incoming_remove(nta_incoming_t *irq);
|
||||
su_inline void incoming_set_timer(nta_incoming_t *, unsigned interval);
|
||||
su_inline void incoming_reset_timer(nta_incoming_t *);
|
||||
su_inline size_t incoming_mass_destroy(nta_agent_t *, incoming_queue_t *);
|
||||
|
||||
static int incoming_set_params(nta_incoming_t *irq, tagi_t const *tags);
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_set_compartment(nta_incoming_t *irq, tport_t *tport, msg_t *msg,
|
||||
int create_if_needed);
|
||||
|
||||
static inline nta_incoming_t
|
||||
su_inline nta_incoming_t
|
||||
*incoming_call_callback(nta_incoming_t *, msg_t *, sip_t *);
|
||||
static inline int incoming_final_failed(nta_incoming_t *irq, msg_t *);
|
||||
su_inline int incoming_final_failed(nta_incoming_t *irq, msg_t *);
|
||||
static void incoming_retransmit_reply(nta_incoming_t *irq, tport_t *tport);
|
||||
|
||||
/** Create a default server transaction.
|
||||
@ -4438,6 +4430,7 @@ nta_incoming_t *incoming_create(nta_agent_t *agent,
|
||||
/* Tag transaction */
|
||||
if (tag)
|
||||
sip_to_tag(home, irq->irq_to, tag);
|
||||
irq->irq_tag = irq->irq_to->a_tag;
|
||||
|
||||
if (method != sip_method_ack) {
|
||||
int *use_rport = NULL;
|
||||
@ -4617,7 +4610,7 @@ incoming_queue_adjust(nta_agent_t *sa,
|
||||
/** @internal
|
||||
* Test if an incoming transaction is in a queue.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_is_queued(nta_incoming_t const *irq)
|
||||
{
|
||||
return irq && irq->irq_queue;
|
||||
@ -4629,7 +4622,7 @@ int incoming_is_queued(nta_incoming_t const *irq)
|
||||
* Insert a server transaction into a queue, and sets the corresponding
|
||||
* timeout at the same time.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_queue(incoming_queue_t *queue,
|
||||
nta_incoming_t *irq)
|
||||
{
|
||||
@ -4655,7 +4648,7 @@ void incoming_queue(incoming_queue_t *queue,
|
||||
/** @internal
|
||||
* Remove an incoming transaction from a queue.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_remove(nta_incoming_t *irq)
|
||||
{
|
||||
assert(incoming_is_queued(irq));
|
||||
@ -4673,7 +4666,7 @@ void incoming_remove(nta_incoming_t *irq)
|
||||
irq->irq_timeout = 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_set_timer(nta_incoming_t *irq, unsigned interval)
|
||||
{
|
||||
nta_incoming_t **rq;
|
||||
@ -4714,7 +4707,7 @@ void incoming_set_timer(nta_incoming_t *irq, unsigned interval)
|
||||
irq->irq_agent->sa_in.re_t1 = rq;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_reset_timer(nta_incoming_t *irq)
|
||||
{
|
||||
if (irq->irq_rprev) {
|
||||
@ -4742,7 +4735,7 @@ void incoming_free(nta_incoming_t *irq)
|
||||
}
|
||||
|
||||
/** Remove references to the irq */
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_cut_off(nta_incoming_t *irq)
|
||||
{
|
||||
nta_agent_t *agent = irq->irq_agent;
|
||||
@ -4771,7 +4764,7 @@ void incoming_cut_off(nta_incoming_t *irq)
|
||||
}
|
||||
|
||||
/** Reclaim the memory used by irq */
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_reclaim(nta_incoming_t *irq)
|
||||
{
|
||||
su_home_t *home = irq->irq_home;
|
||||
@ -4799,7 +4792,7 @@ void incoming_reclaim(nta_incoming_t *irq)
|
||||
}
|
||||
|
||||
/** Queue request to be freed */
|
||||
static inline
|
||||
su_inline
|
||||
void incoming_free_queue(incoming_queue_t *q, nta_incoming_t *irq)
|
||||
{
|
||||
incoming_cut_off(irq);
|
||||
@ -5007,10 +5000,12 @@ nta_incoming_t *nta_incoming_find(nta_agent_t const *agent,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
int addr_match(sip_addr_t const *a, sip_addr_t const *b)
|
||||
su_inline
|
||||
int addr_match(sip_addr_t const *a, char const *a_tag, sip_addr_t const *b)
|
||||
{
|
||||
if (a->a_tag && b->a_tag)
|
||||
if (a_tag && b->a_tag)
|
||||
return strcasecmp(a_tag, b->a_tag) == 0;
|
||||
else if (a->a_tag && b->a_tag)
|
||||
return strcasecmp(a->a_tag, b->a_tag) == 0;
|
||||
else
|
||||
return
|
||||
@ -5022,7 +5017,7 @@ int addr_match(sip_addr_t const *a, sip_addr_t const *b)
|
||||
*
|
||||
*
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
nta_incoming_t *incoming_find(nta_agent_t const *agent,
|
||||
sip_t const *sip,
|
||||
sip_via_t const *v,
|
||||
@ -5061,7 +5056,7 @@ nta_incoming_t *incoming_find(nta_agent_t const *agent,
|
||||
if (is_uas_ack &&
|
||||
irq->irq_method == sip_method_invite &&
|
||||
200 <= irq->irq_status && irq->irq_status < 300 &&
|
||||
addr_match(irq->irq_to, to))
|
||||
addr_match(irq->irq_to, irq->irq_tag, to))
|
||||
*return_ack = irq;
|
||||
/* RFC3261 - section 8.2.2.2 Merged Requests */
|
||||
else if (return_merge && agent->sa_merge_482 &&
|
||||
@ -5077,7 +5072,7 @@ nta_incoming_t *incoming_find(nta_agent_t const *agent,
|
||||
}
|
||||
|
||||
if (is_uas_ack) {
|
||||
if (!addr_match(irq->irq_to, to))
|
||||
if (!addr_match(irq->irq_to, irq->irq_tag, to))
|
||||
continue;
|
||||
}
|
||||
else if (irq->irq_tag_set || !irq->irq_tag) {
|
||||
@ -5131,8 +5126,8 @@ nta_incoming_t *incoming_find(nta_agent_t const *agent,
|
||||
continue;
|
||||
if (irq->irq_cseq->cs_seq != rack->ra_cseq)
|
||||
continue;
|
||||
if (!addr_match(irq->irq_to, to) ||
|
||||
!addr_match(irq->irq_from, from))
|
||||
if (!addr_match(irq->irq_to, NULL, to) ||
|
||||
!addr_match(irq->irq_from, NULL, from))
|
||||
continue;
|
||||
if (!irq->irq_from->a_tag != !from->a_tag)
|
||||
continue;
|
||||
@ -5146,7 +5141,7 @@ nta_incoming_t *incoming_find(nta_agent_t const *agent,
|
||||
}
|
||||
|
||||
/** Process retransmitted requests. */
|
||||
static inline
|
||||
su_inline
|
||||
int
|
||||
incoming_recv(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
|
||||
{
|
||||
@ -5179,7 +5174,7 @@ 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;
|
||||
@ -5221,7 +5216,7 @@ int incoming_ack(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
tport_t *tport)
|
||||
{
|
||||
@ -5261,7 +5256,7 @@ int incoming_cancel(nta_incoming_t *irq, msg_t *msg, sip_t *sip,
|
||||
}
|
||||
|
||||
/** Process merged requests */
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
|
||||
{
|
||||
nta_agent_t *agent = irq->irq_agent;
|
||||
@ -5302,7 +5297,7 @@ int incoming_merge(nta_incoming_t *irq, msg_t *msg, sip_t *sip, tport_t *tport)
|
||||
*/
|
||||
|
||||
/** Call callback of incoming transaction */
|
||||
static inline
|
||||
su_inline
|
||||
nta_incoming_t *
|
||||
incoming_call_callback(nta_incoming_t *irq, msg_t *msg, sip_t *sip)
|
||||
{
|
||||
@ -5391,7 +5386,7 @@ int incoming_set_params(nta_incoming_t *irq, tagi_t const *tags)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_set_compartment(nta_incoming_t *irq, tport_t *tport, msg_t *msg,
|
||||
int create_if_needed)
|
||||
{
|
||||
@ -5846,7 +5841,7 @@ int incoming_reply(nta_incoming_t *irq, msg_t *msg, sip_t *sip)
|
||||
*
|
||||
* Put transaction into its own queue, try later to send the response.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int incoming_final_failed(nta_incoming_t *irq, msg_t *msg)
|
||||
{
|
||||
msg_destroy(msg);
|
||||
@ -5921,7 +5916,7 @@ enum {
|
||||
};
|
||||
|
||||
/** @internal Timer routine for the incoming request. */
|
||||
static inline
|
||||
su_inline
|
||||
su_duration_t incoming_timer(nta_agent_t *sa, su_duration_t next)
|
||||
{
|
||||
su_duration_t now = sa->sa_millisec;
|
||||
@ -6141,7 +6136,7 @@ su_duration_t incoming_timer(nta_agent_t *sa, su_duration_t next)
|
||||
}
|
||||
|
||||
/** Mass destroy server transactions */
|
||||
static inline
|
||||
su_inline
|
||||
size_t incoming_mass_destroy(nta_agent_t *sa, incoming_queue_t *q)
|
||||
{
|
||||
size_t destroyed = q->q_length;
|
||||
@ -6198,12 +6193,12 @@ static void outgoing_print_tport_error(nta_outgoing_t *orq,
|
||||
tp_name_t const *, msg_t *, int error);
|
||||
static void outgoing_insert(nta_agent_t *sa, nta_outgoing_t *orq);
|
||||
static void outgoing_destroy(nta_outgoing_t *orq);
|
||||
static inline int outgoing_is_queued(nta_outgoing_t const *orq);
|
||||
static inline void outgoing_queue(outgoing_queue_t *queue,
|
||||
su_inline int outgoing_is_queued(nta_outgoing_t const *orq);
|
||||
su_inline void outgoing_queue(outgoing_queue_t *queue,
|
||||
nta_outgoing_t *orq);
|
||||
static inline void outgoing_remove(nta_outgoing_t *orq);
|
||||
static inline void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval);
|
||||
static inline void outgoing_reset_timer(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_remove(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval);
|
||||
su_inline void outgoing_reset_timer(nta_outgoing_t *orq);
|
||||
static size_t outgoing_timer_dk(outgoing_queue_t *q,
|
||||
char const *timer,
|
||||
su_duration_t now);
|
||||
@ -6234,8 +6229,8 @@ static int outgoing_default_cb(nta_outgoing_magic_t *magic,
|
||||
|
||||
#if HAVE_SOFIA_SRESOLV
|
||||
static void outgoing_resolve(nta_outgoing_t *orq);
|
||||
static inline void outgoing_cancel_resolver(nta_outgoing_t *orq);
|
||||
static inline void outgoing_destroy_resolver(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_cancel_resolver(nta_outgoing_t *orq);
|
||||
su_inline void outgoing_destroy_resolver(nta_outgoing_t *orq);
|
||||
static int outgoing_other_destinations(nta_outgoing_t const *orq);
|
||||
static int outgoing_try_another(nta_outgoing_t *orq);
|
||||
#else
|
||||
@ -6622,6 +6617,14 @@ unsigned nta_outgoing_delay(nta_outgoing_t const *orq)
|
||||
return orq != NULL && orq != NONE ? orq->orq_delay : UINT_MAX;
|
||||
}
|
||||
|
||||
/** Get the branch parameter. */
|
||||
char const *nta_outgoing_branch(nta_outgoing_t const *orq)
|
||||
{
|
||||
return orq != NULL && orq != NONE && orq->orq_branch
|
||||
? orq->orq_branch + strlen("branch=")
|
||||
: NULL;
|
||||
}
|
||||
|
||||
/**Get reference to response message.
|
||||
*
|
||||
* Retrieve the latest incoming response message to the outgoing
|
||||
@ -6849,7 +6852,7 @@ nta_outgoing_t *outgoing_create(nta_agent_t *agent,
|
||||
}
|
||||
|
||||
if (branch && branch != NONE) {
|
||||
if (strchr(branch, '='))
|
||||
if (strncasecmp(branch, "branch=", 7) == 0)
|
||||
branch = su_strdup(home, branch);
|
||||
else
|
||||
branch = su_sprintf(home, "branch=%s", branch);
|
||||
@ -6866,7 +6869,10 @@ nta_outgoing_t *outgoing_create(nta_agent_t *agent,
|
||||
|
||||
if (orq->orq_method == sip_method_ack) {
|
||||
if (ack_branch != NULL && ack_branch != NONE) {
|
||||
orq->orq_branch = su_strdup(home, ack_branch);
|
||||
if (strncasecmp(ack_branch, "branch=", 7) == 0)
|
||||
orq->orq_branch = su_strdup(home, ack_branch);
|
||||
else
|
||||
orq->orq_branch = su_sprintf(home, "branch=%s", ack_branch);
|
||||
}
|
||||
else if (!stateless && agent->sa_is_a_uas) {
|
||||
/*
|
||||
@ -7406,7 +7412,7 @@ outgoing_queue_adjust(nta_agent_t *sa,
|
||||
/** @internal
|
||||
* Test if an outgoing transaction is in a queue.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int outgoing_is_queued(nta_outgoing_t const *orq)
|
||||
{
|
||||
return orq && orq->orq_queue;
|
||||
@ -7418,7 +7424,7 @@ int outgoing_is_queued(nta_outgoing_t const *orq)
|
||||
* Insert a client transaction into a queue and set the corresponding
|
||||
* timeout at the same time.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_queue(outgoing_queue_t *queue,
|
||||
nta_outgoing_t *orq)
|
||||
{
|
||||
@ -7444,7 +7450,7 @@ void outgoing_queue(outgoing_queue_t *queue,
|
||||
/** @internal
|
||||
* Remove an outgoing transaction from a queue.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_remove(nta_outgoing_t *orq)
|
||||
{
|
||||
assert(outgoing_is_queued(orq));
|
||||
@ -7466,7 +7472,7 @@ void outgoing_remove(nta_outgoing_t *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;
|
||||
@ -7509,7 +7515,7 @@ void outgoing_set_timer(nta_outgoing_t *orq, unsigned interval)
|
||||
orq->orq_agent->sa_out.re_t1 = rq;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_reset_timer(nta_outgoing_t *orq)
|
||||
{
|
||||
if (orq->orq_rprev) {
|
||||
@ -7536,7 +7542,7 @@ void outgoing_free(nta_outgoing_t *orq)
|
||||
}
|
||||
|
||||
/** Remove outgoing request from hash tables */
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_cut_off(nta_outgoing_t *orq)
|
||||
{
|
||||
nta_agent_t *agent = orq->orq_agent;
|
||||
@ -7566,7 +7572,7 @@ void outgoing_cut_off(nta_outgoing_t *orq)
|
||||
}
|
||||
|
||||
/** Reclaim outgoing request */
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_reclaim(nta_outgoing_t *orq)
|
||||
{
|
||||
if (orq->orq_request)
|
||||
@ -7581,7 +7587,7 @@ void outgoing_reclaim(nta_outgoing_t *orq)
|
||||
}
|
||||
|
||||
/** Queue request to be freed */
|
||||
static inline
|
||||
su_inline
|
||||
void outgoing_free_queue(outgoing_queue_t *q, nta_outgoing_t *orq)
|
||||
{
|
||||
outgoing_cut_off(orq);
|
||||
@ -7640,7 +7646,7 @@ void outgoing_destroy(nta_outgoing_t *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;
|
||||
@ -7985,9 +7991,7 @@ nta_outgoing_t *outgoing_find(nta_agent_t const *sa,
|
||||
continue;
|
||||
if (str0casecmp(orq->orq_from->a_tag, sip->sip_from->a_tag))
|
||||
continue;
|
||||
if (orq->orq_to->a_tag && sip->sip_to->a_tag
|
||||
? strcasecmp(orq->orq_to->a_tag, sip->sip_to->a_tag)
|
||||
: !addr_match(orq->orq_to, sip->sip_to))
|
||||
if (!addr_match(orq->orq_to, NULL, sip->sip_to))
|
||||
continue;
|
||||
if (orq->orq_method == method ?
|
||||
/* Don't match if request To has a tag and response has no To tag */
|
||||
@ -8779,7 +8783,7 @@ outgoing_try_another(nta_outgoing_t *orq)
|
||||
}
|
||||
|
||||
/** Cancel resolver query */
|
||||
static inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
|
||||
su_inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
|
||||
{
|
||||
struct sipdns_resolver *sr = orq->orq_resolver;
|
||||
|
||||
@ -8790,7 +8794,7 @@ static inline void outgoing_cancel_resolver(nta_outgoing_t *orq)
|
||||
}
|
||||
|
||||
/** Destroy resolver */
|
||||
static inline void outgoing_destroy_resolver(nta_outgoing_t *orq)
|
||||
su_inline void outgoing_destroy_resolver(nta_outgoing_t *orq)
|
||||
{
|
||||
struct sipdns_resolver *sr = orq->orq_resolver;
|
||||
|
||||
@ -9436,7 +9440,7 @@ static nta_prack_f nta_reliable_destroyed;
|
||||
* Check that server transaction can be used to send reliable provisional
|
||||
* responses.
|
||||
*/
|
||||
static inline
|
||||
su_inline
|
||||
int reliable_check(nta_incoming_t *irq)
|
||||
{
|
||||
if (irq == NULL || irq->irq_status >= 200 || !irq->irq_agent)
|
||||
@ -10198,7 +10202,7 @@ int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq)
|
||||
|
||||
#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)
|
||||
|
@ -379,6 +379,7 @@ SOFIAPUBFUN int nta_outgoing_status(nta_outgoing_t const *orq);
|
||||
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);
|
||||
|
||||
|
@ -32,19 +32,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <sofia-sip/string0.h>
|
||||
#include <sofia-sip/hostdomain.h>
|
||||
|
||||
#if !defined(EALREADY) && defined(_WIN32)
|
||||
#define EALREADY WSAEALREADY
|
||||
#endif
|
||||
#include <sofia-sip/su.h>
|
||||
|
||||
typedef struct server_s server_t;
|
||||
|
||||
@ -72,6 +61,13 @@ 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
|
||||
@ -204,9 +200,9 @@ static char const __func__[] = "nth";
|
||||
static server_t *server_create(url_t const *url,
|
||||
tag_type_t tag, tag_value_t value, ...);
|
||||
void server_destroy(server_t *srv);
|
||||
static inline int server_timer_init(server_t *srv);
|
||||
su_inline int server_timer_init(server_t *srv);
|
||||
static void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv);
|
||||
static inline uint32_t server_now(server_t const *srv);
|
||||
su_inline uint32_t server_now(server_t const *srv);
|
||||
static void server_request(server_t *srv, tport_t *tport, msg_t *msg,
|
||||
void *arg, su_time_t now);
|
||||
static nth_site_t **site_get_host(nth_site_t **, char const *host, char const *port);
|
||||
@ -776,7 +772,7 @@ void server_destroy(server_t *srv)
|
||||
}
|
||||
|
||||
/** Initialize server timer. */
|
||||
static inline
|
||||
su_inline
|
||||
int server_timer_init(server_t *srv)
|
||||
{
|
||||
if (0) {
|
||||
@ -804,7 +800,7 @@ void server_timer(su_root_magic_t *rm, su_timer_t *timer, server_t *srv)
|
||||
}
|
||||
|
||||
/** Get current timestamp in milliseconds */
|
||||
static inline
|
||||
su_inline
|
||||
uint32_t server_now(server_t const *srv)
|
||||
{
|
||||
if (srv->srv_now)
|
||||
|
@ -415,7 +415,7 @@ int nua_dialog_remove(nua_owner_t *own,
|
||||
nua_dialog_state_t *ds,
|
||||
nua_dialog_usage_t *usage);
|
||||
|
||||
static inline int nua_dialog_is_reporting(nua_dialog_state_t const *ds)
|
||||
su_inline int nua_dialog_is_reporting(nua_dialog_state_t const *ds)
|
||||
{
|
||||
return ds && ds->ds_reporting;
|
||||
}
|
||||
@ -459,20 +459,20 @@ int nua_dialog_usage_shutdown(nua_owner_t *owner,
|
||||
nua_dialog_state_t *ds,
|
||||
nua_dialog_usage_t *du);
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int nua_dialog_is_established(nua_dialog_state_t const *ds)
|
||||
{
|
||||
return ds->ds_remote_tag != NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static inline
|
||||
su_inline
|
||||
void *nua_dialog_usage_private(nua_dialog_usage_t const *du)
|
||||
{
|
||||
return du ? (void *)(du + 1) : NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
nua_dialog_usage_t *nua_dialog_usage_public(void const *p)
|
||||
{
|
||||
return p ? (nua_dialog_usage_t *)p - 1 : NULL;
|
||||
@ -494,7 +494,7 @@ int nua_client_tcreate(nua_owner_t *nh,
|
||||
nua_client_methods_t const *methods,
|
||||
tag_type_t tag, tag_value_t value, ...);
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void *nua_private_client_request(nua_client_request_t const *cr)
|
||||
{
|
||||
return (void *)(cr + 1);
|
||||
@ -504,7 +504,7 @@ void nua_client_request_destroy(nua_client_request_t *);
|
||||
|
||||
int nua_client_request_queue(nua_client_request_t *cr);
|
||||
|
||||
static inline int nua_client_is_queued(nua_client_request_t const *cr)
|
||||
su_inline int nua_client_is_queued(nua_client_request_t const *cr)
|
||||
{
|
||||
return cr && cr->cr_prev;
|
||||
}
|
||||
@ -513,18 +513,18 @@ nua_client_request_t *nua_client_request_remove(nua_client_request_t *cr);
|
||||
|
||||
int nua_client_bind(nua_client_request_t *cr, nua_dialog_usage_t *du);
|
||||
|
||||
static inline int nua_client_is_bound(nua_client_request_t const *cr)
|
||||
su_inline int nua_client_is_bound(nua_client_request_t const *cr)
|
||||
{
|
||||
return cr && cr->cr_usage && cr->cr_usage->du_cr == cr;
|
||||
}
|
||||
|
||||
static inline int nua_client_is_reporting(nua_client_request_t const *cr)
|
||||
su_inline int nua_client_is_reporting(nua_client_request_t const *cr)
|
||||
{
|
||||
return cr && cr->cr_reporting;
|
||||
}
|
||||
|
||||
/** Mark client request as a terminating one */
|
||||
static inline void nua_client_terminating(nua_client_request_t *cr)
|
||||
su_inline void nua_client_terminating(nua_client_request_t *cr)
|
||||
{
|
||||
cr->cr_terminating = 1;
|
||||
}
|
||||
@ -613,13 +613,13 @@ extern nua_server_methods_t const
|
||||
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;
|
||||
|
@ -1072,15 +1072,17 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
|
||||
nta_outgoing_t *ack;
|
||||
int status = 200;
|
||||
char const *phrase = "OK", *reason = NULL;
|
||||
char const *invite_branch;
|
||||
|
||||
assert(ds->ds_leg);
|
||||
assert(cr->cr_orq);
|
||||
|
||||
msg = nta_outgoing_getrequest(cr->cr_orq);
|
||||
sip = sip_object(msg);
|
||||
sip = sip_object(msg);
|
||||
if (!msg)
|
||||
return -1;
|
||||
|
||||
invite_branch = nta_outgoing_branch(cr->cr_orq);
|
||||
|
||||
wa = sip_authorization(sip);
|
||||
pa = sip_proxy_authorization(sip);
|
||||
|
||||
@ -1157,9 +1159,11 @@ int nua_invite_client_ack(nua_client_request_t *cr, tagi_t const *tags)
|
||||
|
||||
if ((ack = nta_outgoing_mcreate(nh->nh_nua->nua_nta, NULL, NULL, NULL,
|
||||
msg,
|
||||
NTATAG_ACK_BRANCH(invite_branch),
|
||||
SIPTAG_END(),
|
||||
TAG_NEXT(tags)))) {
|
||||
nta_outgoing_destroy(ack); /* TR engine keeps this around for T2 */
|
||||
/* TR engine keeps this around for T2 so it catches all 2XX retransmissions */
|
||||
nta_outgoing_destroy(ack);
|
||||
|
||||
if (nh->nh_soa && reason && ss && ss->ss_state <= nua_callstate_ready)
|
||||
nua_stack_event(nh->nh_nua, nh, NULL,
|
||||
@ -4077,7 +4081,7 @@ session_timer_set(nua_session_usage_t *ss)
|
||||
}
|
||||
}
|
||||
|
||||
static inline int
|
||||
su_inline int
|
||||
session_timer_has_been_set(struct session_timer const *t)
|
||||
{
|
||||
return t->timer_set;
|
||||
|
@ -937,7 +937,7 @@ int nh_authorize(nua_handle_t *nh, tag_type_t tag, tag_value_t value, ...)
|
||||
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) {
|
||||
|
@ -108,7 +108,7 @@ typedef struct register_usage nua_registration_t;
|
||||
#define nua_handle_ref(nh) nua_handle_ref_by((nh), __func__)
|
||||
#define nua_handle_unref(nh) nua_handle_unref_by((nh), __func__)
|
||||
|
||||
static inline nua_handle_t *nua_handle_ref_by(nua_handle_t *nh,
|
||||
su_inline nua_handle_t *nua_handle_ref_by(nua_handle_t *nh,
|
||||
char const *by)
|
||||
{
|
||||
if (nh)
|
||||
@ -118,7 +118,7 @@ static inline nua_handle_t *nua_handle_ref_by(nua_handle_t *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,
|
||||
@ -191,7 +191,7 @@ struct nua_handle_s
|
||||
|
||||
#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;
|
||||
|
@ -963,8 +963,156 @@ int test_basic_call_4(struct context *ctx)
|
||||
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)
|
||||
;
|
||||
}
|
||||
|
@ -297,13 +297,13 @@ void print_event(nua_event_t event,
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
@ -1115,7 +1115,7 @@ tag_class_t sdptag_session_class[1] =
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/* Compare two string pointers */
|
||||
static inline
|
||||
su_inline
|
||||
int str0cmp(char const *a, char const *b)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
@ -1124,7 +1124,7 @@ int str0cmp(char const *a, char const *b)
|
||||
}
|
||||
|
||||
/* Compare two string pointers ignoring case. */
|
||||
static inline
|
||||
su_inline
|
||||
int str0casecmp(char const *a, char const *b)
|
||||
{
|
||||
if (a == NULL) a = "";
|
||||
|
@ -434,7 +434,7 @@ msg_hclass_t sip_publication_class[] =
|
||||
SIP_HEADER_CLASS(publication, "Publication", "", pub_params, single,
|
||||
publication);
|
||||
|
||||
static inline void sip_publication_update(sip_publication_t *pub);
|
||||
su_inline void sip_publication_update(sip_publication_t *pub);
|
||||
|
||||
issize_t sip_publication_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
|
||||
{
|
||||
@ -491,7 +491,7 @@ char *sip_publication_dup_one(sip_header_t *dst, sip_header_t const *src,
|
||||
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;
|
||||
|
||||
|
@ -105,9 +105,9 @@ SOFIAPUBVAR tag_typedef_t siptag_sip;
|
||||
SOFIAPUBVAR tag_typedef_t siptag_sip_ref;
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
static inline
|
||||
su_inline
|
||||
tag_value_t siptag_sip_v(sip_t const *v) { return (tag_value_t)v; }
|
||||
static inline
|
||||
su_inline
|
||||
tag_value_t siptag_sip_vr(sip_t const **vp) { return (tag_value_t)vp; }
|
||||
#else
|
||||
#define siptag_sip_v(v) (tag_value_t)(v)
|
||||
@ -137,10 +137,10 @@ SOFIAPUBVAR tag_typedef_t siptag_header;
|
||||
SOFIAPUBVAR tag_typedef_t siptag_header_ref;
|
||||
|
||||
#if SU_HAVE_INLINE
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
siptag_header_v(sip_header_t const *v)
|
||||
{ return (tag_value_t)v; }
|
||||
static inline tag_value_t
|
||||
su_inline tag_value_t
|
||||
siptag_header_vr(sip_header_t const **vp)
|
||||
{ return (tag_value_t)vp; }
|
||||
#else
|
||||
@ -241,10 +241,10 @@ SOFIAPUBVAR tag_typedef_t siptag_#xxxxxx#_str;
|
||||
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
|
||||
|
@ -3288,6 +3288,10 @@ int main(int argc, char *argv[])
|
||||
usage(1);
|
||||
}
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
tstflags |= tst_verbatim;
|
||||
#endif
|
||||
|
||||
if (!test_mclass)
|
||||
test_mclass = msg_mclass_clone(sip_default_mclass(), 0, 0);
|
||||
|
||||
@ -3324,6 +3328,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
retval |= test_utils(); fflush(stdout);
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
sleep(5);
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ int validate_file(int fd, char const *name, context_t *ctx)
|
||||
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void nul_terminate(char *b, off_t size)
|
||||
{
|
||||
char *end;
|
||||
@ -305,7 +305,7 @@ void nul_terminate(char *b, off_t size)
|
||||
*end = '\0';
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int search_msg(char **bb, char const *protocol)
|
||||
{
|
||||
int linelen, plen = strlen(protocol);
|
||||
|
@ -74,7 +74,7 @@ void soa_set_activity(soa_session_t *ss,
|
||||
sdp_media_t const *,
|
||||
int remote);
|
||||
|
||||
static inline int soa_media_is_ready(soa_session_t const *ss);
|
||||
su_inline int soa_media_is_ready(soa_session_t const *ss);
|
||||
|
||||
enum soa_sdp_kind {
|
||||
soa_capability_sdp_kind,
|
||||
@ -1879,7 +1879,7 @@ int soa_set_warning(soa_session_t *ss, int code, char const *text)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int soa_media_is_ready(soa_session_t const *ss)
|
||||
{
|
||||
XXX;
|
||||
|
@ -50,13 +50,24 @@
|
||||
#else
|
||||
#define SRESPUBFUN __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(SYMBIAN) && !defined(LIBSRES_STATIC)
|
||||
/* Open C platform */
|
||||
#undef SRESPUBFUN
|
||||
#if defined(IN_LIBSOFIA_SRES)
|
||||
#define SRESPUBFUN __declspec(dllexport)
|
||||
#else
|
||||
#define SRESPUBFUN __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/* Types required by Win32/64 */
|
||||
|
||||
#if defined(_WIN32)
|
||||
#if defined (SYMBIAN)
|
||||
/** Socket descriptor. @since New in @VERSION_1_12_2. */
|
||||
typedef int sres_socket_t;
|
||||
#elif defined(_WIN32)
|
||||
typedef SOCKET sres_socket_t;
|
||||
#else
|
||||
/** Socket descriptor. @since New in @VERSION_1_12_2. */
|
||||
|
@ -44,7 +44,7 @@
|
||||
#elif HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#if defined(_WIN32)
|
||||
#if defined(HAVE_WIN32)
|
||||
typedef _int8 int8_t;
|
||||
typedef unsigned _int8 uint8_t;
|
||||
typedef unsigned _int16 uint16_t;
|
||||
@ -105,7 +105,7 @@ typedef int socklen_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)
|
||||
@ -114,7 +114,7 @@ ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
|
||||
}
|
||||
|
||||
/* Posix recvfrom() */
|
||||
static inline
|
||||
su_inline
|
||||
ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen)
|
||||
{
|
||||
@ -135,7 +135,7 @@ ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
|
||||
return (ssize_t)retval;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int sres_close(sres_socket_t s)
|
||||
{
|
||||
return closesocket(s);
|
||||
@ -182,7 +182,7 @@ const char *inet_ntop(int af, void const *src, char *dst, size_t size);
|
||||
/**
|
||||
* How often to recheck nameserver information (seconds).
|
||||
*/
|
||||
#ifndef _WIN32
|
||||
#ifndef HAVE_WIN32
|
||||
#define SRES_UPDATE_INTERVAL_SECS 5
|
||||
#else
|
||||
#define SRES_UPDATE_INTERVAL_SECS 180
|
||||
@ -545,7 +545,7 @@ static int m_get_domain(char *d, int n, sres_message_t *m, uint16_t offset);
|
||||
|
||||
#include <sofia-sip/su_debug.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef HAVE_WIN32
|
||||
#include <winreg.h>
|
||||
#endif
|
||||
|
||||
@ -1648,7 +1648,7 @@ sres_query_alloc(sres_resolver_t *res,
|
||||
return query;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void
|
||||
sres_remove_query(sres_resolver_t *res, sres_query_t *q, int all)
|
||||
{
|
||||
@ -1898,7 +1898,7 @@ int sres_update_config(sres_resolver_t *res, int always, time_t now)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#if _WIN32
|
||||
#if HAVE_WIN32
|
||||
|
||||
/** Number of octets to read from a registry key at a time */
|
||||
#define QUERY_DATALEN 1024
|
||||
@ -2082,7 +2082,7 @@ static int sres_parse_win32_reg(sres_config_t *c)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* _WIN32 */
|
||||
#endif /* HAVE_WIN32 */
|
||||
|
||||
/** Parse /etc/resolv.conf file.
|
||||
*
|
||||
@ -2109,7 +2109,7 @@ sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res,
|
||||
if (f)
|
||||
fclose(f);
|
||||
|
||||
#if _WIN32
|
||||
#if HAVE_WIN32
|
||||
/* note: no 127.0.0.1 on win32 systems */
|
||||
/* on win32, query the registry for nameservers */
|
||||
if (sres_parse_win32_ip(c) == 0 || sres_parse_win32_reg(c) == 0)
|
||||
@ -2403,7 +2403,7 @@ int sres_parse_nameserver(sres_config_t *c, char const *server)
|
||||
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)
|
||||
|
@ -117,9 +117,9 @@ struct sres_cache
|
||||
#define LOCK(cache) (su_home_mutex_lock((cache)->cache_home) == 0)
|
||||
#define UNLOCK(cache) (su_home_mutex_unlock((cache)->cache_home))
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void _sres_cache_free_one(sres_cache_t *cache, sres_record_t *answer);
|
||||
static inline
|
||||
su_inline
|
||||
void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers);
|
||||
|
||||
static unsigned sres_hash_key(const char *string);
|
||||
@ -374,7 +374,7 @@ void sres_cache_free_one(sres_cache_t *cache, sres_record_t *answer)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/* Private functions */
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers)
|
||||
{
|
||||
int i;
|
||||
@ -390,7 +390,7 @@ void _sres_cache_free_answers(sres_cache_t *cache, sres_record_t **answers)
|
||||
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) {
|
||||
|
@ -122,7 +122,7 @@ static int tstflags = 0;
|
||||
#if HAVE_WINSOCK2_H
|
||||
|
||||
/* Posix send() */
|
||||
static inline
|
||||
su_inline
|
||||
ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
|
||||
{
|
||||
if (length > INT_MAX)
|
||||
@ -130,7 +130,7 @@ ssize_t sres_send(sres_socket_t s, void *b, size_t length, int flags)
|
||||
return (ssize_t)send(s, b, (int)length, flags);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
ssize_t sres_sendto(sres_socket_t s, void *b, size_t length, int flags,
|
||||
struct sockaddr const *sa, socklen_t salen)
|
||||
{
|
||||
@ -140,7 +140,7 @@ ssize_t sres_sendto(sres_socket_t s, void *b, size_t length, int flags,
|
||||
}
|
||||
|
||||
/* Posix recvfrom() */
|
||||
static inline
|
||||
su_inline
|
||||
ssize_t sres_recvfrom(sres_socket_t s, void *buffer, size_t length, int flags,
|
||||
struct sockaddr *from, socklen_t *fromlen)
|
||||
{
|
||||
@ -166,7 +166,7 @@ static sres_socket_t sres_socket(int af, int socktype, int protocol)
|
||||
return socket(af, socktype, protocol);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int sres_close(sres_socket_t s)
|
||||
{
|
||||
return closesocket(s);
|
||||
@ -1836,9 +1836,7 @@ int test_api_errors(sres_context_t *noctx)
|
||||
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;
|
||||
|
@ -34,16 +34,19 @@
|
||||
* @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;
|
||||
|
@ -45,14 +45,12 @@
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include <sofia-sip/su.h>
|
||||
#include <sofia-sip/su_localinfo.h>
|
||||
|
||||
|
||||
SOFIA_BEGIN_DECLS
|
||||
|
||||
/* Define Message Types */
|
||||
|
@ -42,9 +42,9 @@
|
||||
|
||||
#define SU_ROOT_MAGIC_T struct stun_magic_t
|
||||
|
||||
#include "sofia-sip/stun.h"
|
||||
#include <sofia-sip/stun.h>
|
||||
#include "stun_internal.h"
|
||||
#include "sofia-sip/stun_tag.h"
|
||||
#include <sofia-sip/stun_tag.h>
|
||||
|
||||
#include <sofia-sip/su_alloc.h>
|
||||
#include <sofia-sip/su_tagarg.h>
|
||||
@ -52,19 +52,14 @@
|
||||
#include <sofia-sip/su.h>
|
||||
#include <sofia-sip/su_localinfo.h>
|
||||
|
||||
#if HAVE_WINSOCK2_H
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#if HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_OPENSSL
|
||||
#include <openssl/opensslv.h>
|
||||
#endif
|
||||
|
||||
#if !defined(ETIMEDOUT) && defined(_WIN32)
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#endif
|
||||
|
||||
/* Missing socket symbols */
|
||||
#ifndef SOL_TCP
|
||||
#define SOL_TCP IPPROTO_TCP
|
||||
@ -1611,7 +1606,7 @@ int stun_make_sharedsecret_req(stun_msg_t *msg)
|
||||
|
||||
|
||||
/* Return action of the request. If no request, return default value */
|
||||
static inline
|
||||
su_inline
|
||||
stun_action_t get_action(stun_request_t *req)
|
||||
{
|
||||
stun_discovery_t *sd = NULL;
|
||||
@ -1626,7 +1621,7 @@ stun_action_t get_action(stun_request_t *req)
|
||||
|
||||
|
||||
/* 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;
|
||||
|
@ -68,6 +68,7 @@ nobase_include_sofia_HEADERS = \
|
||||
sofia-sip/su_config.h sofia-sip/su_md5.h \
|
||||
sofia-sip/su_uniqueid.h sofia-sip/su_bm.h \
|
||||
sofia-sip/tstdef.h sofia-sip/su_os_nw.h \
|
||||
sofia-sip/string0.h \
|
||||
$(OSXHEADERS)
|
||||
|
||||
nobase_nodist_include_sofia_HEADERS = sofia-sip/su_configure.h
|
||||
@ -86,7 +87,7 @@ libsu_la_SOURCES = \
|
||||
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 = \
|
||||
|
@ -28,9 +28,20 @@
|
||||
|
||||
#if HAVE_SELECT
|
||||
|
||||
#if HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include "sofia-sip/su.h"
|
||||
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "sofia-sip/su_wait.h"
|
||||
|
@ -83,7 +83,7 @@ typedef unsigned long hash_value_t;
|
||||
|
||||
#ifndef HTABLE_SCOPE
|
||||
/** Default scope for hash table functions. */
|
||||
#define HTABLE_SCOPE static inline
|
||||
#define HTABLE_SCOPE su_inline
|
||||
#endif
|
||||
|
||||
/** Prototypes for hash table
|
||||
|
@ -84,7 +84,7 @@ struct sname { \
|
||||
|
||||
#ifndef HTABLE2_SCOPE
|
||||
/** Default scope for hash table functions. */
|
||||
#define HTABLE2_SCOPE static inline
|
||||
#define HTABLE2_SCOPE su_inline
|
||||
#endif
|
||||
|
||||
/** Prototypes for hash table
|
||||
|
@ -62,7 +62,7 @@ typedef struct node Type;
|
||||
*/
|
||||
|
||||
#define RBTREE_LEFT_ROTATE(prefix, Type, left, right, parent) \
|
||||
static inline \
|
||||
su_inline \
|
||||
void prefix ## _left_rotate(Type **top, Type *x) \
|
||||
{ \
|
||||
Type *c = right(x), *dad = parent(x); assert(c); \
|
||||
@ -90,7 +90,7 @@ extern int const prefix##_dummy
|
||||
*/
|
||||
|
||||
#define RBTREE_RIGHT_ROTATE(prefix, Type, left, right, parent) \
|
||||
static inline \
|
||||
su_inline \
|
||||
void prefix ## _right_rotate(Type **top, Type *x) \
|
||||
{ \
|
||||
Type *c = left(x), *dad = parent(x); assert(c); \
|
||||
@ -111,7 +111,7 @@ void prefix ## _right_rotate(Type **top, Type *x) \
|
||||
extern int const prefix##_dummy
|
||||
|
||||
#define RBTREE_BALANCE_INSERT1(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK) \
|
||||
static inline \
|
||||
su_inline \
|
||||
void prefix ## _balance_insert(Type **top, Type *node) \
|
||||
{ \
|
||||
Type *dad, *uncle, *granddad; \
|
||||
@ -127,7 +127,7 @@ extern int const prefix##_dummy
|
||||
* RED(node) - set node as red
|
||||
*/
|
||||
#define RBTREE_BALANCE_INSERT(prefix, Type, left, right, parent, IS_RED, SET_RED, IS_BLACK, SET_BLACK) \
|
||||
static inline \
|
||||
su_inline \
|
||||
void prefix ## _balance_insert(Type **top, Type *node) \
|
||||
{ \
|
||||
Type *dad, *uncle, *granddad; \
|
||||
@ -179,7 +179,7 @@ extern int const prefix##_dummy
|
||||
#define RBTREE_BALANCE_DELETE(prefix, Type, left, right, parent, \
|
||||
IS_RED, SET_RED, IS_BLACK, SET_BLACK, \
|
||||
COPY_COLOR) \
|
||||
static inline \
|
||||
su_inline \
|
||||
void prefix##_balance_delete(Type **top, Type *node) \
|
||||
{ \
|
||||
Type *dad, *brother; \
|
||||
@ -586,13 +586,13 @@ extern int const prefix##_dummy
|
||||
|
||||
/** Define prototypes for red-black tree functions. @HIDE
|
||||
*
|
||||
* @param SCOPE function scope (e.g., static inline)
|
||||
* @param SCOPE function scope (e.g., su_inline)
|
||||
* @param prefix function prefix (e.g., rbtree)
|
||||
* @param Type node type
|
||||
*
|
||||
* @par Example
|
||||
* @code
|
||||
* RBTREE_PROTOS(static inline, rbtree, struct node);
|
||||
* RBTREE_PROTOS(su_inline, rbtree, struct node);
|
||||
* @endcode
|
||||
*/
|
||||
#define RBTREE_PROTOS(SCOPE, prefix, Type) \
|
||||
@ -607,7 +607,7 @@ extern int const prefix##_dummy
|
||||
|
||||
/** Define bodies for red-black tree functions. @HIDE
|
||||
*
|
||||
* @param SCOPE function scope (e.g., static inline)
|
||||
* @param SCOPE function scope (e.g., su_inline)
|
||||
* @param prefix function prefix (e.g., rbtree)
|
||||
* @param Type node type
|
||||
* @param left accessor of left node
|
||||
@ -638,7 +638,7 @@ extern int const prefix##_dummy
|
||||
* #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);
|
||||
|
@ -37,10 +37,10 @@
|
||||
/* Includes */
|
||||
|
||||
#ifndef SU_CONFIG_H
|
||||
#include "sofia-sip/su_config.h"
|
||||
#include <sofia-sip/su_config.h>
|
||||
#endif
|
||||
#ifndef SU_TYPES_H
|
||||
#include "sofia-sip/su_types.h"
|
||||
#include <sofia-sip/su_types.h>
|
||||
#endif
|
||||
#ifndef SU_ERRNO_H
|
||||
#include <sofia-sip/su_errno.h>
|
||||
|
@ -21,7 +21,6 @@
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SU_CONFIG_H
|
||||
/** Defined when <sofia-sip/su_config.h> has been included. */
|
||||
#define SU_CONFIG_H
|
||||
@ -36,7 +35,9 @@
|
||||
* @date Created: Thu Mar 18 19:40:51 1999 pessi
|
||||
*/
|
||||
|
||||
#include <sofia-sip/su_configure.h>
|
||||
#ifndef SU_CONFIGURE_H
|
||||
#include "sofia-sip/su_configure.h"
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
/* Special attributes for GNU C */
|
||||
@ -83,18 +84,39 @@
|
||||
#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
|
||||
|
@ -108,7 +108,7 @@ SU_DLL su_strlst_t *su_strlst_dup_split(su_home_t *, char const *s,
|
||||
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;
|
||||
|
@ -194,12 +194,12 @@ su_inline tag_value_t tag_str_v(char const *v) { return (tag_value_t)v; }
|
||||
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;}
|
||||
|
@ -56,7 +56,7 @@ SOFIA_BEGIN_DECLS
|
||||
#define TAG_TYPE_OF(t) ((t) && (t)->t_tag ? (t)->t_tag : tag_null)
|
||||
|
||||
/** Check if the tag item is last in current list */
|
||||
static inline int t_end(tagi_t const *t)
|
||||
su_inline int t_end(tagi_t const *t)
|
||||
{
|
||||
tag_type_t tt = TAG_TYPE_OF(t);
|
||||
|
||||
@ -65,7 +65,7 @@ static inline int t_end(tagi_t const *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);
|
||||
|
||||
@ -75,7 +75,7 @@ static inline tagi_t const *t_next(tagi_t const *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);
|
||||
|
||||
@ -86,7 +86,7 @@ static inline tagi_t *t_move(tagi_t *dst, tagi_t const *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);
|
||||
|
||||
@ -96,7 +96,7 @@ static inline size_t t_xtra(tagi_t const *t, size_t offset)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline tagi_t *t_dup(tagi_t *dst, tagi_t const *src, void **bb)
|
||||
su_inline tagi_t *t_dup(tagi_t *dst, tagi_t const *src, void **bb)
|
||||
{
|
||||
tag_type_t tt = TAG_TYPE_OF(src);
|
||||
|
||||
@ -107,7 +107,7 @@ static inline tagi_t *t_dup(tagi_t *dst, tagi_t const *src, void **bb)
|
||||
return dst + 1;
|
||||
}
|
||||
|
||||
static inline tagi_t const *t_find(tag_type_t tt, tagi_t const *lst)
|
||||
su_inline tagi_t const *t_find(tag_type_t tt, tagi_t const *lst)
|
||||
{
|
||||
if (!tt)
|
||||
return NULL;
|
||||
@ -123,7 +123,7 @@ static inline tagi_t const *t_find(tag_type_t tt, tagi_t const *lst)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline tagi_t *t_free(tagi_t *t)
|
||||
su_inline tagi_t *t_free(tagi_t *t)
|
||||
{
|
||||
tag_type_t tt = TAG_TYPE_OF(t);
|
||||
|
||||
@ -135,7 +135,7 @@ static inline tagi_t *t_free(tagi_t *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);
|
||||
|
||||
|
@ -68,7 +68,7 @@ SU_DLL int su_vector_empty(su_vector_t *vector);
|
||||
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;
|
||||
|
@ -378,7 +378,10 @@ typedef struct su_msg_s su_msg_t;
|
||||
/** Message reference type. */
|
||||
typedef su_msg_t *su_msg_r[1];
|
||||
|
||||
/** Contstant reference to su_msg */
|
||||
/** Constant reference to su_msg.
|
||||
*
|
||||
* @note The reference is constant, but the message can be modified.
|
||||
*/
|
||||
typedef su_msg_t * const su_msg_cr[1];
|
||||
|
||||
/** Initializer for a message reference. @HI */
|
||||
@ -424,7 +427,7 @@ SOFIAPUBFUN int su_wait_events(su_wait_t *wait, su_socket_t s);
|
||||
SOFIAPUBFUN int su_wait_mask(su_wait_t *dst, su_socket_t s, int events);
|
||||
|
||||
#if !HAVE_WIN32 && (SU_HAVE_POLL || HAVE_SELECT)
|
||||
static inline
|
||||
su_inline
|
||||
su_socket_t su_wait_socket(su_wait_t *wait)
|
||||
{
|
||||
#if SU_HAVE_KQUEUE
|
||||
@ -513,7 +516,7 @@ SOFIAPUBFUN int su_msg_create(su_msg_r msg,
|
||||
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);
|
||||
|
@ -29,8 +29,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sofia-sip/su_addrinfo.h>
|
||||
#include <sofia-sip/su.h>
|
||||
#include <sofia-sip/su_addrinfo.h>
|
||||
|
||||
#ifndef IN_LOOPBACKNET
|
||||
#define IN_LOOPBACKNET 127
|
||||
|
@ -275,7 +275,7 @@ size_t su_block_find_collision, su_block_find_collision_used,
|
||||
su_block_find_collision_size;
|
||||
#endif
|
||||
|
||||
static inline su_alloc_t *su_block_find(su_block_t *b, void const *p)
|
||||
su_inline su_alloc_t *su_block_find(su_block_t *b, void const *p)
|
||||
{
|
||||
size_t h, h0, probe;
|
||||
|
||||
@ -315,7 +315,7 @@ static inline su_alloc_t *su_block_find(su_block_t *b, void const *p)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline su_alloc_t *su_block_add(su_block_t *b, void *p)
|
||||
su_inline su_alloc_t *su_block_add(su_block_t *b, void *p)
|
||||
{
|
||||
size_t h, probe;
|
||||
|
||||
@ -337,7 +337,7 @@ static inline su_alloc_t *su_block_add(su_block_t *b, void *p)
|
||||
return &b->sub_nodes[h];
|
||||
}
|
||||
|
||||
static inline int su_is_preloaded(su_block_t const *sub, char *data)
|
||||
su_inline int su_is_preloaded(su_block_t const *sub, char *data)
|
||||
{
|
||||
return
|
||||
sub->sub_preload &&
|
||||
@ -345,7 +345,7 @@ static inline int su_is_preloaded(su_block_t const *sub, char *data)
|
||||
sub->sub_preload + sub->sub_prsize > data;
|
||||
}
|
||||
|
||||
static inline int su_alloc_check(su_block_t const *sub, su_alloc_t const *sua)
|
||||
su_inline int su_alloc_check(su_block_t const *sub, su_alloc_t const *sua)
|
||||
{
|
||||
#if MEMCHECK_EXTRA
|
||||
size_t size, term;
|
||||
@ -375,7 +375,7 @@ static inline int su_alloc_check(su_block_t const *sub, su_alloc_t const *sua)
|
||||
* 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]));
|
||||
|
||||
|
@ -363,7 +363,7 @@ li_scope4(uint32_t ip4)
|
||||
|
||||
#if HAVE_WINSOCK2_H
|
||||
#define IN6_IS_ADDR_LOOPBACK SU_IN6_IS_ADDR_LOOPBACK
|
||||
static inline int
|
||||
su_inline int
|
||||
IN6_IS_ADDR_LOOPBACK(void const *ip6)
|
||||
{
|
||||
uint8_t const *u = ip6;
|
||||
@ -608,6 +608,8 @@ int localinfo4(su_localinfo_t const *hints, su_localinfo_t **rresult)
|
||||
if_name, if_index));
|
||||
continue;
|
||||
}
|
||||
#elif defined(SIOCGIFACTIVECONF)
|
||||
/* Handled above in SIOCGIFACTIVECONF vs. SIOCGIFCONF*/
|
||||
#else
|
||||
#error su_localinfo() cannot determine interface status
|
||||
#endif
|
||||
|
@ -182,55 +182,55 @@ typedef struct su_virtual_port_s {
|
||||
su_port_vtable_t const *sup_vtable;
|
||||
} su_virtual_port_t;
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
su_home_t *su_port_home(su_port_t const *self)
|
||||
{
|
||||
return (su_home_t *)self;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_lock(su_port_t *self, char const *who)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
if (base) base->sup_vtable->su_port_lock(self, who);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_unlock(su_port_t *self, char const *who)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
if (base) base->sup_vtable->su_port_unlock(self, who);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_incref(su_port_t *self, char const *who)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
if (base) base->sup_vtable->su_port_incref(self, who);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_decref(su_port_t *self, char const *who)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
if (base) base->sup_vtable->su_port_decref(self, 0, who);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_zapref(su_port_t *self, char const *who)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
if (base) base->sup_vtable->su_port_decref(self, 1, who);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
struct _GSource *su_port_gsource(su_port_t *self)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
return base ? base->sup_vtable->su_port_gsource(self) : NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_send(su_port_t *self, su_msg_r rmsg)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -241,7 +241,7 @@ int su_port_send(su_port_t *self, su_msg_r rmsg)
|
||||
}
|
||||
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_register(su_port_t *self,
|
||||
su_root_t *root,
|
||||
su_wait_t *wait,
|
||||
@ -257,7 +257,7 @@ int su_port_register(su_port_t *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_unregister(su_port_t *self,
|
||||
su_root_t *root,
|
||||
su_wait_t *wait,
|
||||
@ -272,7 +272,7 @@ int su_port_unregister(su_port_t *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_deregister(su_port_t *self, int i)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -282,7 +282,7 @@ int su_port_deregister(su_port_t *self, int i)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_unregister_all(su_port_t *self,
|
||||
su_root_t *root)
|
||||
{
|
||||
@ -294,7 +294,7 @@ int su_port_unregister_all(su_port_t *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_eventmask(su_port_t *self, int index, int socket, int events)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -306,7 +306,7 @@ int su_port_eventmask(su_port_t *self, int index, int socket, int events)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
void su_port_run(su_port_t *self)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -314,7 +314,7 @@ void su_port_run(su_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;
|
||||
@ -322,7 +322,7 @@ void su_port_break(su_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;
|
||||
@ -333,14 +333,14 @@ su_duration_t su_port_step(su_port_t *self, su_duration_t tout)
|
||||
}
|
||||
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_own_thread(su_port_t const *self)
|
||||
{
|
||||
su_virtual_port_t const *base = (su_virtual_port_t *)self;
|
||||
return base == NULL || base->sup_vtable->su_port_own_thread(self);
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_add_prepoll(su_port_t *self,
|
||||
su_root_t *root,
|
||||
su_prepoll_f *prepoll,
|
||||
@ -354,7 +354,7 @@ int su_port_add_prepoll(su_port_t *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_remove_prepoll(su_port_t *self,
|
||||
su_root_t *root)
|
||||
{
|
||||
@ -365,7 +365,7 @@ int su_port_remove_prepoll(su_port_t *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
su_timer_t **su_port_timers(su_port_t *self)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -375,7 +375,7 @@ su_timer_t **su_port_timers(su_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;
|
||||
@ -387,7 +387,7 @@ int su_port_multishot(su_port_t *self, int multishot)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int su_port_threadsafe(su_port_t *self)
|
||||
{
|
||||
su_virtual_port_t *base = (su_virtual_port_t *)self;
|
||||
@ -399,7 +399,7 @@ int su_port_threadsafe(su_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;
|
||||
@ -407,7 +407,7 @@ int su_port_getmsgs(su_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;
|
||||
|
@ -217,7 +217,11 @@ int su_pthreaded_port_start(su_port_create_f *create,
|
||||
/* init: */ NULL,
|
||||
/* deinit: */ NULL,
|
||||
/* mutex: */ { PTHREAD_MUTEX_INITIALIZER },
|
||||
#if HAVE_OPEN_C
|
||||
/* cv: */ { _ENeedsNormalInit, NULL },
|
||||
#else
|
||||
/* cv: */ { PTHREAD_COND_INITIALIZER },
|
||||
#endif
|
||||
/* retval: */ -1,
|
||||
/* clone: */ SU_MSG_R_INIT,
|
||||
};
|
||||
@ -451,11 +455,19 @@ int su_pthread_port_execute(su_task_r const task,
|
||||
{
|
||||
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)
|
||||
|
@ -908,7 +908,7 @@ int su_msg_reply(su_msg_r reply, su_msg_r const msg,
|
||||
|
||||
assert(msg != reply);
|
||||
|
||||
*msg0 = *msg;
|
||||
*msg0 = *(su_msg_t **) msg;
|
||||
*reply = NULL;
|
||||
|
||||
return su_msg_create(reply, su_msg_from(msg0), su_msg_to(msg0), wakeup, size);
|
||||
@ -1016,7 +1016,7 @@ isize_t su_msg_size(su_msg_cr rmsg)
|
||||
*
|
||||
* @return The task handle of the sender is returned.
|
||||
*/
|
||||
_su_task_r su_msg_from(su_msg_r const msg)
|
||||
_su_task_r su_msg_from(su_msg_cr msg)
|
||||
{
|
||||
return msg[0] ? msg[0]->sum_from : NULL;
|
||||
}
|
||||
@ -1033,7 +1033,7 @@ _su_task_r su_msg_from(su_msg_r const msg)
|
||||
*
|
||||
* @return The task handle of the recipient is returned.
|
||||
*/
|
||||
_su_task_r su_msg_to(su_msg_r const msg)
|
||||
_su_task_r su_msg_to(su_msg_cr msg)
|
||||
{
|
||||
return msg[0] ? msg[0]->sum_to : NULL;
|
||||
}
|
||||
@ -1042,7 +1042,7 @@ _su_task_r su_msg_to(su_msg_r const msg)
|
||||
*
|
||||
* @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);
|
||||
|
@ -560,7 +560,7 @@ int su_select_port_wait_events(su_port_t *self, su_duration_t tout)
|
||||
if (self->sup_maxfd == 0)
|
||||
su_select_port_update_maxfd(self);
|
||||
|
||||
bytes = self->sup_maxfd ? FDSETSIZE(self->sup_maxfd - 1) : 0;
|
||||
bytes = FDSETSIZE(self->sup_maxfd);
|
||||
|
||||
if (bytes) {
|
||||
rset = memcpy(self->sup_readfds2, self->sup_readfds, bytes);
|
||||
@ -572,13 +572,15 @@ int su_select_port_wait_events(su_port_t *self, su_duration_t tout)
|
||||
|
||||
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;
|
||||
|
@ -576,7 +576,7 @@ char *su_strlst_join(su_strlst_t *self, su_home_t *home, char const *sep)
|
||||
return su_strdup(home, "");
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
su_strlst_t *
|
||||
su_strlst_split0(su_strlst_t *l, char *str, char const *sep)
|
||||
{
|
||||
|
@ -356,7 +356,7 @@ tagi_t *tl_find_last(tagi_t const lst[], tag_type_t tt)
|
||||
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)
|
||||
|
@ -180,16 +180,16 @@ enum sut_running {
|
||||
#define REMOVE(sut) ((sut)->sut_set = 0, \
|
||||
(sut)->sut_left = (sut)->sut_right = (sut)->sut_parent = NULL)
|
||||
|
||||
RBTREE_PROTOS(static inline, timers, su_timer_t);
|
||||
RBTREE_PROTOS(su_inline, timers, su_timer_t);
|
||||
|
||||
static inline int timers_append(su_timer_t **, su_timer_t *);
|
||||
static inline void timers_remove(su_timer_t **, su_timer_t *);
|
||||
static inline su_timer_t *timers_succ(su_timer_t const *);
|
||||
static inline su_timer_t *timers_prec(su_timer_t const *);
|
||||
static inline su_timer_t *timers_first(su_timer_t const *);
|
||||
static inline su_timer_t *timers_last(su_timer_t const *);
|
||||
su_inline int timers_append(su_timer_t **, su_timer_t *);
|
||||
su_inline void timers_remove(su_timer_t **, su_timer_t *);
|
||||
su_inline su_timer_t *timers_succ(su_timer_t const *);
|
||||
su_inline su_timer_t *timers_prec(su_timer_t const *);
|
||||
su_inline su_timer_t *timers_first(su_timer_t const *);
|
||||
su_inline su_timer_t *timers_last(su_timer_t const *);
|
||||
|
||||
RBTREE_BODIES(static inline, timers, su_timer_t,
|
||||
RBTREE_BODIES(su_inline, timers, su_timer_t,
|
||||
LEFT, RIGHT, PARENT,
|
||||
IS_RED, SET_RED, IS_BLACK, SET_BLACK, COPY_COLOR,
|
||||
CMP, INSERT, REMOVE);
|
||||
@ -198,7 +198,7 @@ RBTREE_BODIES(static inline, timers, su_timer_t,
|
||||
*
|
||||
* @retval 0 when successful (always)
|
||||
*/
|
||||
static inline int
|
||||
su_inline int
|
||||
su_timer_set0(su_timer_t **timers,
|
||||
su_timer_t *t,
|
||||
su_timer_f wakeup,
|
||||
@ -220,7 +220,7 @@ su_timer_set0(su_timer_t **timers,
|
||||
*
|
||||
* @retval 0 when successful (always)
|
||||
*/
|
||||
static inline int
|
||||
su_inline int
|
||||
su_timer_reset0(su_timer_t **timers,
|
||||
su_timer_t *t)
|
||||
{
|
||||
|
@ -73,9 +73,9 @@ char const *name = "torture_rbtree";
|
||||
#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);
|
||||
|
||||
|
@ -698,6 +698,9 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
#if HAVE_OPEN_C
|
||||
tstflags |= tst_verbatim;
|
||||
#endif
|
||||
|
||||
retval |= test_alloc();
|
||||
retval |= test_strdupcat();
|
||||
|
@ -59,7 +59,11 @@ int tstflags;
|
||||
|
||||
char const *name = "torture_su_port";
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
int const N0 = SU_MBOX_SIZE > 0, N = 63, I = 64;
|
||||
#else
|
||||
int const N0 = SU_MBOX_SIZE > 0, N = 128, I = 129;
|
||||
#endif
|
||||
|
||||
int test_sup_indices(su_port_t const *port)
|
||||
{
|
||||
@ -331,6 +335,10 @@ int main(int argc, char *argv[])
|
||||
usage(1);
|
||||
}
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
tstflags |= tst_verbatim;
|
||||
#endif
|
||||
|
||||
su_init();
|
||||
|
||||
retval |= test_register(); fflush(stdout);
|
||||
|
@ -89,6 +89,8 @@ struct root_test_s {
|
||||
unsigned rt_recv_reporter:1;
|
||||
unsigned rt_reported_reporter:1;
|
||||
|
||||
unsigned rt_executed:1;
|
||||
|
||||
unsigned :0;
|
||||
|
||||
test_ep_at rt_ep[5];
|
||||
@ -469,11 +471,19 @@ void send_a_reporter_msg(root_test_t *rt,
|
||||
rt->rt_sent_reporter = 1;
|
||||
}
|
||||
|
||||
static int set_execute_bit_and_return_3(void *void_rt)
|
||||
{
|
||||
root_test_t *rt = void_rt;
|
||||
rt->rt_executed = 1;
|
||||
return 3;
|
||||
}
|
||||
|
||||
static int clone_test(root_test_t rt[1])
|
||||
{
|
||||
BEGIN();
|
||||
|
||||
su_msg_r m = SU_MSG_R_INIT;
|
||||
int retval;
|
||||
|
||||
rt->rt_fail_init = 0;
|
||||
rt->rt_fail_deinit = 0;
|
||||
@ -499,6 +509,15 @@ static int clone_test(root_test_t rt[1])
|
||||
TEST_1(rt->rt_success_init);
|
||||
TEST_1(!rt->rt_success_deinit);
|
||||
|
||||
retval = -1;
|
||||
rt->rt_executed = 0;
|
||||
TEST(su_task_execute(su_clone_task(rt->rt_clone),
|
||||
set_execute_bit_and_return_3, rt,
|
||||
&retval), 0);
|
||||
TEST(retval, 3);
|
||||
TEST_1(rt->rt_executed);
|
||||
|
||||
|
||||
/* Make sure 3-way handshake is done as expected */
|
||||
TEST(su_msg_create(m,
|
||||
su_clone_task(rt->rt_clone),
|
||||
@ -513,7 +532,7 @@ static int clone_test(root_test_t rt[1])
|
||||
TEST_1(rt->rt_sent_reporter);
|
||||
TEST_1(rt->rt_recv_reporter);
|
||||
TEST_1(rt->rt_reported_reporter);
|
||||
|
||||
|
||||
rt->rt_recv_reporter = 0;
|
||||
|
||||
/* Make sure we can handle messages done as expected */
|
||||
@ -587,6 +606,10 @@ int main(int argc, char *argv[])
|
||||
usage(1);
|
||||
}
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
rt->rt_flags |= tst_verbatim;
|
||||
#endif
|
||||
|
||||
i = 0;
|
||||
|
||||
do {
|
||||
|
@ -644,6 +644,10 @@ int main(int argc, char *argv[])
|
||||
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();
|
||||
|
@ -534,6 +534,7 @@ static int init_test(tp_test_t *tt)
|
||||
TAG_END()),
|
||||
0);
|
||||
|
||||
/* Check that the master transport has idle parameter */
|
||||
TEST(tport_get_params(tt->tt_srv_tports,
|
||||
TPTAG_IDLE_REF(idle),
|
||||
TAG_END()), 1);
|
||||
@ -552,6 +553,8 @@ static int init_test(tp_test_t *tt)
|
||||
|
||||
*rname = *myname;
|
||||
|
||||
/* Check that we cannot bind to an already used socket */
|
||||
|
||||
memset(su, 0, sulen = sizeof(su->su_sin));
|
||||
s = su_socket(su->su_family = AF_INET, SOCK_STREAM, 0); TEST_1(s != -1);
|
||||
TEST_1(bind(s, &su->su_sa, sulen) != -1);
|
||||
@ -565,7 +568,7 @@ static int init_test(tp_test_t *tt)
|
||||
|
||||
before = count_tports(tt->tt_srv_tports);
|
||||
|
||||
/* Bind server transports to an reserved port */
|
||||
/* Bind server transports to an reserved port - this should fail */
|
||||
TEST(tport_tbind(tt->tt_srv_tports, rname, transports,
|
||||
TPTAG_SERVER(1),
|
||||
TAG_END()),
|
||||
@ -573,8 +576,11 @@ static int init_test(tp_test_t *tt)
|
||||
|
||||
after = count_tports(tt->tt_srv_tports);
|
||||
|
||||
/* Check that no new primary transports has been added by failed call */
|
||||
TEST(before, after);
|
||||
|
||||
/* Add new transports to an ephemeral port with new identity */
|
||||
|
||||
for (tp = tport_primaries(tt->tt_srv_tports); tp; tp = tport_next(tp))
|
||||
TEST_S(tport_name(tp)->tpn_ident, "server");
|
||||
|
||||
@ -587,9 +593,10 @@ static int init_test(tp_test_t *tt)
|
||||
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))
|
||||
|
@ -104,7 +104,7 @@ static char const __func__[] = "tport";
|
||||
#define TP_INSERT(tp) ((void)0)
|
||||
#define TP_REMOVE(tp) ((tp)->tp_left = (tp)->tp_right = (tp)->tp_dad = NULL)
|
||||
|
||||
static inline int tp_cmp(tport_t const *a, tport_t const *b)
|
||||
su_inline int tp_cmp(tport_t const *a, tport_t const *b)
|
||||
{
|
||||
if (a == b)
|
||||
return 0;
|
||||
@ -115,14 +115,14 @@ static inline int tp_cmp(tport_t const *a, tport_t const *b)
|
||||
return memcmp(a->tp_addr, b->tp_addr, a->tp_addrlen);
|
||||
}
|
||||
|
||||
static inline int tprb_is_inserted(tport_t const *a)
|
||||
su_inline int tprb_is_inserted(tport_t const *a)
|
||||
{
|
||||
return a->tp_dad != 0 || a->tp_left != 0 || a->tp_right != 0;
|
||||
}
|
||||
|
||||
RBTREE_PROTOS(static inline, tprb, tport_t);
|
||||
RBTREE_PROTOS(su_inline, tprb, tport_t);
|
||||
|
||||
RBTREE_BODIES(static inline, tprb, tport_t,
|
||||
RBTREE_BODIES(su_inline, tprb, tport_t,
|
||||
TP_LEFT, TP_RIGHT, TP_PARENT,
|
||||
TP_IS_RED, TP_SET_RED, TP_IS_BLACK, TP_SET_BLACK, TP_COPY_COLOR,
|
||||
tp_cmp, TP_INSERT, TP_REMOVE);
|
||||
@ -280,7 +280,7 @@ inline int tport_is_shutdown(tport_t const *self)
|
||||
}
|
||||
|
||||
/** Test if transport is bound */
|
||||
static inline int tport_is_bound(tport_t const *self)
|
||||
su_inline int tport_is_bound(tport_t const *self)
|
||||
{
|
||||
return self->tp_protoname != NULL;
|
||||
}
|
||||
@ -292,12 +292,12 @@ int tport_is_connected(tport_t const *self)
|
||||
}
|
||||
|
||||
/** MTU for transport */
|
||||
static inline unsigned tport_mtu(tport_t const *self)
|
||||
su_inline unsigned tport_mtu(tport_t const *self)
|
||||
{
|
||||
return self->tp_params->tpp_mtu;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int tport_has_sigcomp(tport_t const *self)
|
||||
{
|
||||
return self->tp_name->tpn_comp != NULL;
|
||||
@ -1809,7 +1809,7 @@ tport_get_local_addrinfo(tport_master_t *mr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all);
|
||||
su_inline su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all);
|
||||
|
||||
/** Translate address and service.
|
||||
*
|
||||
@ -1905,7 +1905,7 @@ int tport_getaddrinfo(char const *node, char const *service,
|
||||
return EAI_MEMORY;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
su_addrinfo_t *get_next_addrinfo(su_addrinfo_t **all)
|
||||
{
|
||||
su_addrinfo_t *ai;
|
||||
@ -2049,7 +2049,7 @@ int tport_shutdown(tport_t *self, int how)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
unsigned long tport_now(void)
|
||||
{
|
||||
return su_now().tv_sec;
|
||||
@ -2655,7 +2655,7 @@ void tport_hup_event(tport_t *self)
|
||||
* @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);
|
||||
|
@ -349,13 +349,13 @@ struct tport_vtable
|
||||
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;
|
||||
}
|
||||
|
@ -811,14 +811,14 @@ tport_sigcomp_deliver(tport_t *self, msg_t *msg, su_time_t now)
|
||||
|
||||
#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)
|
||||
|
@ -282,7 +282,7 @@ static void thrp_udp_deinit(su_root_t *root, threadpool_t *thrp)
|
||||
su_msg_destroy(thrp->thrp_rmsg);
|
||||
}
|
||||
|
||||
static inline void
|
||||
su_inline void
|
||||
thrp_yield(threadpool_t *thrp)
|
||||
{
|
||||
tport_t *tp = thrp->thrp_tport->tptp_primary->pri_primary;
|
||||
@ -290,7 +290,7 @@ thrp_yield(threadpool_t *thrp)
|
||||
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;
|
||||
|
@ -1067,6 +1067,10 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
usage(1);
|
||||
}
|
||||
|
||||
#if HAVE_OPEN_C
|
||||
tstflags |= tst_verbatim;
|
||||
#endif
|
||||
|
||||
retval |= test_quote(); fflush(stdout);
|
||||
retval |= test_any(); fflush(stdout);
|
||||
|
@ -473,7 +473,7 @@ char const* url_scheme(enum url_type_e url_type)
|
||||
}
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
int url_type_is_opaque(enum url_type_e url_type)
|
||||
{
|
||||
return
|
||||
@ -497,7 +497,7 @@ void url_init(url_t *url, enum url_type_e type)
|
||||
}
|
||||
|
||||
/** Get url type */
|
||||
static inline
|
||||
su_inline
|
||||
enum url_type_e url_get_type(char const *scheme, size_t len)
|
||||
{
|
||||
#define test_scheme(s) \
|
||||
@ -1031,7 +1031,7 @@ isize_t url_xtra(url_t const *url)
|
||||
return xtra;
|
||||
}
|
||||
|
||||
static inline
|
||||
su_inline
|
||||
char *copy(char *buf, char *end, char const *src)
|
||||
{
|
||||
#if HAVE_MEMCCPY
|
||||
|
@ -247,7 +247,7 @@ void red_black_balance_delete(UrlMap **top, UrlMap *um)
|
||||
}
|
||||
|
||||
/** Compare paths. */
|
||||
static inline
|
||||
su_inline
|
||||
int urlmap_pathcmp(url_t const *a, url_t const *b, int *return_hostmatch)
|
||||
{
|
||||
int retval;
|
||||
|
129
libs/sofia-sip/m4/sac-coverage.m4
Normal file
129
libs/sofia-sip/m4/sac-coverage.m4
Normal file
@ -0,0 +1,129 @@
|
||||
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")
|
||||
|
||||
])
|
@ -123,25 +123,7 @@ AC_SUBST([CWFLAG], [$ac_cv_cwflag])
|
||||
|
||||
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 ======================================================================
|
||||
|
@ -28,6 +28,7 @@ AC_SYS_IP_RECVERR
|
||||
AC_SYS_IPV6_RECVERR
|
||||
|
||||
AC_CHECK_HEADERS([netinet/tcp.h netinet/sctp.h],[],[],[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
])
|
||||
|
||||
|
33
libs/sofia-sip/open_c/autogen.cmd
Normal file
33
libs/sofia-sip/open_c/autogen.cmd
Normal file
@ -0,0 +1,33 @@
|
||||
::
|
||||
:: Prepare pristine Sofia SIP source tree for Visual C
|
||||
::
|
||||
:: NOTE: this script requires gawk - see http://unxutils.sourceforge.net
|
||||
::
|
||||
:: This file is part of the Sofia-SIP package
|
||||
::
|
||||
:: Copyright (C) 2007 Nokia Corporation.
|
||||
::
|
||||
:: Contact: Martti Mela <martti.mela@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
|
120
libs/sofia-sip/open_c/build_sources.cmd
Normal file
120
libs/sofia-sip/open_c/build_sources.cmd
Normal file
@ -0,0 +1,120 @@
|
||||
::
|
||||
:: 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
|
444
libs/sofia-sip/open_c/config.h.in
Normal file
444
libs/sofia-sip/open_c/config.h.in
Normal file
@ -0,0 +1,444 @@
|
||||
/* config.h. Generated by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to the random number source name. */
|
||||
/* #undef DEV_URANDOM */
|
||||
|
||||
/* Define to 1 if you have addrinfo structure. */
|
||||
#define HAVE_ADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `alarm' function. */
|
||||
/* #undef HAVE_ALARM */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
/* #undef HAVE_ALLOCA */
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H 1 */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the `clock_getcpuclockid' function. */
|
||||
/* #undef HAVE_CLOCK_GETCPUCLOCKID */
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
/* #undef HAVE_CLOCK_GETTIME */
|
||||
|
||||
/* Define to 1 if you have /dev/urandom. */
|
||||
/* #undef HAVE_DEV_URANDOM */
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have epoll interface. */
|
||||
/* #undef HAVE_EPOLL */
|
||||
|
||||
/* Define to 1 if you have the `epoll_create' function. */
|
||||
/* #undef HAVE_EPOLL_CREATE */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have WIN32 FILETIME type and GetSystemTimeAsFileTime().
|
||||
*/
|
||||
/* #undef HAVE_FILETIME */
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
/* #undef HAVE_FLOCK */
|
||||
|
||||
/* Define to 1 if you have the `freeaddrinfo' function. */
|
||||
#define HAVE_FREEADDRINFO 1
|
||||
|
||||
/* Define to 1 if the C compiler supports __func__ */
|
||||
#define HAVE_FUNC 1
|
||||
|
||||
/* Define to 1 if the C compiler supports __FUNCTION__ */
|
||||
#define HAVE_FUNCTION 1
|
||||
|
||||
/* Define to 1 if you have the `gai_strerror' function. */
|
||||
#define HAVE_GAI_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getdelim' function. */
|
||||
/* #undef HAVE_GETDELIM */
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define to 1 if you have the `getifaddrs' function. */
|
||||
/* #undef HAVE_GETIFADDRS 1 */
|
||||
|
||||
/* Define to 1 if you have the `getipnodebyname' function. */
|
||||
#define HAVE_GETIPNODEBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the `getline' function. */
|
||||
/* #undef HAVE_GETLINE */
|
||||
|
||||
/* Define to 1 if you have the `getnameinfo' function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getpass' function. */
|
||||
#define HAVE_GETPASS 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <ifaddr.h> header file. */
|
||||
/* #undef HAVE_IFADDR_H */
|
||||
|
||||
/* Define to 1 if you have SIOCGIFCONF */
|
||||
#define HAVE_IFCONF 1
|
||||
|
||||
/* Define to 1 if you have SIOCGIFNUM ioctl */
|
||||
/* #undef HAVE_IFNUM */
|
||||
|
||||
/* Define to 1 if you have ifr_ifindex in <net/if.h> */
|
||||
/* #undef HAVE_IFR_IFINDEX */
|
||||
|
||||
/* Define to 1 if you have ifr_index in <net/if.h> */
|
||||
#define HAVE_IFR_INDEX 1
|
||||
|
||||
/* Define to 1 if you have the `if_nameindex' function. */
|
||||
#define HAVE_IF_NAMEINDEX 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntop' function. */
|
||||
#define HAVE_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the `initstate' function. */
|
||||
#define HAVE_INITSTATE 1
|
||||
|
||||
/* Define to 1 if you have inlining compiler */
|
||||
#define HAVE_INLINE 1
|
||||
|
||||
/* Define to 1 if you have WIN32 INTERFACE_INFO_EX type. */
|
||||
/* #undef HAVE_INTERFACE_INFO_EX */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <iphlpapi.h> header file. */
|
||||
/* #undef HAVE_IPHLPAPI_H */
|
||||
|
||||
/* Define to 1 if you have IPV6_RECVERR in <netinet/in6.h> */
|
||||
/* #undef HAVE_IPV6_RECVERR */
|
||||
|
||||
/* Define to 1 if you have IP_RECVERR in <netinet/in.h> */
|
||||
/* #undef HAVE_IP_RECVERR */
|
||||
|
||||
/* Define to 1 if you have the `kqueue' function. */
|
||||
/* #undef HAVE_KQUEUE 1 */
|
||||
|
||||
/* Define to 1 if you use kqueue in su_port. */
|
||||
/* #undef HAVE_KQUEUE_PORT 1 */
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#define HAVE_LIBPTHREAD 1
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#define HAVE_LIBSSL 1
|
||||
|
||||
/* Define to 1 if you have the `memccpy' function. */
|
||||
#define HAVE_MEMCCPY 1
|
||||
|
||||
/* Define to 1 if you have the `memcspn' function. */
|
||||
/* #undef HAVE_MEMCSPN */
|
||||
|
||||
/* Define to 1 if you have the `memmem' function. */
|
||||
/* #undef HAVE_MEMMEM */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `memspn' function. */
|
||||
/* #undef HAVE_MEMSPN */
|
||||
|
||||
/* Define to 1 if you are compiling in MinGW environment */
|
||||
/* #undef HAVE_MINGW */
|
||||
|
||||
/* Define to 1 if you have MSG_TRUNC flag */
|
||||
#define HAVE_MSG_TRUNC 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/sctp.h> header file. */
|
||||
/* #undef HAVE_NETINET_SCTP_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_H */
|
||||
|
||||
/* Define to 1 if you have the <netpacket/packet.h> header file. */
|
||||
/* #undef HAVE_NETPACKET_PACKET_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if_types.h> header file. */
|
||||
/* #undef HAVE_NET_IF_TYPES_H 1 */
|
||||
|
||||
/* Define to 1 if you have OpenSSL */
|
||||
#define HAVE_OPENSSL 1
|
||||
|
||||
/* Define to 1 if you have the <openssl/tls1.h> header file. */
|
||||
#define HAVE_OPENSSL_TLS1_H 1
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
/* #undef HAVE_POLL 1 */
|
||||
|
||||
/* Define to 1 if you use poll in su_port. */
|
||||
#define HAVE_POLL_PORT 1
|
||||
|
||||
/* Define to 1 if you have /proc/net/if_inet6 control file */
|
||||
/* #undef HAVE_PROC_NET_IF_INET6 */
|
||||
|
||||
/* Define to 1 if you have working pthread_rwlock_t implementation. A thread
|
||||
may hold multiple concurrent read locks on rwlock - that is, successfully
|
||||
call the pthread_rwlock_rdlock() function n times. If so, the application
|
||||
shall ensure that the thread performs matching unlocks - that is, it calls
|
||||
the pthread_rwlock_unlock() function n times. */
|
||||
#define HAVE_PTHREAD_RWLOCK 1
|
||||
|
||||
/* Define to 1 if you have the `random' function. */
|
||||
#define HAVE_RANDOM 1
|
||||
|
||||
/* Define to 1 if you have sa_len in struct sockaddr */
|
||||
/* #undef HAVE_SA_LEN */
|
||||
|
||||
/* Define to 1 if you have SCTP */
|
||||
/* #undef HAVE_SCTP */
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have Sofia sigcomp >= 2.5 */
|
||||
/* #undef HAVE_SIGCOMP */
|
||||
|
||||
/* Define to 1 if you have the <sigcomp.h> header file. */
|
||||
/* #undef HAVE_SIGCOMP_H */
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
/* #undef HAVE_SIGNAL */
|
||||
|
||||
/* Define to 1 if you have SIGPIPE */
|
||||
/* #undef HAVE_SIGPIPE */
|
||||
|
||||
/* Define to 1 if you have IPv6 structures and constants */
|
||||
/* #undef HAVE_SIN6 */
|
||||
|
||||
/* Define to 1 if you have WIN32 WSAIoctl SIO_ADDRESS_LIST_QUERY. */
|
||||
/* #undef HAVE_SIO_ADDRESS_LIST_QUERY */
|
||||
|
||||
/* Define to 1 if you have the `socketpair' function. */
|
||||
/* #undef HAVE_SOCKETPAIR */
|
||||
|
||||
/* Define to 1 if we use NTH library */
|
||||
/* #undef HAVE_SOFIA_NTH */
|
||||
|
||||
/* Define to 1 if we use NTLM library */
|
||||
/* #undef HAVE_SOFIA_NTLM */
|
||||
|
||||
/* Define to 1 if you have Sofia sigcomp >= 2.5 */
|
||||
/* #undef HAVE_SOFIA_SIGCOMP */
|
||||
|
||||
/* Define to 1 always */
|
||||
#define HAVE_SOFIA_SIP 1
|
||||
|
||||
/* Define to 1 if we use S/MIME library */
|
||||
#define HAVE_SOFIA_SMIME 0
|
||||
|
||||
/* Define to 1 if we use DNS library */
|
||||
#define HAVE_SOFIA_SRESOLV 1
|
||||
|
||||
/* Define to 1 if we use STUN library */
|
||||
#define HAVE_SOFIA_STUN 1
|
||||
|
||||
/* Define to 1 if we use SRTP */
|
||||
#define HAVE_SRTP 0
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasestr' function. */
|
||||
#define HAVE_STRCASESTR 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strtoull' function. */
|
||||
/* #undef HAVE_STRTOULL */
|
||||
|
||||
/* Define to 1 if your CC supports C99 struct initialization */
|
||||
#define HAVE_STRUCT_KEYWORDS 1
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
/* #undef HAVE_SYS_EPOLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/event.h> header file. */
|
||||
#define HAVE_SYS_EVENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
/* #undef HAVE_SYS_FILIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#define HAVE_TCSETATTR 1
|
||||
|
||||
/* Define to 1 if you have TLS */
|
||||
/* #undef HAVE_TLS */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if we use UPnP */
|
||||
#define HAVE_UPNP 0
|
||||
|
||||
/* Define to 1 you have WIN32 */
|
||||
/* #undef HAVE_WIN32 */
|
||||
|
||||
/* Define to 1 if you have the <windef.h> header file. */
|
||||
/* #undef HAVE_WINDEF_H */
|
||||
|
||||
/* Define to 1 if you have the <winsock2.h> header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* Define to format (%lli) for long long */
|
||||
#define LLI "%lli"
|
||||
|
||||
/* Define to format (%llu) for unsigned long long */
|
||||
#define LLU "%llu"
|
||||
|
||||
/* Define to format (%llx) for long long hex */
|
||||
#define LLX "%llx"
|
||||
|
||||
/* Define printf() modifier for ssize_t */
|
||||
#define MOD_ZD "%zd"
|
||||
|
||||
/* Define printf() modifier for size_t */
|
||||
#define MOD_ZU "%zu"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "sofia-sip"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "sofia-sip"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "sofia-sip 1.12.5work"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "sofia-sip"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.12.5work"
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.12.5work"
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to a at least 64-bit int type */
|
||||
#define longlong long long
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define to 1 if compiling on Open C environment */
|
||||
/* #undef HAVE_OPEN_C */
|
40
libs/sofia-sip/open_c/group/bld.inf
Normal file
40
libs/sofia-sip/open_c/group/bld.inf
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ==============================================================================
|
||||
* Name : bld.inf
|
||||
* Part of : Camcorder
|
||||
* Description : Camcorder application build information
|
||||
* Version :
|
||||
*
|
||||
* Copyright (c) 2003-2006 Nokia Corporation.
|
||||
* This material, including documentation and any related
|
||||
* computer programs, is protected by copyright controlled by
|
||||
* Nokia Corporation. All rights are reserved. Copying,
|
||||
* including reproducing, storing, adapting or translating, any
|
||||
* or all of this material requires the prior written consent of
|
||||
* Nokia Corporation. This material also contains confidential
|
||||
* information which may not be disclosed to others without the
|
||||
* prior written consent of Nokia Corporation.
|
||||
* ==============================================================================
|
||||
*/
|
||||
|
||||
PRJ_PLATFORMS
|
||||
DEFAULT
|
||||
|
||||
PRJ_EXPORTS
|
||||
|
||||
|
||||
PRJ_MMPFILES
|
||||
|
||||
libsofia-sip-ua.mmp
|
||||
|
||||
torture_su_root.mmp
|
||||
torture_su_port.mmp
|
||||
torture_su_tag.mmp
|
||||
torture_su_alloc.mmp
|
||||
torture_url.mmp
|
||||
test_msg.mmp
|
||||
torture_sip.mmp
|
||||
|
||||
PRJ_TESTMMPFILES
|
||||
|
||||
// End of File
|
302
libs/sofia-sip/open_c/group/libsofia-sip-ua.mmp
Normal file
302
libs/sofia-sip/open_c/group/libsofia-sip-ua.mmp
Normal file
@ -0,0 +1,302 @@
|
||||
// General properties
|
||||
TARGET libsofia-sip-ua.lib
|
||||
TARGETTYPE lib
|
||||
CAPABILITY ALL -TCB
|
||||
UID 0x1000008D 0xA000017E
|
||||
VENDORID 0
|
||||
OPTION CW -dialect c99 -inline on -warn nounusedarg,nounusedvar
|
||||
|
||||
//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
|
||||
|
||||
// Allow global writeable static data
|
||||
EPOCALLOWDLLDATA
|
||||
|
||||
MACRO SYMBIAN
|
||||
MACRO IN_LIBSOFIA_SIP_UA
|
||||
MACRO IN_LIBSOFIA_SRES
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\su
|
||||
|
||||
SOURCE su.c
|
||||
SOURCE su_errno.c
|
||||
SOURCE su_addrinfo.c
|
||||
SOURCE su_alloc.c
|
||||
SOURCE su_alloc_lock.c
|
||||
SOURCE su_strdup.c
|
||||
SOURCE su_sprintf.c
|
||||
SOURCE su_strlst.c
|
||||
SOURCE su_vector.c
|
||||
SOURCE su_time.c
|
||||
SOURCE su_time0.c
|
||||
SOURCE su_wait.c
|
||||
SOURCE su_root.c
|
||||
SOURCE su_timer.c
|
||||
SOURCE su_port.c
|
||||
SOURCE su_base_port.c
|
||||
SOURCE su_pthread_port.c
|
||||
SOURCE su_poll_port.c
|
||||
SOURCE su_epoll_port.c
|
||||
SOURCE su_select_port.c
|
||||
SOURCE su_socket_port.c
|
||||
SOURCE su_localinfo.c
|
||||
SOURCE su_os_nw.c
|
||||
SOURCE su_taglist.c
|
||||
SOURCE su_tag.c
|
||||
SOURCE su_tag_ref.c
|
||||
SOURCE su_tag_io.c
|
||||
SOURCE su_log.c
|
||||
SOURCE su_global_log.c
|
||||
SOURCE su_default_log.c
|
||||
SOURCE su_md5.c
|
||||
SOURCE su_uniqueid.c
|
||||
SOURCE su_bm.c
|
||||
SOURCE memmem.c
|
||||
SOURCE memspn.c
|
||||
SOURCE memcspn.c
|
||||
SOURCE string0.c
|
||||
SOURCE strtoull.c
|
||||
SOURCE strcasestr.c
|
||||
SOURCE getopt.c
|
||||
SOURCE poll.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\bnf
|
||||
|
||||
SOURCE bnf.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\features
|
||||
|
||||
SOURCE features.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\http
|
||||
|
||||
SOURCE http_parser.c
|
||||
SOURCE http_header.c
|
||||
SOURCE http_basic.c
|
||||
SOURCE http_extra.c
|
||||
SOURCE http_status.c
|
||||
SOURCE http_tag_class.c
|
||||
SOURCE http_tag.c
|
||||
SOURCE http_tag_ref.c
|
||||
SOURCE http_parser_table.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\ipt
|
||||
|
||||
SOURCE base64.c
|
||||
SOURCE rc4.c
|
||||
//SOURCE string0.c
|
||||
SOURCE token64.c
|
||||
|
||||
SOURCE ucs2.c
|
||||
SOURCE ucs4.c
|
||||
SOURCE utf8.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\iptsec
|
||||
|
||||
SOURCE auth_client.c
|
||||
SOURCE auth_common.c
|
||||
SOURCE auth_digest.c
|
||||
SOURCE auth_module.c
|
||||
SOURCE auth_tag.c
|
||||
SOURCE auth_tag_ref.c
|
||||
SOURCE auth_plugin.c
|
||||
SOURCE auth_plugin_delayed.c
|
||||
SOURCE auth_module_sip.c
|
||||
SOURCE iptsec_debug.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\msg
|
||||
|
||||
SOURCE msg.c
|
||||
SOURCE msg_tag.c
|
||||
SOURCE msg_mime.c
|
||||
SOURCE msg_mime_table.c
|
||||
SOURCE msg_header_copy.c
|
||||
SOURCE msg_header_make.c
|
||||
SOURCE msg_parser.c
|
||||
SOURCE msg_mclass.c
|
||||
SOURCE msg_parser_util.c
|
||||
SOURCE msg_basic.c
|
||||
SOURCE msg_generic.c
|
||||
SOURCE msg_date.c
|
||||
SOURCE msg_auth.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\nea
|
||||
|
||||
SOURCE nea.c
|
||||
SOURCE nea_event.c
|
||||
SOURCE nea_server.c
|
||||
SOURCE nea_debug.c
|
||||
SOURCE nea_tag.c
|
||||
SOURCE nea_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\nta
|
||||
|
||||
SOURCE nta.c
|
||||
SOURCE nta_check.c
|
||||
SOURCE nta_tag.c
|
||||
SOURCE nta_tag_ref.c
|
||||
SOURCE sl_utils_print.c
|
||||
SOURCE sl_utils_log.c
|
||||
SOURCE sl_read_payload.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\nth
|
||||
|
||||
SOURCE nth_client.c
|
||||
SOURCE nth_server.c
|
||||
SOURCE nth_tag.c
|
||||
SOURCE nth_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\nua
|
||||
|
||||
SOURCE nua.c
|
||||
SOURCE nua_common.c
|
||||
SOURCE nua_stack.c
|
||||
SOURCE nua_extension.c
|
||||
SOURCE nua_dialog.c
|
||||
SOURCE outbound.c
|
||||
SOURCE nua_params.c
|
||||
SOURCE nua_register.c
|
||||
SOURCE nua_registrar.c
|
||||
SOURCE nua_session.c
|
||||
SOURCE nua_options.c
|
||||
SOURCE nua_message.c
|
||||
SOURCE nua_publish.c
|
||||
SOURCE nua_subnotref.c
|
||||
SOURCE nua_notifier.c
|
||||
SOURCE nua_event_server.c
|
||||
SOURCE nua_tag.c
|
||||
SOURCE nua_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\sdp
|
||||
|
||||
SOURCE sdp.c
|
||||
SOURCE sdp_parse.c
|
||||
SOURCE sdp_print.c
|
||||
SOURCE sdp_tag.c
|
||||
SOURCE sdp_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\sip
|
||||
|
||||
SOURCE sip_parser.c
|
||||
SOURCE sip_header.c
|
||||
SOURCE sip_util.c
|
||||
SOURCE sip_pref_util.c
|
||||
SOURCE sip_basic.c
|
||||
SOURCE sip_extra.c
|
||||
SOURCE sip_feature.c
|
||||
SOURCE sip_mime.c
|
||||
SOURCE sip_security.c
|
||||
SOURCE sip_event.c
|
||||
SOURCE sip_prack.c
|
||||
SOURCE sip_refer.c
|
||||
SOURCE sip_session.c
|
||||
SOURCE sip_caller_prefs.c
|
||||
SOURCE sip_reason.c
|
||||
SOURCE sip_status.c
|
||||
SOURCE sip_time.c
|
||||
SOURCE sip_tag_class.c
|
||||
SOURCE sip_tag.c
|
||||
SOURCE sip_tag_ref.c
|
||||
SOURCE sip_parser_table.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\soa
|
||||
|
||||
SOURCE soa.c
|
||||
SOURCE soa_static.c
|
||||
SOURCE soa_tag.c
|
||||
SOURCE soa_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\sresolv
|
||||
|
||||
SOURCE sres.c
|
||||
SOURCE sres_cache.c
|
||||
SOURCE sres_blocking.c
|
||||
SOURCE sresolv.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\stun
|
||||
|
||||
SOURCE stun.c
|
||||
SOURCE stun_common.c
|
||||
SOURCE stun_dns.c
|
||||
SOURCE stun_mini.c
|
||||
SOURCE stun_tag.c
|
||||
SOURCE stun_tag_ref.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\msg
|
||||
|
||||
SOURCE test_class.c
|
||||
SOURCE test_table.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\tport
|
||||
|
||||
SOURCE tport.c
|
||||
SOURCE tport_logging.c
|
||||
SOURCE tport_stub_sigcomp.c
|
||||
SOURCE tport_type_udp.c
|
||||
SOURCE tport_type_tcp.c
|
||||
SOURCE tport_type_sctp.c
|
||||
SOURCE tport_tag.c
|
||||
SOURCE tport_tag_ref.c
|
||||
SOURCE tport_type_tls.c
|
||||
SOURCE tport_tls.c
|
||||
SOURCE tport_stub_stun.c
|
||||
SOURCE tport_type_stun.c
|
||||
SOURCE tport_type_connect.c
|
||||
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\url
|
||||
|
||||
SOURCE url.c
|
||||
SOURCE url_tag.c
|
||||
SOURCE url_tag_ref.c
|
||||
|
||||
USERINCLUDE ..
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\su
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\ipt
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\iptsec
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\url
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\stun
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\soa
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\sdp
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\sresolv
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\http
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\tport
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\features
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\sip
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\nta
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\nth
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\nea
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\nua
|
||||
|
||||
SYSTEMINCLUDE ..
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua/features
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\ipt
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\iptsec
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\sresolv
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\stun
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\soa
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\sdp
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\http
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\tport
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\sip
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\nta
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\nth
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\nea
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\nua
|
||||
|
||||
SYSTEMINCLUDE \Epoc32\include
|
||||
SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
SYSTEMINCLUDE \epoc32\include\osextensions\stdapis\openssl
|
||||
|
||||
// Library dependencies
|
||||
LIBRARY libc.lib
|
||||
LIBRARY libm.lib
|
||||
LIBRARY libpthread.lib
|
||||
LIBRARY libcrypto.lib
|
||||
LIBRARY libssl.lib
|
||||
LIBRARY euser.lib
|
59
libs/sofia-sip/open_c/group/test_msg.mmp
Normal file
59
libs/sofia-sip/open_c/group/test_msg.mmp
Normal file
@ -0,0 +1,59 @@
|
||||
// sofiatest component properties
|
||||
|
||||
// General properties
|
||||
TARGET test_msg.exe
|
||||
TARGETTYPE exe
|
||||
CAPABILITY ALL -TCB
|
||||
UID 0x100039CE 0x1F001AE3
|
||||
VENDORID 0
|
||||
OPTION CW -dialect c99 -inline on
|
||||
|
||||
START RESOURCE test_msg_reg.rss
|
||||
#ifdef WINSCW
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
#else
|
||||
TARGETPATH \private\10003a3f\import\apps
|
||||
#endif
|
||||
END //RESOURCE
|
||||
|
||||
EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
|
||||
|
||||
//EPOCSTACKSIZE 0x2000000
|
||||
|
||||
// Allow global writeable static data
|
||||
EPOCALLOWDLLDATA
|
||||
|
||||
MACRO SYMBIAN
|
||||
MACRO IN_LIBSOFIA_SIP_UA
|
||||
MACRO IN_LIBSOFIA_SRES
|
||||
|
||||
// Source files
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\msg
|
||||
SOURCE test_msg.c
|
||||
|
||||
USERINCLUDE ..
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\su
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\url
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
|
||||
SYSTEMINCLUDE ..
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
|
||||
SYSTEMINCLUDE \Epoc32\include
|
||||
SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
|
||||
// Library dependencies
|
||||
STATICLIBRARY libcrt0.lib
|
||||
LIBRARY libc.lib
|
||||
LIBRARY libm.lib
|
||||
LIBRARY libpthread.lib
|
||||
LIBRARY euser.lib
|
||||
|
||||
// Sofia-SIP libs
|
||||
LIBRARY libsofia-sip-ua.lib
|
13
libs/sofia-sip/open_c/group/test_msg_reg.rss
Normal file
13
libs/sofia-sip/open_c/group/test_msg_reg.rss
Normal file
@ -0,0 +1,13 @@
|
||||
#include <appinfo.rh>
|
||||
|
||||
UID2 KUidAppRegistrationResourceFile
|
||||
UID3 0x1F001AE3
|
||||
|
||||
RESOURCE APP_REGISTRATION_INFO
|
||||
{
|
||||
app_file="test_msg";
|
||||
|
||||
embeddability=KAppNotEmbeddable;
|
||||
newfile=KAppDoesNotSupportNewFile;
|
||||
}
|
||||
|
54
libs/sofia-sip/open_c/group/torture_sip.mmp
Normal file
54
libs/sofia-sip/open_c/group/torture_sip.mmp
Normal file
@ -0,0 +1,54 @@
|
||||
// sofiatest component properties
|
||||
|
||||
// General properties
|
||||
TARGET torture_sip.exe
|
||||
TARGETTYPE exe
|
||||
CAPABILITY ALL -TCB
|
||||
UID 0x100039CE 0x1F001BA1
|
||||
VENDORID 0
|
||||
OPTION CW -dialect c99 -inline on
|
||||
|
||||
START RESOURCE torture_sip_reg.rss
|
||||
#ifdef WINSCW
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
#else
|
||||
TARGETPATH \private\10003a3f\import\apps
|
||||
#endif
|
||||
END //RESOURCE
|
||||
|
||||
//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
|
||||
|
||||
// Allow global writeable static data
|
||||
EPOCALLOWDLLDATA
|
||||
|
||||
MACRO SYMBIAN
|
||||
MACRO IN_LIBSOFIA_SIP_UA
|
||||
|
||||
// Source files
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\sip
|
||||
SOURCE torture_sip.c
|
||||
|
||||
|
||||
USERINCLUDE ..
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\su
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\url
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\sip
|
||||
SYSTEMINCLUDE ..
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\bnf
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\msg
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\url
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\sip
|
||||
|
||||
SYSTEMINCLUDE \Epoc32\include
|
||||
SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
|
||||
|
||||
|
||||
// Library dependencies
|
||||
STATICLIBRARY libcrt0.lib
|
||||
LIBRARY libc.lib
|
||||
LIBRARY euser.lib
|
||||
LIBRARY libpthread.lib
|
||||
LIBRARY libsofia-sip-ua.lib
|
13
libs/sofia-sip/open_c/group/torture_sip_reg.rss
Normal file
13
libs/sofia-sip/open_c/group/torture_sip_reg.rss
Normal file
@ -0,0 +1,13 @@
|
||||
#include <appinfo.rh>
|
||||
|
||||
UID2 KUidAppRegistrationResourceFile
|
||||
UID3 0x1F001BA1
|
||||
|
||||
RESOURCE APP_REGISTRATION_INFO
|
||||
{
|
||||
app_file="torture_sip";
|
||||
|
||||
embeddability=KAppNotEmbeddable;
|
||||
newfile=KAppDoesNotSupportNewFile;
|
||||
}
|
||||
|
46
libs/sofia-sip/open_c/group/torture_su_alloc.mmp
Normal file
46
libs/sofia-sip/open_c/group/torture_su_alloc.mmp
Normal file
@ -0,0 +1,46 @@
|
||||
// sofiatest component properties
|
||||
|
||||
// General properties
|
||||
TARGET torture_su_alloc.exe
|
||||
TARGETTYPE exe
|
||||
CAPABILITY ALL -TCB
|
||||
UID 0x100039CE 0x1F001AE7
|
||||
VENDORID 0
|
||||
OPTION CW -dialect c99 -inline on
|
||||
|
||||
START RESOURCE torture_su_alloc_reg.rss
|
||||
#ifdef WINSCW
|
||||
TARGETPATH \private\10003a3f\apps
|
||||
#else
|
||||
TARGETPATH \private\10003a3f\import\apps
|
||||
#endif
|
||||
END //RESOURCE
|
||||
|
||||
//EPOCHEAPSIZE 4 4194304 // min. 4KB ja max 4MB
|
||||
|
||||
// Allow global writeable static data
|
||||
EPOCALLOWDLLDATA
|
||||
|
||||
MACRO SYMBIAN
|
||||
MACRO IN_LIBSOFIA_SIP_UA
|
||||
|
||||
// Source files
|
||||
SOURCEPATH ..\..\libsofia-sip-ua\su
|
||||
SOURCE torture_su_alloc.c
|
||||
|
||||
|
||||
USERINCLUDE ..
|
||||
USERINCLUDE ..\..\libsofia-sip-ua\su
|
||||
SYSTEMINCLUDE ..
|
||||
SYSTEMINCLUDE ..\..\libsofia-sip-ua\su
|
||||
|
||||
SYSTEMINCLUDE \Epoc32\include
|
||||
SYSTEMINCLUDE \Epoc32\include\osextensions\stdapis
|
||||
|
||||
|
||||
// Library dependencies
|
||||
STATICLIBRARY libcrt0.lib
|
||||
LIBRARY libc.lib
|
||||
LIBRARY euser.lib
|
||||
LIBRARY libpthread.lib
|
||||
LIBRARY libsofia-sip-ua.lib
|
13
libs/sofia-sip/open_c/group/torture_su_alloc_reg.rss
Normal file
13
libs/sofia-sip/open_c/group/torture_su_alloc_reg.rss
Normal file
@ -0,0 +1,13 @@
|
||||
#include <appinfo.rh>
|
||||
|
||||
UID2 KUidAppRegistrationResourceFile
|
||||
UID3 0x1F001AE7
|
||||
|
||||
RESOURCE APP_REGISTRATION_INFO
|
||||
{
|
||||
app_file="torture_su_alloc";
|
||||
|
||||
embeddability=KAppNotEmbeddable;
|
||||
newfile=KAppDoesNotSupportNewFile;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user