/* Establishing and handling network connections.
- Copyright (C) 1996-2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2006 Free Software Foundation, Inc.
This file is part of GNU Wget.
info->ctx = ctx;
if (!transport_map)
transport_map = hash_table_new (0, NULL, NULL);
- hash_table_put (transport_map, (void *) fd, info);
+ hash_table_put (transport_map, (void *)(intptr_t) fd, info);
++transport_map_modified_tick;
}
void *
fd_transport_context (int fd)
{
- struct transport_info *info = hash_table_get (transport_map, (void *) fd);
+ struct transport_info *info = hash_table_get (transport_map, (void *)(intptr_t) fd);
return info->ctx;
}
info = last_info; \
else \
{ \
- info = hash_table_get (transport_map, (void *) fd); \
+ info = hash_table_get (transport_map, (void *)(intptr_t) fd); \
last_fd = fd; \
last_info = info; \
last_tick = transport_map_modified_tick; \
in case of error, never in a tight loop. */
struct transport_info *info = NULL;
if (transport_map)
- info = hash_table_get (transport_map, (void *) fd);
+ info = hash_table_get (transport_map, (void *)(intptr_t) fd);
if (info && info->imp->errstr)
{
per socket, so that particular optimization wouldn't work. */
info = NULL;
if (transport_map)
- info = hash_table_get (transport_map, (void *) fd);
+ info = hash_table_get (transport_map, (void *)(intptr_t) fd);
if (info && info->imp->closer)
info->imp->closer (fd, info->ctx);
if (info)
{
- hash_table_remove (transport_map, (void *) fd);
+ hash_table_remove (transport_map, (void *)(intptr_t) fd);
xfree (info);
++transport_map_modified_tick;
}