Lines 739-745
Link Here
|
739 |
link_io_thread_remove_timeout (ent->cnx->parent.timeout_source_id); |
739 |
link_io_thread_remove_timeout (ent->cnx->parent.timeout_source_id); |
740 |
ent->cnx->parent.timeout_source_id = 0; |
740 |
ent->cnx->parent.timeout_source_id = 0; |
741 |
ent->cnx->parent.timeout_status = LINK_TIMEOUT_NO; |
741 |
ent->cnx->parent.timeout_status = LINK_TIMEOUT_NO; |
742 |
link_connection_unref (&ent->cnx->parent); // we remove the source so we must unref the connection |
742 |
giop_connection_unref (&ent->cnx); // we remove the source so we must unref the connection |
743 |
} else if (ent->cnx->parent.timeout_status == LINK_TIMEOUT_YES) |
743 |
} else if (ent->cnx->parent.timeout_status == LINK_TIMEOUT_YES) |
744 |
*timeout = TRUE; |
744 |
*timeout = TRUE; |
745 |
g_mutex_unlock (ent->cnx->parent.timeout_mutex); |
745 |
g_mutex_unlock (ent->cnx->parent.timeout_mutex); |
Lines 1363-1373
Link Here
|
1363 |
giop_timeout (gpointer data) |
1363 |
giop_timeout (gpointer data) |
1364 |
{ |
1364 |
{ |
1365 |
gboolean retv = FALSE; |
1365 |
gboolean retv = FALSE; |
1366 |
LinkConnection *lcnx = (LinkConnection*)data; |
1366 |
GIOPConnection *cnx = (GIOPConnection*)data; |
|
|
1367 |
LinkConnection *lcnx = LINK_CONNECTION (cnx); |
1367 |
GIOPThread *tdata = (GIOPThread *)lcnx->tdata; |
1368 |
GIOPThread *tdata = (GIOPThread *)lcnx->tdata; |
1368 |
|
1369 |
|
1369 |
g_assert (lcnx->timeout_mutex); |
1370 |
g_assert (lcnx->timeout_mutex); |
1370 |
|
1371 |
|
|
|
1372 |
if (lcnx->status == LINK_DISCONNECTED) { |
1373 |
giop_connection_unref (cnx); // we remove the source so we must unref cnx |
1374 |
goto out; |
1375 |
} |
1376 |
|
1371 |
g_mutex_lock (lcnx->timeout_mutex); |
1377 |
g_mutex_lock (lcnx->timeout_mutex); |
1372 |
if (lcnx->timeout_status == LINK_TIMEOUT_UNKNOWN) { |
1378 |
if (lcnx->timeout_status == LINK_TIMEOUT_UNKNOWN) { |
1373 |
lcnx->timeout_source_id = 0; |
1379 |
lcnx->timeout_source_id = 0; |
Lines 1385-1391
Link Here
|
1385 |
giop_incoming_signal_T (tdata, GIOP_CLOSECONNECTION); |
1391 |
giop_incoming_signal_T (tdata, GIOP_CLOSECONNECTION); |
1386 |
g_mutex_unlock (tdata->lock); /* ent_lock */ |
1392 |
g_mutex_unlock (tdata->lock); /* ent_lock */ |
1387 |
|
1393 |
|
1388 |
link_connection_unref (lcnx); // we remove the source so we must unref lcnx |
1394 |
giop_connection_unref (cnx); // we remove the source so we must unref cnx |
1389 |
|
1395 |
|
1390 |
out: |
1396 |
out: |
1391 |
return retv; |
1397 |
return retv; |
Lines 1406-1412
Link Here
|
1406 |
if (lcnx->timeout_source_id) |
1412 |
if (lcnx->timeout_source_id) |
1407 |
goto out; |
1413 |
goto out; |
1408 |
|
1414 |
|
1409 |
link_connection_ref (lcnx); // to be unref'ed by the one who removes the timeout source |
1415 |
giop_connection_ref (cnx); // to be unref'ed by the one who removes the timeout source |
1410 |
|
1416 |
|
1411 |
if (!lcnx->timeout_mutex) |
1417 |
if (!lcnx->timeout_mutex) |
1412 |
lcnx->timeout_mutex = g_mutex_new (); |
1418 |
lcnx->timeout_mutex = g_mutex_new (); |
Lines 1417-1423
Link Here
|
1417 |
|
1423 |
|
1418 |
lcnx->tdata = giop_thread_self (); |
1424 |
lcnx->tdata = giop_thread_self (); |
1419 |
|
1425 |
|
1420 |
lcnx->timeout_source_id = link_io_thread_add_timeout (lcnx->timeout_msec, giop_timeout, (gpointer)lcnx); |
1426 |
lcnx->timeout_source_id = link_io_thread_add_timeout (lcnx->timeout_msec, giop_timeout, (gpointer)cnx); |
1421 |
|
1427 |
|
1422 |
out: |
1428 |
out: |
1423 |
g_static_mutex_unlock (&static_mutex); |
1429 |
g_static_mutex_unlock (&static_mutex); |