summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-events.c
Commit message (Collapse)AuthorAgeFilesLines
* win: Use correct format string for intptr_tChristophe Fergeau2015-01-021-1/+2
| | | | | | | | | Using %d as a format-specifier for intptr_t causes a warning with mingw64: virt-viewer-events.c: In function 'virt_viewer_events_add_handle': virt-viewer-events.c:103:5: warning: format '%d' expects argument of type 'int', but argument 5 has type 'intptr_t' [-Wformat=] g_debug("Converted fd %d to handle %d", fd, _get_osfhandle(fd));
* Replace DEBUG_LOG with g_debugMarc-André Lureau2014-06-101-14/+14
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1107518
* Fix virt-viewer.exe on win32Daniel P. Berrange2014-01-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Libvirt uses gnulib for making winsock look like POSIX sockets. This means that in the libvirt event handle callbacks the application will be given a file descriptor rather than a winsock HANDLE object. The g_io_channel_unix_new method will detect that it is an FD and delegate to the g_io_channel_win32_new_fd method. Unfortunately the glib Win32 event loop impl is not very good at dealing with FD objects, simulating poll() by doing a read() on the FD :-( The API docs for g_io_channel_win32_new_fd say "All reads from the file descriptor should be done by this internal GLib thread. Your code should call only g_io_channel_read()." This isn't going to fly for libvirt, since it has zero knowledge of glib at all, so is just doing normal read(). Fortunately we can work around this problem by turning the FD we get from libvirt back into a HANDLE using the _get_osfhandle() method. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* Add config.h to every source fileDaniel P. Berrange2012-02-061-0/+1
|
* Update copyright headersDaniel P. Berrange2012-02-061-1/+1
|
* Convert TABS to spaces & reindent everywhereDaniel P. Berrange2012-02-061-11/+18
|
* ff callbacks must be invoked from a clean stackGuido Günther2011-08-161-8/+39
| | | | | | | If 'ff' callbacks are invoked directly from the remove callback they will likely deadlock in libvirt. They must be invoked from a clean stack, so switch to using a glib idle callback.
* Update to optionally build with GTK3Daniel P. Berrange2011-07-111-7/+7
|
* Introduce standard naming convention to files & methodsDaniel P. Berrange2011-07-011-0/+317
All source files must be named virt-viewer-XXXX All methods named virt_viewer_XXX