mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Drop dba_lock.name element
This is unused
This commit is contained in:
parent
b6b820e532
commit
c42336b8b8
@ -279,9 +279,6 @@ static void dba_close(dba_info *info)
|
||||
php_stream_close(info->lock.fp);
|
||||
}
|
||||
}
|
||||
if (info->lock.name) {
|
||||
pefree(info->lock.name, 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 */
|
||||
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);
|
||||
if (opened_path) {
|
||||
zend_string_release_ex(opened_path, 0);
|
||||
}
|
||||
}
|
||||
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 */
|
||||
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) {
|
||||
@ -773,8 +768,6 @@ restart:
|
||||
pefree(info->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);
|
||||
}
|
||||
}
|
||||
@ -834,8 +827,6 @@ restart:
|
||||
info->lock.fp = NULL;
|
||||
info->fd = -1;
|
||||
|
||||
pefree(info->lock.name, persistent);
|
||||
|
||||
lock_file_mode = "r+b";
|
||||
|
||||
restarted = 1;
|
||||
|
@ -32,7 +32,6 @@ typedef enum {
|
||||
|
||||
typedef struct dba_lock {
|
||||
php_stream *fp;
|
||||
char *name;
|
||||
int mode; /* LOCK_EX,LOCK_SH */
|
||||
} dba_lock;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user