summaryrefslogtreecommitdiffstats
path: root/src/trigger.c
diff options
context:
space:
mode:
authormikeymell <mikeymell@users.noreply.github.com>2018-07-24 11:16:01 +0300
committermikeymell <mikeymell@users.noreply.github.com>2018-07-24 11:16:01 +0300
commite90a99ada888ac6199becd7dd1487b33a4e36af5 (patch)
tree3fb58eb864ba63a02f4641572beb6a1629af7e8b /src/trigger.c
parent388da02e1b649fa9a82bc68c23b73d319b3645f3 (diff)
Use sc_info to report trigger exit code
Diffstat (limited to 'src/trigger.c')
-rw-r--r--src/trigger.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/trigger.c b/src/trigger.c
index 58ffa4b..c12719d 100644
--- a/src/trigger.c
+++ b/src/trigger.c
@@ -232,9 +232,12 @@ void do_trigger( struct ent *p , int rw) {
*/
void do_C_Trigger_cell(struct ent * p, int rw) {
+ int status;
int (*function)(struct ent *, int );
function = p->trigger->c_function;
- printf ("%d\n", (*function)(p,rw ));
+ if ( (status = (*function)(p,rw ))) {
+ sc_info("Trigger reported error code: %d", status);
+ }
return;
}