Only call ne_uri_defaultport if scheme != NULL

This commit is contained in:
wbaumann
2009-06-06 17:51:09 +00:00
parent 2c93b8d9b6
commit 9bf8e61826
3 changed files with 8 additions and 2 deletions

View File

@ -1513,7 +1513,7 @@ dav_setattr(dav_node *node, uid_t uid, int sm, mode_t mode, int so,
dav_stat *
dav_statfs(void)
{
if (time(NULL) > (fs_stat->utime + dir_refresh)) {
if (time(NULL) > (fs_stat->utime + retry)) {
off64_t total = 0;
off64_t used = 0;
if (dav_quota(root->path, &total, &used) == 0) {

View File

@ -2357,7 +2357,7 @@ read_secrets(dav_args *args, const char *filename)
char *path = 0;
split_uri(&scheme, &host, &port, &path, parmv[0]);
int p_port = port;
if (!port)
if (scheme && !port)
port = ne_uri_defaultport(scheme);
char *ccert = NULL;