Set the value of controlport based on the value of controlhost