rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE
commita8fb0028fcd59826dccb60604965e335c15f7317
authorDavid Disseldorp <ddiss@samba.org>
Mon, 3 Mar 2014 18:49:35 +0000 (3 19:49 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 10 Mar 2014 15:20:47 +0000 (10 16:20 +0100)
treebaf5da7bacbf1fce4bfaa0406a5e70316c26993d
parentfd8d4699728a4db947bbce2ba4a52fcec39e780e
rpc_client: retry open on STATUS_PIPE_NOT_AVAILABLE

Windows Server starts some named pipe services on demand, and responds
to initial open requests with STATUS_PIPE_NOT_AVAILABLE. The FssagentRpc
named pipe on Windows Server 2012 exhibits this behaviour.

This change sees rpcclient retry named pipe open requests when the
server responds with STATUS_PIPE_NOT_AVAILABLE. The retry logic is
contained in an asynchronous tevent_timer callback, to allow for
non-blocking callers.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ebe6627c1f0e6b488a0c456860a055fd5701e84d)
[ddiss@samba.org: rebasead for 4.1 without 46d29d46bc065d51e3f7ca6892]

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10484
Initial FSRVP rpcclient requests fail with NT_STATUS_PIPE_NOT_AVAILABLE
source3/rpc_client/rpc_transport_np.c