Page 1 of 1

USER_VARIABLES_UPDATE not fired?

Posted: 11 May 2012, 11:25
by zhangxiao
Hi,

I am using iOS sdk writing my prototype. On client side I have:

Code: Select all

[smartFox send:[SetUserVariablesRequest requestWithUserVariables:vars]];
And on server side I have:

Code: Select all

public class MyExtension extends SFSExtension {
	@Override
	public void init() {
		this.addEventHandler(SFSEventType.USER_VARIABLES_UPDATE, UserVariableUpdateEventHandler.class);
	}
}

Code: Select all

public class UserVariableUpdateEventHandler extends BaseServerEventHandler {

	@Override
	public void handleServerEvent(ISFSEvent event) throws SFSException {
		this.trace("User Variable Updated");
	}
}
But the server handler has never been invoked because I didn't see the trace log.

Re: USER_VARIABLES_UPDATE not fired?

Posted: 11 May 2012, 12:24
by smilefr
Did you make sure the USER_VARIABLES_UPDATE_EVENT was added in your zone configuration file?

Re: USER_VARIABLES_UPDATE not fired?

Posted: 11 May 2012, 13:56
by zhangxiao
smilefr wrote:Did you make sure the USER_VARIABLES_UPDATE_EVENT was added in your zone configuration file?
It's a room extension and yes, in room's configuration, under `permissions and events` tab it's selected

Re: USER_VARIABLES_UPDATE not fired?

Posted: 11 May 2012, 14:32
by itsmylifesoham
after you send the setvariablesrequest from client can you show the logs that you get?

just send the request and go to the logs folder in ur sfs installation directory and post the latest modified txt file.