[SR-Users] Fwd: Re: memcached module problems
Henning Westerholt
hw at kamailio.org
Tue Mar 12 15:06:41 CET 2013
---------- Forwarded Message ----------
Subject: Re: memcached module problems
Date: Dienstag, 12. März 2013, 14:50:41
From: Dragos Oancea <droancea at yahoo.com>
To: Bis: Henning Westerholt <henning.westerholt at 1und1.de>
Thank you Henning, that was a good hint.
I've noticed that kamailio and my perl script (which is
using Cache::Memcached) set the value in memcached somehow differently.
kamailio:
set 888_HA1 1 10800 32.
6fa22552ea04d443ab5864a7b3c2168c.
perl script:
set 888_HA1 0 0 32.
6fa22552ea04d443ab5864a7b3c2168c.
VAR_VAL_STR is 1.
I will investigate further.
Regards,
Dragos
ps: I will also subscribe to sr-users .
From: Henning Westerholt <henning.westerholt at 1und1.de>
To: Dragos Oancea <droancea at yahoo.com>
Cc: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
Sent: Tuesday, March 12, 2013 9:35 AM
Subject: RE: memcached module problems
Hi Dragos,
(setting sr-users to CC)
Ok, If you’ve set this by other means you need to set the appropriate
“Kamailio” type flag to the value as well, that Kamailio can parse it
correctly. You can get the appropriate value if you grep for “VAR_VAL_STR” in
the source code.
Your perl script function call should also export the appropriate flag setting
from the memcache library function call, then just add it here.
Best regards,
Henning
From: Dragos Oancea [mailto:droancea at yahoo.com]
Sent: Monday, March 11, 2013 8:24 PM
To: Henning Westerholt
Subject: Re: memcached and other things
Hi Henning,
Other means. a perl script.
Dragos
> 0(21130) DEBUG: memcached [mcd_var.c:87]: allocate new memcache request at
> 0x7f747fb798f0
> 0(21130) DEBUG: memcached [mcd_var.c:93]: allocate new
> memcache result at 0x7f747fb79a70 0(21130)
> DEBUG: memcached [mcd_var.c:103]: result: 'just_A_text' for key 888_HA1 with
> flag 0
> 0(21130) ERROR: memcached [mcd_var.c:146]: could not convert string
> 'just_A_text' to integer value
> 0(21130) DEBUG: memcached [mcd_var.c:159]: free memcache request and result
> at 0x7f747fb798f0
The issue is that the module somehow does not evaluate the string variable
_from memcached_ as a string, it tries to evaluate it as integer. This
obviously fails.
Has this value set from kamailio or is this from some external application?
Then probably this application does not set the proper flags which kamailio
expects.
Regards,
Henning Westerholt
-------------------------------------------------------------
More information about the sr-users
mailing list