Codebase list smstools / HEAD
Import Debian changes 3.1.21-4 smstools (3.1.21-4) unstable; urgency=medium * take care of gcc10 errors (Closes: #957818) * debian/control: bump standard to 4.5.0 (no changes) * debian/control: use dh12 * debian/patches/spelling.patch: add more stuff noted by lintian Thorsten Alteholz 3 years ago
6 changed file(s) with 802 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
0 smstools (3.1.21-4) unstable; urgency=medium
1
2 * take care of gcc10 errors (Closes: #957818)
3 * debian/control: bump standard to 4.5.0 (no changes)
4 * debian/control: use dh12
5 * debian/patches/spelling.patch: add more stuff noted by lintian
6
7 -- Thorsten Alteholz <debian@alteholz.de> Wed, 05 Aug 2020 21:39:26 +0200
8
09 smstools (3.1.21-3) unstable; urgency=medium
110
211 * move package to salsa
+0
-1
debian/compat less more
0 11
22 Priority: optional
33 Maintainer: Debian Mobcom Maintainers <Debian-mobcom-maintainers@lists.alioth.debian.org>
44 Uploaders: Thorsten Alteholz <debian@alteholz.de>
5 Build-Depends: debhelper (>= 11)
5 Build-Depends: debhelper-compat (= 12)
66 , libmm-dev
77 , po-debconf
88 , quilt
99 Vcs-Browser: https://salsa.debian.org/debian-mobcom-team/smstools
1010 Vcs-Git: https://salsa.debian.org/debian-mobcom-team/smstools.git
1111 Homepage: http://smstools3.kekekasvi.com
12 Standards-Version: 4.1.5
12 Standards-Version: 4.5.0
1313
1414 Package: smstools
1515 Architecture: any
0 Description: fix of FTBFS with gcc10
1 Author: Thorsten Alteholz <debian@alteholz.de>
2 Index: smstools/src/smsd_cfg.h
3 ===================================================================
4 --- smstools.orig/src/smsd_cfg.h 2020-08-05 19:02:50.536596441 +0000
5 +++ smstools/src/smsd_cfg.h 2020-08-05 19:33:22.915005150 +0000
6 @@ -126,17 +126,17 @@
7 #define ALPHABET_UNKNOWN 4
8 #define ALPHABET_DEFAULT 0
9
10 -char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
11 -int process_id; // -1 for main task, all modems have numbers starting with 0.
12 +extern char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
13 +extern int process_id; // -1 for main task, all modems have numbers starting with 0.
14 // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS.
15
16 -time_t process_start_time;
17 +extern time_t process_start_time;
18
19 -int modem_handle; // Handle for modem.
20 +extern int modem_handle; // Handle for modem.
21
22 -int put_command_timeouts;
23 -unsigned long long put_command_sent; // 3.1.16beta.
24 -char tmpdir[PATH_MAX]; // 3.1.16beta.
25 +extern int put_command_timeouts;
26 +extern unsigned long long put_command_sent; // 3.1.16beta.
27 +extern char tmpdir[PATH_MAX]; // 3.1.16beta.
28
29 typedef struct
30 {
31 @@ -284,204 +284,204 @@
32
33 // NOTE for regular run intervals: effective value is at least delaytime.
34
35 -char configfile[PATH_MAX]; // Path to config file
36 -char d_spool[PATH_MAX]; // Spool directory
37 -char d_failed[PATH_MAX]; // Failed spool directory
38 -char d_failed_copy[PATH_MAX]; // 3.1.17.
39 -char d_incoming[PATH_MAX]; // Incoming spool directory
40 -char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
41 -char d_report[PATH_MAX]; // Incoming report spool directory
42 -char d_report_copy[PATH_MAX]; // 3.1.17.
43 -char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory
44 -char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc.
45 -char d_sent[PATH_MAX]; // Sent spool directory
46 -char d_sent_copy[PATH_MAX]; // 3.1.17.
47 -char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used)
48 -char eventhandler[PATH_MAX]; // Global event handler program or script
49 -char alarmhandler[PATH_MAX]; // Global alarm handler program or script
50 -char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid.
51 -int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler.
52 -char logfile[PATH_MAX]; // Name or Handle of Log File
53 -int loglevel; // Log Level (9=highest). Verbosity of log file.
54 -_queue queues[NUMBER_OF_MODEMS]; // Queues
55 -_device devices[NUMBER_OF_MODEMS]; // Modem devices
56 -int delaytime; // sleep-time after workless
57 -int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used.
58 -int blocktime; // sleep-time after multiple errors
59 -int blockafter; // Block modem after n errors
60 -int errorsleeptime; // sleep-time after each error
61 -int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
62 -int receive_before_send; // if 1 smsd tries to receive one message before sending
63 -int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
64 -int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
65 -int validity_period; // Validity period for messages.
66 -int decode_unicode_text; // 1 if unicode text is decoded internally.
67 -int internal_combine; // 1 if multipart message is combined internally.
68 -int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine.
69 -int keep_filename; // 0 if unique filename is created to each directory when a message file is moved.
70 -int store_original_filename; // 1 if an original filename is saved to message file when it's moved from
71 - // outgoing directory to spooler. Works together with keep_filename.
72 -int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
73 -char regular_run[PATH_MAX]; // Script/program which is run regularly.
74 -int regular_run_interval; // Number of seconds between running a regular_run script/progdam.
75 -char admin_to[SIZE_TO]; // Destination number for administrative messages.
76 -int filename_preview; // Number of chars of message text to concatenate to filename.
77 -int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set.
78 -int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
79 -int log_charconv; // 1 if character set conversion is logged.
80 -int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged.
81 -int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking.
82 -int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run.
83 -char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
84 -int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
85 -int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted.
86 -int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted.
87 -int ic_purge_interval; //
88 -char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh
89 -char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler.
90 -int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
91 -int status_signal_quality; // 1 = signal quality is written to status file.
92 -int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line.
93 -int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file.
94 -int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call.
95 -int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes.
96 -int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP.
97 +extern char configfile[PATH_MAX]; // Path to config file
98 +extern char d_spool[PATH_MAX]; // Spool directory
99 +extern char d_failed[PATH_MAX]; // Failed spool directory
100 +extern char d_failed_copy[PATH_MAX]; // 3.1.17.
101 +extern char d_incoming[PATH_MAX]; // Incoming spool directory
102 +extern char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
103 +extern char d_report[PATH_MAX]; // Incoming report spool directory
104 +extern char d_report_copy[PATH_MAX]; // 3.1.17.
105 +extern char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory
106 +extern char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc.
107 +extern char d_sent[PATH_MAX]; // Sent spool directory
108 +extern char d_sent_copy[PATH_MAX]; // 3.1.17.
109 +extern char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used)
110 +extern char eventhandler[PATH_MAX]; // Global event handler program or script
111 +extern char alarmhandler[PATH_MAX]; // Global alarm handler program or script
112 +extern char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid.
113 +extern int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler.
114 +extern char logfile[PATH_MAX]; // Name or Handle of Log File
115 +extern int loglevel; // Log Level (9=highest). Verbosity of log file.
116 +extern _queue queues[NUMBER_OF_MODEMS]; // Queues
117 +extern _device devices[NUMBER_OF_MODEMS]; // Modem devices
118 +extern int delaytime; // sleep-time after workless
119 +extern int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used.
120 +extern int blocktime; // sleep-time after multiple errors
121 +extern int blockafter; // Block modem after n errors
122 +extern int errorsleeptime; // sleep-time after each error
123 +extern int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
124 +extern int receive_before_send; // if 1 smsd tries to receive one message before sending
125 +extern int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
126 +extern int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
127 +extern int validity_period; // Validity period for messages.
128 +extern int decode_unicode_text; // 1 if unicode text is decoded internally.
129 +extern int internal_combine; // 1 if multipart message is combined internally.
130 +extern int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine.
131 +extern int keep_filename; // 0 if unique filename is created to each directory when a message file is moved.
132 +extern int store_original_filename; // 1 if an original filename is saved to message file when it's moved from
133 +// outgoing directory to spooler. Works together with keep_filename.
134 +extern int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
135 +extern char regular_run[PATH_MAX]; // Script/program which is run regularly.
136 +extern int regular_run_interval; // Number of seconds between running a regular_run script/progdam.
137 +extern char admin_to[SIZE_TO]; // Destination number for administrative messages.
138 +extern int filename_preview; // Number of chars of message text to concatenate to filename.
139 +extern int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set.
140 +extern int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
141 +extern int log_charconv; // 1 if character set conversion is logged.
142 +extern int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged.
143 +extern int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking.
144 +extern int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run.
145 +extern char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
146 +extern int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
147 +extern int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted.
148 +extern int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted.
149 +extern int ic_purge_interval; //
150 +extern char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh
151 +extern char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler.
152 +extern int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
153 +extern int status_signal_quality; // 1 = signal quality is written to status file.
154 +extern int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line.
155 +extern int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file.
156 +extern int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call.
157 +extern int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes.
158 +extern int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP.
159
160 // 3.1.5:
161 -int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
162 +extern int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
163
164 // 3.1.5:
165 -int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling.
166 +extern int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling.
167
168 // 3.1.7:
169 -int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked.
170 +extern int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked.
171
172 // 3.1.7:
173 -mode_t conf_umask; // File mode creation mask for smsd and modem processes.
174 +extern mode_t conf_umask; // File mode creation mask for smsd and modem processes.
175
176 // 3.1.7:
177 -int trim_text; // 1 = trailing whitespaces are removed from text:
178 +extern int trim_text; // 1 = trailing whitespaces are removed from text:
179
180 // 3.1.7:
181 -int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
182 +extern int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
183
184 // 3.1.7:
185 -int log_unmodified;
186 +extern int log_unmodified;
187
188 // 3.1.7:
189 -char suspend_filename[PATH_MAX];
190 +extern char suspend_filename[PATH_MAX];
191
192 // 3.1.9:
193 -int spool_directory_order;
194 +extern int spool_directory_order;
195
196 // 3.1.9: 1 if read_from_modem is logged.
197 -int log_read_from_modem;
198 +extern int log_read_from_modem;
199
200 // 3.1.16beta2: log_read_timing for performance tuning.
201 -int log_read_timing;
202 +extern int log_read_timing;
203
204 // 3.1.16beta:
205 -int log_response_time;
206 +extern int log_response_time;
207
208 // 3.1.16beta2:
209 -int default_alphabet;
210 +extern int default_alphabet;
211
212 // 3.1.17: Child process for the mainprocess:
213 -char mainprocess_child[PATH_MAX];
214 -char mainprocess_child_args[PATH_MAX];
215 +extern char mainprocess_child[PATH_MAX];
216 +extern char mainprocess_child_args[PATH_MAX];
217
218 // 3.1.17: Notifier for the mainprocess:
219 -int mainprocess_notifier;
220 +extern int mainprocess_notifier;
221
222 // 3.1.17: If *_copy was made, evenhandler can use it instead of original file:
223 -int eventhandler_use_copy;
224 +extern int eventhandler_use_copy;
225
226 // 3.1.17: This defines how long to sleep while looping:
227 -int sleeptime_mainprocess;
228 +extern int sleeptime_mainprocess;
229
230 // 3.1.17: Defines how often PID is checked to detect if another smsd is running:
231 -int check_pid_interval;
232 +extern int check_pid_interval;
233
234 // 3.1.18: start script/program for mainprocess:
235 -char mainprocess_start[PATH_MAX];
236 -char mainprocess_start_args[PATH_MAX];
237 +extern char mainprocess_start[PATH_MAX];
238 +extern char mainprocess_start_args[PATH_MAX];
239
240 -int message_count; // Counter for sent messages. Multipart message is one message.
241 +extern int message_count; // Counter for sent messages. Multipart message is one message.
242
243 -volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
244 -volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
245 +extern volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
246 +extern volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
247
248 -char username[65]; // user and group name which are used to run.
249 -char groupname[65]; // (max length is just a guess)
250 +extern char username[65]; // user and group name which are used to run.
251 +extern char groupname[65]; // (max length is just a guess)
252
253 -char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly.
254 -char pidfile[PATH_MAX]; // File where a process id is stored.
255 +extern char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly.
256 +extern char pidfile[PATH_MAX]; // File where a process id is stored.
257
258 // Command line arguments:
259 -char arg_username[65];
260 -char arg_groupname[65];
261 -char arg_infofile[PATH_MAX];
262 -char arg_pidfile[PATH_MAX];
263 -char arg_logfile[PATH_MAX];
264 -int arg_terminal;
265 +extern char arg_username[65];
266 +extern char arg_groupname[65];
267 +extern char arg_infofile[PATH_MAX];
268 +extern char arg_pidfile[PATH_MAX];
269 +extern char arg_logfile[PATH_MAX];
270 +extern int arg_terminal;
271 // 3.1.7:
272 -char arg_7bit_packed[512];
273 -int do_encode_decode_arg_7bit_packed;
274 +extern char arg_7bit_packed[512];
275 +extern int do_encode_decode_arg_7bit_packed;
276
277 -int terminal; // 1 if smsd is communicating with terminal.
278 -pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
279 -char run_info[PATH_MAX]; // Information about external script/program execution.
280 +extern int terminal; // 1 if smsd is communicating with terminal.
281 +extern pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
282 +extern char run_info[PATH_MAX]; // Information about external script/program execution.
283
284 -char communicate[32]; // Device name for terminal communication mode.
285 +extern char communicate[32]; // Device name for terminal communication mode.
286
287 -char international_prefixes[PATH_MAX +1];
288 -char national_prefixes[PATH_MAX +1];
289 +extern char international_prefixes[PATH_MAX +1];
290 +extern char national_prefixes[PATH_MAX +1];
291
292 // Storage for startup errors:
293 -char *startup_err_str;
294 -int startup_err_count;
295 +extern char *startup_err_str;
296 +extern int startup_err_count;
297
298 // Storage for PDU's:
299 -char *incoming_pdu_store;
300 -char *outgoing_pdu_store;
301 -char *routed_pdu_store;
302 +extern char *incoming_pdu_store;
303 +extern char *outgoing_pdu_store;
304 +extern char *routed_pdu_store;
305
306 // Storage for getfile errors:
307 -char *getfile_err_store;
308 +extern char *getfile_err_store;
309
310 // Text buffer for error messages:
311 -char tb[SIZE_TB];
312 +extern char tb[SIZE_TB];
313
314 // Buffer for SIM memory checking:
315 -char *check_memory_buffer;
316 -size_t check_memory_buffer_size;
317 +extern char *check_memory_buffer;
318 +extern size_t check_memory_buffer_size;
319
320 -int os_cygwin; // 1 if we are on Cygwin.
321 +extern int os_cygwin; // 1 if we are on Cygwin.
322
323 -char language_file[PATH_MAX]; // File name of translated headers.
324 -char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question.
325 -char no_chars[SIZE_HEADER]; // See details inside read_translation() function.
326 -char yes_word[SIZE_HEADER]; // "yes" printed as an output.
327 -char no_word[SIZE_HEADER]; // "no"
328 -char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
329 -char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
330 -char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
331 -int translate_incoming; // 0 if incoming message headers are NOT transtaled.
332 +extern char language_file[PATH_MAX]; // File name of translated headers.
333 +extern char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question.
334 +extern char no_chars[SIZE_HEADER]; // See details inside read_translation() function.
335 +extern char yes_word[SIZE_HEADER]; // "yes" printed as an output.
336 +extern char no_word[SIZE_HEADER]; // "no"
337 +extern char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
338 +extern char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
339 +extern char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
340 +extern int translate_incoming; // 0 if incoming message headers are NOT transtaled.
341
342 // 3.1.14:
343 -int logtime_us;
344 -int logtime_ms;
345 +extern int logtime_us;
346 +extern int logtime_ms;
347
348 // 3.1.14:
349 -int shell_test;
350 +extern int shell_test;
351
352 // Next two are for debugging purposes:
353 -int enable_smsd_debug;
354 -char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
355 +extern int enable_smsd_debug;
356 +extern char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
357
358 // 3.1.20: Alt keys in communication mode:
359 #define COMMUNICATE_A_KEY_COUNT 10
360 -char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
361 +extern char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
362
363 /* initialize all variable with default values */
364
365 Index: smstools/src/smsd_cfg.c
366 ===================================================================
367 --- smstools.orig/src/smsd_cfg.c 2020-07-27 19:00:41.616207603 +0000
368 +++ smstools/src/smsd_cfg.c 2020-08-05 19:17:41.595712888 +0000
369 @@ -38,6 +38,221 @@
370 #include "modeminit.h"
371 #include "charshift.h"
372
373 +
374 +/* global variables */
375 +char process_title[32]; // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
376 +int process_id; // -1 for main task, all modems have numbers starting with 0.
377 + // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS.
378 +
379 +time_t process_start_time;
380 +
381 +int modem_handle; // Handle for modem.
382 +
383 +int put_command_timeouts;
384 +unsigned long long put_command_sent; // 3.1.16beta.
385 +char tmpdir[PATH_MAX]; // 3.1.16beta.
386 +
387 +// NOTE for regular run intervals: effective value is at least delaytime.
388 +
389 +char configfile[PATH_MAX]; // Path to config file
390 +char d_spool[PATH_MAX]; // Spool directory
391 +char d_failed[PATH_MAX]; // Failed spool directory
392 +char d_failed_copy[PATH_MAX]; // 3.1.17.
393 +char d_incoming[PATH_MAX]; // Incoming spool directory
394 +char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
395 +char d_report[PATH_MAX]; // Incoming report spool directory
396 +char d_report_copy[PATH_MAX]; // 3.1.17.
397 +char d_phonecalls[PATH_MAX]; // Incoming phonecalls data directory
398 +char d_saved[PATH_MAX]; // Directory for smsd's internal use, concatenation storage files etc.
399 +char d_sent[PATH_MAX]; // Sent spool directory
400 +char d_sent_copy[PATH_MAX]; // 3.1.17.
401 +char d_checked[PATH_MAX]; // Spool directory for checked messages (only used when no provider queues used)
402 +char eventhandler[PATH_MAX]; // Global event handler program or script
403 +char alarmhandler[PATH_MAX]; // Global alarm handler program or script
404 +char checkhandler[PATH_MAX]; // Handler that checks if the sms file is valid.
405 +int alarmlevel; // Alarm Level (9=highest). Verbosity of alarm handler.
406 +char logfile[PATH_MAX]; // Name or Handle of Log File
407 +int loglevel; // Log Level (9=highest). Verbosity of log file.
408 +_queue queues[NUMBER_OF_MODEMS]; // Queues
409 +_device devices[NUMBER_OF_MODEMS]; // Modem devices
410 +int delaytime; // sleep-time after workless
411 +int delaytime_mainprocess; // sleep-time after workless, main process. If -1, delaytime is used.
412 +int blocktime; // sleep-time after multiple errors
413 +int blockafter; // Block modem after n errors
414 +int errorsleeptime; // sleep-time after each error
415 +int autosplit; // Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
416 +int receive_before_send; // if 1 smsd tries to receive one message before sending
417 +int store_received_pdu; // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
418 +int store_sent_pdu; // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
419 +int validity_period; // Validity period for messages.
420 +int decode_unicode_text; // 1 if unicode text is decoded internally.
421 +int internal_combine; // 1 if multipart message is combined internally.
422 +int internal_combine_binary; // 1 if multipart binary message is combined internally. Defaults to internal_combine.
423 +int keep_filename; // 0 if unique filename is created to each directory when a message file is moved.
424 +int store_original_filename; // 1 if an original filename is saved to message file when it's moved from
425 + // outgoing directory to spooler. Works together with keep_filename.
426 +int date_filename; // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
427 +char regular_run[PATH_MAX]; // Script/program which is run regularly.
428 +int regular_run_interval; // Number of seconds between running a regular_run script/progdam.
429 +char admin_to[SIZE_TO]; // Destination number for administrative messages.
430 +int filename_preview; // Number of chars of message text to concatenate to filename.
431 +int incoming_utf8; // 1 if incoming files are saved using UTF-8 character set.
432 +int outgoing_utf8; // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
433 +int log_charconv; // 1 if character set conversion is logged.
434 +int log_single_lines; // 1 if linefeeds are removed from the modem response to be logged.
435 +int executable_check; // 0 if eventhandler and other executables are NOT checked during the startup checking.
436 +int keep_messages; // For testing purposes: messages are not deleted and smsd stops after first run.
437 +char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
438 +int ic_purge_hours; // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
439 +int ic_purge_minutes; // and if there is message parts older than defined, they are handled or deleted.
440 +int ic_purge_read; // 1 = message parts are stored as single messages. 0 = parts are just deleted.
441 +int ic_purge_interval; //
442 +char shell[PATH_MAX]; // Shell used to run eventhandler, defaults to /bin/sh
443 +char adminmessage_device[32]; // Name of device used to send administrative messages of mainspooler.
444 +int smart_logging; // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
445 +int status_signal_quality; // 1 = signal quality is written to status file.
446 +int status_include_counters; // 1 = succeeded, failed and received counters are included in the status line.
447 +int status_include_uptime; // 3.1.16beta: 1 = include started & uptime line in the status file.
448 +int hangup_incoming_call; // 1 = if detected unexpected input contains RING and we want to end call.
449 +int max_continuous_sending; // Defines when sending is breaked to do check/do other tasks. Time in minutes.
450 +int voicecall_hangup_ath; // If ATH is used instead of AT+CHUP.
451 +
452 +// 3.1.5:
453 +int trust_outgoing; // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
454 +
455 +// 3.1.5:
456 +int ignore_outgoing_priority; // 1 = Priority: high header is not checked. Speeds up spooling.
457 +
458 +// 3.1.7:
459 +int ignore_exec_output; // 1 = stdout and stderr of eventhandlers is _not_ checked.
460 +
461 +// 3.1.7:
462 +mode_t conf_umask; // File mode creation mask for smsd and modem processes.
463 +
464 +// 3.1.7:
465 +int trim_text; // 1 = trailing whitespaces are removed from text:
466 +
467 +// 3.1.7:
468 +int use_linux_ps_trick; // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
469 +
470 +// 3.1.7:
471 +int log_unmodified;
472 +
473 +// 3.1.7:
474 +char suspend_filename[PATH_MAX];
475 +
476 +// 3.1.9:
477 +int spool_directory_order;
478 +
479 +// 3.1.9: 1 if read_from_modem is logged.
480 +int log_read_from_modem;
481 +
482 +// 3.1.16beta2: log_read_timing for performance tuning.
483 +int log_read_timing;
484 +
485 +// 3.1.16beta:
486 +int log_response_time;
487 +
488 +// 3.1.16beta2:
489 +int default_alphabet;
490 +
491 +// 3.1.17: Child process for the mainprocess:
492 +char mainprocess_child[PATH_MAX];
493 +char mainprocess_child_args[PATH_MAX];
494 +
495 +// 3.1.17: Notifier for the mainprocess:
496 +int mainprocess_notifier;
497 +
498 +// 3.1.17: If *_copy was made, evenhandler can use it instead of original file:
499 +int eventhandler_use_copy;
500 +
501 +// 3.1.17: This defines how long to sleep while looping:
502 +int sleeptime_mainprocess;
503 +
504 +// 3.1.17: Defines how often PID is checked to detect if another smsd is running:
505 +int check_pid_interval;
506 +
507 +// 3.1.18: start script/program for mainprocess:
508 +char mainprocess_start[PATH_MAX];
509 +char mainprocess_start_args[PATH_MAX];
510 +
511 +int message_count; // Counter for sent messages. Multipart message is one message.
512 +
513 +volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
514 +volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
515 +
516 +char username[65]; // user and group name which are used to run.
517 +char groupname[65]; // (max length is just a guess)
518 +
519 +char infofile[PATH_MAX]; // Hepler file for stopping the smsd smoothly.
520 +char pidfile[PATH_MAX]; // File where a process id is stored.
521 +
522 +// Command line arguments:
523 +char arg_username[65];
524 +char arg_groupname[65];
525 +char arg_infofile[PATH_MAX];
526 +char arg_pidfile[PATH_MAX];
527 +char arg_logfile[PATH_MAX];
528 +int arg_terminal;
529 +// 3.1.7:
530 +char arg_7bit_packed[512];
531 +int do_encode_decode_arg_7bit_packed;
532 +
533 +int terminal; // 1 if smsd is communicating with terminal.
534 +pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
535 +char run_info[PATH_MAX]; // Information about external script/program execution.
536 +
537 +char communicate[32]; // Device name for terminal communication mode.
538 +
539 +char international_prefixes[PATH_MAX +1];
540 +char national_prefixes[PATH_MAX +1];
541 +
542 +// Storage for startup errors:
543 +char *startup_err_str;
544 +int startup_err_count;
545 +
546 +// Storage for PDU's:
547 +char *incoming_pdu_store;
548 +char *outgoing_pdu_store;
549 +char *routed_pdu_store;
550 +
551 +// Storage for getfile errors:
552 +char *getfile_err_store;
553 +
554 +// Text buffer for error messages:
555 +char tb[SIZE_TB];
556 +
557 +// Buffer for SIM memory checking:
558 +char *check_memory_buffer;
559 +size_t check_memory_buffer_size;
560 +
561 +int os_cygwin; // 1 if we are on Cygwin.
562 +
563 +char language_file[PATH_MAX]; // File name of translated headers.
564 +char yes_chars[SIZE_HEADER]; // Characters which mean "yes" in the yesno() question.
565 +char no_chars[SIZE_HEADER]; // See details inside read_translation() function.
566 +char yes_word[SIZE_HEADER]; // "yes" printed as an output.
567 +char no_word[SIZE_HEADER]; // "no"
568 +char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
569 +char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
570 +char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
571 +int translate_incoming; // 0 if incoming message headers are NOT transtaled.
572 +
573 +// 3.1.14:
574 +int logtime_us;
575 +int logtime_ms;
576 +
577 +// 3.1.14:
578 +int shell_test;
579 +
580 +// Next two are for debugging purposes:
581 +int enable_smsd_debug;
582 +char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
583 +
584 +// 3.1.20: Alt keys in communication mode:
585 +#define COMMUNICATE_A_KEY_COUNT 10
586 +char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
587 +
588 char *msg_dir = "%s directory %s cannot be opened.";
589 char *msg_file = "%s directory %s is not writable.";
590 char *msg_not_executable = "is not executable for smsd.";
591 Index: smstools/src/logging.c
592 ===================================================================
593 --- smstools.orig/src/logging.c 2020-07-27 19:00:41.612207583 +0000
594 +++ smstools/src/logging.c 2020-08-05 19:27:38.373800111 +0000
595 @@ -25,6 +25,16 @@
596 #include "smsd_cfg.h"
597 #include "stats.h"
598
599 +
600 +// 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c:
601 +char logch_buffer[8192];
602 +
603 +char prch(char ch);
604 +
605 +// 3.1.16beta: changed type:
606 +//int trouble_logging_started;
607 +time_t trouble_logging_started;
608 +
609 int Filehandle = -1;
610 int Level;
611 int SavedLevel;
612 Index: smstools/src/logging.h
613 ===================================================================
614 --- smstools.orig/src/logging.h 2020-07-27 19:00:41.612207583 +0000
615 +++ smstools/src/logging.h 2020-08-05 19:27:52.077848035 +0000
616 @@ -18,7 +18,7 @@
617 #include <time.h>
618
619 // 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c:
620 -char logch_buffer[8192];
621 +extern char logch_buffer[8192];
622
623 #ifdef __GNUC__
624 void logch(char* format, ...) __attribute__ ((format(printf, 1, 2)));
625 @@ -26,11 +26,11 @@
626 void logch(char* format, ...);
627 #endif
628
629 -char prch(char ch);
630 +extern char prch(char ch);
631
632 // 3.1.16beta: changed type:
633 //int trouble_logging_started;
634 -time_t trouble_logging_started;
635 +extern time_t trouble_logging_started;
636
637 int change_loglevel(int new_level);
638 void restore_loglevel();
639 Index: smstools/src/stats.c
640 ===================================================================
641 --- smstools.orig/src/stats.c 2020-07-27 19:00:41.616207603 +0000
642 +++ smstools/src/stats.c 2020-08-05 19:28:58.094078936 +0000
643 @@ -29,6 +29,20 @@
644 #include <mm.h>
645 #endif
646
647 +
648 +_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
649 +int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue
650 +time_t start_time; // Start time of smsd, allows statistic functions
651 +int printstatus; // if 1 smsd outputs status on stdout
652 +time_t last_stats; // time when the last stats file was created
653 +char d_stats[PATH_MAX]; // path to statistic files
654 +int stats_interval; // time between statistic files in seconds.
655 +int stats_no_zeroes; // Suppress files that contain only zeroes
656 +int status_interval; // time between updating status file in seconds
657 +
658 +char *shared_buffer;
659 +
660 +
661 char newstatus[NUMBER_OF_MODEMS +1] = {0};
662 char oldstatus[NUMBER_OF_MODEMS +1] = {0};
663
664 Index: smstools/src/stats.h
665 ===================================================================
666 --- smstools.orig/src/stats.h 2020-07-27 19:00:41.616207603 +0000
667 +++ smstools/src/stats.h 2020-08-05 19:29:14.750137182 +0000
668 @@ -33,17 +33,17 @@
669 int ber;
670 } _stats;
671
672 -_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
673 -int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue
674 -time_t start_time; // Start time of smsd, allows statistic functions
675 -int printstatus; // if 1 smsd outputs status on stdout
676 -time_t last_stats; // time when the last stats file was created
677 -char d_stats[PATH_MAX]; // path to statistic files
678 -int stats_interval; // time between statistic files in seconds.
679 -int stats_no_zeroes; // Suppress files that contain only zeroes
680 -int status_interval; // time between updating status file in seconds
681 +extern _stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
682 +extern int rejected_counter; // Statistic counter, rejected SM, number does not fit into any queue
683 +extern time_t start_time; // Start time of smsd, allows statistic functions
684 +extern int printstatus; // if 1 smsd outputs status on stdout
685 +extern time_t last_stats; // time when the last stats file was created
686 +extern char d_stats[PATH_MAX]; // path to statistic files
687 +extern int stats_interval; // time between statistic files in seconds.
688 +extern int stats_no_zeroes; // Suppress files that contain only zeroes
689 +extern int status_interval; // time between updating status file in seconds
690
691 -char *shared_buffer;
692 +extern char *shared_buffer;
693
694 /* Creates shared memory variables for statistic data */
695
696 Index: smstools/src/blacklist.c
697 ===================================================================
698 --- smstools.orig/src/blacklist.c 2020-07-27 19:00:41.612207583 +0000
699 +++ smstools/src/blacklist.c 2020-08-05 19:34:13.903183463 +0000
700 @@ -23,6 +23,8 @@
701 #include "alarm.h"
702 #include "smsd_cfg.h"
703
704 +char blacklist[256]; // Filename of the black-list
705 +
706 int inblacklist(char* msisdn)
707 {
708 FILE* file;
709 Index: smstools/src/blacklist.h
710 ===================================================================
711 --- smstools.orig/src/blacklist.h 2020-07-27 19:00:41.612207583 +0000
712 +++ smstools/src/blacklist.h 2020-08-05 19:34:04.903151994 +0000
713 @@ -15,7 +15,7 @@
714 #ifndef BLACK_H
715 #define BLACK_H
716
717 -char blacklist[256]; // Filename of the black-list
718 +extern char blacklist[256]; // Filename of the black-list
719
720 int inblacklist(char* msisdn);
721
722 Index: smstools/src/whitelist.c
723 ===================================================================
724 --- smstools.orig/src/whitelist.c 2020-07-27 19:00:41.616207603 +0000
725 +++ smstools/src/whitelist.c 2020-08-05 19:39:23.436266057 +0000
726 @@ -23,6 +23,8 @@
727 #include "alarm.h"
728 #include "smsd_cfg.h"
729
730 +char whitelist[256]; // Filename of the white-list
731 +
732 /* Used with >= 3.1x */
733 int inwhitelist_q(char* msisdn, char *queuename)
734 {
735 Index: smstools/src/whitelist.h
736 ===================================================================
737 --- smstools.orig/src/whitelist.h 2020-07-27 19:00:41.616207603 +0000
738 +++ smstools/src/whitelist.h 2020-08-05 19:34:29.959239624 +0000
739 @@ -15,7 +15,7 @@
740 #ifndef WHITE_H
741 #define WHITE_H
742
743 -char whitelist[256]; // Filename of the white-list
744 +extern char whitelist[256]; // Filename of the white-list
745
746 /* Used with >= 3.1x */
747 int inwhitelist_q(char* msisdn, char *queuename);
55 gawk-path-fix.patch
66
77 kfreebsd.patch
8
9 gcc10.patch
10
00 Author: Thorsten Alteholz <debian@alteholz.de>
11 Description: fix some spelling errors
2 Index: smstools3/doc/configure.html
2 Index: smstools/doc/configure.html
33 ===================================================================
4 --- smstools3.orig/doc/configure.html 2017-05-10 13:20:56.505029113 +0200
5 +++ smstools3/doc/configure.html 2017-05-10 13:20:56.497028642 +0200
4 --- smstools.orig/doc/configure.html 2020-08-05 19:02:50.448596133 +0000
5 +++ smstools/doc/configure.html 2020-08-05 19:02:50.440596105 +0000
66 @@ -738,7 +738,7 @@
77 <p>
88 <i><b><a name="g_filename_preview">filename_preview</a> = number</b></i><br>
5151 </p>
5252
5353 <p>
54 Index: smstools3/doc/history3.html
54 Index: smstools/doc/history3.html
5555 ===================================================================
56 --- smstools3.orig/doc/history3.html 2017-05-10 13:20:56.505029113 +0200
57 +++ smstools3/doc/history3.html 2017-05-10 13:20:56.497028642 +0200
56 --- smstools.orig/doc/history3.html 2020-08-05 19:02:50.448596133 +0000
57 +++ smstools/doc/history3.html 2020-08-05 19:02:50.440596105 +0000
5858 @@ -2223,7 +2223,7 @@
5959 <font size="1">Default value: 0.</font><br>
6060 <i><b>adminmessage_count_clear = number</b></i><br>
100100 a message was received while the smsd was sending a multipart message.
101101 This is because the same buffer was used to store PDU's and receiving side cleaned it.
102102 Receiving and sending side now uses their own buffer to store PDU's.
103 Index: smstools3/src/extras.c
103 Index: smstools/src/extras.c
104104 ===================================================================
105 --- smstools3.orig/src/extras.c 2017-05-10 13:20:56.505029113 +0200
106 +++ smstools3/src/extras.c 2017-05-10 13:20:56.497028642 +0200
105 --- smstools.orig/src/extras.c 2020-08-05 19:02:50.448596133 +0000
106 +++ smstools/src/extras.c 2020-08-05 19:02:50.440596105 +0000
107107 @@ -816,7 +816,7 @@
108108 else
109109 {
113113 writelogfile0(LOG_ERR, 0, tb_sprintf("Cannot handle %s: %s", tmpname, reason));
114114 alarm_handler0(LOG_ERR, tb);
115115 }
116 Index: smstools3/src/smsd_cfg.h
116 Index: smstools/src/smsd_cfg.h
117117 ===================================================================
118 --- smstools3.orig/src/smsd_cfg.h 2017-05-10 13:20:56.505029113 +0200
119 +++ smstools3/src/smsd_cfg.h 2017-05-10 13:20:56.497028642 +0200
118 --- smstools.orig/src/smsd_cfg.h 2020-08-05 19:02:50.448596133 +0000
119 +++ smstools/src/smsd_cfg.h 2020-08-05 19:45:55.000000000 +0000
120120 @@ -94,7 +94,7 @@
121121 #define CM_CMGL 3
122122 #define CM_S_CMGL "CMGL is used."
126126 #define CM_CMGL_CHECK 31
127127 #define CM_S_CMGL_CHECK "CMGL is used and messages are taken from the list."
128128 #define CM_CMGL_DEL_LAST_CHECK 41
129 Index: smstools3/scripts/sms3
129 Index: smstools/scripts/sms3
130130 ===================================================================
131 --- smstools3.orig/scripts/sms3 2017-05-10 13:20:56.505029113 +0200
132 +++ smstools3/scripts/sms3 2017-05-10 13:20:56.497028642 +0200
131 --- smstools.orig/scripts/sms3 2020-08-05 19:02:50.448596133 +0000
132 +++ smstools/scripts/sms3 2020-08-05 19:02:50.440596105 +0000
133133 @@ -112,7 +112,7 @@
134134 echo ""
135135 dots=0
139139 kill -9 `ps $PSOPT | grep $NAME | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
140140 [ -f $PIDFILE ] && rm $PIDFILE
141141 seconds=0
142 Index: smstools3/src/modeminit.c
142 Index: smstools/src/modeminit.c
143143 ===================================================================
144 --- smstools3.orig/src/modeminit.c 2017-05-10 13:20:56.505029113 +0200
145 +++ smstools3/src/modeminit.c 2017-05-10 13:20:56.501028877 +0200
144 --- smstools.orig/src/modeminit.c 2020-08-05 19:02:50.448596133 +0000
145 +++ smstools/src/modeminit.c 2020-08-05 19:46:24.005736988 +0000
146 @@ -182,7 +182,7 @@
147 {38, "Network out of order"},
148 {41, "Temporary failure"},
149 {42, "Congestion"},
150 - {47, "Recources unavailable, unspecified"},
151 + {47, "Resources unavailable, unspecified"},
152 {50, "Requested facility not subscribed"},
153 {69, "Requested facility not implemented"},
154 {81, "Invalid short message transfer reference value"},
146155 @@ -2270,7 +2270,7 @@
147156 writelogfile(LOG_ERR, 0, "Couldn't resolve name '%s': %s.", hostname,
148157 (h_errno == HOST_NOT_FOUND) ? "Host not found" :
152161
153162 memcpy(&(sa.sin_addr), he->h_addr, he->h_length);
154163
164 Index: smstools/src/pdu.c
165 ===================================================================
166 --- smstools.orig/src/pdu.c 2020-07-27 19:00:41.612207583 +0000
167 +++ smstools/src/pdu.c 2020-08-05 19:46:50.573829910 +0000
168 @@ -997,7 +997,7 @@
169 case 1: p = "international"; break;
170 case 2: p = "national"; break;
171 case 3: p = "network specific"; break;
172 - case 4: p = "subsciber"; break;
173 + case 4: p = "subscriber"; break;
174 case 5: p = "alphanumeric"; break;
175 case 6: p = "abbreviated"; break;
176 //case 7: p = "reserved"; break;