gisi: bind pipe end point *before* getting its handle

This commit is contained in:
Rémi Denis-Courmont 2009-08-19 18:07:10 +03:00 committed by Aki Niemi
parent 5b0fffe66a
commit 75f8148ab5
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ GIsiPEP *g_isi_pep_create(GIsiModem *modem)
pep->gprs_fd = -1;
pep->handle = 0;
if (ioctl(fd, SIOCPNGETOBJECT, &pep->handle) || listen(fd, 1))
if (listen(fd, 1) || ioctl(fd, SIOCPNGETOBJECT, &pep->handle))
goto error;
channel = g_io_channel_unix_new(fd);