Commit e2ee7af7 authored by Per Cederqvist's avatar Per Cederqvist

Speed up access_perm, is_supervisor and is_strictly_supervisor by

adding a supervisor field to Small_conf, and using it instead of a
call to GET_C_STAT.  Remove the Conference argument to the above three
functions and update all callers.  A few stray calls to GET_C_STAT
were eliminated in the process.
parent d62a86e2
1999-07-05 Per Cederqvist <ceder@gratia>
Speed up access_perm, is_supervisor and is_strictly_supervisor by
adding a supervisor field to Small_conf, and using it instead of a
call to GET_C_STAT. Remove the Conference argument to the above
three functions and update all callers. A few stray calls to
GET_C_STAT were eliminated in the process.
* src/include/kom-types.h (Small_conf): Added a supervisor field.
* src/server/cache.h (cached_get_conf_supervisor): New function.
* src/server/simple-cache.c (cached_get_conf_supervisor): New
function.
(mark_conference_as_changed): Copy the supervisor to the entry in
small_conf_arr.
(init_small_conf): Set supervisor.
(setup_small_conf): Set supervisor.
* src/server/manipulate.h (access_perm): Removed the victim_c
argument.
(is_supervisor): Removed the conf_c argument.
(is_strictly_supervisor): Removed the conf_c argument.
* src/server/membership.c (access_perm_helper): New name for
former plain_ol_access_perm. Get rid of call to GET_C_STAT by
calling cached_get_conf_type instead. Removed the victim_c
argument from all calls to is_supervisor.
(plain_ol_fast_access_perm): Removed.
(access_perm): Removed the victim_c argument.
(copy_public_confs): Removed the victim_c argument from all calls
to is_supervisor. Removed the victim_c argument from all calls to
access_perm.
(sub_member): Likewise.
(do_get_members): Likewise.
(get_unread_confs): Likewise.
(add_member_common): Likewise, and get rid of a call to GET_C_STAT.
(do_get_membership): Likewise, and get rid of a call to GET_C_STAT.
(set_membership_type): Likewise, and get rid of a call to GET_P_STAT.
* src/server/conference.c (do_create_conf): Call
mark_conf_as_changed before checking that ACTPERS is allowed to
create aux-items in the conference he is creating.
(is_supervisor): Removed the conf_c argument.
(is_strictly_supervisor): Removed the conf_c argument. Use
cached_conf_exists and cached_get_conf_supervisor and eliminate
one expensive call to GET_C_STAT.
(change_name): Removed the victim_c argument from all calls to
access_perm.
(delete_conf): Likewise.
(lookup_name): Likewise.
(lookup_z_name): Likewise.
(do_lookup): Likewise.
(get_conf_stat_old): Likewise.
(get_uconf_stat): Likewise.
(get_conf_stat_older): Likewise.
(set_presentation): Likewise.
(set_etc_motd): Likewise.
(set_conf_type): Likewise.
(set_garb_nice): Likewise.
(set_expire): Likewise.
(set_keep_commented): Likewise.
(modify_conf_info): Likewise.
(set_supervisor): Removed the conf_c argument from all calls to
is_strictly_supervisor and is_supervisor.
(set_permitted_submitters): Likewise.
(set_super_conf): Likewise.
* src/server/admin.c (send_message): Removed the victim_c
argument from all calls to access_perm.
* src/server/person.c (get_person_stat): Removed the victim_c
argument from all calls to access_perm. Eliminate one call to
GET_C_STAT.
(get_person_stat_old): Likewise.
(get_created_texts): Removed the victim_c argument from all calls
to access_perm.
(map_created_texts): Likewise.
(do_query_read_texts): Likewise.
(set_user_area): Likewise.
(set_pers_flags): Likewise.
(set_passwd): Removed the victim_c argument from all calls to
is_supervisor.
* src/server/regex-match.c (lookup_regexp): Removed the victim_c
argument from all calls to access_perm.
* src/server/send-async.c (async_new_name): Removed the victim_c
argument from all calls to access_perm.
* src/server/text.c (submit_to): Removed the victim_c argument
from all calls to access_perm and is_supervisor.
(send_async_sub_recipient): Likewise.
(recp_sent_by): Likewise.
(filter_secret_info): Likewise.
(person_text_read_access): Likewise.
(delete_text): Likewise.
(send_async_add_recipient): Likewise.
(add_recipient): Likewise.
(sub_recipient): Likewise.
(sub_comment): Likewise.
(sub_footnote): Likewise.
(get_map): Likewise.
(local_to_global): Likewise.
* src/server/aux-items.c (aux_item_add_perm): Removed the conf_c
argument from all calls to is_strictly_supervisor and is_supervisor.
(filter_aux_item_list): Likewise.
(check_delete_aux_item_list): Likewise.
* src/server/session.c (login_old): Removed the conf_c argument
from all calls to is_supervisor.
(login): Likewise.
(disconnect): Likewise.
1999-07-03 David Byers <davby@ida.liu.se>
* src/server/handle-malloc-dump.el (trace-run-programs): Fixed
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment