Author: metze Date: 2006-01-20 12:26:09 +0000 (Fri, 20 Jan 2006) New Revision: 13050
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13050 Log: 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 Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c Changeset: Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c =================================================================== --- branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c 2006-01-20 06:42:16 UTC (rev 13049) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c 2006-01-20 12:26:09 UTC (rev 13050) @@ -402,14 +402,20 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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);