summaryrefslogtreecommitdiffstats
path: root/server/reds_stream.c
Commit message (Collapse)AuthorAgeFilesLines
* syntax-check: Don't use tabs for indentationChristophe Fergeau2015-10-191-5/+5
|
* Simplify pointer computationFrediano Ziglio2015-10-121-1/+1
| | | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
* reds-stream: add reds_stream_get_family() functionMarc-André Lureau2015-01-151-0/+10
|
* Add missing buffer (re)allocation to reds_sasl_handle_auth_steplen()Christophe Fergeau2014-04-161-0/+1
| | | | | We need to make sure we have a buffer big enough to accomodate the data sent by the coming SASL step.
* Add G_GNUC_UNUSED annotations to async_read_handler argsChristophe Fergeau2014-04-161-1/+3
| | | | | 2 of the arguments are not used, the G_GNUC_UNUSED annotation will make this explicit.
* Make struct AsyncRead/async_read_handler privateChristophe Fergeau2014-04-161-1/+11
| | | | All users are now contained in reds_stream.c
* Call AsyncRead variables 'async' instead of 'obj'Christophe Fergeau2014-04-161-30/+30
| | | | This is a more explicit name.
* Add reds_stream_set_async_error_handler() helperChristophe Fergeau2014-04-161-4/+3
| | | | | | | | | | | | This replaces async_read_set_error_handler() which was unused. This sets a callback to be called when an async operation fails. We could pass the error_handler to each reds_stream_async_read() call, but as we will be using the same one for all async calls, it's more convenient to set it once and for all. AsyncRead is going to be private to reds_stream.c in one of the next commits, and the error handler will need to be set from reds.c, hence the move to a public RedsStream method.
* Introduce reds_stream_async_read() helperChristophe Fergeau2014-04-161-43/+34
| | | | This will allow to make RedsStream::async_read private
* Fix --without-sasl buildChristophe Fergeau2014-04-161-0/+4
| | | | | | There are 2 SASL-related function prototypes which are unused in the --without-sasl case. They cause a warning, and a build failure when using -Werror. Wrapping them in #if HAVE_SASL avoids this issue.
* Make RedsStream::info privateChristophe Fergeau2014-01-201-22/+28
|
* Introduce reds_stream_set_channel()Christophe Fergeau2014-01-201-0/+9
|
* Introduce reds_stream_set_info_flag()Christophe Fergeau2014-01-201-0/+10
|
* Make RedsStream::async_read privateChristophe Fergeau2014-01-201-12/+14
|
* Make RedsStream::sasl privateChristophe Fergeau2014-01-201-36/+71
|
* Make RedsStream read/write functions privateChristophe Fergeau2014-01-201-14/+19
|
* Make RedsStream::ssl privateChristophe Fergeau2014-01-201-17/+18
|
* Introduce reds_stream_is_ssl()Christophe Fergeau2014-01-201-0/+5
|
* Add RedsStream::privChristophe Fergeau2014-01-201-1/+5
| | | | | | | The private data is allocated at the same time as RedsStream and goes immediatly after the main RedsStream data. This private member will allow to hide internal RedsStream implementation details from the rest of spice-server.
* Move SASL authentication to reds_stream.hChristophe Fergeau2014-01-201-0/+510
| | | | | | SASL authentication mostly use members from RedsStream to do its work, so it makes sense to have its code in reds_stream.c. This should allow to make RedsStream::sasl private in the future.
* Move async code to RedsStreamChristophe Fergeau2014-01-201-0/+64
| | | | | | The AsyncRead structure in reds.h wraps an async read + callback to be done on a stream. Moving it to reds_stream.h is needed in order to move SASL authentication there.
* Move stream read/write callbacks to reds_stream.cChristophe Fergeau2014-01-201-0/+75
| | | | | | Now that stream creation and SSL enabling are done by helpers in reds_stream.c, we can move the initialization of the vfunc read/write pointers there too.
* Introduce reds_stream_new() helperChristophe Fergeau2014-01-201-0/+29
| | | | | | Initializing a new stream means initializing quite a few fields. This commit factors this initialization in a dedicated reds_stream_new helper. This also helps moving more code from reds.c to reds_stream.c
* reds: Move SSL-related code to RedsStreamChristophe Fergeau2014-01-201-0/+50
| | | | Code to initiate a SSL stream belongs there
* Move sync_write* to reds_stream.hChristophe Fergeau2014-01-201-0/+28
| | | | They are renamed to reds_stream_write*
* Add reds_stream.[ch]Christophe Fergeau2014-01-201-0/+220
Gather common RedsStream code there rather than having it in reds.c