/[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 399 by twoaday, Sun Nov 27 13:15:07 2011 UTC revision 400 by twoaday, Sun Jan 29 12:27:40 2012 UTC
# Line 103  safe_alloc (DWORD n) Line 103  safe_alloc (DWORD n)
103    
104    
105  /* Basic64 encode the input @inbuf to @outbuf. */  /* Basic64 encode the input @inbuf to @outbuf. */
106    #if 0
107  static void  static void
108  base64_encode (const char *inbuf, char *outbuf)  base64_encode (const char *inbuf, char *outbuf)
109  {  {
# Line 145  base64_encode (const char *inbuf, char * Line 146  base64_encode (const char *inbuf, char *
146    
147      outbuf[len] = '\0';      outbuf[len] = '\0';
148  }  }
149    #endif
150    
151  /* Check that the given buffer contains a valid keyserver URL  /* Check that the given buffer contains a valid keyserver URL
152     and return the prefix length, 0 in case of an error. */     and return the prefix length, 0 in case of an error. */
# Line 573  kserver_check_keyid (const char *keyid) Line 574  kserver_check_keyid (const char *keyid)
574    
575    
576  /* Update the keyserver proxy user. */  /* Update the keyserver proxy user. */
577    #if 0
578  static void  static void
579  update_proxy_user (const char *proxy_user, const char *proxy_pass)  update_proxy_user (const char *proxy_user, const char *proxy_pass)
580  {  {
# Line 589  update_proxy_user (const char *proxy_use Line 591  update_proxy_user (const char *proxy_use
591      proxy.user = m_strdup (proxy_user);      proxy.user = m_strdup (proxy_user);
592      proxy.pass = m_strdup (proxy_pass);      proxy.pass = m_strdup (proxy_pass);
593  }  }
594    #endif
595    
596  /* Set the default keyserver. The position is always one. */  /* Set the default keyserver. The position is always one. */
597  void  void
# Line 621  keyserver_set_default (const char *hostn Line 623  keyserver_set_default (const char *hostn
623  }  }
624    
625    
626  /* Skip all kind of whitespace chars in @str.  /* Skip all kind of whitespace chars in @str. */
627    #if 0
628  static const char*  static const char*
629  skip_whitespace (const char *str)  skip_whitespace (const char *str)
630  {  {
# Line 636  skip_whitespace (const char *str) Line 639  skip_whitespace (const char *str)
639          break;          break;
640      }      }
641      return str;      return str;
642  }*/  }
643    #endif
644    
645    
646  /* Return the specified keyserver config setting @key as an integer. */  /* Return the specified keyserver config setting @key as an integer. */
647    #if 0
648  static int  static int
649  get_conf_kserver_int (const char *key)  get_conf_kserver_int (const char *key)
650  {  {
# Line 652  get_conf_kserver_int (const char *key) Line 657  get_conf_kserver_int (const char *key)
657      free_if_alloc (p);      free_if_alloc (p);
658      return val;      return val;
659  }  }
660    #endif
661    
662  /* Read the proxy configuration and store it into @prox. */  /* Read the proxy configuration and store it into @prox. */
663    #if 0
664  static void  static void
665  read_proxy_config (keyserver_proxy_t prox)  read_proxy_config (keyserver_proxy_t prox)
666  {  {
# Line 681  read_proxy_config (keyserver_proxy_t pro Line 687  read_proxy_config (keyserver_proxy_t pro
687            
688      prox->port = get_conf_kserver_int ("Port");      prox->port = get_conf_kserver_int ("Port");
689  }  }
690    #endif
691    
692    
693  static int  static int
# Line 774  kserver_connect (const char *hostname, W Line 781  kserver_connect (const char *hostname, W
781          return use_proxy? WPTERR_WINSOCK_PROXY : WPTERR_WINSOCK_RESOLVE;          return use_proxy? WPTERR_WINSOCK_PROXY : WPTERR_WINSOCK_RESOLVE;
782      }      }
783      fd = socket (AF_INET, SOCK_STREAM, 0);      fd = socket (AF_INET, SOCK_STREAM, 0);
784      if (fd == INVALID_SOCKET)        if (fd == (int)INVALID_SOCKET)      
785          return WPTERR_WINSOCK_SOCKET;          return WPTERR_WINSOCK_SOCKET;
786      rc = connect (fd, (struct sockaddr *) &sock, sizeof (sock));      rc = connect (fd, (struct sockaddr *) &sock, sizeof (sock));
787      if (rc == SOCKET_ERROR) {      if (rc == SOCKET_ERROR) {

Legend:
Removed from v.399  
changed lines
  Added in v.400

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26