Initial configuration for pjlib-util
git-svn-id: https://svn.pjsip.org/repos/pjproject/main@32 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
f2afa6caef
commit
e91bf77a9f
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
|||
DIRS = pjlib
|
||||
DIRS = pjlib pjlib-util
|
||||
|
||||
ifdef MINSIZE
|
||||
MAKE_FLAGS := MINSIZE=1
|
||||
|
|
|
@ -0,0 +1,130 @@
|
|||
#
|
||||
# Include host/target/compiler selection.
|
||||
# This will export CC_NAME, MACHINE_NAME, OS_NAME, and HOST_NAME variables.
|
||||
#
|
||||
include ../../build.mak
|
||||
|
||||
#
|
||||
# Include global compiler specific definitions
|
||||
#
|
||||
include ../../build/cc-$(CC_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include compiler specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include cc-$(CC_NAME).mak
|
||||
|
||||
#
|
||||
# Include global machine specific definitions
|
||||
#
|
||||
include ../../build/m-$(MACHINE_NAME).mak
|
||||
-include m-$(MACHINE_NAME).mak
|
||||
|
||||
#
|
||||
# Include target OS specific definitions
|
||||
#
|
||||
include ../../build/os-$(OS_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include target OS specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include os-$(OS_NAME).mak
|
||||
|
||||
#
|
||||
# Include host specific definitions
|
||||
#
|
||||
include ../../build/host-$(HOST_NAME).mak
|
||||
|
||||
#
|
||||
# (Optionally) Include host specific configuration that is
|
||||
# specific to this project. This configuration file is
|
||||
# located in this directory.
|
||||
#
|
||||
-include host-$(HOST_NAME).mak
|
||||
|
||||
#
|
||||
# Include global user configuration, if any
|
||||
#
|
||||
-include ../../user.mak
|
||||
|
||||
|
||||
RULES_MAK := ../../build/rules.mak
|
||||
|
||||
PJLIB_LIB:=../../pjlib/lib/libpj-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
|
||||
export PJLIB_UTIL_LIB:=../lib/libpjlib-util-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
|
||||
|
||||
###############################################################################
|
||||
# Gather all flags.
|
||||
#
|
||||
export _CFLAGS := -O2 -g $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
|
||||
$(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include
|
||||
export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
|
||||
$(HOST_CXXFLAGS) $(CXXFLAGS)
|
||||
export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
|
||||
$(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
|
||||
$(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
|
||||
$(LDFLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Defines for building PJLIB library
|
||||
#
|
||||
export PJLIB_UTIL_SRCDIR = ../src/pjlib-util
|
||||
export PJLIB_UTIL_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
|
||||
md5.o scanner.o stun.o stun_client.o xml.o
|
||||
export PJLIB_UTIL_CFLAGS += $(_CFLAGS)
|
||||
|
||||
###############################################################################
|
||||
# Defines for building test application
|
||||
#
|
||||
export UTIL_TEST_SRCDIR = ../src/pjlib-util-test
|
||||
export UTIL_TEST_OBJS += xml.o test.o main.o
|
||||
export UTIL_TEST_CFLAGS += $(_CFLAGS)
|
||||
export UTIL_TEST_LDFLAGS += $(_LDFLAGS)
|
||||
export UTIL_TEST_EXE:=../bin/pjlib-util-test-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE)
|
||||
|
||||
|
||||
export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT
|
||||
###############################################################################
|
||||
# Main entry
|
||||
#
|
||||
# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
|
||||
#
|
||||
TARGETS := pjlib-util pjlib-util-test
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
doc:
|
||||
cd .. && doxygen docs/doxygen.cfg
|
||||
|
||||
dep: depend
|
||||
distclean: realclean
|
||||
|
||||
.PHONY: dep depend pjlib pjlib-test clean realclean distclean
|
||||
|
||||
pjlib-util:
|
||||
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $(PJLIB_UTIL_LIB)
|
||||
|
||||
pjlib-util-test: $(PJLIB_LIB)
|
||||
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $(UTIL_TEST_EXE)
|
||||
|
||||
.PHONY: ../lib/pjlib-util.ko
|
||||
../lib/pjlib-util.ko:
|
||||
echo Making $@
|
||||
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
|
||||
|
||||
.PHONY: ../lib/pjlib-util-test.ko
|
||||
../lib/pjlib-util-test.ko:
|
||||
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
|
||||
|
||||
clean depend realclean:
|
||||
$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
|
||||
$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
|
||||
@if test "$@" == "depend"; then \
|
||||
echo '$(TEST_EXE): $(PJLIB_UTIL_LIB)' >> .pjlib-util-test-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
|
||||
fi
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,305 @@
|
|||
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
BODY,TD {
|
||||
font-size: 80%;
|
||||
}
|
||||
CODE {
|
||||
font-size: 120%;
|
||||
font-family: monospace;
|
||||
}
|
||||
.fragment, pre {
|
||||
font-size: 110%;
|
||||
font-family: monospace;
|
||||
}
|
||||
H1 {
|
||||
text-align: center;
|
||||
font-size: 240%;
|
||||
}
|
||||
H2 {
|
||||
font-size: 200%;
|
||||
margin-top : 60px;
|
||||
}
|
||||
H3 {
|
||||
font-size: 160%;
|
||||
}
|
||||
H4 {
|
||||
font-size: 120%;
|
||||
}
|
||||
CAPTION { font-weight: bold }
|
||||
DIV.qindex {
|
||||
width: 100%;
|
||||
background-color: #eeeeff;
|
||||
border: 1px solid #b0b0b0;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.nav {
|
||||
width: 100%;
|
||||
background-color: #eeeeff;
|
||||
border: 1px solid #b0b0b0;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
A.qindex {
|
||||
text-decoration: none;
|
||||
font-size: 120%;
|
||||
color: #1A419D;
|
||||
}
|
||||
A.qindex:visited {
|
||||
text-decoration: none;
|
||||
color: #1A419D
|
||||
}
|
||||
A.qindex:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddddff;
|
||||
}
|
||||
A.qindexHL {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
}
|
||||
A.qindexHL:hover {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
|
||||
A.el { text-decoration: none; font-weight: bold }
|
||||
A.elRef { font-weight: bold }
|
||||
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF; }
|
||||
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||
A.codeRef:link { font-weight: normal; color: #0000FF}
|
||||
A.codeRef:visited { font-weight: normal; color: #0000FF}
|
||||
A:hover { text-decoration: none; background-color: #f2f2ff }
|
||||
DL.el { margin-left: -1cm }
|
||||
PRE.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 8px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
|
||||
TD.md { background-color: #F4F4FB; font-weight: bold; }
|
||||
TD.mdPrefix {
|
||||
background-color: #F4F4FB;
|
||||
color: #606060;
|
||||
font-size: 80%;
|
||||
}
|
||||
TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
|
||||
TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
|
||||
DIV.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
|
||||
BODY {
|
||||
background: white;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
TD.indexkey {
|
||||
background-color: #eeeeff;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TD.indexvalue {
|
||||
background-color: #eeeeff;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TR.memlist {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
P.formulaDsp { text-align: center; }
|
||||
IMG.formulaDsp { }
|
||||
IMG.formulaInl { vertical-align: middle; }
|
||||
SPAN.keyword { color: #008000 }
|
||||
SPAN.keywordtype { color: #604020 }
|
||||
SPAN.keywordflow { color: #e08000 }
|
||||
SPAN.comment { color: #800000 }
|
||||
SPAN.preprocessor { color: #806020 }
|
||||
SPAN.stringliteral { color: #002080 }
|
||||
SPAN.charliteral { color: #008080 }
|
||||
.mdTable {
|
||||
border: 1px solid #868686;
|
||||
background-color: #F4F4FB;
|
||||
}
|
||||
.mdRow {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.mdescLeft {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.memItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplParams {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
color: #606060;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.search { color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
FORM.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
INPUT.search { font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
TD.tiny { font-size: 75%;
|
||||
}
|
||||
a {
|
||||
color: #252E78;
|
||||
}
|
||||
a:visited {
|
||||
color: #3D2185;
|
||||
}
|
||||
.dirtab { padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #b0b0b0;
|
||||
}
|
||||
TH.dirtab { background: #eeeeff;
|
||||
font-weight: bold;
|
||||
}
|
||||
HR { height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>PJLIB Documentation</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<A HREF="/"><-- HOME</A><HR>
|
||||
|
||||
<TABLE border="0">
|
||||
<TR><TD width="600" align="left">
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#include "test.h"
|
||||
|
||||
#if defined(PJ_SUNOS) && PJ_SUNOS!=0
|
||||
#include <signal.h>
|
||||
static void init_signals()
|
||||
{
|
||||
struct sigaction act;
|
||||
|
||||
memset(&act, 0, sizeof(act));
|
||||
act.sa_handler = SIG_IGN;
|
||||
|
||||
sigaction(SIGALRM, &act, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
#define init_signals()
|
||||
#endif
|
||||
|
||||
#define boost()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int rc;
|
||||
|
||||
PJ_UNUSED_ARG(argc);
|
||||
PJ_UNUSED_ARG(argv);
|
||||
|
||||
boost();
|
||||
init_signals();
|
||||
|
||||
rc = test_main();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
#include "test.h"
|
||||
#include <pjlib.h>
|
||||
|
||||
void app_perror(const char *msg, pj_status_t rc)
|
||||
{
|
||||
char errbuf[256];
|
||||
|
||||
PJ_CHECK_STACK();
|
||||
|
||||
pj_strerror(rc, errbuf, sizeof(errbuf));
|
||||
PJ_LOG(1,("test", "%s: [pj_status_t=%d] %s", msg, rc, errbuf));
|
||||
}
|
||||
|
||||
#define DO_TEST(test) do { \
|
||||
PJ_LOG(3, ("test", "Running %s...", #test)); \
|
||||
rc = test; \
|
||||
PJ_LOG(3, ("test", \
|
||||
"%s(%d)", \
|
||||
(char*)(rc ? "..ERROR" : "..success"), rc)); \
|
||||
if (rc!=0) goto on_return; \
|
||||
} while (0)
|
||||
|
||||
|
||||
pj_pool_factory *mem;
|
||||
|
||||
|
||||
static int test_inner(void)
|
||||
{
|
||||
pj_caching_pool caching_pool;
|
||||
int rc = 0;
|
||||
|
||||
mem = &caching_pool.factory;
|
||||
|
||||
pj_log_set_level(3);
|
||||
pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME |
|
||||
PJ_LOG_HAS_MICRO_SEC);
|
||||
|
||||
rc = pj_init();
|
||||
if (rc != 0) {
|
||||
app_perror("pj_init() error!!", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
pj_dump_config();
|
||||
pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 );
|
||||
DO_TEST(xml_test());
|
||||
|
||||
on_return:
|
||||
return rc;
|
||||
}
|
||||
|
||||
int test_main(void)
|
||||
{
|
||||
PJ_USE_EXCEPTION;
|
||||
|
||||
PJ_TRY {
|
||||
return test_inner();
|
||||
}
|
||||
PJ_DEFAULT {
|
||||
int id = PJ_GET_EXCEPTION();
|
||||
PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)",
|
||||
id, pj_exception_id_name(id)));
|
||||
}
|
||||
PJ_END;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#include <pj/types.h>
|
||||
|
||||
#define INCLUDE_XML_TEST 1
|
||||
|
||||
extern int xml_test(void);
|
||||
extern int test_main(void);
|
||||
|
||||
extern void app_perror(const char *title, pj_status_t rc);
|
||||
extern pj_pool_factory *mem;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
/* $Id$
|
||||
*/
|
||||
/* $Id$
|
||||
*/
|
||||
#include "test.h"
|
||||
|
||||
|
||||
#if INCLUDE_XML_TEST
|
||||
|
||||
#include <pj/xml.h>
|
||||
#include <pjlib-util/xml.h>
|
||||
#include <pjlib.h>
|
||||
|
||||
#define THIS_FILE "xml_test"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
1999-05-03 lpd Original version.
|
||||
*/
|
||||
|
||||
#include <pj/md5.h>
|
||||
#include <pjlib-util/md5.h>
|
||||
#include <pj/string.h>
|
||||
#include <pj/os.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$
|
||||
*/
|
||||
#include <pj/scanner.h>
|
||||
#include <pjlib-util/scanner.h>
|
||||
#include <pj/string.h>
|
||||
#include <pj/except.h>
|
||||
#include <pj/os.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$
|
||||
*/
|
||||
#include <pj/stun.h>
|
||||
#include <pjlib-util/stun.h>
|
||||
#include <pj/pool.h>
|
||||
#include <pj/log.h>
|
||||
#include <pj/sock.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$
|
||||
*/
|
||||
#include <pj/stun.h>
|
||||
#include <pjlib-util/stun.h>
|
||||
#include <pj/pool.h>
|
||||
#include <pj/log.h>
|
||||
#include <pj/string.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $Id$
|
||||
*/
|
||||
#include <pj/xml.h>
|
||||
#include <pj/scanner.h>
|
||||
#include <pjlib-util/xml.h>
|
||||
#include <pjlib-util/scanner.h>
|
||||
#include <pj/except.h>
|
||||
#include <pj/pool.h>
|
||||
#include <pj/string.h>
|
||||
|
|
|
@ -75,9 +75,9 @@ export PJLIB_SRCDIR = ../src/pj
|
|||
export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
|
||||
array.o config.o errno.o except.o fifobuf.o guid.o \
|
||||
hash.o list.o lock.o log.o \
|
||||
md5.o pool.o pool_caching.o rand.o \
|
||||
rbtree.o scanner.o string.o stun.o stun_client.o timer.o \
|
||||
types.o xml.o symbols.o
|
||||
pool.o pool_caching.o rand.o \
|
||||
rbtree.o string.o timer.o \
|
||||
types.o symbols.o
|
||||
export PJLIB_CFLAGS += $(_CFLAGS)
|
||||
|
||||
###############################################################################
|
||||
|
@ -91,7 +91,7 @@ export TEST_OBJS += atomic.o echo_clt.o errno.o exception.o \
|
|||
select.o sleep.o sock.o sock_perf.o \
|
||||
string.o test.o thread.o timer.o timestamp.o \
|
||||
udp_echo_srv_sync.o udp_echo_srv_ioqueue.o \
|
||||
util.o xml.o
|
||||
util.o
|
||||
export TEST_CFLAGS += $(_CFLAGS)
|
||||
export TEST_LDFLAGS += $(_LDFLAGS)
|
||||
export TEST_EXE := ../bin/pjlib-test-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE)
|
||||
|
|
|
@ -253,10 +253,6 @@ SOURCE=..\src\pj\log_writer_stdout.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\md5.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\os_core_win32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -301,10 +297,6 @@ SOURCE=..\src\pj\rbtree.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\scanner.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\sock_bsd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -317,24 +309,12 @@ SOURCE=..\src\pj\string.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\stun.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\stun_client.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\timer.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\types.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\src\pj\xml.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
@ -521,10 +501,6 @@ SOURCE=..\include\pj\log.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\md5.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\os.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -545,10 +521,6 @@ SOURCE=..\include\pj\rbtree.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\scanner.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\sock.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -561,20 +533,12 @@ SOURCE=..\include\pj\string.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\stun.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\timer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\types.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\include\pj\xml.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Inline Files"
|
||||
|
||||
|
|
|
@ -277,6 +277,12 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\file_access_win32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\file_io_win32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\guid.c">
|
||||
<FileConfiguration
|
||||
|
@ -343,6 +349,24 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\ioqueue_common_abs.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\ioqueue_common_abs.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\ioqueue_select.c">
|
||||
<FileConfiguration
|
||||
|
@ -477,28 +501,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\md5.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\os_core_win32.c">
|
||||
<FileConfiguration
|
||||
|
@ -741,28 +743,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\scanner.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\sock_bsd.c">
|
||||
<FileConfiguration
|
||||
|
@ -829,50 +809,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\stun.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\stun_client.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\timer.c">
|
||||
<FileConfiguration
|
||||
|
@ -917,28 +853,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\xml.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<Filter
|
||||
Name="Other Targets"
|
||||
Filter="">
|
||||
|
@ -966,6 +880,36 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\file_access_unistd.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\file_io_ansi.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\guid_simple.c">
|
||||
<FileConfiguration
|
||||
|
@ -1038,6 +982,21 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\ioqueue_linux_kernel.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pj\log_writer_printk.c">
|
||||
<FileConfiguration
|
||||
|
@ -1340,6 +1299,12 @@
|
|||
<File
|
||||
RelativePath="..\include\pj\fifobuf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\file_access.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\file_io.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\guid.h">
|
||||
</File>
|
||||
|
@ -1358,9 +1323,6 @@
|
|||
<File
|
||||
RelativePath="..\include\pj\log.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\md5.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\os.h">
|
||||
</File>
|
||||
|
@ -1376,9 +1338,6 @@
|
|||
<File
|
||||
RelativePath="..\include\pj\rbtree.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\scanner.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\sock.h">
|
||||
</File>
|
||||
|
@ -1388,18 +1347,12 @@
|
|||
<File
|
||||
RelativePath="..\include\pj\string.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\stun.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\timer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\types.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\pj\xml.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="compat"
|
||||
Filter="">
|
||||
|
|
|
@ -206,10 +206,6 @@ SOURCE="..\src\pjlib-test\udp_echo_srv_sync.c"
|
|||
|
||||
SOURCE="..\src\pjlib-test\util.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\src\pjlib-test\xml.c"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
|
|
|
@ -189,28 +189,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pjlib-test\echo_srv.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pjlib-test\errno.c">
|
||||
<FileConfiguration
|
||||
|
@ -277,6 +255,9 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pjlib-test\file.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pjlib-test\ioq_perf.c">
|
||||
<FileConfiguration
|
||||
|
@ -785,28 +766,6 @@
|
|||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\pjlib-test\xml.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BrowseInformation="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <pj/ctype.h>
|
||||
#include <pj/errno.h>
|
||||
#include <pj/except.h>
|
||||
#include <pj/fifobuf.h>
|
||||
#include <pj/fifobuf.h>
|
||||
#include <pj/file_access.h>
|
||||
#include <pj/file_io.h>
|
||||
#include <pj/guid.h>
|
||||
|
@ -24,18 +24,14 @@
|
|||
#include <pj/list.h>
|
||||
#include <pj/lock.h>
|
||||
#include <pj/log.h>
|
||||
#include <pj/md5.h>
|
||||
#include <pj/os.h>
|
||||
#include <pj/pool.h>
|
||||
#include <pj/rand.h>
|
||||
#include <pj/rbtree.h>
|
||||
#include <pj/scanner.h>
|
||||
#include <pj/sock.h>
|
||||
#include <pj/sock_select.h>
|
||||
#include <pj/string.h>
|
||||
#include <pj/stun.h>
|
||||
#include <pj/timer.h>
|
||||
#include <pj/xml.h>
|
||||
|
||||
#include <pj/compat/high_precision.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id$
|
||||
*
|
||||
*/
|
||||
#include <pjlib.h>
|
||||
|
||||
|
@ -133,14 +132,6 @@ PJ_EXPORT_SYMBOL(pj_log_5)
|
|||
PJ_EXPORT_SYMBOL(pj_log_6)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* md5.h
|
||||
*/
|
||||
PJ_EXPORT_SYMBOL(md5_init)
|
||||
PJ_EXPORT_SYMBOL(md5_append)
|
||||
PJ_EXPORT_SYMBOL(md5_finish)
|
||||
|
||||
|
||||
/*
|
||||
* os.h
|
||||
*/
|
||||
|
@ -236,38 +227,6 @@ PJ_EXPORT_SYMBOL(pj_rbtree_erase)
|
|||
PJ_EXPORT_SYMBOL(pj_rbtree_max_height)
|
||||
PJ_EXPORT_SYMBOL(pj_rbtree_min_height)
|
||||
|
||||
/*
|
||||
* scanner.h
|
||||
*/
|
||||
PJ_EXPORT_SYMBOL(pj_cs_init)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_set)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_add_range)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_add_alpha)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_add_num)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_add_str)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_del_range)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_del_str)
|
||||
PJ_EXPORT_SYMBOL(pj_cs_invert)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_init)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_fini)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_peek)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_peek_n)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_peek_until)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_quote)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_n)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_char)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_newline)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_until)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_until_ch)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_get_until_chr)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_advance_n)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_strcmp)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_stricmp)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_skip_whitespace)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_save_state)
|
||||
PJ_EXPORT_SYMBOL(pj_scan_restore_state)
|
||||
|
||||
/*
|
||||
* sock.h
|
||||
*/
|
||||
|
@ -352,15 +311,6 @@ PJ_EXPORT_SYMBOL(pj_strtoul)
|
|||
PJ_EXPORT_SYMBOL(pj_utoa)
|
||||
PJ_EXPORT_SYMBOL(pj_utoa_pad)
|
||||
|
||||
/*
|
||||
* stun.h
|
||||
*/
|
||||
PJ_EXPORT_SYMBOL(pj_stun_create_bind_req)
|
||||
PJ_EXPORT_SYMBOL(pj_stun_parse_msg)
|
||||
PJ_EXPORT_SYMBOL(pj_stun_msg_find_attr)
|
||||
PJ_EXPORT_SYMBOL(pj_stun_get_mapped_addr)
|
||||
PJ_EXPORT_SYMBOL(pj_stun_get_err_msg)
|
||||
|
||||
/*
|
||||
* timer.h
|
||||
*/
|
||||
|
@ -378,15 +328,3 @@ PJ_EXPORT_SYMBOL(pj_timer_heap_poll)
|
|||
*/
|
||||
PJ_EXPORT_SYMBOL(pj_time_val_normalize)
|
||||
|
||||
/*
|
||||
* xml.h
|
||||
*/
|
||||
PJ_EXPORT_SYMBOL(pj_xml_parse)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_print)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_add_node)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_add_attr)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_find_node)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_find_next_node)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_find_attr)
|
||||
PJ_EXPORT_SYMBOL(pj_xml_find)
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
#define NEWNAME "testfil2.txt"
|
||||
#define INCLUDE_FILE_TIME_TEST 0
|
||||
|
||||
static char buffer[11] = "Hello world";
|
||||
static char buffer[11] = {'H', 'e', 'l', 'l', 'o', ' ',
|
||||
'W', 'o', 'r', 'l', 'd' };
|
||||
|
||||
int file_test(void)
|
||||
{
|
||||
|
@ -112,7 +113,9 @@ int file_test(void)
|
|||
read = 1;
|
||||
status = pj_file_read(fd, &readbuf[size], &read);
|
||||
if (status != PJ_SUCCESS) {
|
||||
app_perror("...file_read() error", status);
|
||||
PJ_LOG(3,("", "...error reading file after %d bytes (error follows)",
|
||||
size));
|
||||
app_perror("...error", status);
|
||||
return -110;
|
||||
}
|
||||
if (read == 0) {
|
||||
|
|
|
@ -440,7 +440,7 @@ int ioqueue_perf_test(void)
|
|||
pj_size_t best_bandwidth;
|
||||
int best_index = 0;
|
||||
|
||||
PJ_LOG(3,(THIS_FILE, " Benchmarking ioqueue:"));
|
||||
PJ_LOG(3,(THIS_FILE, " Benchmarking %s ioqueue:", pj_ioqueue_name()));
|
||||
PJ_LOG(3,(THIS_FILE, " ==============================================="));
|
||||
PJ_LOG(3,(THIS_FILE, " Type Threads Skt.Pairs Avg.Time Bandwidth"));
|
||||
PJ_LOG(3,(THIS_FILE, " ==============================================="));
|
||||
|
|
|
@ -38,37 +38,37 @@ static pj_ssize_t callback_read_size,
|
|||
static pj_ioqueue_key_t *callback_read_key,
|
||||
*callback_write_key,
|
||||
*callback_accept_key,
|
||||
*callback_connect_key;
|
||||
static pj_ioqueue_op_key_t *callback_read_op,
|
||||
*callback_write_op,
|
||||
*callback_connect_key;
|
||||
static pj_ioqueue_op_key_t *callback_read_op,
|
||||
*callback_write_op,
|
||||
*callback_accept_op;
|
||||
|
||||
static void on_ioqueue_read(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_read(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_ssize_t bytes_read)
|
||||
{
|
||||
callback_read_key = key;
|
||||
callback_read_key = key;
|
||||
callback_read_op = op_key;
|
||||
callback_read_size = bytes_read;
|
||||
}
|
||||
|
||||
static void on_ioqueue_write(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_write(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_ssize_t bytes_written)
|
||||
{
|
||||
callback_write_key = key;
|
||||
callback_write_key = key;
|
||||
callback_write_op = op_key;
|
||||
callback_write_size = bytes_written;
|
||||
}
|
||||
|
||||
static void on_ioqueue_accept(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_accept(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_sock_t sock,
|
||||
int status)
|
||||
{
|
||||
PJ_UNUSED_ARG(sock);
|
||||
|
||||
callback_accept_key = key;
|
||||
callback_accept_key = key;
|
||||
callback_accept_op = op_key;
|
||||
callback_accept_status = status;
|
||||
}
|
||||
|
@ -96,31 +96,31 @@ static int send_recv_test(pj_ioqueue_t *ioque,
|
|||
pj_timestamp *t_elapsed)
|
||||
{
|
||||
pj_status_t status;
|
||||
pj_ssize_t bytes;
|
||||
pj_ssize_t bytes;
|
||||
pj_time_val timeout;
|
||||
pj_timestamp t1, t2;
|
||||
int pending_op = 0;
|
||||
int pending_op = 0;
|
||||
pj_ioqueue_op_key_t read_op, write_op;
|
||||
|
||||
// Start reading on the server side.
|
||||
// Start reading on the server side.
|
||||
bytes = bufsize;
|
||||
status = pj_ioqueue_recv(skey, &read_op, recv_buf, &bytes, 0);
|
||||
if (status != PJ_SUCCESS && status != PJ_EPENDING) {
|
||||
if (status != PJ_SUCCESS && status != PJ_EPENDING) {
|
||||
app_perror("...pj_ioqueue_recv error", status);
|
||||
return -100;
|
||||
}
|
||||
|
||||
|
||||
if (status == PJ_EPENDING)
|
||||
++pending_op;
|
||||
else {
|
||||
/* Does not expect to return error or immediate data. */
|
||||
return -115;
|
||||
++pending_op;
|
||||
else {
|
||||
/* Does not expect to return error or immediate data. */
|
||||
return -115;
|
||||
}
|
||||
|
||||
// Randomize send buffer.
|
||||
pj_create_random_string((char*)send_buf, bufsize);
|
||||
|
||||
// Starts send on the client side.
|
||||
// Starts send on the client side.
|
||||
bytes = bufsize;
|
||||
status = pj_ioqueue_send(ckey, &write_op, send_buf, &bytes, 0);
|
||||
if (status != PJ_SUCCESS && bytes != PJ_EPENDING) {
|
||||
|
@ -135,12 +135,12 @@ static int send_recv_test(pj_ioqueue_t *ioque,
|
|||
|
||||
// Reset indicators
|
||||
callback_read_size = callback_write_size = 0;
|
||||
callback_read_key = callback_write_key = NULL;
|
||||
callback_read_key = callback_write_key = NULL;
|
||||
callback_read_op = callback_write_op = NULL;
|
||||
|
||||
// Poll the queue until we've got completion event in the server side.
|
||||
status = 0;
|
||||
while (pending_op > 0) {
|
||||
while (pending_op > 0) {
|
||||
timeout.sec = 1; timeout.msec = 0;
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status > 0) {
|
||||
|
@ -148,32 +148,32 @@ static int send_recv_test(pj_ioqueue_t *ioque,
|
|||
if (callback_read_size != bufsize)
|
||||
return -160;
|
||||
if (callback_read_key != skey)
|
||||
return -161;
|
||||
if (callback_read_op != &read_op)
|
||||
return -161;
|
||||
if (callback_read_op != &read_op)
|
||||
return -162;
|
||||
}
|
||||
if (callback_write_size) {
|
||||
if (callback_write_key != ckey)
|
||||
return -163;
|
||||
if (callback_write_op != &write_op)
|
||||
return -163;
|
||||
if (callback_write_op != &write_op)
|
||||
return -164;
|
||||
}
|
||||
pending_op -= status;
|
||||
}
|
||||
if (status == 0) {
|
||||
PJ_LOG(3,("", "...error: timed out"));
|
||||
}
|
||||
if (status == 0) {
|
||||
PJ_LOG(3,("", "...error: timed out"));
|
||||
}
|
||||
if (status < 0) {
|
||||
return -170;
|
||||
}
|
||||
}
|
||||
|
||||
// Pending op is zero.
|
||||
// Subsequent poll should yield zero too.
|
||||
timeout.sec = timeout.msec = 0;
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0)
|
||||
return -173;
|
||||
|
||||
// Pending op is zero.
|
||||
// Subsequent poll should yield zero too.
|
||||
timeout.sec = timeout.msec = 0;
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0)
|
||||
return -173;
|
||||
|
||||
// End time.
|
||||
pj_get_timestamp(&t2);
|
||||
|
@ -200,7 +200,7 @@ static int compliance_test_0(void)
|
|||
pj_pool_t *pool = NULL;
|
||||
char *send_buf, *recv_buf;
|
||||
pj_ioqueue_t *ioque = NULL;
|
||||
pj_ioqueue_key_t *skey, *ckey0, *ckey1;
|
||||
pj_ioqueue_key_t *skey, *ckey0, *ckey1;
|
||||
pj_ioqueue_op_key_t accept_op;
|
||||
int bufsize = BUF_MIN_SIZE;
|
||||
pj_ssize_t status = -1;
|
||||
|
@ -265,7 +265,7 @@ static int compliance_test_0(void)
|
|||
|
||||
// Server socket accept()
|
||||
client_addr_len = sizeof(pj_sockaddr_in);
|
||||
status = pj_ioqueue_accept(skey, &accept_op, &csock0,
|
||||
status = pj_ioqueue_accept(skey, &accept_op, &csock0,
|
||||
&client_addr, &rmt_addr, &client_addr_len);
|
||||
if (status != PJ_EPENDING) {
|
||||
app_perror("...ERROR in pj_ioqueue_accept()", rc);
|
||||
|
@ -297,7 +297,7 @@ static int compliance_test_0(void)
|
|||
|
||||
callback_read_key = callback_write_key =
|
||||
callback_accept_key = callback_connect_key = NULL;
|
||||
callback_accept_op = callback_read_op = callback_write_op = NULL;
|
||||
callback_accept_op = callback_read_op = callback_write_op = NULL;
|
||||
|
||||
while (pending_op) {
|
||||
pj_time_val timeout = {1, 0};
|
||||
|
@ -310,10 +310,10 @@ static int compliance_test_0(void)
|
|||
}
|
||||
if (callback_accept_key != skey) {
|
||||
status=-42; goto on_error;
|
||||
}
|
||||
if (callback_accept_op != &accept_op) {
|
||||
status=-43; goto on_error;
|
||||
}
|
||||
}
|
||||
if (callback_accept_op != &accept_op) {
|
||||
status=-43; goto on_error;
|
||||
}
|
||||
callback_accept_status = -2;
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ static int compliance_test_0(void)
|
|||
}
|
||||
if (callback_connect_key != ckey1) {
|
||||
status=-51; goto on_error;
|
||||
}
|
||||
}
|
||||
callback_connect_status = -2;
|
||||
}
|
||||
|
||||
|
@ -334,16 +334,16 @@ static int compliance_test_0(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// There's no pending operation.
|
||||
// When we poll the ioqueue, there must not be events.
|
||||
if (pending_op == 0) {
|
||||
pj_time_val timeout = {1, 0};
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0) {
|
||||
status=-60; goto on_error;
|
||||
}
|
||||
}
|
||||
|
||||
// There's no pending operation.
|
||||
// When we poll the ioqueue, there must not be events.
|
||||
if (pending_op == 0) {
|
||||
pj_time_val timeout = {1, 0};
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0) {
|
||||
status=-60; goto on_error;
|
||||
}
|
||||
}
|
||||
|
||||
// Check accepted socket.
|
||||
if (csock0 == PJ_INVALID_SOCKET) {
|
||||
|
@ -363,7 +363,7 @@ static int compliance_test_0(void)
|
|||
|
||||
// Test send and receive.
|
||||
t_elapsed.u32.lo = 0;
|
||||
status = send_recv_test(ioque, ckey0, ckey1, send_buf,
|
||||
status = send_recv_test(ioque, ckey0, ckey1, send_buf,
|
||||
recv_buf, bufsize, &t_elapsed);
|
||||
if (status != 0) {
|
||||
goto on_error;
|
||||
|
@ -468,17 +468,17 @@ static int compliance_test_1(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// There's no pending operation.
|
||||
// When we poll the ioqueue, there must not be events.
|
||||
if (pending_op == 0) {
|
||||
pj_time_val timeout = {1, 0};
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0) {
|
||||
status=-60; goto on_error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// There's no pending operation.
|
||||
// When we poll the ioqueue, there must not be events.
|
||||
if (pending_op == 0) {
|
||||
pj_time_val timeout = {1, 0};
|
||||
status = pj_ioqueue_poll(ioque, &timeout);
|
||||
if (status != 0) {
|
||||
status=-60; goto on_error;
|
||||
}
|
||||
}
|
||||
|
||||
// Success
|
||||
status = 0;
|
||||
|
||||
|
@ -495,12 +495,14 @@ int tcp_ioqueue_test()
|
|||
{
|
||||
int status;
|
||||
|
||||
PJ_LOG(3, (THIS_FILE, "..compliance test 0 (success scenario)"));
|
||||
PJ_LOG(3, (THIS_FILE, "..%s compliance test 0 (success scenario)",
|
||||
pj_ioqueue_name()));
|
||||
if ((status=compliance_test_0()) != 0) {
|
||||
PJ_LOG(1, (THIS_FILE, "....FAILED (status=%d)\n", status));
|
||||
return status;
|
||||
}
|
||||
PJ_LOG(3, (THIS_FILE, "..compliance test 1 (failed scenario)"));
|
||||
PJ_LOG(3, (THIS_FILE, "..%s compliance test 1 (failed scenario)",
|
||||
pj_ioqueue_name()));
|
||||
if ((status=compliance_test_1()) != 0) {
|
||||
PJ_LOG(1, (THIS_FILE, "....FAILED (status=%d)\n", status));
|
||||
return status;
|
||||
|
|
|
@ -42,34 +42,34 @@ static pj_ioqueue_key_t *callback_read_key,
|
|||
*callback_write_key,
|
||||
*callback_accept_key,
|
||||
*callback_connect_key;
|
||||
static pj_ioqueue_op_key_t *callback_read_op,
|
||||
*callback_write_op,
|
||||
*callback_accept_op;
|
||||
static pj_ioqueue_op_key_t *callback_read_op,
|
||||
*callback_write_op,
|
||||
*callback_accept_op;
|
||||
|
||||
static void on_ioqueue_read(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_read(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_ssize_t bytes_read)
|
||||
{
|
||||
callback_read_key = key;
|
||||
callback_read_key = key;
|
||||
callback_read_op = op_key;
|
||||
callback_read_size = bytes_read;
|
||||
}
|
||||
|
||||
static void on_ioqueue_write(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_write(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_ssize_t bytes_written)
|
||||
{
|
||||
callback_write_key = key;
|
||||
callback_write_key = key;
|
||||
callback_write_op = op_key;
|
||||
callback_write_size = bytes_written;
|
||||
}
|
||||
|
||||
static void on_ioqueue_accept(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
static void on_ioqueue_accept(pj_ioqueue_key_t *key,
|
||||
pj_ioqueue_op_key_t *op_key,
|
||||
pj_sock_t sock, int status)
|
||||
{
|
||||
PJ_UNUSED_ARG(sock);
|
||||
callback_accept_key = key;
|
||||
callback_accept_key = key;
|
||||
callback_accept_op = op_key;
|
||||
callback_accept_status = status;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ static int compliance_test(void)
|
|||
pj_pool_t *pool = NULL;
|
||||
char *send_buf, *recv_buf;
|
||||
pj_ioqueue_t *ioque = NULL;
|
||||
pj_ioqueue_key_t *skey, *ckey;
|
||||
pj_ioqueue_key_t *skey, *ckey;
|
||||
pj_ioqueue_op_key_t read_op, write_op;
|
||||
int bufsize = BUF_MIN_SIZE;
|
||||
pj_ssize_t bytes, status = -1;
|
||||
|
@ -183,11 +183,11 @@ static int compliance_test(void)
|
|||
|
||||
// Register reading from ioqueue.
|
||||
TRACE_("start recvfrom...");
|
||||
addrlen = sizeof(addr);
|
||||
addrlen = sizeof(addr);
|
||||
bytes = bufsize;
|
||||
rc = pj_ioqueue_recvfrom(skey, &read_op, recv_buf, &bytes, 0,
|
||||
&addr, &addrlen);
|
||||
if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
|
||||
if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
|
||||
app_perror("...error: pj_ioqueue_recvfrom", rc);
|
||||
status=-28; goto on_error;
|
||||
} else if (rc == PJ_EPENDING) {
|
||||
|
@ -201,11 +201,11 @@ static int compliance_test(void)
|
|||
}
|
||||
|
||||
// Write must return the number of bytes.
|
||||
TRACE_("start sendto...");
|
||||
TRACE_("start sendto...");
|
||||
bytes = bufsize;
|
||||
rc = pj_ioqueue_sendto(ckey, &write_op, send_buf, &bytes, 0, &addr,
|
||||
sizeof(addr));
|
||||
if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
|
||||
if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
|
||||
app_perror("...error: pj_ioqueue_sendto", rc);
|
||||
status=-30; goto on_error;
|
||||
} else if (rc == PJ_EPENDING) {
|
||||
|
@ -223,7 +223,7 @@ static int compliance_test(void)
|
|||
callback_accept_status = callback_connect_status = -2;
|
||||
callback_read_key = callback_write_key =
|
||||
callback_accept_key = callback_connect_key = NULL;
|
||||
callback_read_op = callback_write_op = NULL;
|
||||
callback_read_op = callback_write_op = NULL;
|
||||
|
||||
// Poll if pending.
|
||||
while (send_pending || recv_pending) {
|
||||
|
@ -247,9 +247,9 @@ static int compliance_test(void)
|
|||
}
|
||||
if (callback_read_key != skey) {
|
||||
status=-65; goto on_error;
|
||||
}
|
||||
if (callback_read_op != &read_op) {
|
||||
status=-66; goto on_error;
|
||||
}
|
||||
if (callback_read_op != &read_op) {
|
||||
status=-66; goto on_error;
|
||||
}
|
||||
|
||||
if (memcmp(send_buf, recv_buf, bufsize) != 0) {
|
||||
|
@ -266,9 +266,9 @@ static int compliance_test(void)
|
|||
}
|
||||
if (callback_write_key != ckey) {
|
||||
status=-75; goto on_error;
|
||||
}
|
||||
if (callback_write_op != &write_op) {
|
||||
status=-76; goto on_error;
|
||||
}
|
||||
if (callback_write_op != &write_op) {
|
||||
status=-76; goto on_error;
|
||||
}
|
||||
|
||||
send_pending = 0;
|
||||
|
@ -386,7 +386,7 @@ static int bench_test(int bufsize, int inactive_sock_count)
|
|||
pj_sock_t ssock=-1, csock=-1;
|
||||
pj_sockaddr_in addr;
|
||||
pj_pool_t *pool = NULL;
|
||||
pj_sock_t *inactive_sock=NULL;
|
||||
pj_sock_t *inactive_sock=NULL;
|
||||
pj_ioqueue_op_key_t *inactive_read_op;
|
||||
char *send_buf, *recv_buf;
|
||||
pj_ioqueue_t *ioque = NULL;
|
||||
|
@ -433,13 +433,13 @@ static int bench_test(int bufsize, int inactive_sock_count)
|
|||
// Allocate inactive sockets, and bind them to some arbitrary address.
|
||||
// Then register them to the I/O queue, and start a read operation.
|
||||
inactive_sock = (pj_sock_t*)pj_pool_alloc(pool,
|
||||
inactive_sock_count*sizeof(pj_sock_t));
|
||||
inactive_read_op = (pj_ioqueue_op_key_t*)pj_pool_alloc(pool,
|
||||
inactive_sock_count*sizeof(pj_sock_t));
|
||||
inactive_read_op = (pj_ioqueue_op_key_t*)pj_pool_alloc(pool,
|
||||
inactive_sock_count*sizeof(pj_ioqueue_op_key_t));
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
addr.sin_family = PJ_AF_INET;
|
||||
for (i=0; i<inactive_sock_count; ++i) {
|
||||
pj_ssize_t bytes;
|
||||
for (i=0; i<inactive_sock_count; ++i) {
|
||||
pj_ssize_t bytes;
|
||||
|
||||
rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &inactive_sock[i]);
|
||||
if (rc != PJ_SUCCESS || inactive_sock[i] < 0) {
|
||||
|
@ -460,7 +460,7 @@ static int bench_test(int bufsize, int inactive_sock_count)
|
|||
app_perror("...error(1): pj_ioqueue_register_sock()", rc);
|
||||
PJ_LOG(3,(THIS_FILE, "....i=%d", i));
|
||||
goto on_error;
|
||||
}
|
||||
}
|
||||
bytes = bufsize;
|
||||
rc = pj_ioqueue_recv(key, &inactive_read_op[i], recv_buf, &bytes, 0);
|
||||
if ( rc < 0 && rc != PJ_EPENDING) {
|
||||
|
@ -494,13 +494,13 @@ static int bench_test(int bufsize, int inactive_sock_count)
|
|||
// Test loop.
|
||||
t_elapsed.u64 = 0;
|
||||
for (i=0; i<LOOP; ++i) {
|
||||
pj_ssize_t bytes;
|
||||
pj_ssize_t bytes;
|
||||
pj_ioqueue_op_key_t read_op, write_op;
|
||||
|
||||
// Randomize send buffer.
|
||||
pj_create_random_string(send_buf, bufsize);
|
||||
|
||||
// Start reading on the server side.
|
||||
// Start reading on the server side.
|
||||
bytes = bufsize;
|
||||
rc = pj_ioqueue_recv(skey, &read_op, recv_buf, &bytes, 0);
|
||||
if (rc < 0 && rc != PJ_EPENDING) {
|
||||
|
@ -508,7 +508,7 @@ static int bench_test(int bufsize, int inactive_sock_count)
|
|||
break;
|
||||
}
|
||||
|
||||
// Starts send on the client side.
|
||||
// Starts send on the client side.
|
||||
bytes = bufsize;
|
||||
rc = pj_ioqueue_sendto(ckey, &write_op, send_buf, &bytes, 0,
|
||||
&addr, sizeof(addr));
|
||||
|
@ -587,7 +587,7 @@ on_error:
|
|||
pj_sock_close(csock);
|
||||
for (i=0; i<inactive_sock_count && inactive_sock &&
|
||||
inactive_sock[i]!=PJ_INVALID_SOCKET; ++i)
|
||||
{
|
||||
{
|
||||
pj_sock_close(inactive_sock[i]);
|
||||
}
|
||||
if (ioque != NULL)
|
||||
|
@ -601,7 +601,7 @@ int udp_ioqueue_test()
|
|||
int status;
|
||||
int bufsize, sock_count;
|
||||
|
||||
PJ_LOG(3, (THIS_FILE, "...compliance test"));
|
||||
PJ_LOG(3, (THIS_FILE, "...compliance test (%s)", pj_ioqueue_name()));
|
||||
if ((status=compliance_test()) != 0) {
|
||||
return status;
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ int udp_ioqueue_test()
|
|||
PJ_LOG(4, (THIS_FILE, "... note: buf=bytes sent, fds=# of fds, "
|
||||
"elapsed=in timer ticks"));
|
||||
|
||||
PJ_LOG(3, (THIS_FILE, "...Benchmarking poll times:"));
|
||||
PJ_LOG(3, (THIS_FILE, "...Benchmarking poll times for %s:", pj_ioqueue_name()));
|
||||
PJ_LOG(3, (THIS_FILE, "...====================================="));
|
||||
PJ_LOG(3, (THIS_FILE, "...Buf.size #inactive-socks Time/poll"));
|
||||
PJ_LOG(3, (THIS_FILE, "... (bytes) (nanosec)"));
|
||||
|
|
|
@ -132,10 +132,6 @@ int test_inner(void)
|
|||
DO_TEST( file_test() );
|
||||
#endif
|
||||
|
||||
#if INCLUDE_XML_TEST
|
||||
DO_TEST( xml_test() );
|
||||
#endif
|
||||
|
||||
#if INCLUDE_ECHO_SERVER
|
||||
//echo_server();
|
||||
//echo_srv_sync();
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#define GROUP_DATA_STRUCTURE 1
|
||||
#define GROUP_NETWORK 1
|
||||
#define GROUP_FILE 1
|
||||
#define GROUP_EXTRA 0
|
||||
|
||||
#define INCLUDE_ERRNO_TEST GROUP_LIBC
|
||||
#define INCLUDE_TIMESTAMP_TEST GROUP_OS
|
||||
|
@ -34,7 +33,6 @@
|
|||
#define INCLUDE_TCP_IOQUEUE_TEST GROUP_NETWORK
|
||||
#define INCLUDE_IOQUEUE_PERF_TEST GROUP_NETWORK
|
||||
#define INCLUDE_FILE_TEST GROUP_FILE
|
||||
#define INCLUDE_XML_TEST GROUP_EXTRA
|
||||
|
||||
#define INCLUDE_ECHO_SERVER 0
|
||||
#define INCLUDE_ECHO_CLIENT 0
|
||||
|
@ -71,7 +69,6 @@ extern int udp_ioqueue_test(void);
|
|||
extern int tcp_ioqueue_test(void);
|
||||
extern int ioqueue_perf_test(void);
|
||||
extern int file_test(void);
|
||||
extern int xml_test(void);
|
||||
|
||||
extern int echo_server(void);
|
||||
extern int echo_client(int sock_type, const char *server, int port);
|
||||
|
|
Loading…
Reference in New Issue