Displaying 20 results from an estimated 45 matches for "cancel_rec".
Did you mean:
cancel_req
2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code.
It's all refactoring, there is no functional change.
Rich.
2016 Dec 14
0
[PATCH] daemon: expose file upload logic
...rite_cb (void *data_vp, const void *buf, size_t len)
return 0;
}
+int
+upload_to_fd (int fd)
+{
+ int ret = 0, err = 0;
+ struct write_cb_data data = { .fd = fd, .written = 0 };
+
+ ret = receive_file (write_cb, &data);
+ if (ret == -1) { /* write error */
+ err = errno;
+ ret = cancel_receive ();
+ errno = err;
+ reply_with_error ("write error");
+ close (fd);
+ return -1;
+ }
+ if (ret == -2) { /* cancellation from library */
+ /* This error is ignored by the library since it initiated the
+ * cancel. Nevertheless we must send an error reply here.
+...
2017 Mar 12
0
[PATCH v4 1/7] daemon: expose file upload logic
...rite_cb (void *data_vp, const void *buf, size_t len)
return 0;
}
+int
+upload_to_fd (int fd)
+{
+ int ret = 0, err = 0;
+ struct write_cb_data data = { .fd = fd, .written = 0 };
+
+ ret = receive_file (write_cb, &data);
+ if (ret == -1) { /* write error */
+ err = errno;
+ ret = cancel_receive ();
+ errno = err;
+ reply_with_error ("write error");
+ close (fd);
+ return -1;
+ }
+ if (ret == -2) { /* cancellation from library */
+ /* This error is ignored by the library since it initiated the
+ * cancel. Nevertheless we must send an error reply here.
+...
2017 Apr 06
0
[PATCH v6 1/7] daemon: expose file upload logic
...rite_cb (void *data_vp, const void *buf, size_t len)
return 0;
}
+int
+upload_to_fd (int fd)
+{
+ int ret = 0, err = 0;
+ struct write_cb_data data = { .fd = fd, .written = 0 };
+
+ ret = receive_file (write_cb, &data);
+ if (ret == -1) { /* write error */
+ err = errno;
+ ret = cancel_receive ();
+ errno = err;
+ reply_with_error ("write error");
+ close (fd);
+ return -1;
+ }
+ if (ret == -2) { /* cancellation from library */
+ /* This error is ignored by the library since it initiated the
+ * cancel. Nevertheless we must send an error reply here.
+...
2016 Dec 14
2
[PATCH] daemon: expose file upload logic
Exposing file upload logic as suggested in previous patch:
https://www.redhat.com/archives/libguestfs/2016-November/msg00109.html
Matteo Cafasso (1):
daemon: expose upload logic
daemon/daemon.h | 3 +++
daemon/upload.c | 70 ++++++++++++++++++++++++++++++++-------------------------
2 files changed, 42 insertions(+), 31 deletions(-)
--
2.10.2
2017 Apr 23
0
[PATCH v7 1/7] daemon: expose file upload logic
...*data_vp, const void *buf, size_t len)
return 0;
}
+int
+upload_to_fd (int fd, const char *filename)
+{
+ int r = 0, err = 0;
+ struct write_cb_data data = { .fd = fd, .written = 0 };
+
+ r = receive_file (write_cb, &data);
+ if (r == -1) { /* write error */
+ err = errno;
+ r = cancel_receive ();
+ errno = err;
+ reply_with_error ("write error: %s", filename);
+ close (fd);
+ return -1;
+ }
+ if (r == -2) { /* cancellation from library */
+ /* This error is ignored by the library since it initiated the
+ * cancel. Nevertheless we must send an error r...
2016 Nov 09
1
[PATCH] upload: improve file write callback
...8b4f600 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -84,7 +84,7 @@ upload (const char *filename, int flags, int64_t offset)
}
}
- r = receive_file (write_cb, &data.fd);
+ r = receive_file (write_cb, &data);
if (r == -1) { /* write error */
err = errno;
r = cancel_receive ();
--
2.10.2
2017 Apr 24
1
Re: [PATCH v7 1/7] daemon: expose file upload logic
On Sun, Apr 23, 2017 at 07:49:56PM +0300, Matteo Cafasso wrote:
> + if (r == -1) { /* write error */
> + err = errno;
> + r = cancel_receive ();
You need to use ignore_value here, and it needs to be in a separate
commit, as discussed previously.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' fo...
2012 Feb 13
0
[PATCH] daemon: Don't xdr_free uninitialized args struct on error paths.
..." group;
- pr " goto done;\n";
+ pr " goto done_no_free;\n";
pr " }\n";
pr "\n"
| _ -> ()
@@ -154,14 +154,14 @@ and generate_daemon_actions () =
if is_filein then
pr " cancel_receive ();\n";
pr " reply_with_error (\"unknown option in optional arguments bitmask (this can happen if a program is compiled against a newer version of libguestfs, then run against an older version of the daemon)\");\n";
- pr " goto done;\n";...
2017 Apr 06
14
[PATCH v6 0/7] Feature: Yara file scanning
v6:
- use new test functions
- fix yara_detection struct field names
- revert yara_load function to initial version
With Pino we were exploring the idea of allowing Users to load multiple
rule files with subsequent calls to yara_load API.
https://www.redhat.com/archives/libguestfs/2016-November/msg00119.html
It turns out impractical due to YARA API limitations. It is possible
to load multiple
2017 Apr 24
10
[PATCH v8 0/8] Feature: Yara file scanning
v8:
- Ignore returned value in daemon/upload.c
- Report serialization errors in lib/yara.c
Matteo Cafasso (8):
daemon: ignore unused return value in upload function
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in
2011 Jun 09
15
[PATCH 00/13] Fix errors found using Coverity static analyzer.
I ran the Coverity static analyzer[1] on libguestfs, and fixed many
errors as a result.
Coverity found some errors in gnulib, but it doesn't seem to be worth
following those up since the version of gnulib we are using is so old.
There are a couple more errors (possibly 1 false-positive) which I'm
going to send in a separate email.
BTW all the errors found by Coverity were in the daemon
2017 Feb 19
9
[PATCH v3 0/7] Feature: Yara file scanning
Rebase patches on top of 1.35.25.
No changes since last series.
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am
2016 Nov 21
2
Re: [PATCH v2 2/6] New API: yara_load
...written = 0 };
> +
> + data.fd = mkstemp (rules_path);
> + if (data.fd == -1) {
> + reply_with_perror ("mkstemp");
> + return -1;
> + }
> +
> + ret = receive_file (write_callback, &data);
> + if (ret == -1) {
> + /* Write error. */
> + cancel_receive ();
> + reply_with_error ("write error: %s", rules_path);
> + return -1;
> + }
> + if (ret == -2) {
> + /* Cancellation from library */
> + reply_with_error ("file upload cancelled");
> + return -1;
> + }
> +
> + return 0;
>...
2017 Mar 12
8
[PATCH v4 0/7] Feature: Yara file scanning
Rebase patches on top of 1.37.1.
No changes since last series.
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am
2017 Apr 04
13
[PATCH v5 0/7] Feature: Yara file scanning
v5:
- rebase on top of 1.37.9
- add missing actions_yara.* files
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am
2017 Aug 03
0
[PATCH 3/6] daemon: Refine check for Device and Dev_or_Path parameters (RHBZ#1477623).
...++ b/daemon/stubs-macros.h
@@ -30,16 +30,11 @@
*/
#define RESOLVE_DEVICE(path,path_out,is_filein) \
do { \
- if (STRNEQLEN ((path), "/dev/", 5)) { \
+ if (!is_device_parameter ((path))) { \
if (is_filein) cancel_receive (); \
reply_with_error ("%s: %s: expecting a device name", __func__, (path)); \
return; \
} \
- if (is_root_device (path)) { \
- if (is_filein) cancel_receive ();...
2018 Apr 30
0
[PATCH 1/4] daemon: upload: fix fd leak on lseek failure
...rtion(+)
diff --git a/daemon/upload.c b/daemon/upload.c
index 9de855f86..540a86437 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -111,6 +111,7 @@ upload (const char *filename, int flags, int64_t offset)
if (lseek (fd, offset, SEEK_SET) == -1) {
err = errno;
ignore_value (cancel_receive ());
+ close (fd);
errno = err;
reply_with_perror ("lseek: %s", filename);
return -1;
--
2.14.3
2017 Apr 23
11
[PATCH v7 0/7] Feature: Yara file scanning
v7:
- Fixes according to comments
- Rebase on top of 1.37.12
Matteo Cafasso (7):
daemon: expose file upload logic
appliance: add yara dependency
New API: yara_load
New API: yara_destroy
New API: internal_yara_scan
New API: yara_scan
yara_scan: added API tests
appliance/packagelist.in | 4 +
configure.ac | 1 +
daemon/Makefile.am
2012 Feb 27
4
[PATCH 0/4] Add various ntfs* tools and unify label setting.
This miscellaneous patch adds bindings for:
- ntfsfix
- ntfsclone
- ntfslabel
and unifies filesystem label setting through a single API 'set-label'
which replaces 'set-e2label' and is also able to set labels on NTFS
using the ntfslabel program.
'ntfsfix' has been added as a possible way to fix RHBZ#797760.
However I have not found a way to fully fix this bug. See