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
certified/1.8.6
Jonathan Rose 14 years ago
parent fd24de3306
commit a99d9c7770

@ -42,9 +42,11 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
char *c = NULL;
int error = 0;
/* check for valid input */
if (ast_strlen_zero(uri)) {
/* make sure we leave nothing undefined after we exit */
/*
* Initialize requested strings - some functions don't care if parse_uri fails
* and will attempt to use string pointers passed into parse_uri even after a
* parse_uri failure
*/
if (user) {
*user = "";
}
@ -61,6 +63,8 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
*residue = "";
}
/* check for valid input */
if (ast_strlen_zero(uri)) {
return -1;
}

Loading…
Cancel
Save