On 22 Nov 2014, at 16:54, Giuseppe Bilotta <[email protected]> wrote:

Hi,

> Some broken CCR dive logs might not have DILUENT and/or OXYGEN cylinders
> marked as such (see e.g. dives/Poseidon_MkVILog.xml in the repository).
> 
> However, the recent set of CCR patches (and fixes on top of it) caused a
> number of places in the code to break by trying to use negative cylinder
> index.
> 
> Fix this by making sure that a CCR dive has both a DILUENT and an
> OXYGEN cylinder, during the dive computer mixup.


I doubt that this is the correct approach (designate roles to random 
cylinders). Is is almost always not the correct thing to do.

Better do propper error checking and e.g. simply don’t attempt to plot an o2 
pressure line if we don’t have an o2 cylinder. Here is a patch that adds error 
checking for get_cylinder_idx_by_use() in all places where it is used.

Best
Robert

Attachment: 0001-Check-error-code-of-get_cylider_idx_by_use.patch
Description: Binary data


--                                                                              
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO 
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics  
                      Scientific Coordinator                                   
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik    
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339       
    stupid .sig\n";   http://www.atdotde.de 

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to