1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-03 16:17:46 +02:00

Fixed loading and a small problem with the length of crypto requests.

This commit is contained in:
irungentoo 2013-08-15 20:56:22 -04:00
parent 4c529180e4
commit 9f9ca0a971

8
main.c
View File

@ -147,6 +147,8 @@ static void do_tox(Messenger *m, ToxWindow * prompt)
doMessenger(m);
}
int f_loadfromfile;
/*
* Store Messenger to given location
* Return 0 stored successfully
@ -156,6 +158,8 @@ static void do_tox(Messenger *m, ToxWindow * prompt)
*/
int store_data(Messenger *m, char *path)
{
if (f_loadfromfile == 0) /*If file loading/saving is disabled*/
return 0;
FILE *fd;
size_t len;
uint8_t *buf;
@ -186,6 +190,8 @@ int store_data(Messenger *m, char *path)
static void load_data(Messenger *m, char *path)
{
if (f_loadfromfile == 0) /*If file loading/saving is disabled*/
return;
FILE *fd;
size_t len;
uint8_t *buf;
@ -233,7 +239,7 @@ int main(int argc, char *argv[])
char *user_config_dir = get_user_config_dir();
int config_err = 0;
int f_loadfromfile = 1;
f_loadfromfile = 1;
int f_flag = 0;
int i = 0;
for (i = 0; i < argc; ++i) {