Merge commit 'origin/andrei/type_conversion'
[sip-router] / rvalue.c
index 55456a1..b874ced 100644 (file)
--- a/rvalue.c
+++ b/rvalue.c
@@ -773,8 +773,8 @@ int rval_get_int(struct run_act_ctx* h, struct sip_msg* msg,
                        break;
                case RV_ACTION_ST:
                        if (rv->v.action)
-                               *i=run_actions(h, rv->v.action, msg);
-                       else 
+                               *i=(run_actions(h, rv->v.action, msg)>0);
+                       else
                                *i=0;
                        break;
                case RV_SEL:
@@ -914,8 +914,8 @@ int rval_get_tmp_str(struct run_act_ctx* h, struct sip_msg* msg,
                        break;
                case RV_ACTION_ST:
                        if (rv->v.action)
-                               i=run_actions(h, rv->v.action, msg);
-                       else 
+                               i=(run_actions(h, rv->v.action, msg)>0);
+                       else
                                i=0;
                        tmpv->s=int2str(i, &tmpv->len);
                        break;