[Spice-devel] [PATCH spice-server 05/11] reds: Remove argument from reds_handle_link
Christophe Fergeau
cfergeau at redhat.com
Tue Dec 19 16:14:13 UTC 2017
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
On Mon, Dec 11, 2017 at 10:28:02AM +0000, Frediano Ziglio wrote:
> RedLinkInfo stores reds in it no need to pass every time.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/reds.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/server/reds.c b/server/reds.c
> index 2b16c6d7..761afa77 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -2019,8 +2019,10 @@ static void reds_handle_other_links(RedsState *reds, RedLinkInfo *link)
> reds_link_free(link);
> }
>
> -static void reds_handle_link(RedsState *reds, RedLinkInfo *link)
> +static void reds_handle_link(RedLinkInfo *link)
> {
> + RedsState *reds = link->reds;
> +
> if (link->link_mess->channel_type == SPICE_CHANNEL_MAIN) {
> reds_handle_main_link(reds, link);
> } else {
> @@ -2079,7 +2081,7 @@ static void reds_handle_ticket(void *opaque)
> }
> }
>
> - reds_handle_link(reds, link);
> + reds_handle_link(link);
> goto end;
>
> error:
> @@ -2118,12 +2120,11 @@ static void reds_handle_auth_sasl_steplen(void *opaque);
> static void reds_handle_auth_sasl_step(void *opaque)
> {
> RedLinkInfo *link = (RedLinkInfo *)opaque;
> - RedsState *reds = link->reds;
> RedSaslError status;
>
> status = red_sasl_handle_auth_step(link->stream, reds_handle_auth_sasl_steplen, link);
> if (status == RED_SASL_ERROR_OK) {
> - reds_handle_link(reds, link);
> + reds_handle_link(link);
> } else if (status != RED_SASL_ERROR_CONTINUE) {
> reds_link_free(link);
> }
> @@ -2159,12 +2160,11 @@ static void reds_handle_auth_sasl_steplen(void *opaque)
> static void reds_handle_auth_sasl_start(void *opaque)
> {
> RedLinkInfo *link = (RedLinkInfo *)opaque;
> - RedsState *reds = link->reds;
> RedSaslError status;
>
> status = red_sasl_handle_auth_start(link->stream, reds_handle_auth_sasl_steplen, link);
> if (status == RED_SASL_ERROR_OK) {
> - reds_handle_link(reds, link);
> + reds_handle_link(link);
> } else if (status != RED_SASL_ERROR_CONTINUE) {
> reds_link_free(link);
> }
> --
> 2.14.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20171219/bb9aeb1c/attachment.sig>
More information about the Spice-devel
mailing list