Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: sendmail.c
- ===================================================================
- RCS file: /repository/php-src/win32/sendmail.c,v
- retrieving revision 1.65.2.2.2.1
- diff -u -r1.65.2.2.2.1 sendmail.c
- --- sendmail.c 24 Feb 2007 02:17:28 -0000 1.65.2.2.2.1
- +++ sendmail.c 23 Jun 2009 03:12:09 -0000
- @@ -769,12 +769,25 @@
- short portnum;
- /* Create Socket */
- - if ((sc = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
- + if ((sc = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
- return (FAILED_TO_OBTAIN_SOCKET_HANDLE);
- + }
- /* Get our own host name */
- - if (gethostname(LocalHost, HOST_NAME_LEN))
- + if (gethostname(LocalHost, HOST_NAME_LEN)) {
- return (FAILED_TO_GET_HOSTNAME);
- + }
- +
- + /* Get the FQDN, see bug #38091 */
- + if (!isdigit(LocalHost[0])) {
- + struct hostent *ent = gethostbyname(LocalHost);
- +
- + if (!ent) {
- + return (FAILED_TO_GET_HOSTNAME);
- + }
- +
- + strcpy(LocalHost, ent->h_name);
- + }
- /* Resolve the servers IP */
- /*
Add Comment
Please, Sign In to add comment