summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-02 16:07:08 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-05 11:31:15 +0200
commit1b806d83b723216e3e16778ce33ae710fab2c011 (patch)
tree1c8323c6b1090f1af96cae57815729c19ba105f8 /source3
parent160ead46dc13e908903e70e372bdafc2ba8f4615 (diff)
downloadsamba-1b806d83b723216e3e16778ce33ae710fab2c011.tar.gz
samba-1b806d83b723216e3e16778ce33ae710fab2c011.tar.bz2
samba-1b806d83b723216e3e16778ce33ae710fab2c011.zip
s3:smbd: make smbd_server_connection_terminate() a macro
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h6
-rw-r--r--source3/smbd/smb2_server.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 2e5bc913d0..26e63f1be4 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -170,6 +170,12 @@ NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
const struct iovec *vector,
int count);
+void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
+ const char *reason,
+ const char *location);
+#define smbd_server_connection_terminate(sconn, reason) \
+ smbd_server_connection_terminate_ex(sconn, reason, __location__)
+
bool smbd_is_smb2_header(const uint8_t *inbuf, size_t size);
void reply_smb2002(struct smb_request *req, uint16_t choice);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index f4dc7c4f46..e797bdd9ee 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -277,10 +277,12 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
return NT_STATUS_OK;
}
-static void smbd_server_connection_terminate(struct smbd_server_connection *conn,
- const char *reason)
+void smbd_server_connection_terminate_ex(struct smbd_server_connection *sconn,
+ const char *reason,
+ const char *location)
{
- DEBUG(10,("smbd_server_connection_terminate: reason[%s]\n", reason));
+ DEBUG(10,("smbd_server_connection_terminate_ex: reason[%s] at %s\n",
+ reason, location));
exit_server_cleanly(reason);
}