Module: kamailio Branch: master Commit: de65e91dc69d41277d2ba9459f0f82bcf80a01f5 URL: https://github.com/kamailio/kamailio/commit/de65e91dc69d41277d2ba9459f0f82bc...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-11-06T22:49:53+01:00
pv: pv_var_to_xavp() - proper test for type int of script var
---
Modified: modules/pv/pv_svar.h Modified: modules/pv/pv_xavp.c
---
Diff: https://github.com/kamailio/kamailio/commit/de65e91dc69d41277d2ba9459f0f82bc... Patch: https://github.com/kamailio/kamailio/commit/de65e91dc69d41277d2ba9459f0f82bc...
---
diff --git a/modules/pv/pv_svar.h b/modules/pv/pv_svar.h index c955e06..f31839f 100644 --- a/modules/pv/pv_svar.h +++ b/modules/pv/pv_svar.h @@ -13,8 +13,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ diff --git a/modules/pv/pv_xavp.c b/modules/pv/pv_xavp.c index e4e94f3..28bb06e 100644 --- a/modules/pv/pv_xavp.c +++ b/modules/pv/pv_xavp.c @@ -634,7 +634,7 @@ int pv_var_to_xavp(str *varname, str *xname) if(varname->len==1 && varname->s[0] == '*') { for(it=get_var_all(); it; it=it->next) { memset(&xval, 0, sizeof(sr_xval_t)); - if(it->v.flags&VAR_VAL_INT) + if(it->v.flags==VAR_VAL_INT) { xval.type = SR_XTYPE_INT; xval.v.i = it->v.value.n; @@ -658,7 +658,7 @@ int pv_var_to_xavp(str *varname, str *xname) return -1; } memset(&xval, 0, sizeof(sr_xval_t)); - if(it->v.flags&VAR_VAL_INT) + if(it->v.flags==VAR_VAL_INT) { xval.type = SR_XTYPE_INT; xval.v.i = it->v.value.n;