diff options
| author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2017-12-07 12:37:10 -0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-07 12:37:10 -0200 |
| commit | a457559e18100472826f2c9996c7f13c5caac3ed (patch) | |
| tree | 694217a5d5f07da9a1f27ead22fcaeb31dc3e4ab /lib/ptm_lib.c | |
| parent | 35f897c3b99f5e6174315469bc9c5058915a9a2d (diff) | |
| parent | a928d46462f10284cdc2da06bf6f3eb8eec7ce05 (diff) | |
Merge pull request #1519 from donaldsharp/ptm
Ptm
Diffstat (limited to 'lib/ptm_lib.c')
| -rw-r--r-- | lib/ptm_lib.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c index e881d49225..28d26149e5 100644 --- a/lib/ptm_lib.c +++ b/lib/ptm_lib.c @@ -223,6 +223,25 @@ int ptm_lib_init_msg(ptm_lib_handle_t *hdl, int cmd_id, int type, void *in_ctxt, 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) { ptm_lib_msg_ctxt_t *p_ctxt = ctxt; |
