Changeset 811644f
- Timestamp:
- Oct 23, 2010, 1:14:08 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- c38bfe0
- Parents:
- 12a6616
- git-author:
- David Benjamin <davidben@mit.edu> (10/19/10 17:09:28)
- git-committer:
- David Benjamin <davidben@mit.edu> (10/23/10 01:14:08)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rc6adf17 r811644f 2355 2355 /* Create a filter for personal zephyrs to or from the specified 2356 2356 * zephyr user. Includes login/logout notifications for the user. 2357 * The name of the filter will be 'user-< user>'. If a filter already2357 * The name of the filter will be 'user-<shortuser>'. If a filter already 2358 2358 * exists with this name, no new filter will be created. This allows 2359 2359 * the configuration to override this function. Returns the name of 2360 2360 * the filter, which the caller must free. 2361 2361 */ 2362 char *owl_function_zuserfilt(const char * user)2362 char *owl_function_zuserfilt(const char *longuser) 2363 2363 { 2364 2364 owl_filter *f; 2365 char *argbuff, *longuser, *esclonguser, *shortuser, *filtname; 2366 2367 /* stick the local realm on if it's not there */ 2368 longuser=long_zuser(user); 2369 shortuser=short_zuser(user); 2365 char *argbuff, *esclonguser, *shortuser, *filtname; 2370 2366 2371 2367 /* name for the filter */ 2372 filtname=owl_sprintf("user-%s", shortuser); 2368 shortuser = short_zuser(longuser); 2369 filtname = owl_sprintf("user-%s", shortuser); 2370 owl_free(shortuser); 2373 2371 2374 2372 /* if it already exists then go with it. This lets users override */ … … 2392 2390 /* free stuff */ 2393 2391 owl_free(argbuff); 2394 owl_free(longuser);2395 2392 owl_free(esclonguser); 2396 owl_free(shortuser);2397 2393 2398 2394 return(filtname); … … 2537 2533 const owl_view *v; 2538 2534 const owl_message *m; 2539 char * zperson, *filtname=NULL;2540 const char *argv[2] ;2535 char *filtname = NULL; 2536 const char *argv[2], *zperson; 2541 2537 int related = owl_global_is_narrow_related(&g) ^ invert_related; 2542 2538 … … 2577 2573 2578 2574 if (owl_message_is_direction_in(m)) { 2579 zperson =short_zuser(owl_message_get_sender(m));2575 zperson = owl_message_get_sender(m); 2580 2576 } else { 2581 zperson =short_zuser(owl_message_get_recipient(m));2577 zperson = owl_message_get_recipient(m); 2582 2578 } 2583 filtname=owl_function_zuserfilt(zperson); 2584 owl_free(zperson); 2585 return(filtname); 2579 filtname = owl_function_zuserfilt(zperson); 2580 return filtname; 2586 2581 } 2587 2582
Note: See TracChangeset
for help on using the changeset viewer.