aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Krasner <dima@dimakrasner.com>2015-09-28 22:52:52 +0300
committerDima Krasner <dima@dimakrasner.com>2015-09-28 22:52:52 +0300
commit8eea3b1e2356d5182c556e082db1b0eb73841ace (patch)
treeb2189d587ce09f5968952cc0506676f1b6ca644a
parent069750bd63591ec4fea8a6f8f4edd8a983c6e182 (diff)
downloadjimtcl-8eea3b1e2356d5182c556e082db1b0eb73841ace.zip
jimtcl-8eea3b1e2356d5182c556e082db1b0eb73841ace.tar.gz
jimtcl-8eea3b1e2356d5182c556e082db1b0eb73841ace.tar.bz2
Bug fix - channel names are not formatted
-rw-r--r--jim-aio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/jim-aio.c b/jim-aio.c
index ef3f139..c650787 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -1103,6 +1103,8 @@ static int JimMakeChannel(Jim_Interp *interp, FILE *fh, int fd, Jim_Obj *filenam
char buf[AIO_CMD_LEN];
int openFlags = 0;
+ snprintf(buf, sizeof(buf), hdlfmt, Jim_GetId(interp));
+
if (fh) {
filename = Jim_NewStringObj(interp, hdlfmt, -1);
openFlags = AIO_KEEPOPEN;
@@ -1144,7 +1146,6 @@ static int JimMakeChannel(Jim_Interp *interp, FILE *fh, int fd, Jim_Obj *filenam
#endif
af->openFlags = openFlags;
af->addr_family = family;
- snprintf(buf, sizeof(buf), hdlfmt, Jim_GetId(interp));
Jim_CreateCommand(interp, buf, JimAioSubCmdProc, af, JimAioDelProc);
/* Note that the command must use the global namespace, even if