diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2018-11-23 10:37:40 +0100 |
---|---|---|
committer | Xavi Hernandez <xhernandez@redhat.com> | 2018-11-23 11:05:02 +0100 |
commit | a0fdc9202ca37dccab937e166c8ee696d049e08f (patch) | |
tree | fbad8b610ea4467de02f3ddc64a5c54465186fa8 /xlators/protocol | |
parent | 7e691da0d37745e12d2f3e132545db82f05ea8f6 (diff) |
core: create a constant for default network timeout
A new constant named GF_NETWORK_TIMEOUT has been defined and all
references to the hard-coded timeout of 42 seconds have been
replaced with this constant.
Change-Id: Id30f5ce4f1230f9288d9e300538624bcf1a6da27
fixes: bz#1652852
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index c5bf28dcfb6..37c2d9891b6 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -2939,7 +2939,7 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_TIME, .min = 0, .max = 1013, - .default_value = "42", + .default_value = TOSTRING(GF_NETWORK_TIMEOUT), .description = "Time duration for which the client waits to " "check if the server is responsive.", .op_version = {1}, diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 8416b42b659..8d8e8fc5718 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -1681,7 +1681,7 @@ struct volume_options server_options[] = { .type = GF_OPTION_TYPE_TIME, .min = 0, .max = 1013, - .default_value = "42", /* default like network.ping-timeout */ + .default_value = TOSTRING(GF_NETWORK_TIMEOUT), }, { .key = {"transport.*"}, |