mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
Print error codes if PR_Read fails.
This commit is contained in:
parent
285c623645
commit
edfd28316b
@ -124,7 +124,8 @@ int main()
|
|||||||
memset(buf, 0, sizeof(buf));
|
memset(buf, 0, sizeof(buf));
|
||||||
nBytes = PR_Read(sock[0], buf, sizeof(buf));
|
nBytes = PR_Read(sock[0], buf, sizeof(buf));
|
||||||
if (nBytes == -1) {
|
if (nBytes == -1) {
|
||||||
fprintf(stderr, "PR_Read failed\n");
|
fprintf(stderr, "PR_Read failed: (%d, %d)\n",
|
||||||
|
PR_GetError(), PR_GetOSError());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
printf("ping process: received \"%s\"\n", buf);
|
printf("ping process: received \"%s\"\n", buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user