Il 04/03/2014 17:48, Anton Ivanov (antivano) ha scritto:
>> +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, const
struct iovec *iov, int iovcnt)
> Long line; you can split after , to fit within 80 columns.
OK
>
>> +{
>> + NetL2TPV3State *s = DO_UPCAST(NetL2TPV3State, nc, nc);
>> +
>> + struct msghdr message;
>> + int ret;
>> +
>> + if (iovcnt > MAX_L2TPV3_IOVCNT - 1) {
>> + fprintf(stderr, "iovec too long %d > %d, change l2tpv3.h\n", iovcnt,
MAX_L2TPV3_IOVCNT);
>> + return -1;
> Is printing to stderr always the right thing to do? It seems to me that
> you should look into using QError.
Thanks, will look into it.
Actually no, this does not need to use QError. You just need
"error_report", which is the same as fprintf(stderr) but will add nice
timestamps in front of the error message if enabled.
Paolo