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 | aca333719695b278843c59e1c6eb07d6655fd59c (patch) | |
tree | c0fc2d9dd745ab3c385e2e24916a664a2ad6726b /source/smbd/connection.c | |
parent | 13dc9e37d2422c45ac5005dce26b349f88dbe505 (diff) | |
download | samba-aca333719695b278843c59e1c6eb07d6655fd59c.tar.gz samba-aca333719695b278843c59e1c6eb07d6655fd59c.tar.xz samba-aca333719695b278843c59e1c6eb07d6655fd59c.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.
Diffstat (limited to 'source/smbd/connection.c')
-rw-r--r-- | source/smbd/connection.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/smbd/connection.c b/source/smbd/connection.c index 5609c2963d8..bc897a95cb3 100644 --- a/source/smbd/connection.c +++ b/source/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); |