Changeset 745 for trunk/server/source3/lib/smbconf/smbconf_init.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
source3/lib/smbconf/smbconf_init.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/lib/smbconf/smbconf_init.c
r414 r745 22 22 #include "lib/smbconf/smbconf_txt.h" 23 23 #include "lib/smbconf/smbconf_reg.h" 24 24 25 25 26 /** … … 34 35 * - "txt" or "file" 35 36 */ 36 WERRORsmbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx,37 smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, 37 38 const char *source) 38 39 { 39 WERROR werr;40 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_INVALID_PARAM; 47 48 goto done; 48 49 } 49 50 50 51 if ((source == NULL) || (*source == '\0')) { 51 werr = WERR_INVALID_PARAM;52 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_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.
