CC: | cosimo [...] cpan.org |
Subject: | Problem with deleting SMS messages using ->delete() method |
Date: | Fri, 14 Aug 2009 12:26:51 +0300 |
To: | bug-Device-Gsm [...] rt.cpan.org |
From: | "Vytas M." <vytas [...] desktop.lt> |
Hi,
i have tryed to delete messages using delete() method. Like this
$msg[0]->delete();
I have tryed to use while loop for send messages to database and if
successfull I am deleting these messages. All messages except the first
are deleted correctly. The first message is never deleted. In the log
file I have faund record:
"Could not delete sms n.0 in storage SM. Internal error."
I have looked at source code (Gsm/Sms.pm) and found on the line 301 (in
sub delete) if statement:
if( ref $gsm && $msg_index > 0 ) {
so looking at "$msg_index > 0" and the first message has index = 0. So
it will be never deleted. So this expression must be at least equal or
more than zero. Am I right?
When i delete using $gsm->delete_sms(0) it deletes first message without
problems.
More information on version:
$Id: Sms.pm,v 1.14 2006-10-17 15:53:18 cosimo Exp $
Device-Gsm-1.52
Regards,
Vytas M.
Lithuania