sms: Don't try to start the queue if already active

If the queue is currently inside a submit operation and the network
registration state changes, do not try to schedule the next operation.
This commit is contained in:
Denis Kenzior 2012-11-29 03:05:11 -06:00
parent 6e3a6156b3
commit 83c275745f
1 changed files with 3 additions and 0 deletions

View File

@ -795,6 +795,9 @@ static void netreg_status_watch(int status, int lac, int ci, int tech,
if (sms->tx_source > 0)
return;
if (sms->flags & MESSAGE_MANAGER_FLAG_TXQ_ACTIVE)
return;
if (g_queue_get_length(sms->txq))
sms->tx_source = g_timeout_add(0, tx_next, sms);
}