This is the continuation of Christophe patches using reference
counting for RedPipeItem.
Extend it's usage.
This for instance leads to the removal of release_item callback.
Avoid having to provide a lot of empty implementations
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
All RedPipeItems can be freed with red_pipe_item_unref.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
The items of these pipe items were allocated staticaly inside the
StreamAgent structure. All others RedPipeItem are allocated dynamically.
This could solve possible future maintenance as the life of these
item is more easier to understand.
It's more easier to understand why reference where incremented.
It also make the StreamAgent structure a bit smaller.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Putting base as first item the default free function is fine.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Move ring_remove to the function to release this type of item.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Make macro have same prototype even if we need an extra argument.
This avoids having different calls for LZ_PLT.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
Change from %f to %g. This allows printf to choose format based on
order of numbers.
Also increase precision making sure that number of precision is
respected, not matter the order of the number.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Use some utility function to show and compute statistics.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This regression was introduced by commit
18d3876b78
("UpgradeItem: use base PipeItem for refcounting")
This fix https://bugs.freedesktop.org/show_bug.cgi?id=95365.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This doesn't cause problems at the moment, because the files that
include this file also include the other files that are needed, but just
for completeness...
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This function was wrongly marked as deprecated in commit b41220b144.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Removing an interface cause SpiceBaseInstance->st to be set to NULL.
This pointer was then deferenced in agent code.
As SpiceBaseInstance should not be used after this call make sure
we don't keep pointers to it.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
For C is better to have void instead of arguments as otherwise
K&R rules apply.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Spice client is no more in this repository and also the style was changed
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
The conversion try keeps the content as is no matter if updated or not.
Asciidoc format is already used for manual.
Using a text format make easier to see git diff and send patches.
Also it's easier to convert to different format and copy to web pages.
Related: https://bugs.freedesktop.org/show_bug.cgi?id=95258
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This code make easier to be sure we don't have dangling pointers
resetting in the function which free the structure.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>