1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-12 11:52:01 +01:00

Raise a runtime error if the transmit fails

git-svn-id: file:///home/svn/framework3/trunk@5141 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2007-10-09 04:12:13 +00:00
parent 5b66434516
commit 347ff2ed7f

View File

@ -489,8 +489,10 @@ static VALUE lorcon_device_write(int argc, VALUE *argv, VALUE self) {
for (; cnt > 0; cnt--) {
ret = tx80211_txpacket(&rld->in_tx, &rld->in_packet);
if (ret < 0)
if (ret < 0) {
rb_raise(rb_eRuntimeError, "Lorcon could not transmit packet: %s", tx80211_geterrstr(&rld->in_tx));
return(INT2NUM(ret));
}
if (dly > 0)
#ifdef _MSC_VER
Sleep(dly);