Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
sofia-sip
Commits
43253e1c
Commit
43253e1c
authored
Nov 03, 2005
by
Pekka Pessi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added loopback message test.
darcs-hash:20051103110356-65a35-94202e74a945b5547752dbfc9071fd4a5d6e0e60.gz
parent
0900c193
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
libsofia-sip-ua/nua/test_nua.c
libsofia-sip-ua/nua/test_nua.c
+49
-0
No files found.
libsofia-sip-ua/nua/test_nua.c
View file @
43253e1c
...
...
@@ -3445,6 +3445,49 @@ int test_methods(struct context *ctx)
if
(
print_headings
)
printf
(
"TEST NUA-11.1: PASSED
\n
"
);
/* Message test
A
|-------MESSAGE--\
|<---------------/
|--------200-----\
|<---------------/
|
*/
if
(
print_headings
)
printf
(
"TEST NUA-11.1b: MESSAGE
\n
"
);
TEST_1
(
a_call
->
nh
=
nua_handle
(
a
->
nua
,
a_call
,
SIPTAG_TO
(
a
->
to
),
TAG_END
()));
message
(
a
,
a_call
,
a_call
->
nh
,
NUTAG_URL
(
a
->
contact
->
m_url
),
SIPTAG_SUBJECT_STR
(
"Hello"
),
SIPTAG_CONTENT_TYPE_STR
(
"text/plain"
),
SIPTAG_PAYLOAD_STR
(
"Hello hellO!
\n
"
),
TAG_END
());
run_a_until
(
ctx
,
-
1
,
save_until_final_response
);
/* Events:
nua_message(), nua_i_message, nua_r_message
*/
TEST_1
(
e
=
a_call
->
events
.
head
);
TEST_E
(
e
->
data
->
e_event
,
nua_i_message
);
TEST
(
e
->
data
->
e_status
,
200
);
TEST_1
(
sip
=
sip_object
(
e
->
data
->
e_msg
));
TEST_1
(
sip
->
sip_subject
&&
sip
->
sip_subject
->
g_string
);
TEST_S
(
sip
->
sip_subject
->
g_string
,
"Hello"
);
TEST_1
(
e
=
e
->
next
);
TEST_E
(
e
->
data
->
e_event
,
nua_r_message
);
TEST
(
e
->
data
->
e_status
,
200
);
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
a_call
);
nua_handle_destroy
(
a_call
->
nh
),
a_call
->
nh
=
NULL
;
if
(
print_headings
)
printf
(
"TEST NUA-11.1b: PASSED
\n
"
);
/* OPTIONS test
A B
...
...
@@ -3566,6 +3609,11 @@ int test_methods(struct context *ctx)
TEST
(
e
->
data
->
e_status
,
501
);
TEST_1
(
!
e
->
next
);
free_events_in_list
(
ctx
,
a_call
);
nua_handle_destroy
(
a_call
->
nh
),
a_call
->
nh
=
NULL
;
free_events_in_list
(
ctx
,
b_call
);
nua_handle_destroy
(
b_call
->
nh
),
b_call
->
nh
=
NULL
;
if
(
print_headings
)
printf
(
"TEST NUA-11.3: PASSED
\n
"
);
...
...
@@ -3780,6 +3828,7 @@ int main(int argc, char *argv[])
retval
|=
test_refer
(
ctx
);
SINGLE_FAILURE_CHECK
();
/* retval |= test_100rel(ctx); SINGLE_FAILURE_CHECK(); */
retval
|=
test_methods
(
ctx
);
SINGLE_FAILURE_CHECK
();
retval
|=
test_events
(
ctx
);
SINGLE_FAILURE_CHECK
();
}
retval
|=
test_deinit
(
ctx
);
SINGLE_FAILURE_CHECK
();
...
...
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