diff --git a/AUTHORS b/AUTHORS index 1a71664..82e1d05 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,12 +1,20 @@ Main author and maintainer: John Tsiombikas -Serial device support (libsball): - John E. Stone - Contributors: - Doug LaRue, Krister Svanlun, Hans Meine, Jaroslaw Bulat, Pavel Frolov, - Robert Haschke, David Lister + Doug LaRue + Krister Svanlun + Hans Meine + Jaroslaw Bulat + Pavel Frolov, + Robert Haschke + David Lister + Stephen Hurd + Gaël Écorchard + Alberto Fanjul + +Serial device support in early versions (before the v0.8 rewrite): + John E. Stone NOTE: This file has been left untended for quite a while. There are bound to be contributions from people not listed here. If you ever contributed code to this diff --git a/src/cfgfile.c b/src/cfgfile.c index 72b27e5..c5c4a43 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -153,6 +153,7 @@ int read_cfg(const char *fname, struct cfg *cfg) if(!num_lines) num_lines = 1; /* add enough lines to be able to append any number of new options */ + free(cfglines); if(!(cfglines = calloc(num_lines + NUM_EXTRA_LINES, sizeof *cfglines))) { logmsg(LOG_WARNING, "failed to allocate config lines buffer (%d lines)\n", num_lines); unlock_cfgfile(fd); diff --git a/src/dev.c b/src/dev.c index 4186a10..b44bcfb 100644 --- a/src/dev.c +++ b/src/dev.c @@ -118,9 +118,9 @@ void init_devices_serial(void) strcpy(dev->path, cfg.serial_dev); if(open_dev_serial(dev) == -1) { remove_device(dev); - } else { - logmsg(LOG_INFO, "using device: %s\n", cfg.serial_dev); + return; } + logmsg(LOG_INFO, "using device: %s\n", cfg.serial_dev); /* new serial device added, send device change event */ ev.dev.type = EVENT_DEV; diff --git a/src/proto_x11.c b/src/proto_x11.c index 86dd82d..07d4ad2 100644 --- a/src/proto_x11.c +++ b/src/proto_x11.c @@ -224,7 +224,7 @@ int get_x11_socket(void) void send_xevent(spnav_event *ev, struct client *c) { int i; - XEvent xevent; + XEvent xevent = {0}; if(!dpy) return; @@ -396,18 +396,19 @@ static int xerr(Display *dpy, XErrorEvent *err) { char buf[512]; - if(verbose) { - logmsg(LOG_ERR, "xerr(%p, %p)\n", (void*)dpy, (void*)err); - } - if(err->error_code == BadWindow) { + if(verbose) { + logmsg(LOG_INFO, "Caught BadWindow, dropping client with window: %x\n", + (unsigned int)err->resourceid); + } /* we may get a BadWindow error when trying to send events to * clients that have disconnected in the meanwhile. */ remove_client_window((Window)err->resourceid); } else { XGetErrorText(dpy, err->error_code, buf, sizeof buf); - logmsg(LOG_ERR, "Caught unexpected X error: %s\n", buf); + logmsg(LOG_ERR, "Caught unexpected X error: %s [op: %d,%d, res: %u]\n", buf, + (int)err->request_code, (int)err->minor_code, (unsigned int)err->resourceid); } return 0; }