Functions

mcd_var.h File Reference

$Id$ More...

#include "../../pvar.h"
Include dependency graph for mcd_var.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions


Detailed Description

Copyright (C) 2009 Henning Westerholt

This file is part of Kamailio, a free SIP server.

Kamailio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version

Kamailio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.

memcached module

Definition in file mcd_var.h.


Function Documentation

int pv_dec_mcd_value ( struct sip_msg msg,
pv_param_t *  param,
int  op,
pv_value_t *  val 
) [inline]
Parameters:
msg SIP message
param parameter
op not used
val value
Returns:
0 on success, -1 on failure

Definition at line 290 of file mcd_var.c.

References pv_mcd_atomic_helper().

Here is the call graph for this function:

int pv_get_mcd_value ( struct sip_msg msg,
pv_param_t *  param,
pv_value_t *  res 
)
Parameters:
msg SIP message
param parameter
res result
Returns:
null on success, negative on failure

Definition at line 115 of file mcd_var.c.

References _str::len, pkg_str_dup(), pv_get_mcd_value_helper(), pv_get_null(), pv_mcd_key_check(), and _str::s.

Here is the call graph for this function:

int pv_inc_mcd_value ( struct sip_msg msg,
pv_param_t *  param,
int  op,
pv_value_t *  val 
) [inline]
Parameters:
msg SIP message
param parameter
op not used
val value
Returns:
0 on success, -1 on failure

Definition at line 277 of file mcd_var.c.

References pv_mcd_atomic_helper().

Here is the call graph for this function:

int pv_parse_mcd_name ( pv_spec_p  sp,
str in 
)
Parameters:
sp pseudo-variable specification
in parameter string
Returns:
0 on success, -1 on failure

Definition at line 345 of file mcd_var.c.

References _str::len, and _str::s.

int pv_set_mcd_expire ( struct sip_msg msg,
pv_param_t *  param,
int  op,
pv_value_t *  val 
)
Note:
The memcache library don't provide functions to change the expiration time for a certain key after creation, so we need to do a get and set here.
Parameters:
msg SIP message
param parameter
op not used
val value
Returns:
0 on success, -1 on failure

Definition at line 305 of file mcd_var.c.

References _str::len, memcached_h, pv_get_mcd_value_helper(), pv_mcd_key_check(), and _str::s.

Here is the call graph for this function:

int pv_set_mcd_value ( struct sip_msg msg,
pv_param_t *  param,
int  op,
pv_value_t *  val 
)
Parameters:
msg SIP message
param parameter
op not used
val value
Returns:
0 on success, -1 on failure
Todo:
Replacement of already existing values is not done atomically at the moment.

Here the provided replace function should be used.

Parameters:
msg SIP message
param parameter
op not used
val value
Returns:
0 on success, -1 on failure

Definition at line 175 of file mcd_var.c.

References int2str(), _str::len, memcached_expire, memcached_h, memcached_mode, pv_mcd_key_check(), and _str::s.

Here is the call graph for this function: