summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <nijel@debian.org>2016-12-12 14:52:14 +0100
committerMichal Čihař <nijel@debian.org>2016-12-12 14:52:14 +0100
commit403eca6af192d9a1e57d7c8ea1181b3c6137bc4e (patch)
tree247e0730e4e15428cbe0113d1fcecae996eb8f79
parent4293c6165a17103edbdacb9971a8724bba275d32 (diff)
New upstream version 1.38.0
-rw-r--r--.travis.yml19
-rw-r--r--CMakeLists.txt5
-rw-r--r--ChangeLog8
-rw-r--r--cmake/templates/gammu-config.h.cmake4
-rwxr-xr-xconfigure18
-rw-r--r--contrib/proxy/README8
-rwxr-xr-xcontrib/proxy/gammu-backend78
-rw-r--r--description-pak2
-rw-r--r--docs/man/gammu-backup.52
-rw-r--r--docs/man/gammu-config.12
-rw-r--r--docs/man/gammu-detect.12
-rw-r--r--docs/man/gammu-smsbackup.52
-rw-r--r--docs/man/gammu-smsd-dbi.72
-rw-r--r--docs/man/gammu-smsd-files.72
-rw-r--r--docs/man/gammu-smsd-inject.12
-rw-r--r--docs/man/gammu-smsd-monitor.12
-rw-r--r--docs/man/gammu-smsd-mysql.7212
-rw-r--r--docs/man/gammu-smsd-null.72
-rw-r--r--docs/man/gammu-smsd-odbc.74
-rw-r--r--docs/man/gammu-smsd-pgsql.72
-rw-r--r--docs/man/gammu-smsd-run.72
-rw-r--r--docs/man/gammu-smsd-sql.72
-rw-r--r--docs/man/gammu-smsd-tables.72
-rw-r--r--docs/man/gammu-smsd.127
-rw-r--r--docs/man/gammu-smsdrc.54
-rw-r--r--docs/man/gammu.12
-rw-r--r--docs/man/gammurc.57
-rw-r--r--docs/man/jadmaker.12
-rw-r--r--docs/manual/config/index.rst3
-rw-r--r--docs/manual/faq/smsd.rst4
-rw-r--r--docs/manual/project/contributing.rst2
-rw-r--r--docs/manual/project/install.rst30
-rw-r--r--docs/manual/project/roadmap.rst4
-rw-r--r--docs/manual/smsd/mysql.rst21
-rw-r--r--docs/manual/smsd/odbc.rst4
-rw-r--r--docs/manual/smsd/pgsql.rst2
-rw-r--r--docs/manual/smsd/sql.rst2
-rw-r--r--docs/sql/mysql-strict.sql174
-rw-r--r--docs/sql/mysql.sql4
-rw-r--r--gammu.spec2
-rw-r--r--include/gammu-unicode.h21
-rw-r--r--libgammu/gsmphones.c1
-rw-r--r--libgammu/misc/coding/coding.c179
-rw-r--r--libgammu/misc/coding/coding.h31
-rw-r--r--libgammu/phone/at/atgen.c14
-rw-r--r--libgammu/phone/nokia/dct3/n6110.c6
-rw-r--r--locale/af/docs.po2
-rw-r--r--locale/ar/docs.po2
-rw-r--r--locale/bg/docs.po2
-rw-r--r--locale/bn/docs.po2
-rw-r--r--locale/ca/docs.po2
-rw-r--r--locale/cs/docs.po7
-rw-r--r--locale/cs/gammu.po2
-rw-r--r--locale/cs/libgammu.po2
-rw-r--r--locale/da/docs.po2
-rw-r--r--locale/de/docs.po2
-rw-r--r--locale/de/gammu.po2
-rw-r--r--locale/de/libgammu.po2
-rw-r--r--locale/docs.pot4
-rw-r--r--locale/el/docs.po2
-rw-r--r--locale/en_GB/docs.po2
-rw-r--r--locale/en_GB/gammu.po48
-rw-r--r--locale/es/docs.po2
-rw-r--r--locale/et/docs.po7
-rw-r--r--locale/fi/docs.po2
-rw-r--r--locale/fr/docs.po7
-rw-r--r--locale/gammu.pot4
-rw-r--r--locale/gl/docs.po2
-rw-r--r--locale/he/docs.po2
-rw-r--r--locale/hu/docs.po2
-rw-r--r--locale/id/docs.po2
-rw-r--r--locale/id/gammu.po19
-rw-r--r--locale/id/libgammu.po2
-rw-r--r--locale/it/docs.po2
-rw-r--r--locale/it/gammu.po2
-rw-r--r--locale/it/libgammu.po2
-rw-r--r--locale/ko/docs.po2
-rw-r--r--locale/libgammu.pot4
-rw-r--r--locale/nl/docs.po2
-rw-r--r--locale/pl/docs.po2
-rw-r--r--locale/pl/gammu.po2
-rw-r--r--locale/pl/libgammu.po2
-rw-r--r--locale/pt_BR/docs.po4
-rw-r--r--locale/pt_BR/gammu.po48
-rw-r--r--locale/pt_BR/libgammu.po34
-rw-r--r--locale/ro/docs.po2
-rw-r--r--locale/ru/docs.po2
-rw-r--r--locale/ru/gammu.po2
-rw-r--r--locale/ru/libgammu.po2
-rw-r--r--locale/sk/docs.po2
-rw-r--r--locale/sv/docs.po2
-rw-r--r--locale/sw/docs.po2
-rw-r--r--locale/tr/docs.po7
-rw-r--r--locale/uk/docs.po2
-rw-r--r--locale/zh_CN/docs.po2
-rw-r--r--locale/zh_TW/docs.po2
-rw-r--r--smsd/core.c11
-rw-r--r--smsd/core.h2
-rw-r--r--smsd/services/files.c8
-rw-r--r--smsd/services/sql.c3
-rw-r--r--tests/common.h11
-rw-r--r--tests/utf-8.c17
102 files changed, 944 insertions, 307 deletions
diff --git a/.travis.yml b/.travis.yml
index 25d63ef..7cbe12e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,11 +23,11 @@ before_script:
- cd _build
- ln -s ../codecov.yml .
script:
- - if [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then cmake .. -DCMAKE_C_COMPILER=$CC -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Continuous -DONLINE_TESTING=ON $TESTARGS $ARGS ; fi
- - if [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then make ; fi
- - if [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then make test ; fi
- - if [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then make gcov ; fi
+ - cmake .. -DCMAKE_C_COMPILER=$CC -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Continuous -DONLINE_TESTING=ON $TESTARGS $ARGS
+ - make
+ - make test
after_success:
+ - make gcov
- bash <(curl -s https://codecov.io/bash) -X gcov -F $TRAVIS_OS_NAME
# trigger Buildtime Trend Service to parse Travis CI log
notifications:
@@ -58,14 +58,6 @@ addons:
- gcc-6
- g++-6
- libmyodbc
- coverity_scan:
- project:
- name: "gammu/gammu"
- description: "Build submitted via Travis CI"
- notification_email: michal@cihar.com
- build_command_prepend: cmake ..
- build_command: make
- branch_pattern: coverity_scan
matrix:
exclude:
- os: osx
@@ -74,6 +66,9 @@ matrix:
- os: linux
compiler: gcc
env: ARGS="-DENABLE_GETOPT=OFF"
+ - os: linux
+ compiler: gcc
+ env: ARGS="-DUSE_WCHAR_T=OFF"
services:
- mysql
- postgresql
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe6e45f..a58f563 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
# Copyright (c) 2007 - 2016 Michal Cihar
# vim: expandtab sw=4 ts=4 sts=4:
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required (VERSION 3.0)
INCLUDE (CMakeForceCompiler)
project (Gammu C)
@@ -28,7 +28,7 @@ if (LARGE_FILES)
endif (LARGE_FILES)
# Set version
-set (GAMMU_VERSION "1.37.91" CACHE INTERNAL "")
+set (GAMMU_VERSION "1.38.0" CACHE INTERNAL "")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\1" "GAMMU_VERSION_MAJOR" "${GAMMU_VERSION}")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\2" "GAMMU_VERSION_MINOR" "${GAMMU_VERSION}")
string (REGEX REPLACE "^([0-9]*)\\.([0-9]*)\\.([0-9]*)$" "\\3" "GAMMU_VERSION_PATCH" "${GAMMU_VERSION}")
@@ -107,6 +107,7 @@ check_function_exists (scandir HAVE_SCANDIR)
check_function_exists (alphasort HAVE_ALPHASORT)
set (ENABLE_GETOPT ON CACHE BOOL "Enable getopt usage")
+set (USE_WCHAR_T ON CACHE BOOL "Use native wchar_t type")
if (ENABLE_GETOPT)
check_symbol_exists (getopt "unistd.h" HAVE_GETOPT)
check_symbol_exists (getopt_long "getopt.h" HAVE_GETOPT_LONG)
diff --git a/ChangeLog b/ChangeLog
index 67837c5..fe1e317 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,14 @@ the issue.
ChangeLog
=========
+20161212 - 1.38.0
+
+[-] * MySQL script for SMSD is compatible with strict mode.
+[-] * Fixed USSD responses for some AT modems.
+[-] * Fixed parsing network status for some modems (eg. Quectel UC15).
+[-] * Fixed handling of emojis and other Unicode chars from supplementary plan.
+[-] * Fixed compilation with C90 compiler.
+
20161023 - 1.37.91
[!] * Changed version of the shared library.
diff --git a/cmake/templates/gammu-config.h.cmake b/cmake/templates/gammu-config.h.cmake
index 76083e2..7268b69 100644
--- a/cmake/templates/gammu-config.h.cmake
+++ b/cmake/templates/gammu-config.h.cmake
@@ -280,6 +280,10 @@
#ifndef HAVE_STRTOULL
#cmakedefine HAVE_STRTOULL
#endif
+/* Size of wchar_t needs to be 4 bytes to store supplementary plan unicode */
+#if @WCHAR_T@ >= 4
+#cmakedefine USE_WCHAR_T
+#endif
#ifndef HAVE_WCHAR_T
#cmakedefine HAVE_WCHAR_T
#endif
diff --git a/configure b/configure
index 11e795d..8aa553d 100755
--- a/configure
+++ b/configure
@@ -14,10 +14,12 @@ is available at <http://www.cmake.org>.
EOT
-if ! type cmake > /dev/null 2>&1 ; then
- echo 'ERROR: CMake not found, please install it, it is required for build.'
- exit 1
-fi
+for cmd in cmake readlink dirname ; do
+ if ! type $cmd > /dev/null 2>&1 ; then
+ echo "ERROR: $cmd not found, please install it, it is required for build."
+ exit 1
+ fi
+done
help() {
cat <<EOT
@@ -41,11 +43,11 @@ EOT
exit 2
}
-# directory where we will build
-BUILD_DIR=build-configure
-
# directory where sources are located
-SOURCE_DIR=`pwd`
+SOURCE_DIR="$(dirname $(readlink -f $0))"
+
+# directory where we will build
+BUILD_DIR="$SOURCE_DIR/build-configure"
# cmake parameters
CMAKE_PREFIX=
diff --git a/contrib/proxy/README b/contrib/proxy/README
new file mode 100644
index 0000000..2912299
--- /dev/null
+++ b/contrib/proxy/README
@@ -0,0 +1,8 @@
+Example script for using proxy connection
+=========================================
+
+Usage:
+
+[gammu]
+device = ssh root@my.router /usr/local/bin/gammu-backend /dev/ttyUSB0
+connection = proxyat
diff --git a/contrib/proxy/gammu-backend b/contrib/proxy/gammu-backend
new file mode 100755
index 0000000..b85c554
--- /dev/null
+++ b/contrib/proxy/gammu-backend
@@ -0,0 +1,78 @@
+#!/bin/sh
+set -e
+
+ec=
+exec 5>/dev/null
+
+if false; then
+ fn_ec() {
+ >&2 echo "$@"
+ "$@"
+ }
+ ec=fn_ec
+ exec 5>&2 #/dev/null
+fi
+
+>&5 echo "$0 $*"
+
+d=${1:?}
+test -c "$d"
+exec 4<>"$d"
+
+mainpid=$$
+>&5 echo mainpid=$mainpid
+
+fmt=${fmt:-"%s\n"}
+pref="C:"
+
+fn_cat() {
+while IFS= read -r line; do
+ printf "${pref}$fmt" "$line" >&5
+ printf "$fmt" "$line"
+done
+}
+
+CR=$'\r'
+ESC=$'\033'
+
+fn_cat_filter() {
+prevline=
+while IFS= read -r line; do
+ escline=$line
+ escline=${escline//"$CR"/\\r}
+ escline=${escline//"$ESC"/\\033}
+ printf "${pref}$fmt" "$escline" >&5
+
+ line=$prevline$line
+ case $line in
+ $'\r') prevline=$prevline$line$'\n' ;;
+ $'\033\rAT\r\r') : ;; # workaround initial echo on
+ *) prevline=; printf "$fmt" "$line" ;;
+ esac
+done
+}
+
+CAT=fn_cat
+CAT="tee /proc/self/fd/2"
+CAT=cat
+
+(
+ #CAT='grep -v ^\^\(LTERSRP\|RSSI\):'
+ #CAT='grep -v aadasdad'
+ CAT=fn_cat_filter
+ catpid=
+ trap '>&5 $ec kill -KILL $catpid; exit 1' INT TERM
+ pref="S:"
+ $CAT <&4 &
+ catpid=$!
+ >&5 echo catpid=$catpid
+ wait $catpid || >&5 $ec kill -KILL $mainpid
+) &
+
+>&5 echo subshellpid=$!
+
+trap '>&5 $ec kill -TERM $!; >&5 $ec kill -KILL $mainpid' INT TERM
+
+$CAT >&4
+
+>&5 $ec kill -TERM $!
diff --git a/description-pak b/description-pak
index d95ada5..4ab1165 100644
--- a/description-pak
+++ b/description-pak
@@ -1,4 +1,4 @@
-Gammu (Gammu All Mobile Management Utilities) 1.37.91
+Gammu (Gammu All Mobile Management Utilities) 1.38.0
Gammu is a command line utility and library to work with mobile phones
from many vendors. Support for different models differs, but basic
diff --git a/docs/man/gammu-backup.5 b/docs/man/gammu-backup.5
index 1e1e1fd..b41b531 100644
--- a/docs/man/gammu-backup.5
+++ b/docs/man/gammu-backup.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-BACKUP" "5" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-BACKUP" "5" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-backup \- gammu(1) backup file format.
.
diff --git a/docs/man/gammu-config.1 b/docs/man/gammu-config.1
index e373891..31d976b 100644
--- a/docs/man/gammu-config.1
+++ b/docs/man/gammu-config.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-CONFIG" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-CONFIG" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-config \- Gammu configurator
.
diff --git a/docs/man/gammu-detect.1 b/docs/man/gammu-detect.1
index 3dc6527..ed48da0 100644
--- a/docs/man/gammu-detect.1
+++ b/docs/man/gammu-detect.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-DETECT" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-DETECT" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-detect \- Gammu device detection
.
diff --git a/docs/man/gammu-smsbackup.5 b/docs/man/gammu-smsbackup.5
index c46ea3d..48760b5 100644
--- a/docs/man/gammu-smsbackup.5
+++ b/docs/man/gammu-smsbackup.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSBACKUP" "5" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSBACKUP" "5" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsbackup \- gammu(1) SMS backup file format.
.
diff --git a/docs/man/gammu-smsd-dbi.7 b/docs/man/gammu-smsd-dbi.7
index e9c0d35..b9e050a 100644
--- a/docs/man/gammu-smsd-dbi.7
+++ b/docs/man/gammu-smsd-dbi.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-DBI" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-DBI" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-dbi \- gammu-smsd(1) backend using DBI abstraction layer to use any supported database as a message storage
.
diff --git a/docs/man/gammu-smsd-files.7 b/docs/man/gammu-smsd-files.7
index b245621..b44a4d3 100644
--- a/docs/man/gammu-smsd-files.7
+++ b/docs/man/gammu-smsd-files.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-FILES" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-FILES" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-files \- gammu-smsd(1) backend using filesystem as a message storage
.
diff --git a/docs/man/gammu-smsd-inject.1 b/docs/man/gammu-smsd-inject.1
index 1b55f14..0dd0909 100644
--- a/docs/man/gammu-smsd-inject.1
+++ b/docs/man/gammu-smsd-inject.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-INJECT" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-INJECT" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-inject \- Inject messages into queue of SMS daemon for Gammu
.
diff --git a/docs/man/gammu-smsd-monitor.1 b/docs/man/gammu-smsd-monitor.1
index fab9d3e..5c320dc 100644
--- a/docs/man/gammu-smsd-monitor.1
+++ b/docs/man/gammu-smsd-monitor.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-MONITOR" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-MONITOR" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-monitor \- Monitor state of SMS daemon for Gammu
.
diff --git a/docs/man/gammu-smsd-mysql.7 b/docs/man/gammu-smsd-mysql.7
index 311404b..fac748e 100644
--- a/docs/man/gammu-smsd-mysql.7
+++ b/docs/man/gammu-smsd-mysql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-MYSQL" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-MYSQL" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-mysql \- gammu-smsd(1) backend using MySQL database server as a message storage
.
@@ -93,7 +93,18 @@ creating triggers, which are used for some functionality.
.UNINDENT
.SH CREATING TABLES FOR MYSQL
.sp
-SQL script for creating tables in MySQL database:
+Depending on MySQL version and settings please choose best fitting
+script to create tables:
+.INDENT 0.0
+.IP \(bu 2
+\fBmysql\-strict.sql\fP can be used in strict mode, but requires MySQL 5.6.5
+or newer
+.IP \(bu 2
+\fBmysql.sql\fP supports all MySQL versions, but requires neither of
+\fINO_ZERO_DATE\fP, \fIANSI\fP or \fISTRICT\fP modes to be set in the server
+.UNINDENT
+.sp
+SQL script \fBmysql.sql\fP for creating tables in MySQL database:
.INDENT 0.0
.INDENT 3.5
.sp
@@ -179,7 +190,7 @@ CREATE TABLE \(gaoutbox\(ga (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut);
-CREATE INDEX outbox_sender ON outbox(SenderID);
+CREATE INDEX outbox_sender ON outbox(SenderID(250));
\-\-
\-\- Dumping data for table \(gaoutbox\(ga
@@ -268,7 +279,7 @@ CREATE TABLE \(gasentitems\(ga (
CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime);
CREATE INDEX sentitems_tpmr ON sentitems(TPMR);
CREATE INDEX sentitems_dest ON sentitems(DestinationNumber);
-CREATE INDEX sentitems_sender ON sentitems(SenderID);
+CREATE INDEX sentitems_sender ON sentitems(SenderID(250));
\-\-
\-\- Dumping data for table \(gasentitems\(ga
@@ -339,6 +350,199 @@ DELIMITER ;
You can find the script in \fBdocs/sql/mysql.sql\fP as well.
.UNINDENT
.UNINDENT
+.sp
+SQL script \fBmysql\-strict.sql\fP for creating tables in MySQL database:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+\-\-
+\-\- Database for Gammu SMSD
+\-\-
+\-\- In case you get errors about not supported charset, please
+\-\- replace utf8mb4 with utf8.
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gagammu\(ga
+\-\-
+
+CREATE TABLE \(gagammu\(ga (
+ \(gaVersion\(ga integer NOT NULL default \(aq0\(aq PRIMARY KEY
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+\-\-
+\-\- Dumping data for table \(gagammu\(ga
+\-\-
+
+INSERT INTO \(gagammu\(ga (\(gaVersion\(ga) VALUES (16);
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gainbox\(ga
+\-\-
+
+CREATE TABLE \(gainbox\(ga (
+ \(gaUpdatedInDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ \(gaReceivingDateTime\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaText\(ga text NOT NULL,
+ \(gaSenderNumber\(ga varchar(20) NOT NULL default \(aq\(aq,
+ \(gaCoding\(ga enum(\(aqDefault_No_Compression\(aq,\(aqUnicode_No_Compression\(aq,\(aq8bit\(aq,\(aqDefault_Compression\(aq,\(aqUnicode_Compression\(aq) NOT NULL default \(aqDefault_No_Compression\(aq,
+ \(gaUDH\(ga text NOT NULL,
+ \(gaSMSCNumber\(ga varchar(20) NOT NULL default \(aq\(aq,
+ \(gaClass\(ga integer NOT NULL default \(aq\-1\(aq,
+ \(gaTextDecoded\(ga text NOT NULL,
+ \(gaID\(ga integer unsigned NOT NULL auto_increment,
+ \(gaRecipientID\(ga text NOT NULL,
+ \(gaProcessed\(ga enum(\(aqfalse\(aq,\(aqtrue\(aq) NOT NULL default \(aqfalse\(aq,
+ PRIMARY KEY \(gaID\(ga (\(gaID\(ga)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
+
+\-\-
+\-\- Dumping data for table \(gainbox\(ga
+\-\-
+
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gaoutbox\(ga
+\-\-
+
+CREATE TABLE \(gaoutbox\(ga (
+ \(gaUpdatedInDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ \(gaInsertIntoDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaSendingDateTime\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaSendBefore\(ga time NOT NULL DEFAULT \(aq23:59:59\(aq,
+ \(gaSendAfter\(ga time NOT NULL DEFAULT \(aq00:00:00\(aq,
+ \(gaText\(ga text,
+ \(gaDestinationNumber\(ga varchar(20) NOT NULL default \(aq\(aq,
+ \(gaCoding\(ga enum(\(aqDefault_No_Compression\(aq,\(aqUnicode_No_Compression\(aq,\(aq8bit\(aq,\(aqDefault_Compression\(aq,\(aqUnicode_Compression\(aq) NOT NULL default \(aqDefault_No_Compression\(aq,
+ \(gaUDH\(ga text,
+ \(gaClass\(ga integer default \(aq\-1\(aq,
+ \(gaTextDecoded\(ga text NOT NULL,
+ \(gaID\(ga integer unsigned NOT NULL auto_increment,
+ \(gaMultiPart\(ga enum(\(aqfalse\(aq,\(aqtrue\(aq) default \(aqfalse\(aq,
+ \(gaRelativeValidity\(ga integer default \(aq\-1\(aq,
+ \(gaSenderID\(ga varchar(255),
+ \(gaSendingTimeOut\(ga timestamp NULL default CURRENT_TIMESTAMP,
+ \(gaDeliveryReport\(ga enum(\(aqdefault\(aq,\(aqyes\(aq,\(aqno\(aq) default \(aqdefault\(aq,
+ \(gaCreatorID\(ga text NOT NULL,
+ \(gaRetries\(ga int(3) default 0,
+ \(gaPriority\(ga integer default 0,
+ PRIMARY KEY \(gaID\(ga (\(gaID\(ga)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut);
+CREATE INDEX outbox_sender ON outbox(SenderID(250));
+
+\-\-
+\-\- Dumping data for table \(gaoutbox\(ga
+\-\-
+
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gaoutbox_multipart\(ga
+\-\-
+
+CREATE TABLE \(gaoutbox_multipart\(ga (
+ \(gaText\(ga text,
+ \(gaCoding\(ga enum(\(aqDefault_No_Compression\(aq,\(aqUnicode_No_Compression\(aq,\(aq8bit\(aq,\(aqDefault_Compression\(aq,\(aqUnicode_Compression\(aq) NOT NULL default \(aqDefault_No_Compression\(aq,
+ \(gaUDH\(ga text,
+ \(gaClass\(ga integer default \(aq\-1\(aq,
+ \(gaTextDecoded\(ga text,
+ \(gaID\(ga integer unsigned NOT NULL default \(aq0\(aq,
+ \(gaSequencePosition\(ga integer NOT NULL default \(aq1\(aq,
+ PRIMARY KEY (\(gaID\(ga, \(gaSequencePosition\(ga)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+\-\-
+\-\- Dumping data for table \(gaoutbox_multipart\(ga
+\-\-
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gaphones\(ga
+\-\-
+
+CREATE TABLE \(gaphones\(ga (
+ \(gaID\(ga text NOT NULL,
+ \(gaUpdatedInDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ \(gaInsertIntoDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaTimeOut\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaSend\(ga enum(\(aqyes\(aq,\(aqno\(aq) NOT NULL default \(aqno\(aq,
+ \(gaReceive\(ga enum(\(aqyes\(aq,\(aqno\(aq) NOT NULL default \(aqno\(aq,
+ \(gaIMEI\(ga varchar(35) NOT NULL,
+ \(gaIMSI\(ga varchar(35) NOT NULL,
+ \(gaNetCode\(ga varchar(10) default \(aqERROR\(aq,
+ \(gaNetName\(ga varchar(35) default \(aqERROR\(aq,
+ \(gaClient\(ga text NOT NULL,
+ \(gaBattery\(ga integer NOT NULL DEFAULT \-1,
+ \(gaSignal\(ga integer NOT NULL DEFAULT \-1,
+ \(gaSent\(ga int NOT NULL DEFAULT 0,
+ \(gaReceived\(ga int NOT NULL DEFAULT 0,
+ PRIMARY KEY (\(gaIMEI\(ga)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+\-\-
+\-\- Dumping data for table \(gaphones\(ga
+\-\-
+
+\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
+
+\-\-
+\-\- Table structure for table \(gasentitems\(ga
+\-\-
+
+CREATE TABLE \(gasentitems\(ga (
+ \(gaUpdatedInDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ \(gaInsertIntoDB\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaSendingDateTime\(ga timestamp NOT NULL default CURRENT_TIMESTAMP,
+ \(gaDeliveryDateTime\(ga timestamp NULL,
+ \(gaText\(ga text NOT NULL,
+ \(gaDestinationNumber\(ga varchar(20) NOT NULL default \(aq\(aq,
+ \(gaCoding\(ga enum(\(aqDefault_No_Compression\(aq,\(aqUnicode_No_Compression\(aq,\(aq8bit\(aq,\(aqDefault_Compression\(aq,\(aqUnicode_Compression\(aq) NOT NULL default \(aqDefault_No_Compression\(aq,
+ \(gaUDH\(ga text NOT NULL,
+ \(gaSMSCNumber\(ga varchar(20) NOT NULL default \(aq\(aq,
+ \(gaClass\(ga integer NOT NULL default \(aq\-1\(aq,
+ \(gaTextDecoded\(ga text NOT NULL,
+ \(gaID\(ga integer unsigned NOT NULL default \(aq0\(aq,
+ \(gaSenderID\(ga varchar(255) NOT NULL,
+ \(gaSequencePosition\(ga integer NOT NULL default \(aq1\(aq,
+ \(gaStatus\(ga enum(\(aqSendingOK\(aq,\(aqSendingOKNoReport\(aq,\(aqSendingError\(aq,\(aqDeliveryOK\(aq,\(aqDeliveryFailed\(aq,\(aqDeliveryPending\(aq,\(aqDeliveryUnknown\(aq,\(aqError\(aq) NOT NULL default \(aqSendingOK\(aq,
+ \(gaStatusError\(ga integer NOT NULL default \(aq\-1\(aq,
+ \(gaTPMR\(ga integer NOT NULL default \(aq\-1\(aq,
+ \(gaRelativeValidity\(ga integer NOT NULL default \(aq\-1\(aq,
+ \(gaCreatorID\(ga text NOT NULL,
+ PRIMARY KEY (\(gaID\(ga, \(gaSequencePosition\(ga)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime);
+CREATE INDEX sentitems_tpmr ON sentitems(TPMR);
+CREATE INDEX sentitems_dest ON sentitems(DestinationNumber);
+CREATE INDEX sentitems_sender ON sentitems(SenderID(250));
+
+\-\-
+\-\- Dumping data for table \(gasentitems\(ga
+\-\-
+
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+\fBNOTE:\fP
+.INDENT 0.0
+.INDENT 3.5
+You can find the script in \fBdocs/sql/mysql\-strict.sql\fP as well.
+.UNINDENT
+.UNINDENT
.SH UPGRADING TABLES
.sp
The easiest way to upgrade database structure is to backup old one and start
diff --git a/docs/man/gammu-smsd-null.7 b/docs/man/gammu-smsd-null.7
index 3a7f08f..39b54e8 100644
--- a/docs/man/gammu-smsd-null.7
+++ b/docs/man/gammu-smsd-null.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-NULL" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-NULL" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-null \- gammu-smsd(1) backend not storing messages
.
diff --git a/docs/man/gammu-smsd-odbc.7 b/docs/man/gammu-smsd-odbc.7
index a74d148..da07b8b 100644
--- a/docs/man/gammu-smsd-odbc.7
+++ b/docs/man/gammu-smsd-odbc.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-ODBC" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-ODBC" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-odbc \- gammu-smsd(1) backend using ODBC abstraction layer to use any supported database as a message storage
.
@@ -72,7 +72,7 @@ Windows or in global configuration on Linux).
.UNINDENT
.sp
On Microsoft Windows, you can find instructions on Microsoft website:
-\fI\%http://support.microsoft.com/kb/305599\fP
+\fI\%https://support.microsoft.com/kb/305599\fP
.sp
For unixODBC this is documented in the user manual:
\fI\%http://www.unixodbc.org/doc/UserManual/\fP
diff --git a/docs/man/gammu-smsd-pgsql.7 b/docs/man/gammu-smsd-pgsql.7
index 2be9867..006cace 100644
--- a/docs/man/gammu-smsd-pgsql.7
+++ b/docs/man/gammu-smsd-pgsql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-PGSQL" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-PGSQL" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-pgsql \- gammu-smsd(1) backend using PostgreSQL database server as a message storage
.
diff --git a/docs/man/gammu-smsd-run.7 b/docs/man/gammu-smsd-run.7
index 86fcc01..9013cad 100644
--- a/docs/man/gammu-smsd-run.7
+++ b/docs/man/gammu-smsd-run.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-RUN" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-RUN" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-run \- documentation for RunOnReceive directive
.
diff --git a/docs/man/gammu-smsd-sql.7 b/docs/man/gammu-smsd-sql.7
index 6d1034c..8aa230b 100644
--- a/docs/man/gammu-smsd-sql.7
+++ b/docs/man/gammu-smsd-sql.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-SQL" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-SQL" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-sql \- gammu-smsd(1) backend using SQL abstraction layer to use any supported database as a message storage
.
diff --git a/docs/man/gammu-smsd-tables.7 b/docs/man/gammu-smsd-tables.7
index 4d4f0c9..bb63cfd 100644
--- a/docs/man/gammu-smsd-tables.7
+++ b/docs/man/gammu-smsd-tables.7
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD-TABLES" "7" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD-TABLES" "7" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd-tables \- description of tables for database backends of gammu-smsd(1)
.
diff --git a/docs/man/gammu-smsd.1 b/docs/man/gammu-smsd.1
index c37a454..f02b1b1 100644
--- a/docs/man/gammu-smsd.1
+++ b/docs/man/gammu-smsd.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSD" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSD" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsd \- SMS daemon for Gammu
.
@@ -289,12 +289,35 @@ gammu\-smsd.exe \-c smsdrc
.sp
You now should be able to get errors from SMSD even if it fails to start as a
service.
+.SS Invoking Gammu and suspending SMSD
+.sp
+As you can not run Gammu and Gammu SMSD at same time on signle device, you can
+workaround this limitation by suspending SMSD temporarily using \fISIGUSR1\fP and
+\fISIGUSR2\fP signals (see also \fI\%Signals\fP):
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+SMSD_PID=\(gapidof gammu\-smsd\(ga
+if [ \-z "$SMSD_PID" ] ; then
+ echo "Failed to figure out SMSD PID!"
+else
+ kill \-SIGUSR1 $SMSD_PID
+ gammu identify
+ kill \-SIGUSR2 $SMSD_PID
+fi
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
.SH KNOWN LIMITATIONS
.sp
You can not use same phone by more programs in same time. However in case you
did not enable locking in \fB[gammu]\fP section, it might be able
to start the communication with phone from more programs. In this case neither
-of the programs will probably work.
+of the programs will probably work, see \fI\%Invoking Gammu and suspending SMSD\fP for
+workaround.
.sp
There is no way to detect that SMS message is reply to another by looking at
message headers. The only way to achieve this is to add some token to the
diff --git a/docs/man/gammu-smsdrc.5 b/docs/man/gammu-smsdrc.5
index b716d1f..9fac3ba 100644
--- a/docs/man/gammu-smsdrc.5
+++ b/docs/man/gammu-smsdrc.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU-SMSDRC" "5" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU-SMSDRC" "5" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu-smsdrc \- gammu-smsd(1) configuration file
.
@@ -44,7 +44,7 @@ you can also use \fI\%[sql]\fP and \fI\%[tables]\fP\&.
.sp
The \fB[gammu]\fP section is configuration of a phone connection
and is same as described in gammurc with the only exception that
-\fI\%LogFile\fP is ignored and common logging for gammu library and
+\fBLogFile\fP is ignored and common logging for gammu library and
SMS daemon is used. However the \fBLogFormat\fP directive still
configures how much messages gammu emits.
.INDENT 0.0
diff --git a/docs/man/gammu.1 b/docs/man/gammu.1
index 1cdc650..9a13dae 100644
--- a/docs/man/gammu.1
+++ b/docs/man/gammu.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMU" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMU" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammu \- Does some neat things with your cellular phone or modem.
.
diff --git a/docs/man/gammurc.5 b/docs/man/gammurc.5
index d359660..05e56ee 100644
--- a/docs/man/gammurc.5
+++ b/docs/man/gammurc.5
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "GAMMURC" "5" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "GAMMURC" "5" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
gammurc \- gammu(1) configuration file
.
@@ -405,7 +405,7 @@ each execution.
.INDENT 0.0
.TP
.B LogFormat
-Determines what all will be logged to \fBLogFile\fP\&. Possible values are:
+Determines what all will be logged to \fI\%LogFile\fP\&. Possible values are:
.INDENT 7.0
.TP
.B \fBnothing\fP
@@ -574,6 +574,9 @@ connection = proxyat
.fi
.UNINDENT
.UNINDENT
+.sp
+You can find sample script which can be used on the remote side in
+\fBcontrib/proxy/gammu\-backend\fP\&.
.SS Fully documented example
.sp
You can find this sample file as \fBdocs/config/gammurc\fP in Gammu sources.
diff --git a/docs/man/jadmaker.1 b/docs/man/jadmaker.1
index d339520..92f2733 100644
--- a/docs/man/jadmaker.1
+++ b/docs/man/jadmaker.1
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "JADMAKER" "1" "Oct 23, 2016" "1.37.91" "Gammu"
+.TH "JADMAKER" "1" "Dec 12, 2016" "1.38.0" "Gammu"
.SH NAME
jadmaker \- JAD File Generator
.
diff --git a/docs/manual/config/index.rst b/docs/manual/config/index.rst
index 02bd0af..5b65dab 100644
--- a/docs/manual/config/index.rst
+++ b/docs/manual/config/index.rst
@@ -406,6 +406,9 @@ bi-directional communication with the phone.
device = ssh root@my.router /usr/local/bin/myscript /dev/ttyUSB0
connection = proxyat
+You can find sample script which can be used on the remote side in
+:file:`contrib/proxy/gammu-backend`.
+
.. _Fully documented example:
Fully documented example
diff --git a/docs/manual/faq/smsd.rst b/docs/manual/faq/smsd.rst
index 851f8d2..a35f441 100644
--- a/docs/manual/faq/smsd.rst
+++ b/docs/manual/faq/smsd.rst
@@ -83,7 +83,7 @@ This can occasionally happen and can have several reasons.
see hint to adjust the configuration in the log.
.. _Kalkun: http://kalkun.sourceforge.net/
-.. _MySQL: http://www.mysql.com/
-.. _PostgreSQL: http://www.postgresql.org/
+.. _MySQL: https://www.mysql.com/
+.. _PostgreSQL: https://www.postgresql.org/
.. _libdbi: http://libdbi.sourceforge.net/
.. _Gammu Phones Database: https://wammu.eu/phones/
diff --git a/docs/manual/project/contributing.rst b/docs/manual/project/contributing.rst
index 364e174..036d04a 100644
--- a/docs/manual/project/contributing.rst
+++ b/docs/manual/project/contributing.rst
@@ -15,7 +15,7 @@ As we use `Git <http://git-scm.com/>`_ for development, the preferred way to
get patches is in form which can be directly applied to Git. So start with
cloning our Git repository::
- git clone git://github.com/gammu/gammu.git gammu
+ git clone https://github.com/gammu/gammu.git gammu
Once you have done that, do some fixes and commit them (see
`Git tutorial <http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html>`_
diff --git a/docs/manual/project/install.rst b/docs/manual/project/install.rst
index 539137e..58dc4d5 100644
--- a/docs/manual/project/install.rst
+++ b/docs/manual/project/install.rst
@@ -20,8 +20,8 @@ Debian
Gammu packages are included in Debian (testing versions go to
experimental and stable to unstable). If you want to build Debian
package on your own, you can find packaging in Git repository at
-``git://git.debian.org/git/collab-maint/gammu.git`` (you can browse it on
-<http://git.debian.org/?p=collab-maint/gammu.git>).
+``https://anonscm.debian.org/git/collab-maint/gammu.git`` (you can browse it on
+<https://anonscm.debian.org/git/collab-maint/gammu.git>).
RPM
+++
@@ -52,7 +52,7 @@ Dependencies
You need CMake from <https://cmake.org/> for compiling Gammu.
-Additionally pkg-config <http://pkg-config.freedesktop.org/> is used for
+Additionally pkg-config <https://www.freedesktop.org/wiki/Software/pkg-config/> is used for
detecting available libraries.
.. _opt-deps:
@@ -82,35 +82,35 @@ libCURL
Required for new versions notification (see :option:`gammu checkversion`).
-.. seealso:: http://curl.haxx.se/libcurl/
+.. seealso:: https://curl.haxx.se/libcurl/
libiconv
++++++++
Used to support more character sets in AT engine.
-.. seealso:: http://www.gnu.org/software/libiconv/
+.. seealso:: https://www.gnu.org/software/libiconv/
Gettext
+++++++
Localization of strings.
-.. seealso:: http://www.gnu.org/software/gettext/
+.. seealso:: https://www.gnu.org/software/gettext/
MySQL
+++++
Required for :ref:`gammu-smsd-mysql` in :ref:`smsd`.
-.. seealso:: http://mysql.com/
+.. seealso:: https://www.mysql.com/
PostgreSQL
++++++++++
Required for :ref:`gammu-smsd-pgsql` in :ref:`smsd`.
-.. seealso:: http://www.postgresql.org/
+.. seealso:: https://www.postgresql.org/
unixODBC
++++++++
@@ -135,21 +135,21 @@ Python
Gammu has a Python bindings, see :ref:`python`.
-.. seealso:: http://www.python.org/
+.. seealso:: https://www.python.org/
SQLite + libdbi-drivers with SQLite
+++++++++++++++++++++++++++++++++++
Needed for testing of SMSD using libdbi driver (libdbd-sqlite3), see :ref:`testing`.
-.. seealso:: http://www.sqlite.org/
+.. seealso:: https://www.sqlite.org/
glib
++++
Currently needed only for :ref:`gammu-detect`.
-.. seealso:: http://www.gtk.org/
+.. seealso:: https://www.gtk.org/
gudev
+++++
@@ -183,6 +183,9 @@ For openSUSE, the installation all optional packages could look like:
mysql-devel python-devel libcurl-devel cmake pkgconfig unixODBC-devel \
glib2-devel libgudev-1_0-devel
+Configure like wrapper
+++++++++++++++++++++++
+
For compatibility reasons, configure like wrapper is provided, if you
don't need much specific tuning, you can use usual set of commands:
@@ -196,6 +199,9 @@ The configure wrapper will create directory build-configure and build all
binaries there (nothing is changed in source tree), for example gammu binary is
in build-configure/gammu directory.
+Using CMake
++++++++++++
+
If you need/want to tweak build a bit more than configure wrapper
provides, you have to use `CMake`_ directly. For now, only out of source
build is supported, so you have to create separate directory for build:
@@ -308,7 +314,7 @@ You will probably need additional SDKs:
* For gettext (internationalization) support, you will need gettext
packages from GnuWin32 project.
* As build is now based on CMake, you will need to get it from
- http://cmake.org/.
+ https://cmake.org/.
After downloading and installing them into your system:
diff --git a/docs/manual/project/roadmap.rst b/docs/manual/project/roadmap.rst
index 5025c5d..f8a5682 100644
--- a/docs/manual/project/roadmap.rst
+++ b/docs/manual/project/roadmap.rst
@@ -17,7 +17,9 @@ Unicode strings
The another major obstacle which is all around Gammu code is own
implementation of unicode (UCS-2-BE) strings. This code should be dropped and
-wchar_t used instead.
+use some standard library for that. Note that wchar_t is probably not a good
+choice here as it's 16-bit on Windows and thus can not store emojis and other
+supplemental plan unicode chars.
Hardcoded length for strings
----------------------------
diff --git a/docs/manual/smsd/mysql.rst b/docs/manual/smsd/mysql.rst
index d57f6c0..19b59bf 100644
--- a/docs/manual/smsd/mysql.rst
+++ b/docs/manual/smsd/mysql.rst
@@ -50,14 +50,22 @@ privileges should be enough:
For creating the SQL tables you need more privileges, especially for
creating triggers, which are used for some functionality.
-.. _MySQL: http://www.mysql.com/
+.. _MySQL: https://www.mysql.com/
.. _mysql-create:
Creating tables for MySQL
-------------------------
-SQL script for creating tables in MySQL database:
+Depending on MySQL version and settings please choose best fitting
+script to create tables:
+
+* :file:`mysql-strict.sql` can be used in strict mode, but requires MySQL 5.6.5
+ or newer
+* :file:`mysql.sql` supports all MySQL versions, but requires neither of
+ `NO_ZERO_DATE`, `ANSI` or `STRICT` modes to be set in the server
+
+SQL script :file:`mysql.sql` for creating tables in MySQL database:
.. literalinclude:: ../../sql/mysql.sql
:language: mysql
@@ -66,6 +74,15 @@ SQL script for creating tables in MySQL database:
You can find the script in :file:`docs/sql/mysql.sql` as well.
+SQL script :file:`mysql-strict.sql` for creating tables in MySQL database:
+
+.. literalinclude:: ../../sql/mysql-strict.sql
+ :language: mysql
+
+.. note::
+
+ You can find the script in :file:`docs/sql/mysql-strict.sql` as well.
+
Upgrading tables
----------------
diff --git a/docs/manual/smsd/odbc.rst b/docs/manual/smsd/odbc.rst
index fd78044..e9efe10 100644
--- a/docs/manual/smsd/odbc.rst
+++ b/docs/manual/smsd/odbc.rst
@@ -22,7 +22,7 @@ Supported drivers
On Microsoft Windows, Gammu uses native ODBC, on other platforms, `unixODBC`_
can be used.
-.. _ODBC: http://en.wikipedia.org/wiki/Open_Database_Connectivity
+.. _ODBC: https://en.wikipedia.org/wiki/Open_Database_Connectivity
.. _unixODBC: http://www.unixodbc.org/
Limitations
@@ -51,7 +51,7 @@ You specify data source name (DSN) as :config:option:`Host` in
Windows or in global configuration on Linux).
On Microsoft Windows, you can find instructions on Microsoft website:
-http://support.microsoft.com/kb/305599
+https://support.microsoft.com/kb/305599
For unixODBC this is documented in the user manual:
http://www.unixodbc.org/doc/UserManual/
diff --git a/docs/manual/smsd/pgsql.rst b/docs/manual/smsd/pgsql.rst
index 021456f..eb55b62 100644
--- a/docs/manual/smsd/pgsql.rst
+++ b/docs/manual/smsd/pgsql.rst
@@ -14,7 +14,7 @@ For tables description see :ref:`gammu-smsd-tables`.
This backend is based on :ref:`gammu-smsd-sql`.
-.. _PostgreSQL: http://www.postgresql.org/
+.. _PostgreSQL: https://www.postgresql.org/
Configuration
-------------
diff --git a/docs/manual/smsd/sql.rst b/docs/manual/smsd/sql.rst
index 190abcf..fd894e0 100644
--- a/docs/manual/smsd/sql.rst
+++ b/docs/manual/smsd/sql.rst
@@ -37,7 +37,7 @@ Specific for DBI:
.. seealso:: The variables are fully described in :ref:`gammurc` documentation.
-.. _Custom tables:
+.. _Configurable tables:
Tables
------
diff --git a/docs/sql/mysql-strict.sql b/docs/sql/mysql-strict.sql
new file mode 100644
index 0000000..b8770ee
--- /dev/null
+++ b/docs/sql/mysql-strict.sql
@@ -0,0 +1,174 @@
+--
+-- Database for Gammu SMSD
+--
+-- In case you get errors about not supported charset, please
+-- replace utf8mb4 with utf8.
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `gammu`
+--
+
+CREATE TABLE `gammu` (
+ `Version` integer NOT NULL default '0' PRIMARY KEY
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+--
+-- Dumping data for table `gammu`
+--
+
+INSERT INTO `gammu` (`Version`) VALUES (16);
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `inbox`
+--
+
+CREATE TABLE `inbox` (
+ `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `ReceivingDateTime` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `Text` text NOT NULL,
+ `SenderNumber` varchar(20) NOT NULL default '',
+ `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression',
+ `UDH` text NOT NULL,
+ `SMSCNumber` varchar(20) NOT NULL default '',
+ `Class` integer NOT NULL default '-1',
+ `TextDecoded` text NOT NULL,
+ `ID` integer unsigned NOT NULL auto_increment,
+ `RecipientID` text NOT NULL,
+ `Processed` enum('false','true') NOT NULL default 'false',
+ PRIMARY KEY `ID` (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ;
+
+--
+-- Dumping data for table `inbox`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `outbox`
+--
+
+CREATE TABLE `outbox` (
+ `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `InsertIntoDB` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `SendingDateTime` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `SendBefore` time NOT NULL DEFAULT '23:59:59',
+ `SendAfter` time NOT NULL DEFAULT '00:00:00',
+ `Text` text,
+ `DestinationNumber` varchar(20) NOT NULL default '',
+ `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression',
+ `UDH` text,
+ `Class` integer default '-1',
+ `TextDecoded` text NOT NULL,
+ `ID` integer unsigned NOT NULL auto_increment,
+ `MultiPart` enum('false','true') default 'false',
+ `RelativeValidity` integer default '-1',
+ `SenderID` varchar(255),
+ `SendingTimeOut` timestamp NULL default CURRENT_TIMESTAMP,
+ `DeliveryReport` enum('default','yes','no') default 'default',
+ `CreatorID` text NOT NULL,
+ `Retries` int(3) default 0,
+ `Priority` integer default 0,
+ PRIMARY KEY `ID` (`ID`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut);
+CREATE INDEX outbox_sender ON outbox(SenderID(250));
+
+--
+-- Dumping data for table `outbox`
+--
+
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `outbox_multipart`
+--
+
+CREATE TABLE `outbox_multipart` (
+ `Text` text,
+ `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression',
+ `UDH` text,
+ `Class` integer default '-1',
+ `TextDecoded` text,
+ `ID` integer unsigned NOT NULL default '0',
+ `SequencePosition` integer NOT NULL default '1',
+ PRIMARY KEY (`ID`, `SequencePosition`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+--
+-- Dumping data for table `outbox_multipart`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `phones`
+--
+
+CREATE TABLE `phones` (
+ `ID` text NOT NULL,
+ `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `InsertIntoDB` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `TimeOut` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `Send` enum('yes','no') NOT NULL default 'no',
+ `Receive` enum('yes','no') NOT NULL default 'no',
+ `IMEI` varchar(35) NOT NULL,
+ `IMSI` varchar(35) NOT NULL,
+ `NetCode` varchar(10) default 'ERROR',
+ `NetName` varchar(35) default 'ERROR',
+ `Client` text NOT NULL,
+ `Battery` integer NOT NULL DEFAULT -1,
+ `Signal` integer NOT NULL DEFAULT -1,
+ `Sent` int NOT NULL DEFAULT 0,
+ `Received` int NOT NULL DEFAULT 0,
+ PRIMARY KEY (`IMEI`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+--
+-- Dumping data for table `phones`
+--
+
+-- --------------------------------------------------------
+
+--
+-- Table structure for table `sentitems`
+--
+
+CREATE TABLE `sentitems` (
+ `UpdatedInDB` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ `InsertIntoDB` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `SendingDateTime` timestamp NOT NULL default CURRENT_TIMESTAMP,
+ `DeliveryDateTime` timestamp NULL,
+ `Text` text NOT NULL,
+ `DestinationNumber` varchar(20) NOT NULL default '',
+ `Coding` enum('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression') NOT NULL default 'Default_No_Compression',
+ `UDH` text NOT NULL,
+ `SMSCNumber` varchar(20) NOT NULL default '',
+ `Class` integer NOT NULL default '-1',
+ `TextDecoded` text NOT NULL,
+ `ID` integer unsigned NOT NULL default '0',
+ `SenderID` varchar(255) NOT NULL,
+ `SequencePosition` integer NOT NULL default '1',
+ `Status` enum('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending','DeliveryUnknown','Error') NOT NULL default 'SendingOK',
+ `StatusError` integer NOT NULL default '-1',
+ `TPMR` integer NOT NULL default '-1',
+ `RelativeValidity` integer NOT NULL default '-1',
+ `CreatorID` text NOT NULL,
+ PRIMARY KEY (`ID`, `SequencePosition`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+
+CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime);
+CREATE INDEX sentitems_tpmr ON sentitems(TPMR);
+CREATE INDEX sentitems_dest ON sentitems(DestinationNumber);
+CREATE INDEX sentitems_sender ON sentitems(SenderID(250));
+
+--
+-- Dumping data for table `sentitems`
+--
diff --git a/docs/sql/mysql.sql b/docs/sql/mysql.sql
index 1abecc0..a342f6a 100644
--- a/docs/sql/mysql.sql
+++ b/docs/sql/mysql.sql
@@ -78,7 +78,7 @@ CREATE TABLE `outbox` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut);
-CREATE INDEX outbox_sender ON outbox(SenderID);
+CREATE INDEX outbox_sender ON outbox(SenderID(250));
--
-- Dumping data for table `outbox`
@@ -167,7 +167,7 @@ CREATE TABLE `sentitems` (
CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime);
CREATE INDEX sentitems_tpmr ON sentitems(TPMR);
CREATE INDEX sentitems_dest ON sentitems(DestinationNumber);
-CREATE INDEX sentitems_sender ON sentitems(SenderID);
+CREATE INDEX sentitems_sender ON sentitems(SenderID(250));
--
-- Dumping data for table `sentitems`
diff --git a/gammu.spec b/gammu.spec
index 1275dcf..983562c 100644
--- a/gammu.spec
+++ b/gammu.spec
@@ -9,7 +9,7 @@
%define extension bz2
Name: gammu
-Version: 1.37.91
+Version: 1.38.0
Release: 0
Summary: Mobile phone management utility
License: GPL-2.0
diff --git a/include/gammu-unicode.h b/include/gammu-unicode.h
index 1bb9404..cfd7913 100644
--- a/include/gammu-unicode.h
+++ b/include/gammu-unicode.h
@@ -19,10 +19,9 @@ extern "C" {
* \ref GSM_InitLocales.
*/
-#include <wchar.h>
-
-#include <gammu-types.h>
#include <gammu-config.h>
+#include <stdlib.h>
+#include <gammu-types.h>
/**
* Returns length of unicode string.
@@ -97,12 +96,6 @@ void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src,
* \ingroup Unicode
*/
int EncodeWithUTF8Alphabet(unsigned long src, unsigned char *ret);
-/**
- * Decodes string from UTF-8.
- *
- * \ingroup Unicode
- */
-int DecodeWithUTF8Alphabet(const unsigned char *src, wchar_t * dest, size_t len);
/**
* Decodes string from hex quoted unicode.
@@ -160,16 +153,6 @@ void DecodeUTF8(unsigned char *dest, const char *src, size_t len);
* \ingroup Unicode
*/
gboolean DecodeHexBin(unsigned char *dest, const unsigned char *src, size_t len);
-
-/**
- * Converts single character from unicode to wchar_t.
- */
-int EncodeWithUnicodeAlphabet(const unsigned char *value, wchar_t *dest);
-
-/**
- * Converts single character from wchar_t to unicode.
- */
-int DecodeWithUnicodeAlphabet(wchar_t value, unsigned char *dest);
#ifdef __cplusplus
}
#endif
diff --git a/libgammu/gsmphones.c b/libgammu/gsmphones.c
index 2f6a457..cf7bea0 100644
--- a/libgammu/gsmphones.c
+++ b/libgammu/gsmphones.c
@@ -402,6 +402,7 @@ GSM_PhoneModel allmodels[] = {
{"8910" ,"NHM-4" ,"Nokia 8910", {F_CAL62,F_NOMIDI,F_NOFILESYSTEM,F_NOMMS,0}},
{"8910i","NHM-4" ,"Nokia 8910i",{F_CAL62,F_NOMIDI,F_NOFILESYSTEM,F_NOMMS,0}},
{"C2-01","RM-721","Nokia C2-01", {F_SERIES40_30,F_FILES2,F_TODO66,F_RADIO,F_NOTES,F_SMS_FILES,F_6230iCALLER,0}},/* fixme */
+ {"200", "RM-761","Nokia Asha 200", {F_SERIES40_30,F_FILES2,F_TODO66,F_RADIO,F_NOTES,F_SMS_FILES,F_6230iCALLER,0}},/* fixme */
{"306","RM-767","Nokia Asha 306", {F_SERIES40_30,F_FILES2,F_TODO66,F_RADIO,F_NOTES,F_SMS_FILES,F_6230iCALLER,0}},/* fixme */
{"112","RM-837","Nokia 112", {F_SERIES40_30,F_FILES2,F_TODO66,F_RADIO,F_NOTES,F_SMS_FILES,F_6230iCALLER,0}},/* fixme */
{"C3" ,"RM-614","Nokia C3", {F_SERIES40_30,F_FILES2,F_TODO66,F_RADIO,F_NOTES,F_SMS_FILES,F_6230iCALLER,0}},/* fixme */
diff --git a/libgammu/misc/coding/coding.c b/libgammu/misc/coding/coding.c
index 28f9f2e..d78effd 100644
--- a/libgammu/misc/coding/coding.c
+++ b/libgammu/misc/coding/coding.c
@@ -195,19 +195,23 @@ size_t UnicodeLength(const unsigned char *str)
}
/* Convert Unicode char saved in src to dest */
-int EncodeWithUnicodeAlphabet(const unsigned char *src, wchar_t *dest)
+int EncodeWithUnicodeAlphabet(const unsigned char *src, gammu_char_t *dest)
{
int retval;
+ wchar_t out = 0;
- switch (retval = mbtowc(dest, src, MB_CUR_MAX)) {
- case -1 :
+ retval = mbtowc(&out, src, MB_CUR_MAX);
+ *dest = out;
+
+ switch (retval) {
+ case -1 :
case 0 : return 1;
- default : return retval;
- }
+ default : return retval;
+ }
}
/* Convert Unicode char saved in src to dest */
-int DecodeWithUnicodeAlphabet(wchar_t src, unsigned char *dest)
+int DecodeWithUnicodeAlphabet(gammu_char_t src, unsigned char *dest)
{
int retval;
@@ -223,7 +227,7 @@ int DecodeWithUnicodeAlphabet(wchar_t src, unsigned char *dest)
void DecodeUnicode (const unsigned char *src, char *dest)
{
int i=0,o=0;
- wchar_t value, second;
+ gammu_char_t value, second;
while (src[(2*i)+1]!=0x00 || src[2*i]!=0x00) {
value = src[i * 2] * 256 + src[i * 2 + 1];
@@ -297,16 +301,45 @@ void DecodeISO88591 (unsigned char *dest, const char *src, size_t len)
dest[(2 * i) + 1] = 0;
}
+/**
+ * Stores UTF16 char in output
+ *
+ * Returns 1 if additional output was used
+ */
+size_t StoreUTF16 (unsigned char *dest, gammu_char_t wc)
+{
+ gammu_char_t tmp;
+
+ if (wc > 0xffff) {
+ wc = wc - 0x10000;
+ tmp = 0xD800 | (wc >> 10);
+ dest[0] = (tmp >> 8) & 0xff;
+ dest[1] = tmp & 0xff;
+
+ tmp = 0xDC00 | (wc & 0x3ff);
+
+ dest[2] = (tmp >> 8) & 0xff;
+ dest[3] = tmp & 0xff;
+
+ return 1;
+ }
+
+ dest[0] = (wc >> 8) & 0xff;
+ dest[1] = wc & 0xff;
+ return 0;
+}
+
/* Encode string to Unicode. Len is number of input chars */
void EncodeUnicode (unsigned char *dest, const char *src, size_t len)
{
size_t i_len = 0, o_len;
- wchar_t wc;
+ gammu_char_t wc;
for (o_len = 0; i_len < len; o_len++) {
i_len += EncodeWithUnicodeAlphabet(&src[i_len], &wc);
- dest[o_len*2] = (wc >> 8) & 0xff;
- dest[(o_len*2)+1] = wc & 0xff;
+ if (StoreUTF16(dest + o_len * 2, wc)) {
+ o_len++;
+ }
}
dest[o_len*2] = 0;
dest[(o_len*2)+1] = 0;
@@ -1125,7 +1158,7 @@ out:
int GSM_PackSemiOctetNumber(const unsigned char *Number, unsigned char *Output, gboolean semioctet)
{
unsigned char format;
- int length, i, skip = 0;
+ size_t length, i, skip = 0;
unsigned char *buffer;
length = UnicodeLength(Number);
@@ -1349,7 +1382,7 @@ void GetBufferI(unsigned char *Source,
{
size_t l=0,z,i=0;
- z = 1<<(BitsToProcess-1);
+ z = 1 << (BitsToProcess - 1);
while (i!=BitsToProcess) {
if (GetBit(Source, (*CurrentBit)+i)) l=l+z;
@@ -1437,7 +1470,7 @@ void DecodeUnicodeSpecialNOKIAChars(unsigned char *dest, const unsigned char *sr
gboolean mywstrncasecmp(unsigned const char *a, unsigned const char *b, int num)
{
int i;
- wchar_t wc,wc2;
+ gammu_char_t wc,wc2;
if (a == NULL || b == NULL) return FALSE;
@@ -1473,7 +1506,7 @@ gboolean myiswspace(unsigned const char *src)
int o;
unsigned char dest[10];
#endif
- wchar_t wc;
+ gammu_char_t wc;
wc = src[1] | (src[0] << 8);
@@ -1507,9 +1540,9 @@ gboolean myiswspace(unsigned const char *src)
unsigned char *mywstrstr (const unsigned char *haystack, const unsigned char *needle)
{
-/* One crazy define to convert unicode used in Gammu to standard wchar_t */
-#define tolowerwchar(x) (towlower((wchar_t)( (((&(x))[0] & 0xff) << 8) | (((&(x))[1] & 0xff)) )))
- register wint_t a, b, c;
+/* One crazy define to convert unicode used in Gammu to standard gammu_char_t */
+#define tolowerwchar(x) (towlower((gammu_char_t)( (((&(x))[0] & 0xff) << 8) | (((&(x))[1] & 0xff)) )))
+ register gammu_int_t a, b, c;
register const unsigned char *rhaystack, *rneedle;
@@ -1863,24 +1896,65 @@ gboolean EncodeUTF8(char *dest, const unsigned char *src)
}
/* Decode UTF8 char to Unicode char */
-int DecodeWithUTF8Alphabet(const unsigned char *src, wchar_t *dest, size_t len)
+int DecodeWithUTF8Alphabet(const unsigned char *src, gammu_char_t *dest, size_t len)
{
- if (len < 1) return 0;
- if (src[0] < 128) {
- (*dest) = src[0];
+ gammu_char_t src0, src1, src2, src3;
+ if (len < 1) {
+ return 0;
+ }
+ src0 = src[0];
+
+ // 1-byte sequence (no continuation bytes)
+ if ((src0 & 0x80) == 0) {
+ (*dest) = src0;
return 1;
}
- if (src[0] < 194) return 0;
- if (src[0] < 224) {
- if (len < 2) return 0;
- (*dest) = (src[0]-192)*64 + (src[1]-128);
- return 2;
+
+ if (len < 2) {
+ return 0;
}
- if (src[0] < 240) {
- if (len < 3) return 0;
- (*dest) = (src[0]-224)*4096 + (src[1]-128)*64 + (src[2]-128);
- return 3;
+ src1 = src[1];
+
+ // 2-byte sequence
+ if ((src0 & 0xE0) == 0xC0) {
+ (*dest) = ((src0 & 0x1F) << 6) | (src1 & 0x3f);
+ if (*dest >= 0x80) {
+ return 2;
+ } else {
+ return 0;
+ }
}
+
+ if (len < 3) {
+ return 0;
+ }
+ src2 = src[2];
+
+ // 3-byte sequence (may include unpaired surrogates)
+ if ((src0 & 0xF0) == 0xE0) {
+ (*dest) = ((src0 & 0x0F) << 12) | ((src1 & 0x3f) << 6) | (src2 & 0x3f);
+ if ((*dest) >= 0x0800) {
+ if ((*dest) >= 0xD800 && (*dest) <= 0xDFFF) {
+ return 0;
+ }
+ return 3;
+ }
+ }
+
+ if (len < 4) {
+ return 0;
+ }
+ src3 = src[3];
+
+ // 4-byte sequence
+ if ((src0 & 0xF8) == 0xF0) {
+ (*dest) = ((src0 & 0x07) << 0x12) | ((src1 & 0x3f) << 0x0C) |
+ ((src2 & 0x3f) << 0x06) | (src3 & 0x3f);
+ if ((*dest) >= 0x010000 && (*dest) <= 0x10FFFF) {
+ return 4;
+ }
+ }
+
return 0;
}
@@ -1913,7 +1987,7 @@ void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src, size_t len)
size_t i,j=0;
int z;
unsigned char mychar[10];
- wchar_t ret;
+ gammu_char_t ret;
for (i = 0; i<=len; ) {
z=0;
@@ -1933,12 +2007,15 @@ void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src, size_t len)
if (z>0) {
i += z * 3;
/* we ignore wrong sequence */
- if (DecodeWithUTF8Alphabet(mychar,&ret,z)==0) continue;
+ if (DecodeWithUTF8Alphabet(mychar, &ret, z)==0) continue;
} else {
- i+=EncodeWithUnicodeAlphabet(&src[i], &ret);
+ i += EncodeWithUnicodeAlphabet(&src[i], &ret);
+ }
+ if (StoreUTF16(dest + j, ret)) {
+ j += 4;
+ } else {
+ j += 2;
}
- dest[j++] = (ret >> 8) & 0xff;
- dest[j++] = ret & 0xff;
}
dest[j++] = 0;
dest[j] = 0;
@@ -1947,17 +2024,19 @@ void DecodeUTF8QuotedPrintable(unsigned char *dest, const char *src, size_t len)
void DecodeUTF8(unsigned char *dest, const char *src, size_t len)
{
size_t i=0,j=0,z;
- wchar_t ret;
+ gammu_char_t ret;
while (i < len) {
- z = DecodeWithUTF8Alphabet(src+i,&ret,len-i);
- if (z<2) {
- i+=EncodeWithUnicodeAlphabet(&src[i], &ret);
+ z = DecodeWithUTF8Alphabet(src+i, &ret, len - i);
+ if (z < 1) {
+ break;
+ }
+ i += z;
+ if (StoreUTF16(dest + j, ret)) {
+ j += 4;
} else {
- i+=z;
+ j += 2;
}
- dest[j++] = (ret >> 8) & 0xff;
- dest[j++] = ret & 0xff;
}
dest[j++] = 0;
dest[j] = 0;
@@ -2051,7 +2130,7 @@ void DecodeXMLUTF8(unsigned char *dest, const char *src, size_t len)
void DecodeUTF7(unsigned char *dest, const unsigned char *src, size_t len)
{
size_t i=0,j=0,z,p;
- wchar_t ret;
+ gammu_char_t ret;
while (i<=len) {
if (len-5>=i) {
@@ -2064,13 +2143,19 @@ void DecodeUTF7(unsigned char *dest, const unsigned char *src, size_t len)
i+=z+2;
} else {
i+=EncodeWithUnicodeAlphabet(&src[i], &ret);
- dest[j++] = (ret >> 8) & 0xff;
- dest[j++] = ret & 0xff;
+ if (StoreUTF16(dest + j, ret)) {
+ j += 4;
+ } else {
+ j += 2;
+ }
}
} else {
i+=EncodeWithUnicodeAlphabet(&src[i], &ret);
- dest[j++] = (ret >> 8) & 0xff;
- dest[j++] = ret & 0xff;
+ if (StoreUTF16(dest + j, ret)) {
+ j += 4;
+ } else {
+ j += 2;
+ }
}
}
dest[j++] = 0;
diff --git a/libgammu/misc/coding/coding.h b/libgammu/misc/coding/coding.h
index 0800a1c..7b57a12 100644
--- a/libgammu/misc/coding/coding.h
+++ b/libgammu/misc/coding/coding.h
@@ -7,6 +7,8 @@
extern "C" {
#endif
+#include <gammu-config.h>
+
#include <stdlib.h>
#ifdef HAVE_WCHAR_H
# include <wchar.h>
@@ -19,12 +21,12 @@
#include <gammu-error.h>
#include <gammu-debug.h>
-#ifndef HAVE_WCHAR_T
-typedef int wchar_t;
-#endif
-
-#ifndef HAVE_WINT_T
-typedef int wint_t;
+#ifdef USE_WCHAR_T
+typedef wchar_t gammu_char_t;
+typedef wint_t gammu_int_t;
+#else
+typedef unsigned long gammu_char_t;
+typedef unsigned long gammu_int_t;
#endif
/* ---------------------------- Unicode ------------------------------------ */
@@ -151,6 +153,23 @@ GSM_Error MyGetLine(char *Buffer, size_t *Pos, char *OutBuffer, size_t MaxLen, s
char *EncodeSpecialChars(char *dest, const char *buffer);
char *DecodeSpecialChars(char *dest, const char *buffer);
+/**
+ * Decodes string from UTF-8.
+ *
+ * \ingroup Unicode
+ */
+int DecodeWithUTF8Alphabet(const unsigned char *src, gammu_char_t * dest, size_t len);
+
+/**
+ * Converts single character from unicode to gammu_char_t.
+ */
+int EncodeWithUnicodeAlphabet(const unsigned char *value, gammu_char_t *dest);
+
+/**
+ * Converts single character from gammu_char_t to unicode.
+ */
+int DecodeWithUnicodeAlphabet(gammu_char_t value, unsigned char *dest);
+
#ifdef ICONV_FOUND
gboolean IconvDecode(const char *charset, const char *input, const size_t inlen, unsigned char *output, size_t outlen);
diff --git a/libgammu/phone/at/atgen.c b/libgammu/phone/at/atgen.c
index e13684e..becd18e 100644
--- a/libgammu/phone/at/atgen.c
+++ b/libgammu/phone/at/atgen.c
@@ -2905,6 +2905,19 @@ GSM_Error ATGEN_ReplyGetPacketNetworkLAC_CID(GSM_Protocol_Message *msg, GSM_Stat
&rac, sizeof(rac) /* Routing Area Code, ignored for now */
);
+ /* Reply without RAC */
+ if (error == ERR_UNKNOWNRESPONSE) {
+ error = ATGEN_ParseReply(s,
+ GetLineString(msg->Buffer, &Priv->Lines, 2),
+ "+CGREG: @i, @i, @r, @r, @i",
+ &i, /* Mode, ignored for now */
+ &state,
+ NetworkInfo->PacketLAC, sizeof(NetworkInfo->PacketLAC),
+ NetworkInfo->PacketCID, sizeof(NetworkInfo->PacketCID),
+ &act /* Access Technology, ignored for now */
+ );
+ }
+
/* Reply without ACT/RAC */
if (error == ERR_UNKNOWNRESPONSE) {
error = ATGEN_ParseReply(s,
@@ -6153,6 +6166,7 @@ GSM_Reply_Function ATGENReplyFunctions[] = {
{ATGEN_GenericReply, "AT+CLIP" ,0x00,0x00,ID_SetIncomingCall },
{ATGEN_GenericReply, "AT+CCWA" ,0x00,0x00,ID_SetIncomingCall },
{ATGEN_GenericReply, "AT+CUSD" ,0x00,0x00,ID_SetUSSD },
+{ATGEN_GenericReply, "AT+CUSD" ,0x00,0x00,ID_GetUSSD },
{ATGEN_ReplyGetUSSD, "+CUSD" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_GenericReply, "AT+CLIP=1" ,0x00,0x00,ID_IncomingFrame },
{ATGEN_ReplyIncomingCallInfo, "+CLIP" ,0x00,0x00,ID_IncomingFrame },
diff --git a/libgammu/phone/nokia/dct3/n6110.c b/libgammu/phone/nokia/dct3/n6110.c
index ee7924d..f98b9e3 100644
--- a/libgammu/phone/nokia/dct3/n6110.c
+++ b/libgammu/phone/nokia/dct3/n6110.c
@@ -110,7 +110,7 @@ static struct N6110_Lang_Char N6110_Lang_Table[] = {
static void N6110_EncodeUnicode(GSM_StateMachine *s, unsigned char *dest, const unsigned char *src, int len)
{
int i_len = 0, o_len, i;
- wchar_t wc;
+ gammu_char_t wc;
GSM_Phone_N6110Data *Priv = &s->Phone.Data.Priv.N6110;
gboolean found;
@@ -2222,7 +2222,7 @@ static GSM_Error N6110_AddCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry *N
req[22]+=j-1; /* few additional chars */
current+=j;
} else {
- current+=DecodeWithUnicodeAlphabet(((wchar_t)(Note->Entries[Text].Text[i*2]*256+Note->Entries[Text].Text[i*2+1])),req+current);
+ current+=DecodeWithUnicodeAlphabet(((gammu_char_t)(Note->Entries[Text].Text[i*2]*256+Note->Entries[Text].Text[i*2+1])),req+current);
}
}
}
@@ -2283,7 +2283,7 @@ static GSM_Error N6110_DeleteCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry
/* for example: "Euro_char" text */
static void Decode3310Subset3(int j, GSM_Protocol_Message *msg, GSM_Phone_Data *Data)
{
- wchar_t wc;
+ gammu_char_t wc;
int len = 0,i,w;
GSM_CalendarEntry *Entry = Data->Cal;
diff --git a/locale/af/docs.po b/locale/af/docs.po
index 7137940..9120113 100644
--- a/locale/af/docs.po
+++ b/locale/af/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/ar/docs.po b/locale/ar/docs.po
index 8859d22..dae9dbc 100644
--- a/locale/ar/docs.po
+++ b/locale/ar/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2010-09-03 14:46+0300\n"
diff --git a/locale/bg/docs.po b/locale/bg/docs.po
index ecba30d..3cecf9a 100644
--- a/locale/bg/docs.po
+++ b/locale/bg/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/bn/docs.po b/locale/bn/docs.po
index 585bf4b..ad5468f 100644
--- a/locale/bn/docs.po
+++ b/locale/bn/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2012-06-29 16:16+0300\n"
diff --git a/locale/ca/docs.po b/locale/ca/docs.po
index cbdf4b9..6c45a3d 100644
--- a/locale/ca/docs.po
+++ b/locale/ca/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/cs/docs.po b/locale/cs/docs.po
index 7e08b6c..7ccfe99 100644
--- a/locale/cs/docs.po
+++ b/locale/cs/docs.po
@@ -9,7 +9,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-02-23 16:59+0100\n"
@@ -132,7 +132,7 @@ msgstr ":alt: Bitdeli badge :target: https://bitdeli.com/free"
#. type: Plain text
#: README.rst:32
msgid "https://img.shields.io/gratipay/Gammu.svg"
-msgstr ""
+msgstr "https://img.shields.io/gratipay/Gammu.svg"
#. type: Plain text
#: README.rst:34
@@ -146,6 +146,7 @@ msgstr ":target: https://travis-ci.org/gammu/gammu"
msgid ""
"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
msgstr ""
+"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
#. type: Plain text
#: README.rst:38
@@ -153,6 +154,8 @@ msgid ""
":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
msgstr ""
+":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
+"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
#. type: Title =
#: README.rst:40
diff --git a/locale/cs/gammu.po b/locale/cs/gammu.po
index 46a7f0d..1e6211a 100644
--- a/locale/cs/gammu.po
+++ b/locale/cs/gammu.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2016-10-11 06:27+0000\n"
diff --git a/locale/cs/libgammu.po b/locale/cs/libgammu.po
index 9a0c8c1..8ce6677 100644
--- a/locale/cs/libgammu.po
+++ b/locale/cs/libgammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2016-10-11 06:28+0000\n"
diff --git a/locale/da/docs.po b/locale/da/docs.po
index 5d63271..42d8184 100644
--- a/locale/da/docs.po
+++ b/locale/da/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-08-30 15:35+0200\n"
diff --git a/locale/de/docs.po b/locale/de/docs.po
index 61c3704..d17bb8f 100644
--- a/locale/de/docs.po
+++ b/locale/de/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-03-12 16:33+0200\n"
diff --git a/locale/de/gammu.po b/locale/de/gammu.po
index 86bf63e..5a0de17 100644
--- a/locale/de/gammu.po
+++ b/locale/de/gammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2016-10-11 15:14+0000\n"
diff --git a/locale/de/libgammu.po b/locale/de/libgammu.po
index 5834aca..f2a99ae 100644
--- a/locale/de/libgammu.po
+++ b/locale/de/libgammu.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2016-07-10 18:02+0000\n"
diff --git a/locale/docs.pot b/locale/docs.pot
index 66e2130..c023b3d 100644
--- a/locale/docs.pot
+++ b/locale/docs.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
-"POT-Creation-Date: 2016-10-11 13:13+0200\n"
+"POT-Creation-Date: 2016-11-16 13:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/locale/el/docs.po b/locale/el/docs.po
index 7cdf447..988367f 100644
--- a/locale/el/docs.po
+++ b/locale/el/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/en_GB/docs.po b/locale/en_GB/docs.po
index cfd8beb..46b2011 100644
--- a/locale/en_GB/docs.po
+++ b/locale/en_GB/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-04-05 16:14+0200\n"
diff --git a/locale/en_GB/gammu.po b/locale/en_GB/gammu.po
index 9ecbea9..fb6f54f 100644
--- a/locale/en_GB/gammu.po
+++ b/locale/en_GB/gammu.po
@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: gammu 1.27.96\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
-"PO-Revision-Date: 2013-09-16 08:36+0200\n"
-"Last-Translator: Robert Readman <robert_readman@hotmail.com>\n"
-"Language-Team: English (United Kingdom) <http://hosted.weblate.org/projects/"
-"gammu/gammu/en_GB/>\n"
+"PO-Revision-Date: 2016-10-28 03:29+0000\n"
+"Last-Translator: Arrizal Amin <arrizalamin@gmail.com>\n"
+"Language-Team: English (United Kingdom) "
+"<https://hosted.weblate.org/projects/gammu/gammu/en_GB/>\n"
"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 1.7-dev\n"
+"X-Generator: Weblate 2.9-dev\n"
#: gammu/backup.c:49 gammu/backup.c:72 gammu/backup.c:95 gammu/backup.c:116
#: helper/message-cmdline.c:373 helper/message-cmdline.c:397
@@ -452,7 +452,7 @@ msgstr "Unknown parameter (\"%s\")\n"
#: gammu/backup.c:1667 gammu/backup.c:1695
#, c-format
msgid "Memory has only %i free locations.Exiting\n"
-msgstr "Memory has only %i free locations.Exiting\n"
+msgstr "Memory has only %i free locations. Exiting\n"
#: gammu/backup.c:1668
msgid "Add phone phonebook entries?"
@@ -549,7 +549,7 @@ msgstr "Travel"
#: gammu/calendar.c:40
msgid "Vacation"
-msgstr "Vacation"
+msgstr "Holiday"
#: gammu/calendar.c:43 gammu/calendar.c:759
msgid "Alarm"
@@ -1137,16 +1137,12 @@ msgid "Setting done"
msgstr "Setting done"
#: gammu/depend/nokia/dct4.c:303
-#, fuzzy
-#| msgid ""
-#| "Sorry, but configuration matrix for this model has not yet been added. "
-#| "See <http://wammu.eu/support/bugs/> for information how to report it."
msgid ""
"Sorry, but configuration matrix for this model has not yet been added. See "
"<https://wammu.eu/support/bugs/> for information how to report it."
msgstr ""
"Sorry, but configuration matrix for this model has not yet been added. See "
-"<http://wammu.eu/support/bugs/> for information how to report it."
+"<https://wammu.eu/support/bugs/> for information how to report it."
#: gammu/depend/nokia/dct4.c:369
msgid "Passed"
@@ -1539,24 +1535,16 @@ msgid "Windows serial port probing"
msgstr "Windows serial port probing"
#: gammu-detect/main.c:85
-#, fuzzy
-#| msgid ""
-#| "Copyright (C) 2010 - 2011 Michal Cihar <michal@cihar.com> and other "
-#| "authors."
msgid ""
"Copyright (C) 2010 - 2016 Michal Cihar <michal@cihar.com> and other authors."
msgstr ""
-"Copyright (C) 2010 - 2011 Michal Cihar <michal@cihar.com> and other authors."
+"Copyright (C) 2010 - 2016 Michal Cihar <michal@cihar.com> and other authors."
#: gammu-detect/main.c:87 gammu/gammu.c:336
-#, fuzzy
-#| msgid ""
-#| "License GPLv2: GNU GPL version 2 <http://creativecommons.org/licenses/"
-#| "GPL/2.0/>."
msgid "License GPLv2: GNU GPL version 2 <https://spdx.org/licenses/GPL-2.0>."
msgstr ""
-"License GPLv2: GNU GPL version 2 <http://creativecommons.org/licenses/"
-"GPL/2.0/>."
+"Licence GPLv2: GNU GPL version 2 "
+"<http://creativecommons.org/licenses/GPL/2.0/>."
#: gammu-detect/main.c:88 gammu/gammu.c:338
msgid "This is free software: you are free to change and redistribute it."
@@ -1722,7 +1710,7 @@ msgid ""
"Gammu. File is damaged or there is a error in Gammu."
msgstr ""
"File checksum calculated by phone doesn't match with value calculated by "
-"Gammu. File is damaged or there is a error in Gammu."
+"Gammu. File is damaged or there is an error in Gammu."
#: gammu/files.c:422
#, c-format
@@ -1785,9 +1773,9 @@ msgid "Name"
msgstr "Name"
#: gammu/gammu.c:91
-#, fuzzy, c-format
+#, c-format
msgid "[Gammu version %s]"
-msgstr "Gammu version"
+msgstr "[Gammu version %s]"
#: gammu/gammu.c:101
msgid "Protocols"
@@ -1812,14 +1800,10 @@ msgid "There is newer testing Gammu version available! (%s instead of %s)\n"
msgstr "There is newer testing Gammu version available! (%s instead of %s)\n"
#: gammu/gammu.c:332
-#, fuzzy
-#| msgid ""
-#| "Copyright (C) 2003 - 2012 Michal Cihar <michal@cihar.com> and other "
-#| "authors."
msgid ""
"Copyright (C) 2003 - 2016 Michal Cihar <michal@cihar.com> and other authors."
msgstr ""
-"Copyright (C) 2003 - 2012 Michal Cihar <michal@cihar.com> and other authors."
+"Copyright (C) 2003 - 2016 Michal Cihar <michal@cihar.com> and other authors."
#: gammu/gammu.c:370
msgid "standard input"
@@ -4031,7 +4015,7 @@ msgstr "Congestion"
#: helper/message-display.c:200 helper/message-display.c:216
msgid "SME busy"
-msgstr "SME busy"
+msgstr "SME engaged"
#: helper/message-display.c:201 helper/message-display.c:217
msgid "No response from SME"
diff --git a/locale/es/docs.po b/locale/es/docs.po
index dde1a9c..38543d6 100644
--- a/locale/es/docs.po
+++ b/locale/es/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-03-10 19:26+0200\n"
diff --git a/locale/et/docs.po b/locale/et/docs.po
index c8976ed..14b5af4 100644
--- a/locale/et/docs.po
+++ b/locale/et/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
@@ -114,7 +114,7 @@ msgstr ":alt: Bitdeli badge :target: https://bitdeli.com/free"
#. type: Plain text
#: README.rst:32
msgid "https://img.shields.io/gratipay/Gammu.svg"
-msgstr ""
+msgstr "https://img.shields.io/gratipay/Gammu.svg"
#. type: Plain text
#: README.rst:34
@@ -128,6 +128,7 @@ msgstr ":target: https://travis-ci.org/gammu/gammu"
msgid ""
"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
msgstr ""
+"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
#. type: Plain text
#: README.rst:38
@@ -135,6 +136,8 @@ msgid ""
":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
msgstr ""
+":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
+"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
#. type: Title =
#: README.rst:40
diff --git a/locale/fi/docs.po b/locale/fi/docs.po
index b11b818..6c4b05e 100644
--- a/locale/fi/docs.po
+++ b/locale/fi/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-04-21 14:14+0200\n"
diff --git a/locale/fr/docs.po b/locale/fr/docs.po
index e441b2c..a0ed2aa 100644
--- a/locale/fr/docs.po
+++ b/locale/fr/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-06-01 13:48+0200\n"
@@ -115,7 +115,7 @@ msgstr ":alt: Bitdeli badge :target: https://bitdeli.com/free"
#. type: Plain text
#: README.rst:32
msgid "https://img.shields.io/gratipay/Gammu.svg"
-msgstr ""
+msgstr "https://img.shields.io/gratipay/Gammu.svg"
#. type: Plain text
#: README.rst:34
@@ -129,6 +129,7 @@ msgstr ":target: https://travis-ci.org/gammu/gammu"
msgid ""
"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
msgstr ""
+"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
#. type: Plain text
#: README.rst:38
@@ -136,6 +137,8 @@ msgid ""
":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
msgstr ""
+":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
+"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
#. type: Title =
#: README.rst:40
diff --git a/locale/gammu.pot b/locale/gammu.pot
index 2719729..74425a8 100644
--- a/locale/gammu.pot
+++ b/locale/gammu.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: gammu 1.37.90\n"
+"Project-Id-Version: gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
-"POT-Creation-Date: 2016-10-11 08:16+0200\n"
+"POT-Creation-Date: 2016-11-16 13:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/locale/gl/docs.po b/locale/gl/docs.po
index ff9fff0..a921ee0 100644
--- a/locale/gl/docs.po
+++ b/locale/gl/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-02-14 23:34+0100\n"
diff --git a/locale/he/docs.po b/locale/he/docs.po
index 48abc02..4e84d48 100644
--- a/locale/he/docs.po
+++ b/locale/he/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2010-02-20 13:09+0200\n"
diff --git a/locale/hu/docs.po b/locale/hu/docs.po
index 79490c5..d8ee910 100644
--- a/locale/hu/docs.po
+++ b/locale/hu/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/id/docs.po b/locale/id/docs.po
index 7ab1f69..6bda6d9 100644
--- a/locale/id/docs.po
+++ b/locale/id/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-12-13 21:56+0200\n"
diff --git a/locale/id/gammu.po b/locale/id/gammu.po
index a074bf9..0a11e34 100644
--- a/locale/id/gammu.po
+++ b/locale/id/gammu.po
@@ -4,11 +4,11 @@
# Automatically generated, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
-"PO-Revision-Date: 2016-10-12 00:40+0000\n"
-"Last-Translator: Wahyu Kecambah Linux <wahyu.kelix@gmail.com>\n"
+"PO-Revision-Date: 2016-11-18 15:50+0000\n"
+"Last-Translator: Prasasto Adi <prasastoadi@gmail.com>\n"
"Language-Team: Indonesian "
"<https://hosted.weblate.org/projects/gammu/gammu/id/>\n"
"Language: id\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 2.9-dev\n"
+"X-Generator: Weblate 2.10-dev\n"
#: gammu/backup.c:49 gammu/backup.c:72 gammu/backup.c:95 gammu/backup.c:116
#: helper/message-cmdline.c:373 helper/message-cmdline.c:397
@@ -1562,7 +1562,7 @@ msgstr ""
#: gammu-detect/main.c:89 gammu/gammu.c:340
msgid "There is NO WARRANTY, to the extent permitted by law."
-msgstr "Tidak terdapat JAMINAN, sampai batas-batas yang diijinkan oleh hukum."
+msgstr "Tidak terdapat JAMINAN, sampai batas-batas yang diizinkan oleh hukum."
#: gammu-detect/main.c:91 gammu/gammu.c:344
#, fuzzy
@@ -1939,8 +1939,9 @@ msgid "Phone settings"
msgstr "Pengaturan telepon"
#: gammu/gammu.c:772
+#, fuzzy
msgid "Dumps decoding"
-msgstr "Tumpukan sedang didecode"
+msgstr "Tumpukan sedang didekode"
#: gammu/gammu.c:774
msgid "Functions that don't fit elsewhere"
@@ -2009,12 +2010,12 @@ msgstr ""
#: gammu/gammu.c:994
#, c-format
msgid "More parameters required (function requires %d)\n"
-msgstr "Dibutuhkan lebih banyak dibutukan (fungsi dibutuhkan %d)\n"
+msgstr "Dibutuhkan lebih banyak parameter (fungsi membutuhkan %d)\n"
#: gammu/gammu.c:997
#, c-format
msgid "More parameters required (function requires %d to %d)\n"
-msgstr "Dibutuhkan lebih banyak dibutukan (fungsi dibutuhkan %d hingga %d)\n"
+msgstr "Dibutuhkan lebih banyak parameter (fungsi membutuhkan %d hingga %d)\n"
#: gammu/gammu.c:1003 gammu/gammu.c:1024
msgid "Parameters help"
@@ -4017,7 +4018,7 @@ msgstr "SM diterima oleh SME"
msgid ""
"SM forwarded by the SC to the SME but the SC is unable to confirm delivery"
msgstr ""
-"SM diforward oleh SC ke SME tetapi SC tidak bisa mengkonfirmasi pengiriman"
+"SM diteruskan oleh SC ke SME tetapi SC tidak bisa mengkonfirmasi pengiriman"
#: helper/message-display.c:198
msgid "SM replaced by the SC"
diff --git a/locale/id/libgammu.po b/locale/id/libgammu.po
index 993218c..ce77e6a 100644
--- a/locale/id/libgammu.po
+++ b/locale/id/libgammu.po
@@ -4,7 +4,7 @@
# Automatically generated, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2016-10-22 17:05+0000\n"
diff --git a/locale/it/docs.po b/locale/it/docs.po
index aef08a3..6505d0d 100644
--- a/locale/it/docs.po
+++ b/locale/it/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2012-02-23 03:10+0200\n"
diff --git a/locale/it/gammu.po b/locale/it/gammu.po
index dcbd9c1..077ea21 100644
--- a/locale/it/gammu.po
+++ b/locale/it/gammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2013-11-19 11:01+0200\n"
diff --git a/locale/it/libgammu.po b/locale/it/libgammu.po
index 6cbffb3..ff6ced7 100644
--- a/locale/it/libgammu.po
+++ b/locale/it/libgammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2012-08-27 11:45+0200\n"
diff --git a/locale/ko/docs.po b/locale/ko/docs.po
index 194a286..fec7562 100644
--- a/locale/ko/docs.po
+++ b/locale/ko/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/libgammu.pot b/locale/libgammu.pot
index eed8761..d7bb8d7 100644
--- a/locale/libgammu.pot
+++ b/locale/libgammu.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libgammu 1.37.90\n"
+"Project-Id-Version: libgammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
-"POT-Creation-Date: 2016-10-11 08:16+0200\n"
+"POT-Creation-Date: 2016-11-16 13:48+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/locale/nl/docs.po b/locale/nl/docs.po
index 55e9ce4..e5b1148 100644
--- a/locale/nl/docs.po
+++ b/locale/nl/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-05-25 12:11+0200\n"
diff --git a/locale/pl/docs.po b/locale/pl/docs.po
index ac515e1..487d313 100644
--- a/locale/pl/docs.po
+++ b/locale/pl/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-12-19 09:43+0200\n"
diff --git a/locale/pl/gammu.po b/locale/pl/gammu.po
index 78aaa8f..4f2bcb9 100644
--- a/locale/pl/gammu.po
+++ b/locale/pl/gammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2013-11-25 16:30+0200\n"
diff --git a/locale/pl/libgammu.po b/locale/pl/libgammu.po
index af78083..9fee503 100644
--- a/locale/pl/libgammu.po
+++ b/locale/pl/libgammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2013-02-23 23:11+0200\n"
diff --git a/locale/pt_BR/docs.po b/locale/pt_BR/docs.po
index 5becd0b..81d605a 100644
--- a/locale/pt_BR/docs.po
+++ b/locale/pt_BR/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2011-06-02 23:02+0200\n"
@@ -129,7 +129,7 @@ msgstr ":alt: Bitdeli badge :target: https://bitdeli.com/free"
#. type: Plain text
#: README.rst:32
msgid "https://img.shields.io/gratipay/Gammu.svg"
-msgstr ""
+msgstr "https://img.shields.io/gratipay/Gammu.svg"
#. type: Plain text
#: README.rst:34
diff --git a/locale/pt_BR/gammu.po b/locale/pt_BR/gammu.po
index e87bde3..b0f0178 100644
--- a/locale/pt_BR/gammu.po
+++ b/locale/pt_BR/gammu.po
@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: gammu 1.22.93\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
-"PO-Revision-Date: 2016-04-18 12:45+0000\n"
+"PO-Revision-Date: 2016-11-16 17:35+0000\n"
"Last-Translator: Helder Santana <helder.santana@systemsbr.com.br>\n"
-"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
-"gammu/gammu/pt_BR/>\n"
+"Language-Team: Portuguese (Brazil) "
+"<https://hosted.weblate.org/projects/gammu/gammu/pt_BR/>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 2.6-dev\n"
+"X-Generator: Weblate 2.10-dev\n"
#: gammu/backup.c:49 gammu/backup.c:72 gammu/backup.c:95 gammu/backup.c:116
#: helper/message-cmdline.c:373 helper/message-cmdline.c:397
@@ -1140,16 +1140,12 @@ msgid "Setting done"
msgstr "Configuração concluída"
#: gammu/depend/nokia/dct4.c:303
-#, fuzzy
-#| msgid ""
-#| "Sorry, but configuration matrix for this model has not yet been added. "
-#| "See <http://wammu.eu/support/bugs/> for information how to report it."
msgid ""
"Sorry, but configuration matrix for this model has not yet been added. See "
"<https://wammu.eu/support/bugs/> for information how to report it."
msgstr ""
"Desculpe, mas matriz de configuração para este modelo ainda não foi "
-"adicionada.Veja: <http://wammu.eu/support/bugs/> para saber como reportar a "
+"adicionada.Veja: <https://wammu.eu/support/bugs/> para saber como reportar a "
"ocorrência."
#: gammu/depend/nokia/dct4.c:369
@@ -1544,14 +1540,10 @@ msgid "Windows serial port probing"
msgstr "Provando porta serial do Windows"
#: gammu-detect/main.c:85
-#, fuzzy
-#| msgid ""
-#| "Copyright (C) 2010 - 2011 Michal Cihar <michal@cihar.com> and other "
-#| "authors."
msgid ""
"Copyright (C) 2010 - 2016 Michal Cihar <michal@cihar.com> and other authors."
msgstr ""
-"Copyright (C) 2003 - 2012 Michal Cihar <michal@cihar.com> e outros autores."
+"Copyright (C) 2010 - 2016 Michal Cihar <michal@cihar.com> e outros autores."
#: gammu-detect/main.c:87 gammu/gammu.c:336
msgid "License GPLv2: GNU GPL version 2 <https://spdx.org/licenses/GPL-2.0>."
@@ -1568,10 +1560,8 @@ msgid "There is NO WARRANTY, to the extent permitted by law."
msgstr "Não há GARANTIA, até a extensão permitida pela lei."
#: gammu-detect/main.c:91 gammu/gammu.c:344
-#, fuzzy
-#| msgid "Check <http://wammu.eu/gammu/> for updates."
msgid "Check <https://wammu.eu/gammu/> for updates."
-msgstr "Veja <http://wammu.eu/gammu/> para atualizações."
+msgstr "Veja <https://wammu.eu/gammu/> para atualizações."
#: gammu-detect/main.c:100
msgid "Configuration file generated by gammu-detect."
@@ -1638,20 +1628,18 @@ msgid "Phone memory"
msgstr "Memória do Celular"
#: gammu/files.c:49
-#, fuzzy, c-format
-#| msgid "%i bytes (free %i bytes, used %i bytes)"
+#, c-format
msgid "%ld bytes (free %ld bytes, used %ld bytes)"
-msgstr "%i bytes (livres %i bytes, usados %i bytes)"
+msgstr "%ld bytes (livres %ld bytes, utilizados %ld bytes)"
#: gammu/files.c:55
msgid "Usage details"
msgstr "Detalhes de Utilização"
#: gammu/files.c:56
-#, fuzzy, c-format
-#| msgid "images: %i, sounds: %i, themes: %i"
+#, c-format
msgid "images: %ld, sounds: %ld, themes: %ld"
-msgstr "imagens: %i, sons: %i, temas: %i"
+msgstr "imagens: %ld, sons: %ld, temas: %ld"
#. l10n: One char to indicate protected file
#: gammu/files.c:119 gammu/files.c:208 gammu/files.c:329
@@ -1817,14 +1805,10 @@ msgstr ""
"Existe uma versão TESTE mais nova do Gammu, disponível! (%s em vez de %s)\n"
#: gammu/gammu.c:332
-#, fuzzy
-#| msgid ""
-#| "Copyright (C) 2003 - 2015 Michal Cihar <michal@cihar.com> and other "
-#| "authors."
msgid ""
"Copyright (C) 2003 - 2016 Michal Cihar <michal@cihar.com> and other authors."
msgstr ""
-"Copyright (C) 2003 - 2015 Michal Cihar <michal@cihar.com> e outros autores."
+"Copyright (C) 2003 - 2016 Michal Cihar <michal@cihar.com> e outros autores."
#: gammu/gammu.c:370
msgid "standard input"
@@ -3414,16 +3398,12 @@ msgid "Writing file %s:"
msgstr "Gravando arquivo %s:"
#: gammu/nokia.c:442
-#, fuzzy
-#| msgid ""
-#| "Your phone model is not supported. Please report it to authors (see "
-#| "<http://wammu.eu/support/bugs/>). Thank you."
msgid ""
"Your phone model is not supported. Please report it to authors (see <https://"
"wammu.eu/support/bugs/>). Thank you."
msgstr ""
-"Modelo de telefone não suportado. Por favor reporte ao site.\n"
-"(veja <http://wammu.eu/support/bugs/>). Muito Obrigado!."
+"Modelo de telefone não suportado. Por favor reporte aos autores (veja "
+"<https://wammu.eu/support/bugs/>). Muito Obrigado."
#: gammu/nokia.c:458
msgid "Problem with deleting playlist"
diff --git a/locale/pt_BR/libgammu.po b/locale/pt_BR/libgammu.po
index 73a7038..0b23257 100644
--- a/locale/pt_BR/libgammu.po
+++ b/locale/pt_BR/libgammu.po
@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: libgammu 1.22.93\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
-"PO-Revision-Date: 2016-05-28 14:16+0000\n"
-"Last-Translator: Renan Souza do Nascimento <renan.sn@icloud.com>\n"
-"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
-"gammu/libgammu/pt_BR/>\n"
+"PO-Revision-Date: 2016-11-16 17:40+0000\n"
+"Last-Translator: Helder Santana <helder.santana@systemsbr.com.br>\n"
+"Language-Team: Portuguese (Brazil) "
+"<https://hosted.weblate.org/projects/gammu/libgammu/pt_BR/>\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 2.7-dev\n"
+"X-Generator: Weblate 2.10-dev\n"
#: libgammu/gsmcomon.c:84
msgid "No error."
@@ -82,40 +82,28 @@ msgstr ""
"Sem resposta no tempo especificado. Provávelmente celular desconectado."
#: libgammu/gsmcomon.c:98
-#, fuzzy
-#| msgid ""
-#| "Frame not requested right now. See <http://wammu.eu/support/bugs/> for "
-#| "information how to report it."
msgid ""
"Frame not requested right now. See <https://wammu.eu/support/bugs/> for "
"information how to report it."
msgstr ""
-"Frame não requerido agora. Veja <http://wammu.eu/support/bugs/> para "
-"informações de que maneira reportar isto."
+"Frame não requerido agora. Veja <https://wammu.eu/support/bugs/> para "
+"informações sobre como reportar isto."
#: libgammu/gsmcomon.c:99
-#, fuzzy
-#| msgid ""
-#| "Unknown response from phone. See <http://wammu.eu/support/bugs/> for "
-#| "information how to report it."
msgid ""
"Unknown response from phone. See <https://wammu.eu/support/bugs/> for "
"information how to report it."
msgstr ""
-"Desconhecida a resposta do telefone. Veja <http://wammu.eu/support/bugs/> "
-"para reportá-lo."
+"Resposta desconhecida do telefone. Veja <https://wammu.eu/support/bugs/> "
+"para informações sobre como reportar."
#: libgammu/gsmcomon.c:100
-#, fuzzy
-#| msgid ""
-#| "Unknown frame. See <http://wammu.eu/support/bugs/> for information how to "
-#| "report it."
msgid ""
"Unknown frame. See <https://wammu.eu/support/bugs/> for information how to "
"report it."
msgstr ""
-"Frame Desconhecido. Veja <http://wammu.eu/support/bugs/> para como reportar "
-"isto."
+"Frame Desconhecido. Veja <https://wammu.eu/support/bugs/> para informações "
+"sobre como reportar."
#: libgammu/gsmcomon.c:101
msgid "Unknown connection type string. Check config file."
diff --git a/locale/ro/docs.po b/locale/ro/docs.po
index 8e2d7a9..9b29d9e 100644
--- a/locale/ro/docs.po
+++ b/locale/ro/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2012-06-29 16:16+0300\n"
diff --git a/locale/ru/docs.po b/locale/ru/docs.po
index d026a3b..70d8bef 100644
--- a/locale/ru/docs.po
+++ b/locale/ru/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-07 18:00+0100\n"
diff --git a/locale/ru/gammu.po b/locale/ru/gammu.po
index e327cba..47e2268 100644
--- a/locale/ru/gammu.po
+++ b/locale/ru/gammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu 1.37.90\n"
+"Project-Id-Version: Gammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2015-10-13 04:57+0200\n"
diff --git a/locale/ru/libgammu.po b/locale/ru/libgammu.po
index 3209ebb..8369677 100644
--- a/locale/ru/libgammu.po
+++ b/locale/ru/libgammu.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: libGammu 1.37.90\n"
+"Project-Id-Version: libGammu 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 08:16+0200\n"
"PO-Revision-Date: 2013-04-25 15:45+0200\n"
diff --git a/locale/sk/docs.po b/locale/sk/docs.po
index 297169f..1572045 100644
--- a/locale/sk/docs.po
+++ b/locale/sk/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/sv/docs.po b/locale/sv/docs.po
index 7964e19..e87eb52 100644
--- a/locale/sv/docs.po
+++ b/locale/sv/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/locale/sw/docs.po b/locale/sw/docs.po
index bbbc5c9..e0689f9 100644
--- a/locale/sw/docs.po
+++ b/locale/sw/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-08-20 11:53+0300\n"
diff --git a/locale/tr/docs.po b/locale/tr/docs.po
index 8c426b0..a6662a5 100644
--- a/locale/tr/docs.po
+++ b/locale/tr/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2010-09-03 14:46+0300\n"
@@ -114,7 +114,7 @@ msgstr ":alt: Bitdeli badge :target: https://bitdeli.com/free"
#. type: Plain text
#: README.rst:32
msgid "https://img.shields.io/gratipay/Gammu.svg"
-msgstr ""
+msgstr "https://img.shields.io/gratipay/Gammu.svg"
#. type: Plain text
#: README.rst:34
@@ -128,6 +128,7 @@ msgstr ":target: https://travis-ci.org/gammu/gammu"
msgid ""
"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
msgstr ""
+"https://www.bountysource.com/badge/team?team_id=23177&style=bounties_received"
#. type: Plain text
#: README.rst:38
@@ -135,6 +136,8 @@ msgid ""
":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
msgstr ""
+":alt: Bountysource :target: https://www.bountysource.com/teams/gammu/issues?"
+"utm_source=Gammu&utm_medium=shield&utm_campaign=bounties_received"
#. type: Title =
#: README.rst:40
diff --git a/locale/uk/docs.po b/locale/uk/docs.po
index d359186..a489a60 100644
--- a/locale/uk/docs.po
+++ b/locale/uk/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2012-04-10 11:40+0300\n"
diff --git a/locale/zh_CN/docs.po b/locale/zh_CN/docs.po
index ace000d..67ae794 100644
--- a/locale/zh_CN/docs.po
+++ b/locale/zh_CN/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:06+0100\n"
diff --git a/locale/zh_TW/docs.po b/locale/zh_TW/docs.po
index 62b9e00..b80a082 100644
--- a/locale/zh_TW/docs.po
+++ b/locale/zh_TW/docs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Gammu-docs 1.37.90\n"
+"Project-Id-Version: Gammu-docs 1.38.0\n"
"Report-Msgid-Bugs-To: gammu-users@lists.sourceforge.net\n"
"POT-Creation-Date: 2016-10-11 13:13+0200\n"
"PO-Revision-Date: 2009-01-27 14:27+0100\n"
diff --git a/smsd/core.c b/smsd/core.c
index 4d3641b..9700b65 100644
--- a/smsd/core.c
+++ b/smsd/core.c
@@ -707,6 +707,10 @@ GSM_Error SMSD_ReadConfig(const char *filename, GSM_SMSDConfig *Config, gboolean
fullpath[PATH_MAX] = 0;
}
Config->shm_key = ftok(fullpath, SMSD_SHM_KEY);
+ if (Config->shm_key < 0) {
+ fprintf(stderr, "Failed to generate SHM key!\n");
+ return FALSE;
+ }
#endif
#ifdef WIN32
if (filename == NULL) {
@@ -1164,7 +1168,9 @@ gboolean SMSD_RunOn(const char *command, GSM_MultiSMSMessage *sms, GSM_SMSDConfi
/* Close write end of pipe */
close(pipefd[1]);
- fcntl(pipefd[0], F_SETFL, O_NONBLOCK);
+ if (fcntl(pipefd[0], F_SETFL, O_NONBLOCK) != 0) {
+ SMSD_Log(DEBUG_ERROR, Config, "Failed to set nonblocking pipe to child!");
+ }
i = 0;
do {
@@ -1853,7 +1859,8 @@ GSM_Error SMSD_InitSharedMemory(GSM_SMSDConfig *Config, gboolean writable)
/* Initial shared memory content */
if (writable) {
Config->Status->Version = SMSD_SHM_VERSION;
- strcpy(Config->Status->PhoneID, Config->PhoneID);
+ strncpy(Config->Status->PhoneID, Config->PhoneID, sizeof(Config->Status->PhoneID));
+ Config->Status->PhoneID[sizeof(Config->Status->PhoneID) - 1] = 0;
sprintf(Config->Status->Client, "Gammu %s on %s compiler %s",
GAMMU_VERSION,
GetOS(),
diff --git a/smsd/core.h b/smsd/core.h
index 31a0a98..0ac45b7 100644
--- a/smsd/core.h
+++ b/smsd/core.h
@@ -15,8 +15,8 @@
#include "services/sql-core.h"
#endif
-#define SMSD_SHM_KEY (0xface)
#define SMSD_SHM_VERSION (2)
+#define SMSD_SHM_KEY (0xfa << 16 || SMSD_SHM_VERSION)
#define SMSD_DB_VERSION (16)
#include "log.h"
diff --git a/smsd/services/files.c b/smsd/services/files.c
index 6001755..574c162 100644
--- a/smsd/services/files.c
+++ b/smsd/services/files.c
@@ -416,7 +416,13 @@ static GSM_Error SMSDFiles_FindOutboxSMS(GSM_MultiSMSMessage * sms, GSM_SMSDConf
} else if (i == 4) {
/* OUT<priority>_<phone number>_<serialno>.txt */
pos1 = strchr(FileName, '_');
+ if (pos1 == NULL) {
+ return ERR_BUG;
+ }
pos2 = strchr(++pos1, '_');
+ if (pos2 == NULL) {
+ return ERR_BUG;
+ }
phlen = strlen(pos1) - strlen(pos2);
} else {
/* something wrong */
@@ -564,7 +570,7 @@ static GSM_Error SMSDFiles_CreateOutboxSMS(GSM_MultiSMSMessage * sms, GSM_SMSDCo
1900 + timeinfo->tm_year, timeinfo->tm_mon + 1, timeinfo->tm_mday, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, buffer2, j, ext);
strcpy(FullName, Config->outboxpath);
strcat(FullName, FileName);
- fd = open(FileName, O_CREAT | O_EXCL, 0644);
+ fd = open(FullName, O_CREAT | O_EXCL, 0644);
if (fd >= 0) {
close(fd);
break;
diff --git a/smsd/services/sql.c b/smsd/services/sql.c
index d3a0191..543f145 100644
--- a/smsd/services/sql.c
+++ b/smsd/services/sql.c
@@ -1001,7 +1001,8 @@ static GSM_Error SMSDSQL_FindOutboxSMS(GSM_MultiSMSMessage * sms, GSM_SMSDConfig
sms->Number++;
if (i == 1) {
- strcpy(Config->CreatorID, db->GetString(Config, &res, 10));
+ strncpy(Config->CreatorID, db->GetString(Config, &res, 10), sizeof(Config->CreatorID));
+ Config->CreatorID[sizeof(Config->CreatorID) - 1] = 0;
Config->relativevalidity = (int)db->GetNumber(Config, &res, 8);
Config->currdeliveryreport = db->GetBool(Config, &res, 9);
diff --git a/tests/common.h b/tests/common.h
index 1b6bfca..97f0a22 100644
--- a/tests/common.h
+++ b/tests/common.h
@@ -15,6 +15,17 @@
} \
}
+#define test_string(expected, actual, length) \
+{ \
+ for (i = 0; i < length; i++) { \
+ if ((unsigned char)expected[i] != actual[i]) { \
+ fprintf(stderr, "Test \"%s\" == \"%s\" failed!\n", ""#expected, ""#actual); \
+ fprintf(stderr, "[%d] \\x%02X != \\x%02X\n", (int)i, (unsigned char)expected[i], actual[i]); \
+ exit(2); \
+ } \
+ } \
+}
+
#define gammu_test_result(error, text) \
{ \
if (error != ERR_NONE) {\
diff --git a/tests/utf-8.c b/tests/utf-8.c
index e2e3c2f..f28104b 100644
--- a/tests/utf-8.c
+++ b/tests/utf-8.c
@@ -5,10 +5,15 @@
#include "common.h"
#include <gammu.h>
#include <gammu-unicode.h>
+#include <string.h>
+
+#include "../libgammu/misc/coding/coding.h"
int main(int argc UNUSED, char **argv UNUSED)
{
unsigned char out[20];
+ gammu_char_t dest;
+ size_t i;
test_result(EncodeWithUTF8Alphabet(0x24, out) == 1);
test_result(out[0] == 0x24);
@@ -35,12 +40,24 @@ int main(int argc UNUSED, char **argv UNUSED)
test_result(out[3] == 0x8d);
test_result(EncodeUTF8(out, "\xD8\x3d\xDC\x4d\x00\x00"));
+
test_result(out[0] == 0xf0);
test_result(out[1] == 0x9f);
test_result(out[2] == 0x91);
test_result(out[3] == 0x8d);
test_result(out[4] == 0x00);
+ test_result(DecodeWithUTF8Alphabet("\xf0\x9f\x91\x8d\x00", &dest, 4) == 4);
+ test_result(dest == 0x1f44d);
+
+ DecodeUTF8(out, "\xf0\x9f\x91\x8d\x00", 4);
+
+ test_string("\xD8\x3d\xDC\x4d\x00", out, 5);
+
+ DecodeUTF8(out, "ahoj", 4);
+
+ test_string("\x00\x61\x00h\x00o\x00j\x00\x00\x00", out, 10);
+
return 0;
}