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

http_user_agent_t* http_user_agent_copy ( su_home_t home,
http_user_agent_t const *  hdr 

Copy a http_user_agent_t header structure.

The function http_user_agent_copy() copies a header structure hdr. If the header structure hdr contains a reference (hdr->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 hdr.

home memory home used to allocate new structure
hdr 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.

   user_agent = http_user_agent_copy(home, http->http_user_agent);
The function http_user_agent_copy() returns a pointer to newly copied header structure, or NULL upon an error.

Generated by  Doxygen 1.6.0   Back to index