From 472973e97537a7bdad6c1255a27e7af52e0c0fad Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 12 Jun 2016 15:45:24 -0400 Subject: [PATCH] connect needs a +1 --- src/zm_event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 50028ffa6..f984421dc 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -272,7 +272,7 @@ bool Event::OpenFrameSocket( int monitor_id ) strncpy( addr.sun_path, sock_path, sizeof(addr.sun_path) ); 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) ); close( sd );