diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-17 15:23:39 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-17 15:23:39 -0500 |
commit | 21b032d3f1fa2fb6939f4a3df8a1bc727fc69573 (patch) | |
tree | 7248b2d079056f2d1a5a52354a817918d652a2bf | |
parent | 255c6ba0d9e34d517bd17614d12e44573eea62a9 (diff) | |
download | ofono-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.c | 2 |
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; |