Changeset 4357be8
- Timestamp:
- Dec 26, 2003, 2:01:32 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 32eed98
- Parents:
- bf73bdd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
rbf73bdd r4357be8 1 1 $Id$ 2 2 3 2.1.3-pre-1 4 Don't print an error about loading subs if there is no 5 .zephyr.subs 6 Do the initial zephyr_buddy_check when pseduologin set to true. 7 3 8 2.1.2 4 9 removed unused filter_depth variable -
functions.c
r3895e23 r4357be8 810 810 void owl_function_loadsubs(char *file) 811 811 { 812 int ret ;812 int ret, ret2; 813 813 814 814 ret=owl_zephyr_loadsubs(file); 815 816 /* for backwards compatibility for now */ 817 ret2=owl_zephyr_loaddefaultsubs(); 815 818 816 819 if (!owl_context_is_interactive(owl_global_get_context(&g))) return; -
owl.c
r81634b6 r4357be8 326 326 /* load zephyr subs */ 327 327 if (initialsubs) { 328 int ret2; 328 329 owl_function_debugmsg("startup: loading initial zephyr subs"); 329 /* load normal subscriptions */ 330 ret=owl_zephyr_loadsubs(NULL); 331 if (ret==-1) { 332 owl_function_adminmsg("", "Error loading zephyr subscriptions, file inaccessable"); 333 } else if (ret!=0) { 330 331 /* load default subscriptions */ 332 ret=owl_zephyr_loaddefaultsubs(); 333 334 /* load subscriptions from subs file */ 335 ret2=owl_zephyr_loadsubs(NULL); 336 337 if (ret || ret2) { 334 338 owl_function_adminmsg("", "Error loading zephyr subscriptions"); 335 } 336 337 if (ret!=-1) { 339 } else if (ret2!=-1) { 338 340 owl_global_add_userclue(&g, OWL_USERCLUE_CLASSES); 339 341 } … … 348 350 /* First buddy check to sync the list without notifications */ 349 351 owl_function_debugmsg("startup: doing initial zephyr buddy check"); 350 owl_function_zephyr_buddy_check(0);352 /* owl_function_zephyr_buddy_check(0); */ 351 353 352 354 /* set the startup and default style, based on userclue and presence of a -
owl.h
rbf73bdd r4357be8 20 20 static const char owl_h_fileIdent[] = "$Id$"; 21 21 22 #define OWL_VERSION 2.1. 223 #define OWL_VERSION_STRING "2.1. 2"22 #define OWL_VERSION 2.1.3-pre-1 23 #define OWL_VERSION_STRING "2.1.3-pre-1" 24 24 25 25 /* Feature that is being tested to redirect stderr through a pipe. -
variable.c
r3038d13 r4357be8 136 136 "" ), 137 137 138 OWLVAR_BOOL( "pseudologins" /* %OwlVarStub */, 0, 139 "Enable zephyr pseudo logins", 140 "When this is enabled, Owl will periodically check the zephyr\n" 141 "location of users in your .anyone file. If a user is present\n" 142 "but sent no login message, or a user is not present that sent no\n" 143 "logout message a pseudo login or logout message wil be created\n"), 138 OWLVAR_BOOL_FULL( "pseudologins" /* %OwlVarStub */, 0, 139 "Enable zephyr pseudo logins", 140 "When this is enabled, Owl will periodically check the zephyr\n" 141 "location of users in your .anyone file. If a user is present\n" 142 "but sent no login message, or a user is not present that sent no\n" 143 "logout message a pseudo login or logout message wil be created\n", 144 NULL, owl_variable_pseudologins_set, NULL), 144 145 145 146 OWLVAR_BOOL( "ignorelogins" /* %OwlVarStub */, 0, … … 352 353 /* commonly useful */ 353 354 354 int owl_variable_int_validate_gt0(owl_variable *v, void *newval) { 355 int owl_variable_int_validate_gt0(owl_variable *v, void *newval) 356 { 355 357 if (newval == NULL) return(0); 356 358 else if (*(int*)newval < 1) return(0); … … 358 360 } 359 361 360 int owl_variable_int_validate_positive(owl_variable *v, void *newval) { 362 int owl_variable_int_validate_positive(owl_variable *v, void *newval) 363 { 361 364 if (newval == NULL) return(0); 362 365 else if (*(int*)newval < 0) return(0); … … 365 368 366 369 /* typewinsize */ 367 368 int owl_variable_typewinsize_set(owl_variable *v, void *newval){370 int owl_variable_typewinsize_set(owl_variable *v, void *newval) 371 { 369 372 int rv; 370 373 rv = owl_variable_int_set_default(v, newval); … … 374 377 375 378 /* debug (cache value in g->debug) */ 376 int owl_variable_debug_set(owl_variable *v, void *newval) { 379 int owl_variable_debug_set(owl_variable *v, void *newval) 380 { 377 381 if (newval && (*(int*)newval == 1 || *(int*)newval == 0)) { 378 382 g.debug = *(int*)newval; … … 382 386 383 387 /* When 'aaway' is changed, need to notify the AIM server */ 384 int owl_variable_aaway_set(owl_variable *v, void *newval) { 388 int owl_variable_aaway_set(owl_variable *v, void *newval) 389 { 385 390 if (newval) { 386 391 if (*(int*)newval == 1) { … … 393 398 } 394 399 400 int owl_variable_pseudologins_set(owl_variable *v, void *newval) 401 { 402 if (newval) { 403 if (*(int*)newval == 1) { 404 owl_function_zephyr_buddy_check(0); 405 } 406 } 407 return owl_variable_bool_set_default(v, newval); 408 } 409 395 410 /* note that changing the value of this will clobber 396 411 * any user setting of this */ 397 int owl_variable_disable_ctrl_d_set(owl_variable *v, void *newval) { 412 int owl_variable_disable_ctrl_d_set(owl_variable *v, void *newval) 413 { 398 414 399 415 if (in_regtest) return owl_variable_int_set_default(v, newval); … … 411 427 } 412 428 413 int owl_variable_tty_set(owl_variable *v, void *newval) { 429 int owl_variable_tty_set(owl_variable *v, void *newval) 430 { 414 431 owl_zephyr_set_locationinfo(owl_global_get_hostname(&g), newval); 415 432 return(owl_variable_string_set_default(v, newval)); -
zephyr.c
rbf73bdd r4357be8 3 3 #include <sys/types.h> 4 4 #include <sys/wait.h> 5 #include <sys/stat.h> 5 6 #include <string.h> 6 7 #include "owl.h" … … 78 79 ZSubscription_t subs[3001]; 79 80 int count, ret, i; 80 81 ret=0; 82 81 struct stat statbuff; 82 83 83 if (filename==NULL) { 84 84 sprintf(subsfile, "%s/%s", owl_global_get_homedir(&g), ".zephyr.subs"); … … 86 86 strcpy(subsfile, filename); 87 87 } 88 89 ret=stat(subsfile, &statbuff); 90 if (ret) return(0); 91 92 ret=0; 88 93 89 94 ZResetAuthentication(); … … 124 129 } 125 130 126 /* sub with defaults */127 if (ZSubscribeTo (subs,count,0) != ZERR_NONE) {131 /* sub without defaults */ 132 if (ZSubscribeToSansDefaults(subs,count,0) != ZERR_NONE) { 128 133 owl_function_error("Error subscribing to zephyr notifications."); 129 134 ret=-2; … … 143 148 } 144 149 150 int owl_zephyr_loaddefaultsubs() 151 { 152 ZSubscription_t subs[10]; 153 154 if (ZSubscribeTo(subs,0,0) != ZERR_NONE) { 155 owl_function_error("Error subscribing to default zephyr notifications."); 156 return(-1); 157 } 158 return(0); 159 } 160 145 161 int owl_zephyr_loadloginsubs(char *filename) 146 162 { … … 150 166 char subsfile[1024], buffer[1024]; 151 167 int count, ret, i; 152 153 ret=0; 168 struct stat statbuff; 154 169 155 170 if (filename==NULL) { … … 158 173 strcpy(subsfile, filename); 159 174 } 175 176 ret=stat(subsfile, &statbuff); 177 if (ret) return(0); 178 179 ret=0; 160 180 161 181 ZResetAuthentication();
Note: See TracChangeset
for help on using the changeset viewer.