diff options
Diffstat (limited to 'lib/libldapschema/llexer.c')
| -rw-r--r-- | lib/libldapschema/llexer.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lib/libldapschema/llexer.c b/lib/libldapschema/llexer.c index 0016d97..58df8fb 100644 --- a/lib/libldapschema/llexer.c +++ b/lib/libldapschema/llexer.c | |||
| @@ -135,6 +135,7 @@ ldapschema_parse_objectclass_attrs( | |||
| 135 | 135 | ||
| 136 | /// splits string into arguments | 136 | /// splits string into arguments |
| 137 | /// @param[in] lsd Reference to allocated ldap_schema struct | 137 | /// @param[in] lsd Reference to allocated ldap_schema struct |
| 138 | /// @param[in] mod LDAP schema model providing the definition | ||
| 138 | /// @param[in] str contains the string representation of an LDAP defintion | 139 | /// @param[in] str contains the string representation of an LDAP defintion |
| 139 | /// @param[in] strlen length of string | 140 | /// @param[in] strlen length of string |
| 140 | /// @param[out] argvp stores the allocate array of definition arguments | 141 | /// @param[out] argvp stores the allocate array of definition arguments |
| @@ -289,6 +290,7 @@ int ldapschema_definition_split(LDAPSchema * lsd, LDAPSchemaModel * mod, | |||
| 289 | 290 | ||
| 290 | /// splits string into arguments | 291 | /// splits string into arguments |
| 291 | /// @param[in] lsd Reference to allocated ldap_schema struct | 292 | /// @param[in] lsd Reference to allocated ldap_schema struct |
| 293 | /// @param[in] mod LDAP schema model providing the definition | ||
| 292 | /// @param[in] def contains the string representation of an LDAP defintion | 294 | /// @param[in] def contains the string representation of an LDAP defintion |
| 293 | /// @param[out] argvp stores the allocate array of definition arguments | 295 | /// @param[out] argvp stores the allocate array of definition arguments |
| 294 | /// | 296 | /// |
| @@ -786,16 +788,22 @@ LDAPSchemaAttributeType * ldapschema_parse_attributetype(LDAPSchema * lsd, const | |||
| 786 | 788 | ||
| 787 | 789 | ||
| 788 | /// parses extension | 790 | /// parses extension |
| 789 | /// @param[in] lsd Reference to allocated ldap_schema struct | 791 | /// @param[in] lsd Reference to allocated ldap_schema struct |
| 792 | /// @param[in] mod LDAP schema model of the extension | ||
| 793 | /// @param[in] key extension name | ||
| 794 | /// @param[in] valstr extension values | ||
| 790 | /// | 795 | /// |
| 796 | /// @return If successful, returns 0. The result must be freed using | ||
| 797 | /// ldapschema_ext_free(). If an error is encounted, returns -1. | ||
| 798 | /// The error code can be retrieved using ldapschema_errno(). | ||
| 791 | /// @see ldapschema_initialize | 799 | /// @see ldapschema_initialize |
| 792 | int ldapschema_parse_ext(LDAPSchema * lsd, LDAPSchemaModel * model, const char * key, const char * valstr) | 800 | int ldapschema_parse_ext(LDAPSchema * lsd, LDAPSchemaModel * mod, const char * key, const char * valstr) |
| 793 | { | 801 | { |
| 794 | int err; | 802 | int err; |
| 795 | LDAPSchemaExtension * ext; | 803 | LDAPSchemaExtension * ext; |
| 796 | 804 | ||
| 797 | assert(lsd != NULL); | 805 | assert(lsd != NULL); |
| 798 | assert(model != NULL); | 806 | assert(mod != NULL); |
| 799 | assert(key != NULL); | 807 | assert(key != NULL); |
| 800 | assert(valstr != NULL); | 808 | assert(valstr != NULL); |
| 801 | 809 | ||
| @@ -824,14 +832,14 @@ int ldapschema_parse_ext(LDAPSchema * lsd, LDAPSchemaModel * model, const char * | |||
| 824 | } | 832 | } |
| 825 | else | 833 | else |
| 826 | { | 834 | { |
| 827 | if ((err = ldapschema_definition_split(lsd, model, valstr, strlen(valstr), &ext->values)) != LDAPSCHEMA_SUCCESS) | 835 | if ((err = ldapschema_definition_split(lsd, mod, valstr, strlen(valstr), &ext->values)) != LDAPSCHEMA_SUCCESS) |
| 828 | { | 836 | { |
| 829 | ldapschema_ext_free(ext); | 837 | ldapschema_ext_free(ext); |
| 830 | return(-1); | 838 | return(-1); |
| 831 | }; | 839 | }; |
| 832 | }; | 840 | }; |
| 833 | 841 | ||
| 834 | if ((err = ldapschema_insert(lsd, (void ***)&model->extensions, &model->extensions_len, ext, ldapschema_compar_extensions)) != LDAP_SUCCESS) | 842 | if ((err = ldapschema_insert(lsd, (void ***)&mod->extensions, &mod->extensions_len, ext, ldapschema_compar_extensions)) != LDAP_SUCCESS) |
| 835 | { | 843 | { |
| 836 | ldapschema_ext_free(ext); | 844 | ldapschema_ext_free(ext); |
| 837 | return(-1); | 845 | return(-1); |
