Regards,
Simon
diff -Naur smstools3.orig/src/modeminit.c smstools3/src/modeminit.c
--- smstools3.orig/src/modeminit.c 2009-05-05 18:29:52.000000000 +0200
+++ smstools3/src/modeminit.c 2009-05-16 16:44:12.000000000 +0200
@@ -1267,6 +1267,7 @@
int retries = 0;
int registration_denied = 0;
static int registration_ok = 0;
+ char *p;
writelogfile(LOG_INFO, "Checking if Modem is registered to the network");
@@ -1284,7 +1285,6 @@
put_command(modem, device, "AT+CREG?\r", answer, sizeof(answer), 2, "(\\+CREG:.*OK)|(ERROR)");
// 3.1.1: Some modem include spaces in the response:
- char *p;
while ((p = strchr(answer, ' ')))
strcpy(p, p +1);
diff -Naur smstools3.orig/src/smsd_cfg.c smstools3/src/smsd_cfg.c
--- smstools3.orig/src/smsd_cfg.c 2009-05-11 18:06:35.000000000 +0200
+++ smstools3/src/smsd_cfg.c 2009-05-16 16:43:36.000000000 +0200
@@ -1317,6 +1317,7 @@
void parsearguments(int argc,char** argv)
{
int result;
+ int i;
strcpy(configfile,"/etc/smsd.conf");
printstatus=0;
arg_infofile[0] = 0;
@@ -1328,8 +1329,6 @@
communicate[0] = 0;
// 3.1.1: Start and stop options are provided by the script, not by the daemon:
- int i;
-
for (i = 1; i < argc; i++)
{
if (!strcasecmp(argv[i], "START") || !strcasecmp(argv[i], "STOP"))
--- smstools3.orig/src/modeminit.c 2009-05-05 18:29:52.000000000 +0200
+++ smstools3/src/modeminit.c 2009-05-16 16:44:12.000000000 +0200
@@ -1267,6 +1267,7 @@
int retries = 0;
int registration_denied = 0;
static int registration_ok = 0;
+ char *p;
writelogfile(LOG_INFO, "Checking if Modem is registered to the network");
@@ -1284,7 +1285,6 @@
put_command(modem, device, "AT+CREG?\r", answer, sizeof(answer), 2, "(\\+CREG:.*OK)|(ERROR)");
// 3.1.1: Some modem include spaces in the response:
- char *p;
while ((p = strchr(answer, ' ')))
strcpy(p, p +1);
diff -Naur smstools3.orig/src/smsd_cfg.c smstools3/src/smsd_cfg.c
--- smstools3.orig/src/smsd_cfg.c 2009-05-11 18:06:35.000000000 +0200
+++ smstools3/src/smsd_cfg.c 2009-05-16 16:43:36.000000000 +0200
@@ -1317,6 +1317,7 @@
void parsearguments(int argc,char** argv)
{
int result;
+ int i;
strcpy(configfile,"/etc/smsd.conf");
printstatus=0;
arg_infofile[0] = 0;
@@ -1328,8 +1329,6 @@
communicate[0] = 0;
// 3.1.1: Start and stop options are provided by the script, not by the daemon:
- int i;
-
for (i = 1; i < argc; i++)
{
if (!strcasecmp(argv[i], "START") || !strcasecmp(argv[i], "STOP"))