The register_action* functions are returning now the number of elements registered.
FossilOrigin-Name: 7bd7c612ab5b412b8ce0ef02bffb17a084ff571a54ddf8d2dce58567a0df1def
This commit is contained in:
parent
ef902cf087
commit
0733d4d5f9
@ -109,24 +109,28 @@ cw_actionlist_in_t cw_actionlist_in_create()
|
|||||||
|
|
||||||
int cw_actionlist_in_register_actions(cw_actionlist_in_t t, cw_action_in_t * actions)
|
int cw_actionlist_in_register_actions(cw_actionlist_in_t t, cw_action_in_t * actions)
|
||||||
{
|
{
|
||||||
|
int n=0;
|
||||||
while (actions->capwap_state) {
|
while (actions->capwap_state) {
|
||||||
cw_action_in_t *rc = cw_actionlist_in_add(t, actions);
|
cw_action_in_t *rc = cw_actionlist_in_add(t, actions);
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
return 0;
|
return 0;
|
||||||
actions++;
|
actions++;
|
||||||
|
n++;
|
||||||
}
|
}
|
||||||
return 1;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cw_actionlist_out_register_actions(cw_actionlist_out_t t, cw_action_out_t * actions)
|
int cw_actionlist_out_register_actions(cw_actionlist_out_t t, cw_action_out_t * actions)
|
||||||
{
|
{
|
||||||
|
int n=0;
|
||||||
while (actions->msg_id != 0) {
|
while (actions->msg_id != 0) {
|
||||||
cw_action_out_t *rc = cw_actionlist_out_add(t, actions);
|
cw_action_out_t *rc = cw_actionlist_out_add(t, actions);
|
||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
return 0;
|
return 0;
|
||||||
actions++;
|
actions++;
|
||||||
|
n++;
|
||||||
}
|
}
|
||||||
return 1;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user