summaryrefslogtreecommitdiff
path: root/blasms.c
diff options
context:
space:
mode:
Diffstat (limited to 'blasms.c')
-rw-r--r--blasms.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/blasms.c b/blasms.c
index 05539f4..08abcac 100644
--- a/blasms.c
+++ b/blasms.c
@@ -214,6 +214,8 @@ int main(int argc, char *argv[]) {
char sms[500];
/* SMS command */
char smscommand[11];
+ /* SMS command in lowercase */
+ char smscommandlower[11];
/* Command to execute */
char systemcmd[1000];
/* Dynamic systemcmd for wildcard matches */
@@ -230,6 +232,8 @@ int main(int argc, char *argv[]) {
char line[1024];
/* Config file command */
char configcmd[11];
+ /* Config file command in lowercase */
+ char configcmdlower[11];
/* strchr pointer */
char *strchrp;
/* Command match / telnum set */
@@ -341,8 +345,11 @@ int main(int argc, char *argv[]) {
/* If it does end here, copy it to smscommand */
strxfrm(smscommand, sms, offset);
smscommand[offset] = '\0';
+ /* Convert commands to lowercase for comparison */
+ strtolower(smscommandlower, smscommand);
+ strtolower(configcmdlower, configcmd);
/* If the commands are the same, stop reading the file */
- if (!strcmp(smscommand, configcmd)) {
+ if (!strcmp(smscommandlower, configcmdlower)) {
match = 1;
break;
}