From 9e21b4458c58607993935c7a05d114103606bea2 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sat, 30 Oct 2010 20:06:02 +1000 Subject: Fix segfault with unix domain sockets Path argument was not being set. Signed-off-by: Steve Bennett --- jim-aio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'jim-aio.c') diff --git a/jim-aio.c b/jim-aio.c index 21a16d2..2de776f 100644 --- a/jim-aio.c +++ b/jim-aio.c @@ -1028,6 +1028,10 @@ static int JimAioSockCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) hdlfmt = "aio.sock%ld"; + if (argc > 2) { + hostportarg = Jim_GetString(argv[2], NULL); + } + switch (socktype) { case SOCK_DGRAM_CLIENT: if (argc == 2) { @@ -1049,8 +1053,6 @@ static int JimAioSockCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) goto wrongargs; } - hostportarg = Jim_GetString(argv[2], NULL); - if (ipv6) { if (JimParseIPv6Address(interp, hostportarg, &sa, &salen) != JIM_OK) { return JIM_ERR; @@ -1083,8 +1085,6 @@ static int JimAioSockCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) goto wrongargs; } - hostportarg = Jim_GetString(argv[2], NULL); - if (ipv6) { if (JimParseIPv6Address(interp, hostportarg, &sa, &salen) != JIM_OK) { return JIM_ERR; -- cgit v1.1