Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0823705

Browse files
Fix overridden callbacks in pg_rewind.
The <source>_traverse_files functions take a callback for processingfiles, but both the local and libpq source implementations called thefunction directly without using the callback argument. While there isno bug right now as the function called is the same as the callback,fix by calling the callback to reduce the risk of subtle bugs in thefuture.Author: Junwang Zhao <zhjwpku@gmail.com>Reviewed-by: Richard Guo <guofenglinux@gmail.com>Discussion:https://postgr.es/m/CAEG8a3Jdwgh+PZr2zh1=t8apA4Yz8tKq+uubPqoCt14nvWKHEw@mail.gmail.com
1 parente0bb5d0 commit0823705

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/bin/pg_rewind/libpq_source.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ libpq_traverse_files(rewind_source *source, process_file_callback_t callback)
304304
else
305305
type=FILE_TYPE_REGULAR;
306306

307-
process_source_file(path,type,filesize,link_target);
307+
callback(path,type,filesize,link_target);
308308
}
309309
PQclear(res);
310310
}

‎src/bin/pg_rewind/local_source.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ init_local_source(const char *datadir)
5959
staticvoid
6060
local_traverse_files(rewind_source*source,process_file_callback_tcallback)
6161
{
62-
traverse_datadir(((local_source*)source)->datadir,&process_source_file);
62+
traverse_datadir(((local_source*)source)->datadir,callback);
6363
}
6464

6565
staticchar*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp