mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 13:08:08 +00:00
fix compilation issue
This commit is contained in:
parent
deed93a650
commit
b2d2eb4caa
1 changed files with 0 additions and 25 deletions
25
gtk/main.c
25
gtk/main.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue