mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Drop dba_lock.name element
This is unused
This commit is contained in:
parent
b6b820e532
commit
c42336b8b8
2 changed files with 3 additions and 13 deletions
|
@ -279,9 +279,6 @@ static void dba_close(dba_info *info)
|
||||||
php_stream_close(info->lock.fp);
|
php_stream_close(info->lock.fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info->lock.name) {
|
|
||||||
pefree(info->lock.name, info->flags&DBA_PERSISTENT);
|
|
||||||
}
|
|
||||||
pefree(info, info->flags&DBA_PERSISTENT);
|
pefree(info, info->flags&DBA_PERSISTENT);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
@ -754,15 +751,13 @@ restart:
|
||||||
/* do not log errors for .lck file while in read only mode on .lck file */
|
/* do not log errors for .lck file while in read only mode on .lck file */
|
||||||
lock_file_mode = "rb";
|
lock_file_mode = "rb";
|
||||||
info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, &opened_path);
|
info->lock.fp = php_stream_open_wrapper(lock_name, lock_file_mode, STREAM_MUST_SEEK|IGNORE_PATH|persistent_flag, &opened_path);
|
||||||
|
if (opened_path) {
|
||||||
|
zend_string_release_ex(opened_path, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!info->lock.fp) {
|
if (!info->lock.fp) {
|
||||||
/* when not in read mode or failed to open .lck file read only. now try again in create(write) mode and log errors */
|
/* when not in read mode or failed to open .lck file read only. now try again in create(write) mode and log errors */
|
||||||
lock_file_mode = "a+b";
|
lock_file_mode = "a+b";
|
||||||
} else {
|
|
||||||
if (opened_path) {
|
|
||||||
info->lock.name = pestrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path), persistent);
|
|
||||||
zend_string_release_ex(opened_path, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!info->lock.fp) {
|
if (!info->lock.fp) {
|
||||||
|
@ -773,8 +768,6 @@ restart:
|
||||||
pefree(info->path, persistent);
|
pefree(info->path, persistent);
|
||||||
info->path = pestrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path), persistent);
|
info->path = pestrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path), persistent);
|
||||||
}
|
}
|
||||||
/* now store the name of the lock */
|
|
||||||
info->lock.name = pestrndup(ZSTR_VAL(opened_path), ZSTR_LEN(opened_path), persistent);
|
|
||||||
zend_string_release_ex(opened_path, 0);
|
zend_string_release_ex(opened_path, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -834,8 +827,6 @@ restart:
|
||||||
info->lock.fp = NULL;
|
info->lock.fp = NULL;
|
||||||
info->fd = -1;
|
info->fd = -1;
|
||||||
|
|
||||||
pefree(info->lock.name, persistent);
|
|
||||||
|
|
||||||
lock_file_mode = "r+b";
|
lock_file_mode = "r+b";
|
||||||
|
|
||||||
restarted = 1;
|
restarted = 1;
|
||||||
|
|
|
@ -32,7 +32,6 @@ typedef enum {
|
||||||
|
|
||||||
typedef struct dba_lock {
|
typedef struct dba_lock {
|
||||||
php_stream *fp;
|
php_stream *fp;
|
||||||
char *name;
|
|
||||||
int mode; /* LOCK_EX,LOCK_SH */
|
int mode; /* LOCK_EX,LOCK_SH */
|
||||||
} dba_lock;
|
} dba_lock;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue