CVS update: php31/os/nt
| From: | shane | Date: | Thu, 13 Aug 1998 22:57:35 +0000 |
| Subject: | CVS update: php31/os/nt | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-187@lists.php.net to get a copy of this message | ||
Date: Thursday August 13, 1998 @ 18:57
Author: shane
Update of /repository/php31/os/nt
In directory asf:/tmp/cvs-serv8616/os/nt
Modified Files:
readdir.c sendmail.c sendmail.h
Log Message:
3.0->3.1 patches
Index: php31/os/nt/readdir.c
diff -c php31/os/nt/readdir.c:2.0 php31/os/nt/readdir.c:2.1
*** php31/os/nt/readdir.c:2.0 Fri Jul 3 09:18:50 1998
--- php31/os/nt/readdir.c Thu Aug 13 18:57:35 1998
***************
*** 83,91 ****
return 0;
}
! void rewinddir(DIR * dir_Info)
{
/* Re-set to the beginning */
dir_Info->handle = 0;
dir_Info->offset = 0;
}
--- 83,111 ----
return 0;
}
! void rewinddir(DIR *dir_Info)
{
/* Re-set to the beginning */
+ char *filespec;
+ long handle;
+ int index;
+
dir_Info->handle = 0;
dir_Info->offset = 0;
+ dir_Info->finished = 0;
+
+ filespec = malloc(strlen(dir_Info->dir) + 2 + 1);
+ strcpy(filespec, dir_Info->dir);
+ index = strlen(filespec) - 1;
+ if (index >= 0 && (filespec[index] == '/' || filespec[index] ==
'\\'))
+ filespec[index] = '\0';
+ strcat(filespec, "/*");
+
+ if ((handle = _findfirst(filespec, &(dir_Info->fileinfo))) < 0) {
+ if (errno == ENOENT) {
+ dir_Info->finished = 1;
+ }
+ }
+ dir_Info->handle = handle;
+ free(filespec);
}
Index: php31/os/nt/sendmail.c
diff -c php31/os/nt/sendmail.c:2.0 php31/os/nt/sendmail.c:2.1
*** php31/os/nt/sendmail.c:2.0 Fri Jul 3 09:18:50 1998
--- php31/os/nt/sendmail.c Thu Aug 13 18:57:35 1998
***************
*** 286,292 ****
}
//send termination dot
! if ((res = Post("\n.\n")) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
return (res);
--- 286,292 ----
}
//send termination dot
! if ((res = Post("\r\n.\r\n")) != SUCCESS)
return (res);
if ((res = Ack()) != SUCCESS)
return (res);
***************
*** 324,330 ****
zoneh /= (60 * 60);
zonem = (abs(_timezone) / 60) - (zoneh * 60);
! p += sprintf(p, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\n",
days[tm->tm_wday],
tm->tm_mday,
months[tm->tm_mon],
--- 324,330 ----
zoneh /= (60 * 60);
zonem = (abs(_timezone) / 60) - (zoneh * 60);
! p += sprintf(p, "Date: %s, %02d %s %04d %02d:%02d:%02d %s%02d%02d\r\n",
days[tm->tm_wday],
tm->tm_mday,
months[tm->tm_mon],
***************
*** 337,354 ****
zonem);
if(xheaders && strnicmp("From:",xheaders,5)){
! p += sprintf(p, "From: %s\n", RPath);
}
! p += sprintf(p, "To: %s\n", mailTo);
! p += sprintf(p, "Subject: %s\n", Subject);
if(xheaders){
! p += sprintf(p, "%s\n", xheaders);
}
if ((res = Post(GLOBAL(Buffer))) != SUCCESS)
return (res);
! if ((res = Post("\n")) != SUCCESS)
return (res);
return (SUCCESS);
--- 337,354 ----
zonem);
if(xheaders && strnicmp("From:",xheaders,5)){
! p += sprintf(p, "From: %s\r\n", RPath);
}
! p += sprintf(p, "Subject: %s\r\n", Subject);
! p += sprintf(p, "To: %s\r\n", mailTo);
if(xheaders){
! p += sprintf(p, "%s\r\n", xheaders);
}
if ((res = Post(GLOBAL(Buffer))) != SUCCESS)
return (res);
! if ((res = Post("\r\n")) != SUCCESS)
return (res);
return (SUCCESS);
***************
*** 380,388 ****
return (FAILED_TO_GET_HOSTNAME);
// Resolve the servers IP
! GLOBAL(adr) = gethostbyname(GLOBAL(MailHost));
! if (!GLOBAL(adr))
! return (FAILED_TO_RESOLVE_HOST);
// Connect to server
GLOBAL(sock_in).sin_family = AF_INET;
--- 380,389 ----
return (FAILED_TO_GET_HOSTNAME);
// Resolve the servers IP
! //if (!isdigit(GLOBAL(MailHost)[0])||!gethostbyname(GLOBAL(MailHost)))
! //{
! // return (FAILED_TO_RESOLVE_HOST);
! //}
// Connect to server
GLOBAL(sock_in).sin_family = AF_INET;
***************
*** 466,472 ****
goto again; // Incomplete data. Line must be terminated by CRLF
if (buf[0] > '3')
! return (SNMP_SERVER_ERROR);
return (SUCCESS);
}
--- 467,473 ----
goto again; // Incomplete data. Line must be terminated by CRLF
if (buf[0] > '3')
! return (SMTP_SERVER_ERROR);
return (SUCCESS);
}
Index: php31/os/nt/sendmail.h
diff -c php31/os/nt/sendmail.h:2.0 php31/os/nt/sendmail.h:2.1
*** php31/os/nt/sendmail.h:2.0 Fri Jul 3 09:18:51 1998
--- php31/os/nt/sendmail.h Thu Aug 13 18:57:35 1998
***************
*** 17,23 ****
#define FAILED_TO_CONNECT 6
#define FAILED_TO_SEND 7
#define FAILED_TO_RECEIVE 8
! #define SNMP_SERVER_ERROR 9
#define FAILED_TO_GET_HOSTNAME 10
#define OUT_OF_MEMORY 11
#define UNKNOWN_ERROR 12
--- 17,23 ----
#define FAILED_TO_CONNECT 6
#define FAILED_TO_SEND 7
#define FAILED_TO_RECEIVE 8
! #define SMTP_SERVER_ERROR 9
#define FAILED_TO_GET_HOSTNAME 10
#define OUT_OF_MEMORY 11
#define UNKNOWN_ERROR 12
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net