OSDN Git Service

チャンネル停止→チャンネル情報削除の間に再接続すると落ちるのを修正 IM0042
authoreru <eru01@users.sourceforge.jp>
Fri, 19 Nov 2010 17:11:43 +0000 (17:11 +0000)
committereru <eru01@users.sourceforge.jp>
Fri, 19 Nov 2010 17:11:43 +0000 (17:11 +0000)
PeerCast.root/PeerCast/core/common/servmgr.cpp
PeerCast.root/PeerCast/core/common/version2.h
c:/Git/PeerCast.root/PeerCast/core/common/servmgr.cpp
c:/Git/PeerCast.root/PeerCast/core/common/version2.h

index 5fb1d20..29be937 100644 (file)
@@ -1767,6 +1767,27 @@ bool ServMgr::getChannel(char *str,ChanInfo &info, bool relay)
                info = ch->info;        // get updated channel info 
 
                return true;
+       } else if (ch && ch->thread.finish)
+       {
+               // wait until deleting channel
+               do
+               {
+                       sys->sleep(500);
+                       ch = chanMgr->findChannelByNameID(info);
+               } while (ch);
+
+               // same as else block
+               if (relay)
+               {
+                       wb.off();
+                       ch = chanMgr->findAndRelay(info);
+                       if (ch)
+                       {
+                               // \81«Exception point
+                               info = ch->info; //get updated channel info 
+                               return true;
+                       }
+               }
        }else
        {
                if (relay)
index 01d2031..dbb2302 100644 (file)
@@ -44,9 +44,9 @@ extern int version_ex; // VERSION_EX
 #if 1 /* for VP extend version */
 //#define VERSION_EX 1
 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
-static const int  PCP_CLIENT_VERSION_EX_NUMBER = 41;
-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0041)";
-static const char *PCX_VERSTRING_EX = "v0.1218(IM0041)";
+static const int  PCP_CLIENT_VERSION_EX_NUMBER = 42;
+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0042)";
+static const char *PCX_VERSTRING_EX = "v0.1218(IM0042)";
 
 static const char *PCP_CLIENT_DIST_URL = "http://pecaim.net/";
 static const char *PCP_CLIENT_VERSION_URL = "version.pecaim.net";
index 5fb1d20..29be937 100644 (file)
@@ -1767,6 +1767,27 @@ bool ServMgr::getChannel(char *str,ChanInfo &info, bool relay)
                info = ch->info;        // get updated channel info 
 
                return true;
+       } else if (ch && ch->thread.finish)
+       {
+               // wait until deleting channel
+               do
+               {
+                       sys->sleep(500);
+                       ch = chanMgr->findChannelByNameID(info);
+               } while (ch);
+
+               // same as else block
+               if (relay)
+               {
+                       wb.off();
+                       ch = chanMgr->findAndRelay(info);
+                       if (ch)
+                       {
+                               // \81«Exception point
+                               info = ch->info; //get updated channel info 
+                               return true;
+                       }
+               }
        }else
        {
                if (relay)
index 01d2031..dbb2302 100644 (file)
@@ -44,9 +44,9 @@ extern int version_ex; // VERSION_EX
 #if 1 /* for VP extend version */
 //#define VERSION_EX 1
 static const char *PCP_CLIENT_VERSION_EX_PREFIX = "IM"; // 2bytes only
-static const int  PCP_CLIENT_VERSION_EX_NUMBER = 41;
-static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0041)";
-static const char *PCX_VERSTRING_EX = "v0.1218(IM0041)";
+static const int  PCP_CLIENT_VERSION_EX_NUMBER = 42;
+static const char *PCX_AGENTEX = "PeerCast/0.1218(IM0042)";
+static const char *PCX_VERSTRING_EX = "v0.1218(IM0042)";
 
 static const char *PCP_CLIENT_DIST_URL = "http://pecaim.net/";
 static const char *PCP_CLIENT_VERSION_URL = "version.pecaim.net";