From 21b032d3f1fa2fb6939f4a3df8a1bc727fc69573 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 17 Aug 2009 15:23:39 -0500 Subject: Fix invalid watch id being returned the first time Should use pre-increment instead of post increment --- src/modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3