diff options
author | Nicolas 'Pixel' Noble <pixel@nobis-crew.org> | 2013-01-20 21:52:18 -0800 |
---|---|---|
committer | Nicolas 'Pixel' Noble <pixel@nobis-crew.org> | 2013-01-20 21:52:18 -0800 |
commit | 2ea5084aad6039b499de85de248247bc0c73a84d (patch) | |
tree | 84d1c1d7081f9da50814d38919e9afbcb8da7bba /src | |
parent | 6767ebafaa23b620c3513ab4973cdc8c51ead325 (diff) |
How could that work in debug mode... ???
Diffstat (limited to 'src')
-rw-r--r-- | src/Input.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Input.cc b/src/Input.cc index 5fef78d..ae22109 100644 --- a/src/Input.cc +++ b/src/Input.cc @@ -81,9 +81,12 @@ void Balau::Input::open() throw (GeneralException) { Printer::elog(E_INPUT, "Opening file %s", m_fname.to_charp()); cbResults_t * cbResults; + if (!m_pendingOp) { m_pendingOp = cbResults = new cbResults_t; cbResults->type = cbResults_t::NONE; + } else { + cbResults = (cbResults_t *) m_pendingOp; } try { @@ -159,10 +162,14 @@ class AsyncOpClose : public Balau::AsyncOperation { void Balau::Input::close() throw (GeneralException) { if ((m_fd < 0) && !m_pendingOp) return; + cbResults_t * cbResults; + if (!m_pendingOp) { m_pendingOp = cbResults = new cbResults_t; cbResults->type = cbResults_t::NONE; + } else { + cbResults = (cbResults_t *) m_pendingOp; } try { @@ -226,9 +233,12 @@ ssize_t Balau::Input::read(void * buf, size_t count) throw (GeneralException) { ssize_t result; cbResults_t * cbResults; + if (!m_pendingOp) { m_pendingOp = cbResults = new cbResults_t; cbResults->type = cbResults_t::NONE; + } else { + cbResults = (cbResults_t *) m_pendingOp; } try { |