Skip to content

Commit

Permalink
fill the field 'len' even if data is of type DB_STRING so that it can…
Browse files Browse the repository at this point in the history
… be used as DB_STR when needed
  • Loading branch information
Minh Phan committed Aug 27, 2015
1 parent 5207f9d commit c0f4d0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/db_postgres/val.c
Expand Up @@ -123,6 +123,7 @@ int db_postgres_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const
case DB_STRING:
LM_DBG("converting STRING [%s]\n", _s);
VAL_STRING(_v) = _s;
VAL_STR(_v).len = _l; // Set the len field so that DB_STRING type could be used as DB_STR type when needed
VAL_TYPE(_v) = DB_STRING;
VAL_FREE(_v) = 1;
return 0;
Expand Down

0 comments on commit c0f4d0d

Please sign in to comment.