MINOR: server: improve parsing error for server-template
When parsing a server configuration line, a global context is set to the current server instance. This allows to automatically prefix any warning/error messages by the server name. This prefix is generated via generate_usermsgs_ctx_str(). The output was not useful for server-template lines as server <id> is NULL for them. Thus, this patch improves generate_usermsgs_ctx_str() to identify a server-template. Now, a dedicated 'server-template' prefix is generated, with <tmpl_info.prefix> used instead of NULL <id> field. * Example of a previous error message : [ALERT] (39934) : config : [./hap.cfg:54] : 'server-template be/(null)' : error detected while parsing [...] * Example of a new error message : [ALERT] (40205) : config : [./hap.cfg:54] : 'server-template be/local' : error detected while parsing [...]
A
Amaury Denoyelle committed
94024a60dc197b26a13751a6a0eaa3071f023cfa
Parent: 26e74f1