[PATCH] Request for adding internal meta-data support to KIO...
Dawit A
adawit at kde.org
Thu May 6 17:14:32 BST 2010
On Thursday, May 06, 2010 04:31:30 David Faure wrote:
> > #3. When internal metadata is received, update ALL ioslaves, not only the
> > idles ones, that match the criteria specified through the keyword.
>
> I guess there's no other solution, but this sounds a bit like a race.
> A running slave might or might not get this new metadata in time for
> whatever it's currently doing. Then again, we're talking about
> authentication, so obviously we can't send auth data before it's typed in
> by the user :-) OK, ignore this.
Well, even for circumstances other than authentication, there is nothing we
can really do about an ioslave that is already in the middle of processing a
request. We just want to ensure that it gets updated for the next request,
that includes the ioslave that originally sent the internal meta-data.
For authentication this is actually not an issue because not only do you have
to wait for user input as you stated, but also subsequent requests into the
protected site are completely dependent about the first request. IOW, if you do
not get the first page, well you cannot parse it and make other requests.
> [...]
> ProtoQueue *pq = m_protocols.value(jobPriv->m_protocol);
> pq->removeJob(job);
> if (slave) {
> + // Reconfigure the slave that sent the original internal meta-data
> and + // all other idle slaves that are currently servi
>
> Unfinished sentence?
Fixed...
> + if (jobPriv->m_internalMetaData.count()) {
>
> We generally use !isEmpty() rather than count(), when the count isn't
> needed.
>
> + kDebug(7006) << "Updating ioslaves with new internal metadata
> information"; +
> m_protocols.value(slave->protocol())->updateSlaveConfigFor(slave->host());
>
> Can this value() call ever return 0?
Indeed... it is a possibility. Fixed...
Updated patch attached...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kio_internal_metadata.patch
Type: text/x-patch
Size: 5946 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100506/a6440cb6/attachment.bin>
More information about the kde-core-devel
mailing list