mirror of git://git.sysmocom.de/ofono
ss: Use function to judge if it's busy
This commit is contained in:
parent
6235b26e93
commit
a9aac83e33
|
@ -372,7 +372,7 @@ static gboolean cb_ss_control(int type, const char *sc,
|
|||
void *operation = NULL;
|
||||
int i;
|
||||
|
||||
if (cb->pending) {
|
||||
if (__ofono_call_barring_is_busy(cb)) {
|
||||
reply = __ofono_error_busy(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
@ -505,7 +505,7 @@ static gboolean cb_ss_passwd(const char *sc,
|
|||
DBusMessage *reply;
|
||||
const char *fac;
|
||||
|
||||
if (cb->pending) {
|
||||
if (__ofono_call_barring_is_busy(cb)) {
|
||||
reply = __ofono_error_busy(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
@ -675,7 +675,7 @@ static DBusMessage *cb_get_properties(DBusConnection *conn, DBusMessage *msg,
|
|||
{
|
||||
struct ofono_call_barring *cb = data;
|
||||
|
||||
if (cb->pending || __ofono_ussd_is_busy(cb->ussd))
|
||||
if (__ofono_call_barring_is_busy(cb) || __ofono_ussd_is_busy(cb->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (!cb->driver->query)
|
||||
|
@ -830,7 +830,7 @@ static DBusMessage *cb_set_property(DBusConnection *conn, DBusMessage *msg,
|
|||
int cls;
|
||||
int mode;
|
||||
|
||||
if (cb->pending || __ofono_ussd_is_busy(cb->ussd))
|
||||
if (__ofono_call_barring_is_busy(cb) || __ofono_ussd_is_busy(cb->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (!dbus_message_iter_init(msg, &iter))
|
||||
|
@ -902,7 +902,7 @@ static DBusMessage *cb_disable_all(DBusConnection *conn, DBusMessage *msg,
|
|||
if (!cb->driver->set)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
if (cb->pending || __ofono_ussd_is_busy(cb->ussd))
|
||||
if (__ofono_call_barring_is_busy(cb) || __ofono_ussd_is_busy(cb->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &passwd,
|
||||
|
@ -949,7 +949,7 @@ static DBusMessage *cb_set_passwd(DBusConnection *conn, DBusMessage *msg,
|
|||
if (!cb->driver->set_passwd)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
if (cb->pending || __ofono_ussd_is_busy(cb->ussd))
|
||||
if (__ofono_call_barring_is_busy(cb) || __ofono_ussd_is_busy(cb->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &old_passwd,
|
||||
|
|
|
@ -432,7 +432,8 @@ static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,
|
|||
if (!cf->driver->query)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
if (cf->pending || __ofono_ussd_is_busy(cf->ussd))
|
||||
if (__ofono_call_forwarding_is_busy(cf) ||
|
||||
__ofono_ussd_is_busy(cf->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
cf->pending = dbus_message_ref(msg);
|
||||
|
@ -589,7 +590,8 @@ static DBusMessage *cf_set_property(DBusConnection *conn, DBusMessage *msg,
|
|||
int cls;
|
||||
int type;
|
||||
|
||||
if (cf->pending || __ofono_ussd_is_busy(cf->ussd))
|
||||
if (__ofono_call_forwarding_is_busy(cf) ||
|
||||
__ofono_ussd_is_busy(cf->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (!dbus_message_iter_init(msg, &iter))
|
||||
|
@ -707,7 +709,8 @@ static DBusMessage *cf_disable_all(DBusConnection *conn, DBusMessage *msg,
|
|||
if (!cf->driver->erasure)
|
||||
return __ofono_error_not_implemented(msg);
|
||||
|
||||
if (cf->pending || __ofono_ussd_is_busy(cf->ussd))
|
||||
if (__ofono_call_forwarding_is_busy(cf) ||
|
||||
__ofono_ussd_is_busy(cf->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &strtype,
|
||||
|
@ -898,7 +901,7 @@ static gboolean cf_ss_control(int type, const char *sc,
|
|||
if (!cf)
|
||||
return FALSE;
|
||||
|
||||
if (cf->pending) {
|
||||
if (__ofono_call_forwarding_is_busy(cf)) {
|
||||
reply = __ofono_error_busy(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ static gboolean cw_ss_control(int type,
|
|||
if (strcmp(sc, "43"))
|
||||
return FALSE;
|
||||
|
||||
if (cs->pending) {
|
||||
if (__ofono_call_settings_is_busy(cs)) {
|
||||
reply = __ofono_error_busy(msg);
|
||||
goto error;
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ static gboolean clip_colp_colr_ss(int type,
|
|||
if (!cs)
|
||||
return FALSE;
|
||||
|
||||
if (cs->pending) {
|
||||
if (__ofono_call_settings_is_busy(cs)) {
|
||||
DBusMessage *reply = __ofono_error_busy(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
@ -700,7 +700,7 @@ static gboolean clir_ss_control(int type,
|
|||
if (strcmp(sc, "31"))
|
||||
return FALSE;
|
||||
|
||||
if (cs->pending) {
|
||||
if (__ofono_call_settings_is_busy(cs)) {
|
||||
DBusMessage *reply = __ofono_error_busy(msg);
|
||||
g_dbus_send_message(conn, reply);
|
||||
|
||||
|
@ -956,7 +956,7 @@ static DBusMessage *cs_get_properties(DBusConnection *conn, DBusMessage *msg,
|
|||
{
|
||||
struct ofono_call_settings *cs = data;
|
||||
|
||||
if (cs->pending || __ofono_ussd_is_busy(cs->ussd))
|
||||
if (__ofono_call_settings_is_busy(cs) || __ofono_ussd_is_busy(cs->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (cs->flags & CALL_SETTINGS_FLAG_CACHED)
|
||||
|
@ -977,7 +977,7 @@ static void clir_set_query_callback(const struct ofono_error *error,
|
|||
struct ofono_call_settings *cs = data;
|
||||
DBusMessage *reply;
|
||||
|
||||
if (!cs->pending)
|
||||
if (!__ofono_call_settings_is_busy(cs))
|
||||
return;
|
||||
|
||||
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
|
||||
|
@ -1133,7 +1133,7 @@ static DBusMessage *cs_set_property(DBusConnection *conn, DBusMessage *msg,
|
|||
const char *property;
|
||||
int cls;
|
||||
|
||||
if (cs->pending || __ofono_ussd_is_busy(cs->ussd))
|
||||
if (__ofono_call_settings_is_busy(cs) || __ofono_ussd_is_busy(cs->ussd))
|
||||
return __ofono_error_busy(msg);
|
||||
|
||||
if (!dbus_message_iter_init(msg, &iter))
|
||||
|
|
Loading…
Reference in New Issue