Fix bug #3148, "Logic error in claws_get_socket_name()"