search for: free_ctx

Displaying 3 results from an estimated 3 matches for "free_ctx".

Did you mean: free_hctx
2010 Jun 28
8
[PATCH] add xl ocaml bindings
...lt;caml/callback.h> + +#include <sys/mman.h> +#include <stdint.h> +#include <string.h> + +#include "libxl.h" + +#define INIT_CTX() \ + ret = libxl_ctx_init(&ctx, LIBXL_VERSION, NULL); \ + if (ret != 0) \ + failwith_xl("cannot init context"); + +#define FREE_CTX() \ + libxl_ctx_free(&ctx) + +void log_callback(void *userdata, int loglevel, const char *file, + int line, const char *func, char *s) +{ +} + +void failwith_xl(char *log_data) +{ + char s[1024]; + snprintf(s, 1024, "proper logging not implemented yet: error in %s", log_data); + cam...
2013 Mar 25
86
[PATCH 00/28] libxl: ocaml: improve the bindings
The following series of patches fill in most of the gaps in the OCaml bindings to libxl, to make them useful for clients such as xapi/xenopsd (from XCP). There are a number of bugfixes to the existing bindings as well. I have an experimental version of xenopsd that successfully uses the new bindings. An earlier version of the first half of the series was submitted to the last by Ian Campbell on
2002 Jun 25
4
PAM kbd-int with privsep
...return (1); + case '=': + msg = sshpam_receive(ctxt); + xfree(msg); + ctxt->done = 1; + return (0); + default: + msg = sshpam_receive(ctxt); + if (*msg == '!') + error("%s", msg + 1); + xfree(msg); + ctxt->done = -1; + return (-1); } +} + +void +sshpam_free_ctx(void *ctxtp) +{ + struct sshpam_ctxt *ctxt = ctxtp; - context_pam2.finished = 1; + debug3("Freeing PAM kbd-int ctx"); - packet_check_eom(); + close(ctxt->sock); + kill(ctxt->pid, SIGHUP); + /* XXX: wait()? */ + xfree(ctxt->user); + xfree(ctxt); } -#endif +KbdintDevice sshp...