Skip to content

Commit

Permalink
usrloc: updated to use xavp long value field
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 22, 2022
1 parent 44c018d commit f80c9a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/modules/usrloc/ucontact.c
Expand Up @@ -1923,9 +1923,9 @@ int uldb_insert_attrs(str *_dname, str *_user, str *_domain,
if(xavp->val.type==SR_XTYPE_STR) {
vals[4].val.int_val = 0;
avalue = xavp->val.v.s;
} else if(xavp->val.type==SR_XTYPE_INT) {
} else if(xavp->val.type==SR_XTYPE_LONG) {
vals[4].val.int_val = 1;
avalue.s = sint2str((long)xavp->val.v.i, &avalue.len);
avalue.s = sint2str(xavp->val.v.l, &avalue.len);
} else {
continue;
}
Expand Down
12 changes: 6 additions & 6 deletions src/modules/usrloc/udomain.c
Expand Up @@ -784,9 +784,9 @@ urecord_t* db_load_urecord(db1_con_t* _c, udomain_t* _d, str *_aor)
aval.v.s = avalue;
aval.type = SR_XTYPE_STR;
} else if(VAL_INT(ROW_VALUES(row)+1)==1) {
/* int value */
str2sint(&avalue, &aval.v.i);
aval.type = SR_XTYPE_INT;
/* long int value */
str2slong(&avalue, &aval.v.l);
aval.type = SR_XTYPE_LONG;
} else {
/* unknown type - ignore */
continue;
Expand Down Expand Up @@ -1636,9 +1636,9 @@ int uldb_preload_attrs(udomain_t *_d)
aval.v.s = avalue;
aval.type = SR_XTYPE_STR;
} else if(VAL_INT(ROW_VALUES(row)+3)==1) {
/* int value */
str2sint(&avalue, &aval.v.i);
aval.type = SR_XTYPE_INT;
/* long int value */
str2slong(&avalue, &aval.v.l);
aval.type = SR_XTYPE_LONG;
} else {
/* unknown type - ignore */
continue;
Expand Down

0 comments on commit f80c9a0

Please sign in to comment.