mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-17 16:11:12 +02:00
2021-06-02 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compile warnings in 'lib/rdconfig.cpp'. * Cleaned up compile warnings in 'lib/rddelete.cpp'. * Cleaned up compile warnings in 'lib/rdmblookup.cpp'. * Cleaned up compile warnings in 'lib/rdtempdirectory.cpp'. * Cleaned up compile warnings in 'lib/rdunixserver.cpp'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// UNIX Socket Server
|
||||
//
|
||||
// (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2018-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -84,7 +84,7 @@ bool RDUnixServer::listenToPathname(const QString &pathname)
|
||||
}
|
||||
memset(&sa,0,sizeof(sa));
|
||||
sa.sun_family=AF_UNIX;
|
||||
strncpy(sa.sun_path,pathname.toUtf8(),UNIX_PATH_MAX);
|
||||
strncpy(sa.sun_path,pathname.toUtf8(),UNIX_PATH_MAX-1);
|
||||
if(bind(unix_socket,(struct sockaddr *)(&sa),sizeof(sa))<0) {
|
||||
unix_error_string=QString("unable to bind address")+" ["+
|
||||
QString(strerror(errno))+"]";
|
||||
@@ -115,7 +115,7 @@ bool RDUnixServer::listenToAbstract(const QString &addr)
|
||||
}
|
||||
memset(&sa,0,sizeof(sa));
|
||||
sa.sun_family=AF_UNIX;
|
||||
strncpy(sa.sun_path+1,addr.toUtf8(),UNIX_PATH_MAX-1);
|
||||
strncpy(sa.sun_path+1,addr.toUtf8(),UNIX_PATH_MAX-2);
|
||||
if(bind(unix_socket,(struct sockaddr *)(&sa),sizeof(sa))<0) {
|
||||
unix_error_string=QString("unable to bind address")+" ["+
|
||||
QString(strerror(errno))+"]";
|
||||
|
Reference in New Issue
Block a user