[spice-server,2/2] websocket: Make header self-independent

Submitted by Frediano Ziglio on June 27, 2019, 3:03 p.m.

Details

Message ID 20190627150358.16534-2-fziglio@redhat.com
State Accepted
Commit 705ae9c197f75187ef657c127199d5d94e0cf938
Headers show
Series "Series without cover letter" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio June 27, 2019, 3:03 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/websocket.h | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/server/websocket.h b/server/websocket.h
index 7707e6804..ec452038b 100644
--- a/server/websocket.h
+++ b/server/websocket.h
@@ -18,6 +18,10 @@ 
 #ifndef WEBSOCKET_H_
 #define WEBSOCKET_H_
 
+#include <inttypes.h>
+
+#include "sys-socket.h"
+
 typedef ssize_t (*websocket_read_cb_t)(void *opaque, void *buf, size_t nbyte);
 typedef ssize_t (*websocket_write_cb_t)(void *opaque, const void *buf, size_t nbyte);
 typedef ssize_t (*websocket_writev_cb_t)(void *opaque, struct iovec *iov, int iovcnt);

Comments

On 6/27/19 6:03 PM, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>

Ack, with comment/suggestion below.

> ---
>   server/websocket.h | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/server/websocket.h b/server/websocket.h
> index 7707e6804..ec452038b 100644
> --- a/server/websocket.h
> +++ b/server/websocket.h
> @@ -18,6 +18,10 @@
>   #ifndef WEBSOCKET_H_
>   #define WEBSOCKET_H_
>   
> +#include <inttypes.h>

This is for uint8_t, maybe
#include <stdint.h>

> +
> +#include "sys-socket.h"

(This is for struct iovec)

Uri.
> +
>   typedef ssize_t (*websocket_read_cb_t)(void *opaque, void *buf, size_t nbyte);
>   typedef ssize_t (*websocket_write_cb_t)(void *opaque, const void *buf, size_t nbyte);
>   typedef ssize_t (*websocket_writev_cb_t)(void *opaque, struct iovec *iov, int iovcnt);
>