log success sms sending only when debugging, log failures always

This commit is contained in:
Sergey Popov 2011-12-12 13:06:00 +04:00
parent e6d0c3610e
commit 1d7c2b6a15

View File

@ -41,11 +41,12 @@ void send_sms_callback (GSM_StateMachine *sm, int status, int MessageReference,
if (status==0) {
sprintf(tmp,"Sent SMS on device '%s' - OK\n", GSM_GetConfig(sm, -1)->Device);
sms_send_status = ERR_NONE;
log_debug(tmp,DEBUG_BASE);
} else {
sprintf(tmp,"Sent SMS on device '%s' - FAILURE\n", GSM_GetConfig(sm, -1)->Device);
sms_send_status = ERR_UNKNOWN;
log_event(tmp);
}
log_event(tmp);
}
bool gammu_send_sms(const char* message)