Error Writing To Database Smsdsql_addsentsmsinfo
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse Gammu Mailing Lists Gammu Cellular manager for mobile phones/modems Brought to you by: marcinello, nijel Summary Files Reviews Support News Mailing Lists Donate Code gammu-legal gammu-users Conflict on unique keys Conflict on unique keys From: Paul Vasiliev
CD: 0ms
Michal Čihař <***@suse.cz>Date: Fri Dec 16 10:16:18 2011 +0100Add missing parenthesisdiff --git http://gammu-svn.cihar.narkive.com/M7x2pBfu/scm-gammu-branch-master-updated-1-30-92-969-g7c83c27 a/smsd/services/sql.c b/smsd/services/sql.cindex e255917..2349727 100644--- a/smsd/services/sql.c+++ b/smsd/services/sql.c@@ -1166,19 +1166,22 http://fossies.org/linux/gammu/smsd/services/sql.c @@ GSM_Error SMSDSQL_ReadConfiguration(GSM_SMSDConfig *Config)Config->db = NULL;#ifdef HAVE_MYSQL_MYSQL_H- if (!strcasecmp(Config->driver, "native_mysql"))+ if (!strcasecmp(Config->driver, "native_mysql")) {Config->db = &SMSDMySQL;+ }#endif#ifdef HAVE_POSTGRESQL_LIBPQ_FE_H- if (!strcasecmp(Config->driver, "native_pgsql"))+ if (!strcasecmp(Config->driver, "native_pgsql")) {Config->db = &SMSDPgSQL;+ }#endif#ifdef ODBC_FOUND- if (!strcasecmp(Config->driver, "odbc"))+ if error writing (!strcasecmp(Config->driver, "odbc")) {Config->db = &SMSDODBC;if (Config->sql == NULL) {SMSD_Log(DEBUG_INFO, Config, "Using generic SQL for ODBC, this might fail. In such case please set SQL configuration option.");}+ }#endifif (Config->db == NULL) {#ifdef LIBDBI_FOUND--Gammu Michal Cihar 2011-12-16 09:30:29 UTC PermalinkRaw Message The following error writing to commit has been merged in the master branch:commit 7c83c27fb3eef5b1897c24b3fe3dc3358894cf53Author: Michal Čihař <***@suse.cz>Date: Fri Dec 16 10:29:14 2011 +0100Propagate SQL error codesdiff --git a/smsd/services/sql-core.h b/smsd/services/sql-core.hindex d2551dc..204c7ad 100644--- a/smsd/services/sql-core.h+++ b/smsd/services/sql-core.h@@ -85,7 +85,8 @@ typedef enum {SQL_OK, /* all ok */SQL_TIMEOUT, /* query or connection timeout */SQL_FAIL, /* query failed */- SQL_LOCKED /* locked table - currently unused */+ SQL_LOCKED, /* locked table - currently unused */+ SQL_BUG /* Internal error */} SQL_Error;/* types passed to NamedQuery */diff --git a/smsd/services/sql.c b/smsd/services/sql.cindex 2349727..9986b48 100644--- a/smsd/services/sql.c+++ b/smsd/services/sql.c@@ -215,17 +215,18 @@ static const char *SMSDSQL_Now(GSM_SMSDConfig * Config)return now_fallback;}}-static GSM_Error SMSDSQL_Query(GSM_SMSDConfig * Config, const char *query, SQL_result * res)+static SQL_Error SMSDSQL_Query(GSM_SMSDConfig * Config, const char *query, SQL_result * res){- SQL_Error error;+ SQL_Error error = SQL_TIMEOUT;int attempts = 1;struct
page into HTML format using source code syntax highlighting with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. For more information about "sql.c" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.37.0_vs_1.37.2. 1 /** 2 * libsql database service 3 * 4 * Part of Gammu project 5 * 6 * Copyright (C) 2009 - 2015 Michal Čihař 7 * (c) 2010 Miloslav Semler 8 * 9 * Licensed under GNU GPL version 2 or later 10 */ 11 12 #define _XOPEN_SOURCE 13 #define _BSD_SOURCE 14 #define _DEFAULT_SOURCE 15 #include