projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76fce49
)
gisi: Fix counter for indication subscriptions
author
Aki Niemi
<aki.niemi@nokia.com>
Wed, 25 Aug 2010 10:04:38 +0000
(13:04 +0300)
committer
Aki Niemi
<aki.niemi@nokia.com>
Mon, 30 Aug 2010 14:54:40 +0000
(17:54 +0300)
gisi/client.c
patch
|
blob
|
history
diff --git
a/gisi/client.c
b/gisi/client.c
index
640484d
..
e3785a7
100644
(file)
--- a/
gisi/client.c
+++ b/
gisi/client.c
@@
-473,6
+473,7
@@
int g_isi_subscribe(GIsiClient *client, uint8_t type,
{
GIsiIndication *ind;
GIsiIndication **old;
+ gboolean isnew = TRUE;
if (cb == NULL)
return -EINVAL;
@@
-495,6
+496,7
@@
int g_isi_subscribe(GIsiClient *client, uint8_t type,
if (*old != ind) {
g_free(ind);
ind = *old;
+ isnew = FALSE;
}
ind->func = cb;
@@
-507,8
+509,11
@@
int g_isi_subscribe(GIsiClient *client, uint8_t type,
g_free(ind);
return ret;
}
- client->inds.count++;
}
+
+ if (isnew)
+ client->inds.count++;
+
return 0;
}