pgpool2.git / summary / log / commit / refs

commit    39ebf35c1cbe4285cb651eaf3150303bfe2b8ea7
Author:   Yugo Nagata <nagata@sraoss.co.jp>
Date:     Thu May 23 23:29:41 2013 +0000

    Fix a bug that wattchdog can use only one network device for heartbeat.


pool_config.c | 5 +++-- pool_config.l | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pool_config.c b/pool_config.c index de7a20af6..422f7f3e1 100644 --- a/pool_config.c +++ b/pool_config.c @@ -3914,7 +3914,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) int slot; char *str; - slot = atoi(key + 10) ; + slot = atoi(key + 16) ; if (slot < 0 || slot >= WD_MAX_IF_NUM) { pool_error("pool_config: pgpool number %s for heartbeat_device out of range", key); @@ -3932,6 +3932,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) { strlcpy(WD_HB_IF(slot).if_name, str, WD_MAX_IF_NAME_LEN); pool_config->num_hb_if = slot + 1; + pool_log("hoge %d",pool_config->num_hb_if); } } @@ -3942,7 +3943,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) int slot; char *str; - slot = atoi(key + 15) ; + slot = atoi(key + 21) ; if (slot < 0 || slot >= WD_MAX_IF_NUM) { pool_error("pool_config: pgpool number %s for heartbeat_destination out of range", key); diff --git a/pool_config.l b/pool_config.l index 0b8e471ec..9011656ee 100644 --- a/pool_config.l +++ b/pool_config.l @@ -2367,7 +2367,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) int slot; char *str; - slot = atoi(key + 10) ; + slot = atoi(key + 16) ; if (slot < 0 || slot >= WD_MAX_IF_NUM) { pool_error("pool_config: pgpool number %s for heartbeat_device out of range", key); @@ -2395,7 +2395,7 @@ int pool_get_config(char *confpath, POOL_CONFIG_CONTEXT context) int slot; char *str; - slot = atoi(key + 15) ; + slot = atoi(key + 21) ; if (slot < 0 || slot >= WD_MAX_IF_NUM) { pool_error("pool_config: pgpool number %s for heartbeat_destination out of range", key); [parent: e804d8742159]