I have a following code. It parses bug_id element from bugzilla response. What happened in recent time, redhat bugzilla 4.2 has dropped 'bug_id' element and now it's only 'id' element. void abrt_xmlrpc_die(xmlrpc_env *env) { error_msg_and_die("fatal: %s", env->fault_string); } /* die or return bug id; each bug must have bug id otherwise xml is corrupted */ int rhbz_bug_id(xmlrpc_value* xml) { func_entry(); xmlrpc_env env; xmlrpc_env_init(&env); xmlrpc_value *item = NULL; xmlrpc_value *bug = NULL; int bug_id = -1;; xmlrpc_array_read_item(&env, xml, 0, &item); if (env.fault_occurred) abrt_xmlrpc_die(&env); bug = rhbz_get_member("id", item); xmlrpc_DECREF(item); if (!bug) abrt_xmlrpc_die(&env); xmlrpc_read_int(&env, bug, &bug_id); xmlrpc_DECREF(bug); if (env.fault_occurred) abrt_xmlrpc_die(&env); VERB3 log("found bug_id %i", bug_id); return bug_id; } Version-Release number of selected component (if applicable): [npajkovs@f17-virt libreport]$ rpm -q xmlrpc-c xmlrpc-c-1.29.0-1701.svn2233.fc17.x86_64 Actual results: env->fault_string is set to NULL Expected results: env->fault_string is set to appropriate error msg
I am not sure whether I understand you correctly, but I can not detect the mentioned "bug_id" literal in the posted piece of code. Assuming, it's the new version where "bug_id" has been replaced by "id", then the --- /* ---> at this point env.fault_occurred is false and env.fault_string is unspecified */ bug = rhbz_get_member("id", item); xmlrpc_DECREF(item); if (!bug) abrt_xmlrpc_die(&env); --- part is probably wrong because when rhbz_get_member() fails (--> returns NULL) the &env variable stays unmodified.
Ah, you are right.