LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [rfc 13/13] [RFC 13/13] IPVS: sip persistence engine

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [rfc 13/13] [RFC 13/13] IPVS: sip persistence engine
Cc: lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, Wensong Zhang <wensong@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Patrick McHardy <kaber@xxxxxxxxx>
From: Jan Engelhardt <jengelh@xxxxxxxxxx>
Date: Thu, 5 Aug 2010 14:50:11 +0200 (CEST)
On Thursday 2010-08-05 13:48, Simon Horman wrote:
>+
>+static const char *ip_vs_dbg_callid(char *buf, size_t buf_len,
>+                                  const char *callid, size_t callid_len,
>+                                  int *idx)
>+{
>+      size_t len = min(min(callid_len, (size_t)64), buf_len - *idx - 1);
>+      memcpy(buf + *idx, callid, len);
>+      *(buf + *idx + len) = '\0';

Nothing particular wrong, though I just noticed that I would have 
personally, instinctively written

        buf[*idx+len] = '\0';

instead. Sure you have your reasons ;-)

>+      /* RFC 2543 allows lines to be terminated with CR, LF or CRLF,
>+       * RFC 3261 allows only CRLF, we support both. */
>+      if (*(dptr + *matchoff + *matchlen) != '\r' &&
>+          *(dptr + *matchoff + *matchlen) != '\n')
>+              return -EINVAL;

--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>