- May 14, 2020
-
-
Kevin Pouget authored
-
- May 11, 2020
-
-
When SASL is active, if a read request is made and SASL buffer contains some data (but not enough to fulfill the request), upon return the taken data from the buffer is not accounted for and hence part of the message gets discarded. red_stream_sasl_read function takes available data from sasl buffer and returns if it's enough. If it's not, nbyte is decremented and buf pointer is incremented to account for the taken data (if any). Then it tries to get more data from the socket and decode it. Suppose there was some data in the sasl buffer, but not enough. Then the socket is not readable (EAGAIN, EINTR, whatever) or the new data isn't enough for sasl_decode (hence decodedlen == 0). In both cases the function returns as if no data was read, but it took some data from sasl buffer. This data is lost and from this point on the communication ceases on the channel (eventually new data is read, but messages are corrupt without the parts previously discarded). On the other hand, if some data is read from sasl buffer and everything else works fine, the output buffer contains all the data, but the count returned only inform the caller about the newly read data (which causes the similar effect of discarding part of the message). Fixes: spice/spice#40 Acked-by:
Frediano Ziglio <fziglio@redhat.com>
-
Frediano Ziglio authored
Signed-off-by:
Frediano Ziglio <freddy77@gmail.com>
-
- May 05, 2020
-
-
Test that dispatcher work. Signed-off-by:
Frediano Ziglio <freddy77@gmail.com>
-
Frediano Ziglio authored
-
Frediano Ziglio authored
Signed-off-by:
Frediano Ziglio <freddy77@gmail.com>
-
- May 01, 2020
-
-
Allows the compiler to do some additional optimizations. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Not used anymore. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
We don't use anymore GObject parameters so avoid having to register enum values to GType system to use them. We just need to get the nick value of the enum values for debug purposes. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Remove all members public, set correct access and create missing methods. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Instead of including spice.h directly include an header that wraps it. This allows to remove the SPICE_SERVER_INTERNAL define. Currently is used to rename SpiceCharDeviceInstance to RedCharDevice and reduce its visibility to hidden. This remove some warnings and some weird code in the source. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Implements weak pointers and helper to implement them. They will be used for RedCharDevice. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Allow to create an object already contained in a shared pointer to avoid having not owned objects. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
This allows to make easier the management of owning. Reference counting is automatically updated based on shared pointers modification. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
It will be used to refactor reference counting code. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Update member access to limit it. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
In the meanwhile remove a leak on the program. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
C++ check parameter type, not founding the functions at link time. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Move structure declaration at the end. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Use an utility list. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Provide a suitable allocator using GLib Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
The reason to not using STL is that our code from how was designed requires the iterator to be safe to the delete of the element pointed by the iterator. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Use std::max to make code smaller Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Remove GObject. Add access protection. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
RedCharDevice can all be removed just calling unref, beside the agent that needs special threatment. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Use a template to wrap the other dispatcher_send_message_custom avoiding having to pass a void* opaque and extract payload size from passed type. Will be used more by next commit when Dispatchers are turned into C++. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Avoids g_object_(un)ref. This in preparation to remove GObject. Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-
Signed-off-by:
Frediano Ziglio <fziglio@redhat.com>
-