summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-08-17 15:23:39 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-08-17 15:23:39 -0500
commit21b032d3f1fa2fb6939f4a3df8a1bc727fc69573 (patch)
tree7248b2d079056f2d1a5a52354a817918d652a2bf
parent255c6ba0d9e34d517bd17614d12e44573eea62a9 (diff)
downloadofono-21b032d3f1fa2fb6939f4a3df8a1bc727fc69573.tar.bz2
Fix invalid watch id being returned the first time
Should use pre-increment instead of post increment
-rw-r--r--src/modem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modem.c b/src/modem.c
index 22a614fe..209033f2 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -207,7 +207,7 @@ int __ofono_modem_add_atom_watch(struct ofono_modem *modem,
watch = g_new0(struct ofono_atom_watch, 1);
watch->type = type;
- watch->id = modem->next_atom_watch_id++;
+ watch->id = ++modem->next_atom_watch_id;
watch->notify = notify;
watch->destroy = destroy;
watch->notify_data = data;