Merge pull request #1529 from ZoneMinder/fix_1526

connect needs a +1
This commit is contained in:
Andrew Bauer 2016-06-24 09:53:46 -05:00 committed by GitHub
commit 97baf4ecd3
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ bool Event::OpenFrameSocket( int monitor_id )
strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) );
addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
if ( connect( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)) < 0 ) if ( connect( sd, (struct sockaddr *)&addr, strlen(addr.sun_path)+sizeof(addr.sun_family)+1) < 0 )
{ {
Warning( "Can't connect to frame server: %s", strerror(errno) ); Warning( "Can't connect to frame server: %s", strerror(errno) );
close( sd ); close( sd );