mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:53:02 +01:00
Fixed loading and a small problem with the length of crypto requests.
This commit is contained in:
parent
4c529180e4
commit
9f9ca0a971
8
main.c
8
main.c
@ -147,6 +147,8 @@ static void do_tox(Messenger *m, ToxWindow * prompt)
|
|||||||
doMessenger(m);
|
doMessenger(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int f_loadfromfile;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store Messenger to given location
|
* Store Messenger to given location
|
||||||
* Return 0 stored successfully
|
* Return 0 stored successfully
|
||||||
@ -156,6 +158,8 @@ static void do_tox(Messenger *m, ToxWindow * prompt)
|
|||||||
*/
|
*/
|
||||||
int store_data(Messenger *m, char *path)
|
int store_data(Messenger *m, char *path)
|
||||||
{
|
{
|
||||||
|
if (f_loadfromfile == 0) /*If file loading/saving is disabled*/
|
||||||
|
return 0;
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
size_t len;
|
size_t len;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
@ -186,6 +190,8 @@ int store_data(Messenger *m, char *path)
|
|||||||
|
|
||||||
static void load_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;
|
FILE *fd;
|
||||||
size_t len;
|
size_t len;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
@ -233,7 +239,7 @@ int main(int argc, char *argv[])
|
|||||||
char *user_config_dir = get_user_config_dir();
|
char *user_config_dir = get_user_config_dir();
|
||||||
int config_err = 0;
|
int config_err = 0;
|
||||||
|
|
||||||
int f_loadfromfile = 1;
|
f_loadfromfile = 1;
|
||||||
int f_flag = 0;
|
int f_flag = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (i = 0; i < argc; ++i) {
|
for (i = 0; i < argc; ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user