pv: pv_var_to_xavp() - proper test for type int of script var
authorDaniel-Constantin Mierla <miconda@gmail.com>
Sun, 6 Nov 2016 21:49:53 +0000 (22:49 +0100)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Sun, 6 Nov 2016 21:49:53 +0000 (22:49 +0100)
modules/pv/pv_svar.h
modules/pv/pv_xavp.c

index c955e06..f31839f 100644 (file)
@@ -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
  *
  */
index e4e94f3..28bb06e 100644 (file)
@@ -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;