Details
- Reviewers
dfaure
1.An over-simplified version of how the slave is sent to klauncher:
2.SlaveBase calls connectSlave(d->poolSocket)
3.This in turn emits newConnection
4.In klauncher this signal connects to acceptSlave which creates a new IdleSlave.
5.Then mConnectionServer gets the connection backend of the Slave and sets it as the connection backed in IdleSlave.
6.IdleSlave then sends CMD_SLAVE_STATUS command and gets Slave's details. (pid, protocol etc)
7.kaluncher then stores this IdleSlave.
Test as mentioned in D10437
Diff Detail
- Repository
- R241 KIO
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage
src/core/slavebase.cpp | ||
---|---|---|
147 | That looks like horrible API ;) "Duplicating" a for loop isn't really duplication, go for a different method. | |
554 | It turns out that indeed this method is only called when the slave is going to Idle, but, hmm, in this code nothing says so, it looks like a method that just sends current status, and that could be called at any moment... I would suggest to at least add a comment here, something like ... above the method call that you'll have to add to clear the auths, due to the previous comment ;) |
src/core/slavebase.cpp | ||
---|---|---|
147 | Now I feel stupid for doing this. Apart from that I am not even confident about this change because it involves changes in KAuth (Obviously I am not sure about them either). How about we drop this and the related revisions for now and just delete the slave whenever there's authorization? |
src/core/slavebase.cpp | ||
---|---|---|
147 | If by delete you mean kill, I think you're right, it's probably simpler and safer, and this should happen rarely enough for this not to be a performance issue. |