summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-26 12:49:18 -0700
committerDenis Kenzior <denkenz@gmail.com>2010-05-28 09:23:35 -0500
commit9c107821abd281b9651db01742238567f2ba86e9 (patch)
tree384ea5ce7ce213451ba778642b1928aec7ff3bea /src
parent77788d87afdc71d768e677d1a0e62ddd59cfb1b1 (diff)
downloadofono-9c107821abd281b9651db01742238567f2ba86e9.tar.bz2
smsutils: add some documentation
sms_assembly_add_fragment_backup: clarify how insertion spot is found
Diffstat (limited to 'src')
-rw-r--r--src/smsutil.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/smsutil.c b/src/smsutil.c
index bc9fdad8..62d8ab28 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -2521,6 +2521,13 @@ static GSList *sms_assembly_add_fragment_backup(struct sms_assembly *assembly,
if (node->bitmap[offset] & bit)
return NULL;
+ /*
+ * Iterate over the bitmap to find in which position
+ * should the fragment be inserted -- basically we
+ * walk each bit in the bitmap until the bit we care
+ * about (offset:bit) and count which are stored --
+ * that gives us in which position we have to insert.
+ */
position = 0;
for (i = 0; i < offset; i++)
for (j = 0; j < 32; j++)