Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 193640
Collapse All | Expand All

(-)src/orb/orb-core/orbit-small.c (+5 lines)
Lines 1149-1154 Link Here
1149
		CORBA_exception_set_system (ev, ex_CORBA_COMM_FAILURE,
1149
		CORBA_exception_set_system (ev, ex_CORBA_COMM_FAILURE,
1150
					    aqe->completion_status);
1150
					    aqe->completion_status);
1151
1151
1152
	if (aqe->mqe.cnx &&
1153
	    aqe->mqe.cnx->parent.status == LINK_TIMEOUT)
1154
		CORBA_exception_set_system (ev, ex_CORBA_TIMEOUT,
1155
					    aqe->completion_status);
1156
1152
	if (aqe->fn)
1157
	if (aqe->fn)
1153
		aqe->fn (aqe->obj, aqe->m_data, aqe, aqe->user_data, ev);
1158
		aqe->fn (aqe->obj, aqe->m_data, aqe, aqe->user_data, ev);
1154
1159
(-)src/orb/GIOP/giop-recv-buffer.c (-5 / +11 lines)
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);
(-)src/orb/GIOP/giop-connection.c (-1 / +2 lines)
Lines 38-44 Link Here
38
void
38
void
39
giop_connection_close (GIOPConnection *cnx)
39
giop_connection_close (GIOPConnection *cnx)
40
{
40
{
41
	if (cnx->parent.status == LINK_DISCONNECTED)
41
	if ((cnx->parent.status == LINK_DISCONNECTED)
42
	    || (cnx->parent.status == LINK_TIMEOUT))
42
		return;
43
		return;
43
44
44
	if (cnx->parent.status == LINK_CONNECTED &&
45
	if (cnx->parent.status == LINK_CONNECTED &&
(-)linc2/ChangeLog (+6 lines)
Lines 1-3 Link Here
1
2007-09-22  Jules Colding  <colding@omesc.com>
2
3
	* src/linc-connection.c (link_connection_finalize): 
4
	Remove g_assert() on the non-presence of cnx in cnx_list. The 
5
	cnx might not yet have gone.
6
1
======================== ORBit2-2.14.9 ====================
7
======================== ORBit2-2.14.9 ====================
2
8
3
2007-08-14  Jules Colding  <colding@omesc.com>
9
2007-08-14  Jules Colding  <colding@omesc.com>
(-)linc2/src/linc-connection.c (-4 lines)
Lines 1272-1281 Link Here
1272
	if (cnx->timeout_source_id) 
1272
	if (cnx->timeout_source_id) 
1273
		link_io_thread_remove_timeout (cnx->timeout_source_id);
1273
		link_io_thread_remove_timeout (cnx->timeout_source_id);
1274
1274
1275
#ifdef G_ENABLE_DEBUG
1276
	g_assert (g_list_find(cnx_list, cnx) == NULL);
1277
#endif
1278
1279
	parent_class->finalize (obj);
1275
	parent_class->finalize (obj);
1280
}
1276
}
1281
1277
(-)configure.in (-1 / +1 lines)
Lines 104-110 Link Here
104
dnl --enable-debug=(yes|minimum|no)
104
dnl --enable-debug=(yes|minimum|no)
105
AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=minimum)
105
AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=minimum)
106
if test "x$enable_debug" = "xyes"; then
106
if test "x$enable_debug" = "xyes"; then
107
  ORBIT_DEBUG_CFLAGS="-ggdb -DG_ENABLE_DEBUG"
107
  ORBIT_DEBUG_CFLAGS="-ggdb -O0 -DG_ENABLE_DEBUG"
108
else
108
else
109
  if test "x$enable_debug" = "xno"; then
109
  if test "x$enable_debug" = "xno"; then
110
    ORBIT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
110
    ORBIT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
(-)ChangeLog (+25 lines)
Lines 1-3 Link Here
1
2007-09-24  Jules Colding  <colding@omesc.com>
2
3
	* src/orb/orb-core/orbit-small.c (async_recv_cb): 
4
	Set CORBA_TIMEOUT exception if state is LINK_TIMEOUT
5
6
2007-09-22  Jules Colding  <colding@omesc.com>
7
8
	* configure.in: Added -O0 to ORBIT_DEBUG_CFLAGS. 
9
	TODO: Still need to fix the debug CFLAGS so that they are 
10
	effective in the Makefile.am's.
11
12
	* src/orb/GIOP/giop-connection.c (giop_connection_close): 
13
	Added a check for the link being in LINK_TIMEOUT state. Not
14
	doing this would result in link_connection_finalize() being
15
	invoked twice for the same link. We can not have that...
16
17
	* src/orb/GIOP/giop-recv-buffer.c (giop_recv_buffer_get): 
18
	Use giop_connection_unref() instead of linc_connection_unref()
19
	as we really are manipulating a GIOPConnection not a LinkConnection.
20
	(giop_timeout): Use the giop_connection_(un)ref() functions. Same 
21
	reasoning as above. 
22
	Do not call link_connection_state_changed() or giop_incoming_signal_T()
23
	if the link is in the LINK_DISCONNECTED state. Doing so would make
24
	link_connection_state_changed() very unhappy (invalid read of size 1).
25
1
==================== ORBit2-2.14.9 =====================
26
==================== ORBit2-2.14.9 =====================
2
27
3
2007-09-17  Kjartan Maraas  <kmaraas@gnome.org>
28
2007-09-17  Kjartan Maraas  <kmaraas@gnome.org>

Return to bug 193640