diff --git a/serval.h b/serval.h index da0d0190..ac1fa62a 100644 --- a/serval.h +++ b/serval.h @@ -861,6 +861,6 @@ extern int last_radio_temperature; int rhizome_active_fetch_count(); int rhizome_active_fetch_bytes_received(int q); extern long long bundles_available; - +extern char crash_handler_clue[1024]; #endif // __SERVALD_SERVALD_H diff --git a/server.c b/server.c index e64a1cea..eb98b4aa 100644 --- a/server.c +++ b/server.c @@ -361,6 +361,7 @@ void signal_handler(int signal) char buf[80]; signame(buf, sizeof(buf), signal); INFOF("Caught %s", buf); + WHYF("The following clue may help: %s",crash_handler_clue); dump_stack(); switch (signal) { @@ -378,11 +379,13 @@ void signal_handler(int signal) exit(0); } +char crash_handler_clue[1024]="no clue"; void crash_handler(int signal) { char buf[80]; signame(buf, sizeof(buf), signal); WHYF("Caught %s", buf); + WHYF("The following clue may help: %s",crash_handler_clue); dump_stack(); BACKTRACE; if (config.server.respawn_on_crash) { diff --git a/slip.c b/slip.c index 5aec37f1..eb515019 100644 --- a/slip.c +++ b/slip.c @@ -195,7 +195,9 @@ int upper7_decode(struct slip_decode_state *state,unsigned char byte) { IN() if (config.debug.slipdecode) - DEBUGF("state=%d, byte=0x%02x",state->state,byte); + snprintf(crash_handler_clue,1024, + "upper7_decode(): state=%d, byte=0x%02x, rssi_len=%d, dst_offset=%d", + state->state,byte,state->rssi_len,state->dst_offset); // Parse out inline RSSI reports if (byte=='{') {