summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-20 12:26:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:19 -0500
commit4915f16ab23f3c8e2e98fc0d90696e2d7a7bd6a0 (patch)
tree3b94a51ed3fea2a7f2686e132d9f3ea72bd4e23c
parentefe7ed72b5c3b454e801cdac092b75eeb2d30de8 (diff)
downloadsamba-4915f16ab23f3c8e2e98fc0d90696e2d7a7bd6a0.tar.gz
samba-4915f16ab23f3c8e2e98fc0d90696e2d7a7bd6a0.tar.bz2
samba-4915f16ab23f3c8e2e98fc0d90696e2d7a7bd6a0.zip
r13050: when we have reloaded the partners from wins_config.ldb
after a new partner connects, try to find the partner struct on a per call basis if it's not present on the connection yet add some more useful debug messages metze (This used to be commit e57158e216e3564faa337288734d9efb30ab838d)
-rw-r--r--source4/wrepl_server/wrepl_in_call.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/source4/wrepl_server/wrepl_in_call.c b/source4/wrepl_server/wrepl_in_call.c
index 46ee25b7ad..3365a1f146 100644
--- a/source4/wrepl_server/wrepl_in_call.c
+++ b/source4/wrepl_server/wrepl_in_call.c
@@ -402,14 +402,20 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
if (!call->wreplconn->partner) {
struct socket_address *partner_ip = socket_get_peer_addr(call->wreplconn->conn->socket, call);
- DEBUG(1,("Failing WINS replication from non-partner %s\n",
- partner_ip ? partner_ip->addr : NULL));
- return wreplsrv_in_stop_assoc_ctx(call);
+
+ call->wreplconn->partner = wreplsrv_find_partner(call->wreplconn->service, partner_ip->addr);
+ if (!call->wreplconn->partner) {
+ DEBUG(1,("Failing WINS replication from non-partner %s\n",
+ partner_ip ? partner_ip->addr : NULL));
+ return wreplsrv_in_stop_assoc_ctx(call);
+ }
}
switch (repl_in->command) {
case WREPL_REPL_TABLE_QUERY:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PUSH)) {
+ DEBUG(2,("Failing WINS replication TABLE_QUERY from non-push-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_table_query(call);
@@ -420,6 +426,8 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
case WREPL_REPL_SEND_REQUEST:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PUSH)) {
+ DEBUG(2,("Failing WINS replication SEND_REQUESET from non-push-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_send_request(call);
@@ -430,6 +438,8 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
case WREPL_REPL_UPDATE:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PULL)) {
+ DEBUG(2,("Failing WINS replication UPDATE from non-pull-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_update(call);
@@ -437,6 +447,8 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
case WREPL_REPL_UPDATE2:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PULL)) {
+ DEBUG(2,("Failing WINS replication UPDATE2 from non-pull-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_update2(call);
@@ -444,6 +456,8 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
case WREPL_REPL_INFORM:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PULL)) {
+ DEBUG(2,("Failing WINS replication INFORM from non-pull-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_inform(call);
@@ -451,6 +465,8 @@ static NTSTATUS wreplsrv_in_replication(struct wreplsrv_in_call *call)
case WREPL_REPL_INFORM2:
if (!(call->wreplconn->partner->type & WINSREPL_PARTNER_PULL)) {
+ DEBUG(2,("Failing WINS replication INFORM2 from non-pull-partner %s\n",
+ call->wreplconn->partner->address));
return wreplsrv_in_stop_assoc_ctx(call);
}
status = wreplsrv_in_inform2(call);