bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bayonne-devel] scripts and db


From: Etoile Dièse
Subject: Re: [Bayonne-devel] scripts and db
Date: Fri, 26 Nov 2004 18:54:52 +0100
User-agent: KMail/1.6.1

Hello
there is a problem in this version when the SQL request returns nothing. I 
suppose your problem is this.
Here the patch :

diff -Naur bayonne-1.2.11/modules/mysql/mysql.cpp 
bayonne-1.2.11.after/modules/mysql/mysql.cpp
--- bayonne-1.2.11/modules/mysql/mysql.cpp      2003-05-23 07:05:53.000000000 
+0200
+++ bayonne-1.2.11.after/modules/mysql/mysql.cpp        2004-11-06 
18:23:04.492822576 +0100
@@ -262,7 +262,7 @@
        const char **argv;
        char val[10];
        const char *errmsg;
-       char *iid;
+       char iid[100];
        MYSQL_RES *result;

        if(!dvr)
@@ -327,7 +327,7 @@
                        sprintf(iid, "%d", mysql_insert_id(&mysql.conn));
                        trunk->setSymbol(SYM_INSERTID, iid);
                        trunk->setSymbol(SYM_ROWS, 
mysql_affected_rows(&mysql.conn));
-                       mysql_free_result(result);
+                       //      mysql_free_result(result);
                        mysql.leaveMutex();
                        return true;
                }

Cheers

Le vendredi 26 Novembre 2004 18:15, Beto . a écrit :
> hi, im new with bayonne and have some questions and problems.
> i have :
> MySQL 3.23.52
> bayonne 1.2.11
> ccaudio 1.1.1
> ccscript 2.5.6
> commoncpp2-1.0.13
> postgresql-7.2.2
> redhat 8.0
> 
> the problems:
> 
> i have this simple script:
> 
> 
> options dtmf=script
>         slog.warning "Comienzo"
>         answer
>         cleardigits     # clear digit buffer
>         play playrec:play text="enter the three digit prompt you wish to 
> play..."
>         sleep 60        # wait up to 60 seconds
>         return.exit     status="timeout"
> 
> ^A
> ^B
> ^C
> ^D
> ^pound
> ^star
> ^timeout
>         play playrec:invalid text="you have entered an invalid value..."
>         return.exit     status="timeout"
> ^dtmf
>         collect count=3 timeout=5 ignore="*#ABCD"
>         slog.warning  "Ingreso : %session.digits "
>         slog.warning %sql.error
>         # note: sql queries are ofter longer then standard string
>         # lenght for Bayonne, so it's better increase the
>         # variable size
>         set.size 100 %queryInsert "insert into ganador values (" 
> %session.digits \
>         ", 'GANASTE')"
>         slog.warning %queryInsert
>         sql query=%queryInsert
>         return.exit     status="ok"
> 
> 
> when i run bayonne i get this:
> 
> address@hidden root]# bayonne -F
> tgi: initialized; uid=501 pid=4560
> driver started 4 port(s)
> normal startup; Bayonne Runtime Configuration
> scheduler: using /etc/bayonne.sched
> dx(0): playrec: Comienzo
> dx(0): playrec: Ingreso : 111
> dx(0): playrec:
> dx(0): playrec: insert into ganador values (111, 'GANASTE')
> dx(0): playrec: Comienzo
> dx(0): playrec: Ingreso : 222
> dx(0): playrec:
> dx(0): playrec: insert into ganador values (222, 'GANASTE')
> Segmentation fault
> 
> the first time, it makes the insert, but the second dont. then i must 
> restart bayonne. i observed that there is a change in the PIDs ( i dont know 
> if this can be useful )
> 4647 ?        S      0:01 /usr/local/lib/bayonne/1.2.11/bayonne.bin --prefix 
> /usr/local -F
> 4648 ?        S      0:00 [tgi]
> 
> 4648 ?        S      0:00 [tgi]
> 4650 ?        S      0:00 /usr/local/lib/bayonne/1.2.11/bayonne.bin --prefix 
> /usr/local -F
> 
> 
> i cant compile postgres module, it complains about a sintaxis error :
> /usr/include/libpq-fe.h:236: error sintáctico antes del elemento `*'
> 
> and finally, (and less important) i cant start bayonne whit 
> /etc/init.d/bayonne script, it says:
> Starting bayonne: execvp: No existe el fichero o el directorio       [FALLÓ]
> 
> 
> its all. thanks.
> 
> _________________________________________________________________
> Charla con tus amigos en línea mediante MSN Messenger: 
> http://messenger.latam.msn.com/
> 
> 
> 
> _______________________________________________
> Bayonne-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bayonne-devel
> 
> 

-- 
Etoile Dièse




reply via email to

[Prev in Thread] Current Thread [Next in Thread]