[svn-commits] seanbright: branch group/newcdr r202105 - /team/group/newcdr/cel/cel_tds.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Jun 19 18:47:28 CDT 2009
Author: seanbright
Date: Fri Jun 19 18:47:25 2009
New Revision: 202105
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=202105
Log:
Remove check for userfield (we're going to just assume it's there). Whitespace.
Modified:
team/group/newcdr/cel/cel_tds.c
Modified: team/group/newcdr/cel/cel_tds.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/newcdr/cel/cel_tds.c?view=diff&rev=202105&r1=202104&r2=202105
==============================================================================
--- team/group/newcdr/cel/cel_tds.c (original)
+++ team/group/newcdr/cel/cel_tds.c Fri Jun 19 18:47:25 2009
@@ -96,7 +96,6 @@
);
DBPROCESS *dbproc;
unsigned int connected:1;
- unsigned int has_userfield:1;
};
AST_MUTEX_DEFINE_STATIC(tds_lock);
@@ -158,47 +157,48 @@
}
erc = dbfcmd(settings->dbproc,
- "INSERT INTO %s "
- "("
- "accountcode, "
- "cidnum, "
- "cidname, "
- "cidani, "
- "cidrdnis, "
- "ciddnid, "
- "exten, "
- "context, "
- "channel, "
- "appname, "
- "appdata, "
- "eventtime, "
- "eventtype, "
- "amaflags, "
- "uniqueid,"
- "linkedid,"
- "userfield,"
- "peer" ") "
- "VALUES "
- "("
- "'%s', " /* accountcode */
- "'%s', " /* clidnum */
- "'%s', " /* clid */
- "'%s', " /* cid-ani */
- "'%s', " /* cid-rdnis */
- "'%s', " /* cid-dnid */
- "'%s', " /* exten */
- "'%s', " /* context */
- "'%s', " /* channel */
- "'%s', " /* app */
- "'%s', " /* appdata */
- "%s, " /* eventtime */
- "'%s', " /* eventtype */
- "'%s', " /* amaflags */
- "'%s', " /* uniqueid */
- "'%s', " /* linkedid */
- "'%s', " /* userfield */
- "'%s'" /* peer */
- ")",
+ "INSERT INTO %s "
+ "("
+ "accountcode,"
+ "cidnum,"
+ "cidname,"
+ "cidani,"
+ "cidrdnis,"
+ "ciddnid,"
+ "exten,"
+ "context,"
+ "channel,"
+ "appname,"
+ "appdata,"
+ "eventtime,"
+ "eventtype,"
+ "amaflags, "
+ "uniqueid,"
+ "linkedid,"
+ "userfield,"
+ "peer"
+ ") "
+ "VALUES "
+ "("
+ "'%s'," /* accountcode */
+ "'%s'," /* clidnum */
+ "'%s'," /* clid */
+ "'%s'," /* cid-ani */
+ "'%s'," /* cid-rdnis */
+ "'%s'," /* cid-dnid */
+ "'%s'," /* exten */
+ "'%s'," /* context */
+ "'%s'," /* channel */
+ "'%s'," /* app */
+ "'%s'," /* appdata */
+ "%s, " /* eventtime */
+ "'%s'," /* eventtype */
+ "'%s'," /* amaflags */
+ "'%s'," /* uniqueid */
+ "'%s'," /* linkedid */
+ "'%s'," /* userfield */
+ "'%s'" /* peer */
+ ")",
settings->table, accountcode_ai, clidnum_ai, clid_ai, cidani_ai, cidrdnis_ai,
ciddnid_ai, exten_ai, context_ai, channel_ai, app_ai, appdata_ai, start,
record->event_name, ast_cel_flags2str(record->amaflag), uniqueid_ai, linkedid_ai,
@@ -250,6 +250,7 @@
free(linkedid_ai);
free(userfield_ai);
free(peer_ai);
+
free(record);
return;
@@ -373,14 +374,6 @@
if (execute_and_consume(settings->dbproc, "SELECT 1 FROM [%s]", settings->table)) {
ast_log(LOG_ERROR, "Unable to find table '%s'\n", settings->table);
goto failed;
- }
-
- /* Check to see if we have a userfield column in the table */
- if (execute_and_consume(settings->dbproc, "SELECT userfield FROM [%s] WHERE 1 = 0", settings->table)) {
- ast_log(LOG_NOTICE, "Unable to find 'userfield' column in table '%s'\n", settings->table);
- settings->has_userfield = 0;
- } else {
- settings->has_userfield = 1;
}
settings->connected = 1;
More information about the svn-commits
mailing list