* Print From header field */
| 696 | * Print From header field |
| 697 | */ |
| 698 | static inline char* print_from(char* w, dlg_t* dialog, struct cell* t) |
| 699 | { |
| 700 | t->from.s = w; |
| 701 | t->from.len = FROM_LEN + dialog->loc_uri.len + 2 + CRLF_LEN; |
| 702 | |
| 703 | append_string(w, FROM, FROM_LEN); |
| 704 | |
| 705 | if(dialog->loc_dname.len) { |
| 706 | t->from.len += dialog->loc_dname.len + 1; |
| 707 | append_string(w, dialog->loc_dname.s, dialog->loc_dname.len); |
| 708 | *(w++) = ' '; |
| 709 | } |
| 710 | |
| 711 | *(w++) = '<'; |
| 712 | append_string(w, dialog->loc_uri.s, dialog->loc_uri.len); |
| 713 | *(w++) = '>'; |
| 714 | |
| 715 | if (dialog->id.loc_tag.len) { |
| 716 | t->from.len += FROMTAG_LEN + dialog->id.loc_tag.len; |
| 717 | append_string(w, FROMTAG, FROMTAG_LEN); |
| 718 | append_string(w, dialog->id.loc_tag.s, dialog->id.loc_tag.len); |
| 719 | } |
| 720 | |
| 721 | append_string(w, CRLF, CRLF_LEN); |
| 722 | return w; |
| 723 | } |
| 724 | |
| 725 | |
| 726 | /* |