+ $ret = FALSE;
+ $shm = FALSE;
+
+ log_main("SAVE BRISKIN5 DATA");
+
+ if (!isset($bri->tok))
+ return (FALSE);
+
+ while ($bri->shm_sz < BRISKIN5_SHM_MAX) {
+ if (($shm = shm_attach($bri->tok, $bri->shm_sz)) == FALSE)
+ break;
+
+ // log_only("PUT_VAR DI ".strlen(serialize($room)));
+ if (@shm_put_var($shm, $bri->tok, $bri) != FALSE) {
+ shm_detach($shm);
+ return (TRUE);
+ }
+ if (shm_remove($shm) === FALSE) {
+ log_only("REMOVE FALLITA");
+ break;
+ }
+ shm_detach($shm);
+ $bri->shm_sz += BRISKIN5_SHM_DLT;
+ }
+
+ if ($shm)
+ shm_detach($shm);
+
+ return ($ret);
+ }
+
+
+
+ function save_data_orig(&$bri)
+ {
+ GLOBAL $sess;
+