Browse Source

Use guint64 for all IO operations.

tags/0.5.0
Vsevolod Stakhov 12 years ago
parent
commit
8e09451a57
2 changed files with 6 additions and 6 deletions
  1. 3
    3
      src/aio_event.c
  2. 3
    3
      src/aio_event.h

+ 3
- 3
src/aio_event.c View File

@@ -53,7 +53,7 @@
struct io_cbdata {
gint fd;
rspamd_aio_cb cb;
gsize len;
guint64 len;
gpointer buf;
gpointer io_buf;
gpointer ud;
@@ -307,7 +307,7 @@ rspamd_aio_open (struct aio_context *ctx, const gchar *path, int flags)
* Asynchronous read of file
*/
gint
rspamd_aio_read (gint fd, gpointer buf, gsize len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
rspamd_aio_read (gint fd, gpointer buf, guint64 len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
{
struct io_cbdata *cbdata;
gint r = -1;
@@ -377,7 +377,7 @@ blocking:
* Asynchronous write of file
*/
gint
rspamd_aio_write (gint fd, gpointer buf, gsize len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
rspamd_aio_write (gint fd, gpointer buf, guint64 len, guint64 offset, struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud)
{
struct io_cbdata *cbdata;
gint r = -1;

+ 3
- 3
src/aio_event.h View File

@@ -35,7 +35,7 @@ struct aio_context;
/**
* Callback for notifying
*/
typedef void (*rspamd_aio_cb) (gint fd, gint res, gsize len, gpointer data, gpointer ud);
typedef void (*rspamd_aio_cb) (gint fd, gint res, guint64 len, gpointer data, gpointer ud);

/**
* Initialize aio with specified event base
@@ -50,13 +50,13 @@ gint rspamd_aio_open (struct aio_context *ctx, const gchar *path, int flags);
/**
* Asynchronous read of file
*/
gint rspamd_aio_read (gint fd, gpointer buf, gsize len, guint64 offset,
gint rspamd_aio_read (gint fd, gpointer buf, guint64 len, guint64 offset,
struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud);

/**
* Asynchronous write of file
*/
gint rspamd_aio_write (gint fd, gpointer buf, gsize len, guint64 offset,
gint rspamd_aio_write (gint fd, gpointer buf, guint64 len, guint64 offset,
struct aio_context *ctx, rspamd_aio_cb cb, gpointer ud);

/**

Loading…
Cancel
Save