[asterisk-commits] mmichelson: branch group/pimp_my_sip r380652 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 31 12:11:44 CST 2013


Author: mmichelson
Date: Thu Jan 31 12:11:40 2013
New Revision: 380652

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380652
Log:
Pass the size of the endpoint name buffer instead of the size of the endpoint pointer.

So you may be wondering how this supposedly "worked" for me when I tested it before.
Simple. The user name I was testing was "bob" which is smaller than the size of the endpoint
pointer. When I tried a longer name, things stopped working. And now I know why!


Modified:
    team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c

Modified: team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c?view=diff&rev=380652&r1=380651&r2=380652
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c (original)
+++ team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c Thu Jan 31 12:11:40 2013
@@ -45,7 +45,7 @@
 {
 	char endpoint_name[64];
 	struct ast_sip_endpoint *endpoint;
-	if (get_endpoint_name(rdata, endpoint_name, sizeof(endpoint))) {
+	if (get_endpoint_name(rdata, endpoint_name, sizeof(endpoint_name))) {
 		return NULL;
 	}
 	endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name);




More information about the asterisk-commits mailing list