diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-02-26 18:34:53 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-08 20:10:18 -0700 |
commit | 0762a610296dc0f9445f0c9f9261b449cadb0f0d (patch) | |
tree | 45f164f6767481e370ebd1f4e42e63142f7c3cc8 /libglusterfs/src | |
parent | 5ac55756cd923e4bb1e5b5df50aeaf198d5531b7 (diff) |
libglusterfs: avoid the logging which says the port is invalid
If the reserved ports file in proc contains just a newline, then
do not proceed with ports checking and reserving.
Change-Id: I776d0be1c3824dcd982f0685b171f2172b4e11e6
BUG: 762989
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4821
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/common-utils.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 19afeee3d..768a05eb6 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -2281,17 +2281,11 @@ gf_process_reserved_ports (gf_boolean_t *ports) goto out; } - blocked_port = strtok_r (ports_info, ",",&tmp); - if (!blocked_port || !strcmp (blocked_port, ports_info)) { - if (!blocked_port) - blocked_port = ports_info; - gf_ports_reserved (blocked_port, ports); - blocked_port = strtok_r (NULL, ",", &tmp); - } + blocked_port = strtok_r (ports_info, ",\n",&tmp); while (blocked_port) { gf_ports_reserved (blocked_port, ports); - blocked_port = strtok_r (NULL, ",", &tmp); + blocked_port = strtok_r (NULL, ",\n", &tmp); } ret = 0; |