complete RSYNC_SEND_SEGMENT function