mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 21:23:06 +00:00
commit
a457559e18
@ -223,6 +223,25 @@ int ptm_lib_init_msg(ptm_lib_handle_t *hdl, int cmd_id, int type, void *in_ctxt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ptm_lib_cleanup_msg(ptm_lib_handle_t *hdl, void *ctxt)
|
||||||
|
{
|
||||||
|
ptm_lib_msg_ctxt_t *p_ctxt = ctxt;
|
||||||
|
csv_t *csv;
|
||||||
|
|
||||||
|
if (!p_ctxt) {
|
||||||
|
ERRLOG("%s: no context \n", __FUNCTION__);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
csv = p_ctxt->csv;
|
||||||
|
|
||||||
|
csv_clean(csv);
|
||||||
|
csv_free(csv);
|
||||||
|
free(p_ctxt);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ptm_lib_complete_msg(ptm_lib_handle_t *hdl, void *ctxt, char *buf, int *len)
|
int ptm_lib_complete_msg(ptm_lib_handle_t *hdl, void *ctxt, char *buf, int *len)
|
||||||
{
|
{
|
||||||
ptm_lib_msg_ctxt_t *p_ctxt = ctxt;
|
ptm_lib_msg_ctxt_t *p_ctxt = ctxt;
|
||||||
|
@ -63,5 +63,6 @@ int ptm_lib_find_key_in_msg(void *, const char *, char *);
|
|||||||
int ptm_lib_init_msg(ptm_lib_handle_t *, int, int, void *, void **);
|
int ptm_lib_init_msg(ptm_lib_handle_t *, int, int, void *, void **);
|
||||||
int ptm_lib_append_msg(ptm_lib_handle_t *, void *, const char *, const char *);
|
int ptm_lib_append_msg(ptm_lib_handle_t *, void *, const char *, const char *);
|
||||||
int ptm_lib_complete_msg(ptm_lib_handle_t *, void *, char *, int *);
|
int ptm_lib_complete_msg(ptm_lib_handle_t *, void *, char *, int *);
|
||||||
|
int ptm_lib_cleanup_msg(ptm_lib_handle_t *, void *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -817,6 +817,7 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length,
|
|||||||
zebra_ptm_send_message(ptm_cb.out_data, data_len);
|
zebra_ptm_send_message(ptm_cb.out_data, data_len);
|
||||||
|
|
||||||
stream_failure:
|
stream_failure:
|
||||||
|
ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,6 +947,7 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length,
|
|||||||
zebra_ptm_send_message(ptm_cb.out_data, data_len);
|
zebra_ptm_send_message(ptm_cb.out_data, data_len);
|
||||||
|
|
||||||
stream_failure:
|
stream_failure:
|
||||||
|
ptm_lib_cleanup_msg(ptm_hdl, out_ctxt);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user