[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/direct_...
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] mldonkey distrib/ChangeLog src/networks/direct_... |
Date: |
Sun, 18 Jul 2010 10:58:37 +0000 |
CVSROOT: /sources/mldonkey
Module name: mldonkey
Changes by: spiralvoice <spiralvoice> 10/07/18 10:58:37
Modified files:
distrib : ChangeLog
src/networks/direct_connect: dcProtocol.ml
Log message:
patch #7249
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1444&r2=1.1445
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/networks/direct_connect/dcProtocol.ml?cvsroot=mldonkey&r1=1.10&r2=1.11
Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1444
retrieving revision 1.1445
diff -u -b -r1.1444 -r1.1445
--- distrib/ChangeLog 17 Jul 2010 15:24:42 -0000 1.1444
+++ distrib/ChangeLog 18 Jul 2010 10:58:36 -0000 1.1445
@@ -14,6 +14,9 @@
ChangeLog
=========
+2010/07/18
+7249: DC: fix parsing MyINFO with non-latin nicks (ygrek)
+
2010/07/17
7248: DC: correctly parse dchub:// entries in xml hublist (ygrek)
7247: BT tracker: remember tracked files after restart (ygrek)
Index: src/networks/direct_connect/dcProtocol.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/networks/direct_connect/dcProtocol.ml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- src/networks/direct_connect/dcProtocol.ml 24 May 2010 18:10:49 -0000
1.10
+++ src/networks/direct_connect/dcProtocol.ml 18 Jul 2010 10:58:36 -0000
1.11
@@ -456,7 +456,7 @@
in
let dest,nick =
(match String2.splitn dest_nick ' ' 2 with
- | [ dest ; nick ; _ ] -> dest , nick
+ | [ dest ; nick ; _ ] -> dest, dc_to_utf nick
| _ -> if !verbose_msg_clients then lprintf_nl "No. of ' ':s is
wrong in dest_nick"; raise Not_found )
in
if tagline = "" then return_no_tags dest nick tagline email size
@@ -497,7 +497,7 @@
) (String2.split tags ',');
{ (* pass this info record
as result.. *)
dest = dest;
- nick = dc_to_utf nick;
+ nick = nick;
description = tagline;
client_brand = client;
version = !version;
@@ -526,7 +526,7 @@
let print t = lprintf_nl "$MyINFO %s %s %s %s %Ld" t.dest t.nick
t.description t.conn_speed t.sharesize
let write buf t =
Printf.bprintf buf " %s %s %s$ $%s%c$%s$%Ld$"
- t.dest t.nick t.description t.conn_speed
+ t.dest (utf_to_dc t.nick) t.description t.conn_speed
(char_of_int t.flag) t.email t.sharesize
end
@@ -1163,7 +1163,10 @@
let len = pos - b.pos in
let s = String.sub b.buf b.pos len in
buf_used b (len+1);
- f (dc_parse true s) sock;
+ begin
+ try f (dc_parse true s) sock
+ with exn -> lprintf_nl "server handler %S : %s" s
(Printexc2.to_string exn)
+ end;
iter b.len
end
end
@@ -1186,11 +1189,15 @@
let pos = String.index_from b.buf b.pos '|' in
if pos < (b.pos + b.len) then begin
let len = pos - b.pos in
- let s = dc_parse false (String.sub b.buf b.pos len) in
+ let s = String.sub b.buf b.pos len in
+ let msg = dc_parse false s in
buf_used b (len+1);
+ begin try
(match !c with
- | None -> c := fm s sock (* do this only once per new
non-existing client eg. we are in ACTIVE mode *)
- | Some c -> nm c s sock ); (* after initial connection is
established *)
+ | None -> c := fm msg sock (* do this only once per new
non-existing client eg. we are in ACTIVE mode *)
+ | Some c -> nm c msg sock); (* after initial connection is
established *)
+ with exn -> lprintf_nl "client handler %S : %s" s
(Printexc2.to_string exn)
+ end;
iter b.len
end )
end