add more logging to caps fetching
This commit is contained in:
		
							parent
							
								
									8059aa7b0d
								
							
						
					
					
						commit
						971bb60f42
					
				@ -2778,6 +2778,7 @@ public class XmppConnectionService extends Service {
 | 
				
			|||||||
            updateConversationUi();
 | 
					            updateConversationUi();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void fetchConferenceMembers(final Conversation conversation) {
 | 
					    private void fetchConferenceMembers(final Conversation conversation) {
 | 
				
			||||||
        final Account account = conversation.getAccount();
 | 
					        final Account account = conversation.getAccount();
 | 
				
			||||||
        final AxolotlService axolotlService = account.getAxolotlService();
 | 
					        final AxolotlService axolotlService = account.getAxolotlService();
 | 
				
			||||||
@ -4444,13 +4445,16 @@ public class XmppConnectionService extends Service {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public void fetchCaps(Account account, final Jid jid, final Presence presence) {
 | 
					    public void fetchCaps(Account account, final Jid jid, final Presence presence) {
 | 
				
			||||||
        final Pair<String, String> key = new Pair<>(presence.getHash(), presence.getVer());
 | 
					        final Pair<String, String> key = new Pair<>(presence.getHash(), presence.getVer());
 | 
				
			||||||
        ServiceDiscoveryResult disco = getCachedServiceDiscoveryResult(key);
 | 
					        final ServiceDiscoveryResult disco = getCachedServiceDiscoveryResult(key);
 | 
				
			||||||
        if (disco != null) {
 | 
					        if (disco != null) {
 | 
				
			||||||
            presence.setServiceDiscoveryResult(disco);
 | 
					            presence.setServiceDiscoveryResult(disco);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if (!account.inProgressDiscoFetches.contains(key)) {
 | 
					            if (account.inProgressDiscoFetches.contains(key)) {
 | 
				
			||||||
 | 
					                Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": skipping duplicate disco request for " + key.second + " to " + jid);
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            account.inProgressDiscoFetches.add(key);
 | 
					            account.inProgressDiscoFetches.add(key);
 | 
				
			||||||
                IqPacket request = new IqPacket(IqPacket.TYPE.GET);
 | 
					            final IqPacket request = new IqPacket(IqPacket.TYPE.GET);
 | 
				
			||||||
            request.setTo(jid);
 | 
					            request.setTo(jid);
 | 
				
			||||||
            final String node = presence.getNode();
 | 
					            final String node = presence.getNode();
 | 
				
			||||||
            final String ver = presence.getVer();
 | 
					            final String ver = presence.getVer();
 | 
				
			||||||
@ -4468,12 +4472,13 @@ public class XmppConnectionService extends Service {
 | 
				
			|||||||
                    } else {
 | 
					                    } else {
 | 
				
			||||||
                        Log.d(Config.LOGTAG, a.getJid().asBareJid() + ": mismatch in caps for contact " + jid + " " + presence.getVer() + " vs " + discoveryResult.getVer());
 | 
					                        Log.d(Config.LOGTAG, a.getJid().asBareJid() + ": mismatch in caps for contact " + jid + " " + presence.getVer() + " vs " + discoveryResult.getVer());
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": unable to fetch caps from " + jid);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                a.inProgressDiscoFetches.remove(key);
 | 
					                a.inProgressDiscoFetches.remove(key);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private void injectServiceDiscoveryResult(Roster roster, String hash, String ver, ServiceDiscoveryResult disco) {
 | 
					    private void injectServiceDiscoveryResult(Roster roster, String hash, String ver, ServiceDiscoveryResult disco) {
 | 
				
			||||||
        for (final Contact contact : roster.getContacts()) {
 | 
					        for (final Contact contact : roster.getContacts()) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user