--- lmtp2nntp_config.c 2002/02/27 09:34:41 1.54
+++ lmtp2nntp_config.c 2002/02/27 09:55:55 1.55
@@ -1625,30 +1625,37 @@
log1(ctx, DEBUG, "expansion result '%s'", res_ptr);
hdNew->name = res_ptr; //FIXME rename ->header to ->name
}
- /* expanding regex references into header value */
- {
- var_rc_t var_rc;
- char *res_ptr;
- log1(ctx, DEBUG, "expanding regex references in header value '%s'", hrI->val);
- if ((var_rc = var_expand(hrI->val, strlen(hrI->val), &res_ptr, NULL,
- regex_lookup, regex_ctx, ®ex_lookup_cfg, TRUE)) != VAR_OK) {
- log2(ctx, ERROR, "expansion of '%s' failed: %s", hrI->val, var_strerror(var_rc));
- }
- log1(ctx, DEBUG, "expansion result '%s'", res_ptr);
- cp = res_ptr;
+ if (hrI->val == NULL) {
+ log0(ctx, DEBUG, "marking deleted");
+ /*FIXME clean up data.s and data.m */
+ hdNew->ndata = 0;
}
- /* expanding header and other variables into header value */
- {
- var_rc_t var_rc;
- char *res_ptr;
- log1(ctx, DEBUG, "expanding variables in header value '%s'", hrI->val);
- if ((var_rc = var_expand(cp, strlen(cp), &res_ptr, NULL,
- ctx_lookup, ctx, &ctx_lookup_cfg, TRUE)) != VAR_OK) {
- log2(ctx, ERROR, "expansion of '%s' failed: %s", cp, var_strerror(var_rc));
+ else {
+ /* expanding regex references into header value */
+ {
+ var_rc_t var_rc;
+ char *res_ptr;
+ log1(ctx, DEBUG, "expanding regex references in header value '%s'", hrI->val);
+ if ((var_rc = var_expand(hrI->val, strlen(hrI->val), &res_ptr, NULL,
+ regex_lookup, regex_ctx, ®ex_lookup_cfg, TRUE)) != VAR_OK) {
+ log2(ctx, ERROR, "expansion of '%s' failed: %s", hrI->val, var_strerror(var_rc));
+ }
+ log1(ctx, DEBUG, "expansion result '%s'", res_ptr);
+ cp = res_ptr;
+ }
+ /* expanding header and other variables into header value */
+ if (hrI->val != NULL) {
+ var_rc_t var_rc;
+ char *res_ptr;
+ log1(ctx, DEBUG, "expanding variables in header value '%s'", hrI->val);
+ if ((var_rc = var_expand(cp, strlen(cp), &res_ptr, NULL,
+ ctx_lookup, ctx, &ctx_lookup_cfg, TRUE)) != VAR_OK) {
+ log2(ctx, ERROR, "expansion of '%s' failed: %s", cp, var_strerror(var_rc));
+ }
+ log1(ctx, DEBUG, "expansion result '%s'", res_ptr);
+ hdNew->data.s = res_ptr;
+ hdNew->ndata = 1;
}
- log1(ctx, DEBUG, "expansion result '%s'", res_ptr);
- hdNew->data.s = res_ptr;
- hdNew->ndata = 1;
}
/*FIXME clean up data.m */
headerreplace(hdI, hdNew);
|