* Get correct data size when parsing VRF ids
* Move some vars into smaller scope
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
STREAM_GETW(zmsg, hdr->length);
STREAM_GETC(zmsg, hdr->marker);
STREAM_GETC(zmsg, hdr->version);
- STREAM_GETC(zmsg, hdr->vrf_id);
+ STREAM_GETL(zmsg, hdr->vrf_id);
STREAM_GETW(zmsg, hdr->command);
return true;
stream_failure:
#else
int packets = zebrad.packets_to_process;
#endif
- struct zmsghdr hdr;
- ssize_t nb;
- bool hdrvalid;
- char errmsg[256];
-
/* Get thread data. Reset reading thread because I'm running. */
sock = THREAD_FD(thread);
client = THREAD_ARG(thread);
}
while (packets) {
+ struct zmsghdr hdr;
+ ssize_t nb;
+ bool hdrvalid;
+ char errmsg[256];
+
already = stream_get_endp(client->ibuf_work);
/* Read length and command (if we don't have it already). */