- /*
- * Fill the tree info up.
- */
- initcolour(true);
- rec = findpath(keyinfoa, keyinfob);
- keyinfob->parent = 0;
-
- printf("%d nodes examined. %ld elements in the hash\n", rec,
- hashelements());
- if (keyinfoa->colour == 0) {
- printf("Can't find a link from 0x%llX to 0x%llX\n",
- have,
- want);
- } else {
- printf("%d steps from 0x%llX to 0x%llX\n",
- keyinfoa->colour, have, want);
- curkey = keyinfoa;
- while (curkey != NULL && curkey->keyid != 0) {
- uid = keyid2uid(curkey->keyid);
- if (html && uid == NULL) {
- printf("<a href=\"lookup?op=get&search=%llX\">"
- "0x%llX</a> ([User id not found])%s)%s\n",
- curkey->keyid,
- curkey->keyid,
- (curkey->keyid == want) ? "" :
- " signs");
- } else if (html && uid != NULL) {
- printf("<a href=\"lookup?op=get&search=%llX\">"
- "0x%llX</a> (<a href=\"lookup?op=vindex"
- "&search=0x%llX\">%s</a>)%s\n",
- curkey->keyid,
- curkey->keyid,
- curkey->keyid,
- txt2html(keyid2uid(curkey->keyid)),
- (curkey->keyid == want) ? "" :
- " signs");
- } else {
- printf("0x%llX (%s)%s\n",
- curkey->keyid,
- (uid == NULL) ? "[User id not found]" :
- uid,
- (curkey->keyid == want) ? "" :
- " signs");
+ while ((!cleanup()) && (pathlen < count)) {
+ /*
+ * Fill the tree info up.
+ */
+ initcolour(true);
+ rec = findpath(keyinfoa, keyinfob);
+ keyinfob->parent = 0;
+ if (keyinfoa->colour == 0) {
+ pathlen = count;
+ } else {
+ /*
+ * Skip the first key, as the remote user will already
+ * have it
+ */
+ curkey = findinhash(keyinfoa->parent);
+ while (curkey != NULL && curkey->keyid != 0) {
+ if (curkey->keyid != fullwant &&
+ config.dbbackend->fetch_key(
+ curkey->keyid,
+ &publickey, false)) {
+ flatten_publickey(publickey,
+ &packets,
+ &list_end);
+ free_publickey(publickey);
+ publickey = NULL;
+ }
+ if (curkey != keyinfoa && curkey != keyinfob) {
+ curkey->disabled = true;
+ }
+ curkey = findinhash(curkey->parent);