Because getContent is another function inside hook-connect and you
should be returning true or false for getContent and not for hook-connect.

To have hook-connect drop a connection inside getContent, you should use
the cmd.sendResponse[ERROR] instead, which makes the "trick"
I included "return 0;" inside getContent just is to have "things logic"
but really the job is made by the above command.

In the other hand, the following two logic do the same in the hook-connect :


if ( ! params || ! params.session_id) {
    return 0;
}

----------

if ( ! params || ! params.session_id) {
    cmd.sendResponse('ERR', {'code': NNNN, 'value': 'BAD params'});
    return; // ==> just to the stop following logic
}



On 01/23/2012 02:57 PM, utan wrote:
> Erick,
>
> if this code,  if (!$defined(params) || !$defined(params.name)) return
> 0; doesnt let you login , why if I return 0 inside request.getContent
> wouldnt do the same?
> I am cant figure this out....
>
> On Jan 23, 12:24 pm, Erick Romero <[email protected]> wrote:
>

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to