diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.c b/xlators/mgmt/glusterd/src/glusterd-pmap.c index 8181e478e09..7ed03905774 100644 --- a/xlators/mgmt/glusterd/src/glusterd-pmap.c +++ b/xlators/mgmt/glusterd/src/glusterd-pmap.c @@ -184,7 +184,7 @@ pmap_registry_alloc (xlator_t *this) pmap = pmap_registry_get (this); - for (p = pmap->last_alloc; p <= GF_PORT_MAX; p++) { + for (p = pmap->base_port; p <= GF_PORT_MAX; p++) { /* GF_PMAP_PORT_FOREIGN may be freed up ? */ if ((pmap->ports[p].type == GF_PMAP_PORT_FREE) || (pmap->ports[p].type == GF_PMAP_PORT_FOREIGN)) { @@ -197,7 +197,7 @@ pmap_registry_alloc (xlator_t *this) } } - if (port) + if (port > pmap->last_alloc) pmap->last_alloc = port; return port; |