summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-06-01 20:43:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:51 -0500
commit03d4344432c6aa75d400afc501aec1a14070f35d (patch)
tree8abb111853211e521eeefcdf8ac5e4a5095ce664 /source3/smbd/process.c
parent027c5068cd29263cd57fd3723eeeea5b1fd3a4a9 (diff)
downloadsamba-03d4344432c6aa75d400afc501aec1a14070f35d.tar.gz
samba-03d4344432c6aa75d400afc501aec1a14070f35d.tar.bz2
samba-03d4344432c6aa75d400afc501aec1a14070f35d.zip
r971: Auto remove store dos attributes if underlying filesystem
doesn't support EA's. Jeremy. (This used to be commit 9de6b25c9e9abe982e21b0229df520802cafbfd8)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 12fd809b78..efbc66a0ac 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -61,23 +61,24 @@ uint16 get_current_mid(void)
for processing.
****************************************************************************/
-typedef struct {
- ubi_slNode msg_next;
+struct pending_message_list {
+ struct pending_message_list *next, *prev;
char *msg_buf;
int msg_len;
-} pending_message_list;
+};
-static ubi_slList smb_oplock_queue = { NULL, (ubi_slNodePtr)&smb_oplock_queue, 0};
+static struct pending_message_list *smb_oplock_queue;
/****************************************************************************
Function to push a message onto the tail of a linked list of smb messages ready
for processing.
****************************************************************************/
-static BOOL push_message(ubi_slList *list_head, char *buf, int msg_len)
+static BOOL push_message(struct pending_message_list *list_head, char *buf, int msg_len)
{
- pending_message_list *msg = (pending_message_list *)
- malloc(sizeof(pending_message_list));
+ struct pending_message_list *tmp_msg;
+ struct pending_message_list *msg = (struct pending_message_list *)
+ malloc(sizeof(struct pending_message_list));
if(msg == NULL) {
DEBUG(0,("push_message: malloc fail (1)\n"));
@@ -94,7 +95,7 @@ static BOOL push_message(ubi_slList *list_head, char *buf, int msg_len)
memcpy(msg->msg_buf, buf, msg_len);
msg->msg_len = msg_len;
- ubi_slAddTail( list_head, msg);
+ DLIST_ADD_END(list_head, msg, tmp_msg);
/* Push the MID of this packet on the signing queue. */
srv_defer_sign_response(SVAL(buf,smb_mid));
@@ -109,7 +110,7 @@ static BOOL push_message(ubi_slList *list_head, char *buf, int msg_len)
BOOL push_oplock_pending_smb_message(char *buf, int msg_len)
{
- return push_message(&smb_oplock_queue, buf, msg_len);
+ return push_message(smb_oplock_queue, buf, msg_len);
}
/****************************************************************************
@@ -185,11 +186,12 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout)
* Check to see if we already have a message on the smb queue.
* If so - copy and return it.
*/
- if(ubi_slCount(&smb_oplock_queue) != 0) {
- pending_message_list *msg = (pending_message_list *)ubi_slRemHead(&smb_oplock_queue);
+ if(smb_oplock_queue != NULL) {
+ struct pending_message_list *msg = smb_oplock_queue;
memcpy(buffer, msg->msg_buf, MIN(buffer_len, msg->msg_len));
/* Free the message we just copied. */
+ DLIST_REMOVE(smb_oplock_queue, msg);
SAFE_FREE(msg->msg_buf);
SAFE_FREE(msg);