projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bcdb74c
)
moved $s2u array from users-idx to users-instances
author
Matteo Nastasi
<nastasi@alternativeoutput.it>
Fri, 3 Aug 2012 08:07:18 +0000
(10:07 +0200)
committer
Matteo Nastasi
<nastasi@alternativeoutput.it>
Fri, 3 Aug 2012 08:07:18 +0000
(10:07 +0200)
web/spush/brisk-spush.php
patch
|
blob
|
history
diff --git
a/web/spush/brisk-spush.php
b/web/spush/brisk-spush.php
index
8716dcb
..
a6c3a08
100755
(executable)
--- a/
web/spush/brisk-spush.php
+++ b/
web/spush/brisk-spush.php
@@
-329,7
+329,7
@@
class Sac_a_push {
}
fflush($new_socket);
}
fflush($new_socket);
- $this->s2u[intval($new_socket)] = $
idx
;
+ $this->s2u[intval($new_socket)] = $
user
;
$this->socks[intval($new_socket)] = $new_socket;
$user->rd_socket_set($new_socket);
} while (FALSE);
$this->socks[intval($new_socket)] = $new_socket;
$user->rd_socket_set($new_socket);
} while (FALSE);
@@
-360,8
+360,8
@@
class Sac_a_push {
}
else {
// $user_a[$s2u[intval($sock)]]->disable();
}
else {
// $user_a[$s2u[intval($sock)]]->disable();
- if ($this->
room->user[$this->s2u[intval($sock)]
]->rd_socket_get() != NULL) {
- $this->
room->user[$this->s2u[intval($sock)]
]->rd_socket_set(NULL);
+ if ($this->
s2u[intval($sock)
]->rd_socket_get() != NULL) {
+ $this->
s2u[intval($sock)
]->rd_socket_set(NULL);
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
@@
-401,7
+401,7
@@
class Sac_a_push {
foreach ($this->socks as $k => $sock) {
if (isset($this->s2u[intval($sock)])) {
foreach ($this->socks as $k => $sock) {
if (isset($this->s2u[intval($sock)])) {
- $user = $this->
room->user[$this->s2u[intval($sock)]
];
+ $user = $this->
s2u[intval($sock)
];
$response = $user->rd_cache_get();
if ($response == "") {
$content = "";
$response = $user->rd_cache_get();
if ($response == "") {
$content = "";
@@
-433,8
+433,8
@@
class Sac_a_push {
// close socket after a while to prevent client memory consumption
if ($user->rd_endtime_is_expired($curtime)) {
// $user_a[$s2u[intval($sock)]]->disable();
// close socket after a while to prevent client memory consumption
if ($user->rd_endtime_is_expired($curtime)) {
// $user_a[$s2u[intval($sock)]]->disable();
- if ($this->
room->user[$this->s2u[intval($sock)]
]->rd_socket_get() != NULL) {
- $this->
room->user[$this->s2u[intval($sock)]
]->rd_socket_set(NULL);
+ if ($this->
s2u[intval($sock)
]->rd_socket_get() != NULL) {
+ $this->
s2u[intval($sock)
]->rd_socket_set(NULL);
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
}
unset($this->socks[intval($sock)]);
unset($this->s2u[intval($sock)]);
@@
-449,11
+449,11
@@
class Sac_a_push {
function main()
{
function main()
{
- if (($s
a
p = Sac_a_push::create("/tmp/brisk.sock", 0, 0)) === FALSE) {
+ if (($s
_a_
p = Sac_a_push::create("/tmp/brisk.sock", 0, 0)) === FALSE) {
exit(1);
}
exit(1);
}
- $s
a
p->run();
+ $s
_a_
p->run();
exit(0);
}
exit(0);
}