You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "freak82 (via GitHub)" <gi...@apache.org> on 2024/05/21 08:14:53 UTC
[I] Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`? [trafficserver]
freak82 opened a new issue, #11374:
URL: https://github.com/apache/trafficserver/issues/11374
Hi there,
There is [this `read` function](https://github.com/apache/trafficserver/blob/master/plugins/multiplexer/dispatch.cc#L133) in `plugins/multiplexer/dispatch.cc`:
```
uint64_t
read(const TSIOBuffer &b, std::string &o, const int64_t l = 0)
{
TSIOBufferReader reader = TSIOBufferReaderAlloc(b);
const uint64_t length = read(reader, o);
TSIOBufferReaderFree(reader);
return length;
}
```
and it internally calls an [overload](https://github.com/apache/trafficserver/blob/master/plugins/multiplexer/dispatch.cc#L105) of the same function
```
uint64_t
read(const TSIOBufferReader &r, std::string &o, int64_t l = 0)
```
I think the first function should also forward the `l` argument to the overload version but it doesn't.
Currently this doesn't seem to break anything because of the current usages of the `read` functions.
So, does this need to be fixed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`? [trafficserver]
Posted by "freak82 (via GitHub)" <gi...@apache.org>.
freak82 commented on issue #11374:
URL: https://github.com/apache/trafficserver/issues/11374#issuecomment-2128486018
It seems to me that this version of the function
`uint64_t read(const TSIOBufferReader &r, std::string &o, int64_t l = 0)`
is called by
`void Handler::data(const TSIOBufferReader r, const int64_t l)`
where the `l` argument is passed to the `read` function.
So, it seems that I can't remove it from there.
Maybe I misunderstood what you wrote above?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`? [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #11374:
URL: https://github.com/apache/trafficserver/issues/11374#issuecomment-2129911911
Ah, I missed the use in `Handler::data`. Then just from the `TSIOBuffer` version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`? [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #11374:
URL: https://github.com/apache/trafficserver/issues/11374#issuecomment-2125207293
It looks like the both `read` functions are only used to read whole data in a buffer. Forwarding the `l` argument is a valid change, but I'd remove the `l` arguments from the both. I don't think it's worth keeping them because they are local functions and we can add them back easily if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`? [trafficserver]
Posted by "ywkaras (via GitHub)" <gi...@apache.org>.
ywkaras closed issue #11374: Is this missed to pass argument in `plugins/multiplexer/dispatch.cc`?
URL: https://github.com/apache/trafficserver/issues/11374
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org