diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/cursor-channel.c | 1 | ||||
-rw-r--r-- | server/dcc.h | 1 | ||||
-rw-r--r-- | server/red_channel.c | 8 | ||||
-rw-r--r-- | server/red_worker.c | 4 |
4 files changed, 9 insertions, 5 deletions
diff --git a/server/cursor-channel.c b/server/cursor-channel.c index 20e7351a..421b1e2a 100644 --- a/server/cursor-channel.c +++ b/server/cursor-channel.c @@ -7,6 +7,7 @@ #define CURSOR_CACHE_HASH_SIZE (1 << CURSOR_CACHE_HASH_SHIFT) #define CURSOR_CACHE_HASH_MASK (CURSOR_CACHE_HASH_SIZE - 1) #define CURSOR_CACHE_HASH_KEY(id) ((id) & CURSOR_CACHE_HASH_MASK) +#define CURSOR_CLIENT_TIMEOUT 30000000000ULL //nano enum { PIPE_ITEM_TYPE_CURSOR = PIPE_ITEM_TYPE_COMMON_LAST, diff --git a/server/dcc.h b/server/dcc.h index 9c5ebe5e..40438235 100644 --- a/server/dcc.h +++ b/server/dcc.h @@ -13,6 +13,7 @@ #define PALETTE_CACHE_HASH_KEY(id) ((id) & PALETTE_CACHE_HASH_MASK) #define CLIENT_PALETTE_CACHE_SIZE 128 +#define DISPLAY_CLIENT_SHORT_TIMEOUT 15000000000ULL //nano #define DISPLAY_CLIENT_TIMEOUT 30000000000ULL //nano #define DISPLAY_CLIENT_MIGRATE_DATA_TIMEOUT 10000000000ULL //nano, 10 sec #define DISPLAY_CLIENT_RETRY_INTERVAL 10000 //micro diff --git a/server/red_channel.c b/server/red_channel.c index 49aaa10e..10f295e7 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -2363,7 +2363,7 @@ int red_channel_client_wait_outgoing_item(RedChannelClient *rcc, spice_warning("timeout"); return FALSE; } else { - spice_assert(red_channel_client_no_item_being_sent(rcc)); + spice_warn_if_fail(red_channel_client_no_item_being_sent(rcc)); return TRUE; } } @@ -2392,8 +2392,8 @@ int red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc, } red_channel_client_push(rcc); - while((item_in_pipe = ring_item_is_linked(&item->link)) && - (timeout == -1 || red_get_monotonic_time() < end_time)) { + while ((item_in_pipe = ring_item_is_linked(&item->link)) && + (timeout == -1 || red_get_monotonic_time() < end_time)) { usleep(CHANNEL_BLOCKED_SLEEP_DURATION); red_channel_client_receive(rcc); red_channel_client_send(rcc); @@ -2451,4 +2451,6 @@ void red_channel_client_disconnect_if_pending_send(RedChannelClient *rcc) } else { spice_assert(red_channel_client_no_item_being_sent(rcc)); } + + spice_warn_if_fail(red_channel_client_no_item_being_sent(rcc)); } diff --git a/server/red_worker.c b/server/red_worker.c index 87ce7f6c..fa05b047 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1023,12 +1023,12 @@ static void handle_dev_stop(void *opaque, uint32_t message_type, void *payload) if (!red_channel_wait_all_sent(RED_CHANNEL(worker->display_channel), DISPLAY_CLIENT_TIMEOUT)) { red_channel_apply_clients(RED_CHANNEL(worker->display_channel), - red_channel_client_disconnect_if_pending_send); + red_channel_client_disconnect_if_pending_send); } if (!red_channel_wait_all_sent(RED_CHANNEL(worker->cursor_channel), DISPLAY_CLIENT_TIMEOUT)) { red_channel_apply_clients(RED_CHANNEL(worker->cursor_channel), - red_channel_client_disconnect_if_pending_send); + red_channel_client_disconnect_if_pending_send); } } |