[OpenSER-Devel] ERROR:core:pv_printf: buffer overflow (doing a long SQL query) [SOLVED]

Iñaki Baz Castillo ibc at in.ilimit.es
Tue Jan 8 08:20:22 UTC 2008


On Monday 07 January 2008 18:06:41 Iñaki Baz Castillo wrote:
> On Monday 07 January 2008 17:30:23 Bogdan-Andrei Iancu wrote:
> > Hi Iñaki,
> >
> > You need to increase PV_PRINT_BUF_SIZE which is the size of the buffer
> > used for printing the end result. PV_PRINT_BUF_NO  is the number of
> > buffers to be used in case of nested calls, but it is not your case.
>
> Thanks Bogdan, but Ive increased it (from 1024 to 4096):
>   #define PV_PRINT_BUF_SIZE  4096
> and the problem still occurs in exactly the same way:
>
> ----------------------------
> Jan  7 18:08:13 [31284] ERROR:core:pv_printf: no more space for text [34]
> Jan  7 18:08:13 [31284] ERROR:core:pv_printf: buffer overflow -- increase
> the buffer size...
> Jan  7 18:08:13 [31284] ERROR:avpops:ops_dbquery_avps: cannot print the
> query -----------------------------
>
> Should I do anyhting else?

> Really thanks a lot for any help.

I've found the solution. Because I have to increase more #defines (for example 
from 1024 to 2048):

- pvar.c => #define PV_PRINT_BUF_SIZE 2048
- modules/avpops/avpops_impl.c:#define AVP_PRINTBUF_SIZE 2048
- modules/avpops/avpops_impl.c:#define STR_BUF_SIZE 2048

Probably I don't need all those three #defines to be increased, but "make deb" 
takes so long... XD 



-- 
Iñaki Baz Castillo
ibc at in.ilimit.es



More information about the Devel mailing list