Skip to content

Commit f41982a

Browse files
authored
Fix digimode messages (#462)
1 parent 6c13c36 commit f41982a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/sendbuf.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ void ExpandRst(char rst[4]) {
198198
replace_all(buffer, BUFSIZE, "[", rst_out); /* his RST */
199199
}
200200

201+
static void expand_pipe_char() {
202+
if (trxmode == DIGIMODE)
203+
replace_all(buffer, BUFSIZE, "|", "\r"); /* CR */
204+
else
205+
replace_all(buffer, BUFSIZE, "|", ""); /* drop it */
206+
}
207+
208+
201209
void ExpandMacro_CurrentQso(void) {
202210

203211
replace_all(buffer, BUFSIZE, "%", my.call); /* mycall */
@@ -229,10 +237,7 @@ void ExpandMacro_CurrentQso(void) {
229237

230238
replace_all(buffer, BUFSIZE, "!", current_qso.comment);
231239

232-
if (trxmode == DIGIMODE)
233-
replace_all(buffer, BUFSIZE, "|", "\r"); /* CR */
234-
else
235-
replace_all(buffer, BUFSIZE, "|", ""); /* drop it */
240+
expand_pipe_char();
236241
}
237242

238243
struct qso_t *get_previous_qso() {
@@ -269,6 +274,8 @@ void ExpandMacro_PreviousQso(void) {
269274
ExpandQsoNumber(prevnr);
270275
g_free(prevnr);
271276
}
277+
278+
expand_pipe_char();
272279
}
273280

274281

0 commit comments

Comments
 (0)