mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-14 14:42:13 -04:00
BUG/MINOR: mworker: avoid passing NULL version in proc list serialization
Add a NULL guard for the version field. This has no functional impact since the master process never uses this field for its own mworker_proc element, and should be the only one impacted. This avoid seeing "(null)" in the version field when debugging. Must be backported to 3.1 and later.
This commit is contained in:
parent
51d6f1ca4f
commit
a3bf0de651
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ void mworker_proc_list_to_env()
|
|||
type = 'w';
|
||||
|
||||
if (child->pid > -1)
|
||||
memprintf(&msg, "%s|type=%c;fd=%d;cfd=%d;pid=%d;reloads=%d;failedreloads=%d;timestamp=%d;id=%s;version=%s", msg ? msg : "", type, child->ipc_fd[0], child->ipc_fd[1], child->pid, child->reloads, child->failedreloads, child->timestamp, child->id ? child->id : "", child->version);
|
||||
memprintf(&msg, "%s|type=%c;fd=%d;cfd=%d;pid=%d;reloads=%d;failedreloads=%d;timestamp=%d;id=%s;version=%s", msg ? msg : "", type, child->ipc_fd[0], child->ipc_fd[1], child->pid, child->reloads, child->failedreloads, child->timestamp, child->id ? child->id : "", child->version ? child->version : "");
|
||||
}
|
||||
if (msg)
|
||||
setenv("HAPROXY_PROCESSES", msg, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue