MCPcopy Create free account
hub / github.com/acl-dev/acl / http_hdr_clone

Function http_hdr_clone

lib_protocol/src/http/http_hdr.c:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39/* ��¡һ��HTTPЭ��ͷ�Ļ����ṹ */
40
41void http_hdr_clone(const HTTP_HDR *src, HTTP_HDR *dst)
42{
43 ACL_ARRAY *entry_lnk_saved = dst->entry_lnk; /* �ȱ���ԭָ�� */
44 HTTP_HDR_ENTRY *entry, *entry_from;
45 int i, n;
46
47 memcpy(dst, src, sizeof(HTTP_HDR));
48 dst->entry_lnk = entry_lnk_saved; /* �ָ�ԭʼָ�� */
49 dst->chat_ctx = NULL; /* bugfix, 2008.10.7 , zsx */
50 dst->chat_free_ctx_fn = NULL; /* bugfix, 2008.10.7 , zsx */
51
52 n = acl_array_size(src->entry_lnk);
53 for (i = 0; i < n; i++) {
54 entry_from = (HTTP_HDR_ENTRY*) acl_array_index(src->entry_lnk, i);
55 entry = http_hdr_entry_build(entry_from->name, entry_from->value);
56 http_hdr_append_entry(dst, entry);
57 }
58}
59
60/* �ͷ� HTTP_HDR */
61

Callers 2

http_hdr_res_cloneFunction · 0.85
http_hdr_req_cloneFunction · 0.85

Calls 5

memcpyFunction · 0.85
acl_array_sizeFunction · 0.85
acl_array_indexFunction · 0.85
http_hdr_entry_buildFunction · 0.85
http_hdr_append_entryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…