Programs under wine can't connect to the network
lawson_whitney at juno.com
lawson_whitney at juno.com
Sun Nov 4 09:15:52 CST 2001
On Sun, 4 Nov 2001, Miran Kenk wrote:
> Hey all
>
> Have a very strange problem in slack 8, using wine 20011004. First noticed this with counterstrike, than checked with other programs that should access the net.
>
> I get this error, and programs fail:
>
> fixme:winsock:_get_sock_fd handle 304 is not a socket (GLE 6)
>
> Documentation seems to imply that if I can get on the net with linux, I should be able to use wine with it. Weirdest part is that cs worked fine with Slack 7.2 and in latest SuSe. This is a wine-only installation.
>
> I have a cable connection with a static ip, and this is really puzzling me. Any hints, solutions or even recognition that I'm not the only one with this problem would be appreciated.
>
> Thanks
>
> Miran
Oh, here. For those who can't get at CVS and can't find it in the ML
archives of wine-users, where it has been twice already, but aren't
afraid of patch, here once again is the patch to Wine-20011004 that
fixed this problem.
patch -d <wine> -p 4 --dry-run <wine-programs-can-connect
patch -d <wine> -p 4 <wine-programs-can-connect
<wine> is of course the path to the root of the wine source tree.
Lawson
-------------- next part --------------
<!-- X-URL: http://cvs.winehq.com/patch.py?id=1002311145503006032668054 -->
<base href="http://cvs.winehq.com/patch.py?id=1002311145503006032668054">
<html>
<title>Patch for root=/opt/cvs-commit, id=1002311145503006032668054</title>
<body>
<pre>
ChangeSet ID: 1002311145503006032668054
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at wine2. 01/10/05 15:45:45
Modified files:
server : named_pipe.c sock.c
Log message:
Added get_file_info support to named pipes and sockets to avoid
breaking the get_handle_fd request.
Patch: http://cvs.winehq.com/patch.py?id=1002311145503006032668054
Revision Changes Path
1.5 +20 -1 wine/server/named_pipe.c
1.21 +20 -1 wine/server/sock.c
--- /opt/cvs-commit/wine/server/named_pipe.c 2001/08/27 19:03:42 1.4
+++ /opt/cvs-commit/wine/server/named_pipe.c 2001/10/05 19:45:45 1.5
@@ -84,6 +84,7 @@
static void pipe_user_dump( struct object *obj, int verbose );
static void pipe_user_destroy( struct object *obj);
static int pipe_user_get_fd( struct object *obj );
+static int pipe_user_get_info( struct object *obj, struct get_file_info_request *req );
static const struct object_ops pipe_user_ops =
{
@@ -97,7 +98,7 @@
default_poll_event, /* poll_event */
pipe_user_get_fd, /* get_fd */
no_flush, /* flush */
- no_get_file_info, /* get_file_info */
+ pipe_user_get_info, /* get_file_info */
pipe_user_destroy /* destroy */
};
@@ -165,6 +166,24 @@
struct pipe_user *user = (struct pipe_user *)obj;
assert( obj->ops == &pipe_user_ops );
return user->obj.fd;
+}
+
+static int pipe_user_get_info( struct object *obj, struct get_file_info_request *req )
+{
+ if (req)
+ {
+ req->type = FILE_TYPE_PIPE;
+ req->attr = 0;
+ req->access_time = 0;
+ req->write_time = 0;
+ req->size_high = 0;
+ req->size_low = 0;
+ req->links = 0;
+ req->index_high = 0;
+ req->index_low = 0;
+ req->serial = 0;
+ }
+ return FD_TYPE_DEFAULT;
}
static struct named_pipe *create_named_pipe( const WCHAR *name, size_t len )
--- /opt/cvs-commit/wine/server/sock.c 2001/08/24 19:14:56 1.20
+++ /opt/cvs-commit/wine/server/sock.c 2001/10/05 19:45:45 1.21
@@ -54,6 +54,7 @@
static int sock_get_poll_events( struct object *obj );
static void sock_poll_event( struct object *obj, int event );
static int sock_get_fd( struct object *obj );
+static int sock_get_info( struct object *obj, struct get_file_info_request *req );
static void sock_destroy( struct object *obj );
static int sock_get_error( int err );
static void sock_set_error(void);
@@ -70,7 +71,7 @@
sock_poll_event, /* poll_event */
sock_get_fd, /* get_fd */
no_flush, /* flush */
- no_get_file_info, /* get_file_info */
+ sock_get_info, /* get_file_info */
sock_destroy /* destroy */
};
@@ -264,6 +265,24 @@
struct sock *sock = (struct sock *)obj;
assert( obj->ops == &sock_ops );
return sock->obj.fd;
+}
+
+static int sock_get_info( struct object *obj, struct get_file_info_request *req )
+{
+ if (req)
+ {
+ req->type = FILE_TYPE_PIPE;
+ req->attr = 0;
+ req->access_time = 0;
+ req->write_time = 0;
+ req->size_high = 0;
+ req->size_low = 0;
+ req->links = 0;
+ req->index_high = 0;
+ req->index_low = 0;
+ req->serial = 0;
+ }
+ return FD_TYPE_DEFAULT;
}
static void sock_destroy( struct object *obj )
</pre>
</body>
</html>
More information about the wine-users
mailing list