aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-03-20 11:51:57 +0100
committerSverker Eriksson <[email protected]>2012-03-20 11:51:57 +0100
commitc93be7c2b7732ef6212186dd8107590805d1ca58 (patch)
treee68c88a79da5542843d9ada350043d4e6ac50a9b /erts/emulator/drivers
parent4e932ecacbb0c98b4ca0560c6bb0b72a5f267bd9 (diff)
parent46dd06a64dc5e14aec5921b293135713baa64059 (diff)
downloadotp-c93be7c2b7732ef6212186dd8107590805d1ca58.tar.gz
otp-c93be7c2b7732ef6212186dd8107590805d1ca58.tar.bz2
otp-c93be7c2b7732ef6212186dd8107590805d1ca58.zip
Merge branch 'maint'
Conflicts: erts/preloaded/ebin/zlib.beam Rebuilt zlib.beam as part of this merge commit
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r--erts/emulator/drivers/common/zlib_drv.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/drivers/common/zlib_drv.c b/erts/emulator/drivers/common/zlib_drv.c
index da4a17db1a..a4b02b845e 100644
--- a/erts/emulator/drivers/common/zlib_drv.c
+++ b/erts/emulator/drivers/common/zlib_drv.c
@@ -64,6 +64,7 @@
static int zlib_init(void);
static ErlDrvData zlib_start(ErlDrvPort port, char* buf);
static void zlib_stop(ErlDrvData e);
+static void zlib_flush(ErlDrvData e);
static ErlDrvSSizeT zlib_ctl(ErlDrvData drv_data, unsigned int command, char *buf,
ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen);
static void zlib_outputv(ErlDrvData drv_data, ErlIOVec *ev);
@@ -82,7 +83,7 @@ ErlDrvEntry zlib_driver_entry = {
NULL, /* timeout */
zlib_outputv,
NULL, /* read_async */
- NULL, /* flush */
+ zlib_flush,
NULL, /* call */
NULL, /* event */
ERL_DRV_EXTENDED_MARKER,
@@ -410,6 +411,13 @@ static void zlib_stop(ErlDrvData e)
driver_free(d);
}
+static void zlib_flush(ErlDrvData drv_data)
+{
+ ZLibData* d = (ZLibData*) drv_data;
+
+ driver_deq(d->port, driver_sizeq(d->port));
+}
+
static ErlDrvSSizeT zlib_ctl(ErlDrvData drv_data, unsigned int command, char *buf,
ErlDrvSizeT len, char **rbuf, ErlDrvSizeT rlen)
{