*register* functions are returning the number of elements registered.

FossilOrigin-Name: 5b1f1ed4dbc6eae4d2735822802a15c3f0a410fcb8a65c8f1373b03f9c2b2fb0
This commit is contained in:
7u83@mail.ru 2015-04-29 10:11:37 +00:00
parent 0733d4d5f9
commit ab9ed74a65
5 changed files with 28 additions and 44 deletions

View File

@ -52,17 +52,10 @@ cw_action_out_t capwap_80211_actions_wtp_out[]={
int cw_register_actions_capwap_80211_wtp(struct cw_actiondef *def) int cw_register_actions_capwap_80211_wtp(struct cw_actiondef *def)
{ {
cw_actionlist_in_register_actions(def->in, capwap_80211_actions_wtp_in);
cw_actionlist_out_register_actions(def->out, capwap_80211_actions_wtp_out);
int rc; int rc;
rc = cw_strheap_register_strings(def->strelem, capwap_strings_elem80211); rc=cw_actionlist_in_register_actions(def->in, capwap_80211_actions_wtp_in);
printf("80211 Registerd %d\n",rc); rc+=cw_actionlist_out_register_actions(def->out, capwap_80211_actions_wtp_out);
/*rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem); rc+=cw_strheap_register_strings(def->strelem, capwap_strings_elem80211);
*/ return rc;
return 1;
} }

View File

@ -336,11 +336,11 @@ int cw_register_actions_capwap_ac(struct cw_actiondef *def)
def->strelem = cw_strheap_create(); def->strelem = cw_strheap_create();
def->wbids = intavltree_create(); def->wbids = intavltree_create();
cw_actionlist_in_register_actions(def->in, capwap_actions_ac_in);
cw_actionlist_out_register_actions(def->out, capwap_actions_ac_out);
int rc; int rc;
rc = cw_strheap_register_strings(def->strmsg, capwap_strings_msg); rc = cw_actionlist_in_register_actions(def->in, capwap_actions_ac_in);
rc += cw_actionlist_out_register_actions(def->out, capwap_actions_ac_out);
rc += cw_strheap_register_strings(def->strmsg, capwap_strings_msg);
rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem); rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem);
@ -348,5 +348,5 @@ int cw_register_actions_capwap_ac(struct cw_actiondef *def)
return 1; return rc;
} }

View File

@ -362,14 +362,13 @@ int cw_register_actions_capwap_wtp(struct cw_actiondef *def)
def->strmsg = cw_strheap_create(); def->strmsg = cw_strheap_create();
def->strelem = cw_strheap_create(); def->strelem = cw_strheap_create();
cw_actionlist_in_register_actions(def->in, capwap_actions_wtp_in);
cw_actionlist_out_register_actions(def->out, capwap_actions_wtp_out);
int rc; int rc;
rc = cw_strheap_register_strings(def->strmsg, capwap_strings_msg);
rc = cw_actionlist_in_register_actions(def->in, capwap_actions_wtp_in);
rc += cw_actionlist_out_register_actions(def->out, capwap_actions_wtp_out);
rc += cw_strheap_register_strings(def->strmsg, capwap_strings_msg);
rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem); rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem);
return rc;
return 1;
} }

View File

@ -161,12 +161,12 @@ cw_action_out_t cipwap_actions_ac_out[] = {
*/ */
int cw_register_actions_cipwap_ac(struct cw_actiondef *def) int cw_register_actions_cipwap_ac(struct cw_actiondef *def)
{ {
cw_register_actions_capwap_ac(def); int rc;
rc=cw_register_actions_capwap_ac(def);
cw_actionlist_in_register_actions(def->in, cipwap_actions_ac_in); rc+=cw_actionlist_in_register_actions(def->in, cipwap_actions_ac_in);
cw_actionlist_out_register_actions(def->out, cipwap_actions_ac_out); rc+=cw_actionlist_out_register_actions(def->out, cipwap_actions_ac_out);
cw_strheap_register_strings(def->strelem,cipwap_strings_elem); rc+=cw_strheap_register_strings(def->strelem,cipwap_strings_elem);
return rc;
return 1;
} }

View File

@ -149,23 +149,15 @@ cw_action_out_t cipwap_actions_wtp_out[] = {
int cw_register_actions_cipwap_wtp(struct cw_actiondef *def) int cw_register_actions_cipwap_wtp(struct cw_actiondef *def)
{ {
/*
def->in = cw_actionlist_in_create();
def->out = cw_actionlist_out_create();
def->strmsg = cw_strheap_create();
def->strelem = cw_strheap_create();
*/
cw_register_actions_capwap_wtp(def);
cw_actionlist_in_register_actions(def->in, cipwap_actions_wtp_in);
cw_actionlist_out_register_actions(def->out, cipwap_actions_wtp_out);
int rc; int rc;
rc=cw_register_actions_capwap_wtp(def);
rc+=cw_actionlist_in_register_actions(def->in, cipwap_actions_wtp_in);
rc+=cw_actionlist_out_register_actions(def->out, cipwap_actions_wtp_out);
rc += cw_strheap_register_strings(def->strelem, cipwap_strings_elem); rc += cw_strheap_register_strings(def->strelem, cipwap_strings_elem);
return rc;
return 1;
} }