Skip Menu |

This queue is for tickets about the Device-Gsm CPAN distribution.

Report information
The Basics
Id: 48700
Status: resolved
Worked: 40 min
Priority: 0/
Queue: Device-Gsm

People
Owner: cosimo [...] cpan.org
Requestors: vytas [...] desktop.lt
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.54



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
Hi, thanks for the report. The fix is trivial, so expect a new updated 1.53 very soon...
Fixed in 1.53, just uploaded to CPAN.
Subject: Re: [rt.cpan.org #48700] Problem with deleting SMS messages using ->delete() method
Date: Mon, 17 Aug 2009 11:28:15 +0300
To: bug-Device-Gsm [...] rt.cpan.org
From: "Vytas M." <vytas [...] desktop.lt>
Hello, fast fix. I understand that there was trivial fix, but sometimes small bugs eats lot's of time :) Now I see another error after update, that was not here before: substr outside of string at /usr/lib/perl5/site_perl/5.8.8/Device/Gsm/Sms.pm line 18. It seems, like fixing one problem, made another. So I looked at that file and as I understood there is file version number missing or smth. v. 1.53, Device/Gsm/Sms.pm line 18 ... $Device::Gsm::Sms::VERSION = substr q$Revision$, 10; ... v. 1.52, Device/Gsm/Sms.pm line 18 ... $Device::Gsm::Sms::VERSION = substr q$Revision: 1.14 $, 10; ... Also trivial fix, but when i try to run program it prints that error :) Regards, Vytas M.
Fixed in 1.54, already on CPAN.