copy slave_name to buffer