Commit Graph

15 Commits

Author SHA1 Message Date
Alon Levy
8cd5568c92 server/red_channel (+): remove red_channel_add_buf 2011-03-02 17:27:52 +02:00
Alon Levy
ce03dcfbb5 server/red_channel (all): handle MIGRATE_DATA and MIGRATE_FLUSH_DATA
Handling done in red_channel instead of per channel, using call backs
for the channel specific part.
Intended to reduce furthur reliance of channels on RedChannel struct.

The commit makes the code harder to understand because of the artificial
get_serial stuff, should later be fixed by having a joint migration
header with the serial (since all channels pass it).
2011-03-02 17:27:51 +02:00
Alon Levy
17b6a58f1e server/red_channel (all): makes red_channel_reset_send_data private
ready the way for handling ack messages in RedChannel.
2011-03-02 17:27:51 +02:00
Alon Levy
ce3efca360 server/red_channe: make hold_item take a channel arg 2011-03-02 17:27:50 +02:00
Marc-André Lureau
76dc27f08a server: rename s/peer/stream
This is stylish change again. We are talking about a RedStream object,
so let's just name the variable "stream" everywhere, to avoid
confusion with a non existent RedPeer object.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
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
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
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
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
194a6be5f7 server/red_channel: add red_channel_pipe_add_push 2011-02-07 19:22:44 +02:00
Alon Levy
7dfd7a0c77 server/red_channel: add hold_item (from red_worker)
hold_item called on init_send_data, matching release.
This is not the behavior of red_worker - we ref++ (==hold_item) when
sending the item, and --refs when releasing it, instead of only holding
if the send is blocked.

Note 1: Naming: hold_pipe_item is the proc name, the variable is called
hold_item, this is similar to release_item/release_pipe_item naming.

Note 2: All channels have empty implementation, we later use this when
red_worker get's RedChannelized.
2011-02-07 19:21:21 +02:00
Alon Levy
d99ec6c35b smartcard: server side (not enabled yet) 2010-12-07 13:31:42 +02:00