Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
sofia-sip
Commits
591f191d
Commit
591f191d
authored
Oct 18, 2005
by
Pekka Pessi
Browse files
Added -s option.
darcs-hash:20051018162428-65a35-6b2ea6a0c1b797d6d3933a1e45be5e0b035fe3a5.gz
parent
1aa22ff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
libsofia-sip-ua/nua/test_nua.c
libsofia-sip-ua/nua/test_nua.c
+10
-2
No files found.
libsofia-sip-ua/nua/test_nua.c
View file @
591f191d
...
...
@@ -97,6 +97,8 @@ struct context
su_home_t
home
[
1
];
su_root_t
*
root
;
int
threading
;
struct
endpoint
{
char
name
[
4
];
struct
context
*
ctx
;
/* Backpointer */
...
...
@@ -551,7 +553,7 @@ int test_params(struct context *ctx)
ctx
->
root
=
su_root_create
(
ctx
);
TEST_1
(
ctx
->
root
);
/* Disable threading by command line switch? */
su_root_threading
(
ctx
->
root
,
1
);
su_root_threading
(
ctx
->
root
,
ctx
->
threading
);
ctx
->
a
.
nua
=
nua_create
(
ctx
->
root
,
a_callback
,
ctx
,
SIPTAG_FROM_STR
(
"sip:alice@example.com"
),
...
...
@@ -924,7 +926,7 @@ int test_init(struct context *ctx, char *argv[])
ctx
->
root
=
su_root_create
(
ctx
);
TEST_1
(
ctx
->
root
);
/* Disable threading by command line switch? */
su_root_threading
(
ctx
->
root
,
1
);
su_root_threading
(
ctx
->
root
,
ctx
->
threading
);
if
(
print_headings
)
printf
(
"TEST NUA-3.0.1: init endpoint A
\n
"
);
...
...
@@ -2474,6 +2476,7 @@ static RETSIGTYPE sig_alarm(int s)
static
char
const
options
[]
=
" -v | --verbose be verbose
\n
"
" -q | --quiet be quiet
\n
"
" -s use only single thread
\n
"
" -l level set logging level (0 by default)
\n
"
" -e | --events print nua events
\n
"
" -A print nua events for A
\n
"
...
...
@@ -2501,6 +2504,8 @@ int main(int argc, char *argv[])
struct
context
ctx
[
1
]
=
{{{
SU_HOME_INIT
(
ctx
)
}}};
ctx
->
threading
=
1
;
ctx
->
a
.
name
[
0
]
=
'a'
;
ctx
->
a
.
ctx
=
ctx
;
ctx
->
a
.
events
.
tail
=
&
ctx
->
a
.
events
.
head
;
...
...
@@ -2542,6 +2547,9 @@ int main(int argc, char *argv[])
else
if
(
strcmp
(
argv
[
i
],
"-B"
)
==
0
)
{
o_events_b
=
1
;
}
else
if
(
strcmp
(
argv
[
i
],
"-s"
)
==
0
)
{
ctx
->
threading
=
0
;
}
else
if
(
strncmp
(
argv
[
i
],
"-p"
,
2
)
==
0
)
{
if
(
argv
[
i
][
2
])
o_proxy
=
argv
[
i
]
+
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment