Changeset ecffae6 for functions.c
- Timestamp:
- Jun 25, 2011, 3:26:15 AM (13 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
-
functions.c
re6d7e4e recffae6 2994 2994 #ifdef HAVE_LIBZEPHYR 2995 2995 int x; 2996 owl_listanyone;2996 GPtrArray *anyone; 2997 2997 const char *user; 2998 2998 char *tmp; … … 3029 3029 } else { 3030 3030 owl_fmtext_append_bold(&fm, "Zephyr users logged in:\n"); 3031 owl_list_create(&anyone); 3032 ret=owl_zephyr_get_anyone_list(&anyone, filename); 3033 if (ret) { 3031 anyone = owl_zephyr_get_anyone_list(filename); 3032 if (anyone == NULL) { 3034 3033 if (errno == ENOENT) { 3035 3034 owl_fmtext_append_normal(&fm, " You have not added any zephyr buddies. Use the\n"); … … 3041 3040 } 3042 3041 } else { 3043 j=owl_list_get_size(&anyone); 3044 for (i=0; i<j; i++) { 3045 user=owl_list_get_element(&anyone, i); 3042 for (i = 0; i < anyone->len; i++) { 3043 user = anyone->pdata[i]; 3046 3044 ret=ZLocateUser(zstr(user), &numlocs, ZAUTH); 3047 3045 … … 3075 3073 } 3076 3074 } 3077 owl_list_cleanup(&anyone, g_free); 3075 g_ptr_array_foreach(anyone, (GFunc)g_free, NULL); 3076 g_ptr_array_free(anyone, true); 3078 3077 } 3079 3078 } … … 3387 3386 { 3388 3387 #ifdef HAVE_LIBZEPHYR 3389 int i , j;3390 owl_listanyone;3388 int i; 3389 GPtrArray *anyone; 3391 3390 GList **zaldlist; 3392 3391 GList *zaldptr; … … 3408 3407 *zaldlist = NULL; 3409 3408 3410 owl_list_create(&anyone); 3411 owl_zephyr_get_anyone_list(&anyone, NULL); 3412 j = owl_list_get_size(&anyone); 3413 for (i = 0; i < j; i++) { 3414 user = owl_list_get_element(&anyone, i); 3409 anyone = owl_zephyr_get_anyone_list(NULL); 3410 for (i = 0; i < anyone->len; i++) { 3411 user = anyone->pdata[i]; 3415 3412 zald = g_new(ZAsyncLocateData_t, 1); 3416 3413 if (ZRequestLocations(zstr(user), zald, UNACKED, ZAUTH) == ZERR_NONE) { … … 3421 3418 } 3422 3419 3423 owl_list_cleanup(&anyone, g_free); 3420 g_ptr_array_foreach(anyone, (GFunc)g_free, NULL); 3421 g_ptr_array_free(anyone, true); 3424 3422 #endif 3425 3423 }
Note: See TracChangeset
for help on using the changeset viewer.