|
|
fa49311 |
diff -urp pads-1.2.orig/src/output/output.c pads-1.2/src/output/output.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/output/output.c 2008-07-08 10:53:14.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/output/output.c 2008-07-08 10:41:13.000000000 -0400
|
|
|
fa49311 |
@@ -129,7 +129,8 @@ int activate_output_plugin (bstring name
|
|
|
fa49311 |
/* MATCH! Set record to active and run 'init' function. */
|
|
|
fa49311 |
list->active = 1;
|
|
|
fa49311 |
if (plugin != NULL && plugin->init != NULL)
|
|
|
fa49311 |
- (*plugin->init)(args);
|
|
|
fa49311 |
+ if ((*plugin->init)(args) < 0)
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
break;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
diff -urp pads-1.2.orig/src/output/output-csv.c pads-1.2/src/output/output-csv.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/output/output-csv.c 2008-07-07 13:56:10.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/output/output-csv.c 2008-07-08 10:44:48.000000000 -0400
|
|
|
fa49311 |
@@ -58,6 +58,7 @@ setup_output_csv (void)
|
|
|
fa49311 |
if (plugin != NULL)
|
|
|
fa49311 |
free(plugin);
|
|
|
fa49311 |
log_message("warning: 'register_output_plugin' in function 'setup_output_csv' failed.");
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
diff -urp pads-1.2.orig/src/output/output-fifo.c pads-1.2/src/output/output-fifo.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/output/output-fifo.c 2008-06-30 17:54:33.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/output/output-fifo.c 2008-07-08 10:46:32.000000000 -0400
|
|
|
fa49311 |
@@ -83,6 +83,7 @@ setup_output_fifo (void)
|
|
|
fa49311 |
if (plugin != NULL)
|
|
|
fa49311 |
free(plugin);
|
|
|
fa49311 |
log_message("warning: 'register_output_plugin' in function 'setup_output_fifo' failed.");
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
@@ -109,8 +110,10 @@ init_output_fifo (bstring fifo_file)
|
|
|
fa49311 |
mkfifo ((char *)bdata(fifo_file), 0755);
|
|
|
fa49311 |
|
|
|
fa49311 |
verbose_message("Open FIFO File\n");
|
|
|
fa49311 |
- if ((output_fifo_conf.file = fopen((char*)bdata(fifo_file), "w+")) == NULL)
|
|
|
fa49311 |
+ if ((output_fifo_conf.file = fopen((char*)bdata(fifo_file), "w+")) == NULL){
|
|
|
fa49311 |
err_message("Unable to open FIFO file (%s)!\n", bdata(fifo_file));
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
+ }
|
|
|
fa49311 |
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
diff -urp pads-1.2.orig/src/output/output-prelude.c pads-1.2/src/output/output-prelude.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/output/output-prelude.c 2008-07-08 10:53:14.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/output/output-prelude.c 2008-07-08 10:44:25.000000000 -0400
|
|
|
fa49311 |
@@ -407,9 +407,6 @@ setup_output_prelude (void)
|
|
|
fa49311 |
OutputPlugin *plugin;
|
|
|
fa49311 |
|
|
|
fa49311 |
|
|
|
fa49311 |
- if (init_prelude() < 0)
|
|
|
fa49311 |
- return -1;
|
|
|
fa49311 |
-
|
|
|
fa49311 |
/* Allocate and setup plugin data record. */
|
|
|
fa49311 |
plugin = (OutputPlugin*)malloc(sizeof(OutputPlugin));
|
|
|
fa49311 |
plugin->name = bfromcstr("prelude");
|
|
|
fa49311 |
@@ -424,6 +421,7 @@ setup_output_prelude (void)
|
|
|
fa49311 |
if (plugin != NULL)
|
|
|
fa49311 |
free(plugin);
|
|
|
fa49311 |
log_message("warning: 'register_output_plugin' in function 'setup_output_prelude' failed.");
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
@@ -442,6 +440,10 @@ init_output_prelude (bstring args)
|
|
|
fa49311 |
{
|
|
|
fa49311 |
verbose_message("Initializing PRELUDE output processor.");
|
|
|
fa49311 |
profile = strdup((char *)bdata(args));
|
|
|
fa49311 |
+
|
|
|
fa49311 |
+ if (init_prelude() < 0)
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
+
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
diff -urp pads-1.2.orig/src/output/output-screen.c pads-1.2/src/output/output-screen.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/output/output-screen.c 2008-06-30 17:54:33.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/output/output-screen.c 2008-07-08 10:45:03.000000000 -0400
|
|
|
fa49311 |
@@ -55,6 +55,7 @@ setup_output_screen (void)
|
|
|
fa49311 |
if (plugin != NULL)
|
|
|
fa49311 |
free(plugin);
|
|
|
fa49311 |
log_message("warning: 'register_output_plugin' in function 'setup_output_screen' failed.");
|
|
|
fa49311 |
+ return -1;
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|
|
|
fa49311 |
return 0;
|
|
|
fa49311 |
diff -urp pads-1.2.orig/src/pads.c pads-1.2/src/pads.c
|
|
|
fa49311 |
--- pads-1.2.orig/src/pads.c 2008-07-08 10:53:14.000000000 -0400
|
|
|
fa49311 |
+++ pads-1.2/src/pads.c 2008-07-08 10:42:58.000000000 -0400
|
|
|
fa49311 |
@@ -228,13 +228,13 @@ init_pads (void)
|
|
|
fa49311 |
name = bfromcstr("screen");
|
|
|
fa49311 |
args = bfromcstr("");
|
|
|
fa49311 |
if ((activate_output_plugin(name, args)) == -1)
|
|
|
fa49311 |
- log_message("warning: 'activate_output_plugin' in function 'init_pads' failed.");
|
|
|
fa49311 |
+ err_message("Error: 'activate_output_plugin' in function 'init_pads' failed.");
|
|
|
fa49311 |
bdestroy(name);
|
|
|
fa49311 |
bdestroy(args);
|
|
|
fa49311 |
/* output: csv */
|
|
|
fa49311 |
name = bfromcstr("csv");
|
|
|
fa49311 |
if ((activate_output_plugin(name, gc.report_file)) == -1)
|
|
|
fa49311 |
- log_message("warning: 'activate_output_plugin' in function 'init_pads' failed.");
|
|
|
fa49311 |
+ err_message("Error: 'activate_output_plugin' in function 'init_pads' failed.");
|
|
|
fa49311 |
bdestroy(name);
|
|
|
fa49311 |
}
|
|
|
fa49311 |
|