private void processCatalogueAddResult(Sim_event ev) {
        if (ev == null) {
            return;
        }

        Object[] pack = (Object[]) ev.get_data();
        if (pack == null) {
            return;
        }

        String filename = (String) pack[0]; // replica name
        int msg = ((Integer) pack[1]).intValue(); // a message: error or not

        /*******  // DEBUG
         System.out.println(super.get_name() + ".processCatalogueAddResult(): " +
         "received result of " + filename);
         ******/

        // find the event in the waiting list
        Object[] dataTemp = searchEvent(filename, this.filesWaitingForAddACK_);
        if (dataTemp != null) {
            // if the addition was not successful, delete the file
            if (msg != DataGridTags.CTLG_ADD_REPLICA_SUCCESSFUL) {
                this.deleteFileFromStorage(filename, false, false);
            } else {
                msg = DataGridTags.FILE_ADD_SUCCESSFUL;
            }

            // delete this event from the waiting list
            filesWaitingForAddACK_.remove(dataTemp);

            // send message (error/success) to the user
            sendResult(filename, DataGridTags.FILE_ADD_REPLICA_RESULT, msg,
                    ((Integer) dataTemp[1]).intValue());
        }
    }