<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
thanks for the contribution, the patch was applied to git master
branch.<br>
<br>
For the future, adding to the module readme has to be done by
updating the xml (docbook) files located in subfolder doc/ in
module's directory. Then run:<br>
<br>
make modules-readme modules=modules/ndb_redis<br>
<br>
the README file for the module will be generated from the xml files
by the command above.<br>
<br>
You need to install xsltproc and docbook xsl/dtd files (all packages
in common distros such as debian, ubuntu...).<br>
<br>
Cheers,<br>
Daniel<br>
<br>
On 4/10/12 9:57 PM, Vicente Hernando wrote:
<blockquote cite="mid:4F8490BA.4040601@systemonenoc.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello,<br>
<br>
former patch about adding array support to ndb redis module did
not follow kamailio coding style guidelines.<br>
<br>
This one except for some long lines follows coding style rules
right.<br>
<br>
Regards,<br>
Vicente.<br>
<br>
<br>
<br>
On 04/04/2012 01:22 PM, Vicente Hernando wrote:
<blockquote cite="mid:4F7C2EDB.7090200@systemonenoc.com"
type="cite">Hello, <br>
<br>
here comes attached a patch to add array support for ndb_redis
module. <br>
<br>
This patch is based on parts of sqlops module. <br>
<br>
it maintains old options: $redis->type and $redis->value,
but for arrays there are new options enabled. <br>
<br>
$redis->size - returns number of array elements. <br>
<br>
$redis->type[n] - returns type of nth array element. <br>
<br>
$redis->value[n] - returns value of nth array element. <br>
<br>
$redis->type - returns array type as in hiredis.h <br>
<br>
$redis->value - returns null for arrays. <br>
<br>
<br>
Regards, <br>
Vicente. <br>
<br>
PS: This is my first patch to the list. Any criticism is
welcome! <br>
<br>
<br>
On 03/30/2012 11:47 AM, Daniel-Constantin Mierla wrote: <br>
<blockquote type="cite">Hello, <br>
<br>
indeed redis connector is dealing string and integer values by
now. <br>
<br>
Extending it for dealing with arrays will be useful, proposed
variant looks good for me. If you are going to contribute a
patch, it will be accepted (and appreciated). <br>
<br>
Cheers, <br>
Daniel <br>
<br>
On 3/29/12 8:14 PM, Vicente Hernando wrote: <br>
<blockquote type="cite">Hello, <br>
<br>
I am studying the use case when a redis command returns an
array (REDIS_REPLY_ARRAY type in hiredis.h from <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/antirez/hiredis">https://github.com/antirez/hiredis</a>
) <br>
<br>
Function pv_get_redisc in
kamailio/modules/ndb_redis/ndb_redis_mod.c : 365 returns a
pv_value_t structure and currently only deals with
REDIS_REPLY_STRING <br>
and REDIS_REPLY_INTEGER cases. <br>
<br>
It seems looking at pvar.h that pv_value_t structure does
not deal with arrays. Is that correct? So returning an array
is not an option... <br>
<br>
Then a better aproach could be changing pv_parse_redisc_name
function: <br>
<br>
right now from README in ndb_redis: <br>
after executing redis_cmd("srvN", "SET foo bar", "r"); I
could get $redis(r->type) and $redis(r->value) <br>
<br>
it could be a good idea to add options like:
$redis(r->size) and $redis(r->value[Number])
when changing pv_parse_redisk_name function. <br>
<br>
<br>
Do you think of that as a good approach? <br>
<br>
<br>
Thanks in advance! <br>
Vicente. <br>
<br>
<br>
_______________________________________________ <br>
sr-dev mailing list <br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
<br>
</blockquote>
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
sr-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
</body>
</html>