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

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

        String filename = (String) pack[0];                 // get name
        int uniqueID = ((Integer) pack[1]).intValue();      // get unique ID
        int msg = ((Integer) pack[2]).intValue();           // get msg

        Integer resourceID = null;
        if (msg == DataGridTags.CTLG_ADD_MASTER_SUCCESSFUL)
        {
            // find the request for uniqueID
            for (int i = 0; i < waitingMasterRegistration_.size(); i++)
            {
                Object[] data = (Object[]) waitingMasterRegistration_.get(i);
                if (filename.equals((String) data[0]) == true)
                {
                    resourceID = (Integer) data[2];
                    FileAttribute attr = (FileAttribute) data[1];
                    attr.setRegistrationID(uniqueID);

                    // save the new entry to the hashtable (also the
                    // FileAttribute)
                    ArrayList list = new ArrayList();
                    list.add(resourceID);
                    catalogueHash_.put(filename + uniqueID, list);
                    attrHash_.put(filename + uniqueID, attr);

                    waitingMasterRegistration_.remove(i);   // remove
                    break;
                }
            } // end for
        } // end if

        //if this is a localRC, then it doesn't need to send a message to
        // the resource
        if (this.localRC_ == false && resourceID != null)
        {
            int id = resourceID.intValue();
            super.send(super.output, 0, DataGridTags.CTLG_ADD_MASTER_RESULT,
                       new IO_data(pack, DataGridTags.PKT_SIZE, id) );
        }
    }