X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=common%2Fdevices%2Fdevice.c;fp=common%2Fdevices%2Fdevice.c;h=db6d768da2777ef5905c6e6e7ddca137016db7a3;hp=eb81b25d7fe3ae63e388ce25bf157224975e0892;hb=81b1712d54efa46b3148a5beb42d32d7632ef30c;hpb=28c1f486126d510c51033eea2385d61a11ebe789 diff --git a/common/devices/device.c b/common/devices/device.c index eb81b25..db6d768 100644 --- a/common/devices/device.c +++ b/common/devices/device.c @@ -157,18 +157,21 @@ static void device_dumpserial(void) } #endif /* DEBUG */ +static char SigHandler_buffer[255]; + static void SigHandler(int status) { - - unsigned char buffer[2048]; - int count, res; - res = device_read(buffer, 255); + LIVE_DISABLE; + LIVE; + + res = device_read(SigHandler_buffer, sizeof(SigHandler_buffer)); for (count = 0; count < res ; count ++) { - Protocol->StateMachine(buffer[count]); + Protocol->StateMachine(SigHandler_buffer[count]); } + LIVE_ENABLE; }