fix calls to krb5_net_{read,write}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3910 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -239,7 +239,7 @@ doit(krb5_context context,
|
||||
out_len = snprintf (out_buf, sizeof(out_buf),
|
||||
"USER %s\r\nPASS hej\r\nSTAT\r\n",
|
||||
user);
|
||||
if (krb5_net_write (context, s, out_buf, out_len) != out_len)
|
||||
if (krb5_net_write (context, &s, out_buf, out_len) != out_len)
|
||||
err (1, "write");
|
||||
if (verbose > 1)
|
||||
write (STDERR_FILENO, out_buf, out_len);
|
||||
@@ -295,10 +295,13 @@ doit(krb5_context context,
|
||||
close(out_fd);
|
||||
if (leavep) {
|
||||
state = QUIT;
|
||||
krb5_net_write (context, s, "QUIT\r\n", 6);
|
||||
if (verbose > 1)
|
||||
krb5_net_write (context, STDERR_FILENO,
|
||||
krb5_net_write (context, &s,
|
||||
"QUIT\r\n", 6);
|
||||
if (verbose > 1) {
|
||||
int foo = STDERR_FILENO;
|
||||
krb5_net_write (context, &foo,
|
||||
"QUIT\r\n", 6);
|
||||
}
|
||||
} else {
|
||||
if (forkp) {
|
||||
pid_t pid;
|
||||
@@ -335,10 +338,12 @@ doit(krb5_context context,
|
||||
} else if (state == DELE) {
|
||||
if (++deleted == count) {
|
||||
state = QUIT;
|
||||
krb5_net_write (context, s, "QUIT\r\n", 6);
|
||||
if (verbose > 1)
|
||||
krb5_net_write (context, STDERR_FILENO,
|
||||
krb5_net_write (context, &s, "QUIT\r\n", 6);
|
||||
if (verbose > 1) {
|
||||
int foo = STDERR_FILENO;
|
||||
krb5_net_write (context, &foo,
|
||||
"QUIT\r\n", 6);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (++state == STAT) {
|
||||
@@ -350,10 +355,12 @@ doit(krb5_context context,
|
||||
count, bytes);
|
||||
if (count == 0) {
|
||||
state = QUIT;
|
||||
krb5_net_write (context, s, "QUIT\r\n", 6);
|
||||
if (verbose > 1)
|
||||
krb5_net_write (context, STDERR_FILENO,
|
||||
"QUIT\r\n", 6);
|
||||
krb5_net_write (context, &s, "QUIT\r\n", 6);
|
||||
if (verbose > 1) {
|
||||
int foo = STDERR_FILENO;
|
||||
krb5_net_write (context, &foo,
|
||||
"QUIT\r\n", 6);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -376,7 +383,7 @@ doit(krb5_context context,
|
||||
else if(state == DELE)
|
||||
out_len = snprintf (out_buf, sizeof(out_buf),
|
||||
"DELE %u\r\n", ++asked_deleted);
|
||||
if (krb5_net_write (context, s, out_buf, out_len) != out_len)
|
||||
if (krb5_net_write (context, &s, out_buf, out_len) != out_len)
|
||||
err (1, "write");
|
||||
if (verbose > 1)
|
||||
write (STDERR_FILENO, out_buf, out_len);
|
||||
|
Reference in New Issue
Block a user