* photoid.c (get_default_photo_command, show_photos): Honor
[gnupg.git] / keyserver / gpgkeys_ldap.c
index fa9edab..7f13599 100644 (file)
@@ -43,6 +43,7 @@
 int verbose=0,include_disabled=0,include_revoked=0,include_subkeys=0;
 char *basekeyspacedn=NULL;
 char host[80];
+char portstr[10];
 FILE *input=NULL,*output=NULL,*console=NULL;
 LDAP *ldap=NULL;
 
@@ -227,8 +228,9 @@ int get_key(char *getkey)
   if(!verbose)
     attrs[1]=NULL;
 
-  fprintf(console,"gpgkeys: requesting key 0x%s from LDAP keyserver %s\n",
-         getkey,host);
+  if(verbose)
+    fprintf(console,"gpgkeys: requesting key 0x%s from ldap://%s%s%s\n",
+           getkey,host,portstr?":":"",portstr?portstr:"");
 
   err=ldap_search_s(ldap,basekeyspacedn,
                    LDAP_SCOPE_SUBTREE,search,attrs,0,&res);
@@ -659,7 +661,6 @@ int main(int argc,char *argv[])
   while(fgets(line,MAX_LINE,input)!=NULL)
     {
       char commandstr[7];
-      char portstr[10];
       char optionstr[30];
       char hash;
 
@@ -901,15 +902,15 @@ int main(int argc,char *argv[])
 
     case SEND:
       {
-       int ret;
+       int ret2;
 
        do
          {
-           ret=send_key();
-           if(ret==-1)
+           ret2=send_key();
+           if(ret2==-1)
              failed++;
          }
-       while(ret!=1);
+       while(ret2!=1);
       }
       break;