Hello,

Don't know if this patch is elegible for the trunk of kannel. But it
was useful for me. I wanted a way to keep sending random messages
using fakesmsc even when the limit was hit:

I've patched it to treat the SIGUSR1 signal as a increment command to
the max_send variable.

This way you can do:

$ ./test/fakesmsc -m 0 "100 200 text blah"
2012-09-11 13:22:17 [21787] [0] INFO: Debug_lvl = -1, log_file =
<none>, log_lvl = 0
2012-09-11 13:22:17 [21787] [0] INFO: Host localhost Port 10000
interval 1.000 max-messages 0
2012-09-11 13:22:17 [21787] [0] INFO: fakesmsc starting
2012-09-11 13:22:17 [21787] [0] DEBUG: Connecting to <127.0.0.1>

An on other terminal:

$ kill -s SIGUSR1 21787

Then on the terminal with fakesmsc appears:

2012-09-11 13:22:26 [21787] [0] INFO: fakesmsc: sent message 1



And you can tell fakesmsc to send random messages when you want and
not on a fixed interval.


In other words,

This patch makes fakesmsc interpret the SIGUSR1 signal as a command to
send another message after the cap is hit.


Regards,
Rudy

Attachment: fakesmsc-sigusr1-increments-max_send.patch
Description: Binary data

Reply via email to