[prev in list] [next in list] [prev in thread] [next in thread]
List: mutt-dev
Subject: mutt: merge stable
From: Brendan Cully <brendan () kublai ! com>
Date: 2014-09-07 19:02:03
Message-ID: hg.4a814b05874f.1410116523.1928362535899276112 () dev ! cs ! ubc ! ca
[Download RAW message or body]
changeset: 6366:4a814b05874f
user: Brendan Cully <brendan@kublai.com>
date: Sun Sep 07 12:00:28 2014 -0700
link: http://dev.mutt.org/hg/mutt/rev/4a814b05874f
merge stable
diffs (70 lines):
diff -r c81c93e64af8 -r 4a814b05874f mutt_sasl.c
--- a/mutt_sasl.c Sun Sep 07 10:36:33 2014 -0700
+++ b/mutt_sasl.c Sun Sep 07 12:00:28 2014 -0700
@@ -103,27 +103,29 @@
/* utility function, stolen from sasl2 sample code */
static int iptostring(const struct sockaddr *addr, socklen_t addrlen,
- char *out, unsigned outlen) {
- char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
- int ret;
-
- if(!addr || !out) return SASL_BADPARAM;
+ char *out, unsigned outlen)
+{
+ char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
+ int ret;
- ret=getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
- NI_NUMERICHOST |
+ if (!addr || !out)
+ return SASL_BADPARAM;
+
+ ret = getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
+ NI_NUMERICHOST |
#ifdef NI_WITHSCOPEID
- NI_WITHSCOPEID |
+ NI_WITHSCOPEID |
#endif
- NI_NUMERICSERV);
- if(ret)
- return getnameinfo_err(ret);
+ NI_NUMERICSERV);
+ if (ret)
+ return getnameinfo_err(ret);
- if(outlen < strlen(hbuf) + strlen(pbuf) + 2)
- return SASL_BUFOVER;
+ if (outlen < strlen(hbuf) + strlen(pbuf) + 2)
+ return SASL_BUFOVER;
- snprintf(out, outlen, "%s;%s", hbuf, pbuf);
+ snprintf(out, outlen, "%s;%s", hbuf, pbuf);
- return SASL_OK;
+ return SASL_OK;
}
/* mutt_sasl_start: called before doing a SASL exchange - initialises library
@@ -195,8 +197,8 @@
size = sizeof (local);
if (!getsockname (conn->fd, (struct sockaddr *)&local, &size)) {
- if (!iptostring((struct sockaddr *)&local, size, iplocalport,
- IP_PORT_BUFLEN) != SASL_OK)
+ if (iptostring((struct sockaddr *)&local, size, iplocalport,
+ IP_PORT_BUFLEN) == SASL_OK)
plp = iplocalport;
else
dprint (2, (debugfile, "SASL failed to parse local IP address\n"));
@@ -206,8 +208,8 @@
size = sizeof (remote);
if (!getpeername (conn->fd, (struct sockaddr *)&remote, &size)){
- if (!iptostring((struct sockaddr *)&remote, size, ipremoteport,
- IP_PORT_BUFLEN) != SASL_OK)
+ if (iptostring((struct sockaddr *)&remote, size, ipremoteport,
+ IP_PORT_BUFLEN) == SASL_OK)
prp = ipremoteport;
else
dprint (2, (debugfile, "SASL failed to parse remote IP address\n"));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic