- Timestamp:
- May 26, 2009, 10:32:00 PM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 3ef779b
- Parents:
- f0f919d
- git-author:
- Alexander W Dehnert <adehnert@mit.edu> (05/26/09 14:49:46)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/26/09 22:32:00)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
rd73e3af r7451af9 125 125 126 126 void owl_zephyr_load_initial_subs() { 127 int ret , ret2;127 int ret_sd, ret_bd, ret_u; 128 128 129 129 owl_function_debugmsg("startup: loading initial zephyr subs"); 130 130 131 131 /* load default subscriptions */ 132 ret = owl_zephyr_loaddefaultsubs(); 132 ret_sd = owl_zephyr_loaddefaultsubs(); 133 134 /* load Barnowl default subscriptions */ 135 ret_bd = owl_zephyr_loadbarnowldefaultsubs(); 133 136 134 137 /* load subscriptions from subs file */ 135 ret 2= owl_zephyr_loadsubs(NULL, 0);136 137 if (ret || ret2) {138 ret_u = owl_zephyr_loadsubs(NULL, 0); 139 140 if (ret_sd || ret_bd || ret_u) { 138 141 owl_function_error("Error loading zephyr subscriptions"); 139 } else if (ret 2!=-1) {142 } else if (ret_u!=-1) { 140 143 owl_global_add_userclue(&g, OWL_USERCLUE_CLASSES); 141 144 } … … 226 229 #endif 227 230 228 /* Load zephyr subscriptions f orm 'filename'. If 'filename' is NULL,231 /* Load zephyr subscriptions from 'filename'. If 'filename' is NULL, 229 232 * the default file $HOME/.zephyr.subs will be used. 230 233 * … … 298 301 fclose(file); 299 302 300 owl_zephyr_loadsubs_helper(subs, count); 303 ret = owl_zephyr_loadsubs_helper(subs, count); 304 return(ret); 305 #else 306 return(0); 307 #endif 308 } 309 310 /* Load default Barnowl subscriptions 311 * 312 * Returns 0 on success. 313 * Return -2 if there is a failure from zephyr to load the subscriptions. 314 */ 315 int owl_zephyr_loadbarnowldefaultsubs() 316 { 317 #ifdef HAVE_LIBZEPHYR 318 ZSubscription_t *subs; 319 int subSize = 10; /* Max Barnowl default subs we allow */ 320 int count, ret; 321 322 subs = owl_malloc(sizeof(ZSubscription_t) * subSize); 323 ret = 0; 324 ZResetAuthentication(); 325 count=0; 326 327 subs[count].zsub_class=owl_strdup("message"); 328 subs[count].zsub_classinst=owl_strdup("*"); 329 subs[count].zsub_recipient=owl_strdup("%me%"); 330 count++; 331 332 ret = owl_zephyr_loadsubs_helper(subs, count); 301 333 return(ret); 302 334 #else
Note: See TracChangeset
for help on using the changeset viewer.