Use less desirable PATH_MAX due to portability concerns of NAME_MAX.

Tue, 22 Mar 2011 21:30:06 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 22 Mar 2011 21:30:06 +0100
changeset 316
153998c81c45
parent 315
75d162df42e8
child 317
855a9d44e7aa

Use less desirable PATH_MAX due to portability concerns of NAME_MAX.

asterisk/asterisk.patch file | annotate | diff | comparison | revisions
     1.1 --- a/asterisk/asterisk.patch	Tue Mar 22 20:35:17 2011 +0100
     1.2 +++ b/asterisk/asterisk.patch	Tue Mar 22 21:30:06 2011 +0100
     1.3 @@ -1326,8 +1326,8 @@
     1.4  -		return -1;
     1.5  +	   of Acct-Unique-Session-Id on server side Channel */
     1.6  +	{
     1.7 -+		char szChanuser[NAME_MAX] = {0};
     1.8 -+		strncpy(szChanuser, &cdr->channel, NAME_MAX-1);
     1.9 ++		char szChanuser[PATH_MAX] = {0};
    1.10 ++		strncpy(szChanuser, &cdr->channel, PATH_MAX-1);
    1.11  +		*(strrchr(szChanuser, '-')) = 0;
    1.12  +		if (!rc_avpair_add(rh, tosend, PW_USER_NAME, szChanuser, strlen(cdr->channel), 0))
    1.13  +			return -1;

mercurial