[462781] Allow longer paths on Windows.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=462781
This commit is contained in:
Roger A. Light 2015-03-27 21:47:27 +00:00
parent c9a924e95e
commit 3591f2d256
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,6 @@
1.4.1 - 2015xxxx
================
Broker:
- Fix possible crash under heavy network load. Closes #463241.
- Fix possible crash when using pattern ACLs.
@ -12,6 +15,7 @@ Client library:
- Return -1 on error from mosquitto_socket(). Closes #461705.
- Fix crash on multiple calls to mosquitto_lib_init/mosquitto_lib_cleanup.
Closes #462780.
- Allow longer paths on Windows. Closes #462781.
1.4 - 20150218

View File

@ -307,10 +307,10 @@ int _mosquitto_hex2bin(const char *hex, unsigned char *bin, int bin_max_len)
FILE *_mosquitto_fopen(const char *path, const char *mode)
{
#ifdef WIN32
char buf[MAX_PATH];
char buf[4096];
int rc;
rc = ExpandEnvironmentStrings(path, buf, MAX_PATH);
if(rc == 0 || rc == MAX_PATH){
rc = ExpandEnvironmentStrings(path, buf, 4096);
if(rc == 0 || rc > 4096){
return NULL;
}else{
return fopen(buf, mode);