Commit f09b30c7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Memory error handling

parent e23d890e
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "bdagraph.h" #include "bdagraph.h"
#include <ctype.h>
/**************************************************************************** /****************************************************************************
* Interfaces for calls from C * Interfaces for calls from C
...@@ -534,21 +535,29 @@ int BDAGraph::SubmitDVBSTuneRequest() ...@@ -534,21 +535,29 @@ int BDAGraph::SubmitDVBSTuneRequest()
l_lnb_lof1 = var_GetInteger( p_access, "dvb-lnb-lof1" ); l_lnb_lof1 = var_GetInteger( p_access, "dvb-lnb-lof1" );
l_lnb_lof2 = var_GetInteger( p_access, "dvb-lnb-lof2" ); l_lnb_lof2 = var_GetInteger( p_access, "dvb-lnb-lof2" );
l_lnb_slof = var_GetInteger( p_access, "dvb-lnb-slof" ); l_lnb_slof = var_GetInteger( p_access, "dvb-lnb-slof" );
psz_polarisation = var_GetString( p_access, "dvb-polarisation" ); psz_polarisation = var_GetNonEmptyString( p_access, "dvb-polarisation" );
l_inversion = var_GetInteger( p_access, "dvb-inversion" ); l_inversion = var_GetInteger( p_access, "dvb-inversion" );
l_network_id = var_GetInteger( p_access, "dvb-network_id" ); l_network_id = var_GetInteger( p_access, "dvb-network_id" );
b_west = ( l_longitude < 0 ) ? TRUE : FALSE; b_west = ( l_longitude < 0 ) ? TRUE : FALSE;
i_polar = BDA_POLARISATION_NOT_SET; i_polar = BDA_POLARISATION_NOT_SET;
if( *psz_polarisation == 'H' || *psz_polarisation == 'h' ) if( psz_polarisation != NULL )
switch( toupper( psz_polarisation[0] ) )
{
case 'H':
i_polar = BDA_POLARISATION_LINEAR_H; i_polar = BDA_POLARISATION_LINEAR_H;
if( *psz_polarisation == 'V' || *psz_polarisation == 'v' ) break;
case 'V':
i_polar = BDA_POLARISATION_LINEAR_V; i_polar = BDA_POLARISATION_LINEAR_V;
if( *psz_polarisation == 'L' || *psz_polarisation == 'l' ) break;
case 'L':
i_polar = BDA_POLARISATION_CIRCULAR_L; i_polar = BDA_POLARISATION_CIRCULAR_L;
if( *psz_polarisation == 'R' || *psz_polarisation == 'r' ) break;
case 'R':
i_polar = BDA_POLARISATION_CIRCULAR_R; i_polar = BDA_POLARISATION_CIRCULAR_R;
break;
}
i_inversion = BDA_SPECTRAL_INVERSION_NOT_SET; i_inversion = BDA_SPECTRAL_INVERSION_NOT_SET;
if( l_inversion == 0 ) if( l_inversion == 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment