From 10717cc766b828c2b0b344ad7cd74148939bc294 Mon Sep 17 00:00:00 2001 From: markster Date: Sun, 19 Dec 2004 21:13:41 +0000 Subject: Merge Olle's comment patch (bug #3097) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4488 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_sql_postgres.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'apps/app_sql_postgres.c') diff --git a/apps/app_sql_postgres.c b/apps/app_sql_postgres.c index 1620df635..f2e99dea4 100755 --- a/apps/app_sql_postgres.c +++ b/apps/app_sql_postgres.c @@ -226,7 +226,7 @@ static int aPGSQL_connect(struct ast_channel *chan, void *data) { s1=malloc(l); strncpy(s1, data, l -1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ var=strsep(&stringp," "); optionstring=strsep(&stringp,"\n"); @@ -267,9 +267,9 @@ static int aPGSQL_query(struct ast_channel *chan, void *data) { s2=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ s3=strsep(&stringp," "); - while (1) { // ugly trick to make branches with break; + while (1) { /* ugly trick to make branches with break; */ var=s3; s4=strsep(&stringp," "); id=atoi(s4); @@ -330,10 +330,10 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) { s2=malloc(l); strncpy(s1, data, l - 1); stringp=s1; - strsep(&stringp," "); // eat the first token, we already know it :P + strsep(&stringp," "); /* eat the first token, we already know it :P */ fetchid_var=strsep(&stringp," "); - while (1) { // ugly trick to make branches with break; - var=fetchid_var; // fetchid + while (1) { /* ugly trick to make branches with break; */ + var=fetchid_var; /* fetchid */ fnd=0; AST_LIST_TRAVERSE(headp,variables,entries) { @@ -350,19 +350,19 @@ static int aPGSQL_fetch(struct ast_channel *chan, void *data) { } s4=strsep(&stringp," "); - id=atoi(s4); // resultid + id=atoi(s4); /* resultid */ if ((PGSQLres=find_identifier(id,AST_PGSQL_ID_RESID))==NULL) { ast_log(LOG_WARNING,"Invalid result identifier %d passed in aPGSQL_fetch\n",id); res=-1; break; } - id=atoi(s7); //fetchid + id=atoi(s7); /*fetchid */ if ((lalares=find_identifier(id,AST_PGSQL_ID_FETCHID))==NULL) { - i=0; // fetching the very first row + i=0; /* fetching the very first row */ } else { i=*lalares; free(lalares); - del_identifier(id,AST_PGSQL_ID_FETCHID); // will re-add it a bit later + del_identifier(id,AST_PGSQL_ID_FETCHID); /* will re-add it a bit later */ } if (i