summaryrefslogtreecommitdiff
path: root/source4/libcli/composite
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-10-16 12:43:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:48 -0500
commitd68319431e62e43c0ecb23328e3162128d823958 (patch)
tree9a798646b260534b8f293f3facc925bb1058dd6e /source4/libcli/composite
parent17355fbbd4c4a904bb75c1d8ba98948edaf0fe68 (diff)
downloadsamba-d68319431e62e43c0ecb23328e3162128d823958.tar.gz
samba-d68319431e62e43c0ecb23328e3162128d823958.tar.bz2
samba-d68319431e62e43c0ecb23328e3162128d823958.zip
r11095: Implement wb_getuserdomgroups.
Tridge, if you have the time, you might want to look at a problem I'm having with unix domain stream sockets. From a comment in this commit: /* Using composite_trigger_error here causes problems with the client * socket. Linux 2.6.8 gives me a ECONNRESET on the next read after * writing the reply when I don't wait the 100 milliseconds. */ This is in winbind/wb_cmd_userdomgroups.c:93. The problem I have is that I can not *immediately* send an error reply to the client because the next receive fails. Waiting 100 milliseconds helps. It might also be a problem with epoll(), I don't really know. I'd appreciate if you took a brief look at this, maybe I'm doing something wrong. Thanks, Volker (This used to be commit 3e535cce743710a68a4264e4f66e9c0c4d6770c6)
Diffstat (limited to 'source4/libcli/composite')
-rw-r--r--source4/libcli/composite/composite.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c
index f5eed77300..c78d039905 100644
--- a/source4/libcli/composite/composite.c
+++ b/source4/libcli/composite/composite.c
@@ -69,6 +69,13 @@ void composite_trigger_done(struct composite_context *c)
event_add_timed(c->event_ctx, c, timeval_zero(), composite_trigger, c);
}
+void composite_trigger_error(struct composite_context *c)
+{
+ c->state = COMPOSITE_STATE_ERROR;
+ /* a zero timeout means immediate */
+ event_add_timed(c->event_ctx, c, timeval_zero(), composite_trigger, c);
+}
+
/*
* Some composite helpers that are handy if you write larger composite