diff options
| author | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-29 17:12:47 +0000 |
|---|---|---|
| committer | Adam Weinberger <adamw@FreeBSD.org> | 2014-07-29 17:12:47 +0000 |
| commit | 08a006d08a4c35d2c3ecc9a3d10cf7fd14661a84 (patch) | |
| tree | 0cfc4f0736babb895eb97a65c6defe632a0249c7 /net/ser/files/patch-modules__tm__t_msgbuilder.c | |
| parent | f474a16cfbfad1844b9c50e45e36a3a77f0c59b5 (diff) | |
Rename all patches that contain '::' as a path separator, and use
'__' instead.
Diffstat (limited to 'net/ser/files/patch-modules__tm__t_msgbuilder.c')
| -rw-r--r-- | net/ser/files/patch-modules__tm__t_msgbuilder.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/net/ser/files/patch-modules__tm__t_msgbuilder.c b/net/ser/files/patch-modules__tm__t_msgbuilder.c new file mode 100644 index 000000000000..159c904895dd --- /dev/null +++ b/net/ser/files/patch-modules__tm__t_msgbuilder.c @@ -0,0 +1,55 @@ + +$FreeBSD$ + +--- modules/tm/t_msgbuilder.c 2004/06/29 19:22:35 1.1 ++++ modules/tm/t_msgbuilder.c 2004/06/29 19:56:19 +@@ -124,7 +124,7 @@ + + /* User Agent */ + if (server_signature) { +- *len += USER_AGENT_LEN + CRLF_LEN; ++ *len += USER_AGENT_LEN + CRLF_LEN + (server_name ? strlen(server_name) : UA_NAME_LEN); + } + /* Content Length, EoM */ + *len+=CONTENT_LENGTH_LEN+1 + CRLF_LEN + CRLF_LEN; +@@ -164,7 +164,13 @@ + + /* User Agent header */ + if (server_signature) { +- append_mem_block(p,USER_AGENT CRLF, USER_AGENT_LEN+CRLF_LEN ); ++ append_mem_block(p, USER_AGENT, USER_AGENT_LEN); ++ if (server_name) { ++ append_mem_block(p, server_name, strlen(server_name)); ++ } else { ++ append_mem_block(p, UA_NAME, UA_NAME_LEN); ++ } ++ append_mem_block(p, CRLF, CRLF_LEN); + } + /* Content Length, EoM */ + append_mem_block(p, CONTENT_LENGTH "0" CRLF CRLF , +@@ -397,7 +403,7 @@ + *len += CSEQ_LEN + cseq.len + 1 + method->len + CRLF_LEN; /* CSeq */ + *len += calculate_routeset_length(dialog); /* Route set */ + *len += (body ? (CONTENT_LENGTH_LEN + content_length.len + CRLF_LEN) : 0); /* Content-Length */ +- *len += (server_signature ? (USER_AGENT_LEN + CRLF_LEN) : 0); /* Signature */ ++ *len += (server_signature ? (USER_AGENT_LEN + CRLF_LEN + (server_name ? strlen(server_name) : UA_NAME_LEN)) : 0);/* Signature */ + *len += (headers ? headers->len : 0); /* Additional headers */ + *len += (body ? body->len : 0); /* Message body */ + *len += CRLF_LEN; /* End of Header */ +@@ -426,7 +432,15 @@ + } + + /* Server signature */ +- if (server_signature) memapp(w, USER_AGENT CRLF, USER_AGENT_LEN + CRLF_LEN); ++ if (server_signature) { ++ memapp(w, USER_AGENT, USER_AGENT_LEN); ++ if (server_name) { ++ memapp(w, server_name, strlen(server_name)); ++ } else { ++ memapp(w, UA_NAME, UA_NAME_LEN); ++ } ++ memapp(w, CRLF, CRLF_LEN); ++ } + if (headers) memapp(w, headers->s, headers->len); + memapp(w, CRLF, CRLF_LEN); + if (body) memapp(w, body->s, body->len); |
