<p>This is the output:</p>
<pre><code>(gdb) frame 4
#4  0x00007ff057a4d6ac in redisc_exec (srv=0x7ffd7df680d0, res=0x7ffd7df680f0, cmd=0x7ffd7df680e0) at redis_client.c:402
402     redis_client.c: No such file or directory.
(gdb) list
397     in redis_client.c
(gdb) p cmd
$1 = (str *) 0x7ffd7df680e0
(gdb) p *cmd
$2 = {s = 0x7ff05d2a00a0 "SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de 21600 \n%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\022\n1234567e16\032\n4912345678\"%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de", len = 167}
(gdb) p cmd->s
$3 = 0x7ff05d2a00a0 "SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de 21600 \n%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\022\n1234567e16\032\n4912345678\"%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de"
</code></pre>
<p>This is how we call <code>redis_cmd</code>:</p>
<pre><code>   if ($vn(variable1) == "ADD" && $vn(variable2) != $null) {
           if (!redis_cmd("liRedis", "SETEX ACTIVECHANNELS_$ci 21600 $vn(variable2)", "r")) {
                   xlog("L_ERR", "redis SET of ACTIVECHANNELS_$ci failed");
           }
           redis_free("r");
   } else {
           if (!redis_cmd("liRedis", "DEL ACTIVECHANNELS_$ci", "r")) {
                   xlog("L_ERR", "redis DEL of ACTIVECHANNELS_$ci failed");
           }
           redis_free("r");
   }
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1342#issuecomment-347794449">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZZiaPGASCGyBoPXihYVzpUYJwAtnks5s7RzPgaJpZM4Quk9l">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZaQgMykeN3ZJwzVzpdkL_Dd8n05sks5s7RzPgaJpZM4Quk9l.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1342#issuecomment-347794449"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@SipSeb in #1342: This is the output:\r\n\r\n```\r\n(gdb) frame 4\r\n#4  0x00007ff057a4d6ac in redisc_exec (srv=0x7ffd7df680d0, res=0x7ffd7df680f0, cmd=0x7ffd7df680e0) at redis_client.c:402\r\n402\tredis_client.c: No such file or directory.\r\n(gdb) list\r\n397\tin redis_client.c\r\n(gdb) p cmd\r\n$1 = (str *) 0x7ffd7df680e0\r\n(gdb) p *cmd\r\n$2 = {s = 0x7ff05d2a00a0 \"SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de 21600 \\n%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\\022\\n1234567e16\\032\\n4912345678\\\"%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\", len = 167}\r\n(gdb) p cmd-\u003es\r\n$3 = 0x7ff05d2a00a0 \"SETEX ACTIVECHANNELS_swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de 21600 \\n%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\\022\\n1234567e16\\032\\n4912345678\\\"%swp3pvm7jqpnu6ixphj1jc7c24@sipgate.de\"\r\n```\r\n\r\nThis is how we call `redis_cmd`:\r\n```\r\n   if ($vn(variable1) == \"ADD\" \u0026\u0026 $vn(variable2) != $null) {\r\n           if (!redis_cmd(\"liRedis\", \"SETEX ACTIVECHANNELS_$ci 21600 $vn(variable2)\", \"r\")) {\r\n                   xlog(\"L_ERR\", \"redis SET of ACTIVECHANNELS_$ci failed\");\r\n           }\r\n           redis_free(\"r\");\r\n   } else {\r\n           if (!redis_cmd(\"liRedis\", \"DEL ACTIVECHANNELS_$ci\", \"r\")) {\r\n                   xlog(\"L_ERR\", \"redis DEL of ACTIVECHANNELS_$ci failed\");\r\n           }\r\n           redis_free(\"r\");\r\n   }\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1342#issuecomment-347794449"}}}</script>