diff options
author | Jean-François Micouleau <jfm@samba.org> | 2002-04-27 16:58:05 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2002-04-27 16:58:05 +0000 |
commit | 56de6fa4705d8e43049e8c862c024301e3ef78d3 (patch) | |
tree | dbd0e13d8312990ce075fca609e9f6d3be138bdf /source3/wrepld/partners.c | |
parent | 1d79e6b90eb6fc5ddc9c0b7320d1ec025f18f22f (diff) | |
download | samba-56de6fa4705d8e43049e8c862c024301e3ef78d3.tar.gz samba-56de6fa4705d8e43049e8c862c024301e3ef78d3.tar.bz2 samba-56de6fa4705d8e43049e8c862c024301e3ef78d3.zip |
this code has been sitting on one of my box for 3 months.
add wins push replication, better handling of partners, rewrote half of
parser.
I know some parser code need to be changed to better cope with multihomed
machine and groups.
J.F.
(This used to be commit a2d07bc6eb269c8048165947928b8b5643dc9a64)
Diffstat (limited to 'source3/wrepld/partners.c')
-rw-r--r-- | source3/wrepld/partners.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source3/wrepld/partners.c b/source3/wrepld/partners.c index abdaeaf2ee..11f8e3ffee 100644 --- a/source3/wrepld/partners.c +++ b/source3/wrepld/partners.c @@ -31,7 +31,9 @@ verify if we know this partner BOOL check_partner(int assoc) { int i; - + + DEBUG(0,("check_partner: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==assoc) return True; @@ -44,6 +46,8 @@ add a new entry to the list ********************************************************************/ BOOL add_partner(int client_assoc, int server_assoc, BOOL pull, BOOL push) { + DEBUG(0,("add_partner: total_current_partners: %d\n", total_current_partners)); + if (total_current_partners==64) return False; @@ -64,6 +68,8 @@ BOOL remove_partner(int client_assoc) { int i,j; + DEBUG(0,("remove_partner: total_current_partners: %d\n", total_current_partners)); + for (i=0; current_partners[i].client_assoc!=client_assoc && i<total_current_partners; i++) ; @@ -91,6 +97,8 @@ BOOL update_server_partner(int client_assoc, int server_assoc) { int i; + DEBUG(0,("update_server_partner: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==client_assoc) { current_partners[i].server_assoc=server_assoc; @@ -107,6 +115,8 @@ BOOL check_pull_partner(int assoc) { int i; + DEBUG(0,("check_pull_partner: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==assoc && current_partners[i].pull_partner==True) @@ -122,6 +132,8 @@ BOOL check_push_partner(int assoc) { int i; + DEBUG(0,("check_push_partner: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==assoc && current_partners[i].push_partner==True) @@ -137,6 +149,8 @@ int get_server_assoc(int assoc) { int i; + DEBUG(0,("get_server_assoc: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==assoc) return current_partners[i].server_assoc; @@ -152,6 +166,8 @@ BOOL write_server_assoc_table(int client_assoc, struct in_addr partner, struct i { int i; + DEBUG(0,("write_server_assoc_table: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==client_assoc) { current_partners[i].partner_server=partner; @@ -169,6 +185,8 @@ BOOL get_server_assoc_table(int client_assoc, struct in_addr *partner, struct in { int i; + DEBUG(0,("get_server_assoc_table: total_current_partners: %d\n", total_current_partners)); + for (i=0; i<total_current_partners; i++) if (current_partners[i].client_assoc==client_assoc) { partner->s_addr=current_partners[i].partner_server.s_addr; |