Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 37e3e064 authored by rswindell's avatar rswindell

Bugfix: login() method pointed client.user_name to local user name buffer.

Now points to permanent user storage (in private service_client_t buffer).
parent ec9d19f8
......@@ -470,17 +470,17 @@ js_login(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
lprintf("%04d %s !JavaScript ERROR creating user objects"
,client->socket,client->service->protocol);
memcpy(&client->user,&user,sizeof(user));
if(client->client!=NULL) {
client->client->user=user.alias;
client->client->user=client->user.alias;
client_on(client->socket,client->client,TRUE /* update */);
}
memcpy(&client->user,&user,sizeof(user));
client->logintime=time(NULL);
lprintf("%04d %s Logging in %s"
,client->socket,client->service->protocol,user.alias);
,client->socket,client->service->protocol,client->user.alias);
val = BOOLEAN_TO_JSVAL(JS_TRUE);
JS_SetProperty(cx, obj, "logged_in", &val);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment