conn->user and conn->passwd will now always be set to point to something.

If not user or password is set, they will point to a "" string.
This commit is contained in:
Daniel Stenberg
2003-10-21 06:34:15 +00:00
parent d7c09efeb1
commit d1c08e1d85
2 changed files with 6 additions and 9 deletions

View File

@@ -2765,9 +2765,9 @@ static CURLcode CreateConnection(struct SessionHandle *data,
/* This is the default password, so DON'T set conn->bits.user_passwd */
}
else {
/* store user + password */
conn->user = user[0]?strdup(user):NULL;
conn->passwd = passwd[0]?strdup(passwd):NULL;
/* store user + password, zero-length if not set */
conn->user = strdup(user);
conn->passwd = strdup(passwd);
}
/*************************************************************