summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 6ea4fd14374..1b24d3ee6fe 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -3039,14 +3039,14 @@ gf_ports_reserved (char *blocked_port, unsigned char *ports, uint32_t ceiling)
{
gf_boolean_t result = _gf_false;
char *range_port = NULL;
- int16_t tmp_port1 = -1;
- int16_t tmp_port2 = -1;
+ int32_t tmp_port1 = -1;
+ int32_t tmp_port2 = -1;
if (strstr (blocked_port, "-") == NULL) {
/* get rid of the new line character*/
if (blocked_port[strlen(blocked_port) -1] == '\n')
blocked_port[strlen(blocked_port) -1] = '\0';
- if (gf_string2int16 (blocked_port, &tmp_port1) == 0) {
+ if (gf_string2int32 (blocked_port, &tmp_port1) == 0) {
if (tmp_port1 > ceiling
|| tmp_port1 < 0) {
gf_msg ("glusterfs-socket", GF_LOG_WARNING, 0,
@@ -3072,7 +3072,7 @@ gf_ports_reserved (char *blocked_port, unsigned char *ports, uint32_t ceiling)
result = _gf_true;
goto out;
}
- if (gf_string2int16 (range_port, &tmp_port1) == 0) {
+ if (gf_string2int32 (range_port, &tmp_port1) == 0) {
if (tmp_port1 > ceiling)
tmp_port1 = ceiling;
if (tmp_port1 < 0)
@@ -3086,7 +3086,7 @@ gf_ports_reserved (char *blocked_port, unsigned char *ports, uint32_t ceiling)
/* get rid of the new line character*/
if (range_port[strlen(range_port) -1] == '\n')
range_port[strlen(range_port) - 1] = '\0';
- if (gf_string2int16 (range_port, &tmp_port2) == 0) {
+ if (gf_string2int32 (range_port, &tmp_port2) == 0) {
if (tmp_port2 > ceiling)
tmp_port2 = ceiling;
if (tmp_port2 < 0)