Hi,
When I run a *long* sql query in openser.cfg using avp_db_query, I am getting the following error:
May 26 02:52:15 [13784] ERROR:core:pv_printf: no more space for text [584] May 26 02:52:15 [13784] ERROR:core:pv_printf: buffer overflow -- increase the buffer size... May 26 02:52:15 [13784] ERROR:avpops:ops_dbquery_avps: cannot print the query
How can I increase the buffer size?
Thanks in advance for your help.
Regards, Pete
Hey Pete,
Check out modules/avpops_impl.c:
int ops_dbquery_avps(struct sip_msg* msg, pv_elem_t* query, pvname_list_t* dest) { int printbuf_len;
if(msg==NULL || query==NULL) { LM_ERR("bad parameters\n"); return -1; }
printbuf_len = AVP_PRINTBUF_SIZE-1; if(pv_printf(msg, query, printbuf, &printbuf_len)<0 || printbuf_len<=0) { LM_ERR("cannot print the query\n"); return -1; }
LM_DBG("query [%s]\n", printbuf);
if(db_query_avp(msg, printbuf, dest)!=0) return -1; return 1; }
Among other things, these various functions are called with a buffer size as the last argument.
printbuf_len = AVP_PRINTBUF_SIZE-1;
It's defined at the top of the file as a preprocessor macro:
#define AVP_PRINTBUF_SIZE 1024
-- Alex
Pete Kay wrote:
Hi,
When I run a *long* sql query in openser.cfg using avp_db_query, I am getting the following error:
May 26 02:52:15 [13784] ERROR:core:pv_printf: no more space for text [584] May 26 02:52:15 [13784] ERROR:core:pv_printf: buffer overflow -- increase the buffer size... May 26 02:52:15 [13784] ERROR:avpops:ops_dbquery_avps: cannot print the query
How can I increase the buffer size?
Thanks in advance for your help.
Regards, Pete
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users