Commit b9400d58 authored by Per Cederqvist's avatar Per Cederqvist

Make all requests that takes a BOOL argument return bad-bool if

something besides 0 or 1 is sent by the client.  Make statement-like
macros more robust.
parent 63d431c3
2003-08-23 Per Cederqvist <ceder@ceder.dyndns.org> 2003-08-23 Per Cederqvist <ceder@ceder.dyndns.org>
Make all requests that takes a BOOL argument return bad-bool if
something besides 0 or 1 is sent by the client.
* doc/Protocol-A.texi (get-membership-old): Added error code
bad-bool.
(login): Ditto.
(re-z-lookup): Ditto.
(lookup-z-name): Ditto.
(who-is-on-dynamic): Ditto.
(get-membership-10): Ditto.
(query-read-texts): Ditto.
(get-membership): Ditto.
(set-connection-time-format): Ditto.
(Error Codes): Document error code bad-bool.
(Protocol Version History): Mention bad-bool.
(Document Edition History): Mention bad-bool.
* src/include/kom-errno.h (enum kom_err): Added KOM_BAD_BOOL.
* src/server/manipulate.h (CHK_BOOL): New macro.
* src/server/session.c (login): Call CHK_BOOL for invisible.
(who_is_on_dynamic): Call CHK_BOOL for want_visible and
want_invisible.
(set_connection_time_format): Call CHK_BOOL for use_utc. Don't
use KOM_INDEX_OUT_OF_RANGE for that error.
* src/server/regex-match.c (re_z_lookup): Call CHK_BOOL for
want_persons and want_confs.
* src/server/person.c (query_read_texts): Call CHK_BOOL for
want_read_ranges.
* src/server/membership.c (get_membership_old): Call CHK_BOOL for
want_read_texts.
(get_membership_10): Ditto.
(get_membership): Call CHK_BOOL for want_read_ranges.
* src/server/conference.c (lookup_z_name): Call CHK_BOOL for
want_persons and want_confs.
* src/server/testsuite/lyskomd.0/48.exp: New file: Test the
bad-bool error code.
Make statement-like macros more robust.
* src/server/manipulate.h (CHK_CONNECTION): Use the "do ... while
(0)" construct to make this macro expand to exactly one statement.
(CHK_LOGIN): Ditto.
(CONF_ZERO): Ditto.
(CHK_EXIST): Ditto.
(GET_P_STAT): Ditto.
(VOID_GET_P_STAT): Ditto.
(GET_C_STAT): Ditto.
(VOID_GET_C_STAT): Ditto.
(GET_T_STAT): Ditto.
(VOID_GET_T_STAT): Ditto.
"make distcheck" lint. "make distcheck" lint.
* src/server/testsuite/lyskomd.0/Makefile.am (MOSTLYCLEANFILES): * src/server/testsuite/lyskomd.0/Makefile.am (MOSTLYCLEANFILES):
Added aux-items-35.conf and aux-items-46.conf. Added aux-items-35.conf and aux-items-46.conf.
......
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