#include "frontends/Application.h"
#include "support/environment.h"
+#include "support/filename.h"
#include "support/lyxlib.h"
#include "support/socktools.h"
// Needed by lyxclient
support::setEnv("LYXSOCKET", address_);
- theApp->registerSocketCallback(
+ theApp()->registerSocketCallback(
fd_,
boost::bind(&LyXServerSocket::serverCallback, this)
);
LyXServerSocket::~LyXServerSocket()
{
if (fd_ != -1) {
- theApp->unregisterSocketCallback(fd_);
+ BOOST_ASSERT (theApp());
+ theApp()->unregisterSocketCallback(fd_);
if (::close(fd_) != 0)
lyxerr << "lyx: Server socket " << fd_
<< " IO error on closing: " << strerror(errno);
}
- support::unlink(address_);
+ support::unlink(support::FileName(address_));
lyxerr[Debug::LYXSERVER] << "lyx: Server socket quitting" << endl;
}
// Register the new client.
clients[client_fd] =
shared_ptr<LyXDataSocket>(new LyXDataSocket(client_fd));
- theApp->registerSocketCallback(
+ theApp()->registerSocketCallback(
client_fd,
boost::bind(&LyXServerSocket::dataCallback,
this, client_fd)
lyxerr << "lyx: Data socket " << fd_
<< " IO error on closing: " << strerror(errno);
- theApp->unregisterSocketCallback(fd_);
+ theApp()->unregisterSocketCallback(fd_);
lyxerr[Debug::LYXSERVER] << "lyx: Data socket " << fd_ << " quitting."
<< endl;
}