POP65/SMTP65: Fixed bug when :nnn port number is used in EMAIL.CFG

This commit is contained in:
Bobbi Webber-Manners 2020-09-11 21:37:38 -04:00
parent 79eadb3981
commit 7a548df618
3 changed files with 8 additions and 4 deletions

View File

@ -6,7 +6,7 @@
#include <stdint.h>
#define PROGNAME "emai//er v1.10"
#define PROGNAME "emai//er v1.11"
// Configuration params from EMAIL.CFG
char cfg_server[40]; // IP of POP3 server

View File

@ -310,11 +310,13 @@ void readconfigfile(void) {
fscanf(fp, "%s", cfg_emaildir);
fclose(fp);
colon = strchr(cfg_smtp_server, ':');
colon = strchr(cfg_server, ':');
if (!colon)
pop_port = 110;
else
else {
pop_port = atoi(colon + 1);
*colon = '\0';
}
}
/*

View File

@ -350,8 +350,10 @@ void readconfigfile(void) {
colon = strchr(cfg_smtp_server, ':');
if (!colon)
smtp_port = 25;
else
else {
smtp_port = atoi(colon + 1);
*colon = '\0';
}
}
/*