static void http_free_request(struct http_request *r) { struct connection *c = r->c; struct http_request *next = r->next, *prev = r->prev; assert(c->pending_reqs); if (r->next != r) { next->prev = r->prev; prev->next = r->next; } //else assert(r->prev == r && c->pending_reqs == r); r->next = r->prev = NULL; //assert(c->pending_reqs == r); if (c->pending_reqs == r) { c->pending_reqs = (r == next) ? NULL : next; } content_close(cos_spd_id(), r->content_id); conn_refcnt_dec(c); __http_free_request(r); }
nserror html_object_close_objects(html_content *html) { struct content_html_object *object, *next; for (object = html->object_list; object != NULL; object = next) { next = object->next; if (object->content == NULL || object->box == NULL) continue; if (content_get_type(object->content) == CONTENT_NONE) continue; if (content_get_type(object->content) == CONTENT_HTML) { guit->misc->schedule(-1, html_object_refresh, object); } content_close(object->content); } return NSERROR_OK; }