void set_socket_options(int fd, char *options);
void close_sockets(void);
ssize_t write_socket(int fd, char *buf, size_t len);
-int write_data_outstanding(int fd, unsigned int time_out);
+int write_data_outstanding(int fd, unsigned int time_out, BOOL *more);
int read_data_outstanding(int fd, unsigned int time_out);
ssize_t read_udp_socket(int fd, char *buf, size_t len);
ssize_t read_with_timeout(int fd, char *buf, size_t mincnt, size_t maxcnt,
typedef struct user_creds
{
- BOOL reuse;
+ uint32 reuse;
uint32 ptr_ntc;
uint32 ptr_uxc;
/*******************************************************************
checks if write data is outstanding.
********************************************************************/
-int write_data_outstanding(int fd, unsigned int time_out)
+int write_data_outstanding(int fd, unsigned int time_out, BOOL *more)
{
int selrtn;
fd_set fds;
{
return selrtn;
}
- return FD_ISSET(fd, &fds) ? 1 : 0;
+ (*more) = FD_ISSET(fd, &fds);
+ return selrtn;
}
/*******************************************************************
{
int selrtn;
int timeout = SMBD_SELECT_TIMEOUT * 1000;
+ BOOL more;
smb_read_error = 0;
- selrtn = write_data_outstanding(l->c, timeout);
+ selrtn = write_data_outstanding(l->c, timeout, &more);
/* Check if error */
if (selrtn == -1)
return;
}
- if (!msrpc_send(l->c, &l->rsmb_pdu))
+ if (more)
{
- DEBUG(1,("msrpc_send: failed\n"));
+ if (!msrpc_send(l->c, &l->rsmb_pdu))
+ {
+ prs_free_data(&l->rsmb_pdu);
+ }
+ break;
}
prs_free_data(&l->rsmb_pdu);
}
return;
}
fstrcpy(to->user_name, from->user_name);
-};
+}
void copy_unix_sec_creds(CREDS_UNIX_SEC *to, const CREDS_UNIX_SEC *from)
{
to->num_grps = from->num_grps;
memcpy(to->grps, from->grps, size);
}
-};
+}
void copy_nt_creds(struct ntuser_creds *to,
const struct ntuser_creds *from)
DEBUG(10,("copy_nt_creds: user %s domain %s nopw %s flgs: %x\n",
to->user_name, to->domain, BOOLSTR(pwd_is_nullpwd(&to->pwd)),
to->ntlmssp_flags));
-};
+}
void copy_user_creds(struct user_creds *to,
const struct user_creds *from)
{
copy_unix_sec_creds(&to->uxs, &from->uxs);
}
-};
+}
void free_user_creds(struct user_creds *creds)
{