Module: sip-router
Branch: master
Commit: 13932b3a17620a4e9ac598ec43ad188aa2626f7e
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=13932b3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Nov 15 21:47:51 2010 +0100
sqlops: return $null pv if the value in result is null
---
modules_k/sqlops/sql_var.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules_k/sqlops/sql_var.c b/modules_k/sqlops/sql_var.c
index cc57e39..2cd4e1b 100644
--- a/modules_k/sqlops/sql_var.c
+++ b/modules_k/sqlops/sql_var.c
@@ -76,6 +76,8 @@ int pv_get_dbr(struct sip_msg *msg, pv_param_t *param,
return pv_get_null(msg, param, res);
if(col>=spv->res->ncols)
return pv_get_null(msg, param, res);
+ if(spv->res->vals[row][col].flags&PV_VAL_NULL)
+ return pv_get_null(msg, param, res);
if(spv->res->vals[row][col].flags&PV_VAL_INT)
return pv_get_sintval(msg, param, res,
spv->res->vals[row][col].value.n);