Accept Name Specification ========================= Signature: NetDB_Name.accept ( p_op_uid int, -- user reserving name p_reserved timestamp, -- timestamp the reserved name was reserved p_name_id int, -- ID of the reserved name p_name_type varchar, -- type of the reserved name p_referent_id int, -- ID of the whatever the name applies to, -- or the ID of the received_by name for an MX. p_lock timestamp, -- lock of the referent_id p_mx_pref int -- mx preference ) returns nothing Implementation: -- Verify that the user has reserved the name or -- if the name is an MX, verify that it already exists in -- either a reserved or accepted state. if ( p_op_uid has not reserved the name being accepted or p_name_type == "MX" but the name does not exist in any state ) error -- validate the referent_id and verify it is locked. if (name_type == 'alias') -- Find what the alias points to. (alias_parent, parent_type) = get_alias_terminal_parent (p_referent_id, ...) -- Make sure it's locked. NetDB_Util.locked_or_die (p_op_uid, p_lock, alias_parent, parent_type) elsif (name_type = 'address' or 'domain' or 'interface' or 'network' or 'node') NetDB_Util.locked_or_die (op_p_uid, p_lock, p_referent_id, p_name_type); elsif (v_type = 'mx') then -- All validation of the MX is done in the insert. NetDB_MXrecord.ins (p_op_uid, p_lock, fullname, p_referent_id, p_mx_pref); else error -- accept the name by clearing the reservation (user, timestamp) and setting -- setting the appropriate column with the referent_id. update the name table; clearing the reservation and setting the appropriate column with the referent_id where the id == p_name_id