case 1 : //checking credential
if (srv->links>1) {
status=ALREADY;
- (void) note_status(contact,status,"---",
- "%d-4.5.6 Server already connected",status);
+ (void) note_status(contact,status,NULL,"%d-4.5.6 Server already connected",
+ status);
phase=999; //To many server connected
}
break;
contact->peerip,
srv->credit,"too low");
status=BLCKLST;
- (void) note_status(contact,status,"---",ninfo,status,contact->peerip,cmt);
+ (void) note_status(contact,status,NULL,ninfo,status,contact->peerip,cmt);
(void) setterminator(contact,"Remote server credit is too low");
phase=999; //To many server connected
}
(void) eml_transmit(contact,true,"%d %s",SENDB64,logdat[i]);
got=tcp_getline(contact->socptr,contact->delay,&line);
if (got<=0) {
+ const char *ninfo="%d 5.7.2 auth sequence missing";
+
(void) strcpy(local,"");
- (void) eml_transmit(contact,true,"%d 5.7.2 auth sequence missing",UKNUSER);
+ (void) note_status(contact,UKNUSER,NULL,ninfo,UKNUSER);
break; //exiting from loop
}
(void) log_fprintlog(contact->logptr,false,"%s",line);
case 0 : //are we encrypted and on the right port
if (soc_iscrypted(contact->socptr)==false) {
static char *cmt="no authentication allowed on clear chanel";
- (void) note_status(contact,FAILED,"---","%d 5.7.0 %s",FAILED,cmt);
+ (void) note_status(contact,FAILED,NULL,"%d 5.7.0 %s",FAILED,cmt);
(void) setterminator(contact,cmt);
contact->credit-=1; //"Bad boy"
phase=999; //No need to go further
break;
case 1 : //check buffer
if ((buffer==(char *)0)||(strlen(buffer)==0)) {
- (void) eml_transmit(contact,true,"%d 5.7.1 Missing auth type",FAILED);
+ const char *ninfo="%d 5.7.1 Missing auth type";
+
+ (void) note_status(contact,UKNUSER,NULL,ninfo,FAILED);
phase=999; //No need to go further
}
break;
static char *cmt="bad authentication type";
(void) rou_alert(0,"%s auth type <%s> unknown (Bug?)",OPEP,local);
+ (void) note_status(contact,BADPAR,NULL,"%d 5.7.2 %s",BADPAR,cmt);
(void) setterminator(contact,cmt);
- (void) eml_transmit(contact,true,"%d 5.7.2 %s",BADPAR,cmt);
phase=999; //Trouble Trouble
}
break;
fmt=DISP"Auth Rejected status='%d' for user=<%s> pass=<%s>";
(void) log_fprintlog(contact->logptr,true,fmt,BADAUTH,auth,rmtpass);
(void) sleep(2);
- (void) eml_transmit(contact,true,"%d 5.7.4 authentication failed",BADAUTH);
+ (void) note_status(contact,BADAUTH,NULL,"%d 5.7.4 wrong authentication",
+ BADAUTH);
contact->credit-=1;
}
else {
(void) log_fprintlog(contact->logptr,true,fmt,auth);
- (void) eml_transmit(contact,true,"%d 5.7.5 Authentication successful",IDOK);
+ (void) note_status(contact,IDOK,NULL,"%d 5.7.5 authentication successful",
+ IDOK);
contact->credit+=2;
}
}