Commit b2d2eb4c authored by Simon Morlat's avatar Simon Morlat

fix compilation issue

parent deed93a6
......@@ -2155,31 +2155,6 @@ static void populate_xdg_data_dirs_envvar(void) {
}
#define ZRTP_CACHE_CONFIG_FILE ".linphone-zidcache.db"
static char *linphone_gtk_zrtp_cache_get_db_file(const char *filename){
const int path_max=1024;
char *db_file=NULL;
db_file=(char *)g_malloc(path_max*sizeof(char));
if (filename==NULL) filename=ZRTP_CACHE_CONFIG_FILE;
/*try accessing a local file first if exists*/
if (bctbx_file_exist(ZRTP_CACHE_CONFIG_FILE)==0){
snprintf(db_file,path_max,"%s",filename);
}else{
#ifdef _WIN32
const char *appdata=getenv("APPDATA");
if (appdata){
snprintf(db_file,path_max,"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
CreateDirectory(db_file,NULL);
snprintf(db_file,path_max,"%s\\%s\\%s",appdata,LINPHONE_CONFIG_DIR,filename);
}
#else
const char *home=getenv("HOME");
if (home==NULL) home=".";
snprintf(db_file,path_max,"%s/%s",home,filename);
#endif
}
return db_file;
}
int main(int argc, char *argv[]){
char *config_file;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment