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

Function mail_rcpt

lib_acl_cpp/src/mime/internal/mime_state_parse.cpp:354–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354static void mail_rcpt(MIME_NODE *node, const HEADER_OPTS *header_info)
355{
356 TOK822 *tree;
357 TOK822 **addr_list;
358 TOK822 **tpp;
359 ACL_VSTRING *temp;
360 const char *cp;
361
362 temp = acl_vstring_alloc(10);
363 cp = STR(node->buffer) + strlen(header_info->name) + 1;
364 tree = tok822_parse(cp);
365 addr_list = tok822_grep(tree, TOK822_ADDR);
366 for (tpp = addr_list; *tpp; tpp++) {
367 tok822_internalize(temp, tpp[0]->head, TOK822_STR_DEFL);
368 if (header_info->type == HDR_TO) {
369 node->header_to_list =
370 mail_addr_add(node->header_to_list, STR(temp));
371 } else if (header_info->type == HDR_CC) {
372 node->header_cc_list =
373 mail_addr_add(node->header_cc_list, STR(temp));
374 } else if (header_info->type == HDR_BCC) {
375 node->header_bcc_list =
376 mail_addr_add(node->header_bcc_list, STR(temp));
377 }
378 }
379
380 acl_myfree(addr_list);
381 tok822_free_tree(tree);
382 acl_vstring_free(temp);
383}
384
385static void mail_from(MIME_NODE *node, const HEADER_OPTS *header_info)
386{

Callers 1

mime_header_lineFunction · 0.85

Calls 6

acl_vstring_allocFunction · 0.85
tok822_grepFunction · 0.85
tok822_internalizeFunction · 0.85
mail_addr_addFunction · 0.85
tok822_free_treeFunction · 0.85
acl_vstring_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…