Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 150000 Details for
Bug 232140
ccs_get on /foo/child::*[1] doesn't work if foo's child is an empty tag
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
head & rhel5 patch
ccs-head-get-null-child.patch (text/plain), 2.89 KB, created by
Lon Hohberger
on 2007-03-13 22:48:14 UTC
(
hide
)
Description:
head & rhel5 patch
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-03-13 22:48:14 UTC
Size:
2.89 KB
patch
obsolete
>? ccs_test/ccs_test >? ccs_tool/ccs_tool >? daemon/ccsd >? lib/ccs.h.gch >? make/defines.mk >Index: daemon/cnx_mgr.c >=================================================================== >RCS file: /cvs/cluster/cluster/ccs/daemon/cnx_mgr.c,v >retrieving revision 1.42 >diff -u -r1.42 cnx_mgr.c >--- daemon/cnx_mgr.c 14 Feb 2007 16:22:17 -0000 1.42 >+++ daemon/cnx_mgr.c 13 Mar 2007 22:43:09 -0000 >@@ -871,33 +871,41 @@ > (node->type == 1)? "XML_ELEMENT_NODE": > (node->type == 2)? "XML_ATTRIBUTE_NODE":""); > >- if(!node || !node->children || >- !node->children->content || !strlen((char *)node->children->content)){ >+ if(!node) { > log_dbg("No content found.\n"); > error = -ENODATA; > goto fail; > } > >- log_dbg("Query results:: %s\n", node->children->content); >- > if(((node->type == XML_ATTRIBUTE_NODE) && strstr(query, "@*")) || > ((node->type == XML_ELEMENT_NODE) && strstr(query, "child::*"))){ > /* add on the trailing NULL and the '=' separator for a list of attrs > or an element node + CDATA*/ >- size = strlen((char *)node->children->content) + >- strlen((char *)node->name)+2; >+ if (node->children && node->children->content) >+ size = strlen((char *)node->children->content) + >+ strlen((char *)node->name)+2; >+ else >+ size = strlen((char *)node->name)+2; > nnv= 1; > } else { >- size = strlen((char *)node->children->content) + 1; >+ if (node->children && node->children->content) { >+ size = strlen((char *)node->children->content)+1; >+ } else { >+ error = -ENODATA; >+ goto fail; >+ } > } > > if(size <= ch->comm_payload_size){ /* do we already have enough space? */ > log_dbg("No extra space needed.\n"); > if(nnv){ >- sprintf(*payload, "%s=%s", node->name,node->children->content); >- }else { >- sprintf(*payload, "%s", node->children->content); >+ sprintf(*payload, "%s=%s", node->name, node->children ? >+ (char *)node->children->content:""); >+ } else { >+ sprintf(*payload, "%s", node->children ? node->children->content : >+ node->name); > } >+ > } else { > log_dbg("Extra space needed.\n"); > free(*payload); >@@ -907,11 +915,14 @@ > goto fail; > } > if(nnv){ >- sprintf(*payload, "%s=%s", node->name, node->children->content); >- }else { >- sprintf(*payload, "%s", node->children->content); >+ sprintf(*payload, "%s=%s", node->name, node->children ? >+ (char *)node->children->content:""); >+ } else { >+ sprintf(*payload, "%s", node->children ? node->children->content : >+ node->name); > } > } >+ log_dbg("Query results:: %s\n", *payload); > ch->comm_payload_size = size; > } else { > log_dbg("No nodes found.\n"); >@@ -1081,7 +1092,7 @@ > goto fail; > } > >- if(ch->comm_desc < 0 || ch->comm_desc >= MAX_OPEN_CONNECTIONS){ >+ if(ch->comm_desc < 0){ > log_err("Invalid descriptor specified (%d).\n", ch->comm_desc); > log_err("Someone may be attempting something evil.\n"); > error = -EBADR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232140
: 150000