mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
markm committed a patch I was working on yesterday, this fixes it to mesh up with suggestions by mnicholson.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -42,9 +42,11 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
|
|||||||
char *c = NULL;
|
char *c = NULL;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
/* check for valid input */
|
/*
|
||||||
if (ast_strlen_zero(uri)) {
|
* Initialize requested strings - some functions don't care if parse_uri fails
|
||||||
/* make sure we leave nothing undefined after we exit */
|
* and will attempt to use string pointers passed into parse_uri even after a
|
||||||
|
* parse_uri failure
|
||||||
|
*/
|
||||||
if (user) {
|
if (user) {
|
||||||
*user = "";
|
*user = "";
|
||||||
}
|
}
|
||||||
@@ -61,6 +63,8 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
|
|||||||
*residue = "";
|
*residue = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check for valid input */
|
||||||
|
if (ast_strlen_zero(uri)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user