mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-12 03:36:57 +08:00
修正codelen的问题
This commit is contained in:
parent
5f58612482
commit
e02a7aaaa3
@ -363,13 +363,11 @@ static atp_error_t step_provider( atp_callerdata_t mixid, atp_counter_t index, a
|
|||||||
return ATP_SUCCESS;
|
return ATP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static atp_error_t handle_onoff_entry( acl_entryid_t id, atp_itemval_t *item )
|
static atp_error_t handle_onoff_entry( acl_entryid_t id, acl_elemlen_t codelen, atp_itemval_t *item )
|
||||||
{
|
{
|
||||||
#define DEFAULT_ONOFF_HANDLER atp_select("选择此项目对应的设置", 2, select_onoff, NULL, (atp_callerdata_t)id, 0, 0, item);
|
#define DEFAULT_ONOFF_HANDLER atp_select("选择此项目对应的设置", 2, select_onoff, NULL, (atp_callerdata_t)id, 0, 0, item);
|
||||||
#define ONOFF_SAFE_CALLACL( statement ) if( ACHTLIB_SUCCESS != statement ) return DEFAULT_ONOFF_HANDLER;
|
#define ONOFF_SAFE_CALLACL( statement ) if( ACHTLIB_SUCCESS != statement ) return DEFAULT_ONOFF_HANDLER;
|
||||||
|
|
||||||
acl_elemlen_t codelen;
|
|
||||||
|
|
||||||
if( codelen > 4 )// more than 2 address
|
if( codelen > 4 )// more than 2 address
|
||||||
return DEFAULT_ONOFF_HANDLER;
|
return DEFAULT_ONOFF_HANDLER;
|
||||||
|
|
||||||
@ -583,8 +581,8 @@ static atp_pageopt_t serve_on_key( atp_callerdata_t data, atp_counter_t index, a
|
|||||||
SAFE_CALLACL( acl_select_entry( eid, &cnt ) );
|
SAFE_CALLACL( acl_select_entry( eid, &cnt ) );
|
||||||
if( cnt == 0 )
|
if( cnt == 0 )
|
||||||
{
|
{
|
||||||
SAFE_CALLACL( acl_select_entry( 1<<16 | eid, NULL ) );
|
SAFE_CALLACL( acl_select_entry( 1<<16 | eid, &cnt ) );
|
||||||
res = handle_onoff_entry( eid, &item );
|
res = handle_onoff_entry( eid, cnt, &item );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user