r618: Bug #1333. Fix a problem pointed out by coolo where I was trying to ensure
authorRichard Sharpe <sharpe@samba.org>
Sun, 9 May 2004 22:39:39 +0000 (22:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:51:31 +0000 (10:51 -0500)
that the errno is not trashed by a DEBUG statement, but screwed up.
(This used to be commit e642f3e7b7a5fdbb5d12136c909e9c57e7cf1985)

source3/libsmb/libsmbclient.c

index 949c5ffab670f0ec1b928a2df922e2fddf04be9b..e44bdea2d3d3cb9eed50cc3e529f6c3252cf45be 100644 (file)
@@ -686,7 +686,7 @@ SMBCSRV *smbc_server(SMBCCTX *context,
        if (context->callbacks.add_cached_srv_fn(context, srv, server, share, workgroup, username)) {
                int saved_errno = errno;
                DEBUG(3, (" Failed to add server to cache\n"));
-               saved_errno = errno;
+               errno = saved_errno;
                if (errno == 0) {
                        errno = ENOMEM;
                }