- Timestamp:
- Jun 25, 2011, 3:26:15 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- e4524da
- Parents:
- e6d7e4e
- git-author:
- David Benjamin <davidben@mit.edu> (03/11/11 16:21:42)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
r12294d2 recffae6 1324 1324 } 1325 1325 1326 /* read the list of users in 'filename' as a .anyone file, and put the 1327 * names of the zephyr users in the list 'in'. If 'filename' is NULL, 1328 * use the default .anyone file in the users home directory. Returns 1329 * -1 on failure, 0 on success. 1326 /* Read the list of users in 'filename' as a .anyone file, and return as a 1327 * GPtrArray of strings. If 'filename' is NULL, use the default .anyone file 1328 * in the users home directory. Returns NULL on failure. 1330 1329 */ 1331 int owl_zephyr_get_anyone_list(owl_list *in,const char *filename)1330 GPtrArray *owl_zephyr_get_anyone_list(const char *filename) 1332 1331 { 1333 1332 #ifdef HAVE_LIBZEPHYR 1334 1333 char *ourfile, *tmp, *s = NULL; 1335 1334 FILE *f; 1335 GPtrArray *list; 1336 1336 1337 1337 ourfile = owl_zephyr_dotfile(".anyone", filename); … … 1341 1341 owl_function_error("Error opening file %s: %s", ourfile, strerror(errno) ? strerror(errno) : ""); 1342 1342 g_free(ourfile); 1343 return -1;1343 return NULL; 1344 1344 } 1345 1345 g_free(ourfile); 1346 1346 1347 list = g_ptr_array_new(); 1347 1348 while (owl_getline_chomp(&s, f)) { 1348 1349 /* ignore comments, blank lines etc. */ … … 1360 1361 tmp[0] = '\0'; 1361 1362 1362 owl_list_append_element(in, long_zuser(s));1363 g_ptr_array_add(list, long_zuser(s)); 1363 1364 } 1364 1365 g_free(s); 1365 1366 fclose(f); 1366 return 0;1367 #else 1368 return -1;1367 return list; 1368 #else 1369 return NULL; 1369 1370 #endif 1370 1371 }
Note: See TracChangeset
for help on using the changeset viewer.