diff options
-rw-r--r-- | jim-aio.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |