[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/icecream-make-it-cool/services
From: Dirk Mueller <mueller () kde ! org>
Date: 2007-07-30 22:06:25
Message-ID: 1185833185.059801.1922.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 694505 by mueller:
implement much shorter monitor messages
M +6 -6 comm.cpp
M +1 -1 comm.h
--- branches/work/icecream-make-it-cool/services/comm.cpp #694504:694505
@@ -665,8 +665,9 @@
shorten_filename(const std::string& str)
{
std::string::size_type ofs = str.rfind('/');
- if (ofs != string::npos)
- ofs = str.rfind('/', ofs-1);
+ for (int i = 2; i--;)
+ if (ofs != string::npos)
+ ofs = str.rfind('/', ofs-1);
return str.substr(ofs+1);
}
@@ -1573,6 +1574,7 @@
MonGetCSMsg::fill_from_channel (MsgChannel *c)
{
if (IS_PROTOCOL_29(c)) {
+ Msg::fill_from_channel(c);
*c >> filename;
uint32_t _lang;
*c >> _lang;
@@ -1589,10 +1591,8 @@
MonGetCSMsg::send_to_channel (MsgChannel *c) const
{
if (IS_PROTOCOL_29(c)) {
- std::string f = filename;
- if (f.size() > 32)
- f = f.substr(f.size()-32);
- *c << f;
+ Msg::send_to_channel (c);
+ *c << shorten_filename(filename);
*c << (uint32_t) lang;
}
else
--- branches/work/icecream-make-it-cool/services/comm.h #694504:694505
@@ -35,7 +35,7 @@
#include "job.h"
// if you increase the PROTOCOL_VERSION, add a macro below and use that
-#define PROTOCOL_VERSION 28
+#define PROTOCOL_VERSION 29
// if you increase the MIN_PROTOCOL_VERSION, comment out macros below and clean up the code
#define MIN_PROTOCOL_VERSION 21
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic