#15 Source code refactoring
Opened 14 years ago by mnagy. Modified 7 years ago

There are a number of things I'd like to change in the code that don't impact the functionality (that much):
- <s>Rename ldap_db to ldap_instance, and ldap_instance to ldap_connection</s>
- Rename ldap_record_to_rdatatype to ldap_attribute_to_rdatatype for
consistency

- Move rdlist related functions from ldap_helper.c to rdlist.c
- Possibly also move some other functions from ldap_helper.c somewhere
else, the intention would be to only leave functions that interact with
the LDAP server
- Create a types.h file with all the public typedefs
- <s>Don't use IGNORE and IGNORE_R macros in str.c</s>
- Refactor parse_rdata()
- In ldap_sasl_interact() we're doing in = sin two times (initialization
and for)

- Use dns_fixedname_t instead of our macros
- <s>Use ISC_FORMAT_PRINTF() macro for log and string functions</s>
- Rename functions free_ldap_attributes(), free_ldap_values()
- Write FOR_EACH() macro and use it
- Maybe cached_ldap_rdatalist_get() could only take ldap_db as an
argument and use some function like get_cache()
- Move cache_query_result() to ldap_query()
- Run sparse on all source files
- Remove legacy LDAP wrappers
- Use arrays instead of lists for LDAP
- Reorder functions so we do not need prototypes where it is not necessary
- dn_to_dnsname() is retarded, we should use standard dns_name_t functions to construct the name
- Only use lowercase first letters in logging functions
- Remove unnecessary casts
- Use log_bug() instead of fatal_error()
- Header files are all ugly, rework
- Rename CHECK_KRB5() to CHECK_KRBERR() and don't use the useless first two arguments
- Review log messages in the krb5 helper
- Drop the "FILE:" from krb5 helper, it is not necessary. Also drop the check


Done:
- Rename ldap_db to ldap_instance, and ldap_instance to ldap_connection
- Rename ldap_record_to_rdatatype to ldap_attribute_to_rdatatype for consistency
- Don't use IGNORE and IGNORE_R macros in str.c
- In ldap_sasl_interact() we're doing in = sin two times (initialization and for)
- Use ISC_FORMAT_PRINTF() macro for log and string functions

Canceled:
- Make ldap_instance->rdata_target_mem a regular array

New:
- Run sparse on all source files
- Remove legacy LDAP wrappers
- Use arrays instead of lists for LDAP
- Reorder functions so we do not need prototypes where it is not necessary
- dn_to_dnsname() is retarded, we should use standard dns_name_t functions to construct the name
- Only use lowercase first letters in logging functions
- Remove unnecessary casts
- Use log_bug() instead of fatal_error()
- Header files are all ugly, rework
- Rename CHECK_KRB5() to CHECK_KRBERR() and don't use the useless first two arguments
- Review log messages in the krb5 helper
- Drop the "FILE:" from krb5 helper, it is not necessary. Also drop the check

No need to clone deferred tickets to downstream.

Metadata Update from @mnagy:
- Issue assigned to mnagy
- Issue set to the milestone: The Deferred

7 years ago

Login to comment on this ticket.

Metadata