Browse Source

xmlrpc calls still causing segfaults, lets try with a dedicated client object per call... i'm starting to dislike this library

git.mgm/mediaproxy-ng/2.1
Richard Fuchs 14 years ago
parent
commit
f4833f6b74
2 changed files with 8 additions and 6 deletions
  1. +7
    -6
      daemon/call.c
  2. +1
    -0
      daemon/main.c

+ 7
- 6
daemon/call.c View File

@ -549,23 +549,24 @@ void xmlrpc_kill_calls(void *p) {
xmlrpc_env_init(&e); xmlrpc_env_init(&e);
xmlrpc_client_create(&e, XMLRPC_CLIENT_NO_FLAGS, "ngcp-mediaproxy-ng", MEDIAPROXY_VERSION,
NULL, 0, &c);
if (e.fault_occurred)
abort();
while (xh->tags) { while (xh->tags) {
xmlrpc_client_create(&e, XMLRPC_CLIENT_NO_FLAGS, "ngcp-mediaproxy-ng", MEDIAPROXY_VERSION,
NULL, 0, &c);
if (e.fault_occurred)
abort();
xmlrpc_client_call2f(&e, c, xh->url, "di", &r, "(ssss)", xmlrpc_client_call2f(&e, c, xh->url, "di", &r, "(ssss)",
"sbc", "postControlCmd", xh->tags->data, "teardown"); "sbc", "postControlCmd", xh->tags->data, "teardown");
if (r) if (r)
xmlrpc_DECREF(r); xmlrpc_DECREF(r);
xmlrpc_client_destroy(c);
xh->tags = g_slist_delete_link(xh->tags, xh->tags); xh->tags = g_slist_delete_link(xh->tags, xh->tags);
} }
g_string_chunk_free(xh->c); g_string_chunk_free(xh->c);
g_slice_free1(sizeof(*xh), xh); g_slice_free1(sizeof(*xh), xh);
xmlrpc_client_destroy(c);
xmlrpc_env_clean(&e);
} }
void kill_calls_timer(GSList *list, struct callmaster *m) { void kill_calls_timer(GSList *list, struct callmaster *m) {


+ 1
- 0
daemon/main.c View File

@ -319,6 +319,7 @@ static void init_everything() {
xmlrpc_client_setup_global_const(&e); xmlrpc_client_setup_global_const(&e);
if (e.fault_occurred) if (e.fault_occurred)
abort(); abort();
xmlrpc_env_clean(&e);
} }


Loading…
Cancel
Save