From 42cfffae80480eae4381902fff3f7c61f858a933 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 7 Dec 2007 17:32:32 -0800 Subject: Remove next_token - all uses must now be next_token_talloc. No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de) --- source3/lib/util_sock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_sock.c') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index e49db340ae..e919cc5a46 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -785,9 +785,10 @@ static void print_socket_options(int s) void set_socket_options(int fd, const char *options) { - fstring tok; + TALLOC_CTX *ctx = talloc_stackframe(); + char *tok; - while (next_token(&options,tok," \t,", sizeof(tok))) { + while (next_token_talloc(ctx, &options, &tok," \t,")) { int ret=0,i; int value = 1; char *p; @@ -836,6 +837,7 @@ void set_socket_options(int fd, const char *options) } } + TALLOC_FREE(ctx); print_socket_options(fd); } -- cgit