From 1d7c2b6a15e941a1b0cb70c2c255439542b4ed3e Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Mon, 12 Dec 2011 13:06:00 +0400 Subject: [PATCH] log success sms sending only when debugging, log failures always --- yasnd-gammu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yasnd-gammu.c b/yasnd-gammu.c index 68e0909..788a259 100644 --- a/yasnd-gammu.c +++ b/yasnd-gammu.c @@ -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)