error out if sam handshake couldn't be done

Signed-off-by: AGentooCat <agentoocat@mail.i2p>
This commit is contained in:
2025-06-08 21:22:28 +00:00
parent 9fd0ad1781
commit 10e24795ba

View File

@ -681,7 +681,8 @@ void free_lookup(struct I2Host *host) {
void opensam(port_t port, char *me, char *dest) {
if (asprintf(&sessid, "ITooMail-%s", me) < 1)
logno(CRIT, "couldn't allocate memory for SAM session ID");
ctlsock = getsamconn((ctlport = port), 0);
if ((ctlsock = getsamconn((ctlport = port), 0)) == -1)
log(CRIT, "couldn't handshake initial SAM session");
pthread_mutex_init(&samlock, NULL);
if (!(ping_tid = malloc(sizeof(pthread_t))))