Menu ▾ ▴

#48 core dump if <close number='0'> is sent when...

open
nobody
wrapper (14)
5
2004-01-16
2004-01-16
Lei Zhang
No

Core dump if session release request is sent when a
channel is being started:

In blw_close_request_0, the pro_close_indication() for
all the profile instances would be called; but it's
possible that a channel instance has been created, but
channel->profile has not been filled in yet. We should
reject the session release request when a channel is in
the half open state, for example:

@@ -1109,8 +1147,17 @@ DIAGNOSTIC *
blw_wkr_cr_instance(WRAPPER
/* closing the channel */
sesschan = PRO_ACTION_CHANNEL;

- mypro = inst->profile;
+ /* cannot close the channel while the channel is
being started */
+ if (inst->status == INST_STATUS_STARTING) {
+ DIAGNOSTIC *mydiag;
+
+ mydiag = blw_diagnostic_new(wrap,
BLW_CHANNEL_BUSY, NULL,
+ "channel is being started");
+ return mydiag;
+ }

+ mypro = inst->profile;
+ ASSERT(mypro != NULL);
inst->status = INST_STATUS_CLOSING;
inst->outbound = request;
inst->inbound = NULL;

The diff is provided to explain the problem, it might
break more things than it attempts to fix..

Discussion


Log in to post a comment.