[Openais] section find

Steven Dake sdake at mvista.com
Tue Jul 26 15:19:05 PDT 2005


On Thu, 2005-07-21 at 15:29 -0500, JA SL wrote:
> I've realized that on every
> ckpt_checkpoint_find_globalSection(), except on
> section create, the execution brings anything but the
> section requested.
> 
> this is because when you create a section you do this
> with the section create structure
> req_lib_ckpt_sectioncreate
> 
> for example if you do :
> 
> ckptCheckpointSection =
> ckpt_checkpoint_find_globalSection (ckptCheckpoint,
>   ((char *)(req_lib_ckpt_sectiondelete) + sizeof
> (struct req_lib_ckpt_sectiondelete) ), 
> req_lib_ckpt_sectiondelete->idLen);
>  
> the structure req_lib_ckpt_sectiondelete is a little
> bit different from req_lib_ckpt_sectioncreate.
> 
> if you do the following:
> ckptCheckpointSection =
> ckpt_checkpoint_find_globalSection (ckptCheckpoint,
>   ((char *)(req_lib_ckpt_sectiondelete) + sizeof
> (struct req_lib_ckpt_sectiondelete) + sizeof(SaTimeT)
> + sizeof(SaUint32T)),  
> req_lib_ckpt_sectiondelete->idLen);
> 
> you will find the requested section.
> 
> 
> the same problem is on every call of
> ckpt_checkpoint_find_globalSection. you might need to
> add or subtract it
> 
> I hope this will be helpful
> 
> bye
> 

Jaim,

I instrumented the example you gave (sectiondelete) after the cal to
find_globalSection.


        ckptCheckpointSection = ckpt_checkpoint_find_globalSection
(ckptCheckpoint,
                ((char *)(req_lib_ckpt_sectiondelete) + sizeof (struct
req_lib_ckpt_sectiondelete)),
                req_lib_ckpt_sectiondelete->idLen);
        if (ckptCheckpointSection == 0) {
                error = SA_AIS_ERR_NOT_EXIST;
                goto error_exit;
        }

I added code like the following:

printf ("delete ckptCheckpointSection name %s\n",
        ckptCheckpointSection->sectionDescriptor.sectionId.id);


Then I ran the testckpt code.  I find it prints out:
Jul 26 15:13:55 [NOTICE  ] [SYNC ] Synchronization barrier completed
delete ckptCheckpointSection name section ID #1

which is the section i was except it to delete (section ID #1)

The way it works is that after every lib request with a section
identifier, the section id character string is stored.  So for 

sectioncreate there is the lib_sectioncreate and then a character string
with the section identifier

for section delete there is a lib_sectiondelete and then a character
string with the section identifier

and so on.

This is somewhat difficult to read and understand but required because
saf allows variable length section identifiers.  (Why not just have a
SaNameT but oh well.:)

Could you tell me if this debugging proves that the case you describe is
not present in the code?

Regards,
-steve



> 
> jejejejeje_que buen chiste
> 
> Jaim estuvo aqui
> 
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
> Regístrate ya - http://correo.espanol.yahoo.com/ 
> _______________________________________________
> Openais mailing list
> Openais at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/openais




More information about the Openais mailing list