diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-08-16 17:01:14 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-08-16 17:01:14 +0000 |
| commit | 82d12261a063a85b36011c6dd0fa32e8232ef3b9 (patch) | |
| tree | cb6831d8ec21ccca6a28d5c4375f3a696bb274e4 /src/ui | |
| parent | c9735a611f5f50cb4ae342b6235a10c9a88579ce (diff) | |
| download | qmmp-82d12261a063a85b36011c6dd0fa32e8232ef3b9.tar.gz qmmp-82d12261a063a85b36011c6dd0fa32e8232ef3b9.tar.bz2 qmmp-82d12261a063a85b36011c6dd0fa32e8232ef3b9.zip | |
fixed problem with UDS again (patch by SimaMoto,RyoTa) (Closes issue 344)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1831 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/unixdomainsocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/unixdomainsocket.cpp b/src/ui/unixdomainsocket.cpp index 6680c457b..acb42c772 100644 --- a/src/ui/unixdomainsocket.cpp +++ b/src/ui/unixdomainsocket.cpp @@ -61,7 +61,7 @@ bool UnixDomainSocket::alive(const QString& path) bzero(&server,sizeof(server)); server.sun_family = AF_UNIX; strcpy(server.sun_path,path.toLocal8Bit().data()); - len = strlen(server.sun_path) + sizeof(server.sun_family); + len = strlen(server.sun_path) + sizeof(server.sun_family) + 1; if (::connect(_s, (struct sockaddr *)&server, len) == -1) { @@ -79,7 +79,7 @@ void UnixDomainSocket::writeDatagram(const char* command,const QString& path) server.sun_family = AF_UNIX; strcpy(server.sun_path,path.toLocal8Bit().data()); - len = strlen(server.sun_path) + sizeof(server.sun_family); + len = strlen(server.sun_path) + sizeof(server.sun_family) + 1; sendto(_s,command,strlen(command),0,(struct sockaddr*)&server,len); } |
