Index: ossp-pkg/lmtp2nntp/fixme.h RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/fixme.h,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/fixme.h,v' 2>/dev/null --- fixme.h 2002/05/27 15:09:50 1.23 +++ fixme.h 2002/05/28 12:43:14 1.24 @@ -37,7 +37,7 @@ headerrule_t *next; int pri; char *regex; - char *header; + char *name; char *val; pcre *pcreRegex; pcre_extra *pcreExtra; Index: ossp-pkg/lmtp2nntp/lmtp2nntp_config.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_config.c,v rcsdiff -q -kk '-r1.73' '-r1.74' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_config.c,v' 2>/dev/null --- lmtp2nntp_config.c 2002/05/27 15:09:50 1.73 +++ lmtp2nntp_config.c 2002/05/28 12:43:14 1.74 @@ -587,7 +587,7 @@ hrNew->next = NULL; hrNew->pri = 500; /* default priority */ hrNew->regex = NULL; - hrNew->header = NULL; + hrNew->name = NULL; hrNew->val = NULL; hrNew->pcreRegex = NULL; hrNew->pcreExtra = NULL; @@ -624,7 +624,7 @@ logbook(ctx->l2, L2_LEVEL_ERROR, "option --headerrule, header (%s) missing", (ov->data.m)[i]); throw(0,0,0); } - hrNew->header = str_dupex(cpP, n); + hrNew->name = str_dupex(cpP, n); /* value */ cpP = cp; n = strlen(cpP); @@ -682,8 +682,8 @@ free(hrNew->pcreRegex); if (hrNew->val != NULL) freeex(hrNew->val); - if (hrNew->header != NULL) - freeex(hrNew->header); + if (hrNew->name != NULL) + freeex(hrNew->name); if (hrNew->regex != NULL) freeex(hrNew->regex); freeex((headerrule_t *)hrNew); Index: ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c,v rcsdiff -q -kk '-r1.22' '-r1.23' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c,v' 2>/dev/null --- lmtp2nntp_msg.c 2002/05/28 12:32:58 1.22 +++ lmtp2nntp_msg.c 2002/05/28 12:43:14 1.23 @@ -975,19 +975,19 @@ /* expanding regex references into header name */ { char *res_ptr; - logbook(ctx->l2, L2_LEVEL_DEBUG, "expanding regex references in headername '%s'", hrI->header); - if ((var_rc = var_expand(ctx->config_varregex, hrI->header, strlen(hrI->header), &res_ptr, NULL, FALSE)) != VAR_OK) { - logbook(ctx->l2, L2_LEVEL_ERROR, "expansion of '%s' failed: %s", hrI->header, var_strerror(ctx->config_varregex, var_rc, &cp) == VAR_OK ? cp : "Unknown Error", var_rc); + logbook(ctx->l2, L2_LEVEL_DEBUG, "expanding regex references in headername '%s'", hrI->name); + if ((var_rc = var_expand(ctx->config_varregex, hrI->name, strlen(hrI->name), &res_ptr, NULL, FALSE)) != VAR_OK) { + logbook(ctx->l2, L2_LEVEL_ERROR, "expansion of '%s' failed: %s", hrI->name, var_strerror(ctx->config_varregex, var_rc, &cp) == VAR_OK ? cp : "Unknown Error", var_rc); } logbook(ctx->l2, L2_LEVEL_DEBUG, "expansion result '%s'", res_ptr); if (strlen(res_ptr) == 0) { logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted - emtpy headername"); - hdNew->name = NULL; //FIXME rename ->header to ->name + hdNew->name = NULL; /*FIXME clean up data.s and data.m */ hdNew->ndata = 0; } else { - hdNew->name = res_ptr; //FIXME rename ->header to ->name + hdNew->name = res_ptr; } } if (hrI->val == NULL) { @@ -1034,9 +1034,9 @@ } } else { - logbook(ctx->l2, L2_LEVEL_DEBUG, "rule has no regex but static header %s", hrI->header); + logbook(ctx->l2, L2_LEVEL_DEBUG, "rule has no regex but static header %s", hrI->name); hdNew = headercreate(); - hdNew->name = strdupex(hrI->header); //FIXME rename ->header to ->name + hdNew->name = strdupex(hrI->name); if (hrI->val == NULL) { logbook(ctx->l2, L2_LEVEL_DEBUG, "marking deleted"); /*FIXME clean up data.s and data.m */ @@ -1064,18 +1064,18 @@ for (hdI = ctx->msg->hdFirst; hdI != NULL; hdI = hdI->next) { /* for each header */ if (hdI->name == NULL || strlen(hdI->name) == 0) continue; - logbook(ctx->l2, L2_LEVEL_DEBUG, "hrI->header=%s, hdI->name=%s", hrI->header, hdI->name); - if (strcasecmp(hrI->header, hdI->name) == 0) + logbook(ctx->l2, L2_LEVEL_DEBUG, "hrI->name=%s, hdI->name=%s", hrI->name, hdI->name); + if (strcasecmp(hrI->name, hdI->name) == 0) break; } if (hdI != NULL) { - logbook(ctx->l2, L2_LEVEL_DEBUG, "replacing header %s", hrI->header); + logbook(ctx->l2, L2_LEVEL_DEBUG, "replacing header %s", hrI->name); headerreplace(hdI, hdNew); if (hdNew->prev == NULL) ctx->msg->hdFirst = hdNew; } else { - logbook(ctx->l2, L2_LEVEL_DEBUG, "appending header %s", hrI->header); + logbook(ctx->l2, L2_LEVEL_DEBUG, "appending header %s", hrI->name); for (hdI = ctx->msg->hdFirst; hdI->next != NULL; hdI = hdI->next); hdI->next = hdNew; hdNew->prev = hdI;