Commit Graph

812 Commits

Author SHA1 Message Date
Marc-André Lureau
d47912241f server: s/RedsStreamContext/RedsStream
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 16:55:22 +01:00
Marc-André Lureau
29be54f6d3 server/reds: remove unused readv
Let's not bother with it since nobody uses it, and it's not implemented for SSL anyway

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 16:55:22 +01:00
Marc-André Lureau
0e64e2d02c build: make it silent
This patch make it easier to spot warnings in compilation.  It should
work with older versions of automake that don't support silent rules.

If you want verbose build, make V=1.

Signed-off-by: Uri Lublin <uril@redhat.com>

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 16:55:22 +01:00
Arnon Gilboa
a76fce5514 client/windows: use SPICE_PROTOCOL_DIR in project include dirs
instead of ..\..\..\spice-protocol. Relative path to another git tree is a bit
ugly, since it requires spice-protocol to be in a specific location.

SPICE_PROTOCOL_DIR should also be used in windows qxl and vdagent instead of
SPICE_COMMON_DIR, which is an old and confusing name, due to the common
directory in spice git repo.
2011-02-13 12:23:47 +02:00
Alon Levy
0f4a0aa07e server/tests/basic_event_loop: fix bzero warning 2011-02-11 19:13:03 +02:00
Alon Levy
2f9d1e7715 tests/migrate.py: refactor to allow importing for later use 2011-02-11 19:13:03 +02:00
Hans de Goede
81f0f04ddc Drop static_title.bmp from windows/Makefile.am 2011-02-11 15:36:43 +01:00
Alon Levy
0b687d9b23 server/red_worker: cursor_channel_send_item: don't downcast 2011-02-11 15:32:21 +02:00
Alon Levy
bb7cbceb97 server/red_worker: match channel_release_pipe_item_proc to red_channel 2011-02-11 15:32:21 +02:00
Alon Levy
53f5cf43ce server/red_worker: introduce an outgoing struct around out_bytes_counter 2011-02-11 15:32:21 +02:00
Alon Levy
d7521edac1 server/red_worker: renames to add channel_ prefix and consistent sig
s/disconnect_channel_proc/channel_disconnect_proc/
s/release_item_proc/channel_release_pipe_item_proc/
s/handle_message_proc/channel_handle_parsed_proc/

Adds RedChannel* channel as first parameter to hold_pipe_item_proc
2011-02-11 15:32:21 +02:00
Alon Levy
f8d3345ef7 server/red_worker: split cursor_channel_send_item
Split from cursor_channel_push
2011-02-11 15:32:21 +02:00
Alon Levy
67b3bf20d0 server/red_worker: use red_channel begin_send_message
s/red_begin_send_message/red_channel_begin_send_message/
2011-02-11 15:32:21 +02:00
Alon Levy
7d53a51da0 server/red_worker: add red_channel_init_send_data
Changes semantics of send to always hold/release regardless of block, like
red_channel. A hold is just a reference count increment or nop.
2011-02-11 15:32:21 +02:00
Alon Levy
859aa15806 server/red_worker: split display_channel_send_item
Split it out of display_channel_push.
2011-02-11 15:32:21 +02:00
Alon Levy
f8262c80ad server/red_worker: extract common_release_pipe_item from red_pipe_clear 2011-02-11 15:32:21 +02:00
Alon Levy
e588176dab server/red_worker: use red_channel pipe add versions
s/red_pipe_add/red_channel_pipe_add/
s/red_pipe_add_after/red_channel_pipe_add_after/
2011-02-11 15:32:21 +02:00
Alon Levy
a0a958c77b server/red_worker: shorten some lines using alias variables 2011-02-11 15:32:21 +02:00
Alon Levy
e8698ea0f8 server/red_worker: introduce CommonChannel
with everything (almost) not in red_channel's RedChannel

As a result of CommonChannel a free cb is added to EventHandler,
to take care of non zero offset for embedded EventHandler.
2011-02-11 15:32:20 +02:00
Alon Levy
9330dbac13 server/red_worker: use ack_data struct
start of move to red_channel based channels
2011-02-11 15:32:20 +02:00
Alon Levy
a185c1daf0 server/red_worker: change hold_item sig, drop the void*
changed to PipeItem *
2011-02-11 15:32:20 +02:00
Alon Levy
3700eefcec update required minimal libcacard to 0.1.2 2011-02-09 15:18:01 +02:00
Alon Levy
85ce53b6be client/smartcard: libcacard dropped ReaderAddResponse
uses VSC_Error with code==VSC_SUCCESS instead. This means that the VSC_Error
message is overloaded. Instead of the other option of adding a message id,
since the connection is TCP so no messages may be dropped or reordered, by
having each message followed by a response there is no ambiguity. Still
this commit adds a queue for messages that we only have one of which outstanding
at a time, i.e. send, wait for response, send the next, etc. This further
simplifies the logic, while not adding much overhead since only when spicec
starts up it has a situation where it needs to send two events (ReaderAdd
and ATR for Card Insert).
2011-02-09 12:14:03 +02:00
Alon Levy
51da06793c server/smartcard: don't push our own error on reader add
The device already sends one. There are actually two connections going
on:
 server to client - this is the smartcard channel, it reuses the VSC protocol.
 server to device - this is an internal connection using VSC too.

