summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/dinetwork.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/emu/dinetwork.cpp
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/emu/dinetwork.cpp')
-rw-r--r--src/emu/dinetwork.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/emu/dinetwork.cpp b/src/emu/dinetwork.cpp
index db0544f3673..094d3476af1 100644
--- a/src/emu/dinetwork.cpp
+++ b/src/emu/dinetwork.cpp
@@ -24,13 +24,16 @@ void device_network_interface::interface_pre_start()
int device_network_interface::send(u8 *buf, int len) const
{
- if(!m_dev) return 0;
-
// TODO: enable this check when other devices implement delayed transmit
//assert_always(!m_send_timer->enabled(), "attempted to transmit while transmit already in progress");
- // send the data
- int result = m_dev->send(buf, len);
+ int result = 0;
+
+ if (m_dev)
+ {
+ // send the data
+ result = m_dev->send(buf, len);
+ }
// schedule transmit complete callback
m_send_timer->adjust(attotime::from_ticks(len, m_bandwidth * 1'000'000 / 8), result);