diff options
author | Philippe Nunes <philippe.nunes@linux.intel.com> | 2012-08-30 18:24:07 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-09-11 22:33:43 -0500 |
commit | 80fb1c2fac738bd27111d4849b649e57a17ac65f (patch) | |
tree | 65e562c0a14f0f6c5ad0ed5cacf9d31d6f883734 /src | |
parent | c950f5485669ed6aba42b05ca0a823fb8167f1aa (diff) | |
download | ofono-80fb1c2fac738bd27111d4849b649e57a17ac65f.tar.bz2 |
sms: Fix to find SMS entry posted by STK
SMS initiated by proactive command are not exposed on D-BUS.
Therefore, there is no message associated with the entry created from
STK.
Diffstat (limited to 'src')
-rw-r--r-- | src/sms.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -2114,16 +2114,15 @@ int __ofono_sms_txq_set_submit_notify(struct ofono_sms *sms, void *data, ofono_destroy_func destroy) { - struct message *m; + GList *l; struct tx_queue_entry *entry; - m = g_hash_table_lookup(sms->messages, uuid); - if (m == NULL) + l = g_queue_find_custom(sms->txq, uuid, entry_compare_by_uuid); + + if (l == NULL) return -ENOENT; - entry = message_get_data(m); - if (entry == NULL) - return -ENOTSUP; + entry = l->data; tx_queue_entry_set_submit_notify(entry, cb, data, destroy); |