Changeset 740 for vendor/current/source3/lib/smbconf/smbconf_init.c
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified vendor/current/source3/lib/smbconf/smbconf_init.c ¶
r414 r740 22 22 #include "lib/smbconf/smbconf_txt.h" 23 23 #include "lib/smbconf/smbconf_reg.h" 24 #include "lib/smbconf/smbconf_init.h" 24 25 25 26 /** … … 34 35 * - "txt" or "file" 35 36 */ 36 WERRORsmbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,37 sbcErr smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 37 38 const char *source) 38 39 { 39 WERROR werr;40 sbcErr err; 40 41 char *backend = NULL; 41 42 char *path = NULL; … … 44 45 45 46 if (conf_ctx == NULL) { 46 werr = WERR_INVALID_PARAM;47 err = SBC_ERR_INVALID_PARAM; 47 48 goto done; 48 49 } 49 50 50 51 if ((source == NULL) || (*source == '\0')) { 51 werr = WERR_INVALID_PARAM;52 err = SBC_ERR_INVALID_PARAM; 52 53 goto done; 53 54 } … … 55 56 backend = talloc_strdup(tmp_ctx, source); 56 57 if (backend == NULL) { 57 werr = WERR_NOMEM;58 err = SBC_ERR_NOMEM; 58 59 goto done; 59 60 } … … 69 70 70 71 if (strequal(backend, "registry") || strequal(backend, "reg")) { 71 werr = smbconf_init_reg(mem_ctx, conf_ctx, path);72 err = smbconf_init_reg(mem_ctx, conf_ctx, path); 72 73 } else if (strequal(backend, "file") || strequal(backend, "txt")) { 73 werr = smbconf_init_txt(mem_ctx, conf_ctx, path);74 err = smbconf_init_txt(mem_ctx, conf_ctx, path); 74 75 } else if (sep == NULL) { 75 76 /* … … 78 79 * string as a path argument. 79 80 */ 80 werr = smbconf_init_txt(mem_ctx, conf_ctx, backend);81 err = smbconf_init_txt(mem_ctx, conf_ctx, backend); 81 82 } else { 82 83 /* … … 87 88 * 'include = /path/to/file.%T' 88 89 */ 89 werr = smbconf_init_txt(mem_ctx, conf_ctx, source);90 err = smbconf_init_txt(mem_ctx, conf_ctx, source); 90 91 } 91 92 92 93 done: 93 94 talloc_free(tmp_ctx); 94 return werr;95 return err; 95 96 }
Note:
See TracChangeset
for help on using the changeset viewer.