[patch iwhd 1/5] Match ERROR tag properly

Pete Zaitcev zaitcev at redhat.com
Tue Apr 5 22:51:14 UTC 2011


---
 backend.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 431897c2c579128b4930aa9bfd84a2f963c8b8e9
Author: Pete Zaitcev <zaitcev at yahoo.com>
Date:   Tue Apr 5 15:36:50 2011 -0600

    Match the error market properly in fs_rhevm_register.

diff --git a/backend.c b/backend.c
index 101f520..c63a0d5 100644
--- a/backend.c
+++ b/backend.c
@@ -1517,7 +1517,7 @@ fs_rhevm_register (my_state *ms, const provider_t *prov, const char *next,
 			if (rc == MHD_HTTP_BAD_REQUEST)
 				rc = MHD_HTTP_OK;
 		}
-		else if (strcmp(buf,"ERROR") == 0) {
+		else if (strncmp(buf,"ERROR",sizeof("ERROR")-1) == 0) {
 			DPRINTF("found err marker: %s\n",buf+sizeof("ERROR"));
 			sprintf(ami_id_buf,"failed %.56s",buf+sizeof("ERROR"));
 			rc = MHD_HTTP_INTERNAL_SERVER_ERROR;


More information about the iwhd-devel mailing list