/[winpt]/trunk/Src/wptKeyserver.cpp
ViewVC logotype

Diff of /trunk/Src/wptKeyserver.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by werner, Mon Oct 31 21:14:11 2005 UTC revision 73 by twoaday, Tue Nov 8 07:15:13 2005 UTC
# Line 470  kserver_load_conf (const char * conf) Line 470  kserver_load_conf (const char * conf)
470  {  {
471      struct stat statbuf;      struct stat statbuf;
472      FILE *fp;      FILE *fp;
473      char buf[1024], * s, * p;      char buf[1024], * s, *p;
474      char *user = NULL, *pass = NULL;          char *user = NULL, *pass = NULL;    
475      int pos, proxy_auth = 0;      int pos;
476      int no_config=0, chk_pos=0;      int no_config=0, chk_pos=0;
477            
478      for (pos = 0; pos < MAX_KEYSERVERS; pos++) {      for (pos = 0; pos < MAX_KEYSERVERS; pos++) {
# Line 499  kserver_load_conf (const char * conf) Line 499  kserver_load_conf (const char * conf)
499      }      }
500      /* check if the host has a http:// prefix and skip it */      /* check if the host has a http:// prefix and skip it */
501      if( proxy.host && !strncmp( proxy.host, "http://", 7 ) ) {      if( proxy.host && !strncmp( proxy.host, "http://", 7 ) ) {
502          const char *s = proxy.host+7;          char *pr = m_strdup (proxy.host+7);
503          char * p = m_strdup (s);          if (!pr)
504          if (!p)              BUG (NULL);
             BUG (0);  
505          free_if_alloc (proxy.host);          free_if_alloc (proxy.host);
506          proxy.host = p;          proxy.host = pr;
507      }      }
508      free_if_alloc (user);      free_if_alloc (user);
509      free_if_alloc (pass);      free_if_alloc (pass);
# Line 547  kserver_load_conf (const char * conf) Line 546  kserver_load_conf (const char * conf)
546              memcpy (server[pos].name, s, (p-s));              memcpy (server[pos].name, s, (p-s));
547          }          }
548          pos++;          pos++;
549          if (pos > MAX_KEYSERVERS)          if (pos > MAX_KEYSERVERS) {
         {  
550              msg_box (NULL, _("The keyserver limit is exceeded"), _("Keyserver Warning"), MB_INFO);              msg_box (NULL, _("The keyserver limit is exceeded"), _("Keyserver Warning"), MB_INFO);
551              break;              break;
552          }          }
553      }      }
554      if (fp)      if (fp)
555          fclose (fp);          fclose (fp);
556      if (!pos)      if (!pos) {
     {  
557          /* only issue an error if the config file exist but it has no valid entries. */          /* only issue an error if the config file exist but it has no valid entries. */
558          keyserver_set_default (NULL, HKP_PORT);          keyserver_set_default (NULL, HKP_PORT);
559          if (!no_config)          if (!no_config)

Legend:
Removed from v.48  
changed lines
  Added in v.73

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26