/[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 225 by twoaday, Tue Jun 6 13:37:59 2006 UTC revision 226 by twoaday, Mon Jun 12 13:40:21 2006 UTC
# Line 527  static int Line 527  static int
527  port_from_proto (int proto)  port_from_proto (int proto)
528  {  {
529      switch (proto) {      switch (proto) {
530      case KSPROTO_LDAP:   return 0;      case KSPROTO_LDAP:   return LDAP_PORT;
531      case KSPROTO_FINGER: return FINGER_PORT;      case KSPROTO_FINGER: return FINGER_PORT;
532      case KSPROTO_HTTP:   return HKP_PORT;      case KSPROTO_HTTP:   return HKP_PORT;
533      }      }
# Line 541  proto_from_URL (const char *buf) Line 541  proto_from_URL (const char *buf)
541  {  {
542      if (strstr (buf, "ldap"))      if (strstr (buf, "ldap"))
543          return KSPROTO_LDAP;          return KSPROTO_LDAP;
544      else if (strstr( buf, "finger"))      else if (strstr (buf, "finger"))
545          return KSPROTO_FINGER;          return KSPROTO_FINGER;
546      return KSPROTO_HKP;      return KSPROTO_HKP;
547  }  }
# Line 1508  parse_keyserver_url (char **r_keyserver, Line 1508  parse_keyserver_url (char **r_keyserver,
1508  {  {
1509      char *p;      char *p;
1510      char *url = *r_keyserver;      char *url = *r_keyserver;
1511        int off = 0;
1512    
1513      /* no port is given so use the default port. */      /* no port is given so use the default port. */
1514      p = strrchr (url, ':');      p = strrchr (url, ':');
# Line 1518  parse_keyserver_url (char **r_keyserver, Line 1519  parse_keyserver_url (char **r_keyserver,
1519          *r_port = port;          *r_port = port;
1520          return 0;          return 0;
1521      }      }
1522      /* XXX: remove / in .de/:11371 */  
1523      *r_keyserver = substr (url, 0, (p-url));          if (url[(p-url)-1] == '/') /* remove / in .de/:11371 */
1524            off = 1;
1525    
1526        *r_keyserver = substr (url, 0, (p-url)-off);
1527      *r_port = atoi (url+(p-url)+1);      *r_port = atoi (url+(p-url)+1);
1528      free_if_alloc (url);      free_if_alloc (url);
1529      return 0;      return 0;

Legend:
Removed from v.225  
changed lines
  Added in v.226

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26