Increased buffer size to BUFSIZ
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@677 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
cae42a9a42
commit
e05d512d7d
|
@ -197,7 +197,7 @@ bool Event::WriteFrameImage( const Image *image, const char *event_file, bool al
|
||||||
|
|
||||||
void Event::AddFrames( int n_frames, struct timeval **timestamps, const Image **images )
|
void Event::AddFrames( int n_frames, struct timeval **timestamps, const Image **images )
|
||||||
{
|
{
|
||||||
static char sql[4096];
|
static char sql[BUFSIZ];
|
||||||
strcpy( sql, "insert into Frames ( EventId, FrameId, ImagePath, Delta ) values " );
|
strcpy( sql, "insert into Frames ( EventId, FrameId, ImagePath, Delta ) values " );
|
||||||
for ( int i = 0; i < n_frames; i++ )
|
for ( int i = 0; i < n_frames; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -151,7 +151,7 @@ int RemoteCamera::SendRequest()
|
||||||
int RemoteCamera::GetHeader( const char *content, const char *header, char *value )
|
int RemoteCamera::GetHeader( const char *content, const char *header, char *value )
|
||||||
{
|
{
|
||||||
//char *header_string = (char *)malloc( strlen(header)+8 );
|
//char *header_string = (char *)malloc( strlen(header)+8 );
|
||||||
static char header_string[4096];
|
static char header_string[BUFSIZ];
|
||||||
strcpy( header_string, header );
|
strcpy( header_string, header );
|
||||||
strcat( header_string, ":" );
|
strcat( header_string, ":" );
|
||||||
|
|
||||||
|
|
|
@ -350,7 +350,7 @@ int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
if ( function & QUERY )
|
if ( function & QUERY )
|
||||||
{
|
{
|
||||||
char vid_string[4096] = "";
|
char vid_string[BUFSIZ] = "";
|
||||||
bool ok = LocalCamera::GetCurrentSettings( dev_id, vid_string, verbose );
|
bool ok = LocalCamera::GetCurrentSettings( dev_id, vid_string, verbose );
|
||||||
printf( "%s", vid_string );
|
printf( "%s", vid_string );
|
||||||
exit( ok?0:-1 );
|
exit( ok?0:-1 );
|
||||||
|
|
Loading…
Reference in New Issue