Re: [patch] SIGUSR1 increments max_send on fakesmsc

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi,

why not use interactive mode instead?

Alex

On 11.09.2012, at 18:28, Rudy Matela <[email protected]> wrote:

> 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
> <fakesmsc-sigusr1-increments-max_send.patch>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.