pgpool2.git / summary / log / commit / refs

commit    753a4c84594c12656dd1e9d535ebd63e4c576e59
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Tue Oct 30 07:13:58 2007 +0000

    Fix segfault with "SHOW pool_status".


pool_process_query.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pool_process_query.c b/pool_process_query.c index a8fb62d0c..73358f4e5 100644 --- a/pool_process_query.c +++ b/pool_process_query.c @@ -3276,22 +3276,22 @@ static void process_reporting(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *b i++; strncpy(status[i].name, "recovery_user", POOLCONFIG_MAXNAMELEN); - snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->recovery_user); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->recovery_user); strncpy(status[i].desc, "online recovery user", POOLCONFIG_MAXDESCLEN); i++; strncpy(status[i].name, "recovery_password", POOLCONFIG_MAXNAMELEN); - snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->recovery_password); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->recovery_password); strncpy(status[i].desc, "online recovery password", POOLCONFIG_MAXDESCLEN); i++; strncpy(status[i].name, "recovery_1st_stage_command", POOLCONFIG_MAXNAMELEN); - snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->recovery_1st_stage_command); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->recovery_1st_stage_command); strncpy(status[i].desc, "execute a command in first stage.", POOLCONFIG_MAXDESCLEN); i++; strncpy(status[i].name, "recovery_2nd_stage_command", POOLCONFIG_MAXNAMELEN); - snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%d", pool_config->recovery_2nd_stage_command); + snprintf(status[i].value, POOLCONFIG_MAXVALLEN, "%s", pool_config->recovery_2nd_stage_command); strncpy(status[i].desc, "execute a command in second stage.", POOLCONFIG_MAXDESCLEN); i++; [parent: b44c7a8da60a]