[Spice-commits] 3 commits - server/red_worker.c server/tests
Alon Levy
alon at kemper.freedesktop.org
Mon May 9 00:00:59 PDT 2011
server/red_worker.c | 11 ++++++-----
server/tests/test_display_base.c | 4 +++-
2 files changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 34949178a823d830c7a1666add3c4609ee494e4a
Author: Alon Levy <alevy at redhat.com>
Date: Tue Apr 12 14:24:10 2011 +0300
server/red_worker: stat_now cleanup
static, remove inline, add (void), and empty line after function variables.
diff --git a/server/red_worker.c b/server/red_worker.c
index 752d16c..bee86b9 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -118,9 +118,10 @@ static clockid_t clock_id;
typedef unsigned long stat_time_t;
-inline stat_time_t stat_now()
+static stat_time_t stat_now(void)
{
struct timespec ts;
+
clock_gettime(clock_id, &ts);
return ts.tv_nsec + ts.tv_sec * 1000 * 1000 * 1000;
}
commit db7d6c866ed444396c9d68d4881d22b75a4deaa5
Author: Alon Levy <alevy at redhat.com>
Date: Tue Apr 12 14:27:51 2011 +0300
server/red_worker: fix typo (lats_send_time)
diff --git a/server/red_worker.c b/server/red_worker.c
index b8d6a96..752d16c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -382,7 +382,7 @@ typedef struct StreamAgent {
PipeItem create_item;
PipeItem destroy_item;
Stream *stream;
- uint64_t lats_send_time;
+ uint64_t last_send_time;
int frames;
int drops;
@@ -7481,7 +7481,7 @@ static inline int red_send_stream_data(DisplayChannel *display_channel,
StreamAgent *agent = &display_channel->stream_agents[stream - worker->streams_buf];
uint64_t time_now = red_now();
- if (time_now - agent->lats_send_time < (1000 * 1000 * 1000) / agent->fps) {
+ if (time_now - agent->last_send_time < (1000 * 1000 * 1000) / agent->fps) {
agent->frames--;
return TRUE;
}
@@ -7542,7 +7542,7 @@ static inline int red_send_stream_data(DisplayChannel *display_channel,
spice_marshall_msg_display_stream_data(base_marshaller, &stream_data);
spice_marshaller_add_ref(base_marshaller,
display_channel->send_data.stream_outbuf, n);
- agent->lats_send_time = time_now;
+ agent->last_send_time = time_now;
return TRUE;
}
@@ -7834,7 +7834,7 @@ static void red_display_marshall_stream_start(DisplayChannel *display_channel,
RedChannel *channel = &display_channel->common.base;
Stream *stream = agent->stream;
- agent->lats_send_time = 0;
+ agent->last_send_time = 0;
ASSERT(stream);
red_channel_init_send_data(channel, SPICE_MSG_DISPLAY_STREAM_CREATE,
stream->current ? &stream->current->pipe_item : NULL);
commit 87486fd790eb14d3f71c27316cf9602009eccdd1
Author: Alon Levy <alevy at redhat.com>
Date: Sun May 8 14:32:22 2011 +0300
server/tests: show port to connect to
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 104ab37..76817d9 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -559,10 +559,12 @@ void test_set_simple_command_list(int* commands, int num_commands)
SpiceServer* test_init(SpiceCoreInterface *core)
{
+ int port = 5912;
SpiceServer* server = spice_server_new();
// some common initialization for all display tests
- spice_server_set_port(server, 5912);
+ printf("TESTER: listening on port %d (unsecure)\n", port);
+ spice_server_set_port(server, port);
spice_server_set_noauth(server);
spice_server_init(server, core);
More information about the Spice-commits
mailing list