From: robertl Date: Wed, 18 Nov 2009 15:10:32 +0000 (+0000) Subject: Delbin: Report internal error. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~199^2~109 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=df3dbfbe3f9350232aff22439a90ce9b1f77f839;p=gpsbabel.git Delbin: Report internal error. --- diff --git a/delbin.c b/delbin.c index 2359de58d..48b499f41 100644 --- a/delbin.c +++ b/delbin.c @@ -151,6 +151,7 @@ static waypoint** wp_array; #define MSG_CAPABILITIES 0xb001 #define MSG_DELETE 0xb005 #define MSG_DELETE_SIZE 67 +#define MSG_ERROR 0xa003 #define MSG_NAVIGATION 0xa010 #define MSG_REQUEST_ROUTES 0xb051 #define MSG_REQUEST_ROUTES_SIZE 65 @@ -772,6 +773,10 @@ message_read(unsigned msg_id, message_t* m) if (id == 0) { break; } + if (id == MSG_ERROR) { + const gbuint8* p = m->data; + fatal(MYNAME ": device error %u: \"%s\"\n", *p, p + 1); + } message_ack(id, m); if (id == msg_id || time(NULL) - time_start >= READ_TIMEOUT) { break;