diff options
author | ache <ache@ache.one> | 2018-11-08 16:40:47 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-11-08 16:40:47 +0100 |
commit | 6cb43717cbbe8380d2aeb382d2b6f350bab74494 (patch) | |
tree | 717ee722cd50ebcbd4979b4e7156c1b860cebf88 /sms.c | |
parent | Fix message showing bug (diff) |
Improve loggers
Diffstat (limited to 'sms.c')
-rw-r--r-- | sms.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -180,10 +180,10 @@ int listSMS(char* smsInboxDir, int inorout) { char filename[1024] =""; sprintf(filename, "%s/%s", smsInboxDir, dir->d_name); - int r = - readSMS(filename, inorout); - if( r ) + int r = readSMS(filename, inorout); + if( r ) { return 2; + } } } @@ -200,15 +200,16 @@ int listSMS(char* smsInboxDir, int inorout) { int loadConv(void) { - int r = - - listSMS("/var/spool/sms/inbox/", SMS_IN); - if( r ) + int r = listSMS("/var/spool/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); - if( r ) + } + r = listSMS("/var/spool/sms/sent/" , SMS_OUT); + if( r ) { + fprintf(stderr, "Impossible de lire les SMS envoyés"); return 2; + } for(int i = 0 ; i < nbConv ; i++) { contact* cntct = NULL; @@ -224,7 +225,6 @@ int loadConv(void) { } } - return 0; } |