[Spice-devel] [PATCH spice 1/3] Rename mm_timer/mm_time
Marc-André Lureau
marcandre.lureau at gmail.com
Thu Nov 27 06:04:36 PST 2014
As suggested by Christophe on the mailing list.
---
Pushed without review as trivial
server/reds-private.h | 2 +-
server/reds.c | 12 ++++++------
server/reds.h | 4 ++--
server/snd_worker.c | 8 ++++----
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/server/reds-private.h b/server/reds-private.h
index 0bfbf3b..2f9af44 100644
--- a/server/reds-private.h
+++ b/server/reds-private.h
@@ -175,7 +175,7 @@ typedef struct RedsState {
int allow_multiple_clients;
RedsClientMonitorsConfig client_monitors_config;
- int mm_timer_enabled;
+ int mm_time_enabled;
uint32_t mm_time_latency;
} RedsState;
diff --git a/server/reds.c b/server/reds.c
index f868cd8..e34433b 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1280,7 +1280,7 @@ int reds_handle_migrate_data(MainChannelClient *mcc, SpiceMigrateDataMain *mig_d
* controls the mm-time, we update the client's mm-time.
* (MSG_MAIN_INIT is not sent for a migrating connection)
*/
- if (reds->mm_timer_enabled) {
+ if (reds->mm_time_enabled) {
reds_send_mm_time();
}
if (mig_data->agent_base.connected) {
@@ -2423,7 +2423,7 @@ static void reds_send_mm_time(void)
void reds_set_client_mm_time_latency(RedClient *client, uint32_t latency)
{
// TODO: multi-client support for mm_time
- if (reds->mm_timer_enabled) {
+ if (reds->mm_time_enabled) {
// TODO: consider network latency
if (latency > reds->mm_time_latency) {
reds->mm_time_latency = latency;
@@ -2828,16 +2828,16 @@ uint32_t reds_get_mm_time(void)
return time_space.tv_sec * 1000 + time_space.tv_nsec / 1000 / 1000;
}
-void reds_enable_mm_timer(void)
+void reds_enable_mm_time(void)
{
- reds->mm_timer_enabled = TRUE;
+ reds->mm_time_enabled = TRUE;
reds->mm_time_latency = MM_TIME_DELTA;
reds_send_mm_time();
}
-void reds_disable_mm_timer(void)
+void reds_disable_mm_time(void)
{
- reds->mm_timer_enabled = FALSE;
+ reds->mm_time_enabled = FALSE;
}
static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin)
diff --git a/server/reds.h b/server/reds.h
index 371ba96..0483c71 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -54,8 +54,8 @@ typedef struct RedsMigSpice {
/* main thread only */
void reds_handle_channel_event(int event, SpiceChannelEventInfo *info);
-void reds_disable_mm_timer(void);
-void reds_enable_mm_timer(void);
+void reds_disable_mm_time(void);
+void reds_enable_mm_time(void);
uint32_t reds_get_mm_time(void);
void reds_set_client_mouse_allowed(int is_client_mouse_allowed,
int x_res, int y_res);
diff --git a/server/snd_worker.c b/server/snd_worker.c
index 77bb3ca..a1223b4 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -1041,7 +1041,7 @@ SPICE_GNUC_VISIBLE void spice_server_playback_start(SpicePlaybackInstance *sin)
if (!channel)
return;
spice_assert(!playback_channel->base.active);
- reds_disable_mm_timer();
+ reds_disable_mm_time();
playback_channel->base.active = TRUE;
if (!playback_channel->base.client_active) {
snd_set_command(&playback_channel->base, SND_PLAYBACK_CTRL_MASK);
@@ -1060,7 +1060,7 @@ SPICE_GNUC_VISIBLE void spice_server_playback_stop(SpicePlaybackInstance *sin)
if (!channel)
return;
spice_assert(playback_channel->base.active);
- reds_enable_mm_timer();
+ reds_enable_mm_time();
playback_channel->base.active = FALSE;
if (playback_channel->base.client_active) {
snd_set_command(&playback_channel->base, SND_PLAYBACK_CTRL_MASK);
@@ -1174,7 +1174,7 @@ static void on_new_playback_channel(SndWorker *worker)
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_VOLUME_MASK);
}
if (playback_channel->base.active) {
- reds_disable_mm_timer();
+ reds_disable_mm_time();
}
}
@@ -1183,7 +1183,7 @@ static void snd_playback_cleanup(SndChannel *channel)
PlaybackChannel *playback_channel = SPICE_CONTAINEROF(channel, PlaybackChannel, base);
if (playback_channel->base.active) {
- reds_enable_mm_timer();
+ reds_enable_mm_time();
}
snd_codec_destroy(&playback_channel->codec);
--
2.1.0
More information about the Spice-devel
mailing list