a little update to the sofia-sip library

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4939 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-04-15 02:03:41 +00:00
1 parent fabed21ea8
commit 853936abd3
270 files changed
+37121 -11402

No files matched your search

+20 -20
View File
@@ -30,17 +30,17 @@ PUBLIC_H = sofia-sip/http.h sofia-sip/http_header.h \
sofia-sip/http_status.h sofia-sip/http_hclasses.h
BUILT_H = sofia-sip/http_protos.h sofia-sip/http_tag.h
BUILT_C = http_tag.c http_tag_ref.c http_parser_table.c
BUILT_C = http_tag.c http_parser_table.c
BUILT_SOURCES = $(BUILT_H) $(BUILT_C)
BUILT_SOURCES = $(BUILT_H) $(BUILT_C) http_tag_ref.c
nobase_include_sofia_HEADERS = $(BUILT_H) $(PUBLIC_H)
libhttp_la_SOURCES = $(INTERNAL_H) \
http_parser.c http_header.c \
http_basic.c http_extra.c \
http_basic.c http_extra.c http_inlined.c \
http_status.c http_tag_class.c \
$(BUILT_C)
$(BUILT_SOURCES)
COVERAGE_INPUT = $(libhttp_la_SOURCES) $(include_sofia_HEADERS)
@@ -48,6 +48,7 @@ LDADD = libhttp.la \
../bnf/libbnf.la \
../msg/libmsg.la \
../url/liburl.la \
../ipt/libipt.la \
../su/libsu.la
test_http_LDFLAGS = -static
@@ -64,30 +65,29 @@ EXTRA_DIST = Doxyfile http.docs \
# ----------------------------------------------------------------------
# Sofia specific rules
include ../sofia.am
include $(top_srcdir)/rules/sofia.am
TAG_DLL_FLAGS = DLLREF=1
MSG_PARSER_AWK = $(srcdir)/../msg/msg_parser.awk
MSG_PARSER_AWK = ${srcdir}/../msg/msg_parser.awk
AWK_HTTP_AWK = $(AWK) -f $(MSG_PARSER_AWK) module=http
AWK_HTTP_AWK = ${AWK} -f ${MSG_PARSER_AWK} module=http
sofia-sip/http_tag.h: sofia-sip/http_tag.h.in $(MSG_PARSER_AWK)
sofia-sip/http_protos.h: sofia-sip/http_protos.h.in $(MSG_PARSER_AWK)
http_tag.c: http_tag.c.in $(MSG_PARSER_AWK)
http_parser_table.c: http_parser_table.c.in $(MSG_PARSER_AWK)
SS_HTTP_H = ${srcdir}/sofia-sip/http.h
sofia-sip/http_protos.h: sofia-sip/http.h
${BUILT_H} ${BUILT_C}: ${srcdir}/sofia-sip/http.h ${MSG_PARSER_AWK}
sofia-sip/http_protos.h: ${srcdir}/sofia-sip/http_protos.h.in
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/http_protos.h.in $<
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
sofia-sip/http_tag.h: sofia-sip/http.h
sofia-sip/http_tag.h: ${srcdir}/sofia-sip/http_tag.h.in
@-mkdir sofia-sip 2>/dev/null || true
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/sofia-sip/http_tag.h.in $<
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
http_tag.c: sofia-sip/http.h
$(AWK_HTTP_AWK) PR=$@ TEMPLATE=$(srcdir)/http_tag.c.in $<
http_tag.c: ${srcdir}/http_tag.c.in
${AWK_HTTP_AWK} PR=$@ TEMPLATE=${srcdir}/$@.in ${SS_HTTP_H}
http_parser_table.c: sofia-sip/http.h
$(AWK_HTTP_AWK) PT=$@ TEMPLATE=$(srcdir)/http_parser_table.c.in \
MC_HASH_SIZE=127 $<
http_parser_table.c: ${srcdir}/http_parser_table.c.in
${AWK_HTTP_AWK} PT=$@ TEMPLATE=${srcdir}/$@.in \
MC_HASH_SIZE=127 ${SS_HTTP_H}
@@ -55,6 +55,7 @@
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <limits.h>
/* ====================================================================== */
@@ -1196,7 +1197,7 @@ char *http_range_dup_one(msg_header_t *dst, msg_header_t const *src,
http_range_t const *o = (http_range_t const *)src;
char *end = b + xtra;
b = msg_params_dup((char const * const **)&rng->rng_specs,
b = msg_params_dup((msg_param_t const **)&rng->rng_specs,
o->rng_specs, b, xtra);
MSG_STRING_DUP(b, rng->rng_unit, o->rng_unit);
@@ -0,0 +1,52 @@
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
/**@CFILE http_inlined.c
*
* Expand inlined http functions non-inline.
*
*/
#include "config.h"
#include <sofia-sip/su_config.h>
#if SU_HAVE_INLINE
extern int xyzzy;
#else
#include "sofia-sip/msg_header.h"
#include "sofia-sip/su_tag.h"
#undef SU_HAVE_INLINE
#undef su_inline
#define SU_HAVE_INLINE 1
#define su_inline
#include "sofia-sip/http_header.h"
#endif
@@ -61,9 +61,9 @@ char const http_version_1_0[] = "HTTP/1.0";
/** HTTP version 0.9 is an empty string. */
char const http_version_0_9[] = "";
msg_mclass_t *http_default_mclass(void)
msg_mclass_t const *http_default_mclass(void)
{
extern msg_mclass_t http_mclass[];
extern msg_mclass_t const http_mclass[];
return http_mclass;
}
@@ -95,7 +95,7 @@ SOFIAPUBVAR char const http_version_1_1[];
*/
/** HTTP parser description. */
SOFIAPUBFUN msg_mclass_t *http_default_mclass(void);
SOFIAPUBFUN msg_mclass_t const *http_default_mclass(void);
/** Complete a HTTP request. */
SOFIAPUBFUN int http_request_complete(msg_t *msg);
@@ -76,14 +76,7 @@ static int http_tag_test(void);
static int test_query_parser(void);
static msg_t *read_message(char const string[]);
msg_mclass_t *test_mclass = NULL;
void usage(void)
{
fprintf(stderr,
"usage: %s [-v]\n",
name);
}
msg_mclass_t const *test_mclass = NULL;
char *lastpart(char *path)
{
@@ -95,6 +88,14 @@ char *lastpart(char *path)
int tstflags;
void usage(int exitcode)
{
fprintf(stderr,
"usage: %s [-v] [-a]\n",
name);
exit(exitcode);
}
int main(int argc, char *argv[])
{
int retval = 0;
@@ -105,8 +106,10 @@ int main(int argc, char *argv[])
for (i = 1; argv[i]; i++) {
if (strcmp(argv[i], "-v") == 0)
tstflags |= tst_verbatim;
else if (strcmp(argv[i], "-a") == 0)
tstflags |= tst_abort;
else
usage();
usage(1);
}
if (!test_mclass)