git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2df2819
)
More checks.
author
Richard Jones
<rjones@redhat.com>
Sun, 26 Apr 2009 08:52:42 +0000
(09:52 +0100)
committer
Richard Jones
<rjones@redhat.com>
Sun, 26 Apr 2009 08:52:42 +0000
(09:52 +0100)
src/guestfs.c
patch
|
blob
|
history
diff --git
a/src/guestfs.c
b/src/guestfs.c
index
05fb113
..
8836a7e
100644
(file)
--- a/
src/guestfs.c
+++ b/
src/guestfs.c
@@
-1306,6
+1306,7
@@
sock_read_event (struct guestfs_main_loop *ml, guestfs_h *g, void *data,
if (g->msg_in_size-4 < len) return; /* Need more of this message. */
/* Got the full message, begin processing it. */
if (g->msg_in_size-4 < len) return; /* Need more of this message. */
/* Got the full message, begin processing it. */
+#if 0
if (g->verbose) {
int i, j;
if (g->verbose) {
int i, j;
@@
-1326,6
+1327,7
@@
sock_read_event (struct guestfs_main_loop *ml, guestfs_h *g, void *data,
printf ("|\n");
}
}
printf ("|\n");
}
}
+#endif
/* Not in the expected state. */
if (g->state != BUSY)
/* Not in the expected state. */
if (g->state != BUSY)
@@
-1334,6
+1336,9
@@
sock_read_event (struct guestfs_main_loop *ml, guestfs_h *g, void *data,
/* Push the message up to the higher layer. */
if (g->reply_cb)
g->reply_cb (g, g->reply_cb_data, &xdr);
/* Push the message up to the higher layer. */
if (g->reply_cb)
g->reply_cb (g, g->reply_cb_data, &xdr);
+ else
+ /* This message (probably) should never be printed. */
+ fprintf (stderr, "libguesfs: sock_read_event: !!! dropped message !!!\n");
g->msg_in_size -= len + 4;
memmove (g->msg_in, g->msg_in+len+4, g->msg_in_size);
g->msg_in_size -= len + 4;
memmove (g->msg_in, g->msg_in+len+4, g->msg_in_size);