parse_disposition.c File Reference

Parse disposition header field. More...

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include "../mem/mem.h"
#include "../dprint.h"
#include "../ut.h"
#include "parse_disposition.h"

Include dependency graph for parse_disposition.c:

Go to the source code of this file.

Functions

void free_disposition (struct disposition **disp)
int parse_content_disposition (struct sip_msg *msg)
int parse_disposition (str *s, struct disposition *disp)
void print_disposition (struct disposition *disp)


Detailed Description

Parse disposition header field.

Definition in file parse_disposition.c.


Function Documentation

void free_disposition ( struct disposition **  disp  ) 

Frees the entire disposition structure (params + itself)

Definition at line 338 of file parse_disposition.c.

References disposition_param::next, and pkg_free.

Referenced by clean_hdr_field(), and parse_content_disposition().

int parse_content_disposition ( struct sip_msg msg  ) 

looks inside the message, gets the Content-Disposition hdr, parse it, builds and fills a disposition structure for it what will be attached to hdr as parsed link.

Returns:
-1 on error, 0 on success, 1 when hdr not found

Definition at line 359 of file parse_disposition.c.

References hdr_field::body, sip_msg::content_disposition, free_disposition(), HDR_CONTENTDISPOSITION_F, LM_DBG, LM_ERR, parse_disposition(), parse_headers(), hdr_field::parsed, and pkg_malloc.

Referenced by cpl_process_register().

int parse_disposition ( str s,
struct disposition disp 
)

parse a string that supposed to be a disposition and fills up the structure Returns: -1 : error o : success

Definition at line 45 of file parse_disposition.c.

References disposition_param::body, F_CR, F_CRLF, F_LF, disposition_param::is_quoted, _str::len, LM_ERR, disposition_param::name, disposition_param::next, disposition::params, pkg_malloc, _str::s, disposition::type, and ZSW.

Referenced by parse_content_disposition().

void print_disposition ( struct disposition disp  ) 


Generated on Thu May 24 00:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6