Exemplo n.º 1
0
Arquivo: zrpcdb.c Projeto: zmike/ezrpc
/* FIXME: won't work for reload */
static void
init_cb(Esql *e, Zrpcdb_Connect_Cb cb /* exit function */){
	DB *d;

	d = esql_data_get(e);
	if (esql_error_get(e))
		ERR("DB initialization failed! %s", esql_error_get(e));
	else
		INF("Completed initializing source 'zrpcdb' with %i connections", d->config->conns);

	cb(esql_data_get(e), !esql_error_get(e));
	/* if we get here, then we're all connected. */
}
Exemplo n.º 2
0
static Eina_Bool
on_error(void *data, int type EINA_UNUSED, void *event_info)
{
   struct ctx *ctx = data;
   Esql *e = event_info;

   ctx->errors++;
   printf("error %u: %s!\n", ctx->errors, esql_error_get(e));
   return EINA_TRUE;
}