svn commit: samba r10577 - in
branches/SAMBA_4_0/testprogs/win32/npecho: .
jelmer at samba.org
jelmer at samba.org
Wed Sep 28 13:55:19 GMT 2005
Author: jelmer
Date: 2005-09-28 13:55:19 +0000 (Wed, 28 Sep 2005)
New Revision: 10577
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10577
Log:
Fix error in ReadFile()
Modified:
branches/SAMBA_4_0/testprogs/win32/npecho/npecho_client.c
Changeset:
Modified: branches/SAMBA_4_0/testprogs/win32/npecho/npecho_client.c
===================================================================
--- branches/SAMBA_4_0/testprogs/win32/npecho/npecho_client.c 2005-09-28 13:47:39 UTC (rev 10576)
+++ branches/SAMBA_4_0/testprogs/win32/npecho/npecho_client.c 2005-09-28 13:55:19 UTC (rev 10577)
@@ -13,7 +13,7 @@
{
HANDLE h;
DWORD numread = 0;
- char outbuffer[512];
+ char *outbuffer = malloc(strlen(ECHODATA));
if (argc == 1) {
printf("Usage: %s pipename\n", argv[0]);
@@ -27,12 +27,12 @@
return -1;
}
- if (!WriteFile(h, ECHODATA, strlen(ECHODATA), NULL, NULL)) {
+ if (!WriteFile(h, ECHODATA, strlen(ECHODATA), &numread, NULL)) {
printf("Error writing: %d\n", GetLastError());
return -1;
}
- if (!ReadFile(h, outbuffer, strlen(ECHODATA), NULL, NULL)) {
+ if (!ReadFile(h, outbuffer, strlen(ECHODATA), &numread, NULL)) {
printf("Error reading: %d\n", GetLastError());
return -1;
}
More information about the samba-cvs
mailing list