}
void Logic::addChannelFd(Protocol::ConnectionFd fd, const Protocol::Credentials &creds) {
+ ALOGD("Adding new client with fd " << fd);
auto it = m_connToInfo.find(fd);
if (it != m_connToInfo.end()) {
ALOGE("Connection with fd : " << fd << " already exists. Closing connection");
}
void Logic::updateChannelFd(Protocol::ConnectionFd fd, Ecore_Fd_Handler_Flags flags) {
+ ALOGD("Updating channel with fd " << fd << " and flags " << flags);
auto it = m_fdInfo.find(fd);
if (it != m_fdInfo.end()) {
m_fdInfo[fd].status = FdChange::CHANGE;
}
void Logic::removeChannelFd(Protocol::ConnectionFd fd) {
+ ALOGD("Removing channel with fd " << fd);
+ m_connToInfo.erase(fd);
+
auto it = m_fdInfo.find(fd);
if (it == m_fdInfo.end()) {
return;
}
Eina_Bool Logic::processChannel(int fd, int mask) {
+ ALOGD("Porcesing fd " << fd << " with mask " << mask);
updateChannel(fd, mask);
switch (m_fdInfo[fd].status) {
case FdChange::NONE:
+ ALOGD("Fd is mark for renewal");
return ECORE_CALLBACK_RENEW;
case FdChange::DEL: {
+ ALOGD("Fd is marked for deletion");
// Remove all pending events from this fd
auto queueIt = std::remove_if(m_pendingEvents.begin(), m_pendingEvents.end(),
[fd](const FdEvent &fdEvent) {return fdEvent.id.fd == fd;});
}
void Logic::popup(Protocol::ConnectionFd fd, Protocol::RequestId id, const std::string &privilege) {
- ALOGD("Request for privilege " << privilege);
+ ALOGD("Request for privilege " << privilege << " from fd " << fd << " with id " << id);
auto it = m_connToInfo.find(fd);
if (it == m_connToInfo.end()) {
}
bool Logic::setPolicy(const ConnectionInfo &conn, const std::string &lastPolicy) {
+ ALOGD("Setting policy for app " << conn.appId << " with last policy " << lastPolicy);
std::string currentPrivacy;
PrivaciesSequence &privSeq = m_eventToPrivaciesSeq[m_currentEvent];
- if (!privSeq.getCurrentPrivacy(currentPrivacy)) {
+ if (!privSeq.getCurrentPrivacy(currentPrivacy) && lastPolicy == "Allow") {
ALOGD("Privilege is allowed completely");
}