• R/O
  • HTTP
  • SSH
  • HTTPS

PeerCastIM: Commit


Commit MetaInfo

Revisão1aa9c6ca531b7dd5c70d4c6b4e653c98f9e1ca0e (tree)
Hora2008-09-14 01:06:41
Autoreru <eru01@user...>
Commitereru

Mensagem de Log

エラー落ちを修正

Mudança Sumário

Diff

--- a/PeerCast.root/PeerCast/core/common/pcp.cpp
+++ b/PeerCast.root/PeerCast/core/common/pcp.cpp
@@ -769,9 +769,13 @@ int PCPStream::readBroadcastAtoms(AtomStream &atom,int numc,BroadcastState &bcs)
769769 r = readAtom(patom,bcs);
770770 } else {
771771 char tmp[80], tmp2[80], tmp3[80];
772+ memset(tmp, 0, 80);
773+ memset(tmp2, 0, 80);
774+ memset(tmp3, 0, 80);
772775 hit.uphost.toStr(tmp);
773776 hit.host.toStr(tmp2);
774- sv->getHost().toStr(tmp3);
777+ if (sv)
778+ sv->getHost().toStr(tmp3);
775779 LOG_DEBUG("### Invalid bcst: hops=%d, l/r = %d/%d, ver=%d(VP%04d), ttl=%d",
776780 bcs.numHops,hit.numListeners, hit.numRelays, ver,ver_vp,bcs.ttl);
777781 LOG_DEBUG("### %s <- %s <- sv(%s)",
--- a/PeerCast.root/PeerCast/core/common/version2.h
+++ b/PeerCast.root/PeerCast/core/common/version2.h
@@ -44,9 +44,9 @@ extern int version_ex; // PP
4444 #if 1 /* for VP extend version */
4545 //#define VERSION_EX 1
4646 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
47-static const int PCP_CLIENT_VERSION_EX_NUMBER = 29;
48-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0029)";
49-static const char *PCX_VERSTRING_EX = "v0.1218(IM0029)";
47+static const int PCP_CLIENT_VERSION_EX_NUMBER = 30;
48+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0030)";
49+static const char *PCX_VERSTRING_EX = "v0.1218(IM0030)";
5050 #endif
5151
5252 // ------------------------------------------------
--- a/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
+++ b/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
@@ -190,6 +190,7 @@
190190 AdditionalLibraryDirectories="&quot;C:\Visual Studio Projects\PeCa-IMAS7651\core\win32\lib\Release&quot;"
191191 GenerateDebugInformation="true"
192192 ProgramDatabaseFile=".\Release/PeerCast.pdb"
193+ StripPrivateSymbols="PeerCast-dist.pdb"
193194 GenerateMapFile="true"
194195 SubSystem="2"
195196 RandomizedBaseAddress="1"
--- a/c:/Git/PeerCast.root/PeerCast/core/common/pcp.cpp
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/pcp.cpp
@@ -769,9 +769,13 @@ int PCPStream::readBroadcastAtoms(AtomStream &atom,int numc,BroadcastState &bcs)
769769 r = readAtom(patom,bcs);
770770 } else {
771771 char tmp[80], tmp2[80], tmp3[80];
772+ memset(tmp, 0, 80);
773+ memset(tmp2, 0, 80);
774+ memset(tmp3, 0, 80);
772775 hit.uphost.toStr(tmp);
773776 hit.host.toStr(tmp2);
774- sv->getHost().toStr(tmp3);
777+ if (sv)
778+ sv->getHost().toStr(tmp3);
775779 LOG_DEBUG("### Invalid bcst: hops=%d, l/r = %d/%d, ver=%d(VP%04d), ttl=%d",
776780 bcs.numHops,hit.numListeners, hit.numRelays, ver,ver_vp,bcs.ttl);
777781 LOG_DEBUG("### %s <- %s <- sv(%s)",
--- a/c:/Git/PeerCast.root/PeerCast/core/common/version2.h
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/version2.h
@@ -44,9 +44,9 @@ extern int version_ex; // PP
4444 #if 1 /* for VP extend version */
4545 //#define VERSION_EX 1
4646 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
47-static const int PCP_CLIENT_VERSION_EX_NUMBER = 29;
48-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0029)";
49-static const char *PCX_VERSTRING_EX = "v0.1218(IM0029)";
47+static const int PCP_CLIENT_VERSION_EX_NUMBER = 30;
48+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0030)";
49+static const char *PCX_VERSTRING_EX = "v0.1218(IM0030)";
5050 #endif
5151
5252 // ------------------------------------------------
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
@@ -190,6 +190,7 @@
190190 AdditionalLibraryDirectories="&quot;C:\Visual Studio Projects\PeCa-IMAS7651\core\win32\lib\Release&quot;"
191191 GenerateDebugInformation="true"
192192 ProgramDatabaseFile=".\Release/PeerCast.pdb"
193+ StripPrivateSymbols="PeerCast-dist.pdb"
193194 GenerateMapFile="true"
194195 SubSystem="2"
195196 RandomizedBaseAddress="1"
Show on old repository browser