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
belle-sip
Commits
5028dff1
Commit
5028dff1
authored
Jul 15, 2014
by
jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure uri without host are valid
parent
50c6caa9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/grammars/belle_sip_message.g
src/grammars/belle_sip_message.g
+2
-0
tester/belle_generic_uri_tester.c
tester/belle_generic_uri_tester.c
+4
-4
No files found.
src/grammars/belle_sip_message.g
View file @
5028dff1
...
...
@@ -309,6 +309,8 @@ catch [ANTLR3_MISMATCHED_TOKEN_EXCEPTION]
hier_part[belle_generic_uri_t* uri] returns [belle_generic_uri_t* ret=NULL]
: (
(SLASH SLASH path_segments[NULL])=>( SLASH SLASH path_segments[uri])
|
(SLASH SLASH)=>( SLASH SLASH authority[uri] (path_segments[uri])?)
|
( path_segments[uri]) )
...
...
tester/belle_generic_uri_tester.c
View file @
5028dff1
...
...
@@ -94,13 +94,13 @@ static void test_file_path() {
belle_sip_object_unref
(
source_uri
);
}
/
/
this is INVALID
source_uri
=
belle_generic_uri_parse
(
"file://
/
./relative-file"
);
/
*
this is INVALID
*/
source_uri
=
belle_generic_uri_parse
(
"file://./relative-file"
);
CU_ASSERT_PTR_NULL
(
source_uri
);
/
/ instead, this should be VALID
/
* PATH segment always start by / */
source_uri
=
belle_generic_uri_parse
(
"./relative-file"
);
CU_ASSERT_PTR_
NOT_
NULL
(
source_uri
);
CU_ASSERT_PTR_NULL
(
source_uri
);
if
(
source_uri
!=
NULL
){
belle_sip_object_unref
(
source_uri
);
}
...
...
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