Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

msg_accept_encoding_t* msg_accept_encoding_copy ( su_home_t home,
msg_accept_encoding_t const *  header 

Copy an msg_accept_encoding_t header structure.

The function msg_accept_encoding_copy() copies a header structure header. If the header structure header contains a reference (header->h_next) to a list of headers, all the headers in that list are copied, too. The function uses given memory home to allocate all the memory areas used to copy the header structure header.

home memory home used to allocate new structure
header pointer to the header structure to be duplicated
When copying, only the header structure and parameter lists attached to it are duplicated. The new header structure retains all the references to the strings within the old header, including the encoding of the old header, if present.

   accept_encoding = msg_accept_encoding_copy(home, msg->msg_accept_encoding);
The function msg_accept_encoding_copy() returns a pointer to newly copied header structure, or NULL upon an error.

Generated by  Doxygen 1.6.0   Back to index