Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: src/eventloop-integration.cpp

Issue 1648006: Apply patch from ebuild file to fix toString (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/error.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * 2 *
3 * D-Bus++ - C++ bindings for D-Bus 3 * D-Bus++ - C++ bindings for D-Bus
4 * 4 *
5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com> 5 * Copyright (C) 2005-2007 Paolo Durante <shackan@gmail.com>
6 * 6 *
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 debug_log("leaving dispatcher %p", this); 85 debug_log("leaving dispatcher %p", this);
86 } 86 }
87 87
88 void BusDispatcher::leave() 88 void BusDispatcher::leave()
89 { 89 {
90 _running = false; 90 _running = false;
91 91
92 int ret = write(_fdunlock[1],"exit",strlen("exit")); 92 int ret = write(_fdunlock[1],"exit",strlen("exit"));
93 » if (ret == -1) throw Error("WriteError:errno", toString(errno).c_str()); 93 » if (ret == -1) {
94 94 char buffer[128]; // buffer copied in Error constructor
95 throw Error("PipeError:errno", strerror_r(errno,
96 buffer,
97 sizeof(buffer)));
98 }
95 close(_fdunlock[1]); 99 close(_fdunlock[1]);
96 close(_fdunlock[0]); 100 close(_fdunlock[0]);
97 } 101 }
98 102
99 void BusDispatcher::do_iteration() 103 void BusDispatcher::do_iteration()
100 { 104 {
101 dispatch_pending(); 105 dispatch_pending();
102 dispatch(); 106 dispatch();
103 } 107 }
104 108
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 flags |= DBUS_WATCH_READABLE; 169 flags |= DBUS_WATCH_READABLE;
166 if (watch->state() & POLLOUT) 170 if (watch->state() & POLLOUT)
167 flags |= DBUS_WATCH_WRITABLE; 171 flags |= DBUS_WATCH_WRITABLE;
168 if (watch->state() & POLLHUP) 172 if (watch->state() & POLLHUP)
169 flags |= DBUS_WATCH_HANGUP; 173 flags |= DBUS_WATCH_HANGUP;
170 if (watch->state() & POLLERR) 174 if (watch->state() & POLLERR)
171 flags |= DBUS_WATCH_ERROR; 175 flags |= DBUS_WATCH_ERROR;
172 176
173 watch->handle(flags); 177 watch->handle(flags);
174 } 178 }
175
OLDNEW
« no previous file with comments | « src/error.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698