|
103 | 103 |
|
104 | 104 | WINE_DEFAULT_DEBUG_CHANNEL(rpc);
|
105 | 105 |
|
106 |
| -#undef ERR |
107 |
| -#define ERR FIXME |
108 |
| - |
109 | 106 | static RPC_STATUS RPCRT4_SpawnConnection(RpcConnection** Connection, RpcConnection* OldConnection);
|
110 | 107 |
|
111 | 108 | /**** ncacn_np support ****/
|
@@ -225,21 +222,13 @@ static RPC_STATUS rpcrt4_conn_open_pipe(RpcConnection *Connection, LPCSTR pname,
|
225 | 222 | if (pipe != INVALID_HANDLE_VALUE) break;
|
226 | 223 | err = GetLastError();
|
227 | 224 | if (err == ERROR_PIPE_BUSY) {
|
228 |
| - ERR("connection to %s failed, error=%x\n", pname, err); |
| 225 | + TRACE("connection failed, error=%x\n", err); |
229 | 226 | return RPC_S_SERVER_TOO_BUSY;
|
230 | 227 | }
|
231 |
| - if(wait) ERR("Waiting for pipe instance"); |
232 |
| - if(wait) |
233 |
| - { |
234 |
| - if (!WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { |
235 |
| - err = GetLastError(); |
236 |
| - ERR("connection to %s failed, error=%x, wait %x\n", pname, err, wait); |
237 |
| - return RPC_S_SERVER_UNAVAILABLE; |
238 |
| - } |
239 |
| - else |
240 |
| - { |
241 |
| - ERR("Pipe Instance Ready!!!!!!!!!!!!!!!!!!\n"); |
242 |
| - } |
| 228 | + if (!wait || !WaitNamedPipeA(pname, NMPWAIT_WAIT_FOREVER)) { |
| 229 | + err = GetLastError(); |
| 230 | + WARN("connection failed, error=%x\n", err); |
| 231 | + return RPC_S_SERVER_UNAVAILABLE; |
243 | 232 | }
|
244 | 233 | }
|
245 | 234 |
|
@@ -469,6 +458,7 @@ static int rpcrt4_conn_np_write(RpcConnection *Connection,
|
469 | 458 | bytes_left -= bytes_written;
|
470 | 459 | buf += bytes_written;
|
471 | 460 | }
|
| 461 | + CloseHandle(ovl.hEvent); |
472 | 462 | return ret ? count : -1;
|
473 | 463 | }
|
474 | 464 |
|
|
0 commit comments