diff options
author | Jeremy Allison <jra@samba.org> | 2002-09-04 19:13:06 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-09-04 19:13:06 +0000 |
commit | a1aafce4dc69b4bc4967ce9b70550ee3ecfab43b (patch) | |
tree | cb9d0440971ec41211f7de1dc095b90469961d97 /source3/smbd/connection.c | |
parent | 65029365ba9e2df821a57173c7532e4cbc7b06e9 (diff) | |
download | samba-a1aafce4dc69b4bc4967ce9b70550ee3ecfab43b.tar.gz samba-a1aafce4dc69b4bc4967ce9b70550ee3ecfab43b.tar.bz2 samba-a1aafce4dc69b4bc4967ce9b70550ee3ecfab43b.zip |
Add bcast_msg_flags to connection struct. Allows sender to filter when
sending broadcast messages. Also initial cut-down of printing notify
messages (not yet finished).
Jeremy.
(This used to be commit aca333719695b278843c59e1c6eb07d6655fd59c)
Diffstat (limited to 'source3/smbd/connection.c')
-rw-r--r-- | source3/smbd/connection.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 5609c2963d..bc897a95cb 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -28,10 +28,9 @@ static TDB_CONTEXT *tdb; TDB_CONTEXT *conn_tdb_ctx(void) { - if (!tdb) { + if (!tdb) tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, O_RDWR | O_CREAT, 0644); - } return tdb; } @@ -45,7 +44,8 @@ BOOL yield_connection(connection_struct *conn,char *name) struct connections_key key; TDB_DATA kbuf; - if (!tdb) return False; + if (!tdb) + return False; DEBUG(3,("Yielding connection to %s\n",name)); @@ -111,16 +111,16 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u Claim an entry in the connections database. ****************************************************************************/ -BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear) +BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOOL Clear, uint32 msg_flags) { struct connections_key key; struct connections_data crec; TDB_DATA kbuf, dbuf; - if (!tdb) { + if (!tdb) tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, O_RDWR | O_CREAT, 0644); - } + if (!tdb) return False; @@ -176,6 +176,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO lp_servicename(SNUM(conn)),sizeof(crec.name)-1); } crec.start = time(NULL); + crec.bcast_msg_flags = msg_flags; StrnCpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)-1); StrnCpy(crec.addr,conn?conn->client_address:client_addr(),sizeof(crec.addr)-1); |