Revision 2310
| libsylph/socket.c (revision 2310) | ||
|---|---|---|
| 1337 | 1337 |
debug_print("sock_connect_async_func: connected\n");
|
| 1338 | 1338 |
g_main_context_wakeup(NULL); |
| 1339 | 1339 |
|
| 1340 |
return GINT_TO_POINTER(0);
|
|
| 1340 |
return GINT_TO_POINTER(conn_data->sock ? 0 : -1);
|
|
| 1341 | 1341 |
} |
| 1342 | 1342 |
|
| 1343 | 1343 |
gint sock_connect_async_thread(const gchar *hostname, gushort port) |
| ... | ... | |
| 1350 | 1350 |
data->hostname = g_strdup(hostname); |
| 1351 | 1351 |
data->port = port; |
| 1352 | 1352 |
data->flag = 0; |
| 1353 |
data->sock = NULL; |
|
| 1353 | 1354 |
|
| 1354 | 1355 |
data->thread = g_thread_create(sock_connect_async_func, data, TRUE, |
| 1355 | 1356 |
NULL); |
| ... | ... | |
| 1368 | 1369 |
{
|
| 1369 | 1370 |
SockConnectData *conn_data = NULL; |
| 1370 | 1371 |
GList *cur; |
| 1372 |
gint ret; |
|
| 1371 | 1373 |
|
| 1372 | 1374 |
for (cur = sock_connect_data_list; cur != NULL; cur = cur->next) {
|
| 1373 | 1375 |
if (((SockConnectData *)cur->data)->id == id) {
|
| ... | ... | |
| 1385 | 1387 |
while (g_atomic_int_get(&conn_data->flag) == 0) |
| 1386 | 1388 |
event_loop_iterate(); |
| 1387 | 1389 |
|
| 1388 |
g_thread_join(conn_data->thread);
|
|
| 1390 |
ret = GPOINTER_TO_INT(g_thread_join(conn_data->thread));
|
|
| 1389 | 1391 |
debug_print("sock_connect_async_thread_wait: thread exited\n");
|
| 1390 | 1392 |
|
| 1391 | 1393 |
*sock = conn_data->sock; |
| ... | ... | |
| 1395 | 1397 |
g_free(conn_data->hostname); |
| 1396 | 1398 |
g_free(conn_data); |
| 1397 | 1399 |
|
| 1398 |
return 0;
|
|
| 1400 |
return ret;
|
|
| 1399 | 1401 |
} |
| 1400 | 1402 |
#endif /* USE_THREADS */ |
| 1401 | 1403 |
|
| ChangeLog (revision 2310) | ||
|---|---|---|
| 1 |
2009-10-29 |
|
| 2 |
|
|
| 3 |
* version 3.0.0beta1 |
|
| 4 |
|
|
| 1 | 5 |
2009-10-28 |
| 2 | 6 |
|
| 7 |
* libsylph/socket.c: sock_connect_async_thread(): fixed a crash |
|
| 8 |
when connection failed. |
|
| 9 |
|
|
| 10 |
2009-10-28 |
|
| 11 |
|
|
| 12 |
* src/addressbook.c: removed debug print. |
|
| 13 |
|
|
| 14 |
2009-10-28 |
|
| 15 |
|
|
| 3 | 16 |
* src/update_check.c: made release version have priority over |
| 4 | 17 |
development version. |
| 5 | 18 |
|
Also available in: Unified diff