forked from cory/tildefriends
Fixed some memory leaks. Memory leak-related paranoia. Minor cleanups.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3659 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
11
src/ssb.c
11
src/ssb.c
@ -473,13 +473,6 @@ bool tf_ssb_verify_and_strip_signature(JSContext* context, JSValue val, char* ou
|
||||
return verified;
|
||||
}
|
||||
|
||||
void tf_ssb_send_createHistoryStream(tf_ssb_t* ssb, const char* id)
|
||||
{
|
||||
for (tf_ssb_connection_t* connection = ssb->connections; connection; connection = connection->next) {
|
||||
tf_ssb_rpc_send_createHistoryStream(connection, id);
|
||||
}
|
||||
}
|
||||
|
||||
void tf_ssb_send_close(tf_ssb_t* ssb)
|
||||
{
|
||||
for (tf_ssb_connection_t* connection = ssb->connections; connection; connection = connection->next) {
|
||||
@ -971,10 +964,8 @@ void tf_ssb_append_message(tf_ssb_t* ssb, JSValue message)
|
||||
JSContext* context = ssb->context;
|
||||
JSValue root = JS_NewObject(context);
|
||||
|
||||
JSValue previousstr = JS_NULL;
|
||||
if (have_previous) {
|
||||
previousstr = JS_NewString(context, previous_id);
|
||||
JS_SetPropertyStr(context, root, "previous", previousstr);
|
||||
JS_SetPropertyStr(context, root, "previous", JS_NewString(context, previous_id));
|
||||
} else {
|
||||
JS_SetPropertyStr(context, root, "previous", JS_NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user