summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-25 11:48:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:14 -0500
commit223e78990a16f134a01d1223a0dad8b2accd5fed (patch)
tree96f634dc3fa74d9b4b6385ab67bbd3741d48bba2 /source4/smbd
parentd79c7d41da373dea7f95506c178b18f0dd896043 (diff)
downloadsamba-223e78990a16f134a01d1223a0dad8b2accd5fed.tar.gz
samba-223e78990a16f134a01d1223a0dad8b2accd5fed.tar.bz2
samba-223e78990a16f134a01d1223a0dad8b2accd5fed.zip
r2628: got rid of some warnings and converted a few more places to use hierarchical memory allocation
(This used to be commit 26da45a8019a2d6c9ff2ac2a6739c7d0b42b00de)
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/service.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/smbd/service.c b/source4/smbd/service.c
index 8f10c06dff..0733e6fc0f 100644
--- a/source4/smbd/service.c
+++ b/source4/smbd/service.c
@@ -101,9 +101,9 @@ struct server_context *server_service_startup(const char *model)
if you pass *port == 0, then a port > 1024 is used
*/
struct server_socket *service_setup_socket(struct server_service *service,
- const struct model_ops *model_ops,
- const char *sock_addr,
- uint16_t *port)
+ const struct model_ops *model_ops,
+ const char *sock_addr,
+ uint16_t *port)
{
NTSTATUS status;
struct server_socket *srv_sock;
@@ -155,7 +155,7 @@ struct server_socket *service_setup_socket(struct server_service *service,
return NULL;
}
- srv_sock = talloc_p(NULL, struct server_socket);
+ srv_sock = talloc_p(service, struct server_socket);
if (!srv_sock) {
DEBUG(0,("talloc_p(mem_ctx, struct server_socket) failed\n"));
socket_destroy(socket_ctx);
@@ -185,13 +185,16 @@ struct server_socket *service_setup_socket(struct server_service *service,
return srv_sock;
}
-struct server_connection *server_setup_connection(struct event_context *ev, struct server_socket *server_socket, struct socket_context *sock, time_t t)
+struct server_connection *server_setup_connection(struct event_context *ev,
+ struct server_socket *server_socket,
+ struct socket_context *sock,
+ time_t t)
{
struct fd_event fde;
struct timed_event idle;
struct server_connection *srv_conn;
- srv_conn = talloc_p(NULL, struct server_connection);
+ srv_conn = talloc_p(server_socket, struct server_connection);
if (!srv_conn) {
DEBUG(0,("talloc_p(mem_ctx, struct server_service_connection) failed\n"));
return NULL;