OLD | NEW |
1 // Copyright (c) 2008, Google Inc. | 1 // Copyright (c) 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Event to signal the client connection and pipe reads and writes. | 211 // Event to signal the client connection and pipe reads and writes. |
212 overlapped_.hEvent = CreateEvent(NULL, // Security descriptor. | 212 overlapped_.hEvent = CreateEvent(NULL, // Security descriptor. |
213 TRUE, // Manual reset. | 213 TRUE, // Manual reset. |
214 FALSE, // Initially signaled. | 214 FALSE, // Initially signaled. |
215 NULL); // Name. | 215 NULL); // Name. |
216 if (!overlapped_.hEvent) { | 216 if (!overlapped_.hEvent) { |
217 return false; | 217 return false; |
218 } | 218 } |
219 | 219 |
220 // Register a callback with the thread pool for the client connection. | 220 // Register a callback with the thread pool for the client connection. |
221 RegisterWaitForSingleObject(&pipe_wait_handle_, | 221 if (!RegisterWaitForSingleObject(&pipe_wait_handle_, |
222 overlapped_.hEvent, | 222 overlapped_.hEvent, |
223 OnPipeConnected, | 223 OnPipeConnected, |
224 this, | 224 this, |
225 INFINITE, | 225 INFINITE, |
226 kPipeIOThreadFlags); | 226 kPipeIOThreadFlags)) { |
| 227 return false; |
| 228 } |
227 | 229 |
228 pipe_ = CreateNamedPipe(pipe_name_.c_str(), | 230 pipe_ = CreateNamedPipe(pipe_name_.c_str(), |
229 kPipeAttr, | 231 kPipeAttr, |
230 kPipeMode, | 232 kPipeMode, |
231 1, | 233 1, |
232 kOutBufferSize, | 234 kOutBufferSize, |
233 kInBufferSize, | 235 kInBufferSize, |
234 0, | 236 0, |
235 pipe_sec_attrs_); | 237 pipe_sec_attrs_); |
236 if (pipe_ == INVALID_HANDLE_VALUE) { | 238 if (pipe_ == INVALID_HANDLE_VALUE) { |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 client_thread_id, | 845 client_thread_id, |
844 GetCurrentThreadId(), | 846 GetCurrentThreadId(), |
845 client_ex_info, | 847 client_ex_info, |
846 client.assert_info(), | 848 client.assert_info(), |
847 client.dump_type(), | 849 client.dump_type(), |
848 true, | 850 true, |
849 dump_path); | 851 dump_path); |
850 } | 852 } |
851 | 853 |
852 } // namespace google_breakpad | 854 } // namespace google_breakpad |
OLD | NEW |