mgcp_client: check local port only once

When the user has set a local port for the mgcp client we want the
client to exit if this port is already occupied. If no port is set the
IETF default port is configured automatically. When we find this port
occupied we try up to 100 times the next port to find a useable port.

Since the for loop that controls the attempts always sets the port
config it uses for its checks it will mistakenly assume that the user
has set a port on the second cycle.

- Make sure we only check for the default port in the first cycle

Change-Id: Ic1fd1018d68fcac94961321615bfdd726465532d
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 3663163..c10abc9 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -801,7 +801,7 @@
 		 * configured then we assume that the user has choosen
 		 * that port conciously and we will not try to resolve
 		 * this by silently choosing a different port. */
-		if (mgcp->actual.local_port != MGCP_CLIENT_LOCAL_PORT_DEFAULT)
+		if (mgcp->actual.local_port != MGCP_CLIENT_LOCAL_PORT_DEFAULT && i == 0)
 			return -EINVAL;
 
 		/* Choose a new port number to try next */