We generally just passthrough all messages from the client to the device,
and from the device to the client. We only rewrite the reader_id because
the device knows about a single id (it is actually a card id), and we
may manage more then one in the future.

Bottom line is that there was an extra VSC_Error message reaching the client.
2011-02-09 12:11:51 +02:00
Alon Levy
91bf99a1e9 client/smartcard: ignore VSC_Init 2011-02-07 21:32:40 +02:00
Alon Levy
c7c6f9aed0 server/smartcard: ignore VSC_Init from client 2011-02-07 21:32:40 +02:00
Alon Levy
612f9744df server/smartcard: print instead of assert on bad reader_id in smartcard_char_device_on_message_from_device 2011-02-07 21:32:40 +02:00
Alon Levy
fe83d01162 server/smartcard: libcacard uses network byte order, so we must too 2011-02-07 21:32:40 +02:00
Alon Levy
aed4c72a49 client/smartcard: s/reader_id_t/uint32_t/ (libcacard changed) 2011-02-07 21:31:43 +02:00
Alon Levy
9d75e43226 server/smartcard: libcacard removed ReaderAddResponse 2011-02-07 21:31:23 +02:00
Alon Levy
4e48f65dc4 server/smartcard: s/reader_id_t/uint32_t/ (libcacard changed) 2011-02-07 20:27:35 +02:00
Alon Levy
8c17f83940 server/red_channel: style fix in red_channel_init_send_data 2011-02-07 19:22:44 +02:00
Alon Levy
c4d028510d server/red_channel: red_channel_pipe_clear: assert on NULL channel 2011-02-07 19:22:44 +02:00
Alon Levy
e9103c67ad server/red_channel: add TODO 2011-02-07 19:22:44 +02:00
Alon Levy
e655c5d26e server/red_channel: export red_channel_send 2011-02-07 19:22:44 +02:00
Alon Levy
10692e20ca server/red_channel: add red_channel_waiting_for_ack
small inline function to have the ack window logic.
2011-02-07 19:22:44 +02:00
Alon Levy
f45d17d68b server/red_channel: protect red_channel_push from NULL 2011-02-07 19:22:44 +02:00
Alon Levy
3476fe428d server/red_channel: reset pipe_size on clear (from red_worker) 2011-02-07 19:22:44 +02:00
Alon Levy
5062433d8a server/red_channel: red_channel_event: push on blocked
try to push either on signal (write available) or when blocked
and read signaled. From red_worker, copied for compatibility when
switching later to RedChannel in red_worker. Doesn't make a lot of
sense (but works), see comment in patch.
2011-02-07 19:22:44 +02:00
Alon Levy
23f13aa983 server/red_channel: use red_channel_receive 2011-02-07 19:22:44 +02:00
Alon Levy
a5afee2842 server/red_channel: add empty handle of SPICE_MSGC_DISCONNECTING
Simply ignored in red_channel_handle_message
2011-02-07 19:22:44 +02:00
Alon Levy
74d7405493 server/red_channel: add red_channel_receive (for red_worker) 2011-02-07 19:22:44 +02:00
Alon Levy
c0b7abaa48 server/red_channel: unstatic red_channel_pipe_clear (for red_worker) 2011-02-07 19:22:44 +02:00
Alon Levy
a30a602654 server/red_channel: unstatic red_channel_push (for red_worker) 2011-02-07 19:22:44 +02:00
Alon Levy
57b719b991 server/red_channel: two 80 column fixes 2011-02-07 19:22:44 +02:00
Alon Levy
33bede823a server/red_channel: add public red_channel_default_peer_on_error
for later use in red_worker
2011-02-07 19:22:44 +02:00
Alon Levy
c322873cf0 server/red_channel: add red_channel_pipe_add_after (from red_worker) 2011-02-07 19:22:44 +02:00
Alon Levy
23f37df548 server/red_channel: make client ack window configurable
from red_worker
2011-02-07 19:22:44 +02:00
Alon Levy
0512726b68 server/red_channel (tunnel): change sig of red_channel_handle_message
for later usage with red_worker
2011-02-07 19:22:44 +02:00
Alon Levy
26dda37c27 server/red_channel: make MAX_SEND_VEC 100
MAX_SEND_VEC was 100 for DisplayChannel's RedChannel implementation which is being replaced
with RedChannel in red_channel. So changing from 50 to 100 in red_channel
(make this configurble?) - effectively increased memory usage by:
(100-50)*sizeof(iovec)*(num_of_channels-2) ==(arch 64bit) 50*16*6 ~ 5k
Not terrible.
2011-02-07 19:22:44 +02:00