MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / _query_id_add_cols

Function _query_id_add_cols

modules/sqlops/sqlops_db.c:658–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658static inline str* _query_id_add_cols( db_key_t *_c, int _nc)
659{
660 int i;
661
662 for ( i=0 ; i<_nc ; i++) {
663 if (query_id_max_len-_query_id.len < _c[i]->len+2 /* both |^ */) {
664 _query_id.len = 0; // reset
665 LM_WARN("buffer too short (%d) for building the query ID for "
666 "prepare statement - consider increasing its value "
667 "via 'ps_id_max_buf_len' modparam\n", query_id_max_len);
668 return NULL;
669 }
670 memcpy( _query_id.s + _query_id.len, _c[i]->s, _c[i]->len);
671 _query_id.len += _c[i]->len;
672 *(_query_id.s + _query_id.len++) = '|';
673 }
674 *(_query_id.s + _query_id.len++) = '^';
675
676 return &_query_id;
677}
678
679static inline str* _query_id_add_filter(db_key_t* _k, db_op_t* _o, int _nk)
680{

Callers 1

sql_api_selectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected