From: Luigi Rizzo Date: Sat, 21 Jul 2007 17:32:00 +0000 (+0000) Subject: Add a note to document how the temporary 'pvt' should be initialized X-Git-Tag: 1.6.0-beta1~3^2~1976 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1daf32e474955fa286a16870b6956e6e87c9a6f8;p=thirdparty%2Fasterisk.git Add a note to document how the temporary 'pvt' should be initialized before using it. I am unclear on the details right now so i hope someone can comment more. The obvious (and lazy) approach would be to bzero() all of it (except for the string pool), but isn't that too much work ? Feedback wanted here... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76313 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 773f340043..02a8e62ce9 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6353,6 +6353,13 @@ static int transmit_response_using_temp(ast_string_field callid, struct sockaddr return -1; } + /* XXX the structure may be dirty from previous usage. + * Here we should state clearly how we should reinitialize it + * before using it. + * E.g. certainly the threadstorage should be left alone, + * but other thihngs such as flags etc. maybe need cleanup ? + */ + /* Initialize the bare minimum */ p->method = intended_method;