summaryrefslogtreecommitdiffstats
path: root/common/marshaller.h
diff options
context:
space:
mode:
authorMarc-Andre Lureau <marcandre.lureau@gmail.com>2016-01-22 18:04:35 +0100
committerFrediano Ziglio <fziglio@redhat.com>2016-02-02 12:38:54 +0000
commit472e563591a80f75679be2ea855e660c6ee51721 (patch)
treea1963e203257c054a3369b01a29340ffb5639aa3 /common/marshaller.h
parent6424c0baee9b25cc4508e3f1a81f7be5546a3793 (diff)
downloadspice-common-472e563591a80f75679be2ea855e660c6ee51721.tar.gz
spice-common-472e563591a80f75679be2ea855e660c6ee51721.tar.xz
spice-common-472e563591a80f75679be2ea855e660c6ee51721.zip
marshaller: track if add_fd() was given -1
In some cases, it might be worth to be able to send a message with a -1 fd, has the protocol permits. Change add_fd/get_fd in order to track if the caller wanted to send -1. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'common/marshaller.h')
-rw-r--r--common/marshaller.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/marshaller.h b/common/marshaller.h
index 9f9c3ad..316184e 100644
--- a/common/marshaller.h
+++ b/common/marshaller.h
@@ -19,6 +19,7 @@
#ifndef _H_MARSHALLER
#define _H_MARSHALLER
+#include <stdbool.h>
#include <spice/macros.h>
#include <spice/types.h>
#include "mem.h"
@@ -67,7 +68,7 @@ void *spice_marshaller_add_int8(SpiceMarshaller *m, int8_t v);
void spice_marshaller_set_uint32(SpiceMarshaller *m, void *ref, uint32_t v);
void spice_marshaller_add_fd(SpiceMarshaller *m, int fd);
-int spice_marshaller_get_fd(SpiceMarshaller *m);
+bool spice_marshaller_get_fd(SpiceMarshaller *m, int *fd);
SPICE_END_DECLS