Re: [patch] SIGUSR1 increments max_send on fakesmsc

2012-09-27 Thread Rudy Matela
Hello Alex,

That patch was used more for my personal needs. I was running several
fakesmscs (on the same terminal), and I wanted an easy way to dispatch
messages in any of them. That behavior can be simulated with
interactive mode anyway (by piping). This patch was just posted in
case it is useful to someone (I'm not really even using it).

I'm usually using interactive mode now.

Rudy

On Wed, Sep 26, 2012 at 6:12 AM, Alexander Malysh amal...@kannel.org wrote:
 Hi,

 why not use interactive mode instead?

 Alex

 On 11.09.2012, at 18:28, Rudy Matela r...@matela.com.br 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 1
 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




Re: [patch] SIGUSR1 increments max_send on fakesmsc

2012-09-26 Thread Alexander Malysh
Hi,

why not use interactive mode instead?

Alex

On 11.09.2012, at 18:28, Rudy Matela r...@matela.com.br 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 1
 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




[patch] SIGUSR1 increments max_send on fakesmsc

2012-09-11 Thread Rudy Matela
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 1
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
Description: Binary data