sms send pending now sends _all_ pending at the same time
This commit is contained in:
parent
86b17172fd
commit
05e676356f
|
@ -1176,18 +1176,21 @@ DEFUN(sms_send_pend,
|
|||
"Send all pending SMS starting from MIN_ID")
|
||||
{
|
||||
struct gsm_sms *sms;
|
||||
int id = atoi(argv[0]);
|
||||
|
||||
sms = db_sms_get_unsent(gsmnet, atoi(argv[0]));
|
||||
if (!sms)
|
||||
return CMD_WARNING;
|
||||
while (1) {
|
||||
sms = db_sms_get_unsent(gsmnet, id++);
|
||||
if (!sms)
|
||||
return CMD_WARNING;
|
||||
|
||||
if (!sms->receiver) {
|
||||
sms_free(sms);
|
||||
return CMD_WARNING;
|
||||
if (!sms->receiver) {
|
||||
sms_free(sms);
|
||||
continue;
|
||||
}
|
||||
|
||||
gsm411_send_sms_subscr(sms->receiver, sms);
|
||||
}
|
||||
|
||||
gsm411_send_sms_subscr(sms->receiver, sms);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue