mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
Fixed code page conversions of messages outgoing/incoming.
Jeremy.
(This used to be commit 84b045cbc8
)
This commit is contained in:
parent
ace4006c9f
commit
451dcb3351
@ -190,6 +190,13 @@ static void send_message(void)
|
||||
msg[l] = c;
|
||||
}
|
||||
|
||||
/*
|
||||
* The message is in UNIX codepage format. Convert to
|
||||
* DOS before sending.
|
||||
*/
|
||||
|
||||
unix_to_dos(msg, True);
|
||||
|
||||
if (!cli_message_text(cli, msg, l, grp_id)) {
|
||||
printf("SMBsendtxt failed (%s)\n",cli_errstr(cli));
|
||||
return;
|
||||
|
@ -62,6 +62,16 @@ static void msg_deliver(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Incoming message is in DOS codepage format. Convert to UNIX in
|
||||
* place.
|
||||
*/
|
||||
|
||||
if(msgpos > 0) {
|
||||
msgbuf[msgpos] = '\0'; /* Ensure null terminated. */
|
||||
dos_to_unix(msgbuf,True);
|
||||
}
|
||||
|
||||
for (i=0;i<msgpos;) {
|
||||
if (msgbuf[i]=='\r' && i<(msgpos-1) && msgbuf[i+1]=='\n') {
|
||||
i++; continue;
|
||||
|
Loading…
Reference in New Issue
Block a user