Re: [Spice-devel] [PATCH] replay: Handle errors in record file

2016-09-15 Thread Christophe Fergeau
Hey, On Mon, Sep 12, 2016 at 12:56:05PM +0100, Frediano Ziglio wrote: > Detect errors in record file. This can happen from a wrong version or > corruption of files. > Allocations are kept into a GList to be able to free in case some > errors happened. It would be nice to have this bit in a separa

[Spice-devel] [PATCH] replay: Handle errors in record file

2016-09-12 Thread Frediano Ziglio
Detect errors in record file. This can happen from a wrong version or corruption of files. Allocations are kept into a GList to be able to free in case some errors happened. To check fscanf read all needed information a dummy "%n" is appended to any string and the value stored there is tested. This

[Spice-devel] [PATCH] replay: Handle errors in record file

2016-06-09 Thread Frediano Ziglio
Detect errors in record file. This can happen from a wrong version or corruption of files. Allocations are kept into a GList to be able to free in case some errors happened. To check fscanf read all needed information a dummy "%n" is appended to any string and the value stored there is tested. This

[Spice-devel] [PATCH] replay: Handle errors in record file

2016-06-06 Thread Frediano Ziglio
Detect errors in record file. This can happen from a wrong version or corruption of files. Allocations are kept into a GList to be able to free in case some errors happened. Some macros are used to return error condition without many if. replay_t was converted to a pointer and REPLAY_EOF is NULL to