mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
Change bgw_main field length to BGW_MAXLEN
The content of bgw_main is copied into BackgroundWorker. bgw_function_name, which has a length of BGW_MAXLEN. This patch ensures that the size of these fields has the same length.
This commit is contained in:
parent
91b4a66eb9
commit
83fc20f195
@ -127,7 +127,7 @@ ts_bgw_start_worker(const char *name, const BgwParams *bgw_params)
|
||||
|
||||
strlcpy(worker.bgw_name, name, BGW_MAXLEN);
|
||||
strlcpy(worker.bgw_library_name, ts_extension_get_so_name(), BGW_MAXLEN);
|
||||
strlcpy(worker.bgw_function_name, bgw_params->bgw_main, sizeof(worker.bgw_function_name));
|
||||
strlcpy(worker.bgw_function_name, bgw_params->bgw_main, BGW_MAXLEN);
|
||||
|
||||
memcpy(worker.bgw_extra, bgw_params, sizeof(*bgw_params));
|
||||
|
||||
|
@ -40,7 +40,7 @@ typedef struct BgwParams
|
||||
int32 ttl;
|
||||
|
||||
/** Name of function to call when starting the background worker. */
|
||||
char bgw_main[NAMEDATALEN];
|
||||
char bgw_main[BGW_MAXLEN];
|
||||
} BgwParams;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user