summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 17:55:58 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 17:55:58 +0100
commit1636d4d6945a20c62683b69c69c6b16e0c63b0ca (patch)
tree0cd2a3161105a396cda4c027971aa11f3874b4b0 /cli.c
parent9768c33ed3c6c2fde453f3ed05d3ac0016024010 (diff)
downloadpcitool-1636d4d6945a20c62683b69c69c6b16e0c63b0ca.tar.gz
pcitool-1636d4d6945a20c62683b69c69c6b16e0c63b0ca.tar.bz2
pcitool-1636d4d6945a20c62683b69c69c6b16e0c63b0ca.tar.xz
pcitool-1636d4d6945a20c62683b69c69c6b16e0c63b0ca.zip
fixes in pcitool
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli.c b/cli.c
index 59aa2dd..3df612f 100644
--- a/cli.c
+++ b/cli.c
@@ -1189,7 +1189,7 @@ int raw_data(pcilib_event_id_t event_id, pcilib_event_info_t *info, pcilib_event
GRABContext *ctx = (GRABContext*)user;
// pcilib_t *handle = ctx->handle;
-
+
err = fastwriter_push_data(ctx->writer, size, data);
if (err) {
if (err == EWOULDBLOCK) Error("Storage is not able to handle the data stream, buffer overrun");
@@ -1428,7 +1428,7 @@ int TriggerAndGrab(pcilib_t *handle, GRAB_MODE grab_mode, const char *evname, co
pcilib_configure_autostop(handle, num, run_time);
if (flags&PCILIB_EVENT_FLAG_RAW_DATA_ONLY) {
- pcilib_configure_rawdata_callback(handle, &raw_data, NULL);
+ pcilib_configure_rawdata_callback(handle, &raw_data, &ctx);
}
if (flags&PCILIB_EVENT_FLAG_PREPROCESS) {
@@ -1510,7 +1510,8 @@ int TriggerAndGrab(pcilib_t *handle, GRAB_MODE grab_mode, const char *evname, co
pthread_join(trigger_thread, NULL);
}
- fastwriter_close(ctx.writer);
+ err = fastwriter_close(ctx.writer);
+ if (err) Error("Storage problems, error %i", err);
ctx.writing_flag = 0;