smsutils: add some documentation

sms_assembly_add_fragment_backup: clarify how insertion spot is found
This commit is contained in:
Inaky Perez-Gonzalez 2010-05-26 12:49:18 -07:00 committed by Denis Kenzior
parent 77788d87af
commit 9c107821ab
1 changed files with 7 additions and 0 deletions

View File

@ -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++)