MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / print_to

Function print_to

modules/tm/t_msgbuilder.c:667–692  ·  view source on GitHub ↗

* Print To header field */

Source from the content-addressed store, hash-verified

665 * Print To header field
666 */
667static inline char* print_to(char* w, dlg_t* dialog, struct cell* t)
668{
669 t->to.s = w;
670 t->to.len = TO_LEN + dialog->rem_uri.len + 2 + CRLF_LEN;
671
672 append_string(w, TO, TO_LEN);
673
674 if(dialog->rem_dname.len) {
675 t->to.len += dialog->rem_dname.len;
676 append_string(w, dialog->rem_dname.s, dialog->rem_dname.len);
677 *(w++) = ' ';
678 }
679
680 *(w++) = '<';
681 append_string(w, dialog->rem_uri.s, dialog->rem_uri.len);
682 *(w++) = '>';
683
684 if (dialog->id.rem_tag.len) {
685 t->to.len += TOTAG_LEN + dialog->id.rem_tag.len ;
686 append_string(w, TOTAG, TOTAG_LEN);
687 append_string(w, dialog->id.rem_tag.s, dialog->id.rem_tag.len);
688 }
689
690 append_string(w, CRLF, CRLF_LEN);
691 return w;
692}
693
694
695/*

Callers 1

build_uac_reqFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected