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:
parent
5b66434516
commit
347ff2ed7f
|
@ -489,8 +489,10 @@ static VALUE lorcon_device_write(int argc, VALUE *argv, VALUE self) {
|
||||||
|
|
||||||
for (; cnt > 0; cnt--) {
|
for (; cnt > 0; cnt--) {
|
||||||
ret = tx80211_txpacket(&rld->in_tx, &rld->in_packet);
|
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));
|
return(INT2NUM(ret));
|
||||||
|
}
|
||||||
if (dly > 0)
|
if (dly > 0)
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
Sleep(dly);
|
Sleep(dly);
|
||||||
|
|
Loading…
Reference in New Issue