Changeset a5e7ed6
- Timestamp:
- Mar 7, 2009, 8:49:37 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 975f2d0
- Parents:
- d21efbc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
rd21efbc ra5e7ed6 8 8 9 9 static const char fileIdent[] = "$Id$"; 10 11 static GList *deferred_subs = NULL; 12 typedef struct _owl_sub_list { /* noproto */ 13 ZSubscription_t *subs; 14 int nsubs; 15 } owl_sub_list; 10 16 11 17 #ifdef HAVE_LIBZEPHYR … … 102 108 owl_zephyr_load_initial_subs(); 103 109 } 110 while(deferred_subs != NULL) { 111 owl_sub_list *subs = deferred_subs->data; 112 owl_function_debugmsg("Loading %d deferred subs.", subs->nsubs); 113 owl_zephyr_loadsubs_helper(subs->subs, subs->nsubs); 114 deferred_subs = g_list_delete_link(deferred_subs, deferred_subs); 115 owl_free(subs); 116 } 104 117 } 105 118 … … 178 191 int owl_zephyr_loadsubs_helper(ZSubscription_t subs[], int count) 179 192 { 180 int i, ret = 0; 181 /* sub without defaults */ 182 if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) { 183 owl_function_error("Error subscribing to zephyr notifications."); 184 ret=-2; 185 } 186 187 /* free stuff */ 188 for (i=0; i<count; i++) { 189 owl_free(subs[i].zsub_class); 190 owl_free(subs[i].zsub_classinst); 191 owl_free(subs[i].zsub_recipient); 192 } 193 194 owl_free(subs); 193 int ret; 194 if (owl_global_is_havezephyr(&g)) { 195 int i; 196 /* sub without defaults */ 197 if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) { 198 owl_function_error("Error subscribing to zephyr notifications."); 199 ret=-2; 200 } 201 202 /* free stuff */ 203 for (i=0; i<count; i++) { 204 owl_free(subs[i].zsub_class); 205 owl_free(subs[i].zsub_classinst); 206 owl_free(subs[i].zsub_recipient); 207 } 208 209 owl_free(subs); 210 } else { 211 owl_sub_list *s = owl_malloc(sizeof(owl_sub_list)); 212 s->subs = subs; 213 s->nsubs = count; 214 deferred_subs = g_list_append(deferred_subs, s); 215 } 195 216 196 217 return ret; … … 345 366 346 367 ret = owl_zephyr_loadsubs_helper(subs, count); 347 348 368 return(ret); 349 369 #else
Note: See TracChangeset
for help on using the changeset viewer.