Menu

#3068 Tcl_BadChannelOption incorrect operation on stacked channels

obsolete: 8.5a2
closed-invalid
5
2005-10-05
2005-02-10
No

Tcl_BadChannelOption kills any current result ands puts
out the standard fconfigure attributes and what the
current caller supplies as an argument. Ff called from a
stacked driver, any error placed by the lower layer
channel is lost.

Discussion

  • Andreas Kupries

    Andreas Kupries - 2005-10-05
    • status: open --> closed-invalid
     
  • Andreas Kupries

    Andreas Kupries - 2005-10-05

    Logged In: YES
    user_id=75003

    I see no problem here. The Tcl_GetchannelOption API invokes
    the driver of the top channel, and it is expected that a
    channel calls the channel below if necessary. I.e. the code
    is going through the stack from the top down to the base channel

    In the case of "optionName == NULL" this means that the
    channels write their configuration into the result, and the
    order is not fully specified, as a channel may invoke the
    channel below before or after it has written its own
    configuration. In this situation Tcl_BadChannelOption (TBCO)
    is not called.

    In the case "optionName != NULL" the receiving channel
    handles all options it knows. There is no TBCO call. Unknown
    options however are passed to the lower layer. Again the
    channel/transformation does not call TBCO. It is only the
    lowest layer, the base channel which can decide that yes,
    this option is truly not known by anyone, not even me. This
    layer then calls TBCO. Nobody else. Thus when the call stack
    is unwound no calls to TBCO will replace the error from the
    lower layer.