SMS Server Tools 3
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. The forum is currently read-only, but will open soon. Thu Nov 21, 2024 21:10
SMSTools3 Community » Help and support Bottom

Customizing the "limit reached" warning message

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Jul 2013
Location: United States of America
Hello.

Is there a way to customize the "Limit reached" warning SMS to include the date that limit was reached?
I am asking because I have an hourly limit but today I received many "warning" SMS messages one after another, I am not sure if it was a bug or they were just previous messages that could not reach me while my phone was off.

It was useful to include date: "Message limit 100 was reached at 14:30 21 Aug".

Let me know.
Thank you.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
There is no setting for that. It can be done by modifying the source code.

Member
Registered:
Jul 2013
Location: United States of America
Topic owner
Thanks. Do you think it is useful enough to be added on a future update?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
This probably could be included in the next version, but currently next version is not coming soon.

If you want to modify the source, and recompile, this could be the change:

In the file smsd.c:
        message_count++;
        continuous_sent++;

        if (DEVICE.message_limit > 0 &&
            message_count == DEVICE.message_limit)
        {
          char msg[MAXTEXT];
          char timestamp[81]; //new

          writelogfile0(LOG_WARNING, 0, tb_sprintf("Message limit %i is reached.", DEVICE.message_limit));
          alarm_handler0(LOG_WARNING, tb);

          make_datetime_string(timestamp, sizeof(timestamp), 0, 0, 0); //new

          //line changed
          //sprintf(msg, "Smsd3: %s: Message limit %i is reached.", process_title, DEVICE.message_limit);
          sprintf(msg, "Smsd3: %s: Message limit %i is reached at %s.", process_title, DEVICE.message_limit, timestamp);

          send_admin_message(&quick, &errorcounter, msg);
        }
 
'c' Syntax Highlight powered by GeSHi


Note: I have not tested this change, I'm unable to compile right now...

Member
Registered:
Jul 2013
Location: United States of America
Topic owner
Thanks.

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.