merge of da30137eaac417f50a323f9ddd29999ec21261e0

and fb45ddf51e20f0ff007eb8abc737de3c024f45cc

--HG--
extra : convert_revision : 2b620b0819e95e4181aa50b645a94e3a7f4d4840
This commit is contained in:
Matt Johnston 2005-09-05 15:16:52 +00:00
commit 70438b7715
3 changed files with 10 additions and 2 deletions

View File

@ -96,7 +96,7 @@ struct ChanType {
}; };
void chaninitialise(); void chaninitialise(const struct ChanType *chantypes[]);
void chancleanup(); void chancleanup();
void setchannelfds(fd_set *readfd, fd_set *writefd); void setchannelfds(fd_set *readfd, fd_set *writefd);
void channelio(fd_set *readfd, fd_set *writefd); void channelio(fd_set *readfd, fd_set *writefd);

View File

@ -62,7 +62,6 @@ void common_session_init(int sock, char* remotehost) {
ses.connecttimeout = 0; ses.connecttimeout = 0;
kexfirstinitialise(); /* initialise the kex state */ kexfirstinitialise(); /* initialise the kex state */
chaninitialise(); /* initialise the channel state */
ses.writepayload = buf_new(MAX_TRANS_PAYLOAD_LEN); ses.writepayload = buf_new(MAX_TRANS_PAYLOAD_LEN);
ses.transseq = 0; ses.transseq = 0;

View File

@ -190,6 +190,10 @@ int dropbear_listen(const char* address, const char* port,
*errstring = (char*)m_malloc(len); *errstring = (char*)m_malloc(len);
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
} }
if (res0) {
freeaddrinfo(res0);
res0 = NULL;
}
TRACE(("leave dropbear_listen: failed resolving")) TRACE(("leave dropbear_listen: failed resolving"))
return -1; return -1;
} }
@ -241,6 +245,11 @@ int dropbear_listen(const char* address, const char* port,
nsock++; nsock++;
} }
if (res0) {
freeaddrinfo(res0);
res0 = NULL;
}
if (nsock == 0) { if (nsock == 0) {
if (errstring != NULL && *errstring == NULL) { if (errstring != NULL && *errstring == NULL) {
int len; int len;