[asterisk-commits] dlee: branch dlee/endpoints r386575 - /team/dlee/endpoints/main/endpoints.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 25 15:27:54 CDT 2013
Author: dlee
Date: Thu Apr 25 15:27:51 2013
New Revision: 386575
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386575
Log:
Fixed simple errors
Modified:
team/dlee/endpoints/main/endpoints.c
Modified: team/dlee/endpoints/main/endpoints.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/endpoints/main/endpoints.c?view=diff&rev=386575&r1=386574&r2=386575
==============================================================================
--- team/dlee/endpoints/main/endpoints.c (original)
+++ team/dlee/endpoints/main/endpoints.c Thu Apr 25 15:27:51 2013
@@ -201,6 +201,7 @@
endpoint_publish_snapshot(endpoint);
+ ao2_ref(endpoint, +1);
return endpoint;
}
@@ -275,7 +276,7 @@
channel_count = ao2_container_count(endpoint->channel_ids);
snapshot = ao2_alloc(
- sizeof(*snapshot) * channel_count * sizeof(char *),
+ sizeof(*snapshot) + channel_count * sizeof(char *),
endpoint_snapshot_dtor);
if (ast_string_field_init(snapshot, 80) != 0) {
@@ -290,5 +291,6 @@
snapshot->state = endpoint->state;
snapshot->max_channels = endpoint->max_channels;
+ ao2_ref(snapshot, +1);
return snapshot;
}
More information about the asterisk-commits
mailing list