diff options
author | ache <ache@ache.one> | 2019-02-05 19:16:42 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-02-05 19:16:42 +0100 |
commit | 446e47937737980f6757134b77267bd83a69f066 (patch) | |
tree | 5324351635695458782522fb03f31a6ed7a7ea45 /sms.c | |
parent | Search function (diff) |
Add config file management
Diffstat (limited to 'sms.c')
-rw-r--r-- | sms.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2,11 +2,9 @@ #include <stdio.h> #include <stdlib.h> - - - conversation* listConv; size_t nbConv; +extern config_t config; int insertSMS(sms* S) { int index = -1; @@ -200,12 +198,12 @@ int listSMS(char* smsInboxDir, int inorout) { int loadConv(void) { - int r = listSMS("/var/spool/sms/inbox/", SMS_IN); + int r = listSMS(config.SMS_INBOX, SMS_IN); if( r ) { fprintf(stderr, "Impossible de lire les SMS reçu"); return 1; } - r = listSMS("/var/spool/sms/sent/" , SMS_OUT); + r = listSMS(config.SMS_SENTBOX , SMS_OUT); if( r ) { fprintf(stderr, "Impossible de lire les SMS envoyés"); return 2; |