Categories
Ramblings

gammu –smsd / debian sid problem – possibly bug?

—– Original Message —–
From: “Benjamin Povirk”
To:
Sent: Thursday, April 06, 2006 1:28 AM
Subject: Re: gammu –smsd / debian sid problem –
possibly bug?

> ajajaj, it is me who needs to apologise because I
didn’t check with
> FILES option earlier.
> on my box, FILES option aborts with the same error
code (glibc free())
> and the same pointer.
>
> if FILES would work, I would be very interested in
your script since
> there is a pool in my vilage on this sat.
>
> it is only a dream to setup smsd till then, so I’m
working on php
> script that will shell_exec gammu and parse sms into
mysql.
>
> Regarding pool in my vilage…I live near capital of
Slovenia and my
> friends are counting on me (local linux man) to
handle sms-es… 🙂
>
> sory, gone out of the topic, well, let me know if
you are interested
> on that php script. Probably, it will be finished on
sat 5 min to pool
> 🙂
>
>
> On 4/5/06, Tom Lee
wrote:
>> Benjamin,
>>
>> Apologies if you are the person I gave wrong info
to earlier regarding
>> smsd
>> and mysql. Unfortunately, I remain uninformed
about that integration.
>> However, I have had luck using smsd’s FILES mode
and monitoring the spool
>> directories with Gamin, then launching a script
when new files appear.
>> You
>> could get their content into your database that
way, if you are unable to
>> make the MySQL integration work properly.
>>
>> The following doesn’t have any database handling —
it actually calls a
>> perl
>> script from Python (I would never have done this,
except the Perl script
>> was
>> already written and I couldn’t get Perl’s Gamin
module to compile). You
>> could easily perform the database operations in
Python or the launched
>> Perl
>> script, of course.
>>
>> This is adapted from the Gamin/Python example code.
I’ll be daemonizing
>> it
>> later this week. Let me know if that code would be
useful to you and I
>> can
>> send it along.
>>
>> #!/usr/bin/python
>>
>> import gamin
>> import time
>> import os
>>
>> dir = “/var/spool/sms/inbox”
>>
>> def callback(path, event):
>> print “Got callback: %s, %s” % (path, event)
>>
>> # only fire the script for new files (5) or
found files (at
>> startup —
>> 8)
>> if((event==5) or (event==8)):
>> # call a perl script, passing it the path
to the new SMS file as
>> its
>> single parameter.
>> stdout_handle =
>>
os.popen((“/home/username/script_to_call_on_sms_receipt.pl
>> ” + dir + “/” + path),”r”)
>>
>> # print the script’s output to the screen
>> output = stdout_handle.read()
>> print output
>>
>> # NOTE: as written, files are not deleted
and will accumulate in
>> the
>> spool directory
>>
>> mon = gamin.WatchMonitor()
>> mon.watch_directory(dir, callback)
>>
>> while(1==1):
>> time.sleep(1)
>> ret = mon.event_pending()
>> if ret > 0:
>> ret = mon.handle_one_event()
>> ret = mon.handle_events()
>>
>> mon.stop_watch(dir)
>> del mon
>>
>>
>> On 4/5/06, Benjamin Povirk
wrote:
>> >
>> > Hi.
>> >
>> > My name is Benjamin, 24, linux newby from
Slovenia.
>> > I run Linux katra 2.6.8-2-386 #1 Tue Aug 16
12:46:35 UTC 2005 i686
>> > GNU/Linux debian sid box
>> >
>> > overview:
>> >
>> > I compiled gammu source found on
http://debian.cihar.com/ (many times
>> > now…)
>> >
>> > ./configure works…
>> > regarding mysql
>> > checking mysql/mysql.h usability… yes
>> > checking mysql/mysql.h presence… yes
>> > checking for mysql/mysql.h… yes
>> > MySQL SMS plugin (requires mysql) –
yes
>> >
>> > make install with gcc, gcc3.3 and gcc-4.0 works
so gammu is ready to
>> > use
>> > for common practice (eg. gammu ..identify,
–sendsms, –getsms,…)
>> >
>> > problem:
>> >
>> > gammu –smsd MYSQL /root/.gammurc_SMSD
>> > keeps throwing
>> > *** glibc detected *** free(): invalid pointer:
0x4031fff4 ***
>> > Aborted
>> > no matter with which gcc was compiled, pointer
HEX stays the same.
>> >
>> > If someone can help me with this problem and
needs additional files,
>> > outputs, I am willing to provide that material
(but this mail is long
>> > enough).
>> >
>> > Thank you and regards,
>> > Benjamin
>> >
>> >
>> > —
>> > _________________________________________
>> > I’m not a comlpete idoit – some prats are
missnig.
>> >
>>
>>
>
>
> —
> _________________________________________
> I’m not a comlpete idoit – some prats are missnig.
>
>
>
——————————————————-
> This SF.Net email is sponsored by xPML, a
groundbreaking scripting
> language
> that extends applications into web and mobile media.
Attend the live
> webcast
> and join the prime developer group breaking into
this new coding
> territory!
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Gammu-users mailing list –
>
https://lists.sourceforge.net/lists/listinfo/gammu-users
>

By steve

Steve, Internet Peon on his journey to become a mogul. Like technology, nerd things (programming) and gadgets.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.