[ https://issues.apache.org/jira/browse/AXIS2C-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dushshantha Chandradasa resolved AXIS2C-867. -------------------------------------------- Resolution: Fixed > Function axis2_svc_client_remove_all_headers[Alastair FETTES] > ------------------------------------------------------------- > > Key: AXIS2C-867 > URL: https://issues.apache.org/jira/browse/AXIS2C-867 > Project: Axis2-C > Issue Type: Bug > Components: core/clientapi > Affects Versions: Current (Nightly) > Environment: Ubuntu 7.04 > Reporter: Lahiru Gunathilake > Fix For: Current (Nightly) > > Attachments: diff.txt, diff2.txt > > > for (i = 0; i < size; i++) > { > /*axiom_node_t *node = NULL; > > > node = axutil_array_list_get(svc_client->headers, env, i); > > > > > > if (node) > > > { > > > axiom_node_free_tree(node, env); > > > node = NULL; > > > } */ > axutil_array_list_remove(svc_client->headers, env, i); > } > AXIS2_EXTERN void *AXIS2_CALL > axutil_array_list_remove( > struct axutil_array_list *array_list, > const axutil_env_t * env, > int index) > { > void *result = NULL; > int i = 0; > AXIS2_PARAM_CHECK (env->error, array_list, AXIS2_FAILURE); > if (axutil_array_list_check_bound_exclusive(array_list, env, index)) > { > result = array_list->data[index]; > for (i = index; i < array_list->size - 1; i++) > array_list->data[i] = array_list->data[i + 1]; > array_list->size--; > } > return result; > } There is a possible bug in "axis2_svc_client_remove_all_headers" function. > The call to "axutil_array_list_remove" is where the problem stems from. > Since the for-loop is incrementing, and the value of "array_list->size" is > decrementing, eventually line 120 will fail, and some of the headers will not > be cleared out. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]