The register_action* functions are returning now the number of elements registered.

FossilOrigin-Name: 7bd7c612ab5b412b8ce0ef02bffb17a084ff571a54ddf8d2dce58567a0df1def
This commit is contained in:
7u83@mail.ru 2015-04-29 10:05:32 +00:00
parent ef902cf087
commit 0733d4d5f9
1 changed files with 6 additions and 2 deletions

View File

@ -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 n=0;
while (actions->capwap_state) {
cw_action_in_t *rc = cw_actionlist_in_add(t, actions);
if (rc == 0)
return 0;
actions++;
n++;
}
return 1;
return n;
}
int cw_actionlist_out_register_actions(cw_actionlist_out_t t, cw_action_out_t * actions)
{
int n=0;
while (actions->msg_id != 0) {
cw_action_out_t *rc = cw_actionlist_out_add(t, actions);
if (rc == 0)
return 0;
actions++;
n++;
}
return 1;
return n;
}