Displaying 9 results from an estimated 9 matches for "receive_cb".
Did you mean:
receive_
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...sock, lenbuf, 4) == -1) {
fprintf (stderr, "xwrite failed\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
if (xwrite (sock, buf, len) == -1) {
fprintf (stderr, "xwrite failed\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
@@ -311,7 +311,7 @@ receive_file (receive_cb cb, void *opaque)
for (;;) {
/* Read the length word. */
if (xread (sock, lenbuf, 4) == -1)
- exit (1);
+ exit (EXIT_FAILURE);
xdrmem_create (&xdr, lenbuf, 4, XDR_DECODE);
xdr_uint32_t (&xdr, &len);
@@ -323,7 +323,7 @@ receive_file (receive_cb cb, void...
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...goto cont;
}
if (hdr.status != GUESTFS_STATUS_OK) {
- reply_with_error ("unexpected message status (%d)", hdr.status);
+ reply_with_error ("unexpected message status (%d)", (int) hdr.status);
goto cont;
}
@@ -444,8 +445,9 @@ receive_file (receive_cb cb, void *opaque)
if (verbose)
fprintf (stderr,
- "guestfsd: receive_file: got chunk: cancel = 0x%x, len = %d, buf = %p\n",
- chunk.cancel, chunk.data.data_len, chunk.data.data_val);
+ "guestfsd: receive_file: got chunk: cancel...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...goto cont;
}
if (hdr.status != GUESTFS_STATUS_OK) {
- reply_with_error ("unexpected message status (%d)", hdr.status);
+ reply_with_error ("unexpected message status (%d)", (int) hdr.status);
goto cont;
}
@@ -444,8 +445,9 @@ receive_file (receive_cb cb, void *opaque)
if (verbose)
fprintf (stderr,
- "guestfsd: receive_file: got chunk: cancel = 0x%x, len = %d, buf = %p\n",
- chunk.cancel, chunk.data.data_len, chunk.data.data_val);
+ "guestfsd: receive_file: got chunk: cancel...
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...if (xwrite (sock, lenbuf, 4) == -1)
+ error (EXIT_FAILURE, 0, "xwrite failed");
+ if (xwrite (sock, buf, (size_t) len) == -1)
+ error (EXIT_FAILURE, 0, "xwrite failed");
}
/* Receive file chunks, repeatedly calling 'cb'. */
@@ -413,11 +394,8 @@ receive_file (receive_cb cb, void *opaque)
if (len == GUESTFS_CANCEL_FLAG)
continue; /* Just ignore it. */
- if (len > GUESTFS_MESSAGE_MAX) {
- fprintf (stderr, "guestfsd: incoming message is too long (%u bytes)\n",
- len);
- exit (EXIT_FAILURE);
- }
+ if (len &...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...r:
- reply_with_error ("strdup failed");
- return NULL;
+ error:
+ reply_with_error ("strdup failed");
+ return NULL;
}
diff --git a/daemon/proto.c b/daemon/proto.c
index df63bfd..7a6fa4d 100644
--- a/daemon/proto.c
+++ b/daemon/proto.c
@@ -459,7 +459,7 @@ receive_file (receive_cb cb, void *opaque)
if (chunk.cancel) {
if (verbose)
fprintf (stderr,
- "guestfsd: receive_file: received cancellation from library\n");
+ "guestfsd: receive_file: received cancellation from library\n");
xdr_free ((xdrproc_t) xdr_guestfs_chunk, (cha...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste.
---
align/scan.c | 35 ++++++++++---------
cat/cat.c | 39 +++++++++++----------
cat/filesystems.c | 69 +++++++++++++++++++-------------------
cat/log.c | 35 ++++++++++---------
cat/ls.c | 61 +++++++++++++++++----------------
df/main.c | 43 ++++++++++++------------
diff/diff.c | 67
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did:
if (something_bad) {
perror (...);
exit (EXIT_FAILURE);
}
replace this with use of the error(3) function:
if (something_bad)
error (EXIT_FAILURE, errno, ...);
The error(3) function is supplied by glibc, or by gnulib on platforms
which don't have it, and is much more flexible than perror(3). Since
we already use error(3), there seems to be
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...proc_nr >= 0 && proc_nr < GUESTFS_PROC_NR_PROCS
+ ? function_names[proc_nr] : "UNKNOWN PROCEDURE",
+ (int) (elapsed_us / 1000000),
+ (int) ((elapsed_us / 10000) % 100));
}
cont:
@@ -317,7 +317,7 @@ receive_file (receive_cb cb, void *opaque)
if (len > GUESTFS_MESSAGE_MAX) {
fprintf (stderr, "guestfsd: incoming message is too long (%u bytes)\n",
- len);
+ len);
exit (1);
}
@@ -341,7 +341,7 @@ receive_file (receive_cb cb, void *opaque)
if (verbose)...