diff options
author | wtc%netscape.com <devnull@localhost> | 2003-05-23 06:19:11 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-05-23 06:19:11 +0000 |
commit | 8114e7909e6f7d617d9193413380182636feb8ea (patch) | |
tree | cab3394c79e751cb2c9031c60b4d6be691434296 | |
parent | ce89c046945e19f2eb34ddd14c869706ccb48f32 (diff) | |
download | nspr-hg-8114e7909e6f7d617d9193413380182636feb8ea.tar.gz |
Print error codes if PR_Read fails.
-rw-r--r-- | pr/tests/sockping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pr/tests/sockping.c b/pr/tests/sockping.c index fb377903..477851c2 100644 --- a/pr/tests/sockping.c +++ b/pr/tests/sockping.c @@ -124,7 +124,8 @@ int main() memset(buf, 0, sizeof(buf)); nBytes = PR_Read(sock[0], buf, sizeof(buf)); if (nBytes == -1) { - fprintf(stderr, "PR_Read failed\n"); + fprintf(stderr, "PR_Read failed: (%d, %d)\n", + PR_GetError(), PR_GetOSError()); exit(1); } printf("ping process: received \"%s\"\n", buf); |