static void sync_windowsize(int fd, void *cookie) {
int id, lines, columns;
- char *size_info = cookie;
+ char *size_info = (char*)cookie;
asocket *s = NULL;
if (sscanf(size_info, "%d:%d:%d", &id, &lines, &columns) == 3) {
}
I("success to sync window size.\n");
}
+ free(size_info);
+ sdb_close(fd);
}
const unsigned COMMAND_TIMEOUT = 10000;
}
} else if(!strncmp(name, "shellconf:", 10)){
if(!strncmp(name+10, "syncwinsz:", 10)){
- ret = create_service_thread(sync_windowsize, (void *)name+20);
+ char* size_info = NULL;
+ size_info = strdup(name+20);
+ ret = create_service_thread(sync_windowsize, (void *)size_info);
}
} else if(!strncmp(name, "tzplatformenv:", 14)) {
char* env_variable = NULL;