{ \
GET_CACHE_DATA_INT(tmp_len); \
if ((tmp_len = msgcache_get_cache_data_str(walk_data, &data, tmp_len, conv)) < 0) { \
- printf("error at rem_len:%d\n", rem_len);\
+ g_print("error at rem_len:%d\n", rem_len);\
procmsg_msginfo_free(msginfo); \
error = TRUE; \
goto bail_err; \
if (mode == DATA_WRITE) {
int w_err = 0, wrote = 0;
- if ((fp = g_fopen(file, "w+")) == NULL) {
+ if ((fp = g_fopen(file, "wb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return NULL;
}
tmpstr = g_try_malloc(len + 1);
if(tmpstr == NULL) {
- g_warning("read_data_str: can't g_malloc %d bytes - cache data probably corrupted.\n", len);
return -1;
}
tmpstr = g_try_malloc(len + 1);
if(tmpstr == NULL) {
- g_warning("read_data_str: can't g_malloc %d bytes - cache data probably corrupted.\n", len);
return -1;
}
if (!hMapping)
goto w32_fail;
cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail:
;
#else
if (!hMapping)
goto w32_fail2;
cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail2:
;
#else
if (!hMapping)
goto w32_fail6;
cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail6:
;
#else
if (!hMapping)
goto w32_fail3;
cache_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail3:
;
#else
if (!hMapping)
goto w32_fail4;
mark_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail4:
;
#else
if (!hMapping)
goto w32_fail5;
tags_data = (unsigned char *)MapViewOfFile(hMapping, FILE_MAP_COPY, 0, 0, 0);
+ CloseHandle (hMapping);
w32_fail5:
;
#else