Commit Graph

427 Commits

Author SHA1 Message Date
Alon Levy
aa5d23fdec server/red_channel: reset send_data.item to NULL after release 2011-03-02 17:27:53 +02:00
Alon Levy
d4c187c043 server/red_worker: remove RedChannel argument from add_buf_from_info
It was unused.
2011-03-02 17:27:53 +02:00
Alon Levy
5575d6e5fa server/red_channel: add red_channel_{,no_}item_being_sent 2011-03-02 17:27:53 +02:00
Alon Levy
17ebd6a719 server/red_worker: complete removal of send_data.marshaller use 2011-03-02 17:27:53 +02:00
Alon Levy
992252104c server/red_worker: replace _send_ functions by _marshall_
Changes in display channel for a code size win.

A note about this and the previous cursor change: it will appear that we are
now (with these changes) releasing resources too early. This is not so - send
always has the option of blocking, which means after send you can not release
resources anyway, that's what the release_item callback is for. So both the
code before and now are doing the same accounting.
2011-03-02 17:27:52 +02:00
Alon Levy
88db43879b server/red_channel: add red_channel_send_message_pending 2011-03-02 17:27:52 +02:00
Alon Levy
7a650e9641 server/red_channel: add red_channel_all_blocked 2011-03-02 17:27:52 +02:00
Alon Levy
b7dbc14b1c server/red_worker: cursor channel: replace _send_ with _marshall_ 2011-03-02 17:27:52 +02:00
Alon Levy
e9be6ca82c server/red_channel (all): add red_channel_get_header
This is useful during the channel specific channel_send_pipe_item_proc
callback, it allows altering or reader the header being sent.
2011-03-02 17:27:52 +02:00
Alon Levy
17d5761322 server/red_channel: add red_channel_get_first_socket
Use in main_channel. This is just for backward portability later
when multiple clients are introduced - needs to be considered (which
sockets do we want to export from libspiceserver?)
2011-03-02 17:27:52 +02:00
Alon Levy
8cd5568c92 server/red_channel (+): remove red_channel_add_buf 2011-03-02 17:27:52 +02:00
Alon Levy
16bff20f91 server/tunnel: pass SpiceMarshaller reference from send
Introduce SpiceMarshaller param to all send's that do add_buf

Next patch will use marshaller in all functions that currently don't by
replacing red_channel_add_buf with marshaller add_ref. Note - currently
tunnel is broken due to wrong size in messages.
2011-03-02 17:27:52 +02:00
Alon Levy
a05628bf06 server/red_channel (all): add red_channel_get_stream
use in config_socket, this makes the stream internal to the RedChannel
implementation that will change later for multiple client support.
2011-03-02 17:27:52 +02:00
Alon Levy
38e13ef1a8 server/common: introduce common/spice_common.h
move all the ASSERT/PANIC/PANIC_ON/red_error/red_printf* macros
to a common file to be used with ring.h that is going to be used externally
(by spice-gtk).
2011-03-02 17:27:51 +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
8002a30f9c server/red_channel (all): add red_channel_get_marshaller
For ussage in the send_item callback. It's only valid during this
time anyway (should make it return NULL in other occasions?)

No more direct usage of RedChannel.send_data.marshaller by channels.
2011-03-02 17:27:51 +02:00
Alon Levy
9e46945a61 server/red_worker: use red_channel_destroy 2011-03-02 17:27:51 +02:00
Alon Levy
966201c1ad server/inputs_channel: s/PIPE_ITEM_INIT/PIPE_ITEM_INPUTS_INIT/ 2011-03-02 17:27:51 +02:00
Alon Levy
5e1ba1101b server/red_channel: move SET_ACK to red_channel 2011-03-02 17:27:51 +02:00
Alon Levy
2fcd35b073 server/red_channel: add more ack api 2011-03-02 17:27:51 +02:00
Alon Levy
766bb420bb server: use red_channel_get_message_serial 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
cd99a0b4b3 server/red_worker: use red_channel 2011-03-02 17:27:50 +02:00
Alon Levy
ce3efca360 server/red_channe: make hold_item take a channel arg 2011-03-02 17:27:50 +02:00
Alon Levy
73858b93dc server/red_worker: introduce red_peer_handle_outgoing and OutgoingHandler
From red_channel.
2011-03-02 17:27:50 +02:00
Alon Levy
29a7bcd596 server/red_worker: introduce common_channel_config_socket 2011-03-02 17:27:50 +02:00
Alon Levy
beba2c7206 server/red_worker: line width fix 2011-03-02 17:27:50 +02:00
Alon Levy
724348ce49 server/red_worker: don't push to NULL channel (called from device input) 2011-03-02 17:27:50 +02:00
Alon Levy
705254b399 server/red_worker: introduce red_channel_pipe_clear
No more common_release_pipe_item
2011-03-02 17:27:50 +02:00
Alon Levy
a0a9718423 server/red_worker: add red_channel_push 2011-03-02 17:27:50 +02:00
Alon Levy
111cf51103 server/red_worker: add send_item 2011-03-02 17:27:50 +02:00
Alon Levy
f7a99f858e server/red_worker: red_channel renames
The renames are part of refactoring red_worker's RedChannel to reuse
red_channel.h's RedChannel at the end.

s/red_send_data/red_channel_send/
s/red_pipe_get/red_channel_pipe_get/
s/recive_data/incoming/
s/red_receive/red_channel_receive/
s/channel_handle_message/red_channel_handle_message/
s/channel_is_connected/red_channel_is_connected/
s/red_pipe_add_type/red_channel_pipe_add_type/
2011-03-02 17:27:49 +02:00
Alon Levy
b3ea0bec3d server/red_tunnel_worker: use message_serial setter and getter
fixes breakage in --enable-tunnel compilation.
2011-03-02 17:27:49 +02:00
Marc-André Lureau
8f9cbd19db server: add SASL support
We introduce 2 public functions to integrate with the library user.

spice_server_set_sasl() - turn on SASL
spice_server_set_sasl_appname() - specify the name of the app (It is
used for where to find the default configuration file)

The patch for QEMU is on its way.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
f4dddc50f0 server: add auth mechanism selection
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
4f983b2c9c server: add reds_channel_dispose()
Try to have a common base dispose() method for channels. For now, it
just free the caps.

Make use of it in snd_worker, and in sync_write() - sync_write() is
going to have default caps later on.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
09c01c9516 server: simplify and constify sync_write()
+ symplify, improving style of code using it.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
37dbb8aec9 server: pull out reds_handle_link(), for future reuse
+ a couple of indent, style change

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
414e1de720 build: add --with-sasl
Using cyrus SASL library (same as gtk-vnc/qemu).

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
2ced8996c8 server/reds: make writev fallback more generic
We are going to reuse it for SASL/SSF encode write().

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01: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
1a4923c210 server/reds: remove the void* ctx field
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:35 +01:00
Marc-André Lureau
fc5d7f7625 server: use the new reds_stream_{read,write}
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-28 16:36:28 +01:00
Marc-André Lureau
f32503258f server: remove cb_free, not needed anymore
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 18:26:19 +01:00
Marc-André Lureau
07d6dd6108 server: use reds_{link,stream}_free()
Be carefull removing the watch before, like __release_link

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 18:26:19 +01:00
Marc-André Lureau
fca602124d server: use reds_stream_remove_watch() helper
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 18:26:18 +01:00
Marc-André Lureau
b79e7320de server: add reds_stream_{read,write,free,remove_watch}()
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-02-27 18:26:15 +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
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