X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgiedit.c;h=1547518f1d0ff08d3f48bd9c8a0f904f6ce650b6;hp=fac1af9fd0aa807172cd884fe6f0a3d2a84657f7;hb=3bab8c3b9323bf1d4cd9dbdac2b50636e99fd379;hpb=09879c3aa1c93b8da14d7d2ef91550a2cdd95f04 diff --git a/cgiedit.c b/cgiedit.c index fac1af9f..1547518f 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.33 2002/04/24 02:17:47 oes Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.36 2002/04/26 21:53:30 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -42,6 +42,15 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.33 2002/04/24 02:17:47 oes Exp $" * * Revisions : * $Log: cgiedit.c,v $ + * Revision 1.36 2002/04/26 21:53:30 jongfoster + * Fixing a memory leak. (Near, but not caused by, my earlier commit). + * + * Revision 1.35 2002/04/26 21:50:02 jongfoster + * Honouring default exports in edit-actions-for-url-filter template. + * + * Revision 1.34 2002/04/26 12:54:17 oes + * Adaptions to changes in actions.c + * * Revision 1.33 2002/04/24 02:17:47 oes * - Moved get_char_param, get_string_param and get_number_param to cgi.c * - Comments @@ -2418,7 +2427,7 @@ jb_err cgi_edit_actions_list(struct client_state *csp, snprintf(buf, 150, "%d", line_number + 2); if (!err) err = map(exports, "all-urls-s-next", 1, buf, 1); if (!err) err = map(exports, "all-urls-actions", 1, - actions_to_html(cur_line->data.action, csp), 0); + actions_to_html(csp, cur_line->data.action), 0); /* Skip the 2 lines */ cur_line = cur_line->next->next; @@ -2529,7 +2538,7 @@ jb_err cgi_edit_actions_list(struct client_state *csp, snprintf(buf, 150, "%d", line_number); err = map(section_exports, "s", 1, buf, 1); if (!err) err = map(section_exports, "actions", 1, - actions_to_html(cur_line->data.action, csp), 0); + actions_to_html(csp, cur_line->data.action), 0); if ( (!err) && (cur_line->next != NULL) @@ -2850,6 +2859,8 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, return err; } + err = template_fill(&filter_template, exports); + result = strdup(""); for (;(!err) && (filter_group != NULL); filter_group = filter_group->next) @@ -2914,6 +2925,9 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, free_map(line_exports); } } + + freez(filter_template); + if (!err) { err = map(exports, "filter-params", 1, result, 0);