Re: [PATCH 4/7] simple-ipc/ipc-win32: add trace2 debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 9/16/21 1:40 AM, Ævar Arnfjörð Bjarmason wrote:

On Wed, Sep 15 2021, Jeff Hostetler via GitGitGadget wrote:

@@ -112,6 +115,11 @@ static enum ipc_active_state connect_to_server(
  				if (GetLastError() == ERROR_SEM_TIMEOUT)
  					return IPC_STATE__NOT_LISTENING;
+ gle = GetLastError();
+				trace2_data_intmax("ipc-debug", NULL,
+						   "connect/waitpipe/gle",
+						   (intmax_t)gle);
+
  				return IPC_STATE__OTHER_ERROR;
  			}
...
>
@@ -109,9 +109,12 @@ static enum ipc_active_state connect_to_server(
  			t_start_ms = (DWORD)(getnanotime() / 1000000);
if (!WaitNamedPipeW(wpath, timeout_ms)) {
-				if (GetLastError() == ERROR_SEM_TIMEOUT)
+				gle = GetLastError();
+				if (gle == ERROR_SEM_TIMEOUT)
  					return IPC_STATE__NOT_LISTENING;
+ /* ...rest of your patch */
+
  				return IPC_STATE__OTHER_ERROR;
  			}

Yeah, I was just trying to minimize the size of the diff
and at the time was considering those debug messages to be
temporary, but I kind of like having them so it makes sense
to clean up a bit as you've indicated.

Thanks
Jeff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux