$Id$ More...
#include "mcd_var.h"#include "memcached.h"#include "../../ut.h"#include "../../mem/mem.h"#include "../pv/pv_svar.h"#include "../../md5utils.h"
Go to the source code of this file.
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.c.
| int pv_dec_mcd_value | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| int | op, | |||
| pv_value_t * | val | |||
| ) | [inline] |
| msg | SIP message | |
| param | parameter | |
| op | not used | |
| val | value |
Definition at line 290 of file mcd_var.c.
References pv_mcd_atomic_helper().

| int pv_get_mcd_value | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| pv_value_t * | res | |||
| ) |
| msg | SIP message | |
| param | parameter | |
| res | result |
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.

| static int pv_get_mcd_value_helper | ( | struct sip_msg * | msg, | |
| str * | key, | |||
| struct memcache_req ** | mcd_req, | |||
| struct memcache_res ** | mcd_res | |||
| ) | [static] |
| msg | SIP message | |
| key | value key | |
| mcd_req | request | |
| mcd_res | result |
Definition at line 79 of file mcd_var.c.
References _str::len, memcached_h, and _str::s.
Referenced by pv_get_mcd_value(), pv_mcd_atomic_helper(), and pv_set_mcd_expire().

| int pv_inc_mcd_value | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| int | op, | |||
| pv_value_t * | val | |||
| ) | [inline] |
| msg | SIP message | |
| param | parameter | |
| op | not used | |
| val | value |
Definition at line 277 of file mcd_var.c.
References pv_mcd_atomic_helper().

| static int pv_mcd_atomic_helper | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| int | op, | |||
| pv_value_t * | val, | |||
| unsigned int(*)(struct memcache *mc, char *key, const size_t key_len, const unsigned int val) | atomic_ops | |||
| ) | [static] |
| msg | SIP message | |
| param | parameter | |
| op | not used | |
| val | value | |
| atomic_ops | function pointer to the atomic operation from the memcache library |
Definition at line 229 of file mcd_var.c.
References _str::len, memcached_h, pv_get_mcd_value_helper(), pv_mcd_key_check(), and _str::s.
Referenced by pv_dec_mcd_value(), and pv_inc_mcd_value().


| static int pv_mcd_key_check | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| str * | out | |||
| ) | [inline, static] |
| msg | SIP message | |
| param | pseudo-variable input parameter | |
| out | output string |
Definition at line 43 of file mcd_var.c.
References hash(), _str::len, MD5StringArray(), and _str::s.
Referenced by pv_get_mcd_value(), pv_mcd_atomic_helper(), pv_set_mcd_expire(), and pv_set_mcd_value().


| int pv_parse_mcd_name | ( | pv_spec_p | sp, | |
| str * | in | |||
| ) |
| int pv_set_mcd_expire | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| int | op, | |||
| pv_value_t * | val | |||
| ) |
| msg | SIP message | |
| param | parameter | |
| op | not used | |
| val | value |
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.

| int pv_set_mcd_value | ( | struct sip_msg * | msg, | |
| pv_param_t * | param, | |||
| int | op, | |||
| pv_value_t * | val | |||
| ) |
Here the provided replace function should be used.
| msg | SIP message | |
| param | parameter | |
| op | not used | |
| val | value |
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.

1.7.1