moved getsockname() sequence to add_member()