Changeset 5bb6c21
- Timestamp:
- Jun 27, 2003, 9:16:44 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:
- dff8d8a
- Parents:
- 1d3e925
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
re7cc1c3 r5bb6c21 7 7 Special cased replies for webzephyr users on classes and 8 8 login notifications for webzephyr users 9 Fixed bug that caused a crash on zpunt with '*' for an instance 9 10 10 11 2.0.4 -
functions.c
r1d3e925 r5bb6c21 2584 2584 } 2585 2585 2586 /* add the given class, inst, recip to the punt list for filtering. 2587 * if direction==0 then punt 2588 * if direction==1 then unpunt 2589 */ 2586 2590 void owl_function_zpunt(char *class, char *inst, char *recip, int direction) 2587 2591 { 2588 /* add the given class, inst, recip to the punt list for filtering.2589 * if direction==0 then punt2590 * if direction==1 then unpunt */2591 2592 owl_filter *f; 2592 2593 owl_list *fl; … … 2599 2600 f=malloc(sizeof(owl_filter)); 2600 2601 buff=malloc(strlen(class)+strlen(inst)+strlen(recip)+100); 2601 if (!strcmp(recip, "*")) { 2602 sprintf(buff, "class ^%s$ and instance ^%s$", class, inst); 2602 strcpy(buff, "class"); 2603 if (!strcmp(class, "*")) { 2604 strcat(buff, " .*"); 2603 2605 } else { 2604 sprintf(buff, "class ^%s$ and instance ^%s$ and recipient %s", class, inst, recip); 2605 } 2606 sprintf(buff, "%s ^%s$", buff, class); 2607 } 2608 if (!strcmp(inst, "*")) { 2609 strcat(buff, " and instance .*"); 2610 } else { 2611 sprintf(buff, "%s and instance ^%s$", buff, inst); 2612 } 2613 if (strcmp(recip, "*")) { 2614 sprintf(buff, "%s and recipient ^%s$", buff, recip); 2615 } 2616 2606 2617 owl_function_debugmsg("About to filter %s", buff); 2607 2618 ret=owl_filter_init_fromstring(f, "punt-filter", buff);
Note: See TracChangeset
for help on using the changeset viewer.