Implementation of BINARY_FOLLOWS mode in sessionproxy.php (not tested)
authorArt Cancro <ajc@citadel.org>
Wed, 16 May 2007 15:12:22 +0000 (15:12 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 16 May 2007 15:12:22 +0000 (15:12 +0000)
ctdlphp/sessionproxy.php

index ee919ca99345f70455e1e3ef2d8b4eda611b9354..90e7ca3e380600b5f7599a284536b72520b99e58 100755 (executable)
@@ -155,6 +155,13 @@ do {
                                }
                        } while ($buf != "000\n");
 
+                       // BINARY_FOLLOWS mode
+                       if (substr($talkback, 0, 1) == "6") {
+                               $bytes = intval(substr($talkback, 4));
+                               $buf = fread($ctdlock, $bytes);
+                               socket_write($msgsock, $buf, $bytes);
+                       }
+
                        // SEND_LISTING mode
                        if (substr($talkback, 0, 1) == "4") do {
                                socket_clear_error($msgsock);