Commit 179e4637 authored by DaVieS's avatar DaVieS

possible_fix2

parent 36516049
......@@ -1049,6 +1049,12 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
const char *tmp;
int res;
if(!ASPF)
{
log(LOG_CRIT, "mlfi_connect: new->ASPF Failed");
return SMFIS_TEMPFAIL;
}
if (!hostaddr)
{
ASPF->Set("IP","");
......@@ -1076,6 +1082,13 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
sfsistat mlfi_helo(SMFICTX * ctx, char * helohost)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_helo: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Set("HELO",helohost);
ASPF->Set("DN",symval(ctx,"{daemon_name}"));
......@@ -1107,6 +1120,7 @@ sfsistat mlfi_envfrom(SMFICTX *ctx, char **envfrom)
}
else
{
log(LOG_CRIT, "mlfi_envfrom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1116,7 +1130,6 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(ASPF)
{
if(envrcpt[0] != NULL)
{
ASPF->To(envrcpt[0]);
......@@ -1126,6 +1139,7 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
}
else
{
log(LOG_CRIT, "mlfi_envrcpt: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1145,6 +1159,12 @@ sfsistat mlfi_cleanup(SMFICTX *ctx, bool ok)
sfsistat mlfi_header(SMFICTX *ctx, char *headerf, char *headerv)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_header: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Header(headerf, headerv);
return SMFIS_NOREPLY; //%s: milter claimed not to reply in state %d but did anyway %d
......@@ -1161,8 +1181,11 @@ sfsistat mlfi_eoh(SMFICTX *ctx)
ASPF->Set("IF_ADDR",symval(ctx,"{if_addr}"));
return ASPF->Handle("mlfi_eoh");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eoh: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen)
......@@ -1177,8 +1200,11 @@ sfsistat mlfi_eom(SMFICTX *ctx)
{
return ASPF->Handle("mlfi_eom");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_close(SMFICTX *ctx)
......@@ -1189,6 +1215,10 @@ sfsistat mlfi_close(SMFICTX *ctx)
{
ret = ASPF->Handle("mlfi_close");
}
else
{
log(LOG_CRIT, "mlfi_close: ASPF->recall Failed");
}
mlfi_cleanup(ctx, true);
return ret;
......
......@@ -1049,6 +1049,12 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
const char *tmp;
int res;
if(!ASPF)
{
log(LOG_CRIT, "mlfi_connect: new->ASPF Failed");
return SMFIS_TEMPFAIL;
}
if (!hostaddr)
{
ASPF->Set("IP","");
......@@ -1076,6 +1082,13 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
sfsistat mlfi_helo(SMFICTX * ctx, char * helohost)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_helo: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Set("HELO",helohost);
ASPF->Set("DN",symval(ctx,"{daemon_name}"));
......@@ -1107,6 +1120,7 @@ sfsistat mlfi_envfrom(SMFICTX *ctx, char **envfrom)
}
else
{
log(LOG_CRIT, "mlfi_envfrom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1116,7 +1130,6 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(ASPF)
{
if(envrcpt[0] != NULL)
{
ASPF->To(envrcpt[0]);
......@@ -1126,6 +1139,7 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
}
else
{
log(LOG_CRIT, "mlfi_envrcpt: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1145,6 +1159,12 @@ sfsistat mlfi_cleanup(SMFICTX *ctx, bool ok)
sfsistat mlfi_header(SMFICTX *ctx, char *headerf, char *headerv)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_header: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Header(headerf, headerv);
return SMFIS_NOREPLY; //%s: milter claimed not to reply in state %d but did anyway %d
......@@ -1161,8 +1181,11 @@ sfsistat mlfi_eoh(SMFICTX *ctx)
ASPF->Set("IF_ADDR",symval(ctx,"{if_addr}"));
return ASPF->Handle("mlfi_eoh");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eoh: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen)
......@@ -1177,8 +1200,11 @@ sfsistat mlfi_eom(SMFICTX *ctx)
{
return ASPF->Handle("mlfi_eom");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_close(SMFICTX *ctx)
......@@ -1189,6 +1215,10 @@ sfsistat mlfi_close(SMFICTX *ctx)
{
ret = ASPF->Handle("mlfi_close");
}
else
{
log(LOG_CRIT, "mlfi_close: ASPF->recall Failed");
}
mlfi_cleanup(ctx, true);
return ret;
......
......@@ -1049,6 +1049,12 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
const char *tmp;
int res;
if(!ASPF)
{
log(LOG_CRIT, "mlfi_connect: new->ASPF Failed");
return SMFIS_TEMPFAIL;
}
if (!hostaddr)
{
ASPF->Set("IP","");
......@@ -1076,6 +1082,13 @@ sfsistat mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
sfsistat mlfi_helo(SMFICTX * ctx, char * helohost)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_helo: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Set("HELO",helohost);
ASPF->Set("DN",symval(ctx,"{daemon_name}"));
......@@ -1107,6 +1120,7 @@ sfsistat mlfi_envfrom(SMFICTX *ctx, char **envfrom)
}
else
{
log(LOG_CRIT, "mlfi_envfrom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1116,7 +1130,6 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(ASPF)
{
if(envrcpt[0] != NULL)
{
ASPF->To(envrcpt[0]);
......@@ -1126,6 +1139,7 @@ sfsistat mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
}
else
{
log(LOG_CRIT, "mlfi_envrcpt: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
......@@ -1145,6 +1159,12 @@ sfsistat mlfi_cleanup(SMFICTX *ctx, bool ok)
sfsistat mlfi_header(SMFICTX *ctx, char *headerf, char *headerv)
{
ASPFConnector *ASPF = (ASPFConnector*)smfi_getpriv(ctx);
if(!ASPF)
{
log(LOG_CRIT, "mlfi_header: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
ASPF->Header(headerf, headerv);
return SMFIS_NOREPLY; //%s: milter claimed not to reply in state %d but did anyway %d
......@@ -1161,8 +1181,11 @@ sfsistat mlfi_eoh(SMFICTX *ctx)
ASPF->Set("IF_ADDR",symval(ctx,"{if_addr}"));
return ASPF->Handle("mlfi_eoh");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eoh: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen)
......@@ -1177,8 +1200,11 @@ sfsistat mlfi_eom(SMFICTX *ctx)
{
return ASPF->Handle("mlfi_eom");
}
return SMFIS_TEMPFAIL;
else
{
log(LOG_CRIT, "mlfi_eom: ASPF->recall Failed");
return SMFIS_TEMPFAIL;
}
}
sfsistat mlfi_close(SMFICTX *ctx)
......@@ -1189,6 +1215,10 @@ sfsistat mlfi_close(SMFICTX *ctx)
{
ret = ASPF->Handle("mlfi_close");
}
else
{
log(LOG_CRIT, "mlfi_close: ASPF->recall Failed");
}
mlfi_cleanup(ctx, true);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment