mirror of git://git.sysmocom.de/ofono
ussd: Add __ofono_ussd_is_busy
Send SS requires Call Forwarding / Call Settings / Call Barring to check whether USSD is currently busy. If it is, then the SIM should be notified appropriately. We introduce a function __ofono_ussd_is_busy to help with this.
This commit is contained in:
parent
0a6637bda6
commit
41d38d76bc
|
@ -254,6 +254,7 @@ gboolean __ofono_ussd_passwd_register(struct ofono_ussd *ussd, const char *sc,
|
|||
ofono_ussd_passwd_cb_t cb, void *data,
|
||||
ofono_destroy_func destroy);
|
||||
void __ofono_ussd_passwd_unregister(struct ofono_ussd *ussd, const char *sc);
|
||||
gboolean __ofono_ussd_is_busy(struct ofono_ussd *ussd);
|
||||
|
||||
#include <ofono/netreg.h>
|
||||
|
||||
|
|
11
src/ussd.c
11
src/ussd.c
|
@ -65,6 +65,17 @@ struct ssc_entry {
|
|||
ofono_destroy_func destroy;
|
||||
};
|
||||
|
||||
gboolean __ofono_ussd_is_busy(struct ofono_ussd *ussd)
|
||||
{
|
||||
if (!ussd)
|
||||
return FALSE;
|
||||
|
||||
if (ussd->pending || ussd->state != USSD_STATE_IDLE)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static struct ssc_entry *ssc_entry_create(const char *sc, void *cb, void *data,
|
||||
ofono_destroy_func destroy)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue