forked from sailfishos/ofono
		
	sim: new API to check for a UST service only
The existing service check API takes both SST and UST services and could inadvertently return success on a service if one (SST or UST) service did not exist. This adds an API specifically for checking for a UST service, and if the UST dir is not available it will return FALSE, rather than possibly returning true on some other SST service.
This commit is contained in:
		
				
					committed by
					
						
						Slava Monich
					
				
			
			
				
	
			
			
			
						parent
						
							aed679d6da
						
					
				
				
					commit
					32dc1d1806
				
			@@ -383,6 +383,8 @@ unsigned short __ofono_sms_get_next_ref(struct ofono_sms *sms);
 | 
			
		||||
 | 
			
		||||
#include <ofono/sim.h>
 | 
			
		||||
 | 
			
		||||
ofono_bool_t __ofono_sim_ust_service_available(struct ofono_sim *sim,
 | 
			
		||||
						int ust_service);
 | 
			
		||||
ofono_bool_t __ofono_sim_service_available(struct ofono_sim *sim,
 | 
			
		||||
						int ust_service,
 | 
			
		||||
						int sst_service);
 | 
			
		||||
 
 | 
			
		||||
@@ -2459,6 +2459,15 @@ const unsigned char *ofono_sim_get_cphs_service_table(struct ofono_sim *sim)
 | 
			
		||||
	return sim->cphs_service_table;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ofono_bool_t __ofono_sim_ust_service_available(struct ofono_sim *sim,
 | 
			
		||||
						int ust_service)
 | 
			
		||||
{
 | 
			
		||||
	if (sim->efust)
 | 
			
		||||
		return sim_ust_is_available(sim->efust, sim->efust_length,
 | 
			
		||||
						ust_service);
 | 
			
		||||
	return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ofono_bool_t __ofono_sim_service_available(struct ofono_sim *sim,
 | 
			
		||||
						int ust_service,
 | 
			
		||||
						int sst_service)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user